mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-28 06:20:11 +00:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdec113cbf | ||
|
|
de72feaa35 | ||
|
|
aa6e72d34f | ||
|
|
2117f4926b | ||
|
|
f883770df6 | ||
|
|
117b63dcd0 | ||
|
|
5f25c39bc5 | ||
|
|
200f650539 | ||
|
|
2736687283 | ||
|
|
388faf3d33 | ||
|
|
20b7057c50 | ||
|
|
5c73edb70a | ||
|
|
2b5a2bc1e9 | ||
|
|
b89290fc95 | ||
|
|
bf4291bed8 | ||
|
|
4237b1a115 | ||
|
|
d47172c0c9 | ||
|
|
075ec3daf2 | ||
|
|
4e69666fe6 | ||
|
|
73760723b4 | ||
|
|
6fdf2c8a72 | ||
|
|
fb8972f52c | ||
|
|
fb0109e8e0 | ||
|
|
e37f802e39 | ||
|
|
ea2b922d12 | ||
|
|
be8b372663 | ||
|
|
c5c0312867 | ||
|
|
7d6a934f66 | ||
|
|
9347651bbe | ||
|
|
6e5563e2b7 | ||
|
|
8064df3722 | ||
|
|
eeb99a9ea0 | ||
|
|
63c9e4f72e | ||
|
|
4d73b0e509 | ||
|
|
a56c3c892e | ||
|
|
97b0580189 | ||
|
|
62e5b4a95c | ||
|
|
c96926b6a2 | ||
|
|
790b4deb0f | ||
|
|
51b2d4e1c9 | ||
|
|
687f474d4e | ||
|
|
ff892fa66e | ||
|
|
84f312db2a | ||
|
|
9665e02367 | ||
|
|
71a0b8d211 | ||
|
|
00c46946a0 |
17
.github/CODEOWNERS
vendored
17
.github/CODEOWNERS
vendored
@@ -1,10 +1,11 @@
|
||||
* @vladfrangu
|
||||
|
||||
/*.ts @discordjs/discord-api-types @discordjs/core
|
||||
gateway/ @discordjs/discord-api-types @discordjs/core
|
||||
payloads/ @discordjs/discord-api-types @discordjs/core
|
||||
rest/ @discordjs/discord-api-types @discordjs/core
|
||||
rpc/ @discordjs/discord-api-types @discordjs/core
|
||||
tests/ @discordjs/discord-api-types @discordjs/core
|
||||
utils/ @discordjs/discord-api-types @discordjs/core
|
||||
voice/ @discordjs/discord-api-types @discordjs/core
|
||||
/*.ts @discordjs/discord-api-types
|
||||
deno/ @discordjs/discord-api-types
|
||||
gateway/ @discordjs/discord-api-types
|
||||
payloads/ @discordjs/discord-api-types
|
||||
rest/ @discordjs/discord-api-types
|
||||
rpc/ @discordjs/discord-api-types
|
||||
tests/ @discordjs/discord-api-types
|
||||
utils/ @discordjs/discord-api-types
|
||||
voice/ @discordjs/discord-api-types
|
||||
|
||||
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@@ -1,12 +1,8 @@
|
||||
# discord-api-types Contributing Guide
|
||||
|
||||
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue, or on [GitHub Discussions](https://github.com/discordjs/discord-api-types/discussions) – you will get redirected there anyway.**
|
||||
|
||||
- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
- [Pull Request Guidelines](#pull-request-guidelines)
|
||||
- [Development Setup](#development-setup)
|
||||
- [Project Structure](#project-structure)
|
||||
- [Contributing Tests](#contributing-tests)
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
@@ -30,18 +26,18 @@
|
||||
|
||||
- Make sure tests pass!
|
||||
|
||||
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
- Commit messages must follow the [commit message convention](https://github.com/discordjs/discord-api-types/blob/main/.github/COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
|
||||
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
|
||||
## Development Setup
|
||||
|
||||
You will need [Node.js](http://nodejs.org) **version 12+**, and [npm](https://www.npmjs.com/).
|
||||
You will need an LTS version of [Node.js](http://nodejs.org) and [Yarn](https://yarnpkg.com).
|
||||
|
||||
After cloning the repo, run:
|
||||
|
||||
```bash
|
||||
$ npm i # install the dependencies of the project
|
||||
$ yarn install # Install the dependencies of the project
|
||||
```
|
||||
|
||||
A high level overview of tools used:
|
||||
|
||||
2
.github/workflows/cicd.yml
vendored
2
.github/workflows/cicd.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
4
.github/workflows/documentation.yml
vendored
4
.github/workflows/documentation.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
ref: ${{ inputs.ref || '' }}
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- uses: pnpm/action-setup@v4.1.0
|
||||
- uses: pnpm/action-setup@v4.2.0
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
52
.github/workflows/publish-next.yml
vendored
52
.github/workflows/publish-next.yml
vendored
@@ -1,52 +0,0 @@
|
||||
name: Publish next
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
concurrency:
|
||||
group: publish-next
|
||||
cancel-in-progress: true
|
||||
|
||||
name: Publish @next release to npm
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
if: github.repository_owner == 'discordjs' && !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)'))
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
|
||||
- name: Deprecate old @next versions
|
||||
run: yarn npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Publish new @next version
|
||||
run: |
|
||||
yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
|
||||
yarn npm publish --tag next
|
||||
env:
|
||||
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Create PR for new releases and publish new version
|
||||
name: Release flows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,6 +10,49 @@ on:
|
||||
- cron: '0 12 * * 1,4'
|
||||
|
||||
jobs:
|
||||
publish_next:
|
||||
concurrency:
|
||||
group: publish_next
|
||||
cancel-in-progress: true
|
||||
|
||||
name: Publish @next release to npm
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release)')
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
|
||||
# TODO: we need a scoped token for this -.-, can't OIDC tmk
|
||||
# - name: Deprecate old @next versions
|
||||
# run: yarn npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
|
||||
# env:
|
||||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Publish new @next version
|
||||
run: |
|
||||
yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
|
||||
yarn npm publish --tag next
|
||||
|
||||
create_pr:
|
||||
name: Create PR for new version
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,7 +65,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
@@ -78,7 +121,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
@@ -89,8 +132,6 @@ jobs:
|
||||
- name: Publish release to npm
|
||||
run: |
|
||||
yarn npm publish
|
||||
env:
|
||||
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Create GitHub release
|
||||
run: node ./scripts/actions/create-release.mjs
|
||||
2
.github/workflows/validate-pull-request.yml
vendored
2
.github/workflows/validate-pull-request.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@ enableGlobalCache: true
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.10.3.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.11.0.cjs
|
||||
|
||||
plugins:
|
||||
- path: ./.yarn/plugins/postinstallDev.cjs
|
||||
|
||||
73
CHANGELOG.md
73
CHANGELOG.md
@@ -1,3 +1,76 @@
|
||||
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
|
||||
|
||||
|
||||
|
||||
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
|
||||
|
||||
|
||||
|
||||
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
|
||||
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
|
||||
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
|
||||
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
|
||||
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
|
||||
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
|
||||
|
||||
|
||||
|
||||
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
|
||||
|
||||
|
||||
|
||||
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
|
||||
|
||||
|
||||
|
||||
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
|
||||
|
||||
|
||||
|
||||
73
deno/CHANGELOG.md
generated
73
deno/CHANGELOG.md
generated
@@ -1,3 +1,76 @@
|
||||
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
|
||||
|
||||
|
||||
|
||||
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
|
||||
|
||||
|
||||
|
||||
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
|
||||
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
|
||||
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
|
||||
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
|
||||
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
|
||||
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
|
||||
|
||||
|
||||
|
||||
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
|
||||
|
||||
|
||||
|
||||
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
|
||||
|
||||
|
||||
|
||||
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
|
||||
|
||||
|
||||
|
||||
4
deno/globals.ts
generated
4
deno/globals.ts
generated
@@ -76,8 +76,8 @@ export const FormattingPatterns = {
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
|
||||
// eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
|
||||
/**
|
||||
* Regular expression for matching strictly default styled timestamps
|
||||
*
|
||||
|
||||
6
deno/payloads/common.ts
generated
6
deno/payloads/common.ts
generated
@@ -294,6 +294,12 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Text
|
||||
*/
|
||||
PinMessages: 1n << 51n,
|
||||
/**
|
||||
* @unstable Allows for bypassing slowmode restrictions. Not (yet) documented.
|
||||
*
|
||||
* Applies to text-based and thread-based channel types.
|
||||
*/
|
||||
BypassSlowmode: 1n << 52n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
6
deno/payloads/v10/_interactions/modalSubmit.ts
generated
6
deno/payloads/v10/_interactions/modalSubmit.ts
generated
@@ -9,7 +9,6 @@ import type {
|
||||
import type { APIBaseComponent } from '../message.ts';
|
||||
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
type: T;
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
@@ -38,8 +37,13 @@ export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmit
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRoleSelectComponent
|
||||
| APIModalSubmitStringSelectComponent
|
||||
|
||||
21
deno/payloads/v10/auditLog.ts
generated
21
deno/payloads/v10/auditLog.ts
generated
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration.ts';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
12
deno/payloads/v10/channel.ts
generated
12
deno/payloads/v10/channel.ts
generated
@@ -110,7 +110,7 @@ export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The name of the channel (1-100 characters)
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
parent_id?: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends ChannelType>
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
@@ -271,6 +271,10 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags?: Snowflake[];
|
||||
/**
|
||||
* ID of the parent channel for the thread
|
||||
*/
|
||||
@@ -397,10 +401,6 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
|
||||
6
deno/payloads/v10/guild.ts
generated
6
deno/payloads/v10/guild.ts
generated
@@ -577,6 +577,12 @@ export enum GuildFeature {
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
38
deno/payloads/v10/message.ts
generated
38
deno/payloads/v10/message.ts
generated
@@ -1027,6 +1027,10 @@ export enum ComponentType {
|
||||
* Container associating a label and description with a component
|
||||
*/
|
||||
Label,
|
||||
/**
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1578,6 +1582,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
spoiler?: boolean;
|
||||
|
||||
/**
|
||||
* The name of the file. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1654,6 +1668,28 @@ export interface APILabelComponent extends APIBaseComponent<ComponentType.Label>
|
||||
component: APIComponentInLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#file-upload}
|
||||
*/
|
||||
export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.FileUpload> {
|
||||
/**
|
||||
* Id for the file upload; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Minimum number of items that must be uploaded (defaults to 1); min 0, max 10
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of items that can be uploaded (defaults to 1); max 10
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1734,7 +1770,7 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
24
deno/payloads/v10/webhook.ts
generated
24
deno/payloads/v10/webhook.ts
generated
@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
6
deno/payloads/v9/_interactions/modalSubmit.ts
generated
6
deno/payloads/v9/_interactions/modalSubmit.ts
generated
@@ -9,7 +9,6 @@ import type {
|
||||
import type { APIBaseComponent } from '../message.ts';
|
||||
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
type: T;
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
@@ -38,8 +37,13 @@ export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmit
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRoleSelectComponent
|
||||
| APIModalSubmitStringSelectComponent
|
||||
|
||||
21
deno/payloads/v9/auditLog.ts
generated
21
deno/payloads/v9/auditLog.ts
generated
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration.ts';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
12
deno/payloads/v9/channel.ts
generated
12
deno/payloads/v9/channel.ts
generated
@@ -110,7 +110,7 @@ export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The name of the channel (1-100 characters)
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
parent_id?: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends ChannelType>
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType = GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
@@ -271,6 +271,10 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags?: Snowflake[];
|
||||
/**
|
||||
* ID of the parent channel for the thread
|
||||
*/
|
||||
@@ -397,10 +401,6 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
|
||||
6
deno/payloads/v9/guild.ts
generated
6
deno/payloads/v9/guild.ts
generated
@@ -569,6 +569,12 @@ export enum GuildFeature {
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
38
deno/payloads/v9/message.ts
generated
38
deno/payloads/v9/message.ts
generated
@@ -1022,6 +1022,10 @@ export enum ComponentType {
|
||||
* Container associating a label and description with a component
|
||||
*/
|
||||
Label,
|
||||
/**
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1573,6 +1577,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
spoiler?: boolean;
|
||||
|
||||
/**
|
||||
* The name of the file. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1649,6 +1663,28 @@ export interface APILabelComponent extends APIBaseComponent<ComponentType.Label>
|
||||
component: APIComponentInLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#file-upload}
|
||||
*/
|
||||
export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.FileUpload> {
|
||||
/**
|
||||
* Id for the file upload; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Minimum number of items that must be uploaded (defaults to 1); min 0, max 10
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of items that can be uploaded (defaults to 1); max 10
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1729,7 +1765,7 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
24
deno/payloads/v9/webhook.ts
generated
24
deno/payloads/v9/webhook.ts
generated
@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
21
deno/rest/v10/guild.ts
generated
21
deno/rest/v10/guild.ts
generated
@@ -28,6 +28,7 @@ import type {
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -357,7 +358,7 @@ export type RESTDeleteAPIGuildResult = never;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
||||
*/
|
||||
export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
||||
@@ -541,6 +542,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
@@ -566,11 +574,9 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
|
||||
@@ -807,6 +813,11 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
|
||||
*/
|
||||
export type RESTDeleteAPIGuildRoleResult = never;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
|
||||
*/
|
||||
|
||||
10
deno/rest/v10/mod.ts
generated
10
deno/rest/v10/mod.ts
generated
@@ -380,6 +380,16 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/member-counts`
|
||||
*
|
||||
* @unstable
|
||||
*/
|
||||
guildRoleMemberCounts(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/roles/member-counts` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/prune`
|
||||
|
||||
16
deno/rest/v9/guild.ts
generated
16
deno/rest/v9/guild.ts
generated
@@ -28,6 +28,7 @@ import type {
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -357,7 +358,7 @@ export type RESTDeleteAPIGuildResult = never;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
||||
*/
|
||||
export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
||||
@@ -541,6 +542,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
@@ -566,11 +574,9 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
|
||||
|
||||
39
deno/utils/v10.ts
generated
39
deno/utils/v10.ts
generated
@@ -15,13 +15,14 @@ import type {
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
APIMessageComponentSelectMenuInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from '../payloads/v10/mod.ts';
|
||||
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v10/mod.ts';
|
||||
|
||||
// Interactions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
* A type guard check for DM interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
* A type guard check for guild interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
// ApplicationCommandInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
* A type guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
* A type guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
// MessageComponentInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
* A type guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
* A type guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
|
||||
// Buttons
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
* A type guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
* A type guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
|
||||
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
|
||||
}
|
||||
|
||||
// Modal
|
||||
|
||||
/**
|
||||
* A type guard check for modals submit interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a modal submission
|
||||
*/
|
||||
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
|
||||
return interaction.type === InteractionType.ModalSubmit;
|
||||
}
|
||||
|
||||
// Message Components
|
||||
|
||||
/**
|
||||
* A type-guard check for message component interactions
|
||||
* A type guard check for message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a message component
|
||||
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for button message component interactions
|
||||
* A type guard check for button message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a button
|
||||
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for select menu message component interactions
|
||||
* A type guard check for select menu message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a select menu
|
||||
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
|
||||
// Application Commands
|
||||
|
||||
/**
|
||||
* A type-guard check for chat input application commands.
|
||||
* A type guard check for chat input application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a chat input application command
|
||||
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for context menu application commands.
|
||||
* A type guard check for context menu application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a context menu application command
|
||||
|
||||
39
deno/utils/v9.ts
generated
39
deno/utils/v9.ts
generated
@@ -15,13 +15,14 @@ import type {
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
APIMessageComponentSelectMenuInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from '../payloads/v9/mod.ts';
|
||||
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v9/mod.ts';
|
||||
|
||||
// Interactions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
* A type guard check for DM interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
* A type guard check for guild interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
// ApplicationCommandInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
* A type guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
* A type guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
// MessageComponentInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
* A type guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
* A type guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
|
||||
// Buttons
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
* A type guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
* A type guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
|
||||
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
|
||||
}
|
||||
|
||||
// Modal
|
||||
|
||||
/**
|
||||
* A type guard check for modals submit interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a modal submission
|
||||
*/
|
||||
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
|
||||
return interaction.type === InteractionType.ModalSubmit;
|
||||
}
|
||||
|
||||
// Message Components
|
||||
|
||||
/**
|
||||
* A type-guard check for message component interactions
|
||||
* A type guard check for message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a message component
|
||||
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for button message component interactions
|
||||
* A type guard check for button message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a button
|
||||
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for select menu message component interactions
|
||||
* A type guard check for select menu message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a select menu
|
||||
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
|
||||
// Application Commands
|
||||
|
||||
/**
|
||||
* A type-guard check for chat input application commands.
|
||||
* A type guard check for chat input application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a chat input application command
|
||||
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for context menu application commands.
|
||||
* A type guard check for context menu application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a context menu application command
|
||||
|
||||
@@ -76,8 +76,8 @@ export const FormattingPatterns = {
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
|
||||
// eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
|
||||
/**
|
||||
* Regular expression for matching strictly default styled timestamps
|
||||
*
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.38.27",
|
||||
"version": "0.38.34",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"workspaces": [
|
||||
@@ -139,7 +139,7 @@
|
||||
"@octokit/webhooks-types": "^7.6.1",
|
||||
"@sapphire/prettier-config": "^2.0.0",
|
||||
"@types/lodash.merge": "^4",
|
||||
"@types/node": "^22.15.29",
|
||||
"@types/node": "^24.0.0",
|
||||
"@typescript-eslint/utils": "^8.33.0",
|
||||
"conventional-changelog": "^7.0.2",
|
||||
"conventional-changelog-angular": "^8.0.0",
|
||||
@@ -207,9 +207,9 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@4.10.3",
|
||||
"packageManager": "yarn@4.11.0",
|
||||
"volta": {
|
||||
"node": "24.9.0",
|
||||
"yarn": "4.10.3"
|
||||
"node": "24.11.1",
|
||||
"yarn": "4.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +294,12 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Text
|
||||
*/
|
||||
PinMessages: 1n << 51n,
|
||||
/**
|
||||
* @unstable Allows for bypassing slowmode restrictions. Not (yet) documented.
|
||||
*
|
||||
* Applies to text-based and thread-based channel types.
|
||||
*/
|
||||
BypassSlowmode: 1n << 52n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
import type { APIBaseComponent } from '../message';
|
||||
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
type: T;
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
@@ -38,8 +37,13 @@ export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmit
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRoleSelectComponent
|
||||
| APIModalSubmitStringSelectComponent
|
||||
|
||||
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@ export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The name of the channel (1-100 characters)
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
parent_id?: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends ChannelType>
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
@@ -271,6 +271,10 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags?: Snowflake[];
|
||||
/**
|
||||
* ID of the parent channel for the thread
|
||||
*/
|
||||
@@ -397,10 +401,6 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
|
||||
@@ -577,6 +577,12 @@ export enum GuildFeature {
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1027,6 +1027,10 @@ export enum ComponentType {
|
||||
* Container associating a label and description with a component
|
||||
*/
|
||||
Label,
|
||||
/**
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1578,6 +1582,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
spoiler?: boolean;
|
||||
|
||||
/**
|
||||
* The name of the file. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1654,6 +1668,28 @@ export interface APILabelComponent extends APIBaseComponent<ComponentType.Label>
|
||||
component: APIComponentInLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#file-upload}
|
||||
*/
|
||||
export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.FileUpload> {
|
||||
/**
|
||||
* Id for the file upload; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Minimum number of items that must be uploaded (defaults to 1); min 0, max 10
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of items that can be uploaded (defaults to 1); max 10
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1734,7 +1770,7 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
import type { APIBaseComponent } from '../message';
|
||||
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
type: T;
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
@@ -38,8 +37,13 @@ export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmit
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRoleSelectComponent
|
||||
| APIModalSubmitStringSelectComponent
|
||||
|
||||
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@ export interface APIPinChannel<T extends ChannelType> extends APIChannelBase<T>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The name of the channel (1-100 characters)
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
parent_id?: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends ChannelType>
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType = GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
@@ -271,6 +271,10 @@ export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannel
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags?: Snowflake[];
|
||||
/**
|
||||
* ID of the parent channel for the thread
|
||||
*/
|
||||
@@ -397,10 +401,6 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
|
||||
@@ -569,6 +569,12 @@ export enum GuildFeature {
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1022,6 +1022,10 @@ export enum ComponentType {
|
||||
* Container associating a label and description with a component
|
||||
*/
|
||||
Label,
|
||||
/**
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1573,6 +1577,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
spoiler?: boolean;
|
||||
|
||||
/**
|
||||
* The name of the file. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1649,6 +1663,28 @@ export interface APILabelComponent extends APIBaseComponent<ComponentType.Label>
|
||||
component: APIComponentInLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#file-upload}
|
||||
*/
|
||||
export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.FileUpload> {
|
||||
/**
|
||||
* Id for the file upload; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Minimum number of items that must be uploaded (defaults to 1); min 0, max 10
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of items that can be uploaded (defaults to 1); max 10
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1729,7 +1765,7 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,7 @@ import type {
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
} from '../../payloads/v10/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -357,7 +358,7 @@ export type RESTDeleteAPIGuildResult = never;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
||||
*/
|
||||
export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
||||
@@ -541,6 +542,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
@@ -566,11 +574,9 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
|
||||
@@ -807,6 +813,11 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
|
||||
*/
|
||||
export type RESTDeleteAPIGuildRoleResult = never;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
|
||||
*/
|
||||
|
||||
@@ -380,6 +380,16 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/member-counts`
|
||||
*
|
||||
* @unstable
|
||||
*/
|
||||
guildRoleMemberCounts(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/roles/member-counts` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/prune`
|
||||
|
||||
@@ -28,6 +28,7 @@ import type {
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
} from '../../payloads/v9/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -357,7 +358,7 @@ export type RESTDeleteAPIGuildResult = never;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
||||
*/
|
||||
export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
||||
@@ -541,6 +542,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
@@ -566,11 +574,9 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type {
|
||||
ChannelType,
|
||||
GuildChannelType,
|
||||
APIPartialChannel,
|
||||
APIGroupDMChannel,
|
||||
APIDMChannel,
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
} from '../../v10';
|
||||
import { expectAssignable, expectNotAssignable } from '../__utils__/type-assertions';
|
||||
|
||||
type AnyGuildChannel = APIGuildChannel<ChannelType>;
|
||||
type AnyGuildChannel = APIGuildChannel<GuildChannelType>;
|
||||
|
||||
declare const partialChannel: APIPartialChannel;
|
||||
declare const dmChannel: APIDMChannel;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"tagName": "@unstable",
|
||||
"syntaxKind": "modifier"
|
||||
"syntaxKind": "block"
|
||||
},
|
||||
{
|
||||
"tagName": "@default",
|
||||
|
||||
39
utils/v10.ts
39
utils/v10.ts
@@ -15,13 +15,14 @@ import type {
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
APIMessageComponentSelectMenuInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from '../payloads/v10/index';
|
||||
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v10/index';
|
||||
|
||||
// Interactions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
* A type guard check for DM interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
* A type guard check for guild interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
// ApplicationCommandInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
* A type guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
* A type guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
// MessageComponentInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
* A type guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
* A type guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
|
||||
// Buttons
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
* A type guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
* A type guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
|
||||
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
|
||||
}
|
||||
|
||||
// Modal
|
||||
|
||||
/**
|
||||
* A type guard check for modals submit interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a modal submission
|
||||
*/
|
||||
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
|
||||
return interaction.type === InteractionType.ModalSubmit;
|
||||
}
|
||||
|
||||
// Message Components
|
||||
|
||||
/**
|
||||
* A type-guard check for message component interactions
|
||||
* A type guard check for message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a message component
|
||||
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for button message component interactions
|
||||
* A type guard check for button message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a button
|
||||
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for select menu message component interactions
|
||||
* A type guard check for select menu message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a select menu
|
||||
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
|
||||
// Application Commands
|
||||
|
||||
/**
|
||||
* A type-guard check for chat input application commands.
|
||||
* A type guard check for chat input application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a chat input application command
|
||||
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for context menu application commands.
|
||||
* A type guard check for context menu application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a context menu application command
|
||||
|
||||
39
utils/v9.ts
39
utils/v9.ts
@@ -15,13 +15,14 @@ import type {
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
APIMessageComponentSelectMenuInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from '../payloads/v9/index';
|
||||
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v9/index';
|
||||
|
||||
// Interactions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
* A type guard check for DM interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
* A type guard check for guild interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
// ApplicationCommandInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
* A type guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
* A type guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
// MessageComponentInteractions
|
||||
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
* A type guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
* A type guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
|
||||
// Buttons
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
* A type guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
* A type guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
|
||||
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
|
||||
}
|
||||
|
||||
// Modal
|
||||
|
||||
/**
|
||||
* A type guard check for modals submit interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a modal submission
|
||||
*/
|
||||
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
|
||||
return interaction.type === InteractionType.ModalSubmit;
|
||||
}
|
||||
|
||||
// Message Components
|
||||
|
||||
/**
|
||||
* A type-guard check for message component interactions
|
||||
* A type guard check for message component interactions
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a message component
|
||||
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for button message component interactions
|
||||
* A type guard check for button message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a button
|
||||
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for select menu message component interactions
|
||||
* A type guard check for select menu message component interactions
|
||||
*
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component is a select menu
|
||||
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
|
||||
// Application Commands
|
||||
|
||||
/**
|
||||
* A type-guard check for chat input application commands.
|
||||
* A type guard check for chat input application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a chat input application command
|
||||
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
|
||||
}
|
||||
|
||||
/**
|
||||
* A type-guard check for context menu application commands.
|
||||
* A type guard check for context menu application commands.
|
||||
*
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction is a context menu application command
|
||||
|
||||
@@ -1 +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.27"}]
|
||||
[{"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.34"}]
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1,3 +1,3 @@
|
||||
[
|
||||
"0.38.27"
|
||||
"0.38.34"
|
||||
]
|
||||
Reference in New Issue
Block a user