├── .gitattributes ├── .github ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── COMMIT_CONVENTION.md ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── SUPPORT.md ├── labeler.yml ├── labels.yml ├── problemMatchers │ ├── eslint.json │ └── tsc.json └── workflows │ ├── check-deno.yml │ ├── cicd.yml │ ├── create-pr-for-release-and-publish.yml │ ├── documentation.yml │ ├── labelsync.yml │ ├── pr-automation.yml │ └── publish-next.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .npmrc ├── .prettierignore ├── .prettierrc.mjs ├── .vscode └── settings.json ├── .yarn ├── plugins │ └── postinstallDev.cjs └── releases │ └── yarn-4.9.1.cjs ├── .yarnrc.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── api-extractor.json ├── deno ├── CHANGELOG.md ├── LICENSE ├── README.md ├── gateway │ ├── common.ts │ ├── mod.ts │ ├── v10.ts │ ├── v6.ts │ ├── v8.ts │ └── v9.ts ├── globals.ts ├── payloads │ ├── common.ts │ ├── mod.ts │ ├── v10 │ │ ├── _interactions │ │ │ ├── _applicationCommands │ │ │ │ ├── _chatInput │ │ │ │ │ ├── attachment.ts │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── boolean.ts │ │ │ │ │ ├── channel.ts │ │ │ │ │ ├── integer.ts │ │ │ │ │ ├── mentionable.ts │ │ │ │ │ ├── number.ts │ │ │ │ │ ├── role.ts │ │ │ │ │ ├── shared.ts │ │ │ │ │ ├── string.ts │ │ │ │ │ ├── subcommand.ts │ │ │ │ │ ├── subcommandGroup.ts │ │ │ │ │ └── user.ts │ │ │ │ ├── chatInput.ts │ │ │ │ ├── contextMenu.ts │ │ │ │ ├── entryPoint.ts │ │ │ │ ├── internals.ts │ │ │ │ └── permissions.ts │ │ │ ├── applicationCommands.ts │ │ │ ├── autocomplete.ts │ │ │ ├── base.ts │ │ │ ├── messageComponents.ts │ │ │ ├── modalSubmit.ts │ │ │ ├── ping.ts │ │ │ └── responses.ts │ │ ├── application.ts │ │ ├── auditLog.ts │ │ ├── autoModeration.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── monetization.ts │ │ ├── oauth2.ts │ │ ├── permissions.ts │ │ ├── poll.ts │ │ ├── soundboard.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── teams.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ ├── v6 │ │ ├── auditLog.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── oauth2.ts │ │ ├── permissions.ts │ │ ├── teams.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ ├── v8 │ │ ├── _interactions │ │ │ ├── _applicationCommands │ │ │ │ ├── _chatInput │ │ │ │ │ ├── attachment.ts │ │ │ │ │ ├── base.ts │ │ │ │ │ ├── boolean.ts │ │ │ │ │ ├── channel.ts │ │ │ │ │ ├── integer.ts │ │ │ │ │ ├── mentionable.ts │ │ │ │ │ ├── number.ts │ │ │ │ │ ├── role.ts │ │ │ │ │ ├── shared.ts │ │ │ │ │ ├── string.ts │ │ │ │ │ ├── subcommand.ts │ │ │ │ │ ├── subcommandGroup.ts │ │ │ │ │ └── user.ts │ │ │ │ ├── chatInput.ts │ │ │ │ ├── contextMenu.ts │ │ │ │ ├── internals.ts │ │ │ │ └── permissions.ts │ │ │ ├── applicationCommands.ts │ │ │ ├── autocomplete.ts │ │ │ ├── base.ts │ │ │ ├── messageComponents.ts │ │ │ ├── modalSubmit.ts │ │ │ ├── ping.ts │ │ │ └── responses.ts │ │ ├── application.ts │ │ ├── auditLog.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── oauth2.ts │ │ ├── permissions.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── teams.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ └── v9 │ │ ├── _interactions │ │ ├── _applicationCommands │ │ │ ├── _chatInput │ │ │ │ ├── attachment.ts │ │ │ │ ├── base.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── channel.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── mentionable.ts │ │ │ │ ├── number.ts │ │ │ │ ├── role.ts │ │ │ │ ├── shared.ts │ │ │ │ ├── string.ts │ │ │ │ ├── subcommand.ts │ │ │ │ ├── subcommandGroup.ts │ │ │ │ └── user.ts │ │ │ ├── chatInput.ts │ │ │ ├── contextMenu.ts │ │ │ ├── entryPoint.ts │ │ │ ├── internals.ts │ │ │ └── permissions.ts │ │ ├── applicationCommands.ts │ │ ├── autocomplete.ts │ │ ├── base.ts │ │ ├── messageComponents.ts │ │ ├── modalSubmit.ts │ │ ├── ping.ts │ │ └── responses.ts │ │ ├── application.ts │ │ ├── auditLog.ts │ │ ├── autoModeration.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── monetization.ts │ │ ├── oauth2.ts │ │ ├── permissions.ts │ │ ├── poll.ts │ │ ├── soundboard.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── teams.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts ├── rest │ ├── common.ts │ ├── mod.ts │ ├── v10 │ │ ├── application.ts │ │ ├── auditLog.ts │ │ ├── autoModeration.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── monetization.ts │ │ ├── oauth2.ts │ │ ├── poll.ts │ │ ├── soundboard.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ ├── v6 │ │ ├── auditLog.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── oauth2.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ ├── v8 │ │ ├── auditLog.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── oauth2.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts │ └── v9 │ │ ├── application.ts │ │ ├── auditLog.ts │ │ ├── autoModeration.ts │ │ ├── channel.ts │ │ ├── emoji.ts │ │ ├── gateway.ts │ │ ├── guild.ts │ │ ├── guildScheduledEvent.ts │ │ ├── interactions.ts │ │ ├── invite.ts │ │ ├── mod.ts │ │ ├── monetization.ts │ │ ├── oauth2.ts │ │ ├── poll.ts │ │ ├── soundboard.ts │ │ ├── stageInstance.ts │ │ ├── sticker.ts │ │ ├── template.ts │ │ ├── user.ts │ │ ├── voice.ts │ │ └── webhook.ts ├── rpc │ ├── common.ts │ ├── mod.ts │ ├── v10.ts │ ├── v8.ts │ └── v9.ts ├── utils │ ├── internals.ts │ ├── mod.ts │ ├── v10.ts │ ├── v8.ts │ └── v9.ts ├── v10.ts ├── v6.ts ├── v8.ts ├── v9.ts └── voice │ ├── mod.ts │ ├── v4.ts │ └── v8.ts ├── eslint.config.ts ├── gateway ├── common.ts ├── index.ts ├── v10.ts ├── v6.ts ├── v8.ts └── v9.ts ├── globals.ts ├── package.json ├── payloads ├── common.ts ├── index.ts ├── v10 │ ├── _interactions │ │ ├── _applicationCommands │ │ │ ├── _chatInput │ │ │ │ ├── attachment.ts │ │ │ │ ├── base.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── channel.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── mentionable.ts │ │ │ │ ├── number.ts │ │ │ │ ├── role.ts │ │ │ │ ├── shared.ts │ │ │ │ ├── string.ts │ │ │ │ ├── subcommand.ts │ │ │ │ ├── subcommandGroup.ts │ │ │ │ └── user.ts │ │ │ ├── chatInput.ts │ │ │ ├── contextMenu.ts │ │ │ ├── entryPoint.ts │ │ │ ├── internals.ts │ │ │ └── permissions.ts │ │ ├── applicationCommands.ts │ │ ├── autocomplete.ts │ │ ├── base.ts │ │ ├── messageComponents.ts │ │ ├── modalSubmit.ts │ │ ├── ping.ts │ │ └── responses.ts │ ├── application.ts │ ├── auditLog.ts │ ├── autoModeration.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── monetization.ts │ ├── oauth2.ts │ ├── permissions.ts │ ├── poll.ts │ ├── soundboard.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── teams.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── v6 │ ├── auditLog.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── index.ts │ ├── invite.ts │ ├── oauth2.ts │ ├── permissions.ts │ ├── teams.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── v8 │ ├── _interactions │ │ ├── _applicationCommands │ │ │ ├── _chatInput │ │ │ │ ├── attachment.ts │ │ │ │ ├── base.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── channel.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── mentionable.ts │ │ │ │ ├── number.ts │ │ │ │ ├── role.ts │ │ │ │ ├── shared.ts │ │ │ │ ├── string.ts │ │ │ │ ├── subcommand.ts │ │ │ │ ├── subcommandGroup.ts │ │ │ │ └── user.ts │ │ │ ├── chatInput.ts │ │ │ ├── contextMenu.ts │ │ │ ├── internals.ts │ │ │ └── permissions.ts │ │ ├── applicationCommands.ts │ │ ├── autocomplete.ts │ │ ├── base.ts │ │ ├── messageComponents.ts │ │ ├── modalSubmit.ts │ │ ├── ping.ts │ │ └── responses.ts │ ├── application.ts │ ├── auditLog.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── oauth2.ts │ ├── permissions.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── teams.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts └── v9 │ ├── _interactions │ ├── _applicationCommands │ │ ├── _chatInput │ │ │ ├── attachment.ts │ │ │ ├── base.ts │ │ │ ├── boolean.ts │ │ │ ├── channel.ts │ │ │ ├── integer.ts │ │ │ ├── mentionable.ts │ │ │ ├── number.ts │ │ │ ├── role.ts │ │ │ ├── shared.ts │ │ │ ├── string.ts │ │ │ ├── subcommand.ts │ │ │ ├── subcommandGroup.ts │ │ │ └── user.ts │ │ ├── chatInput.ts │ │ ├── contextMenu.ts │ │ ├── entryPoint.ts │ │ ├── internals.ts │ │ └── permissions.ts │ ├── applicationCommands.ts │ ├── autocomplete.ts │ ├── base.ts │ ├── messageComponents.ts │ ├── modalSubmit.ts │ ├── ping.ts │ └── responses.ts │ ├── application.ts │ ├── auditLog.ts │ ├── autoModeration.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── monetization.ts │ ├── oauth2.ts │ ├── permissions.ts │ ├── poll.ts │ ├── soundboard.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── teams.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── renovate.json ├── rest ├── common.ts ├── index.ts ├── v10 │ ├── application.ts │ ├── auditLog.ts │ ├── autoModeration.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── monetization.ts │ ├── oauth2.ts │ ├── poll.ts │ ├── soundboard.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── v6 │ ├── auditLog.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── index.ts │ ├── invite.ts │ ├── oauth2.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── v8 │ ├── auditLog.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── oauth2.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts └── v9 │ ├── application.ts │ ├── auditLog.ts │ ├── autoModeration.ts │ ├── channel.ts │ ├── emoji.ts │ ├── gateway.ts │ ├── guild.ts │ ├── guildScheduledEvent.ts │ ├── index.ts │ ├── interactions.ts │ ├── invite.ts │ ├── monetization.ts │ ├── oauth2.ts │ ├── poll.ts │ ├── soundboard.ts │ ├── stageInstance.ts │ ├── sticker.ts │ ├── template.ts │ ├── user.ts │ ├── voice.ts │ └── webhook.ts ├── rpc ├── common.ts ├── index.ts ├── v10.ts ├── v8.ts └── v9.ts ├── scripts ├── actions │ ├── create-pr.mjs │ ├── create-release.mjs │ ├── documentation │ │ ├── package.json │ │ ├── uploadDocumentation.ts │ │ └── uploadSplitDocumentation.ts │ └── report-deno-not-ran.mjs ├── bump-version.mjs ├── bump-website-version.mjs ├── deno.mjs ├── tsconfig.json └── versions.mjs ├── tests ├── __utils__ │ └── type-assertions.ts ├── tsconfig.json ├── v10 │ ├── channel.ts │ ├── chatInputOptions.ts │ ├── interactions.ts │ ├── messageCreate.ts │ ├── oauth2.ts │ ├── onboarding.ts │ ├── routes-escaping.ts │ └── routes.ts └── v9 │ ├── oauth2.ts │ └── routes.ts ├── tsconfig.eslint.json ├── tsconfig.json ├── tsdoc.json ├── utils ├── index.ts ├── internals.ts ├── v10.ts ├── v8.ts └── v9.ts ├── v10.ts ├── v6.ts ├── v8.ts ├── v9.ts ├── voice ├── index.ts ├── v4.ts └── v8.ts ├── website ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .markdownlint-cli2.jsonc ├── .npmrc ├── .prettierignore ├── .prettierrc.mjs ├── .vscode │ ├── extensions.json │ └── settings.json ├── LICENSE.md ├── README.md ├── THIRD_PARTY_LICENSE.md ├── babel.config.js ├── docs │ ├── Contributing.mdx │ ├── Introduction.mdx │ └── images │ │ └── deno_types_out_of_sync.png ├── docusaurus.config.ts ├── package-lock.json ├── package.json ├── patches │ └── @apify+docusaurus-plugin-typedoc-api+4.3.1.patch ├── scripts │ └── clean.mjs ├── sidebars.ts ├── src │ ├── components │ │ ├── Common │ │ │ ├── LoadingSkeleton.module.css │ │ │ └── LoadingSkeleton.tsx │ │ ├── Docs │ │ │ ├── Link.module.css │ │ │ ├── OptionalPackageLink.tsx │ │ │ ├── RawContentCodeTabs.tsx │ │ │ └── SimpleLink.tsx │ │ └── Home │ │ │ ├── Features │ │ │ ├── Feature.module.css │ │ │ ├── Feature.tsx │ │ │ ├── Statistics.module.css │ │ │ ├── Statistics.tsx │ │ │ ├── StatisticsFeature.tsx │ │ │ └── Types.d.ts │ │ │ ├── HeadTags.tsx │ │ │ ├── HomePageHeader.module.css │ │ │ ├── HomePageHeader.tsx │ │ │ ├── HomepageFeatures.module.css │ │ │ ├── HomepageFeatures.tsx │ │ │ └── InstallButton │ │ │ ├── InstallTabButton.module.css │ │ │ ├── InstallTabButton.tsx │ │ │ ├── InstallTabs.module.css │ │ │ └── InstallTabs.tsx │ ├── css │ │ ├── custom.scss │ │ ├── discordjs.scss │ │ ├── font.scss │ │ └── tippy-discord.css │ ├── index.d.ts │ ├── pages │ │ └── index.tsx │ └── utils │ │ └── Intl.ts ├── static │ ├── .nojekyll │ ├── _redirects │ ├── android-chrome-144x144.png │ ├── android-chrome-192x192.png │ ├── android-chrome-256x256.png │ ├── android-chrome-36x36.png │ ├── android-chrome-384x384.png │ ├── android-chrome-48x48.png │ ├── android-chrome-512x512.png │ ├── android-chrome-72x72.png │ ├── android-chrome-96x96.png │ ├── apple-touch-icon-114x114-precomposed.png │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-120x120-precomposed.png │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-144x144-precomposed.png │ ├── apple-touch-icon-144x144.png │ ├── apple-touch-icon-152x152-precomposed.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180-precomposed.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-57x57-precomposed.png │ ├── apple-touch-icon-57x57.png │ ├── apple-touch-icon-60x60-precomposed.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-72x72-precomposed.png │ ├── apple-touch-icon-72x72.png │ ├── apple-touch-icon-76x76-precomposed.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon-precomposed.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── manifest.webmanifest │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── opengraph.png │ ├── powered-by-vercel.svg │ ├── robots.txt │ ├── safari-pinned-tab.svg │ └── svgs │ │ ├── logo_long_blurple.svg │ │ └── mini_logo.svg ├── tsconfig.eslint.json ├── tsconfig.json ├── vercel.json ├── versioned_docs │ └── version-0.38.11 │ │ ├── Contributing.mdx │ │ ├── Introduction.mdx │ │ ├── api-packages.json │ │ ├── api-typedoc.json │ │ └── images │ │ └── deno_types_out_of_sync.png ├── versioned_sidebars │ └── version-0.38.11-sidebars.json └── versions.json └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | deno/** linguist-generated 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @vladfrangu 2 | 3 | /*.ts @discordjs/discord-api-types @discordjs/core 4 | gateway/ @discordjs/discord-api-types @discordjs/core 5 | payloads/ @discordjs/discord-api-types @discordjs/core 6 | rest/ @discordjs/discord-api-types @discordjs/core 7 | rpc/ @discordjs/discord-api-types @discordjs/core 8 | tests/ @discordjs/discord-api-types @discordjs/core 9 | utils/ @discordjs/discord-api-types @discordjs/core 10 | voice/ @discordjs/discord-api-types @discordjs/core 11 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [vladfrangu] 4 | patreon: vladfrangu 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: wolfgalvlad 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | custom: # Replace with a single custom sponsorship URL 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Discord server 4 | url: https://discord.gg/djs 5 | about: Please visit our Discord server for questions and support requests. 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Please describe the changes this PR makes and why it should be merged:** 2 | 3 | **If applicable, please reference Discord API Docs PRs or commits that influenced this PR:** 4 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Seeking support? 2 | 3 | We only use this issue tracker for bug reports and feature request. We are not able to provide general support or answer questions in the form of GitHub issues. 4 | 5 | For general questions about discord-api-types installation and use please ask in [GitHub Discussions](https://github.com/discordjs/discord-api-types/discussions), 6 | or in the dedicated support channels in our Discord server: https://discord.gg/djs 7 | 8 | Any issues that don't directly involve a bug or a feature request will likely be redirected or closed. 9 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | # General labels 2 | - name: 'semver:major' 3 | color: 'c10f47' 4 | - name: 'semver:minor' 5 | color: 'e4f486' 6 | - name: 'semver:patch' 7 | color: 'e8be8b' 8 | - name: 'blocked' 9 | color: 'fc1423' 10 | - name: 'question (please use Discord instead)' 11 | color: 'd876e3' 12 | - name: 'regression' 13 | color: 'ea8785' 14 | - name: 'wontfix' 15 | color: 'ffffff' 16 | - name: 'chore' 17 | color: 'ffffff' 18 | - name: 'ci' 19 | color: '0075ca' 20 | - name: 'dependencies' 21 | color: '276bd1' 22 | - name: 'duplicate' 23 | color: 'cfd3d7' 24 | - name: 'feature request' 25 | color: 'fcf95a' 26 | - name: 'bug' 27 | color: 'd73a4a' 28 | - name: 'backlog' 29 | color: '7ef7ef' 30 | - name: 'good first issue' 31 | color: '7057ff' 32 | - name: 'has PR' 33 | color: '4b1f8e' 34 | - name: 'help wanted' 35 | color: '008672' 36 | 37 | # Topic labels 38 | - name: 'topic:deno' 39 | color: 'aed5fc' 40 | - name: 'topic:gateway' 41 | color: 'aed5fc' 42 | - name: 'topic:payloads' 43 | color: 'aed5fc' 44 | - name: 'topic:rest' 45 | color: 'aed5fc' 46 | - name: 'topic:rpc' 47 | color: 'aed5fc' 48 | - name: 'topic:scripts' 49 | color: 'aed5fc' 50 | - name: 'topic:tests' 51 | color: 'aed5fc' 52 | - name: 'topic:utils' 53 | color: 'aed5fc' 54 | - name: 'topic:voice' 55 | color: 'aed5fc' 56 | - name: 'topic:globals' 57 | color: 'aed5fc' 58 | - name: 'topic:website' 59 | color: 'aed5fc' 60 | -------------------------------------------------------------------------------- /.github/problemMatchers/eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "problemMatcher": [ 3 | { 4 | "owner": "eslint-stylish", 5 | "pattern": [ 6 | { 7 | "regexp": "^([^\\s].*)$", 8 | "file": 1 9 | }, 10 | { 11 | "regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$", 12 | "line": 1, 13 | "column": 2, 14 | "severity": 3, 15 | "message": 4, 16 | "code": 5, 17 | "loop": true 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.github/problemMatchers/tsc.json: -------------------------------------------------------------------------------- 1 | { 2 | "problemMatcher": [ 3 | { 4 | "owner": "tsc", 5 | "pattern": [ 6 | { 7 | "regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$", 8 | "file": 1, 9 | "location": 2, 10 | "severity": 3, 11 | "code": 4, 12 | "message": 5 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/check-deno.yml: -------------------------------------------------------------------------------- 1 | name: Deno 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - opened 7 | - synchronize 8 | 9 | jobs: 10 | check_deno: 11 | name: Ensure Deno types are in sync with the code 12 | runs-on: ubuntu-latest 13 | permissions: 14 | contents: write 15 | pull-requests: write 16 | 17 | steps: 18 | - name: Checkout Project 19 | uses: actions/checkout@v4 20 | 21 | - name: Use Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | cache: 'yarn' 25 | node-version-file: package.json 26 | 27 | - name: Install Dependencies 28 | run: yarn 29 | 30 | - name: Run Check Script 31 | run: node ./scripts/actions/report-deno-not-ran.mjs 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 34 | -------------------------------------------------------------------------------- /.github/workflows/cicd.yml: -------------------------------------------------------------------------------- 1 | name: Continuous Integration / Deployment 2 | 3 | on: 4 | push: 5 | branches: 6 | - '**' 7 | pull_request: 8 | 9 | jobs: 10 | testing: 11 | name: ESLint and TypeScript compilation 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout Project 15 | uses: actions/checkout@v4 16 | 17 | - name: Add problem matcher 18 | run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json" 19 | 20 | - name: Use Node.js 21 | uses: actions/setup-node@v4 22 | with: 23 | cache: 'yarn' 24 | node-version-file: package.json 25 | 26 | - name: Install Dependencies 27 | run: yarn 28 | 29 | - name: Check lint on discord-api-types 30 | run: yarn test:lint 31 | 32 | - name: Run TSC 33 | run: yarn build:ci 34 | 35 | - name: Run Type Tests 36 | run: yarn test:types 37 | -------------------------------------------------------------------------------- /.github/workflows/labelsync.yml: -------------------------------------------------------------------------------- 1 | name: Label Sync 2 | on: 3 | schedule: 4 | - cron: '0 0 * * *' 5 | workflow_dispatch: 6 | push: 7 | branches: 8 | - main 9 | paths: 10 | - '.github/labels.yml' 11 | jobs: 12 | labelsync: 13 | name: Label sync 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout repository 17 | uses: actions/checkout@v4 18 | 19 | - name: Label sync 20 | uses: crazy-max/ghaction-github-labeler@v5 21 | with: 22 | github-token: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/workflows/pr-automation.yml: -------------------------------------------------------------------------------- 1 | name: 'PR Automation' 2 | 3 | on: 4 | pull_request_target: 5 | 6 | jobs: 7 | triage: 8 | permissions: 9 | contents: read 10 | pull-requests: write 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Automatically label PR 14 | uses: actions/labeler@v5 15 | with: 16 | repo-token: '${{ secrets.GITHUB_TOKEN }}' 17 | sync-labels: true 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .yarn/install-state.gz 3 | 4 | # Custom ESLint rules 5 | .eslint-plugin-local/* 6 | !.eslint-plugin-local/index.ts 7 | !.eslint-plugin-local/tsconfig.json 8 | 9 | # Don't commit build outputs 10 | globals.js 11 | globals.*map 12 | globals.d.ts 13 | globals.mjs 14 | 15 | v*.js 16 | v*.*map 17 | v*.d.ts 18 | v*.mjs 19 | 20 | deno/**/*.js 21 | deno/**/*.map 22 | deno/**/*.d.ts 23 | deno/**/*.mjs 24 | 25 | gateway/**/*.js 26 | gateway/**/*.map 27 | gateway/**/*.d.ts 28 | gateway/**/*.mjs 29 | 30 | payloads/**/*.js 31 | payloads/**/*.map 32 | payloads/**/*.d.ts 33 | payloads/**/*.mjs 34 | 35 | rest/**/*.js 36 | rest/**/*.map 37 | rest/**/*.d.ts 38 | rest/**/*.mjs 39 | 40 | rpc/**/*.js 41 | rpc/**/*.map 42 | rpc/**/*.d.ts 43 | rpc/**/*.mjs 44 | 45 | shortcuts/**/*.js 46 | shortcuts/**/*.map 47 | shortcuts/**/*.d.ts 48 | shortcuts/**/*.mjs 49 | 50 | utils/**/*.js 51 | utils/**/*.map 52 | utils/**/*.d.ts 53 | utils/**/*.mjs 54 | 55 | voice/**/*.js 56 | voice/**/*.map 57 | voice/**/*.d.ts 58 | voice/**/*.mjs 59 | 60 | # Don't commit generated docs 61 | tsdoc-metadata.json 62 | docs/* 63 | 64 | # macOS files 65 | .DS_Store 66 | 67 | # djs repo clone 68 | djs 69 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | yarn commitlint --edit $1 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | yarn pretty-quick --staged && yarn lint-staged && yarn build:deno && git add deno 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | audit=false 2 | fund=false 3 | legacy-peer-deps=true 4 | tag-version-prefix="" 5 | git-tag-version=false 6 | message="chore(release): %s 🎉" 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Node modules 2 | node_modules/ 3 | 4 | # Generated data 5 | deno/ 6 | 7 | # Versioned json 8 | website/versioned_sidebars/ 9 | website/versioned_docs/ 10 | website/versions.json 11 | website/.docusaurus/ 12 | website/build 13 | 14 | # Don't format build outputs 15 | *.js 16 | !eslint.config.js 17 | *.d.ts 18 | *.mjs 19 | 20 | # Miscellaneous 21 | CODEOWNERS 22 | CHANGELOG.md 23 | 24 | # Format all of scripts 25 | !scripts/**/* 26 | !.prettierrc.mjs 27 | 28 | # Deprecated versions 29 | gateway/v6/* 30 | payloads/v6/* 31 | rest/v6/* 32 | v6.ts 33 | 34 | gateway/v8/* 35 | payloads/v8/* 36 | rest/v8/* 37 | utils/v8.ts 38 | v8.ts 39 | 40 | .yarn/* 41 | -------------------------------------------------------------------------------- /.prettierrc.mjs: -------------------------------------------------------------------------------- 1 | import sapphirePrettierConfig from '@sapphire/prettier-config'; 2 | 3 | export default { 4 | ...sapphirePrettierConfig, 5 | printWidth: 120, 6 | useTabs: true, 7 | singleQuote: true, 8 | quoteProps: 'as-needed', 9 | trailingComma: 'all', 10 | endOfLine: 'lf', 11 | experimentalTernaries: true, 12 | }; 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.eol": "\n", 3 | "typescript.tsdk": "node_modules/typescript/lib", 4 | "editor.codeActionsOnSave": { 5 | "source.organizeImports": "never", 6 | "source.fixAll": "explicit", 7 | "source.fixAll.eslint": "explicit" 8 | }, 9 | "cSpell.enableFiletypes": ["mdx"], 10 | "search.exclude": { 11 | "**/v6": true, 12 | "**/v8": true, 13 | "deno": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | enableGlobalCache: true 2 | 3 | nodeLinker: node-modules 4 | 5 | yarnPath: .yarn/releases/yarn-4.9.1.cjs 6 | 7 | plugins: 8 | - path: ./.yarn/plugins/postinstallDev.cjs 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 vladfrangu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /deno/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 vladfrangu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /deno/gateway/common.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params} 3 | */ 4 | export interface GatewayURLQuery { 5 | v: string; 6 | encoding: 'etf' | 'json'; 7 | compress?: 'zlib-stream'; 8 | } 9 | -------------------------------------------------------------------------------- /deno/gateway/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10.ts'; 5 | -------------------------------------------------------------------------------- /deno/payloads/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the payloads available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10/mod.ts'; 5 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandAttachmentOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Attachment, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v10.ts'; 2 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 3 | 4 | export interface APIApplicationCommandOptionBase { 5 | type: Type; 6 | name: string; 7 | name_localizations?: LocalizationMap | null; 8 | description: string; 9 | description_localizations?: LocalizationMap | null; 10 | required?: boolean; 11 | } 12 | 13 | export interface APIInteractionDataOptionBase { 14 | name: string; 15 | type: T; 16 | value: D; 17 | } 18 | 19 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 20 | Base extends APIApplicationCommandOptionBase, 21 | ChoiceType extends APIApplicationCommandOptionChoice, 22 | > = 23 | | (Base & { 24 | autocomplete: true; 25 | choices?: []; 26 | }) 27 | | (Base & { 28 | autocomplete?: false; 29 | choices?: ChoiceType[]; 30 | }); 31 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 2 | import type { ApplicationCommandOptionType } from './shared.ts'; 3 | 4 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 5 | 6 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 7 | ApplicationCommandOptionType.Boolean, 8 | boolean 9 | >; 10 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { ChannelType } from '../../../channel.ts'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 4 | import type { ApplicationCommandOptionType } from './shared.ts'; 5 | 6 | export interface APIApplicationCommandChannelOption 7 | extends APIApplicationCommandOptionBase { 8 | channel_types?: Exclude[]; 9 | } 10 | 11 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 12 | ApplicationCommandOptionType.Channel, 13 | Snowflake 14 | >; 15 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base.ts'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 8 | 9 | export interface APIApplicationCommandIntegerOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandIntegerOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataIntegerOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Integer, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandMentionableOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Mentionable, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base.ts'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 8 | 9 | export interface APIApplicationCommandNumberOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandNumberOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataNumberOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Number, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.Role, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v10.ts'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} 22 | */ 23 | export interface APIApplicationCommandOptionChoice { 24 | name: string; 25 | name_localizations?: LocalizationMap | null; 26 | value: ValueType; 27 | } 28 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base.ts'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 7 | 8 | export interface APIApplicationCommandStringOptionBase 9 | extends APIApplicationCommandOptionBase { 10 | /** 11 | * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). 12 | */ 13 | min_length?: number; 14 | /** 15 | * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). 16 | */ 17 | max_length?: number; 18 | } 19 | 20 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 21 | APIApplicationCommandStringOptionBase, 22 | APIApplicationCommandOptionChoice 23 | >; 24 | 25 | export interface APIApplicationCommandInteractionDataStringOption 26 | extends APIInteractionDataOptionBase { 27 | focused?: boolean; 28 | } 29 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts'; 3 | import type { APIApplicationCommandOptionBase } from './base.ts'; 4 | import type { ApplicationCommandOptionType } from './shared.ts'; 5 | 6 | export interface APIApplicationCommandSubcommandOption 7 | extends APIApplicationCommandOptionBase { 8 | options?: APIApplicationCommandBasicOption[]; 9 | } 10 | 11 | export interface APIApplicationCommandInteractionDataSubcommandOption { 12 | name: string; 13 | type: ApplicationCommandOptionType.Subcommand; 14 | options?: APIApplicationCommandInteractionDataBasicOption[]; 15 | } 16 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { APIApplicationCommandOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | import type { 5 | APIApplicationCommandInteractionDataSubcommandOption, 6 | APIApplicationCommandSubcommandOption, 7 | } from './subcommand.ts'; 8 | 9 | export interface APIApplicationCommandSubcommandGroupOption 10 | extends APIApplicationCommandOptionBase { 11 | options?: APIApplicationCommandSubcommandOption[]; 12 | } 13 | 14 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption< 15 | Type extends InteractionType = InteractionType, 16 | > { 17 | name: string; 18 | type: ApplicationCommandOptionType.SubcommandGroup; 19 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.User, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/entryPoint.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts'; 2 | import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts'; 3 | import type { APIBaseApplicationCommandInteractionData } from './internals.ts'; 4 | 5 | /** 6 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} 7 | */ 8 | export type APIPrimaryEntryPointCommandInteractionData = 9 | APIBaseApplicationCommandInteractionData; 10 | 11 | /** 12 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 13 | */ 14 | export type APIPrimaryEntryPointCommandInteraction = 15 | APIApplicationCommandInteractionWrapper; 16 | 17 | /** 18 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 19 | */ 20 | export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper; 21 | 22 | /** 23 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 24 | */ 25 | export type APIPrimaryEntryPointCommandGuildInteraction = 26 | APIGuildInteractionWrapper; 27 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals.ts'; 2 | import type { ApplicationCommandType } from '../applicationCommands.ts'; 3 | 4 | export interface APIBaseApplicationCommandInteractionData { 5 | id: Snowflake; 6 | type: Type; 7 | name: string; 8 | guild_id?: Snowflake; 9 | } 10 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/autocomplete.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIBaseInteraction, 3 | APIAutocompleteApplicationCommandInteractionData, 4 | APIDMInteractionWrapper, 5 | APIGuildInteractionWrapper, 6 | InteractionType, 7 | } from '../mod.ts'; 8 | 9 | export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction< 10 | InteractionType.ApplicationCommandAutocomplete, 11 | APIAutocompleteApplicationCommandInteractionData 12 | > & 13 | Required< 14 | Pick< 15 | APIBaseInteraction< 16 | InteractionType.ApplicationCommandAutocomplete, 17 | Required> 18 | >, 19 | 'data' 20 | > 21 | >; 22 | 23 | /** 24 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 25 | */ 26 | export type APIApplicationCommandAutocompleteDMInteraction = 27 | APIDMInteractionWrapper; 28 | 29 | /** 30 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 31 | */ 32 | export type APIApplicationCommandAutocompleteGuildInteraction = 33 | APIGuildInteractionWrapper; 34 | -------------------------------------------------------------------------------- /deno/payloads/v10/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base.ts'; 2 | import type { InteractionType } from './responses.ts'; 3 | 4 | export type APIPingInteraction = Omit, 'locale'>; 5 | -------------------------------------------------------------------------------- /deno/payloads/v10/mod.ts: -------------------------------------------------------------------------------- 1 | export * from '../common.ts'; 2 | export * from './application.ts'; 3 | export * from './auditLog.ts'; 4 | export * from './autoModeration.ts'; 5 | export * from './channel.ts'; 6 | export type * from './emoji.ts'; 7 | export * from './gateway.ts'; 8 | export * from './guild.ts'; 9 | export * from './guildScheduledEvent.ts'; 10 | export * from './interactions.ts'; 11 | export * from './invite.ts'; 12 | export * from './monetization.ts'; 13 | export * from './oauth2.ts'; 14 | export * from './permissions.ts'; 15 | export * from './poll.ts'; 16 | export type * from './soundboard.ts'; 17 | export * from './stageInstance.ts'; 18 | export * from './sticker.ts'; 19 | export * from './teams.ts'; 20 | export type * from './template.ts'; 21 | export * from './user.ts'; 22 | export type * from './voice.ts'; 23 | export * from './webhook.ts'; 24 | -------------------------------------------------------------------------------- /deno/payloads/v10/soundboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/soundboard 3 | */ 4 | 5 | import type { Snowflake } from '../../globals.ts'; 6 | import type { APIUser } from './user.ts'; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} 10 | */ 11 | export interface APISoundboardSound { 12 | /** 13 | * The name of this sound 14 | */ 15 | name: string; 16 | /** 17 | * The id of this sound 18 | */ 19 | sound_id: Snowflake; 20 | /** 21 | * The volume of this sound, from 0 to 1 22 | */ 23 | volume: number; 24 | /** 25 | * The id of this sound's custom emoji 26 | */ 27 | emoji_id: Snowflake | null; 28 | /** 29 | * The unicode character of this sound's standard emoji 30 | */ 31 | emoji_name: string | null; 32 | /** 33 | * The id of the guild that this sound is in 34 | */ 35 | guild_id?: Snowflake; 36 | /** 37 | * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts 38 | */ 39 | available: boolean; 40 | /** 41 | * The user who created this sound 42 | */ 43 | user?: APIUser; 44 | } 45 | -------------------------------------------------------------------------------- /deno/payloads/v6/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/emoji 3 | */ 4 | 5 | import type { APIUser } from './user.ts'; 6 | 7 | /** 8 | * Not documented but mentioned 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface APIPartialEmoji { 13 | id: string | null; 14 | name: string | null; 15 | animated?: boolean; 16 | } 17 | 18 | /** 19 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure 20 | * 21 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 22 | */ 23 | export interface APIEmoji extends APIPartialEmoji { 24 | roles?: string[]; 25 | user?: APIUser; 26 | require_colons?: boolean; 27 | managed?: boolean; 28 | available?: boolean; 29 | } 30 | -------------------------------------------------------------------------------- /deno/payloads/v6/invite.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/invite 3 | */ 4 | 5 | import type { APIPartialChannel } from './channel.ts'; 6 | import type { APIPartialGuild } from './guild.ts'; 7 | import type { APIUser } from './user.ts'; 8 | 9 | /** 10 | * https://discord.com/developers/docs/resources/invite#invite-object 11 | * 12 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 13 | */ 14 | export interface APIInvite { 15 | code: string; 16 | guild?: APIPartialGuild; 17 | channel?: Required; 18 | inviter?: APIUser; 19 | target_user?: APIUser; 20 | target_user_type?: InviteTargetUserType; 21 | approximate_presence_count?: number; 22 | approximate_member_count?: number; 23 | } 24 | 25 | /** 26 | * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types 27 | * 28 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 29 | */ 30 | export enum InviteTargetUserType { 31 | STREAM = 1, 32 | } 33 | 34 | /** 35 | * https://discord.com/developers/docs/resources/invite#invite-metadata-object 36 | * 37 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 38 | */ 39 | export interface APIExtendedInvite extends APIInvite { 40 | uses: number; 41 | max_uses: number; 42 | max_age: number; 43 | temporary: boolean; 44 | created_at: string; 45 | } 46 | -------------------------------------------------------------------------------- /deno/payloads/v6/mod.ts: -------------------------------------------------------------------------------- 1 | export * from './auditLog.ts'; 2 | export * from './channel.ts'; 3 | export * from './emoji.ts'; 4 | export * from './gateway.ts'; 5 | export * from './guild.ts'; 6 | export * from './invite.ts'; 7 | export * from './oauth2.ts'; 8 | export * from './permissions.ts'; 9 | export * from './teams.ts'; 10 | export * from './user.ts'; 11 | export * from './voice.ts'; 12 | export * from './webhook.ts'; 13 | -------------------------------------------------------------------------------- /deno/payloads/v6/oauth2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/topics/oauth2 3 | */ 4 | 5 | import type { APITeam } from './teams.ts'; 6 | import type { APIUser } from './user.ts'; 7 | 8 | /** 9 | * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure 10 | * 11 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 12 | */ 13 | export interface APIApplication { 14 | id: string; 15 | name: string; 16 | icon: string | null; 17 | description: string; 18 | rpc_origins?: string[]; 19 | bot_public: boolean; 20 | bot_require_code_grant: boolean; 21 | owner: APIUser; 22 | summary: string; 23 | verify_key: string; 24 | team: APITeam | null; 25 | guild_id?: string; 26 | primary_sku_id?: string; 27 | slug?: string; 28 | cover_image?: string; 29 | } 30 | -------------------------------------------------------------------------------- /deno/payloads/v6/teams.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/topics/teams 3 | */ 4 | 5 | import type { APIUser } from './user.ts'; 6 | 7 | /** 8 | * https://discord.com/developers/docs/topics/teams#data-models-team-object 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface APITeam { 13 | id: string; 14 | icon: string | null; 15 | members: APITeamMember[]; 16 | owner_user_id: string; 17 | } 18 | 19 | /** 20 | * https://discord.com/developers/docs/topics/teams#data-models-team-members-object 21 | * 22 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 23 | */ 24 | export interface APITeamMember { 25 | membership_state: TeamMemberMembershipState; 26 | permissions: string[]; 27 | team_id: string; 28 | user: APIUser; 29 | } 30 | 31 | /** 32 | * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum 33 | * 34 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 35 | */ 36 | export enum TeamMemberMembershipState { 37 | INVITED = 1, 38 | ACCEPTED, 39 | } 40 | -------------------------------------------------------------------------------- /deno/payloads/v6/voice.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/voice 3 | */ 4 | 5 | import type { APIGuildMember } from './guild.ts'; 6 | 7 | /** 8 | * https://discord.com/developers/docs/resources/voice#voice-state-object 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface GatewayVoiceState { 13 | guild_id?: string; 14 | channel_id: string | null; 15 | user_id: string; 16 | member?: APIGuildMember; 17 | session_id: string; 18 | deaf: boolean; 19 | mute: boolean; 20 | self_deaf: boolean; 21 | self_mute: boolean; 22 | self_stream?: boolean; 23 | self_video: boolean; 24 | suppress: boolean; 25 | } 26 | 27 | /** 28 | * https://discord.com/developers/docs/resources/voice#voice-region-object 29 | * 30 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 31 | */ 32 | export interface APIVoiceRegion { 33 | id: string; 34 | name: string; 35 | vip: boolean; 36 | optimal: boolean; 37 | deprecated: boolean; 38 | custom: boolean; 39 | } 40 | -------------------------------------------------------------------------------- /deno/payloads/v6/webhook.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/webhook 3 | */ 4 | 5 | import type { APIPartialChannel } from './channel.ts'; 6 | import type { APIPartialGuild } from './guild.ts'; 7 | import type { APIUser } from './user.ts'; 8 | 9 | /** 10 | * https://discord.com/developers/docs/resources/webhook#webhook-object 11 | * 12 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 13 | */ 14 | export interface APIWebhook { 15 | id: string; 16 | type: WebhookType; 17 | guild_id?: string; 18 | channel_id: string; 19 | user?: APIUser; 20 | name: string | null; 21 | avatar: string | null; 22 | token?: string; 23 | source_guild?: APIPartialGuild; 24 | source_channel?: APIPartialChannel; 25 | application_id: string | null; 26 | } 27 | 28 | /** 29 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 30 | */ 31 | export enum WebhookType { 32 | Incoming = 1, 33 | ChannelFollower, 34 | } 35 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandAttachmentOption = 9 | APIApplicationCommandOptionBase; 10 | 11 | /** 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 15 | ApplicationCommandOptionType.Attachment, 16 | Snowflake 17 | >; 18 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 2 | 3 | /** 4 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 5 | */ 6 | export interface APIApplicationCommandOptionBase { 7 | type: Type; 8 | name: string; 9 | description: string; 10 | required?: boolean; 11 | } 12 | 13 | /** 14 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 15 | */ 16 | export interface APIInteractionDataOptionBase { 17 | name: string; 18 | type: T; 19 | value: D; 20 | } 21 | 22 | /** 23 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 24 | */ 25 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 26 | Base extends APIApplicationCommandOptionBase, 27 | ChoiceType extends APIApplicationCommandOptionChoice, 28 | > = 29 | | (Base & { 30 | autocomplete: true; 31 | }) 32 | | (Base & { 33 | autocomplete?: false; 34 | choices?: ChoiceType[]; 35 | }); 36 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 2 | import type { ApplicationCommandOptionType } from './shared.ts'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 8 | 9 | /** 10 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 11 | */ 12 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 13 | ApplicationCommandOptionType.Boolean, 14 | boolean 15 | >; 16 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { ChannelType } from '../../../channel.ts'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 4 | import type { ApplicationCommandOptionType } from './shared.ts'; 5 | 6 | /** 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface APIApplicationCommandChannelOption 10 | extends APIApplicationCommandOptionBase { 11 | channel_types?: Exclude[]; 12 | } 13 | 14 | /** 15 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 16 | */ 17 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 18 | ApplicationCommandOptionType.Channel, 19 | Snowflake 20 | >; 21 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandMentionableOption = 9 | APIApplicationCommandOptionBase; 10 | 11 | /** 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 15 | ApplicationCommandOptionType.Mentionable, 16 | Snowflake 17 | >; 18 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 9 | 10 | /** 11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 12 | */ 13 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 14 | ApplicationCommandOptionType.Role, 15 | Snowflake 16 | >; 17 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type 3 | * 4 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure 22 | * 23 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 24 | */ 25 | export interface APIApplicationCommandOptionChoice { 26 | name: string; 27 | value: ValueType; 28 | } 29 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base.ts'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 7 | 8 | /** 9 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 10 | */ 11 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 12 | APIApplicationCommandOptionBase, 13 | APIApplicationCommandOptionChoice 14 | >; 15 | 16 | /** 17 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 18 | */ 19 | export interface APIApplicationCommandInteractionDataStringOption 20 | extends APIInteractionDataOptionBase { 21 | focused?: boolean; 22 | } 23 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts'; 2 | import type { APIApplicationCommandOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export interface APIApplicationCommandSubcommandOption 9 | extends APIApplicationCommandOptionBase { 10 | options?: APIApplicationCommandBasicOption[]; 11 | } 12 | 13 | /** 14 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 15 | */ 16 | export interface APIApplicationCommandInteractionDataSubcommandOption { 17 | name: string; 18 | type: ApplicationCommandOptionType.Subcommand; 19 | options?: APIApplicationCommandInteractionDataBasicOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase } from './base.ts'; 2 | import type { ApplicationCommandOptionType } from './shared.ts'; 3 | import type { 4 | APIApplicationCommandInteractionDataSubcommandOption, 5 | APIApplicationCommandSubcommandOption, 6 | } from './subcommand.ts'; 7 | 8 | /** 9 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 10 | */ 11 | export interface APIApplicationCommandSubcommandGroupOption 12 | extends APIApplicationCommandOptionBase { 13 | options?: APIApplicationCommandSubcommandOption[]; 14 | } 15 | 16 | /** 17 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 18 | */ 19 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption { 20 | name: string; 21 | type: ApplicationCommandOptionType.SubcommandGroup; 22 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 23 | } 24 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 9 | 10 | /** 11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 12 | */ 13 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 14 | ApplicationCommandOptionType.User, 15 | Snowflake 16 | >; 17 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals.ts'; 2 | import type { ApplicationCommandType } from '../applicationCommands.ts'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export interface APIBaseApplicationCommandInteractionData { 8 | id: Snowflake; 9 | type: Type; 10 | name: string; 11 | } 12 | -------------------------------------------------------------------------------- /deno/payloads/v8/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base.ts'; 2 | import type { InteractionType } from './responses.ts'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export type APIPingInteraction = Omit, 'locale'>; 8 | -------------------------------------------------------------------------------- /deno/payloads/v8/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/emoji 3 | */ 4 | 5 | import type { Snowflake } from '../../globals.ts'; 6 | import type { APIRole } from './permissions.ts'; 7 | import type { APIUser } from './user.ts'; 8 | 9 | /** 10 | * Not documented but mentioned 11 | * 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export interface APIPartialEmoji { 15 | /** 16 | * Emoji id 17 | */ 18 | id: Snowflake | null; 19 | /** 20 | * Emoji name (can be null only in reaction emoji objects) 21 | */ 22 | name: string | null; 23 | /** 24 | * Whether this emoji is animated 25 | */ 26 | animated?: boolean; 27 | } 28 | 29 | /** 30 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure 31 | * 32 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 33 | */ 34 | export interface APIEmoji extends APIPartialEmoji { 35 | /** 36 | * Roles this emoji is whitelisted to 37 | */ 38 | roles?: APIRole['id'][]; 39 | /** 40 | * User that created this emoji 41 | */ 42 | user?: APIUser; 43 | /** 44 | * Whether this emoji must be wrapped in colons 45 | */ 46 | require_colons?: boolean; 47 | /** 48 | * Whether this emoji is managed 49 | */ 50 | managed?: boolean; 51 | /** 52 | * Whether this emoji can be used, may be false due to loss of Server Boosts 53 | */ 54 | available?: boolean; 55 | } 56 | -------------------------------------------------------------------------------- /deno/payloads/v8/mod.ts: -------------------------------------------------------------------------------- 1 | export * from '../common.ts'; 2 | export * from './application.ts'; 3 | export * from './auditLog.ts'; 4 | export * from './channel.ts'; 5 | export * from './emoji.ts'; 6 | export * from './gateway.ts'; 7 | export * from './guild.ts'; 8 | export * from './guildScheduledEvent.ts'; 9 | export * from './interactions.ts'; 10 | export * from './invite.ts'; 11 | export * from './oauth2.ts'; 12 | export * from './permissions.ts'; 13 | export * from './stageInstance.ts'; 14 | export * from './sticker.ts'; 15 | export * from './teams.ts'; 16 | export * from './template.ts'; 17 | export * from './user.ts'; 18 | export * from './voice.ts'; 19 | export * from './webhook.ts'; 20 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandAttachmentOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Attachment, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v9.ts'; 2 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 3 | 4 | export interface APIApplicationCommandOptionBase { 5 | type: Type; 6 | name: string; 7 | name_localizations?: LocalizationMap | null; 8 | description: string; 9 | description_localizations?: LocalizationMap | null; 10 | required?: boolean; 11 | } 12 | 13 | export interface APIInteractionDataOptionBase { 14 | name: string; 15 | type: T; 16 | value: D; 17 | } 18 | 19 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 20 | Base extends APIApplicationCommandOptionBase, 21 | ChoiceType extends APIApplicationCommandOptionChoice, 22 | > = 23 | | (Base & { 24 | autocomplete: true; 25 | choices?: []; 26 | }) 27 | | (Base & { 28 | autocomplete?: false; 29 | choices?: ChoiceType[]; 30 | }); 31 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 2 | import type { ApplicationCommandOptionType } from './shared.ts'; 3 | 4 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 5 | 6 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 7 | ApplicationCommandOptionType.Boolean, 8 | boolean 9 | >; 10 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { ChannelType } from '../../../channel.ts'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 4 | import type { ApplicationCommandOptionType } from './shared.ts'; 5 | 6 | export interface APIApplicationCommandChannelOption 7 | extends APIApplicationCommandOptionBase { 8 | channel_types?: Exclude[]; 9 | } 10 | 11 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 12 | ApplicationCommandOptionType.Channel, 13 | Snowflake 14 | >; 15 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base.ts'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 8 | 9 | export interface APIApplicationCommandIntegerOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandIntegerOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataIntegerOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Integer, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandMentionableOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Mentionable, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base.ts'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 8 | 9 | export interface APIApplicationCommandNumberOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandNumberOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataNumberOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Number, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.Role, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v9.ts'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} 22 | */ 23 | export interface APIApplicationCommandOptionChoice { 24 | name: string; 25 | name_localizations?: LocalizationMap | null; 26 | value: ValueType; 27 | } 28 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base.ts'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts'; 7 | 8 | export interface APIApplicationCommandStringOptionBase 9 | extends APIApplicationCommandOptionBase { 10 | /** 11 | * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). 12 | */ 13 | min_length?: number; 14 | /** 15 | * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). 16 | */ 17 | max_length?: number; 18 | } 19 | 20 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 21 | APIApplicationCommandStringOptionBase, 22 | APIApplicationCommandOptionChoice 23 | >; 24 | 25 | export interface APIApplicationCommandInteractionDataStringOption 26 | extends APIInteractionDataOptionBase { 27 | focused?: boolean; 28 | } 29 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts'; 3 | import type { APIApplicationCommandOptionBase } from './base.ts'; 4 | import type { ApplicationCommandOptionType } from './shared.ts'; 5 | 6 | export interface APIApplicationCommandSubcommandOption 7 | extends APIApplicationCommandOptionBase { 8 | options?: APIApplicationCommandBasicOption[]; 9 | } 10 | 11 | export interface APIApplicationCommandInteractionDataSubcommandOption { 12 | name: string; 13 | type: ApplicationCommandOptionType.Subcommand; 14 | options?: APIApplicationCommandInteractionDataBasicOption[]; 15 | } 16 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses.ts'; 2 | import type { APIApplicationCommandOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | import type { 5 | APIApplicationCommandInteractionDataSubcommandOption, 6 | APIApplicationCommandSubcommandOption, 7 | } from './subcommand.ts'; 8 | 9 | export interface APIApplicationCommandSubcommandGroupOption 10 | extends APIApplicationCommandOptionBase { 11 | options?: APIApplicationCommandSubcommandOption[]; 12 | } 13 | 14 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption< 15 | Type extends InteractionType = InteractionType, 16 | > { 17 | name: string; 18 | type: ApplicationCommandOptionType.SubcommandGroup; 19 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals.ts'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts'; 3 | import type { ApplicationCommandOptionType } from './shared.ts'; 4 | 5 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.User, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/entryPoint.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts'; 2 | import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts'; 3 | import type { APIBaseApplicationCommandInteractionData } from './internals.ts'; 4 | 5 | /** 6 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} 7 | */ 8 | export type APIPrimaryEntryPointCommandInteractionData = 9 | APIBaseApplicationCommandInteractionData; 10 | 11 | /** 12 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 13 | */ 14 | export type APIPrimaryEntryPointCommandInteraction = 15 | APIApplicationCommandInteractionWrapper; 16 | 17 | /** 18 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 19 | */ 20 | export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper; 21 | 22 | /** 23 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 24 | */ 25 | export type APIPrimaryEntryPointCommandGuildInteraction = 26 | APIGuildInteractionWrapper; 27 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals.ts'; 2 | import type { ApplicationCommandType } from '../applicationCommands.ts'; 3 | 4 | export interface APIBaseApplicationCommandInteractionData { 5 | id: Snowflake; 6 | type: Type; 7 | name: string; 8 | guild_id?: Snowflake; 9 | } 10 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/autocomplete.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIBaseInteraction, 3 | APIAutocompleteApplicationCommandInteractionData, 4 | APIDMInteractionWrapper, 5 | APIGuildInteractionWrapper, 6 | InteractionType, 7 | } from '../mod.ts'; 8 | 9 | export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction< 10 | InteractionType.ApplicationCommandAutocomplete, 11 | APIAutocompleteApplicationCommandInteractionData 12 | > & 13 | Required< 14 | Pick< 15 | APIBaseInteraction< 16 | InteractionType.ApplicationCommandAutocomplete, 17 | Required> 18 | >, 19 | 'data' 20 | > 21 | >; 22 | 23 | /** 24 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 25 | */ 26 | export type APIApplicationCommandAutocompleteDMInteraction = 27 | APIDMInteractionWrapper; 28 | 29 | /** 30 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 31 | */ 32 | export type APIApplicationCommandAutocompleteGuildInteraction = 33 | APIGuildInteractionWrapper; 34 | -------------------------------------------------------------------------------- /deno/payloads/v9/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base.ts'; 2 | import type { InteractionType } from './responses.ts'; 3 | 4 | export type APIPingInteraction = Omit, 'locale'>; 5 | -------------------------------------------------------------------------------- /deno/payloads/v9/mod.ts: -------------------------------------------------------------------------------- 1 | export * from '../common.ts'; 2 | export * from './application.ts'; 3 | export * from './auditLog.ts'; 4 | export * from './autoModeration.ts'; 5 | export * from './channel.ts'; 6 | export type * from './emoji.ts'; 7 | export * from './gateway.ts'; 8 | export * from './guild.ts'; 9 | export * from './guildScheduledEvent.ts'; 10 | export * from './interactions.ts'; 11 | export * from './invite.ts'; 12 | export * from './monetization.ts'; 13 | export * from './oauth2.ts'; 14 | export * from './permissions.ts'; 15 | export * from './poll.ts'; 16 | export type * from './soundboard.ts'; 17 | export * from './stageInstance.ts'; 18 | export * from './sticker.ts'; 19 | export * from './teams.ts'; 20 | export type * from './template.ts'; 21 | export * from './user.ts'; 22 | export type * from './voice.ts'; 23 | export * from './webhook.ts'; 24 | -------------------------------------------------------------------------------- /deno/payloads/v9/soundboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/soundboard 3 | */ 4 | 5 | import type { Snowflake } from '../../globals.ts'; 6 | import type { APIUser } from './user.ts'; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} 10 | */ 11 | export interface APISoundboardSound { 12 | /** 13 | * The name of this sound 14 | */ 15 | name: string; 16 | /** 17 | * The id of this sound 18 | */ 19 | sound_id: Snowflake; 20 | /** 21 | * The volume of this sound, from 0 to 1 22 | */ 23 | volume: number; 24 | /** 25 | * The id of this sound's custom emoji 26 | */ 27 | emoji_id: Snowflake | null; 28 | /** 29 | * The unicode character of this sound's standard emoji 30 | */ 31 | emoji_name: string | null; 32 | /** 33 | * The id of the guild that this sound is in 34 | */ 35 | guild_id?: Snowflake; 36 | /** 37 | * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts 38 | */ 39 | available: boolean; 40 | /** 41 | * The user who created this sound 42 | */ 43 | user?: APIUser; 44 | } 45 | -------------------------------------------------------------------------------- /deno/rest/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10/mod.ts'; 5 | -------------------------------------------------------------------------------- /deno/rest/v10/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog.ts'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} 6 | */ 7 | export interface RESTGetAPIAuditLogQuery { 8 | /** 9 | * Filter the log for actions made by a user 10 | */ 11 | user_id?: Snowflake; 12 | /** 13 | * The type of audit log events 14 | */ 15 | action_type?: AuditLogEvent; 16 | /** 17 | * Filter the log before a certain entry ID 18 | */ 19 | before?: Snowflake; 20 | /** 21 | * Filter the log after a certain entry ID 22 | */ 23 | after?: Snowflake; 24 | /** 25 | * How many entries are returned (default 50, minimum 1, maximum 100) 26 | * 27 | * @defaultValue `50` 28 | */ 29 | limit?: number; 30 | } 31 | 32 | export type RESTGetAPIAuditLogResult = APIAuditLog; 33 | -------------------------------------------------------------------------------- /deno/rest/v10/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v10/mod.ts'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} 5 | */ 6 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} 10 | */ 11 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 12 | -------------------------------------------------------------------------------- /deno/rest/v10/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIInvite } from '../../payloads/v10/mod.ts'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} 6 | */ 7 | export interface RESTGetAPIInviteQuery { 8 | /** 9 | * Whether the invite should contain approximate member counts 10 | */ 11 | with_counts?: boolean; 12 | /** 13 | * Whether the invite should contain the expiration date 14 | * 15 | * @deprecated The expiration date is always returned, regardless of this query parameter. 16 | * @see {@link https://github.com/discord/discord-api-docs/pull/7424} 17 | */ 18 | with_expiration?: boolean; 19 | /** 20 | * The guild scheduled event to include with the invite 21 | */ 22 | guild_scheduled_event_id?: Snowflake; 23 | } 24 | 25 | export type RESTGetAPIInviteResult = APIInvite; 26 | 27 | /** 28 | * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} 29 | */ 30 | export type RESTDeleteAPIInviteResult = APIInvite; 31 | -------------------------------------------------------------------------------- /deno/rest/v6/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v6/auditLog.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export interface RESTGetAPIAuditLogQuery { 9 | user_id?: string; 10 | action_type?: AuditLogEvent; 11 | before?: string; 12 | limit?: number; 13 | } 14 | 15 | /** 16 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 17 | */ 18 | export type RESTGetAPIAuditLogResult = APIAuditLog; 19 | -------------------------------------------------------------------------------- /deno/rest/v6/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v6/mod.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/topics/gateway#get-gateway 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 9 | 10 | /** 11 | * https://discord.com/developers/docs/topics/gateway#get-gateway-bot 12 | * 13 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 14 | */ 15 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 16 | -------------------------------------------------------------------------------- /deno/rest/v6/invite.ts: -------------------------------------------------------------------------------- 1 | import type { APIInvite } from '../../payloads/v6/mod.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/invite#get-invite 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export interface RESTGetAPIInviteQuery { 9 | with_counts?: boolean; 10 | } 11 | 12 | /** 13 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 14 | */ 15 | export type RESTGetAPIInviteResult = APIInvite; 16 | 17 | /** 18 | * https://discord.com/developers/docs/resources/invite#delete-invite 19 | * 20 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 21 | */ 22 | export type RESTDeleteAPIInviteResult = APIInvite; 23 | -------------------------------------------------------------------------------- /deno/rest/v6/voice.ts: -------------------------------------------------------------------------------- 1 | import type { APIVoiceRegion } from '../../payloads/v6/mod.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/voice#list-voice-regions 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; 9 | -------------------------------------------------------------------------------- /deno/rest/v8/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v8/auditLog.ts'; 3 | 4 | /** 5 | * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log 6 | * 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface RESTGetAPIAuditLogQuery { 10 | /** 11 | * Filter the log for actions made by a user 12 | */ 13 | user_id?: Snowflake; 14 | /** 15 | * The type of audit log events 16 | */ 17 | action_type?: AuditLogEvent; 18 | /** 19 | * Filter the log before a certain entry ID 20 | */ 21 | before?: Snowflake; 22 | /** 23 | * How many entries are returned (default 50, minimum 1, maximum 100) 24 | * 25 | * @default 50 26 | */ 27 | limit?: number; 28 | } 29 | 30 | /** 31 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 32 | */ 33 | export type RESTGetAPIAuditLogResult = APIAuditLog; 34 | -------------------------------------------------------------------------------- /deno/rest/v8/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v8/mod.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/topics/gateway#get-gateway 5 | * 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 9 | 10 | /** 11 | * https://discord.com/developers/docs/topics/gateway#get-gateway-bot 12 | * 13 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 14 | */ 15 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 16 | -------------------------------------------------------------------------------- /deno/rest/v8/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIInvite } from '../../payloads/v8/mod.ts'; 3 | 4 | /** 5 | * https://discord.com/developers/docs/resources/invite#get-invite 6 | * 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface RESTGetAPIInviteQuery { 10 | /** 11 | * Whether the invite should contain approximate member counts 12 | */ 13 | with_counts?: boolean; 14 | /** 15 | * Whether the invite should contain the expiration date 16 | */ 17 | with_expiration?: boolean; 18 | /** 19 | * The guild scheduled event to include with the invite 20 | */ 21 | guild_scheduled_event_id?: Snowflake; 22 | } 23 | 24 | /** 25 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 26 | */ 27 | export type RESTGetAPIInviteResult = APIInvite; 28 | 29 | /** 30 | * https://discord.com/developers/docs/resources/invite#delete-invite 31 | * 32 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 33 | */ 34 | export type RESTDeleteAPIInviteResult = APIInvite; 35 | -------------------------------------------------------------------------------- /deno/rest/v8/voice.ts: -------------------------------------------------------------------------------- 1 | import type { APIVoiceRegion } from '../../payloads/v8/mod.ts'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/voice#list-voice-regions 5 | * 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; 9 | -------------------------------------------------------------------------------- /deno/rest/v9/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog.ts'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} 6 | */ 7 | export interface RESTGetAPIAuditLogQuery { 8 | /** 9 | * Filter the log for actions made by a user 10 | */ 11 | user_id?: Snowflake; 12 | /** 13 | * The type of audit log events 14 | */ 15 | action_type?: AuditLogEvent; 16 | /** 17 | * Filter the log before a certain entry ID 18 | */ 19 | before?: Snowflake; 20 | /** 21 | * Filter the log after a certain entry ID 22 | */ 23 | after?: Snowflake; 24 | /** 25 | * How many entries are returned (default 50, minimum 1, maximum 100) 26 | * 27 | * @defaultValue `50` 28 | */ 29 | limit?: number; 30 | } 31 | 32 | export type RESTGetAPIAuditLogResult = APIAuditLog; 33 | -------------------------------------------------------------------------------- /deno/rest/v9/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v9/mod.ts'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} 5 | */ 6 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} 10 | */ 11 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 12 | -------------------------------------------------------------------------------- /deno/rest/v9/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals.ts'; 2 | import type { APIInvite } from '../../payloads/v9/mod.ts'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} 6 | */ 7 | export interface RESTGetAPIInviteQuery { 8 | /** 9 | * Whether the invite should contain approximate member counts 10 | */ 11 | with_counts?: boolean; 12 | /** 13 | * Whether the invite should contain the expiration date 14 | * 15 | * @deprecated The expiration date is always returned, regardless of this query parameter. 16 | * @see {@link https://github.com/discord/discord-api-docs/pull/7424} 17 | */ 18 | with_expiration?: boolean; 19 | /** 20 | * The guild scheduled event to include with the invite 21 | */ 22 | guild_scheduled_event_id?: Snowflake; 23 | } 24 | 25 | export type RESTGetAPIInviteResult = APIInvite; 26 | 27 | /** 28 | * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} 29 | */ 30 | export type RESTDeleteAPIInviteResult = APIInvite; 31 | -------------------------------------------------------------------------------- /deno/rpc/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10.ts'; 5 | -------------------------------------------------------------------------------- /deno/rpc/v8.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../globals.ts'; 2 | import type { APIMessage, APIUser } from '../v8.ts'; 3 | import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common.ts'; 4 | 5 | export * from './common.ts'; 6 | 7 | /** 8 | * @unstable 9 | */ 10 | export interface Relationship { 11 | /** 12 | * The id of the user 13 | */ 14 | id: Snowflake; 15 | /** 16 | * Relationship type 17 | */ 18 | type: RelationshipType; 19 | /** 20 | * User 21 | */ 22 | user: APIUser; 23 | } 24 | 25 | /** 26 | * @unstable 27 | */ 28 | export interface RPCAPIMessage extends Omit { 29 | /** 30 | * The nickname of the user who sent the message 31 | */ 32 | nick?: string; 33 | /** 34 | * The color of the author's name 35 | */ 36 | author_color?: number; 37 | /** 38 | * The content of the message parsed into an array 39 | */ 40 | content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; 41 | } -------------------------------------------------------------------------------- /deno/rpc/v9.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../globals.ts'; 2 | import type { APIBaseMessageNoChannel, APIMessageMentions, APIUser } from '../v9.ts'; 3 | import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common.ts'; 4 | 5 | export * from './common.ts'; 6 | 7 | /** 8 | * @unstable 9 | */ 10 | export interface Relationship { 11 | /** 12 | * The id of the user 13 | */ 14 | id: Snowflake; 15 | /** 16 | * Relationship type 17 | */ 18 | type: RelationshipType; 19 | /** 20 | * User 21 | */ 22 | user: APIUser; 23 | } 24 | 25 | /** 26 | * @unstable 27 | */ 28 | export interface RPCAPIMessage extends APIBaseMessageNoChannel, APIMessageMentions { 29 | /** 30 | * The nickname of the user who sent the message 31 | */ 32 | nick?: string; 33 | /** 34 | * The color of the author's name 35 | */ 36 | author_color?: number; 37 | /** 38 | * The content of the message parsed into an array 39 | */ 40 | content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; 41 | } 42 | -------------------------------------------------------------------------------- /deno/utils/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the utility functions available in the recommended API / Gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10.ts'; 5 | -------------------------------------------------------------------------------- /deno/v10.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v10.ts'; 2 | export * from './globals.ts'; 3 | export * from './payloads/v10/mod.ts'; 4 | export * from './rest/v10/mod.ts'; 5 | export * from './rpc/v10.ts'; 6 | export * from './utils/internals.ts'; 7 | export * as Utils from './utils/v10.ts'; 8 | -------------------------------------------------------------------------------- /deno/v6.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v6.ts'; 2 | export * from './globals.ts'; 3 | export * from './payloads/v6/mod.ts'; 4 | export * from './rest/v6/mod.ts'; 5 | -------------------------------------------------------------------------------- /deno/v8.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v8.ts'; 2 | export * from './globals.ts'; 3 | export * from './payloads/v8/mod.ts'; 4 | export * from './rest/v8/mod.ts'; 5 | export * from './rpc/v8.ts'; 6 | export * as Utils from './utils/v8.ts'; 7 | -------------------------------------------------------------------------------- /deno/v9.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v9.ts'; 2 | export * from './globals.ts'; 3 | export * from './payloads/v9/mod.ts'; 4 | export * from './rest/v9/mod.ts'; 5 | export * from './rpc/v9.ts'; 6 | export * from './utils/internals.ts'; 7 | export * as Utils from './utils/v9.ts'; 8 | -------------------------------------------------------------------------------- /deno/voice/mod.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended voice gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v8.ts'; 5 | -------------------------------------------------------------------------------- /gateway/common.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params} 3 | */ 4 | export interface GatewayURLQuery { 5 | v: string; 6 | encoding: 'etf' | 'json'; 7 | compress?: 'zlib-stream'; 8 | } 9 | -------------------------------------------------------------------------------- /gateway/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10'; 5 | -------------------------------------------------------------------------------- /payloads/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the payloads available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10/index'; 5 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandAttachmentOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Attachment, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v10'; 2 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 3 | 4 | export interface APIApplicationCommandOptionBase { 5 | type: Type; 6 | name: string; 7 | name_localizations?: LocalizationMap | null; 8 | description: string; 9 | description_localizations?: LocalizationMap | null; 10 | required?: boolean; 11 | } 12 | 13 | export interface APIInteractionDataOptionBase { 14 | name: string; 15 | type: T; 16 | value: D; 17 | } 18 | 19 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 20 | Base extends APIApplicationCommandOptionBase, 21 | ChoiceType extends APIApplicationCommandOptionChoice, 22 | > = 23 | | (Base & { 24 | autocomplete: true; 25 | choices?: []; 26 | }) 27 | | (Base & { 28 | autocomplete?: false; 29 | choices?: ChoiceType[]; 30 | }); 31 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 2 | import type { ApplicationCommandOptionType } from './shared'; 3 | 4 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 5 | 6 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 7 | ApplicationCommandOptionType.Boolean, 8 | boolean 9 | >; 10 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { ChannelType } from '../../../channel'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 4 | import type { ApplicationCommandOptionType } from './shared'; 5 | 6 | export interface APIApplicationCommandChannelOption 7 | extends APIApplicationCommandOptionBase { 8 | channel_types?: Exclude[]; 9 | } 10 | 11 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 12 | ApplicationCommandOptionType.Channel, 13 | Snowflake 14 | >; 15 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/integer.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 8 | 9 | export interface APIApplicationCommandIntegerOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandIntegerOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataIntegerOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Integer, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandMentionableOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Mentionable, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/number.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 8 | 9 | export interface APIApplicationCommandNumberOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandNumberOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataNumberOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Number, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.Role, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v10'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} 22 | */ 23 | export interface APIApplicationCommandOptionChoice { 24 | name: string; 25 | name_localizations?: LocalizationMap | null; 26 | value: ValueType; 27 | } 28 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 7 | 8 | export interface APIApplicationCommandStringOptionBase 9 | extends APIApplicationCommandOptionBase { 10 | /** 11 | * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). 12 | */ 13 | min_length?: number; 14 | /** 15 | * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). 16 | */ 17 | max_length?: number; 18 | } 19 | 20 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 21 | APIApplicationCommandStringOptionBase, 22 | APIApplicationCommandOptionChoice 23 | >; 24 | 25 | export interface APIApplicationCommandInteractionDataStringOption 26 | extends APIInteractionDataOptionBase { 27 | focused?: boolean; 28 | } 29 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; 3 | import type { APIApplicationCommandOptionBase } from './base'; 4 | import type { ApplicationCommandOptionType } from './shared'; 5 | 6 | export interface APIApplicationCommandSubcommandOption 7 | extends APIApplicationCommandOptionBase { 8 | options?: APIApplicationCommandBasicOption[]; 9 | } 10 | 11 | export interface APIApplicationCommandInteractionDataSubcommandOption { 12 | name: string; 13 | type: ApplicationCommandOptionType.Subcommand; 14 | options?: APIApplicationCommandInteractionDataBasicOption[]; 15 | } 16 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { APIApplicationCommandOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | import type { 5 | APIApplicationCommandInteractionDataSubcommandOption, 6 | APIApplicationCommandSubcommandOption, 7 | } from './subcommand'; 8 | 9 | export interface APIApplicationCommandSubcommandGroupOption 10 | extends APIApplicationCommandOptionBase { 11 | options?: APIApplicationCommandSubcommandOption[]; 12 | } 13 | 14 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption< 15 | Type extends InteractionType = InteractionType, 16 | > { 17 | name: string; 18 | type: ApplicationCommandOptionType.SubcommandGroup; 19 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.User, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/entryPoint.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; 2 | import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; 3 | import type { APIBaseApplicationCommandInteractionData } from './internals'; 4 | 5 | /** 6 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} 7 | */ 8 | export type APIPrimaryEntryPointCommandInteractionData = 9 | APIBaseApplicationCommandInteractionData; 10 | 11 | /** 12 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 13 | */ 14 | export type APIPrimaryEntryPointCommandInteraction = 15 | APIApplicationCommandInteractionWrapper; 16 | 17 | /** 18 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 19 | */ 20 | export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper; 21 | 22 | /** 23 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 24 | */ 25 | export type APIPrimaryEntryPointCommandGuildInteraction = 26 | APIGuildInteractionWrapper; 27 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals'; 2 | import type { ApplicationCommandType } from '../applicationCommands'; 3 | 4 | export interface APIBaseApplicationCommandInteractionData { 5 | id: Snowflake; 6 | type: Type; 7 | name: string; 8 | guild_id?: Snowflake; 9 | } 10 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/autocomplete.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIBaseInteraction, 3 | APIAutocompleteApplicationCommandInteractionData, 4 | APIDMInteractionWrapper, 5 | APIGuildInteractionWrapper, 6 | InteractionType, 7 | } from '../index'; 8 | 9 | export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction< 10 | InteractionType.ApplicationCommandAutocomplete, 11 | APIAutocompleteApplicationCommandInteractionData 12 | > & 13 | Required< 14 | Pick< 15 | APIBaseInteraction< 16 | InteractionType.ApplicationCommandAutocomplete, 17 | Required> 18 | >, 19 | 'data' 20 | > 21 | >; 22 | 23 | /** 24 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 25 | */ 26 | export type APIApplicationCommandAutocompleteDMInteraction = 27 | APIDMInteractionWrapper; 28 | 29 | /** 30 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 31 | */ 32 | export type APIApplicationCommandAutocompleteGuildInteraction = 33 | APIGuildInteractionWrapper; 34 | -------------------------------------------------------------------------------- /payloads/v10/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base'; 2 | import type { InteractionType } from './responses'; 3 | 4 | export type APIPingInteraction = Omit, 'locale'>; 5 | -------------------------------------------------------------------------------- /payloads/v10/index.ts: -------------------------------------------------------------------------------- 1 | export * from '../common'; 2 | export * from './application'; 3 | export * from './auditLog'; 4 | export * from './autoModeration'; 5 | export * from './channel'; 6 | export type * from './emoji'; 7 | export * from './gateway'; 8 | export * from './guild'; 9 | export * from './guildScheduledEvent'; 10 | export * from './interactions'; 11 | export * from './invite'; 12 | export * from './monetization'; 13 | export * from './oauth2'; 14 | export * from './permissions'; 15 | export * from './poll'; 16 | export type * from './soundboard'; 17 | export * from './stageInstance'; 18 | export * from './sticker'; 19 | export * from './teams'; 20 | export type * from './template'; 21 | export * from './user'; 22 | export type * from './voice'; 23 | export * from './webhook'; 24 | -------------------------------------------------------------------------------- /payloads/v10/soundboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/soundboard 3 | */ 4 | 5 | import type { Snowflake } from '../../globals'; 6 | import type { APIUser } from './user'; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} 10 | */ 11 | export interface APISoundboardSound { 12 | /** 13 | * The name of this sound 14 | */ 15 | name: string; 16 | /** 17 | * The id of this sound 18 | */ 19 | sound_id: Snowflake; 20 | /** 21 | * The volume of this sound, from 0 to 1 22 | */ 23 | volume: number; 24 | /** 25 | * The id of this sound's custom emoji 26 | */ 27 | emoji_id: Snowflake | null; 28 | /** 29 | * The unicode character of this sound's standard emoji 30 | */ 31 | emoji_name: string | null; 32 | /** 33 | * The id of the guild that this sound is in 34 | */ 35 | guild_id?: Snowflake; 36 | /** 37 | * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts 38 | */ 39 | available: boolean; 40 | /** 41 | * The user who created this sound 42 | */ 43 | user?: APIUser; 44 | } 45 | -------------------------------------------------------------------------------- /payloads/v6/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/emoji 3 | */ 4 | 5 | import type { APIUser } from './user'; 6 | 7 | /** 8 | * Not documented but mentioned 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface APIPartialEmoji { 13 | id: string | null; 14 | name: string | null; 15 | animated?: boolean; 16 | } 17 | 18 | /** 19 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure 20 | * 21 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 22 | */ 23 | export interface APIEmoji extends APIPartialEmoji { 24 | roles?: string[]; 25 | user?: APIUser; 26 | require_colons?: boolean; 27 | managed?: boolean; 28 | available?: boolean; 29 | } 30 | -------------------------------------------------------------------------------- /payloads/v6/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auditLog'; 2 | export * from './channel'; 3 | export * from './emoji'; 4 | export * from './gateway'; 5 | export * from './guild'; 6 | export * from './invite'; 7 | export * from './oauth2'; 8 | export * from './permissions'; 9 | export * from './teams'; 10 | export * from './user'; 11 | export * from './voice'; 12 | export * from './webhook'; 13 | -------------------------------------------------------------------------------- /payloads/v6/invite.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/invite 3 | */ 4 | 5 | import type { APIPartialChannel } from './channel'; 6 | import type { APIPartialGuild } from './guild'; 7 | import type { APIUser } from './user'; 8 | 9 | /** 10 | * https://discord.com/developers/docs/resources/invite#invite-object 11 | * 12 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 13 | */ 14 | export interface APIInvite { 15 | code: string; 16 | guild?: APIPartialGuild; 17 | channel?: Required; 18 | inviter?: APIUser; 19 | target_user?: APIUser; 20 | target_user_type?: InviteTargetUserType; 21 | approximate_presence_count?: number; 22 | approximate_member_count?: number; 23 | } 24 | 25 | /** 26 | * https://discord.com/developers/docs/resources/invite#invite-object-target-user-types 27 | * 28 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 29 | */ 30 | export enum InviteTargetUserType { 31 | STREAM = 1, 32 | } 33 | 34 | /** 35 | * https://discord.com/developers/docs/resources/invite#invite-metadata-object 36 | * 37 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 38 | */ 39 | export interface APIExtendedInvite extends APIInvite { 40 | uses: number; 41 | max_uses: number; 42 | max_age: number; 43 | temporary: boolean; 44 | created_at: string; 45 | } 46 | -------------------------------------------------------------------------------- /payloads/v6/oauth2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/topics/oauth2 3 | */ 4 | 5 | import type { APITeam } from './teams'; 6 | import type { APIUser } from './user'; 7 | 8 | /** 9 | * https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure 10 | * 11 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 12 | */ 13 | export interface APIApplication { 14 | id: string; 15 | name: string; 16 | icon: string | null; 17 | description: string; 18 | rpc_origins?: string[]; 19 | bot_public: boolean; 20 | bot_require_code_grant: boolean; 21 | owner: APIUser; 22 | summary: string; 23 | verify_key: string; 24 | team: APITeam | null; 25 | guild_id?: string; 26 | primary_sku_id?: string; 27 | slug?: string; 28 | cover_image?: string; 29 | } 30 | -------------------------------------------------------------------------------- /payloads/v6/teams.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/topics/teams 3 | */ 4 | 5 | import type { APIUser } from './user'; 6 | 7 | /** 8 | * https://discord.com/developers/docs/topics/teams#data-models-team-object 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface APITeam { 13 | id: string; 14 | icon: string | null; 15 | members: APITeamMember[]; 16 | owner_user_id: string; 17 | } 18 | 19 | /** 20 | * https://discord.com/developers/docs/topics/teams#data-models-team-members-object 21 | * 22 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 23 | */ 24 | export interface APITeamMember { 25 | membership_state: TeamMemberMembershipState; 26 | permissions: string[]; 27 | team_id: string; 28 | user: APIUser; 29 | } 30 | 31 | /** 32 | * https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum 33 | * 34 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 35 | */ 36 | export enum TeamMemberMembershipState { 37 | INVITED = 1, 38 | ACCEPTED, 39 | } 40 | -------------------------------------------------------------------------------- /payloads/v6/voice.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/voice 3 | */ 4 | 5 | import type { APIGuildMember } from './guild'; 6 | 7 | /** 8 | * https://discord.com/developers/docs/resources/voice#voice-state-object 9 | * 10 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 11 | */ 12 | export interface GatewayVoiceState { 13 | guild_id?: string; 14 | channel_id: string | null; 15 | user_id: string; 16 | member?: APIGuildMember; 17 | session_id: string; 18 | deaf: boolean; 19 | mute: boolean; 20 | self_deaf: boolean; 21 | self_mute: boolean; 22 | self_stream?: boolean; 23 | self_video: boolean; 24 | suppress: boolean; 25 | } 26 | 27 | /** 28 | * https://discord.com/developers/docs/resources/voice#voice-region-object 29 | * 30 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 31 | */ 32 | export interface APIVoiceRegion { 33 | id: string; 34 | name: string; 35 | vip: boolean; 36 | optimal: boolean; 37 | deprecated: boolean; 38 | custom: boolean; 39 | } 40 | -------------------------------------------------------------------------------- /payloads/v6/webhook.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/webhook 3 | */ 4 | 5 | import type { APIPartialChannel } from './channel'; 6 | import type { APIPartialGuild } from './guild'; 7 | import type { APIUser } from './user'; 8 | 9 | /** 10 | * https://discord.com/developers/docs/resources/webhook#webhook-object 11 | * 12 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 13 | */ 14 | export interface APIWebhook { 15 | id: string; 16 | type: WebhookType; 17 | guild_id?: string; 18 | channel_id: string; 19 | user?: APIUser; 20 | name: string | null; 21 | avatar: string | null; 22 | token?: string; 23 | source_guild?: APIPartialGuild; 24 | source_channel?: APIPartialChannel; 25 | application_id: string | null; 26 | } 27 | 28 | /** 29 | * @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8. 30 | */ 31 | export enum WebhookType { 32 | Incoming = 1, 33 | ChannelFollower, 34 | } 35 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandAttachmentOption = 9 | APIApplicationCommandOptionBase; 10 | 11 | /** 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 15 | ApplicationCommandOptionType.Attachment, 16 | Snowflake 17 | >; 18 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 2 | 3 | /** 4 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 5 | */ 6 | export interface APIApplicationCommandOptionBase { 7 | type: Type; 8 | name: string; 9 | description: string; 10 | required?: boolean; 11 | } 12 | 13 | /** 14 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 15 | */ 16 | export interface APIInteractionDataOptionBase { 17 | name: string; 18 | type: T; 19 | value: D; 20 | } 21 | 22 | /** 23 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 24 | */ 25 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 26 | Base extends APIApplicationCommandOptionBase, 27 | ChoiceType extends APIApplicationCommandOptionChoice, 28 | > = 29 | | (Base & { 30 | autocomplete: true; 31 | }) 32 | | (Base & { 33 | autocomplete?: false; 34 | choices?: ChoiceType[]; 35 | }); 36 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 2 | import type { ApplicationCommandOptionType } from './shared'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 8 | 9 | /** 10 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 11 | */ 12 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 13 | ApplicationCommandOptionType.Boolean, 14 | boolean 15 | >; 16 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { ChannelType } from '../../../channel'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 4 | import type { ApplicationCommandOptionType } from './shared'; 5 | 6 | /** 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface APIApplicationCommandChannelOption 10 | extends APIApplicationCommandOptionBase { 11 | channel_types?: Exclude[]; 12 | } 13 | 14 | /** 15 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 16 | */ 17 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 18 | ApplicationCommandOptionType.Channel, 19 | Snowflake 20 | >; 21 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandMentionableOption = 9 | APIApplicationCommandOptionBase; 10 | 11 | /** 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 15 | ApplicationCommandOptionType.Mentionable, 16 | Snowflake 17 | >; 18 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 9 | 10 | /** 11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 12 | */ 13 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 14 | ApplicationCommandOptionType.Role, 15 | Snowflake 16 | >; 17 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type 3 | * 4 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure 22 | * 23 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 24 | */ 25 | export interface APIApplicationCommandOptionChoice { 26 | name: string; 27 | value: ValueType; 28 | } 29 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 7 | 8 | /** 9 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 10 | */ 11 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 12 | APIApplicationCommandOptionBase, 13 | APIApplicationCommandOptionChoice 14 | >; 15 | 16 | /** 17 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 18 | */ 19 | export interface APIApplicationCommandInteractionDataStringOption 20 | extends APIInteractionDataOptionBase { 21 | focused?: boolean; 22 | } 23 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; 2 | import type { APIApplicationCommandOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export interface APIApplicationCommandSubcommandOption 9 | extends APIApplicationCommandOptionBase { 10 | options?: APIApplicationCommandBasicOption[]; 11 | } 12 | 13 | /** 14 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 15 | */ 16 | export interface APIApplicationCommandInteractionDataSubcommandOption { 17 | name: string; 18 | type: ApplicationCommandOptionType.Subcommand; 19 | options?: APIApplicationCommandInteractionDataBasicOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase } from './base'; 2 | import type { ApplicationCommandOptionType } from './shared'; 3 | import type { 4 | APIApplicationCommandInteractionDataSubcommandOption, 5 | APIApplicationCommandSubcommandOption, 6 | } from './subcommand'; 7 | 8 | /** 9 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 10 | */ 11 | export interface APIApplicationCommandSubcommandGroupOption 12 | extends APIApplicationCommandOptionBase { 13 | options?: APIApplicationCommandSubcommandOption[]; 14 | } 15 | 16 | /** 17 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 18 | */ 19 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption { 20 | name: string; 21 | type: ApplicationCommandOptionType.SubcommandGroup; 22 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 23 | } 24 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | /** 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 9 | 10 | /** 11 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 12 | */ 13 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 14 | ApplicationCommandOptionType.User, 15 | Snowflake 16 | >; 17 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals'; 2 | import type { ApplicationCommandType } from '../applicationCommands'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export interface APIBaseApplicationCommandInteractionData { 8 | id: Snowflake; 9 | type: Type; 10 | name: string; 11 | } 12 | -------------------------------------------------------------------------------- /payloads/v8/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base'; 2 | import type { InteractionType } from './responses'; 3 | 4 | /** 5 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 6 | */ 7 | export type APIPingInteraction = Omit, 'locale'>; 8 | -------------------------------------------------------------------------------- /payloads/v8/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/emoji 3 | */ 4 | 5 | import type { Snowflake } from '../../globals'; 6 | import type { APIRole } from './permissions'; 7 | import type { APIUser } from './user'; 8 | 9 | /** 10 | * Not documented but mentioned 11 | * 12 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 13 | */ 14 | export interface APIPartialEmoji { 15 | /** 16 | * Emoji id 17 | */ 18 | id: Snowflake | null; 19 | /** 20 | * Emoji name (can be null only in reaction emoji objects) 21 | */ 22 | name: string | null; 23 | /** 24 | * Whether this emoji is animated 25 | */ 26 | animated?: boolean; 27 | } 28 | 29 | /** 30 | * https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure 31 | * 32 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 33 | */ 34 | export interface APIEmoji extends APIPartialEmoji { 35 | /** 36 | * Roles this emoji is whitelisted to 37 | */ 38 | roles?: APIRole['id'][]; 39 | /** 40 | * User that created this emoji 41 | */ 42 | user?: APIUser; 43 | /** 44 | * Whether this emoji must be wrapped in colons 45 | */ 46 | require_colons?: boolean; 47 | /** 48 | * Whether this emoji is managed 49 | */ 50 | managed?: boolean; 51 | /** 52 | * Whether this emoji can be used, may be false due to loss of Server Boosts 53 | */ 54 | available?: boolean; 55 | } 56 | -------------------------------------------------------------------------------- /payloads/v8/index.ts: -------------------------------------------------------------------------------- 1 | export * from '../common'; 2 | export * from './application'; 3 | export * from './auditLog'; 4 | export * from './channel'; 5 | export * from './emoji'; 6 | export * from './gateway'; 7 | export * from './guild'; 8 | export * from './guildScheduledEvent'; 9 | export * from './interactions'; 10 | export * from './invite'; 11 | export * from './oauth2'; 12 | export * from './permissions'; 13 | export * from './stageInstance'; 14 | export * from './sticker'; 15 | export * from './teams'; 16 | export * from './template'; 17 | export * from './user'; 18 | export * from './voice'; 19 | export * from './webhook'; 20 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandAttachmentOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Attachment, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/base.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v9'; 2 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 3 | 4 | export interface APIApplicationCommandOptionBase { 5 | type: Type; 6 | name: string; 7 | name_localizations?: LocalizationMap | null; 8 | description: string; 9 | description_localizations?: LocalizationMap | null; 10 | required?: boolean; 11 | } 12 | 13 | export interface APIInteractionDataOptionBase { 14 | name: string; 15 | type: T; 16 | value: D; 17 | } 18 | 19 | export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 20 | Base extends APIApplicationCommandOptionBase, 21 | ChoiceType extends APIApplicationCommandOptionChoice, 22 | > = 23 | | (Base & { 24 | autocomplete: true; 25 | choices?: []; 26 | }) 27 | | (Base & { 28 | autocomplete?: false; 29 | choices?: ChoiceType[]; 30 | }); 31 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 2 | import type { ApplicationCommandOptionType } from './shared'; 3 | 4 | export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase; 5 | 6 | export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase< 7 | ApplicationCommandOptionType.Boolean, 8 | boolean 9 | >; 10 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/channel.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { ChannelType } from '../../../channel'; 3 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 4 | import type { ApplicationCommandOptionType } from './shared'; 5 | 6 | export interface APIApplicationCommandChannelOption 7 | extends APIApplicationCommandOptionBase { 8 | channel_types?: Exclude[]; 9 | } 10 | 11 | export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase< 12 | ApplicationCommandOptionType.Channel, 13 | Snowflake 14 | >; 15 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/integer.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 8 | 9 | export interface APIApplicationCommandIntegerOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandIntegerOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataIntegerOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Integer, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandMentionableOption = 6 | APIApplicationCommandOptionBase; 7 | 8 | export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase< 9 | ApplicationCommandOptionType.Mentionable, 10 | Snowflake 11 | >; 12 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/number.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { 3 | APIApplicationCommandOptionBase, 4 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 5 | APIInteractionDataOptionBase, 6 | } from './base'; 7 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 8 | 9 | export interface APIApplicationCommandNumberOptionBase 10 | extends APIApplicationCommandOptionBase { 11 | /** 12 | * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted. 13 | */ 14 | min_value?: number; 15 | /** 16 | * If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted. 17 | */ 18 | max_value?: number; 19 | } 20 | 21 | export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 22 | APIApplicationCommandNumberOptionBase, 23 | APIApplicationCommandOptionChoice 24 | >; 25 | 26 | export interface APIApplicationCommandInteractionDataNumberOption 27 | extends APIInteractionDataOptionBase< 28 | ApplicationCommandOptionType.Number, 29 | Type extends InteractionType.ApplicationCommandAutocomplete ? string : number 30 | > { 31 | focused?: boolean; 32 | } 33 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/role.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.Role, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/shared.ts: -------------------------------------------------------------------------------- 1 | import type { LocalizationMap } from '../../../../../v9'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} 5 | */ 6 | export enum ApplicationCommandOptionType { 7 | Subcommand = 1, 8 | SubcommandGroup, 9 | String, 10 | Integer, 11 | Boolean, 12 | User, 13 | Channel, 14 | Role, 15 | Mentionable, 16 | Number, 17 | Attachment, 18 | } 19 | 20 | /** 21 | * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} 22 | */ 23 | export interface APIApplicationCommandOptionChoice { 24 | name: string; 25 | name_localizations?: LocalizationMap | null; 26 | value: ValueType; 27 | } 28 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/string.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIApplicationCommandOptionBase, 3 | APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, 4 | APIInteractionDataOptionBase, 5 | } from './base'; 6 | import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 7 | 8 | export interface APIApplicationCommandStringOptionBase 9 | extends APIApplicationCommandOptionBase { 10 | /** 11 | * For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`). 12 | */ 13 | min_length?: number; 14 | /** 15 | * For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`). 16 | */ 17 | max_length?: number; 18 | } 19 | 20 | export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper< 21 | APIApplicationCommandStringOptionBase, 22 | APIApplicationCommandOptionChoice 23 | >; 24 | 25 | export interface APIApplicationCommandInteractionDataStringOption 26 | extends APIInteractionDataOptionBase { 27 | focused?: boolean; 28 | } 29 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput'; 3 | import type { APIApplicationCommandOptionBase } from './base'; 4 | import type { ApplicationCommandOptionType } from './shared'; 5 | 6 | export interface APIApplicationCommandSubcommandOption 7 | extends APIApplicationCommandOptionBase { 8 | options?: APIApplicationCommandBasicOption[]; 9 | } 10 | 11 | export interface APIApplicationCommandInteractionDataSubcommandOption { 12 | name: string; 13 | type: ApplicationCommandOptionType.Subcommand; 14 | options?: APIApplicationCommandInteractionDataBasicOption[]; 15 | } 16 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.ts: -------------------------------------------------------------------------------- 1 | import type { InteractionType } from '../../responses'; 2 | import type { APIApplicationCommandOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | import type { 5 | APIApplicationCommandInteractionDataSubcommandOption, 6 | APIApplicationCommandSubcommandOption, 7 | } from './subcommand'; 8 | 9 | export interface APIApplicationCommandSubcommandGroupOption 10 | extends APIApplicationCommandOptionBase { 11 | options?: APIApplicationCommandSubcommandOption[]; 12 | } 13 | 14 | export interface APIApplicationCommandInteractionDataSubcommandGroupOption< 15 | Type extends InteractionType = InteractionType, 16 | > { 17 | name: string; 18 | type: ApplicationCommandOptionType.SubcommandGroup; 19 | options: APIApplicationCommandInteractionDataSubcommandOption[]; 20 | } 21 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/_chatInput/user.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../../globals'; 2 | import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; 3 | import type { ApplicationCommandOptionType } from './shared'; 4 | 5 | export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase; 6 | 7 | export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase< 8 | ApplicationCommandOptionType.User, 9 | Snowflake 10 | >; 11 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/entryPoint.ts: -------------------------------------------------------------------------------- 1 | import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; 2 | import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; 3 | import type { APIBaseApplicationCommandInteractionData } from './internals'; 4 | 5 | /** 6 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data} 7 | */ 8 | export type APIPrimaryEntryPointCommandInteractionData = 9 | APIBaseApplicationCommandInteractionData; 10 | 11 | /** 12 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 13 | */ 14 | export type APIPrimaryEntryPointCommandInteraction = 15 | APIApplicationCommandInteractionWrapper; 16 | 17 | /** 18 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 19 | */ 20 | export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper; 21 | 22 | /** 23 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 24 | */ 25 | export type APIPrimaryEntryPointCommandGuildInteraction = 26 | APIGuildInteractionWrapper; 27 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/_applicationCommands/internals.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../../../globals'; 2 | import type { ApplicationCommandType } from '../applicationCommands'; 3 | 4 | export interface APIBaseApplicationCommandInteractionData { 5 | id: Snowflake; 6 | type: Type; 7 | name: string; 8 | guild_id?: Snowflake; 9 | } 10 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/autocomplete.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | APIBaseInteraction, 3 | APIAutocompleteApplicationCommandInteractionData, 4 | APIDMInteractionWrapper, 5 | APIGuildInteractionWrapper, 6 | InteractionType, 7 | } from '../index'; 8 | 9 | export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction< 10 | InteractionType.ApplicationCommandAutocomplete, 11 | APIAutocompleteApplicationCommandInteractionData 12 | > & 13 | Required< 14 | Pick< 15 | APIBaseInteraction< 16 | InteractionType.ApplicationCommandAutocomplete, 17 | Required> 18 | >, 19 | 'data' 20 | > 21 | >; 22 | 23 | /** 24 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 25 | */ 26 | export type APIApplicationCommandAutocompleteDMInteraction = 27 | APIDMInteractionWrapper; 28 | 29 | /** 30 | * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object} 31 | */ 32 | export type APIApplicationCommandAutocompleteGuildInteraction = 33 | APIGuildInteractionWrapper; 34 | -------------------------------------------------------------------------------- /payloads/v9/_interactions/ping.ts: -------------------------------------------------------------------------------- 1 | import type { APIBaseInteraction } from './base'; 2 | import type { InteractionType } from './responses'; 3 | 4 | export type APIPingInteraction = Omit, 'locale'>; 5 | -------------------------------------------------------------------------------- /payloads/v9/index.ts: -------------------------------------------------------------------------------- 1 | export * from '../common'; 2 | export * from './application'; 3 | export * from './auditLog'; 4 | export * from './autoModeration'; 5 | export * from './channel'; 6 | export type * from './emoji'; 7 | export * from './gateway'; 8 | export * from './guild'; 9 | export * from './guildScheduledEvent'; 10 | export * from './interactions'; 11 | export * from './invite'; 12 | export * from './monetization'; 13 | export * from './oauth2'; 14 | export * from './permissions'; 15 | export * from './poll'; 16 | export type * from './soundboard'; 17 | export * from './stageInstance'; 18 | export * from './sticker'; 19 | export * from './teams'; 20 | export type * from './template'; 21 | export * from './user'; 22 | export type * from './voice'; 23 | export * from './webhook'; 24 | -------------------------------------------------------------------------------- /payloads/v9/soundboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types extracted from https://discord.com/developers/docs/resources/soundboard 3 | */ 4 | 5 | import type { Snowflake } from '../../globals'; 6 | import type { APIUser } from './user'; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object} 10 | */ 11 | export interface APISoundboardSound { 12 | /** 13 | * The name of this sound 14 | */ 15 | name: string; 16 | /** 17 | * The id of this sound 18 | */ 19 | sound_id: Snowflake; 20 | /** 21 | * The volume of this sound, from 0 to 1 22 | */ 23 | volume: number; 24 | /** 25 | * The id of this sound's custom emoji 26 | */ 27 | emoji_id: Snowflake | null; 28 | /** 29 | * The unicode character of this sound's standard emoji 30 | */ 31 | emoji_name: string | null; 32 | /** 33 | * The id of the guild that this sound is in 34 | */ 35 | guild_id?: Snowflake; 36 | /** 37 | * Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts 38 | */ 39 | available: boolean; 40 | /** 41 | * The user who created this sound 42 | */ 43 | user?: APIUser; 44 | } 45 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:recommended", ":semanticCommitTypeAll(chore)"], 4 | "semanticCommits": "enabled", 5 | "lockFileMaintenance": { 6 | "enabled": true, 7 | "schedule": ["before 1pm every friday"] 8 | }, 9 | "ignorePaths": ["website/"], 10 | "packageRules": [ 11 | { 12 | "matchUpdateTypes": ["patch", "minor"], 13 | "matchCurrentVersion": "!/^0/", 14 | "groupName": "patch/minor dependencies", 15 | "groupSlug": "all-non-major" 16 | }, 17 | { 18 | "groupName": "eslint/prettier", 19 | "automerge": true, 20 | "groupSlug": "formatting-linting-dependencies", 21 | "matchPackageNames": ["/eslint/", "/prettier/"] 22 | } 23 | ], 24 | "schedule": ["before 1pm every friday"] 25 | } 26 | -------------------------------------------------------------------------------- /rest/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10/index'; 5 | -------------------------------------------------------------------------------- /rest/v10/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} 6 | */ 7 | export interface RESTGetAPIAuditLogQuery { 8 | /** 9 | * Filter the log for actions made by a user 10 | */ 11 | user_id?: Snowflake; 12 | /** 13 | * The type of audit log events 14 | */ 15 | action_type?: AuditLogEvent; 16 | /** 17 | * Filter the log before a certain entry ID 18 | */ 19 | before?: Snowflake; 20 | /** 21 | * Filter the log after a certain entry ID 22 | */ 23 | after?: Snowflake; 24 | /** 25 | * How many entries are returned (default 50, minimum 1, maximum 100) 26 | * 27 | * @defaultValue `50` 28 | */ 29 | limit?: number; 30 | } 31 | 32 | export type RESTGetAPIAuditLogResult = APIAuditLog; 33 | -------------------------------------------------------------------------------- /rest/v10/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v10/index'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} 5 | */ 6 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} 10 | */ 11 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 12 | -------------------------------------------------------------------------------- /rest/v10/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIInvite } from '../../payloads/v10/index'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} 6 | */ 7 | export interface RESTGetAPIInviteQuery { 8 | /** 9 | * Whether the invite should contain approximate member counts 10 | */ 11 | with_counts?: boolean; 12 | /** 13 | * Whether the invite should contain the expiration date 14 | * 15 | * @deprecated The expiration date is always returned, regardless of this query parameter. 16 | * @see {@link https://github.com/discord/discord-api-docs/pull/7424} 17 | */ 18 | with_expiration?: boolean; 19 | /** 20 | * The guild scheduled event to include with the invite 21 | */ 22 | guild_scheduled_event_id?: Snowflake; 23 | } 24 | 25 | export type RESTGetAPIInviteResult = APIInvite; 26 | 27 | /** 28 | * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} 29 | */ 30 | export type RESTDeleteAPIInviteResult = APIInvite; 31 | -------------------------------------------------------------------------------- /rest/v6/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v6/auditLog'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export interface RESTGetAPIAuditLogQuery { 9 | user_id?: string; 10 | action_type?: AuditLogEvent; 11 | before?: string; 12 | limit?: number; 13 | } 14 | 15 | /** 16 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 17 | */ 18 | export type RESTGetAPIAuditLogResult = APIAuditLog; 19 | -------------------------------------------------------------------------------- /rest/v6/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v6/index'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/topics/gateway#get-gateway 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 9 | 10 | /** 11 | * https://discord.com/developers/docs/topics/gateway#get-gateway-bot 12 | * 13 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 14 | */ 15 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 16 | -------------------------------------------------------------------------------- /rest/v6/invite.ts: -------------------------------------------------------------------------------- 1 | import type { APIInvite } from '../../payloads/v6/index'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/invite#get-invite 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export interface RESTGetAPIInviteQuery { 9 | with_counts?: boolean; 10 | } 11 | 12 | /** 13 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 14 | */ 15 | export type RESTGetAPIInviteResult = APIInvite; 16 | 17 | /** 18 | * https://discord.com/developers/docs/resources/invite#delete-invite 19 | * 20 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 21 | */ 22 | export type RESTDeleteAPIInviteResult = APIInvite; 23 | -------------------------------------------------------------------------------- /rest/v6/voice.ts: -------------------------------------------------------------------------------- 1 | import type { APIVoiceRegion } from '../../payloads/v6/index'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/voice#list-voice-regions 5 | * 6 | * @deprecated API v6 is deprecated and the types will not receive further updates, please update to v8. 7 | */ 8 | export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; 9 | -------------------------------------------------------------------------------- /rest/v8/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v8/auditLog'; 3 | 4 | /** 5 | * https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log 6 | * 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface RESTGetAPIAuditLogQuery { 10 | /** 11 | * Filter the log for actions made by a user 12 | */ 13 | user_id?: Snowflake; 14 | /** 15 | * The type of audit log events 16 | */ 17 | action_type?: AuditLogEvent; 18 | /** 19 | * Filter the log before a certain entry ID 20 | */ 21 | before?: Snowflake; 22 | /** 23 | * How many entries are returned (default 50, minimum 1, maximum 100) 24 | * 25 | * @default 50 26 | */ 27 | limit?: number; 28 | } 29 | 30 | /** 31 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 32 | */ 33 | export type RESTGetAPIAuditLogResult = APIAuditLog; 34 | -------------------------------------------------------------------------------- /rest/v8/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v8/index'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/topics/gateway#get-gateway 5 | * 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 9 | 10 | /** 11 | * https://discord.com/developers/docs/topics/gateway#get-gateway-bot 12 | * 13 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 14 | */ 15 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 16 | -------------------------------------------------------------------------------- /rest/v8/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIInvite } from '../../payloads/v8/index'; 3 | 4 | /** 5 | * https://discord.com/developers/docs/resources/invite#get-invite 6 | * 7 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 8 | */ 9 | export interface RESTGetAPIInviteQuery { 10 | /** 11 | * Whether the invite should contain approximate member counts 12 | */ 13 | with_counts?: boolean; 14 | /** 15 | * Whether the invite should contain the expiration date 16 | */ 17 | with_expiration?: boolean; 18 | /** 19 | * The guild scheduled event to include with the invite 20 | */ 21 | guild_scheduled_event_id?: Snowflake; 22 | } 23 | 24 | /** 25 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 26 | */ 27 | export type RESTGetAPIInviteResult = APIInvite; 28 | 29 | /** 30 | * https://discord.com/developers/docs/resources/invite#delete-invite 31 | * 32 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 33 | */ 34 | export type RESTDeleteAPIInviteResult = APIInvite; 35 | -------------------------------------------------------------------------------- /rest/v8/voice.ts: -------------------------------------------------------------------------------- 1 | import type { APIVoiceRegion } from '../../payloads/v8/index'; 2 | 3 | /** 4 | * https://discord.com/developers/docs/resources/voice#list-voice-regions 5 | * 6 | * @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. 7 | */ 8 | export type GetAPIVoiceRegionsResult = APIVoiceRegion[]; 9 | -------------------------------------------------------------------------------- /rest/v9/auditLog.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIAuditLog, AuditLogEvent } from '../../payloads/v9/auditLog'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log} 6 | */ 7 | export interface RESTGetAPIAuditLogQuery { 8 | /** 9 | * Filter the log for actions made by a user 10 | */ 11 | user_id?: Snowflake; 12 | /** 13 | * The type of audit log events 14 | */ 15 | action_type?: AuditLogEvent; 16 | /** 17 | * Filter the log before a certain entry ID 18 | */ 19 | before?: Snowflake; 20 | /** 21 | * Filter the log after a certain entry ID 22 | */ 23 | after?: Snowflake; 24 | /** 25 | * How many entries are returned (default 50, minimum 1, maximum 100) 26 | * 27 | * @defaultValue `50` 28 | */ 29 | limit?: number; 30 | } 31 | 32 | export type RESTGetAPIAuditLogResult = APIAuditLog; 33 | -------------------------------------------------------------------------------- /rest/v9/gateway.ts: -------------------------------------------------------------------------------- 1 | import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v9/index'; 2 | 3 | /** 4 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} 5 | */ 6 | export type RESTGetAPIGatewayResult = APIGatewayInfo; 7 | 8 | /** 9 | * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} 10 | */ 11 | export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo; 12 | -------------------------------------------------------------------------------- /rest/v9/invite.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../../globals'; 2 | import type { APIInvite } from '../../payloads/v9/index'; 3 | 4 | /** 5 | * @see {@link https://discord.com/developers/docs/resources/invite#get-invite} 6 | */ 7 | export interface RESTGetAPIInviteQuery { 8 | /** 9 | * Whether the invite should contain approximate member counts 10 | */ 11 | with_counts?: boolean; 12 | /** 13 | * Whether the invite should contain the expiration date 14 | * 15 | * @deprecated The expiration date is always returned, regardless of this query parameter. 16 | * @see {@link https://github.com/discord/discord-api-docs/pull/7424} 17 | */ 18 | with_expiration?: boolean; 19 | /** 20 | * The guild scheduled event to include with the invite 21 | */ 22 | guild_scheduled_event_id?: Snowflake; 23 | } 24 | 25 | export type RESTGetAPIInviteResult = APIInvite; 26 | 27 | /** 28 | * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite} 29 | */ 30 | export type RESTDeleteAPIInviteResult = APIInvite; 31 | -------------------------------------------------------------------------------- /rpc/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended API version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10'; 5 | -------------------------------------------------------------------------------- /rpc/v8.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../globals'; 2 | import type { APIMessage, APIUser } from '../v8'; 3 | import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common'; 4 | 5 | export * from './common'; 6 | 7 | /** 8 | * @unstable 9 | */ 10 | export interface Relationship { 11 | /** 12 | * The id of the user 13 | */ 14 | id: Snowflake; 15 | /** 16 | * Relationship type 17 | */ 18 | type: RelationshipType; 19 | /** 20 | * User 21 | */ 22 | user: APIUser; 23 | } 24 | 25 | /** 26 | * @unstable 27 | */ 28 | export interface RPCAPIMessage extends Omit { 29 | /** 30 | * The nickname of the user who sent the message 31 | */ 32 | nick?: string; 33 | /** 34 | * The color of the author's name 35 | */ 36 | author_color?: number; 37 | /** 38 | * The content of the message parsed into an array 39 | */ 40 | content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; 41 | } -------------------------------------------------------------------------------- /rpc/v9.ts: -------------------------------------------------------------------------------- 1 | import type { Snowflake } from '../globals'; 2 | import type { APIBaseMessageNoChannel, APIMessageMentions, APIUser } from '../v9'; 3 | import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common'; 4 | 5 | export * from './common'; 6 | 7 | /** 8 | * @unstable 9 | */ 10 | export interface Relationship { 11 | /** 12 | * The id of the user 13 | */ 14 | id: Snowflake; 15 | /** 16 | * Relationship type 17 | */ 18 | type: RelationshipType; 19 | /** 20 | * User 21 | */ 22 | user: APIUser; 23 | } 24 | 25 | /** 26 | * @unstable 27 | */ 28 | export interface RPCAPIMessage extends APIBaseMessageNoChannel, APIMessageMentions { 29 | /** 30 | * The nickname of the user who sent the message 31 | */ 32 | nick?: string; 33 | /** 34 | * The color of the author's name 35 | */ 36 | author_color?: number; 37 | /** 38 | * The content of the message parsed into an array 39 | */ 40 | content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[]; 41 | } 42 | -------------------------------------------------------------------------------- /scripts/actions/documentation/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "private": true, 4 | "devDependencies": { 5 | "@actions/core": "^1.11.1", 6 | "@actions/glob": "^0.5.0", 7 | "@aws-sdk/client-s3": "^3.808.0", 8 | "cloudflare": "^4.2.0", 9 | "p-limit": "^6.2.0", 10 | "p-queue": "^8.1.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /scripts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "target": "ESNext", 5 | "module": "NodeNext", 6 | "moduleResolution": "NodeNext", 7 | "allowSyntheticDefaultImports": true, 8 | "checkJs": true 9 | }, 10 | "include": ["./**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /scripts/versions.mjs: -------------------------------------------------------------------------------- 1 | import { exec } from 'node:child_process'; 2 | import { dirname, join } from 'node:path'; 3 | import { fileURLToPath } from 'node:url'; 4 | import { promisify } from 'node:util'; 5 | 6 | const __filename = fileURLToPath(import.meta.url); 7 | const __dirname = dirname(__filename); 8 | const rootDir = join(__dirname, '..'); 9 | const execAsync = promisify(exec); 10 | 11 | /** 12 | * @param {string} path 13 | * @param {string} version 14 | */ 15 | const fileToESMWrapperCall = async (path, version) => 16 | execAsync( 17 | `npx gen-esm-wrapper "${join(rootDir, path, `${version}.js`)}" "${join(rootDir, path, `${version}.mjs`)}"`, 18 | ); 19 | 20 | await Promise.allSettled( 21 | [ 22 | 'v6', // 23 | 'v8', 24 | 'v9', 25 | 'v10', 26 | 27 | // Voice 28 | 'v4', 29 | ].flatMap((version) => [ 30 | fileToESMWrapperCall('gateway', version), 31 | fileToESMWrapperCall(`payloads/${version}`, 'index'), 32 | fileToESMWrapperCall(`rest/${version}`, 'index'), 33 | 34 | // Voice 35 | fileToESMWrapperCall('voice', version), 36 | 37 | // RPC 38 | fileToESMWrapperCall('rpc', version), 39 | 40 | // Utils 41 | fileToESMWrapperCall('utils', version), 42 | 43 | // Shortcuts 44 | fileToESMWrapperCall('', version), 45 | ]), 46 | ); 47 | -------------------------------------------------------------------------------- /tests/__utils__/type-assertions.ts: -------------------------------------------------------------------------------- 1 | export declare function expectAssignable(input: T): void; 2 | 3 | // TODO: no clue if this is correct 4 | export declare function expectNotAssignable( 5 | input: Actual extends Expected ? never : Expected, 6 | ): void; 7 | -------------------------------------------------------------------------------- /tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../tsconfig.json"], 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "noUnusedLocals": false 6 | }, 7 | "include": ["./**/*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /tests/v10/messageCreate.ts: -------------------------------------------------------------------------------- 1 | import type { GatewayMessageCreateDispatch } from '../../v10'; 2 | 3 | declare const messageCreateDispatch: GatewayMessageCreateDispatch; 4 | 5 | // @ts-expect-error - missing user 6 | const _ = messageCreateDispatch.d.member?.user; 7 | -------------------------------------------------------------------------------- /tests/v10/onboarding.ts: -------------------------------------------------------------------------------- 1 | import type { APIGuildOnboarding, RESTPutAPIGuildOnboardingJSONBody } from '../../v10'; 2 | import { expectAssignable } from '../__utils__/type-assertions'; 3 | 4 | declare const onboarding: APIGuildOnboarding; 5 | 6 | expectAssignable({}); 7 | expectAssignable(onboarding); 8 | expectAssignable({ 9 | default_channel_ids: ['123456789012345678'], 10 | prompts: [ 11 | { 12 | id: '123456789012345678', 13 | title: 'This is a title', 14 | options: [ 15 | { 16 | title: 'yeet', 17 | emoji_name: '😎', 18 | role_ids: undefined, 19 | }, 20 | { 21 | id: '123456789012345678', 22 | title: 'yeet with id', 23 | emoji_id: '123456789012345678', 24 | }, 25 | ], 26 | in_onboarding: undefined, 27 | }, 28 | ], 29 | enabled: undefined, 30 | }); 31 | -------------------------------------------------------------------------------- /tests/v10/routes-escaping.ts: -------------------------------------------------------------------------------- 1 | import { strictEqual } from 'node:assert'; 2 | import { Routes } from '../../v10'; 3 | 4 | const channelId = '1320466398597615666'; 5 | const messageId = '1320622300642545705'; 6 | 7 | const expected = `/channels/${channelId}/messages/${messageId}/reactions/%F0%9F%95%99/@me`; 8 | 9 | // Run multiple times to ensure that the validation isn't intermittent 10 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, '%F0%9F%95%99'), expected); 11 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, '%F0%9F%95%99'), expected); 12 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, '%F0%9F%95%99'), expected); 13 | 14 | // make sure that the emoji is properly encoded 15 | const emoji = '🕙'; 16 | 17 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, emoji), expected); 18 | 19 | // test custom emojis too 20 | const animated = '1_:1234567890'; 21 | const encodedExpected = '1_%3A1234567890'; 22 | 23 | const expected2 = `/channels/${channelId}/messages/${messageId}/reactions/${encodedExpected}/@me`; 24 | 25 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, animated), expected2); 26 | strictEqual(Routes.channelMessageOwnReaction(channelId, messageId, encodedExpected), expected2); 27 | -------------------------------------------------------------------------------- /tests/v10/routes.ts: -------------------------------------------------------------------------------- 1 | import { CDNRoutes, Routes } from '../../rest/v10/index'; 2 | import { expectAssignable } from '../__utils__/type-assertions'; 3 | 4 | expectAssignable `/${string}`>>(Routes); 5 | expectAssignable `/${string}`>>(CDNRoutes); 6 | -------------------------------------------------------------------------------- /tests/v9/routes.ts: -------------------------------------------------------------------------------- 1 | import { CDNRoutes, Routes } from '../../rest/v9/index'; 2 | import { expectAssignable } from '../__utils__/type-assertions'; 3 | 4 | expectAssignable `/${string}`>>(Routes); 5 | expectAssignable `/${string}`>>(CDNRoutes); 6 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true 5 | }, 6 | "include": [ 7 | "globals.ts", 8 | "v6.ts", 9 | "v8.ts", 10 | "v9.ts", 11 | "v10.ts", 12 | "gateway/**/*.ts", 13 | "payloads/**/*.ts", 14 | "rest/**/*.ts", 15 | "rpc/**/*.ts", 16 | "utils/**/*.ts", 17 | "voice/**/*.ts", 18 | "scripts", 19 | "deno", 20 | "tests/**/*.ts", 21 | "website", 22 | "eslint.config.ts" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | "alwaysStrict": true, 5 | "lib": ["esnext"], 6 | "module": "commonjs", 7 | "noUnusedParameters": true, 8 | "sourceMap": true, 9 | "declaration": true, 10 | "declarationMap": true, 11 | "noUnusedLocals": true, 12 | "removeComments": false, 13 | "target": "ES2020", 14 | "strictNullChecks": true, 15 | "preserveConstEnums": true, 16 | "exactOptionalPropertyTypes": true, 17 | "skipLibCheck": true 18 | }, 19 | "include": [ 20 | "globals.ts", 21 | "v6.ts", 22 | "v8.ts", 23 | "v9.ts", 24 | "v10.ts", 25 | "gateway/**/*.ts", 26 | "payloads/**/*.ts", 27 | "rest/**/*.ts", 28 | "rpc/**/*.ts", 29 | "utils/**/*.ts", 30 | "voice/**/*.ts" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /utils/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the utility functions available in the recommended API / Gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v10'; 5 | -------------------------------------------------------------------------------- /v10.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v10'; 2 | export * from './globals'; 3 | export * from './payloads/v10/index'; 4 | export * from './rest/v10/index'; 5 | export * from './rpc/v10'; 6 | export * from './utils/internals'; 7 | export * as Utils from './utils/v10'; 8 | -------------------------------------------------------------------------------- /v6.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v6'; 2 | export * from './globals'; 3 | export * from './payloads/v6/index'; 4 | export * from './rest/v6/index'; 5 | -------------------------------------------------------------------------------- /v8.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v8'; 2 | export * from './globals'; 3 | export * from './payloads/v8/index'; 4 | export * from './rest/v8/index'; 5 | export * from './rpc/v8'; 6 | export * as Utils from './utils/v8'; 7 | -------------------------------------------------------------------------------- /v9.ts: -------------------------------------------------------------------------------- 1 | export * from './gateway/v9'; 2 | export * from './globals'; 3 | export * from './payloads/v9/index'; 4 | export * from './rest/v9/index'; 5 | export * from './rpc/v9'; 6 | export * from './utils/internals'; 7 | export * as Utils from './utils/v9'; 8 | -------------------------------------------------------------------------------- /voice/index.ts: -------------------------------------------------------------------------------- 1 | // This file exports all the types available in the recommended voice gateway version 2 | // Thereby, things MAY break in the future. Try sticking to imports from a specific version 3 | 4 | export * from './v8'; 5 | -------------------------------------------------------------------------------- /website/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.{js,mjs,ts}] 10 | indent_size = 4 11 | indent_style = tab 12 | block_comment_start = /* 13 | block_comment = * 14 | block_comment_end = */ 15 | 16 | [*.{yml,yaml}] 17 | indent_size = 2 18 | indent_style = space 19 | 20 | [*.{md,rmd,mkd,mkdn,mdwn,mdown,markdown,litcoffee}] 21 | tab_width = 4 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /website/.eslintignore: -------------------------------------------------------------------------------- 1 | # Node modules 2 | node_modules/ 3 | 4 | # Submodules 5 | projects/ 6 | 7 | # Generated data 8 | docs/Documentation/ 9 | .docusaurus/ 10 | 11 | src/index.d.ts 12 | 13 | docs/Guide/code/ -------------------------------------------------------------------------------- /website/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["neon/common", "neon/node", "neon/typescript", "neon/react", "neon/jsx", "neon/jsx-a11y", "neon/prettier"], 4 | "parserOptions": { 5 | "ecmaVersion": 2022, 6 | "sourceType": "module", 7 | "ecmaFeatures": { 8 | "jsx": true 9 | }, 10 | "jsx": true, 11 | "project": "./tsconfig.eslint.json" 12 | }, 13 | "settings": { 14 | "react": { 15 | "version": "detect" 16 | } 17 | }, 18 | "overrides": [ 19 | { 20 | "files": ["docusaurus.config.js", "babel.config.js", "sidebars.js"], 21 | "rules": { 22 | "@typescript-eslint/ban-ts-comment": "off", 23 | "@typescript-eslint/no-require-imports": "off", 24 | "@typescript-eslint/no-var-requires": "off" 25 | } 26 | } 27 | ], 28 | "rules": { 29 | "@typescript-eslint/consistent-type-definitions": ["error", "interface"], 30 | "import/extensions": "off", 31 | "no-restricted-globals": "off", 32 | "tsdoc/syntax": "off", 33 | "@typescript-eslint/unbound-method": "off", 34 | "import/order": "off" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules/ 3 | .pnp/ 4 | 5 | # Yarn files 6 | .yarn/install-state.gz 7 | .yarn/build-state.yml 8 | 9 | # Production 10 | build/ 11 | 12 | # Generated Files 13 | .docusaurus/ 14 | .cache-loader/ 15 | docs/Documentation/ 16 | tsconfig.tsbuildinfo 17 | 18 | # misc 19 | .DS_Store 20 | Thumbs.db 21 | 22 | # Local env vars 23 | .env 24 | 25 | # IDE Settings 26 | .idea/ 27 | .vs/ 28 | 29 | # Log files 30 | npm-debug.log* 31 | yarn-debug.log* 32 | yarn-error.log* 33 | *.log 34 | -------------------------------------------------------------------------------- /website/.markdownlint-cli2.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "default": false, 4 | "MD001": true, 5 | "MD003": true, 6 | "MD009": true, 7 | "MD011": true, 8 | "MD012": true, 9 | "MD013": { 10 | "line_length": 120 11 | } 12 | }, 13 | "globs": ["docs/**/*.{md,mdx}"] 14 | } 15 | -------------------------------------------------------------------------------- /website/.npmrc: -------------------------------------------------------------------------------- 1 | # REMOVE ME ONCE NEXT BETA OF DOCUSAURUS IS OUT 2 | force=true 3 | -------------------------------------------------------------------------------- /website/.prettierignore: -------------------------------------------------------------------------------- 1 | # Node modules 2 | node_modules/ 3 | 4 | # Generated data 5 | .docusaurus/ 6 | 7 | # Versioned json 8 | versioned_sidebars/ 9 | versioned_docs/ 10 | versions.json 11 | -------------------------------------------------------------------------------- /website/.prettierrc.mjs: -------------------------------------------------------------------------------- 1 | import sapphirePrettierConfig from '@sapphire/prettier-config'; 2 | 3 | export default { 4 | ...sapphirePrettierConfig, 5 | overrides: [ 6 | ...sapphirePrettierConfig.overrides, 7 | { 8 | files: ['README.md', 'docs/**/*.mdx', 'docs/**/*.md'], 9 | options: { 10 | tabWidth: 2, 11 | useTabs: false, 12 | printWidth: 120, 13 | proseWrap: 'always' 14 | } 15 | } 16 | ] 17 | }; 18 | -------------------------------------------------------------------------------- /website/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "bierner.github-markdown-preview", 4 | "christian-kohler.path-intellisense", 5 | "davidanson.vscode-markdownlint", 6 | "dbaeumer.vscode-eslint", 7 | "esbenp.prettier-vscode", 8 | "mdickin.markdown-shortcuts", 9 | "silvenon.mdx", 10 | "streetsidesoftware.code-spell-checker", 11 | "usernamehw.errorlens" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /website/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.detectIndentation": true, 3 | "files.eol": "\n", 4 | "files.associations": { 5 | "*.mdx": "markdown" 6 | }, 7 | "cSpell.language": "en-US", 8 | "cSpell.maxNumberOfProblems": 8, 9 | "cSpell.numSuggestions": 24, 10 | "search.exclude": { 11 | "**/.docusaurus/": true, 12 | "**/.git/": true, 13 | "**/.yarn": true, 14 | "**/*.code-search": true, 15 | "**/bower_components": true, 16 | "**/node_modules": true, 17 | "**/projects/": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /website/LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright © `2020` `The Sapphire Community and its contributors` 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the “Software”), to deal in the Software without 8 | restriction, including without limitation the rights to use, 9 | copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following 12 | conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Discord API Types Website 4 | 5 | **Source code for the Discord API Types website.** 6 | 7 | _Code is forked from the Sapphire Community's Website under the MIT license_ 8 | 9 | [![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/website/LICENSE.md) 10 | 11 |
12 | 13 | ## Running locally 14 | 15 | After forking/cloning this repo to a folder locally: 16 | 17 | 1. Install dependencies with `npm ci`. 18 | 2. Run `npm run start` to start the dev server 19 | 20 | ## Special thanks 21 | 22 | This project is being hosted by the amazing team at [Vercel]. We use their service to ensure you always get the latest 23 | version of the documentation, as well as being able to preview builds internally. Thank you [Vercel]! 24 | 25 | [![Vercel](./static/powered-by-vercel.svg)][vercel] 26 | 27 | [vercel]: https://vercel.com?utm_source=discordjs&utm_campaign=oss 28 | -------------------------------------------------------------------------------- /website/THIRD_PARTY_LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Facebook, Inc. and its affiliates. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')] 3 | }; 4 | -------------------------------------------------------------------------------- /website/docs/images/deno_types_out_of_sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/docs/images/deno_types_out_of_sync.png -------------------------------------------------------------------------------- /website/scripts/clean.mjs: -------------------------------------------------------------------------------- 1 | import { rm } from 'node:fs/promises'; 2 | 3 | const rootDir = new URL('../', import.meta.url); 4 | const documentationDir = new URL('docs/Documentation/', rootDir); 5 | const docusaurusOutputDir = new URL('.docusaurus/', rootDir); 6 | const nodeModulesCacheDir = new URL('node_modules/.cache/', rootDir); 7 | const buildDir = new URL('build/', rootDir); 8 | 9 | /** @type {import('node:fs').RmOptions} */ 10 | const rmOptions = { recursive: true, force: true }; 11 | 12 | await Promise.all([ 13 | rm(docusaurusOutputDir, rmOptions), // 14 | rm(documentationDir, rmOptions), 15 | rm(nodeModulesCacheDir, rmOptions), 16 | rm(buildDir, rmOptions) 17 | ]); 18 | -------------------------------------------------------------------------------- /website/sidebars.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | sidebar: [ 3 | { 4 | type: 'autogenerated', 5 | dirName: '.' 6 | } 7 | ] 8 | }; 9 | -------------------------------------------------------------------------------- /website/src/components/Common/LoadingSkeleton.module.css: -------------------------------------------------------------------------------- 1 | .loadingSkeleton { 2 | width: 315px; 3 | height: 210px; 4 | cursor: progress; 5 | animation: loading 1.5s infinite; 6 | } 7 | 8 | .lightLoadingSkeleton { 9 | background: 10 | linear-gradient(0.25turn, transparent, #fff, transparent), linear-gradient(#eee, #eee), linear-gradient(#eee, #eee), 11 | linear-gradient(#eee, #eee), linear-gradient(#eee, #eee), linear-gradient(#eee, #eee); 12 | background-repeat: no-repeat; 13 | background-size: 14 | 315px 210px, 15 | 315px 30px, 16 | 315px 30px, 17 | 315px 30px, 18 | 315px 30px, 19 | 315px 30px; 20 | background-position: 21 | -315px 0, 22 | 0 0, 23 | 0 45px, 24 | 0 90px, 25 | 0 135px, 26 | 0 180px; 27 | } 28 | 29 | .darkLoadingSkeleton { 30 | background: 31 | linear-gradient(0.25turn, transparent, #444, transparent), linear-gradient(#333, #333), linear-gradient(#333, #333), 32 | linear-gradient(#333, #333), linear-gradient(#333, #333), linear-gradient(#333, #333); 33 | background-repeat: no-repeat; 34 | background-size: 35 | 315px 210px, 36 | 315px 30px, 37 | 315px 30px, 38 | 315px 30px, 39 | 315px 30px, 40 | 315px 30px; 41 | background-position: 42 | -315px 0, 43 | 0 0, 44 | 0 45px, 45 | 0 90px, 46 | 0 135px, 47 | 0 180px; 48 | } 49 | 50 | @keyframes loading { 51 | to { 52 | background-position: 53 | 315px 0, 54 | 0 0, 55 | 0 45px, 56 | 0 90px, 57 | 0 135px, 58 | 0 180px; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /website/src/components/Common/LoadingSkeleton.tsx: -------------------------------------------------------------------------------- 1 | import { useColorMode } from '@docusaurus/theme-common'; 2 | import clsx from 'clsx'; 3 | import type { CSSProperties, FC } from 'react'; 4 | import React, { memo } from 'react'; 5 | import styles from './LoadingSkeleton.module.css'; 6 | 7 | const LoadingSkeleton: FC = (props) => { 8 | const { colorMode } = useColorMode(); 9 | 10 | return ( 11 |
18 | ); 19 | }; 20 | 21 | export default memo(LoadingSkeleton); 22 | -------------------------------------------------------------------------------- /website/src/components/Docs/Link.module.css: -------------------------------------------------------------------------------- 1 | .linkIcon { 2 | height: 15px; 3 | margin-left: 2px; 4 | margin-right: 8px; 5 | } 6 | 7 | .linkIconNoMarginRight { 8 | margin-right: unset; 9 | } 10 | 11 | .link { 12 | display: flex; 13 | align-items: center; 14 | } 15 | 16 | .block { 17 | display: block; 18 | } 19 | -------------------------------------------------------------------------------- /website/src/components/Docs/OptionalPackageLink.tsx: -------------------------------------------------------------------------------- 1 | import { ExternalLinkIcon } from '@heroicons/react/outline'; 2 | import type { FC, ReactNode } from 'react'; 3 | import React from 'react'; 4 | import styles from './Link.module.css'; 5 | 6 | interface Props { 7 | description: ReactNode; 8 | href: string; 9 | linkName: string; 10 | } 11 | 12 | const OptionalPackageLink: FC = ({ description, href, linkName }) => ( 13 | 14 | 15 | {linkName} 16 | 17 | 18 | {description} 19 | 20 | ); 21 | 22 | export default OptionalPackageLink; 23 | -------------------------------------------------------------------------------- /website/src/components/Docs/RawContentCodeTabs.tsx: -------------------------------------------------------------------------------- 1 | import CodeBlock from '@theme/CodeBlock'; 2 | import TabItem from '@theme/TabItem'; 3 | import Tabs from '@theme/Tabs'; 4 | import type { FC } from 'react'; 5 | import React from 'react'; 6 | 7 | interface CodeblockProps { 8 | readonly content: string; 9 | readonly title?: string; 10 | } 11 | 12 | interface Props { 13 | readonly esmCodeblockProps: CodeblockProps; 14 | readonly jsCodeblockProps: CodeblockProps; 15 | readonly tsCodeblockProps: CodeblockProps; 16 | } 17 | 18 | const RawContentCodeTabs: FC = ({ esmCodeblockProps, jsCodeblockProps, tsCodeblockProps }) => ( 19 | 20 | 21 | {jsCodeblockProps.content} 22 | 23 | 24 | {esmCodeblockProps.content} 25 | 26 | 27 | {tsCodeblockProps.content} 28 | 29 | 30 | ); 31 | 32 | export default RawContentCodeTabs; 33 | -------------------------------------------------------------------------------- /website/src/components/Docs/SimpleLink.tsx: -------------------------------------------------------------------------------- 1 | import { ExternalLinkIcon } from '@heroicons/react/outline'; 2 | import clsx from 'clsx'; 3 | import type { FC } from 'react'; 4 | import React from 'react'; 5 | import styles from './Link.module.css'; 6 | 7 | interface Props { 8 | href: string; 9 | linkName: string; 10 | noRightMargin: boolean; 11 | } 12 | 13 | const SimpleLink: FC = ({ href, linkName, noRightMargin = false }) => ( 14 | 15 | {linkName} 16 | 17 | 18 | ); 19 | 20 | export default SimpleLink; 21 | -------------------------------------------------------------------------------- /website/src/components/Home/Features/Feature.module.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width: 1024px) { 2 | .feature { 3 | margin-bottom: 2rem; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /website/src/components/Home/Features/Feature.tsx: -------------------------------------------------------------------------------- 1 | import clsx from 'clsx'; 2 | import type { FC } from 'react'; 3 | import React, { memo } from 'react'; 4 | import styles from './Feature.module.css'; 5 | import type { FeatureItem } from './Types'; 6 | 7 | const Feature: FC = ({ title, description }) => ( 8 |
9 |
10 |

{title}

11 |
{description}
12 |
13 |
14 | ); 15 | 16 | export default memo(Feature); 17 | -------------------------------------------------------------------------------- /website/src/components/Home/Features/Statistics.module.css: -------------------------------------------------------------------------------- 1 | .stars { 2 | list-style-type: '✨ '; 3 | } 4 | 5 | .forks { 6 | list-style-type: '🤖 '; 7 | } 8 | 9 | .contributors { 10 | list-style-type: '👥 '; 11 | } 12 | 13 | .downloads { 14 | list-style-type: '📥 '; 15 | } 16 | -------------------------------------------------------------------------------- /website/src/components/Home/Features/StatisticsFeature.tsx: -------------------------------------------------------------------------------- 1 | import BrowserOnly from '@docusaurus/BrowserOnly'; 2 | import clsx from 'clsx'; 3 | import type { FC } from 'react'; 4 | import React, { memo, Suspense } from 'react'; 5 | import LoadingSkeleton from '../../Common/LoadingSkeleton'; 6 | import Statistics from './Statistics'; 7 | 8 | const StatisticsFeature: FC = () => ( 9 |
10 |
11 |

Statistics

12 |
13 | }> 14 | {() => ( 15 | }> 16 | 17 | 18 | )} 19 | 20 |
21 |
22 |
23 | ); 24 | 25 | export default memo(StatisticsFeature); 26 | -------------------------------------------------------------------------------- /website/src/components/Home/Features/Types.d.ts: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | 3 | export interface FeatureItem { 4 | description: ReactNode; 5 | title: string; 6 | } 7 | 8 | export interface NpmData { 9 | downloads: { 10 | day: string; 11 | downloads: number; 12 | }[]; 13 | end: string; 14 | package: string; 15 | start: string; 16 | } 17 | 18 | export interface RepoData { 19 | forks_count: number; 20 | stargazers_count: number; 21 | } 22 | 23 | export interface ContributorsData { 24 | avatar_url: string; 25 | contributions: number; 26 | events_url: string; 27 | followers_url: string; 28 | following_url: string; 29 | gists_url: string; 30 | gravatar_id: string; 31 | html_url: string; 32 | id: number; 33 | login: string; 34 | node_id: string; 35 | organizations_url: string; 36 | received_events_url: string; 37 | repos_url: string; 38 | site_admin: false; 39 | starred_url: string; 40 | subscriptions_url: string; 41 | type: string; 42 | url: string; 43 | } 44 | -------------------------------------------------------------------------------- /website/src/components/Home/HomePageHeader.module.css: -------------------------------------------------------------------------------- 1 | .heroBanner { 2 | padding: 4rem 0; 3 | text-align: center; 4 | position: relative; 5 | overflow: hidden; 6 | } 7 | 8 | @media screen and (max-width: 966px) { 9 | .heroBanner { 10 | padding: 2rem; 11 | } 12 | } 13 | 14 | .logo { 15 | margin-bottom: 2rem; 16 | max-height: 12rem; 17 | } 18 | 19 | .fontSemiTitle { 20 | font-size: 2.5rem; 21 | } 22 | 23 | @media screen and (max-width: 966px) { 24 | .fontSemiTitle { 25 | font-size: 1.5rem; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /website/src/components/Home/HomePageHeader.tsx: -------------------------------------------------------------------------------- 1 | import clsx from 'clsx'; 2 | import type { FC } from 'react'; 3 | import React, { memo } from 'react'; 4 | import styles from './HomePageHeader.module.css'; 5 | import InstallTabs from './InstallButton/InstallTabs'; 6 | 7 | const HomePageHeader: FC = () => ( 8 |
9 |
10 | Discord API Types Logo 11 |

In-depth typings you can use when working with Discord's API

12 | 13 |
14 |
15 | ); 16 | 17 | export default memo(HomePageHeader); 18 | -------------------------------------------------------------------------------- /website/src/components/Home/HomepageFeatures.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | -------------------------------------------------------------------------------- /website/src/components/Home/InstallButton/InstallTabButton.module.css: -------------------------------------------------------------------------------- 1 | .button { 2 | box-shadow: var(--discord_api_types-paper-drop-shadow-4); 3 | } 4 | 5 | @media screen and (max-width: 966px) { 6 | .button { 7 | --ifm-button-size-multiplier: 1.25; 8 | } 9 | } 10 | 11 | .buttonContent { 12 | display: flex; 13 | align-items: center; 14 | } 15 | 16 | .copyIcon { 17 | height: 20px; 18 | margin-left: 8px; 19 | } 20 | 21 | .colorGreen { 22 | color: #3ba55c; 23 | } 24 | 25 | html[data-theme='dark'] .button { 26 | background-color: #23272a; 27 | border-color: #23272a; 28 | } 29 | 30 | html[data-theme='dark'] .button:hover { 31 | background-color: #4f545c29; 32 | } 33 | 34 | html[data-theme='dark'] .buttonContent { 35 | color: #b9bbbe; 36 | } 37 | -------------------------------------------------------------------------------- /website/src/components/Home/InstallButton/InstallTabButton.tsx: -------------------------------------------------------------------------------- 1 | import { ClipboardIcon } from '@heroicons/react/24/outline'; 2 | import Tippy from '@tippyjs/react'; 3 | import clsx from 'clsx'; 4 | import type { FC } from 'react'; 5 | import React, { useState } from 'react'; 6 | import styles from './InstallTabButton.module.css'; 7 | 8 | interface Props { 9 | handleClickInstallButton(): void; 10 | readonly installCommand: string; 11 | } 12 | 13 | const InstallTabButton: FC = ({ installCommand, handleClickInstallButton }) => { 14 | const [showTippy, setShowTippy] = useState(false); 15 | 16 | const toggleTippy = () => { 17 | setShowTippy(true); 18 | 19 | setTimeout(() => { 20 | setShowTippy(false); 21 | }, 1_000); 22 | }; 23 | 24 | return ( 25 | 26 | 39 | 40 | ); 41 | }; 42 | 43 | export default InstallTabButton; 44 | -------------------------------------------------------------------------------- /website/src/components/Home/InstallButton/InstallTabs.module.css: -------------------------------------------------------------------------------- 1 | .buttons { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | } 6 | 7 | .tabs { 8 | justify-content: center; 9 | } 10 | -------------------------------------------------------------------------------- /website/src/css/font.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap'); 2 | -------------------------------------------------------------------------------- /website/src/css/tippy-discord.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-theme~='discord'] { 2 | color: rgba(229, 231, 235, 1); 3 | padding-left: 0.5rem; 4 | padding-right: 0.5rem; 5 | padding-top: 0.25rem; 6 | padding-bottom: 0.25rem; 7 | border-radius: 0.25rem; 8 | background-color: #3ba55c; 9 | } 10 | 11 | .tippy-box[data-theme~='discord'] > .tippy-content { 12 | font-weight: 600; 13 | } 14 | 15 | .tippy-box[data-theme~='discord'][data-placement^='top'] > .tippy-arrow::before { 16 | border-top-color: rgba(59, 165, 92, 1); 17 | } 18 | 19 | .tippy-box[data-theme~='discord'][data-placement^='bottom'] > .tippy-arrow::before { 20 | border-top-color: rgba(59, 165, 92, 1); 21 | } 22 | 23 | .tippy-box[data-theme~='discord'][data-placement^='left'] > .tippy-arrow::before { 24 | border-top-color: rgba(59, 165, 92, 1); 25 | } 26 | 27 | .tippy-box[data-theme~='discord'][data-placement^='right'] > .tippy-arrow::before { 28 | border-top-color: rgba(59, 165, 92, 1); 29 | } 30 | -------------------------------------------------------------------------------- /website/src/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /website/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 2 | import Layout from '@theme/Layout'; 3 | import React from 'react'; 4 | import { SWRConfig } from 'swr'; 5 | import HeadTags from '../components/Home/HeadTags'; 6 | import HomePageHeader from '../components/Home/HomePageHeader'; 7 | import HomePageFeatures from '../components/Home/HomepageFeatures'; 8 | 9 | export default function Home(): JSX.Element { 10 | const { siteConfig } = useDocusaurusContext(); 11 | 12 | return ( 13 | <> 14 | 15 | 16 | fetch(resource, init).then(async (res) => res.json()) 20 | }} 21 | > 22 | 23 |
24 | 25 |
26 |
27 |
28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /website/src/utils/Intl.ts: -------------------------------------------------------------------------------- 1 | const IntlFormatter = new Intl.NumberFormat('en-US', { maximumFractionDigits: 2 }); 2 | 3 | export function formatNumber(number: number): string { 4 | return IntlFormatter.format(number); 5 | } 6 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /website/static/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-144x144.png -------------------------------------------------------------------------------- /website/static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /website/static/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-256x256.png -------------------------------------------------------------------------------- /website/static/android-chrome-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-36x36.png -------------------------------------------------------------------------------- /website/static/android-chrome-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-384x384.png -------------------------------------------------------------------------------- /website/static/android-chrome-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-48x48.png -------------------------------------------------------------------------------- /website/static/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-512x512.png -------------------------------------------------------------------------------- /website/static/android-chrome-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-72x72.png -------------------------------------------------------------------------------- /website/static/android-chrome-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/android-chrome-96x96.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-120x120-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-120x120-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-144x144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-144x144-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-152x152-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-152x152-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-180x180-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-180x180-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-60x60-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-60x60-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-76x76-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-76x76-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /website/static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/apple-touch-icon.png -------------------------------------------------------------------------------- /website/static/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | #2563eb 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /website/static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/favicon-16x16.png -------------------------------------------------------------------------------- /website/static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/favicon-32x32.png -------------------------------------------------------------------------------- /website/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/favicon.ico -------------------------------------------------------------------------------- /website/static/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/mstile-144x144.png -------------------------------------------------------------------------------- /website/static/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/mstile-150x150.png -------------------------------------------------------------------------------- /website/static/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/mstile-310x150.png -------------------------------------------------------------------------------- /website/static/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/mstile-310x310.png -------------------------------------------------------------------------------- /website/static/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/mstile-70x70.png -------------------------------------------------------------------------------- /website/static/opengraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/static/opengraph.png -------------------------------------------------------------------------------- /website/static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | Sitemap: https://discord-api-types.dev/sitemap.xml 3 | User-agent: * 4 | Disallow: 5 | -------------------------------------------------------------------------------- /website/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["./babel.config.js", "docs", "./docusaurus.config.ts", "projects", "scripts", "./sidebars.ts", "src/**/*.tsx", "static"] 4 | } 5 | -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@sapphire/ts-config"], 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "baseUrl": ".", 6 | "importsNotUsedAsValues": "remove", 7 | "jsx": "react", 8 | "lib": ["ESNext", "DOM"], 9 | "noEmit": true, 10 | "noImplicitAny": false, 11 | "paths": { "@site/*": ["./*"] }, 12 | "skipDefaultLibCheck": true, 13 | "skipLibCheck": true 14 | }, 15 | "include": ["src", "docs"], 16 | "exclude": ["docs/Documentation"] 17 | } 18 | -------------------------------------------------------------------------------- /website/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirects": [ 3 | { "source": "/discord", "destination": "https://discord.gg/djs", "permanent": true }, 4 | { "source": "/patreon", "destination": "https://www.patreon.com/vladfrangu", "permanent": true }, 5 | { "source": "/sponsor", "destination": "https://github.com/sponsors/vladfrangu", "permanent": true }, 6 | { "source": "/kofi", "destination": "https://ko-fi.com/wolfgalvlad", "permanent": true }, 7 | { "source": "/ghorg", "destination": "https://github.com/discordjs", "permanent": true } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-0.38.11/api-packages.json: -------------------------------------------------------------------------------- 1 | [{"entryPoints":{"v10":{"path":"v10.ts","label":"API v10"},"v9":{"path":"v9.ts","label":"API v9"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"voice/v8":{"path":"voice/v8.ts","label":"Voice v8"},"globals":{"path":"globals.ts","label":"Global Types"}},"packageRoot":"/home/runner/work/discord-api-types/discord-api-types/","packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.38.11"}] -------------------------------------------------------------------------------- /website/versioned_docs/version-0.38.11/images/deno_types_out_of_sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/discordjs/discord-api-types/c76dd317b4464d76a856c12e203832371a6d4e89/website/versioned_docs/version-0.38.11/images/deno_types_out_of_sync.png -------------------------------------------------------------------------------- /website/versioned_sidebars/version-0.38.11-sidebars.json: -------------------------------------------------------------------------------- 1 | { 2 | "sidebar": [ 3 | { 4 | "type": "autogenerated", 5 | "dirName": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /website/versions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "0.38.11" 3 | ] --------------------------------------------------------------------------------