mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +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
|
* Whether or not this emoji requires colons surrounding it
|
||||||
* @type {boolean}
|
* @type {?boolean}
|
||||||
* @name GuildEmoji#requiresColons
|
* @name GuildEmoji#requiresColons
|
||||||
*/
|
*/
|
||||||
if (typeof data.require_colons !== 'undefined') this.requiresColons = data.require_colons;
|
if (typeof data.require_colons !== 'undefined') this.requiresColons = data.require_colons;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether this emoji is managed by an external service
|
* Whether this emoji is managed by an external service
|
||||||
* @type {boolean}
|
* @type {?boolean}
|
||||||
* @name GuildEmoji#managed
|
* @name GuildEmoji#managed
|
||||||
*/
|
*/
|
||||||
if (typeof data.managed !== 'undefined') this.managed = data.managed;
|
if (typeof data.managed !== 'undefined') this.managed = data.managed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether this emoji is available
|
* Whether this emoji is available
|
||||||
* @type {boolean}
|
* @type {?boolean}
|
||||||
* @name GuildEmoji#available
|
* @name GuildEmoji#available
|
||||||
*/
|
*/
|
||||||
if (typeof data.available !== 'undefined') this.available = data.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);
|
constructor(client: Client, data: object, guild: Guild);
|
||||||
private _roles: string[];
|
private _roles: string[];
|
||||||
|
|
||||||
public available: boolean;
|
public available?: boolean;
|
||||||
public readonly createdAt: Date;
|
public readonly createdAt: Date;
|
||||||
public readonly createdTimestamp: number;
|
public readonly createdTimestamp: number;
|
||||||
public guild: Guild | GuildPreview;
|
public guild: Guild | GuildPreview;
|
||||||
public id: Snowflake;
|
public id: Snowflake;
|
||||||
public managed: boolean;
|
public managed?: boolean;
|
||||||
public requiresColons: boolean;
|
public requiresColons?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
class BroadcastDispatcher extends VolumeMixin(StreamDispatcher) {
|
class BroadcastDispatcher extends VolumeMixin(StreamDispatcher) {
|
||||||
|
|||||||
Reference in New Issue
Block a user