From ff4d6dded52771788619df395df016279909ba3c Mon Sep 17 00:00:00 2001 From: Rodry <38259440+ImRodry@users.noreply.github.com> Date: Thu, 3 Jun 2021 19:17:31 +0100 Subject: [PATCH] types: change remaining string IDs to Snowflakes (#5737) --- typings/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 9124fe276..c0b27efec 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -438,7 +438,7 @@ declare module 'discord.js' { export class CommandInteraction extends Interaction { public readonly command: ApplicationCommand | null; public channel: TextChannel | DMChannel | NewsChannel; - public commandID: string; + public commandID: Snowflake; public commandName: string; public deferred: boolean; public options: Collection; @@ -1760,7 +1760,7 @@ declare module 'discord.js' { public static removeMentions(str: string): string; public static cloneObject(obj: unknown): unknown; public static delayFor(ms: number): Promise; - public static discordSort( + public static discordSort( collection: Collection, ): Collection; public static escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string; @@ -1779,7 +1779,7 @@ declare module 'discord.js' { public static makePlainError(err: Error): { name: string; message: string; stack: string }; public static mergeDefault(def: unknown, given: unknown): unknown; public static moveElementInArray(array: any[], element: any, newIndex: number, offset?: boolean): number; - public static parseEmoji(text: string): { animated: boolean; name: string; id: string | null } | null; + public static parseEmoji(text: string): { animated: boolean; name: string; id: Snowflake | null } | null; public static resolveColor(color: ColorResolvable): number; public static verifyString(data: string, error?: typeof Error, errorMessage?: string, allowEmpty?: boolean): string; public static setPosition( @@ -1960,7 +1960,7 @@ declare module 'discord.js' { } export class WebhookClient extends WebhookMixin(BaseClient) { - constructor(id: string, token: string, options?: WebhookClientOptions); + constructor(id: Snowflake, token: string, options?: WebhookClientOptions); public client: this; public options: WebhookClientOptions; public token: string; @@ -3114,7 +3114,7 @@ declare module 'discord.js' { } interface IntegrationData { - id: string; + id: Snowflake; type: string; } @@ -3124,7 +3124,7 @@ declare module 'discord.js' { } interface IntegrationAccount { - id: string; + id: string | Snowflake; name: string; } @@ -3435,7 +3435,7 @@ declare module 'discord.js' { readonly createdAt: Date; readonly createdTimestamp: number; deleted: boolean; - id: string; + id: Snowflake; partial: true; fetch(): Promise; } & {