mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types: change remaining string IDs to Snowflakes (#5737)
This commit is contained in:
14
typings/index.d.ts
vendored
14
typings/index.d.ts
vendored
@@ -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<string, CommandInteractionOption>;
|
||||
@@ -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<void>;
|
||||
public static discordSort<K, V extends { rawPosition: number; id: string }>(
|
||||
public static discordSort<K, V extends { rawPosition: number; id: Snowflake }>(
|
||||
collection: Collection<K, V>,
|
||||
): Collection<K, V>;
|
||||
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<T extends Channel | Role>(
|
||||
@@ -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<T>;
|
||||
} & {
|
||||
|
||||
Reference in New Issue
Block a user