From a8e365743ce3576bc0fce45963911da404d7bcdf Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Fri, 4 Oct 2019 11:20:56 +0200 Subject: [PATCH] typings: optional reason for setNSFW and add deleted properties (#3505) * typings: optional reason for setNSFW and add deleted properties * typings(Guild): setDefaultMessageNotifications' reason is also optional --- typings/index.d.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 584e31bdf..96ef73bc7 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -50,6 +50,7 @@ declare module 'discord.js' { public readonly client: Client; public readonly createdAt: Date; public readonly createdTimestamp: number; + public deleted: boolean; public id: Snowflake; public type: 'dm' | 'group' | 'text' | 'voice' | 'category' | 'news' | 'store'; public delete(): Promise; @@ -408,6 +409,7 @@ declare module 'discord.js' { public readonly createdAt: Date; public readonly createdTimestamp: number; public readonly deletable: boolean; + public deleted: boolean; public guild: Guild; public id: Snowflake; public readonly identifier: string; @@ -486,6 +488,7 @@ declare module 'discord.js' { public available: boolean; public banner: string | null; public readonly bannerURL: string | null; + public deleted: boolean; public description: string | null; public channels: Collection; public defaultMessageNotifications: DefaultMessageNotifications | number; @@ -569,7 +572,7 @@ declare module 'discord.js' { public setAFKTimeout(afkTimeout: number, reason?: string): Promise; public setChannelPosition(channel: string | GuildChannel, position: number, relative?: boolean): Promise; public setChannelPositions(channelPositions: ChannelPosition[]): Promise; - public setDefaultMessageNotifications(defaultMessageNotifications: DefaultMessageNotifications, reason: string): Promise; + public setDefaultMessageNotifications(defaultMessageNotifications: DefaultMessageNotifications, reason?: string): Promise; public setEmbed(embed: GuildEmbedData, reason?: string): Promise; public setExplicitContentFilter(explicitContentFilter: number, reason?: string): Promise; public setIcon(icon: Base64Resolvable, reason?: string): Promise; @@ -654,6 +657,7 @@ declare module 'discord.js' { public readonly client: Client; public readonly colorRole: Role; public readonly deaf: boolean; + public deleted: boolean; public readonly displayColor: number; public readonly displayHexColor: string; public readonly displayName: string; @@ -741,6 +745,7 @@ declare module 'discord.js' { public readonly createdAt: Date; public createdTimestamp: number; public readonly deletable: boolean; + public deleted: boolean; public readonly editable: boolean; public readonly editedAt: Date; public editedTimestamp: number; @@ -1082,6 +1087,7 @@ declare module 'discord.js' { public color: number; public readonly createdAt: Date; public readonly createdTimestamp: number; + public deleted: boolean; public readonly editable: boolean; public guild: Guild; public readonly hexColor: string; @@ -1272,7 +1278,7 @@ declare module 'discord.js' { public setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise; public createWebhook(name: string, avatar: BufferResolvable, reason?: string): Promise; public fetchWebhooks(): Promise>; - public setNSFW(nsfw: boolean, reason: string): Promise; + public setNSFW(nsfw: boolean, reason?: string): Promise; } export class User extends PartialTextBasedChannel() {