docs(BaseGuildEmoji): account for optional properties (#4723)

This commit is contained in:
Louis
2020-08-28 21:49:53 +09:30
committed by GitHub
parent 6aab9c3d64
commit a363b90fa5
2 changed files with 6 additions and 6 deletions

View File

@@ -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
View File

@@ -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) {