From 21d1be9e18789293d792d8dae849a98276031c7f Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Thu, 4 May 2023 16:50:10 +0100 Subject: [PATCH] chore: migrate to eslint-config-neon (#756) --- .eslintrc.json | 15 +- deno/gateway/v10.ts | 4 +- deno/gateway/v6.ts | 64 +- deno/gateway/v8.ts | 124 +- deno/gateway/v9.ts | 4 +- deno/globals.ts | 10 +- deno/payloads/common.ts | 2 + .../_chatInput/attachment.ts | 2 +- .../_applicationCommands/_chatInput/base.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 6 +- .../_applicationCommands/contextMenu.ts | 2 +- .../_applicationCommands/permissions.ts | 1 + .../v10/_interactions/applicationCommands.ts | 5 +- deno/payloads/v10/_interactions/base.ts | 2 +- .../v10/_interactions/messageComponents.ts | 6 +- deno/payloads/v10/_interactions/responses.ts | 2 +- deno/payloads/v10/application.ts | 4 +- deno/payloads/v10/auditLog.ts | 2 +- deno/payloads/v10/channel.ts | 11 +- deno/payloads/v10/emoji.ts | 2 +- deno/payloads/v10/gateway.ts | 5 +- deno/payloads/v10/guild.ts | 7 +- deno/payloads/v10/guildScheduledEvent.ts | 2 +- deno/payloads/v10/invite.ts | 1 + deno/payloads/v10/stageInstance.ts | 3 +- deno/payloads/v10/sticker.ts | 3 +- deno/payloads/v10/teams.ts | 2 +- deno/payloads/v10/template.ts | 2 +- deno/payloads/v10/user.ts | 11 +- deno/payloads/v10/voice.ts | 2 +- deno/payloads/v10/webhook.ts | 2 +- deno/payloads/v6/auditLog.ts | 55 + deno/payloads/v6/channel.ts | 23 + deno/payloads/v6/emoji.ts | 2 + deno/payloads/v6/gateway.ts | 13 + deno/payloads/v6/guild.ts | 17 + deno/payloads/v6/invite.ts | 3 + deno/payloads/v6/oauth2.ts | 1 + deno/payloads/v6/permissions.ts | 45 +- deno/payloads/v6/teams.ts | 3 + deno/payloads/v6/user.ts | 4 + deno/payloads/v6/voice.ts | 2 + deno/payloads/v6/webhook.ts | 1 + .../_chatInput/attachment.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_applicationCommands/_chatInput/shared.ts | 2 + .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 26 +- .../_applicationCommands/contextMenu.ts | 16 +- .../_applicationCommands/permissions.ts | 3 + .../v8/_interactions/applicationCommands.ts | 15 +- .../payloads/v8/_interactions/autocomplete.ts | 2 + deno/payloads/v8/_interactions/base.ts | 5 +- .../v8/_interactions/messageComponents.ts | 2 +- deno/payloads/v8/_interactions/modalSubmit.ts | 3 + deno/payloads/v8/_interactions/responses.ts | 7 +- deno/payloads/v8/application.ts | 4 +- deno/payloads/v8/auditLog.ts | 71 +- deno/payloads/v8/channel.ts | 39 +- deno/payloads/v8/emoji.ts | 4 +- deno/payloads/v8/gateway.ts | 15 +- deno/payloads/v8/guild.ts | 28 +- deno/payloads/v8/guildScheduledEvent.ts | 8 +- deno/payloads/v8/interactions.ts | 3 + deno/payloads/v8/invite.ts | 3 + deno/payloads/v8/permissions.ts | 2 + deno/payloads/v8/stageInstance.ts | 5 +- deno/payloads/v8/sticker.ts | 8 +- deno/payloads/v8/teams.ts | 5 +- deno/payloads/v8/template.ts | 3 +- deno/payloads/v8/user.ts | 8 +- deno/payloads/v8/voice.ts | 4 +- deno/payloads/v8/webhook.ts | 3 +- .../_chatInput/attachment.ts | 2 +- .../_applicationCommands/_chatInput/base.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 6 +- .../_applicationCommands/contextMenu.ts | 2 +- .../_applicationCommands/permissions.ts | 1 + .../v9/_interactions/applicationCommands.ts | 5 +- deno/payloads/v9/_interactions/base.ts | 2 +- .../v9/_interactions/messageComponents.ts | 6 +- deno/payloads/v9/_interactions/responses.ts | 2 +- deno/payloads/v9/application.ts | 4 +- deno/payloads/v9/auditLog.ts | 2 +- deno/payloads/v9/channel.ts | 11 +- deno/payloads/v9/emoji.ts | 2 +- deno/payloads/v9/gateway.ts | 2 +- deno/payloads/v9/guild.ts | 7 +- deno/payloads/v9/guildScheduledEvent.ts | 2 +- deno/payloads/v9/invite.ts | 1 + deno/payloads/v9/stageInstance.ts | 5 +- deno/payloads/v9/sticker.ts | 3 +- deno/payloads/v9/teams.ts | 2 +- deno/payloads/v9/template.ts | 2 +- deno/payloads/v9/user.ts | 11 +- deno/payloads/v9/voice.ts | 2 +- deno/payloads/v9/webhook.ts | 2 +- deno/rest/common.ts | 166 +- deno/rest/v10/guild.ts | 30 +- deno/rest/v10/interactions.ts | 16 +- deno/rest/v10/mod.ts | 5 +- deno/rest/v6/auditLog.ts | 1 + deno/rest/v6/channel.ts | 16 + deno/rest/v6/emoji.ts | 5 + deno/rest/v6/gateway.ts | 2 + deno/rest/v6/guild.ts | 49 +- deno/rest/v6/invite.ts | 2 + deno/rest/v6/oauth2.ts | 13 + deno/rest/v6/user.ts | 7 + deno/rest/v6/voice.ts | 1 + deno/rest/v6/webhook.ts | 15 +- deno/rest/v8/auditLog.ts | 1 + deno/rest/v8/channel.ts | 44 +- deno/rest/v8/emoji.ts | 7 + deno/rest/v8/gateway.ts | 2 + deno/rest/v8/guild.ts | 80 +- deno/rest/v8/guildScheduledEvent.ts | 11 + deno/rest/v8/interactions.ts | 55 +- deno/rest/v8/invite.ts | 2 + deno/rest/v8/mod.ts | 5 +- deno/rest/v8/oauth2.ts | 14 + deno/rest/v8/stageInstance.ts | 6 + deno/rest/v8/template.ts | 10 + deno/rest/v8/user.ts | 11 + deno/rest/v8/voice.ts | 1 + deno/rest/v8/webhook.ts | 28 + deno/rest/v9/channel.ts | 2 + deno/rest/v9/guild.ts | 28 +- deno/rest/v9/interactions.ts | 16 +- deno/rest/v9/mod.ts | 5 +- deno/rpc/common.ts | 10 +- deno/utils/v10.ts | 22 +- deno/utils/v8.ts | 14 +- deno/utils/v9.ts | 22 +- deno/voice/v4.ts | 8 +- gateway/v10.ts | 4 +- gateway/v6.ts | 64 +- gateway/v8.ts | 124 +- gateway/v9.ts | 4 +- globals.ts | 10 +- package-lock.json | 8865 ++++++----------- package.json | 9 +- payloads/common.ts | 2 + .../_chatInput/attachment.ts | 2 +- .../_applicationCommands/_chatInput/base.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 6 +- .../_applicationCommands/contextMenu.ts | 2 +- .../_applicationCommands/permissions.ts | 1 + .../v10/_interactions/applicationCommands.ts | 5 +- payloads/v10/_interactions/base.ts | 2 +- .../v10/_interactions/messageComponents.ts | 6 +- payloads/v10/_interactions/responses.ts | 2 +- payloads/v10/application.ts | 4 +- payloads/v10/auditLog.ts | 2 +- payloads/v10/channel.ts | 11 +- payloads/v10/emoji.ts | 2 +- payloads/v10/gateway.ts | 5 +- payloads/v10/guild.ts | 7 +- payloads/v10/guildScheduledEvent.ts | 2 +- payloads/v10/invite.ts | 1 + payloads/v10/stageInstance.ts | 3 +- payloads/v10/sticker.ts | 3 +- payloads/v10/teams.ts | 2 +- payloads/v10/template.ts | 2 +- payloads/v10/user.ts | 11 +- payloads/v10/voice.ts | 2 +- payloads/v10/webhook.ts | 2 +- payloads/v6/auditLog.ts | 55 + payloads/v6/channel.ts | 23 + payloads/v6/emoji.ts | 2 + payloads/v6/gateway.ts | 13 + payloads/v6/guild.ts | 17 + payloads/v6/invite.ts | 3 + payloads/v6/oauth2.ts | 1 + payloads/v6/permissions.ts | 45 +- payloads/v6/teams.ts | 3 + payloads/v6/user.ts | 4 + payloads/v6/voice.ts | 2 + payloads/v6/webhook.ts | 1 + .../_chatInput/attachment.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_applicationCommands/_chatInput/shared.ts | 2 + .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 26 +- .../_applicationCommands/contextMenu.ts | 16 +- .../_applicationCommands/permissions.ts | 3 + .../v8/_interactions/applicationCommands.ts | 15 +- payloads/v8/_interactions/autocomplete.ts | 2 + payloads/v8/_interactions/base.ts | 5 +- .../v8/_interactions/messageComponents.ts | 2 +- payloads/v8/_interactions/modalSubmit.ts | 3 + payloads/v8/_interactions/responses.ts | 7 +- payloads/v8/application.ts | 4 +- payloads/v8/auditLog.ts | 71 +- payloads/v8/channel.ts | 39 +- payloads/v8/emoji.ts | 4 +- payloads/v8/gateway.ts | 15 +- payloads/v8/guild.ts | 28 +- payloads/v8/guildScheduledEvent.ts | 8 +- payloads/v8/interactions.ts | 3 + payloads/v8/invite.ts | 3 + payloads/v8/permissions.ts | 2 + payloads/v8/stageInstance.ts | 5 +- payloads/v8/sticker.ts | 8 +- payloads/v8/teams.ts | 5 +- payloads/v8/template.ts | 3 +- payloads/v8/user.ts | 8 +- payloads/v8/voice.ts | 4 +- payloads/v8/webhook.ts | 3 +- .../_chatInput/attachment.ts | 2 +- .../_applicationCommands/_chatInput/base.ts | 2 +- .../_chatInput/channel.ts | 4 +- .../_chatInput/mentionable.ts | 2 +- .../_applicationCommands/_chatInput/role.ts | 2 +- .../_chatInput/subcommand.ts | 2 +- .../_applicationCommands/_chatInput/user.ts | 2 +- .../_applicationCommands/chatInput.ts | 6 +- .../_applicationCommands/contextMenu.ts | 2 +- .../_applicationCommands/permissions.ts | 1 + .../v9/_interactions/applicationCommands.ts | 5 +- payloads/v9/_interactions/base.ts | 2 +- .../v9/_interactions/messageComponents.ts | 6 +- payloads/v9/_interactions/responses.ts | 2 +- payloads/v9/application.ts | 4 +- payloads/v9/auditLog.ts | 2 +- payloads/v9/channel.ts | 11 +- payloads/v9/emoji.ts | 2 +- payloads/v9/gateway.ts | 2 +- payloads/v9/guild.ts | 7 +- payloads/v9/guildScheduledEvent.ts | 2 +- payloads/v9/invite.ts | 1 + payloads/v9/stageInstance.ts | 5 +- payloads/v9/sticker.ts | 3 +- payloads/v9/teams.ts | 2 +- payloads/v9/template.ts | 2 +- payloads/v9/user.ts | 11 +- payloads/v9/voice.ts | 2 +- payloads/v9/webhook.ts | 2 +- rest/common.ts | 166 +- rest/v10/guild.ts | 30 +- rest/v10/index.ts | 5 +- rest/v10/interactions.ts | 16 +- rest/v6/auditLog.ts | 1 + rest/v6/channel.ts | 16 + rest/v6/emoji.ts | 5 + rest/v6/gateway.ts | 2 + rest/v6/guild.ts | 49 +- rest/v6/invite.ts | 2 + rest/v6/oauth2.ts | 13 + rest/v6/user.ts | 7 + rest/v6/voice.ts | 1 + rest/v6/webhook.ts | 15 +- rest/v8/auditLog.ts | 1 + rest/v8/channel.ts | 44 +- rest/v8/emoji.ts | 7 + rest/v8/gateway.ts | 2 + rest/v8/guild.ts | 80 +- rest/v8/guildScheduledEvent.ts | 11 + rest/v8/index.ts | 5 +- rest/v8/interactions.ts | 55 +- rest/v8/invite.ts | 2 + rest/v8/oauth2.ts | 14 + rest/v8/stageInstance.ts | 6 + rest/v8/template.ts | 10 + rest/v8/user.ts | 11 + rest/v8/voice.ts | 1 + rest/v8/webhook.ts | 28 + rest/v9/channel.ts | 2 + rest/v9/guild.ts | 28 +- rest/v9/index.ts | 5 +- rest/v9/interactions.ts | 16 +- rpc/common.ts | 10 +- scripts/actions/create-pr.mjs | 2 + scripts/actions/create-release.mjs | 6 +- scripts/actions/report-deno-not-ran.mjs | 9 +- scripts/bump-version.mjs | 2 +- scripts/bump-website-version.mjs | 6 +- utils/v10.ts | 22 +- utils/v8.ts | 14 +- utils/v9.ts | 22 +- voice/v4.ts | 8 +- website/.eslintrc | 120 +- website/package-lock.json | 4510 ++++++++- website/package.json | 9 +- .../src/components/Common/LoadingSkeleton.tsx | 3 +- .../components/Docs/OptionalPackageLink.tsx | 9 +- .../components/Docs/RawContentCodeTabs.tsx | 11 +- website/src/components/Docs/SimpleLink.tsx | 7 +- .../src/components/Home/Features/Feature.tsx | 3 +- .../components/Home/Features/Statistics.tsx | 11 +- .../Home/Features/StatisticsFeature.tsx | 5 +- .../src/components/Home/Features/Types.d.ts | 12 +- website/src/components/Home/HeadTags.tsx | 40 +- .../src/components/Home/HomePageHeader.tsx | 19 +- .../src/components/Home/HomepageFeatures.tsx | 15 +- .../Home/InstallButton/InstallTabButton.tsx | 10 +- .../Home/InstallButton/InstallTabs.tsx | 27 +- website/src/pages/index.tsx | 6 +- 319 files changed, 9575 insertions(+), 7384 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 46906253..39a3ee24 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,13 +1,20 @@ { - "extends": "marine/prettier/node", + "extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], "parser": "@typescript-eslint/parser", "parserOptions": { - "project": "./tsconfig.eslint.json", - "extraFileExtensions": [".mjs"] + "project": "./tsconfig.eslint.json" }, "plugins": ["local"], "rules": { + "local/explicit-undefined-on-optional-properties": ["error", { "interfaceEndings": ["JSONBody"] }], "local/explicitly-optional-undefined-properties": ["error", { "interfaceEndings": ["JSONBody"] }], - "local/explicit-undefined-on-optional-properties": ["error", { "interfaceEndings": ["JSONBody"] }] + "@typescript-eslint/consistent-type-definitions": ["error", "interface"], + "@typescript-eslint/prefer-literal-enum-member": "off", + "@typescript-eslint/sort-type-union-intersection-members": "off", + "import/extensions": "off", + "tsdoc/syntax": "off", + "typescript-sort-keys/interface": "off", + "typescript-sort-keys/string-enum": "off", + "unicorn/prefer-math-trunc": "off" } } diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 7c28fb9c..ee115c41 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -98,7 +98,7 @@ export enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ - UnknownError = 4000, + UnknownError = 4_000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * @@ -132,7 +132,7 @@ export enum GatewayCloseCodes { * * See https://discord.com/developers/docs/topics/gateway-events#resume */ - InvalidSeq = 4007, + InvalidSeq = 4_007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ diff --git a/deno/gateway/v6.ts b/deno/gateway/v6.ts index 8cc36e8b..619f8778 100644 --- a/deno/gateway/v6.ts +++ b/deno/gateway/v6.ts @@ -27,6 +27,7 @@ export const GatewayVersion = '6'; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum GatewayOPCodes { @@ -46,17 +47,18 @@ export enum GatewayOPCodes { /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum GatewayCloseCodes { - UnknownError = 4000, + UnknownError = 4_000, UnknownOpCode, DecodeError, NotAuthenticated, AuthenticationFailed, AlreadyAuthenticated, - InvalidSeq = 4007, + InvalidSeq = 4_007, RateLimited, SessionTimedOut, InvalidShard, @@ -68,6 +70,7 @@ export enum GatewayCloseCodes { /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum VoiceOPCodes { @@ -87,28 +90,30 @@ export enum VoiceOPCodes { /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum VoiceCloseCodes { - UnknownOpCode = 4001, + UnknownOpCode = 4_001, - NotAuthenticated = 4003, + NotAuthenticated = 4_003, AuthenticationFailed, AlreadyAuthenticated, SessionNoLongerValid, - SessionTimeout = 4009, + SessionTimeout = 4_009, - ServerNotFound = 4011, + ServerNotFound = 4_011, UnknownProtocol, - Disconnected = 4014, + Disconnected = 4_014, VoiceServerCrashed, UnknownEncryptionMode, } /** * https://discord.com/developers/docs/topics/gateway#list-of-intents + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum GatewayIntentBits { @@ -131,6 +136,7 @@ export enum GatewayIntentBits { /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export enum GatewayDispatchEvents { @@ -233,6 +239,7 @@ export type GatewayDispatchPayload = // #region Dispatch Payloads /** * https://discord.com/developers/docs/topics/gateway#hello + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHello extends NonDispatchPayload { @@ -244,6 +251,7 @@ export interface GatewayHello extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#heartbeating + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeatRequest extends NonDispatchPayload { @@ -253,6 +261,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeatAck extends NonDispatchPayload { @@ -262,6 +271,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#invalid-session + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayInvalidSession extends NonDispatchPayload { @@ -271,6 +281,7 @@ export interface GatewayInvalidSession extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#reconnect + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayReconnect extends NonDispatchPayload { @@ -280,6 +291,7 @@ export interface GatewayReconnect extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#ready + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayReadyDispatch = DataPayload< @@ -296,6 +308,7 @@ export type GatewayReadyDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#resumed + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayResumedDispatch = DataPayload; @@ -305,6 +318,7 @@ export type GatewayResumedDispatch = DataPayload; @@ -370,6 +387,7 @@ export type GatewayGuildDeleteDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#message-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageUpdateDispatch = DataPayload< @@ -546,6 +576,7 @@ export type GatewayMessageUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-delete + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageDeleteDispatch = DataPayload< @@ -559,6 +590,7 @@ export type GatewayMessageDeleteDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageDeleteBulkDispatch = DataPayload< @@ -572,18 +604,21 @@ export type GatewayMessageDeleteBulkDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-reaction-add + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionAddDispatch = ReactionData; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveDispatch = ReactionData; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveAllDispatch = DataPayload< @@ -593,6 +628,7 @@ export type GatewayMessageReactionRemoveAllDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload< @@ -604,12 +640,14 @@ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#presence-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayPresenceUpdateDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#typing-start + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayTypingStartDispatch = DataPayload< @@ -625,18 +663,21 @@ export type GatewayTypingStartDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#user-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayUserUpdateDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#voice-state-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayVoiceStateUpdateDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#voice-server-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayVoiceServerUpdateDispatch = DataPayload< @@ -650,6 +691,7 @@ export type GatewayVoiceServerUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#webhooks-update + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export type GatewayWebhooksUpdateDispatch = DataPayload< @@ -666,6 +708,7 @@ export type GatewayWebhooksUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#heartbeating + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayHeartbeat { @@ -675,6 +718,7 @@ export interface GatewayHeartbeat { /** * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayIdentifyProperties { @@ -685,6 +729,7 @@ export interface GatewayIdentifyProperties { /** * https://discord.com/developers/docs/topics/gateway#identify + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayIdentify { @@ -703,6 +748,7 @@ export interface GatewayIdentify { /** * https://discord.com/developers/docs/topics/gateway#resume + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayResume { @@ -716,6 +762,7 @@ export interface GatewayResume { /** * https://discord.com/developers/docs/topics/gateway#request-guild-members + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayRequestGuildMembers { @@ -732,6 +779,7 @@ export interface GatewayRequestGuildMembers { /** * https://discord.com/developers/docs/topics/gateway#update-voice-state + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayVoiceStateUpdate { @@ -746,6 +794,7 @@ export interface GatewayVoiceStateUpdate { /** * https://discord.com/developers/docs/topics/gateway#update-status + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayUpdatePresence { @@ -755,6 +804,7 @@ export interface GatewayUpdatePresence { /** * https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure + * * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. */ export interface GatewayPresenceUpdateData { diff --git a/deno/gateway/v8.ts b/deno/gateway/v8.ts index b0723e8b..1f008143 100644 --- a/deno/gateway/v8.ts +++ b/deno/gateway/v8.ts @@ -35,6 +35,7 @@ export const GatewayVersion = '8'; /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export enum GatewayOpcodes { @@ -87,13 +88,14 @@ export enum GatewayOpcodes { /** * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ - UnknownError = 4000, + UnknownError = 4_000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * @@ -127,7 +129,7 @@ export enum GatewayCloseCodes { * * See https://discord.com/developers/docs/topics/gateway#resume */ - InvalidSeq = 4007, + InvalidSeq = 4_007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ @@ -171,6 +173,7 @@ export enum GatewayCloseCodes { /** * https://discord.com/developers/docs/topics/gateway#list-of-intents + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export enum GatewayIntentBits { @@ -194,6 +197,7 @@ export enum GatewayIntentBits { /** * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export enum GatewayDispatchEvents { @@ -323,6 +327,7 @@ export type GatewayDispatchPayload = /** * https://discord.com/developers/docs/topics/gateway#hello + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHello extends NonDispatchPayload { @@ -332,6 +337,7 @@ export interface GatewayHello extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#hello + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHelloData { @@ -343,6 +349,7 @@ export interface GatewayHelloData { /** * https://discord.com/developers/docs/topics/gateway#heartbeating + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeatRequest extends NonDispatchPayload { @@ -352,6 +359,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeatAck extends NonDispatchPayload { @@ -361,6 +369,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#invalid-session + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayInvalidSession extends NonDispatchPayload { @@ -370,12 +379,14 @@ export interface GatewayInvalidSession extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#invalid-session + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayInvalidSessionData = boolean; /** * https://discord.com/developers/docs/topics/gateway#reconnect + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayReconnect extends NonDispatchPayload { @@ -385,12 +396,14 @@ export interface GatewayReconnect extends NonDispatchPayload { /** * https://discord.com/developers/docs/topics/gateway#ready + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayReadyDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#ready + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayReadyDispatchData { @@ -432,6 +445,7 @@ export interface GatewayReadyDispatchData { /** * https://discord.com/developers/docs/topics/gateway#resumed + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayResumedDispatch = DataPayload; @@ -440,6 +454,7 @@ export type GatewayResumedDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#guild-delete + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildDeleteDispatchData = APIUnavailableGuild; @@ -575,6 +607,7 @@ export type GatewayGuildDeleteDispatchData = APIUnavailableGuild; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanModifyDispatch = DataPayload< @@ -585,6 +618,7 @@ export type GatewayGuildBanModifyDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildBanModifyDispatchData { @@ -602,30 +636,35 @@ export interface GatewayGuildBanModifyDispatchData { /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; /** * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; /** * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildEmojisUpdateDispatch = DataPayload< @@ -635,6 +674,7 @@ export type GatewayGuildEmojisUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildEmojisUpdateDispatchData { @@ -652,6 +692,7 @@ export interface GatewayGuildEmojisUpdateDispatchData { /** * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildStickersUpdateDispatch = DataPayload< @@ -661,6 +702,7 @@ export type GatewayGuildStickersUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildStickersUpdateDispatchData { @@ -678,6 +720,7 @@ export interface GatewayGuildStickersUpdateDispatchData { /** * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload< @@ -687,6 +730,7 @@ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildIntegrationsUpdateDispatchData { @@ -698,6 +742,7 @@ export interface GatewayGuildIntegrationsUpdateDispatchData { /** * https://discord.com/developers/docs/topics/gateway#guild-member-add + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberAddDispatch = DataPayload< @@ -707,6 +752,7 @@ export type GatewayGuildMemberAddDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-member-add + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { @@ -718,6 +764,7 @@ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { /** * https://discord.com/developers/docs/topics/gateway#guild-member-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberRemoveDispatch = DataPayload< @@ -727,6 +774,7 @@ export type GatewayGuildMemberRemoveDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-member-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayGuildMemberRemoveDispatchData { @@ -744,6 +792,7 @@ export interface GatewayGuildMemberRemoveDispatchData { /** * https://discord.com/developers/docs/topics/gateway#guild-member-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberUpdateDispatch = DataPayload< @@ -753,6 +802,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#guild-member-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayGuildMemberUpdateDispatchData = Omit & @@ -767,6 +817,7 @@ export type GatewayGuildMemberUpdateDispatchData = Omit; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-add + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d']; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveDispatch = ReactionData; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d']; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveAllDispatch = DataPayload< @@ -1263,12 +1348,14 @@ export type GatewayMessageReactionRemoveAllDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData; /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload< @@ -1278,6 +1365,7 @@ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData { @@ -1289,6 +1377,7 @@ export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageRe /** * https://discord.com/developers/docs/topics/gateway#presence-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayPresenceUpdateDispatch = DataPayload< @@ -1298,12 +1387,14 @@ export type GatewayPresenceUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#presence-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-create + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceCreateDispatch = DataPayload< @@ -1313,12 +1404,14 @@ export type GatewayStageInstanceCreateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#stage-instance-create + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceCreateDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceDeleteDispatch = DataPayload< @@ -1328,12 +1421,14 @@ export type GatewayStageInstanceDeleteDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceDeleteDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#stage-instance-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceUpdateDispatch = DataPayload< @@ -1343,18 +1438,21 @@ export type GatewayStageInstanceUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#stage-instance-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayStageInstanceUpdateDispatchData = APIStageInstance; /** * https://discord.com/developers/docs/topics/gateway#typing-start + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayTypingStartDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#typing-start + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayTypingStartDispatchData { @@ -1384,18 +1482,21 @@ export interface GatewayTypingStartDispatchData { /** * https://discord.com/developers/docs/topics/gateway#user-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayUserUpdateDispatch = DataPayload; /** * https://discord.com/developers/docs/topics/gateway#user-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayUserUpdateDispatchData = APIUser; /** * https://discord.com/developers/docs/topics/gateway#voice-state-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceStateUpdateDispatch = DataPayload< @@ -1405,12 +1506,14 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#voice-state-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState; /** * https://discord.com/developers/docs/topics/gateway#voice-server-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayVoiceServerUpdateDispatch = DataPayload< @@ -1420,6 +1523,7 @@ export type GatewayVoiceServerUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#voice-server-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceServerUpdateDispatchData { @@ -1443,6 +1547,7 @@ export interface GatewayVoiceServerUpdateDispatchData { /** * https://discord.com/developers/docs/topics/gateway#webhooks-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayWebhooksUpdateDispatch = DataPayload< @@ -1452,6 +1557,7 @@ export type GatewayWebhooksUpdateDispatch = DataPayload< /** * https://discord.com/developers/docs/topics/gateway#webhooks-update + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayWebhooksUpdateDispatchData { @@ -1471,6 +1577,7 @@ export interface GatewayWebhooksUpdateDispatchData { /** * https://discord.com/developers/docs/topics/gateway#heartbeating + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayHeartbeat { @@ -1480,12 +1587,14 @@ export interface GatewayHeartbeat { /** * https://discord.com/developers/docs/topics/gateway#heartbeating + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayHeartbeatData = number | null; /** * https://discord.com/developers/docs/topics/gateway#identify + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentify { @@ -1495,6 +1604,7 @@ export interface GatewayIdentify { /** * https://discord.com/developers/docs/topics/gateway#identify + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentifyData { @@ -1543,6 +1653,7 @@ export interface GatewayIdentifyData { /** * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayIdentifyProperties { @@ -1562,6 +1673,7 @@ export interface GatewayIdentifyProperties { /** * https://discord.com/developers/docs/topics/gateway#resume + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayResume { @@ -1571,6 +1683,7 @@ export interface GatewayResume { /** * https://discord.com/developers/docs/topics/gateway#resume + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayResumeData { @@ -1590,6 +1703,7 @@ export interface GatewayResumeData { /** * https://discord.com/developers/docs/topics/gateway#request-guild-members + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayRequestGuildMembers { @@ -1599,6 +1713,7 @@ export interface GatewayRequestGuildMembers { /** * https://discord.com/developers/docs/topics/gateway#request-guild-members + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayRequestGuildMembersData { @@ -1635,6 +1750,7 @@ export interface GatewayRequestGuildMembersData { /** * https://discord.com/developers/docs/topics/gateway#update-voice-state + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceStateUpdate { @@ -1644,6 +1760,7 @@ export interface GatewayVoiceStateUpdate { /** * https://discord.com/developers/docs/topics/gateway#update-voice-state + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayVoiceStateUpdateData { @@ -1667,6 +1784,7 @@ export interface GatewayVoiceStateUpdateData { /** * https://discord.com/developers/docs/topics/gateway#update-presence + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayUpdatePresence { @@ -1676,6 +1794,7 @@ export interface GatewayUpdatePresence { /** * https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export interface GatewayPresenceUpdateData { @@ -1703,6 +1822,7 @@ export interface GatewayPresenceUpdateData { /** * https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure + * * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. */ export type GatewayActivityUpdateData = Pick; diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 5bf3dc0f..3829d650 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -98,7 +98,7 @@ export enum GatewayCloseCodes { /** * We're not sure what went wrong. Try reconnecting? */ - UnknownError = 4000, + UnknownError = 4_000, /** * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! * @@ -132,7 +132,7 @@ export enum GatewayCloseCodes { * * See https://discord.com/developers/docs/topics/gateway-events#resume */ - InvalidSeq = 4007, + InvalidSeq = 4_007, /** * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this */ diff --git a/deno/globals.ts b/deno/globals.ts index 8169a36c..3258ccea 100644 --- a/deno/globals.ts +++ b/deno/globals.ts @@ -5,6 +5,7 @@ export type Snowflake = string; /** * https://discord.com/developers/docs/topics/permissions + * * @internal */ export type Permissions = string; @@ -23,6 +24,7 @@ export const FormattingPatterns = { * Regular expression for matching a user mention, strictly with a nickname * * The `id` group property is present on the `exec` result of this expression + * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ UserWithNickname: /<@!(?\d{17,20})>/, @@ -30,6 +32,7 @@ export const FormattingPatterns = { * Regular expression for matching a user mention, with or without a nickname * * The `id` group property is present on the `exec` result of this expression + * * @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it */ UserWithOptionalNickname: /<@!?(?\d{17,20})>/, @@ -51,6 +54,7 @@ export const FormattingPatterns = { * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression */ SlashCommand: + // eslint-disable-next-line unicorn/no-unsafe-regex /<\/(?(?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?\d{17,20})>/u, /** * Regular expression for matching a custom emoji, either static or animated @@ -75,7 +79,8 @@ export const FormattingPatterns = { * * The `timestamp` and `style` group properties are present on the `exec` result of this expression */ - Timestamp: /-?\d{1,13})(:(?