mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: add missing error codes (#5008)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
161
typings/index.d.ts
vendored
161
typings/index.d.ts
vendored
@@ -482,59 +482,7 @@ declare module 'discord.js' {
|
||||
HELLO: 10;
|
||||
HEARTBEAT_ACK: 11;
|
||||
};
|
||||
APIErrors: {
|
||||
UNKNOWN_ACCOUNT: 10001;
|
||||
UNKNOWN_APPLICATION: 10002;
|
||||
UNKNOWN_CHANNEL: 10003;
|
||||
UNKNOWN_GUILD: 10004;
|
||||
UNKNOWN_INTEGRATION: 10005;
|
||||
UNKNOWN_INVITE: 10006;
|
||||
UNKNOWN_MEMBER: 10007;
|
||||
UNKNOWN_MESSAGE: 10008;
|
||||
UNKNOWN_OVERWRITE: 10009;
|
||||
UNKNOWN_PROVIDER: 10010;
|
||||
UNKNOWN_ROLE: 10011;
|
||||
UNKNOWN_TOKEN: 10012;
|
||||
UNKNOWN_USER: 10013;
|
||||
UNKNOWN_EMOJI: 10014;
|
||||
UNKNOWN_WEBHOOK: 10015;
|
||||
BOT_PROHIBITED_ENDPOINT: 20001;
|
||||
BOT_ONLY_ENDPOINT: 20002;
|
||||
MAXIMUM_GUILDS: 30001;
|
||||
MAXIMUM_FRIENDS: 30002;
|
||||
MAXIMUM_PINS: 30003;
|
||||
MAXIMUM_ROLES: 30005;
|
||||
MAXIMUM_REACTIONS: 30010;
|
||||
MAXIMUM_CHANNELS: 30013;
|
||||
MAXIMUM_INVITES: 30016;
|
||||
UNAUTHORIZED: 40001;
|
||||
USER_BANNED: 40007;
|
||||
MISSING_ACCESS: 50001;
|
||||
INVALID_ACCOUNT_TYPE: 50002;
|
||||
CANNOT_EXECUTE_ON_DM: 50003;
|
||||
EMBED_DISABLED: 50004;
|
||||
CANNOT_EDIT_MESSAGE_BY_OTHER: 50005;
|
||||
CANNOT_SEND_EMPTY_MESSAGE: 50006;
|
||||
CANNOT_MESSAGE_USER: 50007;
|
||||
CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL: 50008;
|
||||
CHANNEL_VERIFICATION_LEVEL_TOO_HIGH: 50009;
|
||||
OAUTH2_APPLICATION_BOT_ABSENT: 50010;
|
||||
MAXIMUM_OAUTH2_APPLICATIONS: 50011;
|
||||
INVALID_OAUTH_STATE: 50012;
|
||||
MISSING_PERMISSIONS: 50013;
|
||||
INVALID_AUTHENTICATION_TOKEN: 50014;
|
||||
NOTE_TOO_LONG: 50015;
|
||||
INVALID_BULK_DELETE_QUANTITY: 50016;
|
||||
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
|
||||
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
|
||||
INVALID_OAUTH_TOKEN: 50025;
|
||||
BULK_DELETE_MESSAGE_TOO_OLD: 50034;
|
||||
INVALID_FORM_BODY: 50035;
|
||||
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: 50036;
|
||||
INVALID_API_VERSION: 50041;
|
||||
REACTION_BLOCKED: 90001;
|
||||
RESOURCE_OVERLOADED: 130000;
|
||||
};
|
||||
APIErrors: APIErrors;
|
||||
VoiceStatus: {
|
||||
CONNECTED: 0;
|
||||
CONNECTING: 1;
|
||||
@@ -2136,51 +2084,68 @@ declare module 'discord.js' {
|
||||
deaf?: boolean;
|
||||
}
|
||||
|
||||
interface APIError {
|
||||
UNKNOWN_ACCOUNT: number;
|
||||
UNKNOWN_APPLICATION: number;
|
||||
UNKNOWN_CHANNEL: number;
|
||||
UNKNOWN_GUILD: number;
|
||||
UNKNOWN_INTEGRATION: number;
|
||||
UNKNOWN_INVITE: number;
|
||||
UNKNOWN_MEMBER: number;
|
||||
UNKNOWN_MESSAGE: number;
|
||||
UNKNOWN_OVERWRITE: number;
|
||||
UNKNOWN_PROVIDER: number;
|
||||
UNKNOWN_ROLE: number;
|
||||
UNKNOWN_TOKEN: number;
|
||||
UNKNOWN_USER: number;
|
||||
UNKNOWN_EMOJI: number;
|
||||
UNKNOWN_WEBHOOK: number;
|
||||
BOT_PROHIBITED_ENDPOINT: number;
|
||||
BOT_ONLY_ENDPOINT: number;
|
||||
MAXIMUM_GUILDS: number;
|
||||
MAXIMUM_FRIENDS: number;
|
||||
MAXIMUM_PINS: number;
|
||||
MAXIMUM_ROLES: number;
|
||||
MAXIMUM_REACTIONS: number;
|
||||
UNAUTHORIZED: number;
|
||||
MISSING_ACCESS: number;
|
||||
INVALID_ACCOUNT_TYPE: number;
|
||||
CANNOT_EXECUTE_ON_DM: number;
|
||||
EMBED_DISABLED: number;
|
||||
CANNOT_EDIT_MESSAGE_BY_OTHER: number;
|
||||
CANNOT_SEND_EMPTY_MESSAGE: number;
|
||||
CANNOT_MESSAGE_USER: number;
|
||||
CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL: number;
|
||||
CHANNEL_VERIFICATION_LEVEL_TOO_HIGH: number;
|
||||
OAUTH2_APPLICATION_BOT_ABSENT: number;
|
||||
MAXIMUM_OAUTH2_APPLICATIONS: number;
|
||||
INVALID_OAUTH_STATE: number;
|
||||
MISSING_PERMISSIONS: number;
|
||||
INVALID_AUTHENTICATION_TOKEN: number;
|
||||
NOTE_TOO_LONG: number;
|
||||
INVALID_BULK_DELETE_QUANTITY: number;
|
||||
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: number;
|
||||
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: number;
|
||||
BULK_DELETE_MESSAGE_TOO_OLD: number;
|
||||
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: number;
|
||||
REACTION_BLOCKED: number;
|
||||
interface APIErrors {
|
||||
UNKNOWN_ACCOUNT: 10001;
|
||||
UNKNOWN_APPLICATION: 10002;
|
||||
UNKNOWN_CHANNEL: 10003;
|
||||
UNKNOWN_GUILD: 10004;
|
||||
UNKNOWN_INTEGRATION: 10005;
|
||||
UNKNOWN_INVITE: 10006;
|
||||
UNKNOWN_MEMBER: 10007;
|
||||
UNKNOWN_MESSAGE: 10008;
|
||||
UNKNOWN_OVERWRITE: 10009;
|
||||
UNKNOWN_PROVIDER: 10010;
|
||||
UNKNOWN_ROLE: 10011;
|
||||
UNKNOWN_TOKEN: 10012;
|
||||
UNKNOWN_USER: 10013;
|
||||
UNKNOWN_EMOJI: 10014;
|
||||
UNKNOWN_WEBHOOK: 10015;
|
||||
UNKNOWN_BAN: 10026;
|
||||
BOT_PROHIBITED_ENDPOINT: 20001;
|
||||
BOT_ONLY_ENDPOINT: 20002;
|
||||
CHANNEL_HIT_WRITE_RATELIMIT: 20028;
|
||||
MAXIMUM_GUILDS: 30001;
|
||||
MAXIMUM_FRIENDS: 30002;
|
||||
MAXIMUM_PINS: 30003;
|
||||
MAXIMUM_ROLES: 30005;
|
||||
MAXIMUM_WEBHOOKS: 30007;
|
||||
MAXIMUM_REACTIONS: 30010;
|
||||
MAXIMUM_CHANNELS: 30013;
|
||||
MAXIMUM_ATTACHMENTS: 30015;
|
||||
MAXIMUM_INVITES: 30016;
|
||||
UNAUTHORIZED: 40001;
|
||||
ACCOUNT_VERIFICATION_REQUIRED: 40002;
|
||||
REQUEST_ENTITY_TOO_LARGE: 40005;
|
||||
FEATURE_TEMPORARILY_DISABLED: 40006;
|
||||
USER_BANNED: 40007;
|
||||
ALREADY_CROSSPOSTED: 40033;
|
||||
MISSING_ACCESS: 50001;
|
||||
INVALID_ACCOUNT_TYPE: 50002;
|
||||
CANNOT_EXECUTE_ON_DM: 50003;
|
||||
EMBED_DISABLED: 50004;
|
||||
CANNOT_EDIT_MESSAGE_BY_OTHER: 50005;
|
||||
CANNOT_SEND_EMPTY_MESSAGE: 50006;
|
||||
CANNOT_MESSAGE_USER: 50007;
|
||||
CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL: 50008;
|
||||
CHANNEL_VERIFICATION_LEVEL_TOO_HIGH: 50009;
|
||||
OAUTH2_APPLICATION_BOT_ABSENT: 50010;
|
||||
MAXIMUM_OAUTH2_APPLICATIONS: 50011;
|
||||
INVALID_OAUTH_STATE: 50012;
|
||||
MISSING_PERMISSIONS: 50013;
|
||||
INVALID_AUTHENTICATION_TOKEN: 50014;
|
||||
NOTE_TOO_LONG: 50015;
|
||||
INVALID_BULK_DELETE_QUANTITY: 50016;
|
||||
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
|
||||
INVALID_OR_TAKEN_INVITE_CODE: 50020;
|
||||
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
|
||||
INVALID_OAUTH_TOKEN: 50025;
|
||||
BULK_DELETE_MESSAGE_TOO_OLD: 50034;
|
||||
INVALID_FORM_BODY: 50035;
|
||||
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: 50036;
|
||||
INVALID_API_VERSION: 50041;
|
||||
CANNOT_DELETE_COMMUNITY_REQUIRED_CHANNEL: 50074;
|
||||
REACTION_BLOCKED: 90001;
|
||||
RESOURCE_OVERLOADED: 130000;
|
||||
}
|
||||
|
||||
type APIMessageContentResolvable = string | number | boolean | bigint | symbol | readonly StringResolvable[];
|
||||
|
||||
Reference in New Issue
Block a user