mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(BaseGuildEmoji): account for optional properties (#4723)
This commit is contained in:
@@ -32,21 +32,21 @@ class BaseGuildEmoji extends Emoji {
|
||||
|
||||
/**
|
||||
* Whether or not this emoji requires colons surrounding it
|
||||
* @type {boolean}
|
||||
* @type {?boolean}
|
||||
* @name GuildEmoji#requiresColons
|
||||
*/
|
||||
if (typeof data.require_colons !== 'undefined') this.requiresColons = data.require_colons;
|
||||
|
||||
/**
|
||||
* Whether this emoji is managed by an external service
|
||||
* @type {boolean}
|
||||
* @type {?boolean}
|
||||
* @name GuildEmoji#managed
|
||||
*/
|
||||
if (typeof data.managed !== 'undefined') this.managed = data.managed;
|
||||
|
||||
/**
|
||||
* Whether this emoji is available
|
||||
* @type {boolean}
|
||||
* @type {?boolean}
|
||||
* @name GuildEmoji#available
|
||||
*/
|
||||
if (typeof data.available !== 'undefined') this.available = data.available;
|
||||
|
||||
6
typings/index.d.ts
vendored
6
typings/index.d.ts
vendored
@@ -114,13 +114,13 @@ declare module 'discord.js' {
|
||||
constructor(client: Client, data: object, guild: Guild);
|
||||
private _roles: string[];
|
||||
|
||||
public available: boolean;
|
||||
public available?: boolean;
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public guild: Guild | GuildPreview;
|
||||
public id: Snowflake;
|
||||
public managed: boolean;
|
||||
public requiresColons: boolean;
|
||||
public managed?: boolean;
|
||||
public requiresColons?: boolean;
|
||||
}
|
||||
|
||||
class BroadcastDispatcher extends VolumeMixin(StreamDispatcher) {
|
||||
|
||||
Reference in New Issue
Block a user