mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 10:50:08 +00:00
Compare commits
113 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e50ccf576 | ||
|
|
66c6b4f555 | ||
|
|
5cd0686f1a | ||
|
|
391d0d4454 | ||
|
|
2d3fc09ade | ||
|
|
3637535d28 | ||
|
|
14bca2694d | ||
|
|
1e8075e41d | ||
|
|
bb1f5dfe5e | ||
|
|
b9df5c2d02 | ||
|
|
812fbbe688 | ||
|
|
edf9a9651b | ||
|
|
9c2f1746b1 | ||
|
|
f8f039867e | ||
|
|
8a4a6d1e43 | ||
|
|
2e5e31b4c4 | ||
|
|
0bd00dd111 | ||
|
|
d5dc47a36c | ||
|
|
09c71fe9d1 | ||
|
|
3691d77da3 | ||
|
|
bece6b84ee | ||
|
|
e9e7f5c24f | ||
|
|
e1b27cd5a9 | ||
|
|
5acf5c5989 | ||
|
|
d165766302 | ||
|
|
702e541bf0 | ||
|
|
27ef064f92 | ||
|
|
c21ae24f7a | ||
|
|
b2a8b740e5 | ||
|
|
19d04c00c9 | ||
|
|
2802117c0b | ||
|
|
487c3b7980 | ||
|
|
3a296fa929 | ||
|
|
1506ff0d2b | ||
|
|
d4248babd2 | ||
|
|
07d7b05cde | ||
|
|
69bbc57575 | ||
|
|
6a29982d09 | ||
|
|
ae75ee7863 | ||
|
|
763bfc810c | ||
|
|
c76a1bc372 | ||
|
|
afe009d84e | ||
|
|
d4fc31de65 | ||
|
|
0a514f68d9 | ||
|
|
308308dfab | ||
|
|
ca423b001a | ||
|
|
3bc73f8b4f | ||
|
|
96a34ba74b | ||
|
|
b63fafdfd4 | ||
|
|
1c722899a1 | ||
|
|
c5aa81d971 | ||
|
|
ae938673f9 | ||
|
|
93e4c79e2e | ||
|
|
a99c8c0f53 | ||
|
|
c080b2a838 | ||
|
|
ed0c19aef7 | ||
|
|
662cb0cb0a | ||
|
|
e65e02f05f | ||
|
|
b4eaf0b607 | ||
|
|
ebdb44eb79 | ||
|
|
d7192dc74e | ||
|
|
b985362252 | ||
|
|
25778aeee9 | ||
|
|
899544f379 | ||
|
|
76ee81b8e1 | ||
|
|
93f3d45596 | ||
|
|
811314a825 | ||
|
|
ba01bacfc0 | ||
|
|
a4aa724eb8 | ||
|
|
dea22dc487 | ||
|
|
cf6476dc8a | ||
|
|
f76c2fa249 | ||
|
|
0000e9afe3 | ||
|
|
c3b331d80a | ||
|
|
f1a3cb7bb7 | ||
|
|
38b9467178 | ||
|
|
32b544e05e | ||
|
|
e1ff008cd6 | ||
|
|
46b8cbd46f | ||
|
|
c8ef2fefde | ||
|
|
bf12195401 | ||
|
|
a73d1d0ce2 | ||
|
|
17eade718c | ||
|
|
c242454e9f | ||
|
|
6dc3caa692 | ||
|
|
6b47a0c960 | ||
|
|
e9169b8acb | ||
|
|
d7a38425c0 | ||
|
|
8190a1a475 | ||
|
|
818b899f9d | ||
|
|
61788ced57 | ||
|
|
f6ae280ab5 | ||
|
|
6708005f0c | ||
|
|
9b00e9d441 | ||
|
|
cbec753710 | ||
|
|
5ea94a6629 | ||
|
|
cef79b442e | ||
|
|
1353b5915c | ||
|
|
beb982dd82 | ||
|
|
da016bd49d | ||
|
|
0ee3cf31bb | ||
|
|
8b22f9511f | ||
|
|
32975aecea | ||
|
|
c93fdc0996 | ||
|
|
164f79e6c4 | ||
|
|
e60a3f8aac | ||
|
|
36e76904ef | ||
|
|
177e9d199b | ||
|
|
7e0de6eaa1 | ||
|
|
c2872acc40 | ||
|
|
47b0d075b0 | ||
|
|
c726e8be53 | ||
|
|
6b6b256d5f |
4
.github/workflows/documentation.yml
vendored
4
.github/workflows/documentation.yml
vendored
@@ -67,7 +67,7 @@ jobs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- uses: pnpm/action-setup@v4.2.0
|
||||
- uses: pnpm/action-setup@v5.0.0
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
run: |
|
||||
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
- uses: actions/cache@v5
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
|
||||
|
||||
2
.github/workflows/labelsync.yml
vendored
2
.github/workflows/labelsync.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Label sync
|
||||
uses: crazy-max/ghaction-github-labeler@v5
|
||||
uses: crazy-max/ghaction-github-labeler@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
24
.github/workflows/release-flows.yml
vendored
24
.github/workflows/release-flows.yml
vendored
@@ -59,6 +59,14 @@ jobs:
|
||||
if: github.repository_owner == 'discordjs' && github.event_name != 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.DISCORDJS_APP_ID }}
|
||||
private-key: ${{ secrets.DISCORDJS_APP_KEY_RELEASE }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -78,13 +86,13 @@ jobs:
|
||||
|
||||
- name: Set Git User and Email
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.name "discord-js[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Create branch for changes, add all changes and push
|
||||
run: |
|
||||
@@ -103,7 +111,7 @@ jobs:
|
||||
- name: Create Pull Request
|
||||
run: node ./scripts/actions/create-pr.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
create_release:
|
||||
name: Create release and publish
|
||||
@@ -115,6 +123,14 @@ jobs:
|
||||
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')
|
||||
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.DISCORDJS_APP_ID }}
|
||||
private-key: ${{ secrets.DISCORDJS_APP_KEY_RELEASE }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
@@ -136,4 +152,4 @@ jobs:
|
||||
- name: Create GitHub release
|
||||
run: node ./scripts/actions/create-release.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
2
.github/workflows/validate-pull-request.yml
vendored
2
.github/workflows/validate-pull-request.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
PATTERNS="gateway/v6.ts|gateway/v8.ts|payloads/v6/|payloads/v8/|rest/v6/|rest/v8/|rpc/v8.ts|utils/v8.ts|voice/v8.ts|^v6.ts$|^v8.ts$"
|
||||
PATTERNS="gateway/v6.ts|gateway/v8.ts|payloads/v6/|payloads/v8/|rest/v6/|rest/v8/|rpc/v8.ts|utils/v8.ts|voice/v4.ts|^v6.ts$|^v8.ts$"
|
||||
|
||||
if gh pr view ${{ github.event.pull_request.number }} --repo ${{github.repository}} --json files --jq ".files[].path | select(test(\"$PATTERNS\"))" | grep -q .; then
|
||||
echo "::error::Unsupported API versions modified. Please make changes to current API versions only."
|
||||
|
||||
@@ -1 +1 @@
|
||||
yarn pretty-quick --staged && yarn lint-staged && yarn build:deno && git add deno
|
||||
yarn pretty-quick --staged && yarn lint-staged && yarn clean:node && yarn build:deno && git add deno
|
||||
|
||||
942
.yarn/releases/yarn-4.12.0.cjs
vendored
942
.yarn/releases/yarn-4.12.0.cjs
vendored
File diff suppressed because one or more lines are too long
940
.yarn/releases/yarn-4.14.1.cjs
vendored
Executable file
940
.yarn/releases/yarn-4.14.1.cjs
vendored
Executable file
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.12.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.14.1.cjs
|
||||
|
||||
plugins:
|
||||
- path: ./.yarn/plugins/postinstallDev.cjs
|
||||
|
||||
87
CHANGELOG.md
87
CHANGELOG.md
@@ -1,3 +1,90 @@
|
||||
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
|
||||
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
|
||||
|
||||
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
|
||||
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
|
||||
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
|
||||
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
|
||||
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
|
||||
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
|
||||
|
||||
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
|
||||
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
|
||||
|
||||
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplication:** make event_webhooks_status optional ([#1603](https://github.com/discordjs/discord-api-types/issues/1603)) ([c76a1bc](https://github.com/discordjs/discord-api-types/commit/c76a1bc37208789b9b626a9363e8a3992edc2899))
|
||||
|
||||
## [0.38.43](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.43) (2026-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Channel:** correct PATCH channel field nullability ([#1575](https://github.com/discordjs/discord-api-types/issues/1575)) ([a4aa724](https://github.com/discordjs/discord-api-types/commit/a4aa724eb84ca0dea335b52c312af7a0e50696f6))
|
||||
* **Gateway:** invite create timestamp type, zstd-stream ([#1569](https://github.com/discordjs/discord-api-types/issues/1569)) ([38b9467](https://github.com/discordjs/discord-api-types/commit/38b9467178783c71770a15905d5f6e716ed7cbbd))
|
||||
* **Guild:** correct optionality and nullability ([#1574](https://github.com/discordjs/discord-api-types/issues/1574)) ([cf6476d](https://github.com/discordjs/discord-api-types/commit/cf6476dc8aeecb3d36cac629cb1d921b2805c573))
|
||||
* **guildScheduledEvent:** entity_type required, channel_id nullable ([#1573](https://github.com/discordjs/discord-api-types/issues/1573)) ([bf12195](https://github.com/discordjs/discord-api-types/commit/bf121954013b21f9b8a2c35249791f96b275143a))
|
||||
* **poll:** mark expiry as nullable ([#1576](https://github.com/discordjs/discord-api-types/issues/1576)) ([dea22dc](https://github.com/discordjs/discord-api-types/commit/dea22dc487d8af22827a15815ff79acd8607465b))
|
||||
* role colors optionality, color deprecation, and stale annotations ([#1566](https://github.com/discordjs/discord-api-types/issues/1566)) ([0000e9a](https://github.com/discordjs/discord-api-types/commit/0000e9afe34f748d708c1d81441a08e1a06e0d50))
|
||||
* send soundboard result type ([#1568](https://github.com/discordjs/discord-api-types/issues/1568)) ([f1a3cb7](https://github.com/discordjs/discord-api-types/commit/f1a3cb7bb7fb6fba6824fcad42e0ce54a0d9be94))
|
||||
* split grouped gateway dispatch types ([#1563](https://github.com/discordjs/discord-api-types/issues/1563)) ([f76c2fa](https://github.com/discordjs/discord-api-types/commit/f76c2fa249b1b9ad02d4bfc26495f4cfa2349641))
|
||||
* **Voice, AuditLog:** voice state channel_id, audit log application_id ([#1580](https://github.com/discordjs/discord-api-types/issues/1580)) ([811314a](https://github.com/discordjs/discord-api-types/commit/811314a825bbe32360f98109bd4981d67fdb6726))
|
||||
* **webhook:** correct nullability for guild_id and channel_id ([#1567](https://github.com/discordjs/discord-api-types/issues/1567)) ([25778ae](https://github.com/discordjs/discord-api-types/commit/25778aeee9367c145fa841c977d4de6b247652c0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Application:** add activity instance types and endpoint ([#1578](https://github.com/discordjs/discord-api-types/issues/1578)) ([b985362](https://github.com/discordjs/discord-api-types/commit/b9853622523d1be70e3f754d552f5b984fff8739))
|
||||
* **Application:** add webhook event fields to PATCH ([#1570](https://github.com/discordjs/discord-api-types/issues/1570)) ([e1ff008](https://github.com/discordjs/discord-api-types/commit/e1ff008cd697cf0dd0185ed2d8aba653c6be91e4))
|
||||
* **BaseThemeType:** add `Unset` base theme type ([#1577](https://github.com/discordjs/discord-api-types/issues/1577)) ([e65e02f](https://github.com/discordjs/discord-api-types/commit/e65e02f05f048cc57488deffb04e90313c92e4c2))
|
||||
* guild messages search ([#1583](https://github.com/discordjs/discord-api-types/issues/1583)) ([a99c8c0](https://github.com/discordjs/discord-api-types/commit/a99c8c0f53b119e58841979f319eb3e49cbe9b5f))
|
||||
* **Guild:** add collectibles to guild member ([#1572](https://github.com/discordjs/discord-api-types/issues/1572)) ([c8ef2fe](https://github.com/discordjs/discord-api-types/commit/c8ef2fefde5b8a37dee40863d2a2e24df8b50e28))
|
||||
* **Guild:** add flags to modify guild member ([#1571](https://github.com/discordjs/discord-api-types/issues/1571)) ([46b8cbd](https://github.com/discordjs/discord-api-types/commit/46b8cbd46f5c5331652624d74048775bd0e9ff8d))
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
* **message:** shared client themes ([#1565](https://github.com/discordjs/discord-api-types/issues/1565)) ([c3b331d](https://github.com/discordjs/discord-api-types/commit/c3b331d80a1c4b97b260584f4c9afb5f81871ba9))
|
||||
* **Rest:** add missing JSON error codes ([#1579](https://github.com/discordjs/discord-api-types/issues/1579)) ([ba01bac](https://github.com/discordjs/discord-api-types/commit/ba01bacfc073ec5b3476157a6d6f8f91836e0eb8))
|
||||
* **RESTJSONErrorCodes:** add error code `50278` ([#1587](https://github.com/discordjs/discord-api-types/issues/1587)) ([662cb0c](https://github.com/discordjs/discord-api-types/commit/662cb0cb0ac9c6f9ad93e180849476714bfceb0c))
|
||||
|
||||
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
|
||||
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
|
||||
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
|
||||
|
||||
|
||||
|
||||
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
|
||||
|
||||
|
||||
|
||||
87
deno/CHANGELOG.md
generated
87
deno/CHANGELOG.md
generated
@@ -1,3 +1,90 @@
|
||||
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
|
||||
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
|
||||
|
||||
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
|
||||
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
|
||||
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
|
||||
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
|
||||
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
|
||||
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
|
||||
|
||||
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
|
||||
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
|
||||
|
||||
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplication:** make event_webhooks_status optional ([#1603](https://github.com/discordjs/discord-api-types/issues/1603)) ([c76a1bc](https://github.com/discordjs/discord-api-types/commit/c76a1bc37208789b9b626a9363e8a3992edc2899))
|
||||
|
||||
## [0.38.43](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.43) (2026-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Channel:** correct PATCH channel field nullability ([#1575](https://github.com/discordjs/discord-api-types/issues/1575)) ([a4aa724](https://github.com/discordjs/discord-api-types/commit/a4aa724eb84ca0dea335b52c312af7a0e50696f6))
|
||||
* **Gateway:** invite create timestamp type, zstd-stream ([#1569](https://github.com/discordjs/discord-api-types/issues/1569)) ([38b9467](https://github.com/discordjs/discord-api-types/commit/38b9467178783c71770a15905d5f6e716ed7cbbd))
|
||||
* **Guild:** correct optionality and nullability ([#1574](https://github.com/discordjs/discord-api-types/issues/1574)) ([cf6476d](https://github.com/discordjs/discord-api-types/commit/cf6476dc8aeecb3d36cac629cb1d921b2805c573))
|
||||
* **guildScheduledEvent:** entity_type required, channel_id nullable ([#1573](https://github.com/discordjs/discord-api-types/issues/1573)) ([bf12195](https://github.com/discordjs/discord-api-types/commit/bf121954013b21f9b8a2c35249791f96b275143a))
|
||||
* **poll:** mark expiry as nullable ([#1576](https://github.com/discordjs/discord-api-types/issues/1576)) ([dea22dc](https://github.com/discordjs/discord-api-types/commit/dea22dc487d8af22827a15815ff79acd8607465b))
|
||||
* role colors optionality, color deprecation, and stale annotations ([#1566](https://github.com/discordjs/discord-api-types/issues/1566)) ([0000e9a](https://github.com/discordjs/discord-api-types/commit/0000e9afe34f748d708c1d81441a08e1a06e0d50))
|
||||
* send soundboard result type ([#1568](https://github.com/discordjs/discord-api-types/issues/1568)) ([f1a3cb7](https://github.com/discordjs/discord-api-types/commit/f1a3cb7bb7fb6fba6824fcad42e0ce54a0d9be94))
|
||||
* split grouped gateway dispatch types ([#1563](https://github.com/discordjs/discord-api-types/issues/1563)) ([f76c2fa](https://github.com/discordjs/discord-api-types/commit/f76c2fa249b1b9ad02d4bfc26495f4cfa2349641))
|
||||
* **Voice, AuditLog:** voice state channel_id, audit log application_id ([#1580](https://github.com/discordjs/discord-api-types/issues/1580)) ([811314a](https://github.com/discordjs/discord-api-types/commit/811314a825bbe32360f98109bd4981d67fdb6726))
|
||||
* **webhook:** correct nullability for guild_id and channel_id ([#1567](https://github.com/discordjs/discord-api-types/issues/1567)) ([25778ae](https://github.com/discordjs/discord-api-types/commit/25778aeee9367c145fa841c977d4de6b247652c0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Application:** add activity instance types and endpoint ([#1578](https://github.com/discordjs/discord-api-types/issues/1578)) ([b985362](https://github.com/discordjs/discord-api-types/commit/b9853622523d1be70e3f754d552f5b984fff8739))
|
||||
* **Application:** add webhook event fields to PATCH ([#1570](https://github.com/discordjs/discord-api-types/issues/1570)) ([e1ff008](https://github.com/discordjs/discord-api-types/commit/e1ff008cd697cf0dd0185ed2d8aba653c6be91e4))
|
||||
* **BaseThemeType:** add `Unset` base theme type ([#1577](https://github.com/discordjs/discord-api-types/issues/1577)) ([e65e02f](https://github.com/discordjs/discord-api-types/commit/e65e02f05f048cc57488deffb04e90313c92e4c2))
|
||||
* guild messages search ([#1583](https://github.com/discordjs/discord-api-types/issues/1583)) ([a99c8c0](https://github.com/discordjs/discord-api-types/commit/a99c8c0f53b119e58841979f319eb3e49cbe9b5f))
|
||||
* **Guild:** add collectibles to guild member ([#1572](https://github.com/discordjs/discord-api-types/issues/1572)) ([c8ef2fe](https://github.com/discordjs/discord-api-types/commit/c8ef2fefde5b8a37dee40863d2a2e24df8b50e28))
|
||||
* **Guild:** add flags to modify guild member ([#1571](https://github.com/discordjs/discord-api-types/issues/1571)) ([46b8cbd](https://github.com/discordjs/discord-api-types/commit/46b8cbd46f5c5331652624d74048775bd0e9ff8d))
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
* **message:** shared client themes ([#1565](https://github.com/discordjs/discord-api-types/issues/1565)) ([c3b331d](https://github.com/discordjs/discord-api-types/commit/c3b331d80a1c4b97b260584f4c9afb5f81871ba9))
|
||||
* **Rest:** add missing JSON error codes ([#1579](https://github.com/discordjs/discord-api-types/issues/1579)) ([ba01bac](https://github.com/discordjs/discord-api-types/commit/ba01bacfc073ec5b3476157a6d6f8f91836e0eb8))
|
||||
* **RESTJSONErrorCodes:** add error code `50278` ([#1587](https://github.com/discordjs/discord-api-types/issues/1587)) ([662cb0c](https://github.com/discordjs/discord-api-types/commit/662cb0cb0ac9c6f9ad93e180849476714bfceb0c))
|
||||
|
||||
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
|
||||
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
|
||||
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
|
||||
|
||||
|
||||
|
||||
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
|
||||
|
||||
|
||||
|
||||
2
deno/gateway/common.ts
generated
2
deno/gateway/common.ts
generated
@@ -4,5 +4,5 @@
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
104
deno/gateway/v10.ts
generated
104
deno/gateway/v10.ts
generated
@@ -331,12 +331,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -346,8 +351,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -382,7 +388,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -529,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -539,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -549,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -674,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -684,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -694,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -724,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -734,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -744,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -804,7 +839,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -814,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -824,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -999,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1009,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1226,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1236,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1326,7 +1382,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1520,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
|
||||
104
deno/gateway/v9.ts
generated
104
deno/gateway/v9.ts
generated
@@ -330,12 +330,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -345,8 +350,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -381,7 +387,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -528,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -538,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -548,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -673,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -683,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -693,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -723,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -733,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -743,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -803,7 +838,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -813,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -823,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -998,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1008,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1225,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1235,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1325,7 +1381,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1519,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
|
||||
7
deno/payloads/common.ts
generated
7
deno/payloads/common.ts
generated
@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows kicking members
|
||||
*/
|
||||
|
||||
KickMembers: 1n << 1n,
|
||||
/**
|
||||
* Allows banning members
|
||||
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageGuild: 1n << 5n,
|
||||
/**
|
||||
* Allows for the addition of reactions to messages
|
||||
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { ChannelType } from '../../../channel.ts';
|
||||
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
channel_types?: ApplicationCommandOptionAllowedChannelType[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
64
deno/payloads/v10/application.ts
generated
64
deno/payloads/v10/application.ts
generated
@@ -154,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -317,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
7
deno/payloads/v10/auditLog.ts
generated
7
deno/payloads/v10/auditLog.ts
generated
@@ -347,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
|
||||
9
deno/payloads/v10/channel.ts
generated
9
deno/payloads/v10/channel.ts
generated
@@ -75,10 +75,15 @@ export type TextChannelType =
|
||||
|
||||
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export type ApplicationCommandOptionAllowedChannelType = Exclude<
|
||||
ChannelType,
|
||||
ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory
|
||||
>;
|
||||
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -361,7 +366,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
14
deno/payloads/v10/guild.ts
generated
14
deno/payloads/v10/guild.ts
generated
@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user.ts';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -638,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -695,6 +695,12 @@ export interface APIBaseGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
459
deno/payloads/v10/message.ts
generated
459
deno/payloads/v10/message.ts
generated
@@ -3,7 +3,7 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIChannel, ChannelType } from './channel.ts';
|
||||
import type { APIChannel, APIThreadChannel, APIThreadMember, ChannelType } from './channel.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
@@ -87,7 +87,7 @@ export interface APIBaseMessageNoChannel {
|
||||
*/
|
||||
mention_channels?: APIChannelMention[];
|
||||
/**
|
||||
* Any attached files
|
||||
* Any attached files that are not referenced in embeds or components
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
|
||||
*
|
||||
@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,6 +467,39 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Unset,
|
||||
Dark,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -580,9 +617,9 @@ export interface APIEmbed {
|
||||
/**
|
||||
* Thumbnail information
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
|
||||
*/
|
||||
thumbnail?: APIEmbedThumbnail;
|
||||
thumbnail?: APIEmbedImage;
|
||||
/**
|
||||
* Video information
|
||||
*
|
||||
@@ -609,6 +646,13 @@ export interface APIEmbed {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
|
||||
*/
|
||||
fields?: APIEmbedField[];
|
||||
/**
|
||||
* Embed flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -652,27 +696,30 @@ export enum EmbedType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
*/
|
||||
export interface APIEmbedThumbnail {
|
||||
export enum EmbedFlags {
|
||||
/**
|
||||
* Source url of thumbnail (only supports http(s) and attachments)
|
||||
* This embed is a fallback for a reply to an activity card
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A proxied url of the thumbnail
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of thumbnail
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Width of thumbnail
|
||||
*/
|
||||
width?: number;
|
||||
IsContentInventoryEntry = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
*/
|
||||
export enum EmbedMediaFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link APIEmbedImage} instead.
|
||||
*/
|
||||
export interface APIEmbedThumbnail extends APIEmbedImage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
|
||||
*/
|
||||
@@ -693,6 +740,33 @@ export interface APIEmbedVideo {
|
||||
* Width of video
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The video's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the video
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the video
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -715,6 +789,33 @@ export interface APIEmbedImage {
|
||||
* Width of image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The image's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the image
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the image
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -817,7 +918,7 @@ export interface APIAttachment {
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Description for the file
|
||||
* Description (alt text) for the file (max 1024 characters)
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
@@ -839,15 +940,27 @@ export interface APIAttachment {
|
||||
*/
|
||||
proxy_url: string;
|
||||
/**
|
||||
* Height of file (if image)
|
||||
* Height of file (if image or video)
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* Width of file (if image)
|
||||
* Width of file (if image or video)
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Whether this attachment is ephemeral
|
||||
*
|
||||
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
@@ -862,16 +975,48 @@ export interface APIAttachment {
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
/**
|
||||
* For Clips, array of users who were in the stream
|
||||
*/
|
||||
clip_participants?: APIUser[];
|
||||
/**
|
||||
* For Clips, when the clip was created
|
||||
*/
|
||||
clip_created_at?: string;
|
||||
/**
|
||||
* For Clips, the application in the stream, if recognized
|
||||
*/
|
||||
application?: APIApplication | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment is a Clip from a stream
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
|
||||
*/
|
||||
IsClip = 1 << 0,
|
||||
/**
|
||||
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
|
||||
*/
|
||||
IsThumbnail = 1 << 1,
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
/**
|
||||
* This attachment was marked as a spoiler and is blurred until clicked
|
||||
*/
|
||||
IsSpoiler = 1 << 3,
|
||||
/**
|
||||
* This attachment is an animated image
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1036,20 +1181,14 @@ export enum ComponentType {
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
@@ -1451,6 +1590,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable This enum is currently not documented by Discord
|
||||
*/
|
||||
export enum UnfurledMediaItemLoadingState {
|
||||
Unknown,
|
||||
Loading,
|
||||
@@ -1463,37 +1605,78 @@ export enum UnfurledMediaItemLoadingState {
|
||||
*/
|
||||
export interface APIUnfurledMediaItem {
|
||||
/**
|
||||
* Supports arbitrary urls and attachment://<filename> references
|
||||
* Supports arbitrary urls and `attachment://<filename>` references
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The proxied url of the media item
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* The width of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The width of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* The height of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The height of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string | null;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
placeholder_version?: number | null;
|
||||
/**
|
||||
* The media type of the content. This field is ignored and provided by the API as part of the response
|
||||
* The media type of the content
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string | null;
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
flags?: number;
|
||||
/**
|
||||
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
|
||||
* @unstable This field is currently not documented by Discord
|
||||
*/
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
/**
|
||||
* Unfurled media item flags combined as a bitfield
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: UnfurledMediaItemFlags;
|
||||
/**
|
||||
* The id of the uploaded attachment.
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @remarks Only present if the media item was uploaded as an attachment.
|
||||
*/
|
||||
attachment_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
*/
|
||||
export enum UnfurledMediaItemFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
|
||||
*
|
||||
@@ -1717,7 +1900,6 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
@@ -1738,7 +1920,6 @@ export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.R
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupOption {
|
||||
/**
|
||||
@@ -1763,7 +1944,6 @@ export interface APIRadioGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
@@ -1796,7 +1976,6 @@ export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentTyp
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
@@ -1821,7 +2000,6 @@ export interface APICheckboxGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
@@ -1972,3 +2150,198 @@ export interface APIMessagePin {
|
||||
*/
|
||||
message: APIMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
export enum MessageSearchAuthorType {
|
||||
/**
|
||||
* Return messages sent by user accounts
|
||||
*/
|
||||
User = 'user',
|
||||
/**
|
||||
* Return messages sent by bot accounts
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Return messages sent by webhooks
|
||||
*/
|
||||
Webhook = 'webhook',
|
||||
/**
|
||||
* Return messages not sent by user accounts
|
||||
*/
|
||||
NotUser = '-user',
|
||||
/**
|
||||
* Return messages not sent by bot accounts
|
||||
*/
|
||||
NotBot = '-bot',
|
||||
/**
|
||||
* Return messages not sent by webhooks
|
||||
*/
|
||||
NotWebhook = '-webhook',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
export enum MessageSearchHasType {
|
||||
/**
|
||||
* Return messages that have an image
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a sound attachment
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have a video
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have an attachment
|
||||
*/
|
||||
File = 'file',
|
||||
/**
|
||||
* Return messages that have a sent sticker
|
||||
*/
|
||||
Sticker = 'sticker',
|
||||
/**
|
||||
* Return messages that have an embed
|
||||
*/
|
||||
Embed = 'embed',
|
||||
/**
|
||||
* Return messages that have a link
|
||||
*/
|
||||
Link = 'link',
|
||||
/**
|
||||
* Return messages that have a poll
|
||||
*/
|
||||
Poll = 'poll',
|
||||
/**
|
||||
* Return messages that have a forwarded message
|
||||
*/
|
||||
Snapshot = 'snapshot',
|
||||
/**
|
||||
* Return messages that don't have an image
|
||||
*/
|
||||
NotImage = '-image',
|
||||
/**
|
||||
* Return messages that don't have a sound attachment
|
||||
*/
|
||||
NotSound = '-sound',
|
||||
/**
|
||||
* Return messages that don't have a video
|
||||
*/
|
||||
NotVideo = '-video',
|
||||
/**
|
||||
* Return messages that don't have an attachment
|
||||
*/
|
||||
NotFile = '-file',
|
||||
/**
|
||||
* Return messages that don't have a sent sticker
|
||||
*/
|
||||
NotSticker = '-sticker',
|
||||
/**
|
||||
* Return messages that don't have an embed
|
||||
*/
|
||||
NotEmbed = '-embed',
|
||||
/**
|
||||
* Return messages that don't have a link
|
||||
*/
|
||||
NotLink = '-link',
|
||||
/**
|
||||
* Return messages that don't have a poll
|
||||
*/
|
||||
NotPoll = '-poll',
|
||||
/**
|
||||
* Return messages that don't have a forwarded message
|
||||
*/
|
||||
NotSnapshot = '-snapshot',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks These do not correspond 1:1 to actual {@link https://docs.discord.com/developers/resources/message#embed-object-embed-types | embed types} and encompass a wider range of actual types.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
export enum MessageSearchEmbedType {
|
||||
/**
|
||||
* Return messages that have an image embed
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a video embed
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have a gifv embed
|
||||
*
|
||||
* @remarks Messages sent before February 24, 2026 may not be properly indexed under the `gif` embed type.
|
||||
*/
|
||||
Gif = 'gif',
|
||||
/**
|
||||
* Return messages that have a sound embed
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have an article embed
|
||||
*/
|
||||
Article = 'article',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
export enum MessageSearchSortMode {
|
||||
/**
|
||||
* Sort by the message creation time (default)
|
||||
*/
|
||||
Timestamp = 'timestamp',
|
||||
/**
|
||||
* Sort by the relevance of the message to the search query
|
||||
*/
|
||||
Relevance = 'relevance',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface APIMessageSearchIndexNotReadyResponse {
|
||||
message: string;
|
||||
code: number;
|
||||
documents_indexed: number;
|
||||
retry_after: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export interface APIMessageSearchResult {
|
||||
/**
|
||||
* Whether the guild is undergoing a deep historical indexing operation
|
||||
*/
|
||||
doing_deep_historical_index: boolean;
|
||||
/**
|
||||
* The number of documents that have been indexed during the current index operation, if any
|
||||
*/
|
||||
documents_indexed?: number;
|
||||
/**
|
||||
* The total number of results that match the query
|
||||
*/
|
||||
total_results: number;
|
||||
/**
|
||||
* A nested array of messages that match the query
|
||||
*
|
||||
* @remarks The nested array was used to provide surrounding context to search results. However, surrounding context is no longer returned.
|
||||
*/
|
||||
messages: Omit<APIMessage, 'reactions'>[][];
|
||||
/**
|
||||
* The threads that contain the returned messages
|
||||
*/
|
||||
threads?: APIThreadChannel[];
|
||||
/**
|
||||
* A thread member object for each returned thread the current user has joined
|
||||
*/
|
||||
members?: APIThreadMember[];
|
||||
}
|
||||
|
||||
3
deno/payloads/v10/permissions.ts
generated
3
deno/payloads/v10/permissions.ts
generated
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
2
deno/payloads/v10/poll.ts
generated
2
deno/payloads/v10/poll.ts
generated
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
4
deno/payloads/v10/user.ts
generated
4
deno/payloads/v10/user.ts
generated
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -194,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
|
||||
14
deno/payloads/v10/webhook.ts
generated
14
deno/payloads/v10/webhook.ts
generated
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
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',
|
||||
/**
|
||||
|
||||
64
deno/payloads/v9/application.ts
generated
64
deno/payloads/v9/application.ts
generated
@@ -154,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -317,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
7
deno/payloads/v9/auditLog.ts
generated
7
deno/payloads/v9/auditLog.ts
generated
@@ -347,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
|
||||
4
deno/payloads/v9/channel.ts
generated
4
deno/payloads/v9/channel.ts
generated
@@ -78,7 +78,7 @@ export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -361,7 +361,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
14
deno/payloads/v9/guild.ts
generated
14
deno/payloads/v9/guild.ts
generated
@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user.ts';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -630,7 +630,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -687,6 +687,12 @@ export interface APIBaseGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
458
deno/payloads/v9/message.ts
generated
458
deno/payloads/v9/message.ts
generated
@@ -3,7 +3,7 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIChannel, ChannelType } from './channel.ts';
|
||||
import type { APIChannel, APIThreadChannel, APIThreadMember, ChannelType } from './channel.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
@@ -86,7 +86,7 @@ export interface APIBaseMessageNoChannel {
|
||||
*/
|
||||
mention_channels?: APIChannelMention[];
|
||||
/**
|
||||
* Any attached files
|
||||
* Any attached files that are not referenced in embeds or components
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
|
||||
*
|
||||
@@ -248,6 +248,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +462,39 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Unset,
|
||||
Dark,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -575,9 +612,9 @@ export interface APIEmbed {
|
||||
/**
|
||||
* Thumbnail information
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
|
||||
*/
|
||||
thumbnail?: APIEmbedThumbnail;
|
||||
thumbnail?: APIEmbedImage;
|
||||
/**
|
||||
* Video information
|
||||
*
|
||||
@@ -604,6 +641,13 @@ export interface APIEmbed {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
|
||||
*/
|
||||
fields?: APIEmbedField[];
|
||||
/**
|
||||
* Embed flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,27 +691,30 @@ export enum EmbedType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
*/
|
||||
export interface APIEmbedThumbnail {
|
||||
export enum EmbedFlags {
|
||||
/**
|
||||
* Source url of thumbnail (only supports http(s) and attachments)
|
||||
* This embed is a fallback for a reply to an activity card
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A proxied url of the thumbnail
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of thumbnail
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Width of thumbnail
|
||||
*/
|
||||
width?: number;
|
||||
IsContentInventoryEntry = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
*/
|
||||
export enum EmbedMediaFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link APIEmbedImage} instead.
|
||||
*/
|
||||
export interface APIEmbedThumbnail extends APIEmbedImage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
|
||||
*/
|
||||
@@ -688,6 +735,33 @@ export interface APIEmbedVideo {
|
||||
* Width of video
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The video's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the video
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the video
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -710,6 +784,33 @@ export interface APIEmbedImage {
|
||||
* Width of image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The image's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the image
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the image
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -812,7 +913,7 @@ export interface APIAttachment {
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Description for the file
|
||||
* Description (alt text) for the file (max 1024 characters)
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
@@ -834,15 +935,27 @@ export interface APIAttachment {
|
||||
*/
|
||||
proxy_url: string;
|
||||
/**
|
||||
* Height of file (if image)
|
||||
* Height of file (if image or video)
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* Width of file (if image)
|
||||
* Width of file (if image or video)
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Whether this attachment is ephemeral
|
||||
*
|
||||
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
@@ -857,16 +970,48 @@ export interface APIAttachment {
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
/**
|
||||
* For Clips, array of users who were in the stream
|
||||
*/
|
||||
clip_participants?: APIUser[];
|
||||
/**
|
||||
* For Clips, when the clip was created
|
||||
*/
|
||||
clip_created_at?: string;
|
||||
/**
|
||||
* For Clips, the application in the stream, if recognized
|
||||
*/
|
||||
application?: APIApplication | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment is a Clip from a stream
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
|
||||
*/
|
||||
IsClip = 1 << 0,
|
||||
/**
|
||||
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
|
||||
*/
|
||||
IsThumbnail = 1 << 1,
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
/**
|
||||
* This attachment was marked as a spoiler and is blurred until clicked
|
||||
*/
|
||||
IsSpoiler = 1 << 3,
|
||||
/**
|
||||
* This attachment is an animated image
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1031,20 +1176,14 @@ export enum ComponentType {
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
@@ -1446,6 +1585,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable This enum is currently not documented by Discord
|
||||
*/
|
||||
export enum UnfurledMediaItemLoadingState {
|
||||
Unknown,
|
||||
Loading,
|
||||
@@ -1458,37 +1600,78 @@ export enum UnfurledMediaItemLoadingState {
|
||||
*/
|
||||
export interface APIUnfurledMediaItem {
|
||||
/**
|
||||
* Supports arbitrary urls and attachment://<filename> references
|
||||
* Supports arbitrary urls and `attachment://<filename>` references
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The proxied url of the media item
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* The width of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The width of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* The height of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The height of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string | null;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
placeholder_version?: number | null;
|
||||
/**
|
||||
* The media type of the content. This field is ignored and provided by the API as part of the response
|
||||
* The media type of the content
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string | null;
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
flags?: number;
|
||||
/**
|
||||
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
|
||||
* @unstable This field is currently not documented by Discord
|
||||
*/
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
/**
|
||||
* Unfurled media item flags combined as a bitfield
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: UnfurledMediaItemFlags;
|
||||
/**
|
||||
* The id of the uploaded attachment.
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @remarks Only present if the media item was uploaded as an attachment.
|
||||
*/
|
||||
attachment_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
*/
|
||||
export enum UnfurledMediaItemFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
|
||||
*
|
||||
@@ -1712,7 +1895,6 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
@@ -1758,7 +1940,6 @@ export interface APIRadioGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
@@ -1791,7 +1972,6 @@ export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentTyp
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
@@ -1816,7 +1996,6 @@ export interface APICheckboxGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
@@ -1967,3 +2146,198 @@ export interface APIMessagePin {
|
||||
*/
|
||||
message: APIMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
export enum MessageSearchAuthorType {
|
||||
/**
|
||||
* Return messages sent by user accounts
|
||||
*/
|
||||
User = 'user',
|
||||
/**
|
||||
* Return messages sent by bot accounts
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Return messages sent by webhooks
|
||||
*/
|
||||
Webhook = 'webhook',
|
||||
/**
|
||||
* Return messages not sent by user accounts
|
||||
*/
|
||||
NotUser = '-user',
|
||||
/**
|
||||
* Return messages not sent by bot accounts
|
||||
*/
|
||||
NotBot = '-bot',
|
||||
/**
|
||||
* Return messages not sent by webhooks
|
||||
*/
|
||||
NotWebhook = '-webhook',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
export enum MessageSearchHasType {
|
||||
/**
|
||||
* Return messages that have an image
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a sound attachment
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have a video
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have an attachment
|
||||
*/
|
||||
File = 'file',
|
||||
/**
|
||||
* Return messages that have a sent sticker
|
||||
*/
|
||||
Sticker = 'sticker',
|
||||
/**
|
||||
* Return messages that have an embed
|
||||
*/
|
||||
Embed = 'embed',
|
||||
/**
|
||||
* Return messages that have a link
|
||||
*/
|
||||
Link = 'link',
|
||||
/**
|
||||
* Return messages that have a poll
|
||||
*/
|
||||
Poll = 'poll',
|
||||
/**
|
||||
* Return messages that have a forwarded message
|
||||
*/
|
||||
Snapshot = 'snapshot',
|
||||
/**
|
||||
* Return messages that don't have an image
|
||||
*/
|
||||
NotImage = '-image',
|
||||
/**
|
||||
* Return messages that don't have a sound attachment
|
||||
*/
|
||||
NotSound = '-sound',
|
||||
/**
|
||||
* Return messages that don't have a video
|
||||
*/
|
||||
NotVideo = '-video',
|
||||
/**
|
||||
* Return messages that don't have an attachment
|
||||
*/
|
||||
NotFile = '-file',
|
||||
/**
|
||||
* Return messages that don't have a sent sticker
|
||||
*/
|
||||
NotSticker = '-sticker',
|
||||
/**
|
||||
* Return messages that don't have an embed
|
||||
*/
|
||||
NotEmbed = '-embed',
|
||||
/**
|
||||
* Return messages that don't have a link
|
||||
*/
|
||||
NotLink = '-link',
|
||||
/**
|
||||
* Return messages that don't have a poll
|
||||
*/
|
||||
NotPoll = '-poll',
|
||||
/**
|
||||
* Return messages that don't have a forwarded message
|
||||
*/
|
||||
NotSnapshot = '-snapshot',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks These do not correspond 1:1 to actual {@link https://docs.discord.com/developers/resources/message#embed-object-embed-types | embed types} and encompass a wider range of actual types.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
export enum MessageSearchEmbedType {
|
||||
/**
|
||||
* Return messages that have an image embed
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a video embed
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have a gifv embed
|
||||
*
|
||||
* @remarks Messages sent before February 24, 2026 may not be properly indexed under the `gif` embed type.
|
||||
*/
|
||||
Gif = 'gif',
|
||||
/**
|
||||
* Return messages that have a sound embed
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have an article embed
|
||||
*/
|
||||
Article = 'article',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
export enum MessageSearchSortMode {
|
||||
/**
|
||||
* Sort by the message creation time (default)
|
||||
*/
|
||||
Timestamp = 'timestamp',
|
||||
/**
|
||||
* Sort by the relevance of the message to the search query
|
||||
*/
|
||||
Relevance = 'relevance',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface APIMessageSearchIndexNotReadyResponse {
|
||||
message: string;
|
||||
code: number;
|
||||
documents_indexed: number;
|
||||
retry_after: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export interface APIMessageSearchResult {
|
||||
/**
|
||||
* Whether the guild is undergoing a deep historical indexing operation
|
||||
*/
|
||||
doing_deep_historical_index: boolean;
|
||||
/**
|
||||
* The number of documents that have been indexed during the current index operation, if any
|
||||
*/
|
||||
documents_indexed?: number;
|
||||
/**
|
||||
* The total number of results that match the query
|
||||
*/
|
||||
total_results: number;
|
||||
/**
|
||||
* A nested array of messages that match the query
|
||||
*
|
||||
* @remarks The nested array was used to provide surrounding context to search results. However, surrounding context is no longer returned.
|
||||
*/
|
||||
messages: Omit<APIMessage, 'reactions'>[][];
|
||||
/**
|
||||
* The threads that contain the returned messages
|
||||
*/
|
||||
threads?: APIThreadChannel[];
|
||||
/**
|
||||
* A thread member object for each returned thread the current user has joined
|
||||
*/
|
||||
members?: APIThreadMember[];
|
||||
}
|
||||
|
||||
3
deno/payloads/v9/permissions.ts
generated
3
deno/payloads/v9/permissions.ts
generated
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
2
deno/payloads/v9/poll.ts
generated
2
deno/payloads/v9/poll.ts
generated
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
4
deno/payloads/v9/user.ts
generated
4
deno/payloads/v9/user.ts
generated
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -194,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
|
||||
14
deno/payloads/v9/webhook.ts
generated
14
deno/payloads/v9/webhook.ts
generated
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
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',
|
||||
/**
|
||||
|
||||
51
deno/rest/common.ts
generated
51
deno/rest/common.ts
generated
@@ -75,8 +75,16 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnderMinimumAge = 20_024,
|
||||
|
||||
ChannelSendRateLimit = 20_028,
|
||||
ServerSendRateLimit,
|
||||
ChannelWriteRateLimit = 20_028,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ChannelWriteRateLimit} instead
|
||||
*/
|
||||
ChannelSendRateLimit = ChannelWriteRateLimit,
|
||||
ServerWriteRateLimit = 20_029,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ServerWriteRateLimit} instead
|
||||
*/
|
||||
ServerSendRateLimit = ServerWriteRateLimit,
|
||||
|
||||
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20_031,
|
||||
|
||||
@@ -173,6 +181,9 @@ export enum RESTJSONErrorCodes {
|
||||
GuildWidgetDisabled,
|
||||
CannotEditMessageAuthoredByAnotherUser,
|
||||
CannotSendAnEmptyMessage,
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUser,
|
||||
CannotSendMessagesInNonTextChannel,
|
||||
ChannelVerificationLevelTooHighForYouToGainAccess,
|
||||
@@ -246,7 +257,11 @@ export enum RESTJSONErrorCodes {
|
||||
OwnerCannotBePendingMember = 50_131,
|
||||
OwnershipCannotBeMovedToABotUser,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50_138,
|
||||
FailedToResizeAssetBelowTheMaximumSize = 50_138,
|
||||
/**
|
||||
* @deprecated This name is incorrect. Use {@link RESTJSONErrorCodes.FailedToResizeAssetBelowTheMaximumSize} instead
|
||||
*/
|
||||
FailedToResizeAssetBelowTheMinimumSize = FailedToResizeAssetBelowTheMaximumSize,
|
||||
|
||||
CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50_144,
|
||||
CannotConvertBetweenPremiumEmojiAndNormalEmoji,
|
||||
@@ -266,6 +281,11 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
ProvidedFileDoesNotHaveAValidDuration = 50_192,
|
||||
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50_278,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50_600,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60_003,
|
||||
@@ -275,7 +295,8 @@ export enum RESTJSONErrorCodes {
|
||||
ReactionWasBlocked = 90_001,
|
||||
UserCannotUseBurstReactions,
|
||||
|
||||
ApplicationNotYetAvailable = 110_001,
|
||||
IndexNotYetAvailable = 110_000,
|
||||
ApplicationNotYetAvailable,
|
||||
|
||||
APIResourceOverloaded = 130_000,
|
||||
|
||||
@@ -288,6 +309,8 @@ export enum RESTJSONErrorCodes {
|
||||
MaximumActiveThreads,
|
||||
MaximumActiveAnnouncementThreads,
|
||||
|
||||
CannotForwardMessageWithUnreadableContent = 160_014,
|
||||
|
||||
InvalidJSONForUploadedLottieFile = 170_001,
|
||||
UploadedLottiesCannotContainRasterizedImages,
|
||||
StickerMaximumFramerateExceeded,
|
||||
@@ -324,8 +347,28 @@ export enum RESTJSONErrorCodes {
|
||||
CannotUseAnEmojiIncludedWithThePoll,
|
||||
|
||||
CannotExpireANonPollMessage = 520_006,
|
||||
|
||||
ProvisionalAccountsPermissionNotGranted = 530_000,
|
||||
IdTokenJWTExpired,
|
||||
IdTokenJWTIssuerMismatch,
|
||||
IdTokenJWTAudienceMismatch,
|
||||
IdTokenJWTIssuedTooLongAgo,
|
||||
|
||||
FailedToGenerateUniqueUsername = 530_006,
|
||||
InvalidClientSecret,
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Error Codes that represent "Cannot send messages to this user".
|
||||
* Discord uses two different error codes for this error:
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} (50_007)
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} (50_278)
|
||||
*/
|
||||
export const CannotSendMessagesToThisUserErrorCodes = [
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds,
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#locales}
|
||||
*/
|
||||
|
||||
15
deno/rest/v10/application.ts
generated
15
deno/rest/v10/application.ts
generated
@@ -1,4 +1,8 @@
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
|
||||
import type {
|
||||
APIActivityInstance,
|
||||
APIApplication,
|
||||
APIApplicationRoleConnectionMetadata,
|
||||
} from '../../payloads/v10/application.ts';
|
||||
import type { _Nullable, _StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
/**
|
||||
@@ -25,11 +29,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
@@ -43,3 +49,8 @@ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance}
|
||||
*/
|
||||
export type RESTGetAPIApplicationActivityInstanceResult = APIActivityInstance;
|
||||
|
||||
25
deno/rest/v10/channel.ts
generated
25
deno/rest/v10/channel.ts
generated
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -338,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,7 +411,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
*/
|
||||
export enum ReactionType {
|
||||
Normal,
|
||||
Super,
|
||||
Burst,
|
||||
// eslint-disable @typescript-eslint/no-duplicate-enum-values
|
||||
/**
|
||||
* @deprecated Use {@link ReactionType.Burst} instead
|
||||
*/
|
||||
Super = Burst,
|
||||
// eslint-enable @typescript-eslint/no-duplicate-enum-values
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -742,6 +752,10 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -832,6 +846,7 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* Get threads before this id or ISO8601 timestamp
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
before?: Snowflake | string;
|
||||
/**
|
||||
* Max number of thread to return
|
||||
|
||||
162
deno/rest/v10/guild.ts
generated
162
deno/rest/v10/guild.ts
generated
@@ -20,6 +20,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -29,6 +30,12 @@ import type {
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
APIMessageSearchIndexNotReadyResponse,
|
||||
APIMessageSearchResult,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -381,11 +388,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +529,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,6 +542,151 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
||||
*
|
||||
* @remarks The Search Guild Messages endpoint is restricted according to whether the `MESSAGE_CONTENT` Privileged Intent is enabled for your application.
|
||||
*
|
||||
* If the entity you are searching is not yet indexed, the endpoint will return a 202 accepted response. The response body will not contain any search results, and will look similar to an error response:
|
||||
* ```json
|
||||
* {
|
||||
* "message": "Index not yet available. Try again later",
|
||||
* "code": 110000,
|
||||
* "documents_indexed": 0,
|
||||
* "retry_after": 2
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Due to speed optimizations, search may return slightly fewer results than the limit specified when messages have not been accessed for a long time.
|
||||
* Clients should not rely on the length of the `messages` array to paginate results.
|
||||
*
|
||||
* Additionally, when messages are actively being created or deleted, the `total_results` field may not be accurate.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface RESTGetAPIGuildMessagesSearchQuery {
|
||||
/**
|
||||
* Max number of messages to return (1-25)
|
||||
*
|
||||
* @defaultValue `25`
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Number to offset the returned messages by (max 9975)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* Get messages before this message ID
|
||||
*/
|
||||
max_id?: Snowflake;
|
||||
/**
|
||||
* Get messages after this message ID
|
||||
*/
|
||||
min_id?: Snowflake;
|
||||
/**
|
||||
* Max number of words to skip between matching tokens in the search `content` (max 100)
|
||||
*
|
||||
* @defaultValue `2`
|
||||
*/
|
||||
slop?: number;
|
||||
/**
|
||||
* Filter messages by content (max 1024 characters)
|
||||
*/
|
||||
content?: string;
|
||||
/**
|
||||
* Filter messages by these channels (max 500)
|
||||
*/
|
||||
channel_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by author type
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
author_type?: MessageSearchAuthorType[];
|
||||
/**
|
||||
* Filter messages by these authors (max 100)
|
||||
*/
|
||||
author_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these users (max 100)
|
||||
*/
|
||||
mentions?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these roles (max 100)
|
||||
*/
|
||||
mentions_role_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that do or do not mention `@everyone`
|
||||
*/
|
||||
mention_everyone?: boolean;
|
||||
/**
|
||||
* Filter messages that reply to these users (max 100)
|
||||
*/
|
||||
replied_to_user_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that reply to these messages (max 100)
|
||||
*/
|
||||
replied_to_message_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by whether they are or are not pinned
|
||||
*/
|
||||
pinned?: boolean;
|
||||
/**
|
||||
* Filter messages by whether or not they have specific things
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
has?: MessageSearchHasType[];
|
||||
/**
|
||||
* Filter messages by embed type
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
embed_type?: MessageSearchEmbedType[];
|
||||
/**
|
||||
* Filter messages by embed provider (case-sensitive, e.g. `Tenor`) (max 256 characters, max 100)
|
||||
*/
|
||||
embed_provider?: string[];
|
||||
/**
|
||||
* Filter messages by link hostname (e.g. `discordapp.com`) (max 256 characters, max 100)
|
||||
*/
|
||||
link_hostname?: string[];
|
||||
/**
|
||||
* Filter messages by attachment filename (max 1024 characters, max 100)
|
||||
*/
|
||||
attachment_filename?: string[];
|
||||
/**
|
||||
* Filter messages by attachment extension (e.g. `txt`) (max 256 characters, max 100)
|
||||
*/
|
||||
attachment_extension?: string[];
|
||||
/**
|
||||
* The sorting algorithm to use
|
||||
*
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
sort_by?: MessageSearchSortMode;
|
||||
/**
|
||||
* The direction to sort (`asc` or `desc`)
|
||||
*
|
||||
* @defaultValue `'desc'`
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
*/
|
||||
sort_order?: 'asc' | 'desc';
|
||||
/**
|
||||
* Whether to include results from age-restricted channels
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
include_nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export type RESTGetAPIGuildMessagesSearchResult = APIMessageSearchIndexNotReadyResponse | APIMessageSearchResult;
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
||||
8
deno/rest/v10/guildScheduledEvent.ts
generated
8
deno/rest/v10/guildScheduledEvent.ts
generated
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -98,8 +98,12 @@ export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
29
deno/rest/v10/mod.ts
generated
29
deno/rest/v10/mod.ts
generated
@@ -313,6 +313,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/messages/search`
|
||||
*/
|
||||
guildMessagesSearch(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/messages/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - PATCH `/guilds/{guild.id}/members/@me/nick`
|
||||
@@ -985,6 +993,14 @@ export const Routes = {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/activity-instances/{instance_id}`
|
||||
*/
|
||||
applicationActivityInstance(applicationId: Snowflake, instanceId: string) {
|
||||
return `/applications/${applicationId}/activity-instances/${instanceId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
@@ -1098,8 +1114,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1112,9 +1128,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
@@ -1429,8 +1446,8 @@ export const CDNRoutes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) {
|
||||
CDNRoutes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1445,7 +1462,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
});
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
2
deno/rest/v10/oauth2.ts
generated
2
deno/rest/v10/oauth2.ts
generated
@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
||||
*/
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
|
||||
|
||||
2
deno/rest/v10/soundboard.ts
generated
2
deno/rest/v10/soundboard.ts
generated
@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v10/mod.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
||||
*/
|
||||
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
|
||||
export type RESTPostAPISendSoundboardSoundResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}
|
||||
|
||||
2
deno/rest/v10/user.ts
generated
2
deno/rest/v10/user.ts
generated
@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
|
||||
/**
|
||||
* The recipient to open a DM channel with
|
||||
*/
|
||||
recipient_id: string;
|
||||
recipient_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
deno/rest/v10/voice.ts
generated
2
deno/rest/v10/voice.ts
generated
@@ -51,7 +51,7 @@ export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
|
||||
9
deno/rest/v10/webhook.ts
generated
9
deno/rest/v10/webhook.ts
generated
@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTGetAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: string;
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
|
||||
*/
|
||||
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
|
||||
*/
|
||||
|
||||
7
deno/rest/v6/mod.ts
generated
7
deno/rest/v6/mod.ts
generated
@@ -522,8 +522,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -536,9 +536,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
7
deno/rest/v8/mod.ts
generated
7
deno/rest/v8/mod.ts
generated
@@ -778,8 +778,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -792,9 +792,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
15
deno/rest/v9/application.ts
generated
15
deno/rest/v9/application.ts
generated
@@ -1,4 +1,8 @@
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application.ts';
|
||||
import type {
|
||||
APIActivityInstance,
|
||||
APIApplication,
|
||||
APIApplicationRoleConnectionMetadata,
|
||||
} from '../../payloads/v9/application.ts';
|
||||
import type { _StrictPartial, _Nullable } from '../../utils/internals.ts';
|
||||
|
||||
/**
|
||||
@@ -25,11 +29,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
@@ -43,3 +49,8 @@ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance}
|
||||
*/
|
||||
export type RESTGetAPIApplicationActivityInstanceResult = APIActivityInstance;
|
||||
|
||||
25
deno/rest/v9/channel.ts
generated
25
deno/rest/v9/channel.ts
generated
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -345,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,7 +418,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
*/
|
||||
export enum ReactionType {
|
||||
Normal,
|
||||
Super,
|
||||
Burst,
|
||||
// eslint-disable @typescript-eslint/no-duplicate-enum-values
|
||||
/**
|
||||
* @deprecated Use {@link ReactionType.Burst} instead
|
||||
*/
|
||||
Super = Burst,
|
||||
// eslint-enable @typescript-eslint/no-duplicate-enum-values
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -755,6 +765,10 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -845,6 +859,7 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* Get threads before this id or ISO8601 timestamp
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
before?: Snowflake | string;
|
||||
/**
|
||||
* Max number of thread to return
|
||||
|
||||
162
deno/rest/v9/guild.ts
generated
162
deno/rest/v9/guild.ts
generated
@@ -18,6 +18,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -29,6 +30,12 @@ import type {
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
APIMessageSearchIndexNotReadyResponse,
|
||||
APIMessageSearchResult,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -381,11 +388,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +529,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,6 +542,151 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
||||
*
|
||||
* @remarks The Search Guild Messages endpoint is restricted according to whether the `MESSAGE_CONTENT` Privileged Intent is enabled for your application.
|
||||
*
|
||||
* If the entity you are searching is not yet indexed, the endpoint will return a 202 accepted response. The response body will not contain any search results, and will look similar to an error response:
|
||||
* ```json
|
||||
* {
|
||||
* "message": "Index not yet available. Try again later",
|
||||
* "code": 110000,
|
||||
* "documents_indexed": 0,
|
||||
* "retry_after": 2
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Due to speed optimizations, search may return slightly fewer results than the limit specified when messages have not been accessed for a long time.
|
||||
* Clients should not rely on the length of the `messages` array to paginate results.
|
||||
*
|
||||
* Additionally, when messages are actively being created or deleted, the `total_results` field may not be accurate.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface RESTGetAPIGuildMessagesSearchQuery {
|
||||
/**
|
||||
* Max number of messages to return (1-25)
|
||||
*
|
||||
* @defaultValue `25`
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Number to offset the returned messages by (max 9975)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* Get messages before this message ID
|
||||
*/
|
||||
max_id?: Snowflake;
|
||||
/**
|
||||
* Get messages after this message ID
|
||||
*/
|
||||
min_id?: Snowflake;
|
||||
/**
|
||||
* Max number of words to skip between matching tokens in the search `content` (max 100)
|
||||
*
|
||||
* @defaultValue `2`
|
||||
*/
|
||||
slop?: number;
|
||||
/**
|
||||
* Filter messages by content (max 1024 characters)
|
||||
*/
|
||||
content?: string;
|
||||
/**
|
||||
* Filter messages by these channels (max 500)
|
||||
*/
|
||||
channel_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by author type
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
author_type?: MessageSearchAuthorType[];
|
||||
/**
|
||||
* Filter messages by these authors (max 100)
|
||||
*/
|
||||
author_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these users (max 100)
|
||||
*/
|
||||
mentions?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these roles (max 100)
|
||||
*/
|
||||
mentions_role_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that do or do not mention `@everyone`
|
||||
*/
|
||||
mention_everyone?: boolean;
|
||||
/**
|
||||
* Filter messages that reply to these users (max 100)
|
||||
*/
|
||||
replied_to_user_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that reply to these messages (max 100)
|
||||
*/
|
||||
replied_to_message_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by whether they are or are not pinned
|
||||
*/
|
||||
pinned?: boolean;
|
||||
/**
|
||||
* Filter messages by whether or not they have specific things
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
has?: MessageSearchHasType[];
|
||||
/**
|
||||
* Filter messages by embed type
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
embed_type?: MessageSearchEmbedType[];
|
||||
/**
|
||||
* Filter messages by embed provider (case-sensitive, e.g. `Tenor`) (max 256 characters, max 100)
|
||||
*/
|
||||
embed_provider?: string[];
|
||||
/**
|
||||
* Filter messages by link hostname (e.g. `discordapp.com`) (max 256 characters, max 100)
|
||||
*/
|
||||
link_hostname?: string[];
|
||||
/**
|
||||
* Filter messages by attachment filename (max 1024 characters, max 100)
|
||||
*/
|
||||
attachment_filename?: string[];
|
||||
/**
|
||||
* Filter messages by attachment extension (e.g. `txt`) (max 256 characters, max 100)
|
||||
*/
|
||||
attachment_extension?: string[];
|
||||
/**
|
||||
* The sorting algorithm to use
|
||||
*
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
sort_by?: MessageSearchSortMode;
|
||||
/**
|
||||
* The direction to sort (`asc` or `desc`)
|
||||
*
|
||||
* @defaultValue `'desc'`
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
*/
|
||||
sort_order?: 'asc' | 'desc';
|
||||
/**
|
||||
* Whether to include results from age-restricted channels
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
include_nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export type RESTGetAPIGuildMessagesSearchResult = APIMessageSearchIndexNotReadyResponse | APIMessageSearchResult;
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
||||
8
deno/rest/v9/guildScheduledEvent.ts
generated
8
deno/rest/v9/guildScheduledEvent.ts
generated
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -98,8 +98,12 @@ export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
29
deno/rest/v9/mod.ts
generated
29
deno/rest/v9/mod.ts
generated
@@ -313,6 +313,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/messages/search`
|
||||
*/
|
||||
guildMessagesSearch(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/messages/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - PATCH `/guilds/{guild.id}/members/@me/nick`
|
||||
@@ -994,6 +1002,14 @@ export const Routes = {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/activity-instances/{instance_id}`
|
||||
*/
|
||||
applicationActivityInstance(applicationId: Snowflake, instanceId: string) {
|
||||
return `/applications/${applicationId}/activity-instances/${instanceId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
@@ -1107,8 +1123,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1121,9 +1137,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
@@ -1438,8 +1455,8 @@ export const CDNRoutes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) {
|
||||
CDNRoutes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1454,7 +1471,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
});
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
2
deno/rest/v9/oauth2.ts
generated
2
deno/rest/v9/oauth2.ts
generated
@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
||||
*/
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
|
||||
|
||||
2
deno/rest/v9/soundboard.ts
generated
2
deno/rest/v9/soundboard.ts
generated
@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v9/mod.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
||||
*/
|
||||
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
|
||||
export type RESTPostAPISendSoundboardSoundResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}
|
||||
|
||||
2
deno/rest/v9/user.ts
generated
2
deno/rest/v9/user.ts
generated
@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
|
||||
/**
|
||||
* The recipient to open a DM channel with
|
||||
*/
|
||||
recipient_id: string;
|
||||
recipient_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
deno/rest/v9/voice.ts
generated
2
deno/rest/v9/voice.ts
generated
@@ -51,7 +51,7 @@ export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
|
||||
9
deno/rest/v9/webhook.ts
generated
9
deno/rest/v9/webhook.ts
generated
@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTGetAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: string;
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
|
||||
*/
|
||||
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
|
||||
*/
|
||||
|
||||
1
deno/rpc/v10.ts
generated
1
deno/rpc/v10.ts
generated
@@ -2666,5 +2666,6 @@ export type RPCMessagePayload =
|
||||
| RPCCommandSetVoiceSettingsPayload
|
||||
| RPCCommandStartPurchasePayload
|
||||
| RPCCommandSubscribePayload
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
| RPCCommandUnsubscribePayload
|
||||
| RPCCommandValidateApplicationPayload;
|
||||
|
||||
4
deno/voice/v4.ts
generated
4
deno/voice/v4.ts
generated
@@ -156,6 +156,10 @@ export enum VoiceCloseCodes {
|
||||
* We didn't recognize your encryption
|
||||
*/
|
||||
UnknownEncryptionMode,
|
||||
/**
|
||||
* E2EE/DAVE protocol required
|
||||
*/
|
||||
EndToEndEncryptionDAVEProtocolRequired,
|
||||
/**
|
||||
* You sent a malformed request
|
||||
*/
|
||||
|
||||
4
deno/voice/v8.ts
generated
4
deno/voice/v8.ts
generated
@@ -152,6 +152,10 @@ export enum VoiceCloseCodes {
|
||||
* We didn't recognize your encryption
|
||||
*/
|
||||
UnknownEncryptionMode,
|
||||
/**
|
||||
* E2EE/DAVE protocol required
|
||||
*/
|
||||
EndToEndEncryptionDAVEProtocolRequired,
|
||||
/**
|
||||
* You sent a malformed request
|
||||
*/
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
104
gateway/v10.ts
104
gateway/v10.ts
@@ -331,12 +331,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -346,8 +351,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -382,7 +388,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -529,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -539,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -549,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -674,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -684,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -694,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -724,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -734,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -744,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -804,7 +839,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -814,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -824,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -999,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1009,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1226,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1236,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1326,7 +1382,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1520,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
|
||||
104
gateway/v9.ts
104
gateway/v9.ts
@@ -330,12 +330,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -345,8 +350,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -381,7 +387,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -528,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -538,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -548,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -673,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -683,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -693,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -723,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -733,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -743,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -803,7 +838,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -813,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -823,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -998,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1008,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1225,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1235,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1325,7 +1381,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1519,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.38.40",
|
||||
"version": "0.38.47",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"workspaces": [
|
||||
@@ -145,7 +145,7 @@
|
||||
"conventional-changelog-angular": "^8.0.0",
|
||||
"conventional-recommended-bump": "^11.1.0",
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-config-neon": "^0.4.0",
|
||||
"eslint-formatter-pretty": "^7.0.0",
|
||||
"eslint-import-resolver-typescript": "^4.4.2",
|
||||
"gen-esm-wrapper": "^1.1.3",
|
||||
@@ -160,7 +160,7 @@
|
||||
"ts-morph": "^27.0.0",
|
||||
"tsutils": "^3.21.0",
|
||||
"tsx": "^4.20.3",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^6.0.0",
|
||||
"typescript-eslint": "^8.33.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
@@ -207,9 +207,9 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"packageManager": "yarn@4.14.1",
|
||||
"volta": {
|
||||
"node": "24.13.1",
|
||||
"yarn": "4.12.0"
|
||||
"node": "24.15.0",
|
||||
"yarn": "4.14.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows kicking members
|
||||
*/
|
||||
|
||||
KickMembers: 1n << 1n,
|
||||
/**
|
||||
* Allows banning members
|
||||
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageGuild: 1n << 5n,
|
||||
/**
|
||||
* Allows for the addition of reactions to messages
|
||||
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
import type { ChannelType } from '../../../channel';
|
||||
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
channel_types?: ApplicationCommandOptionAllowedChannelType[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
@@ -154,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -317,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
@@ -347,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
|
||||
@@ -75,10 +75,15 @@ export type TextChannelType =
|
||||
|
||||
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export type ApplicationCommandOptionAllowedChannelType = Exclude<
|
||||
ChannelType,
|
||||
ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory
|
||||
>;
|
||||
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -361,7 +366,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker } from './sticker';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -638,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -695,6 +695,12 @@ export interface APIBaseGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { _NonNullableFields } from '../../utils/internals';
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIChannel, ChannelType } from './channel';
|
||||
import type { APIChannel, APIThreadChannel, APIThreadMember, ChannelType } from './channel';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
@@ -87,7 +87,7 @@ export interface APIBaseMessageNoChannel {
|
||||
*/
|
||||
mention_channels?: APIChannelMention[];
|
||||
/**
|
||||
* Any attached files
|
||||
* Any attached files that are not referenced in embeds or components
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
|
||||
*
|
||||
@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,6 +467,39 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Unset,
|
||||
Dark,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -580,9 +617,9 @@ export interface APIEmbed {
|
||||
/**
|
||||
* Thumbnail information
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
|
||||
*/
|
||||
thumbnail?: APIEmbedThumbnail;
|
||||
thumbnail?: APIEmbedImage;
|
||||
/**
|
||||
* Video information
|
||||
*
|
||||
@@ -609,6 +646,13 @@ export interface APIEmbed {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
|
||||
*/
|
||||
fields?: APIEmbedField[];
|
||||
/**
|
||||
* Embed flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -652,27 +696,30 @@ export enum EmbedType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
*/
|
||||
export interface APIEmbedThumbnail {
|
||||
export enum EmbedFlags {
|
||||
/**
|
||||
* Source url of thumbnail (only supports http(s) and attachments)
|
||||
* This embed is a fallback for a reply to an activity card
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A proxied url of the thumbnail
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of thumbnail
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Width of thumbnail
|
||||
*/
|
||||
width?: number;
|
||||
IsContentInventoryEntry = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
*/
|
||||
export enum EmbedMediaFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link APIEmbedImage} instead.
|
||||
*/
|
||||
export interface APIEmbedThumbnail extends APIEmbedImage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
|
||||
*/
|
||||
@@ -693,6 +740,33 @@ export interface APIEmbedVideo {
|
||||
* Width of video
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The video's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the video
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the video
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -715,6 +789,33 @@ export interface APIEmbedImage {
|
||||
* Width of image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The image's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the image
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the image
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -817,7 +918,7 @@ export interface APIAttachment {
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Description for the file
|
||||
* Description (alt text) for the file (max 1024 characters)
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
@@ -839,15 +940,27 @@ export interface APIAttachment {
|
||||
*/
|
||||
proxy_url: string;
|
||||
/**
|
||||
* Height of file (if image)
|
||||
* Height of file (if image or video)
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* Width of file (if image)
|
||||
* Width of file (if image or video)
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Whether this attachment is ephemeral
|
||||
*
|
||||
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
@@ -862,16 +975,48 @@ export interface APIAttachment {
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
/**
|
||||
* For Clips, array of users who were in the stream
|
||||
*/
|
||||
clip_participants?: APIUser[];
|
||||
/**
|
||||
* For Clips, when the clip was created
|
||||
*/
|
||||
clip_created_at?: string;
|
||||
/**
|
||||
* For Clips, the application in the stream, if recognized
|
||||
*/
|
||||
application?: APIApplication | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment is a Clip from a stream
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
|
||||
*/
|
||||
IsClip = 1 << 0,
|
||||
/**
|
||||
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
|
||||
*/
|
||||
IsThumbnail = 1 << 1,
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
/**
|
||||
* This attachment was marked as a spoiler and is blurred until clicked
|
||||
*/
|
||||
IsSpoiler = 1 << 3,
|
||||
/**
|
||||
* This attachment is an animated image
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1036,20 +1181,14 @@ export enum ComponentType {
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
@@ -1451,6 +1590,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable This enum is currently not documented by Discord
|
||||
*/
|
||||
export enum UnfurledMediaItemLoadingState {
|
||||
Unknown,
|
||||
Loading,
|
||||
@@ -1463,37 +1605,78 @@ export enum UnfurledMediaItemLoadingState {
|
||||
*/
|
||||
export interface APIUnfurledMediaItem {
|
||||
/**
|
||||
* Supports arbitrary urls and attachment://<filename> references
|
||||
* Supports arbitrary urls and `attachment://<filename>` references
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The proxied url of the media item
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* The width of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The width of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* The height of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The height of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string | null;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
placeholder_version?: number | null;
|
||||
/**
|
||||
* The media type of the content. This field is ignored and provided by the API as part of the response
|
||||
* The media type of the content
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string | null;
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
flags?: number;
|
||||
/**
|
||||
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
|
||||
* @unstable This field is currently not documented by Discord
|
||||
*/
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
/**
|
||||
* Unfurled media item flags combined as a bitfield
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: UnfurledMediaItemFlags;
|
||||
/**
|
||||
* The id of the uploaded attachment.
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @remarks Only present if the media item was uploaded as an attachment.
|
||||
*/
|
||||
attachment_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
*/
|
||||
export enum UnfurledMediaItemFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
|
||||
*
|
||||
@@ -1717,7 +1900,6 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
@@ -1738,7 +1920,6 @@ export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.R
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupOption {
|
||||
/**
|
||||
@@ -1763,7 +1944,6 @@ export interface APIRadioGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
@@ -1796,7 +1976,6 @@ export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentTyp
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
@@ -1821,7 +2000,6 @@ export interface APICheckboxGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
@@ -1972,3 +2150,198 @@ export interface APIMessagePin {
|
||||
*/
|
||||
message: APIMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
export enum MessageSearchAuthorType {
|
||||
/**
|
||||
* Return messages sent by user accounts
|
||||
*/
|
||||
User = 'user',
|
||||
/**
|
||||
* Return messages sent by bot accounts
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Return messages sent by webhooks
|
||||
*/
|
||||
Webhook = 'webhook',
|
||||
/**
|
||||
* Return messages not sent by user accounts
|
||||
*/
|
||||
NotUser = '-user',
|
||||
/**
|
||||
* Return messages not sent by bot accounts
|
||||
*/
|
||||
NotBot = '-bot',
|
||||
/**
|
||||
* Return messages not sent by webhooks
|
||||
*/
|
||||
NotWebhook = '-webhook',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
export enum MessageSearchHasType {
|
||||
/**
|
||||
* Return messages that have an image
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a sound attachment
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have a video
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have an attachment
|
||||
*/
|
||||
File = 'file',
|
||||
/**
|
||||
* Return messages that have a sent sticker
|
||||
*/
|
||||
Sticker = 'sticker',
|
||||
/**
|
||||
* Return messages that have an embed
|
||||
*/
|
||||
Embed = 'embed',
|
||||
/**
|
||||
* Return messages that have a link
|
||||
*/
|
||||
Link = 'link',
|
||||
/**
|
||||
* Return messages that have a poll
|
||||
*/
|
||||
Poll = 'poll',
|
||||
/**
|
||||
* Return messages that have a forwarded message
|
||||
*/
|
||||
Snapshot = 'snapshot',
|
||||
/**
|
||||
* Return messages that don't have an image
|
||||
*/
|
||||
NotImage = '-image',
|
||||
/**
|
||||
* Return messages that don't have a sound attachment
|
||||
*/
|
||||
NotSound = '-sound',
|
||||
/**
|
||||
* Return messages that don't have a video
|
||||
*/
|
||||
NotVideo = '-video',
|
||||
/**
|
||||
* Return messages that don't have an attachment
|
||||
*/
|
||||
NotFile = '-file',
|
||||
/**
|
||||
* Return messages that don't have a sent sticker
|
||||
*/
|
||||
NotSticker = '-sticker',
|
||||
/**
|
||||
* Return messages that don't have an embed
|
||||
*/
|
||||
NotEmbed = '-embed',
|
||||
/**
|
||||
* Return messages that don't have a link
|
||||
*/
|
||||
NotLink = '-link',
|
||||
/**
|
||||
* Return messages that don't have a poll
|
||||
*/
|
||||
NotPoll = '-poll',
|
||||
/**
|
||||
* Return messages that don't have a forwarded message
|
||||
*/
|
||||
NotSnapshot = '-snapshot',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks These do not correspond 1:1 to actual {@link https://docs.discord.com/developers/resources/message#embed-object-embed-types | embed types} and encompass a wider range of actual types.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
export enum MessageSearchEmbedType {
|
||||
/**
|
||||
* Return messages that have an image embed
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a video embed
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have a gifv embed
|
||||
*
|
||||
* @remarks Messages sent before February 24, 2026 may not be properly indexed under the `gif` embed type.
|
||||
*/
|
||||
Gif = 'gif',
|
||||
/**
|
||||
* Return messages that have a sound embed
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have an article embed
|
||||
*/
|
||||
Article = 'article',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
export enum MessageSearchSortMode {
|
||||
/**
|
||||
* Sort by the message creation time (default)
|
||||
*/
|
||||
Timestamp = 'timestamp',
|
||||
/**
|
||||
* Sort by the relevance of the message to the search query
|
||||
*/
|
||||
Relevance = 'relevance',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface APIMessageSearchIndexNotReadyResponse {
|
||||
message: string;
|
||||
code: number;
|
||||
documents_indexed: number;
|
||||
retry_after: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export interface APIMessageSearchResult {
|
||||
/**
|
||||
* Whether the guild is undergoing a deep historical indexing operation
|
||||
*/
|
||||
doing_deep_historical_index: boolean;
|
||||
/**
|
||||
* The number of documents that have been indexed during the current index operation, if any
|
||||
*/
|
||||
documents_indexed?: number;
|
||||
/**
|
||||
* The total number of results that match the query
|
||||
*/
|
||||
total_results: number;
|
||||
/**
|
||||
* A nested array of messages that match the query
|
||||
*
|
||||
* @remarks The nested array was used to provide surrounding context to search results. However, surrounding context is no longer returned.
|
||||
*/
|
||||
messages: Omit<APIMessage, 'reactions'>[][];
|
||||
/**
|
||||
* The threads that contain the returned messages
|
||||
*/
|
||||
threads?: APIThreadChannel[];
|
||||
/**
|
||||
* A thread member object for each returned thread the current user has joined
|
||||
*/
|
||||
members?: APIThreadMember[];
|
||||
}
|
||||
|
||||
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -194,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
|
||||
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
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',
|
||||
/**
|
||||
|
||||
@@ -154,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -317,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
@@ -347,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
|
||||
@@ -78,7 +78,7 @@ export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -361,7 +361,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker } from './sticker';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -630,7 +630,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -687,6 +687,12 @@ export interface APIBaseGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { _NonNullableFields } from '../../utils/internals';
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIChannel, ChannelType } from './channel';
|
||||
import type { APIChannel, APIThreadChannel, APIThreadMember, ChannelType } from './channel';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
@@ -86,7 +86,7 @@ export interface APIBaseMessageNoChannel {
|
||||
*/
|
||||
mention_channels?: APIChannelMention[];
|
||||
/**
|
||||
* Any attached files
|
||||
* Any attached files that are not referenced in embeds or components
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
|
||||
*
|
||||
@@ -248,6 +248,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +462,39 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Unset,
|
||||
Dark,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -575,9 +612,9 @@ export interface APIEmbed {
|
||||
/**
|
||||
* Thumbnail information
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure}
|
||||
*/
|
||||
thumbnail?: APIEmbedThumbnail;
|
||||
thumbnail?: APIEmbedImage;
|
||||
/**
|
||||
* Video information
|
||||
*
|
||||
@@ -604,6 +641,13 @@ export interface APIEmbed {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure}
|
||||
*/
|
||||
fields?: APIEmbedField[];
|
||||
/**
|
||||
* Embed flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,27 +691,30 @@ export enum EmbedType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags}
|
||||
*/
|
||||
export interface APIEmbedThumbnail {
|
||||
export enum EmbedFlags {
|
||||
/**
|
||||
* Source url of thumbnail (only supports http(s) and attachments)
|
||||
* This embed is a fallback for a reply to an activity card
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A proxied url of the thumbnail
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of thumbnail
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Width of thumbnail
|
||||
*/
|
||||
width?: number;
|
||||
IsContentInventoryEntry = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
*/
|
||||
export enum EmbedMediaFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link APIEmbedImage} instead.
|
||||
*/
|
||||
export interface APIEmbedThumbnail extends APIEmbedImage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure}
|
||||
*/
|
||||
@@ -688,6 +735,33 @@ export interface APIEmbedVideo {
|
||||
* Width of video
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The video's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the video
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the video
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -710,6 +784,33 @@ export interface APIEmbedImage {
|
||||
* Width of image
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* The image's media type
|
||||
*
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string;
|
||||
/**
|
||||
* ThumbHash placeholder of the image
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Description (alt text) for the image
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Embed media flags combined as a bitfield
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: EmbedMediaFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -812,7 +913,7 @@ export interface APIAttachment {
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Description for the file
|
||||
* Description (alt text) for the file (max 1024 characters)
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
@@ -834,15 +935,27 @@ export interface APIAttachment {
|
||||
*/
|
||||
proxy_url: string;
|
||||
/**
|
||||
* Height of file (if image)
|
||||
* Height of file (if image or video)
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* Width of file (if image)
|
||||
* Width of file (if image or video)
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*/
|
||||
placeholder_version?: number;
|
||||
/**
|
||||
* Whether this attachment is ephemeral
|
||||
*
|
||||
* @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists.
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
@@ -857,16 +970,48 @@ export interface APIAttachment {
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
/**
|
||||
* For Clips, array of users who were in the stream
|
||||
*/
|
||||
clip_participants?: APIUser[];
|
||||
/**
|
||||
* For Clips, when the clip was created
|
||||
*/
|
||||
clip_created_at?: string;
|
||||
/**
|
||||
* For Clips, the application in the stream, if recognized
|
||||
*/
|
||||
application?: APIApplication | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure-attachment-flags}
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags}
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment is a Clip from a stream
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/en-us/articles/16861982215703}
|
||||
*/
|
||||
IsClip = 1 << 0,
|
||||
/**
|
||||
* This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message
|
||||
*/
|
||||
IsThumbnail = 1 << 1,
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
/**
|
||||
* This attachment was marked as a spoiler and is blurred until clicked
|
||||
*/
|
||||
IsSpoiler = 1 << 3,
|
||||
/**
|
||||
* This attachment is an animated image
|
||||
*/
|
||||
IsAnimated = 1 << 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1031,20 +1176,14 @@ export enum ComponentType {
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
@@ -1446,6 +1585,9 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable This enum is currently not documented by Discord
|
||||
*/
|
||||
export enum UnfurledMediaItemLoadingState {
|
||||
Unknown,
|
||||
Loading,
|
||||
@@ -1458,37 +1600,78 @@ export enum UnfurledMediaItemLoadingState {
|
||||
*/
|
||||
export interface APIUnfurledMediaItem {
|
||||
/**
|
||||
* Supports arbitrary urls and attachment://<filename> references
|
||||
* Supports arbitrary urls and `attachment://<filename>` references
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The proxied url of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The proxied url of the media item
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* The width of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The width of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
width?: number | null;
|
||||
/**
|
||||
* The height of the media item. This field is ignored and provided by the API as part of the response
|
||||
* The height of the media item (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
height?: number | null;
|
||||
/**
|
||||
* ThumbHash placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://evanw.github.io/thumbhash/}
|
||||
*/
|
||||
placeholder?: string | null;
|
||||
/**
|
||||
* Version of the placeholder (if image or video)
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
*/
|
||||
placeholder_version?: number | null;
|
||||
/**
|
||||
* The media type of the content. This field is ignored and provided by the API as part of the response
|
||||
* The media type of the content
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://en.wikipedia.org/wiki/Media_type}
|
||||
*/
|
||||
content_type?: string | null;
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
flags?: number;
|
||||
/**
|
||||
* The id of the uploaded attachment. This field is ignored and provided by the API as part of the response
|
||||
* @unstable This field is currently not documented by Discord
|
||||
*/
|
||||
loading_state?: UnfurledMediaItemLoadingState;
|
||||
/**
|
||||
* Unfurled media item flags combined as a bitfield
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: UnfurledMediaItemFlags;
|
||||
/**
|
||||
* The id of the uploaded attachment.
|
||||
*
|
||||
* @remarks This field is ignored and provided by the API as part of the response.
|
||||
* @remarks Only present if the media item was uploaded as an attachment.
|
||||
*/
|
||||
attachment_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags}
|
||||
*/
|
||||
export enum UnfurledMediaItemFlags {
|
||||
/**
|
||||
* This image is animated
|
||||
*/
|
||||
IsAnimated = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* A Section is a top-level layout component that allows you to join text contextually with an accessory.
|
||||
*
|
||||
@@ -1712,7 +1895,6 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
@@ -1758,7 +1940,6 @@ export interface APIRadioGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
@@ -1791,7 +1972,6 @@ export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentTyp
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
@@ -1816,7 +1996,6 @@ export interface APICheckboxGroupOption {
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
* @unstable This component is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
@@ -1967,3 +2146,198 @@ export interface APIMessagePin {
|
||||
*/
|
||||
message: APIMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
export enum MessageSearchAuthorType {
|
||||
/**
|
||||
* Return messages sent by user accounts
|
||||
*/
|
||||
User = 'user',
|
||||
/**
|
||||
* Return messages sent by bot accounts
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Return messages sent by webhooks
|
||||
*/
|
||||
Webhook = 'webhook',
|
||||
/**
|
||||
* Return messages not sent by user accounts
|
||||
*/
|
||||
NotUser = '-user',
|
||||
/**
|
||||
* Return messages not sent by bot accounts
|
||||
*/
|
||||
NotBot = '-bot',
|
||||
/**
|
||||
* Return messages not sent by webhooks
|
||||
*/
|
||||
NotWebhook = '-webhook',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
export enum MessageSearchHasType {
|
||||
/**
|
||||
* Return messages that have an image
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a sound attachment
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have a video
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have an attachment
|
||||
*/
|
||||
File = 'file',
|
||||
/**
|
||||
* Return messages that have a sent sticker
|
||||
*/
|
||||
Sticker = 'sticker',
|
||||
/**
|
||||
* Return messages that have an embed
|
||||
*/
|
||||
Embed = 'embed',
|
||||
/**
|
||||
* Return messages that have a link
|
||||
*/
|
||||
Link = 'link',
|
||||
/**
|
||||
* Return messages that have a poll
|
||||
*/
|
||||
Poll = 'poll',
|
||||
/**
|
||||
* Return messages that have a forwarded message
|
||||
*/
|
||||
Snapshot = 'snapshot',
|
||||
/**
|
||||
* Return messages that don't have an image
|
||||
*/
|
||||
NotImage = '-image',
|
||||
/**
|
||||
* Return messages that don't have a sound attachment
|
||||
*/
|
||||
NotSound = '-sound',
|
||||
/**
|
||||
* Return messages that don't have a video
|
||||
*/
|
||||
NotVideo = '-video',
|
||||
/**
|
||||
* Return messages that don't have an attachment
|
||||
*/
|
||||
NotFile = '-file',
|
||||
/**
|
||||
* Return messages that don't have a sent sticker
|
||||
*/
|
||||
NotSticker = '-sticker',
|
||||
/**
|
||||
* Return messages that don't have an embed
|
||||
*/
|
||||
NotEmbed = '-embed',
|
||||
/**
|
||||
* Return messages that don't have a link
|
||||
*/
|
||||
NotLink = '-link',
|
||||
/**
|
||||
* Return messages that don't have a poll
|
||||
*/
|
||||
NotPoll = '-poll',
|
||||
/**
|
||||
* Return messages that don't have a forwarded message
|
||||
*/
|
||||
NotSnapshot = '-snapshot',
|
||||
}
|
||||
|
||||
/**
|
||||
* @remarks These do not correspond 1:1 to actual {@link https://docs.discord.com/developers/resources/message#embed-object-embed-types | embed types} and encompass a wider range of actual types.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
export enum MessageSearchEmbedType {
|
||||
/**
|
||||
* Return messages that have an image embed
|
||||
*/
|
||||
Image = 'image',
|
||||
/**
|
||||
* Return messages that have a video embed
|
||||
*/
|
||||
Video = 'video',
|
||||
/**
|
||||
* Return messages that have a gifv embed
|
||||
*
|
||||
* @remarks Messages sent before February 24, 2026 may not be properly indexed under the `gif` embed type.
|
||||
*/
|
||||
Gif = 'gif',
|
||||
/**
|
||||
* Return messages that have a sound embed
|
||||
*/
|
||||
Sound = 'sound',
|
||||
/**
|
||||
* Return messages that have an article embed
|
||||
*/
|
||||
Article = 'article',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
export enum MessageSearchSortMode {
|
||||
/**
|
||||
* Sort by the message creation time (default)
|
||||
*/
|
||||
Timestamp = 'timestamp',
|
||||
/**
|
||||
* Sort by the relevance of the message to the search query
|
||||
*/
|
||||
Relevance = 'relevance',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface APIMessageSearchIndexNotReadyResponse {
|
||||
message: string;
|
||||
code: number;
|
||||
documents_indexed: number;
|
||||
retry_after: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export interface APIMessageSearchResult {
|
||||
/**
|
||||
* Whether the guild is undergoing a deep historical indexing operation
|
||||
*/
|
||||
doing_deep_historical_index: boolean;
|
||||
/**
|
||||
* The number of documents that have been indexed during the current index operation, if any
|
||||
*/
|
||||
documents_indexed?: number;
|
||||
/**
|
||||
* The total number of results that match the query
|
||||
*/
|
||||
total_results: number;
|
||||
/**
|
||||
* A nested array of messages that match the query
|
||||
*
|
||||
* @remarks The nested array was used to provide surrounding context to search results. However, surrounding context is no longer returned.
|
||||
*/
|
||||
messages: Omit<APIMessage, 'reactions'>[][];
|
||||
/**
|
||||
* The threads that contain the returned messages
|
||||
*/
|
||||
threads?: APIThreadChannel[];
|
||||
/**
|
||||
* A thread member object for each returned thread the current user has joined
|
||||
*/
|
||||
members?: APIThreadMember[];
|
||||
}
|
||||
|
||||
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -194,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
|
||||
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
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',
|
||||
/**
|
||||
|
||||
@@ -75,8 +75,16 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnderMinimumAge = 20_024,
|
||||
|
||||
ChannelSendRateLimit = 20_028,
|
||||
ServerSendRateLimit,
|
||||
ChannelWriteRateLimit = 20_028,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ChannelWriteRateLimit} instead
|
||||
*/
|
||||
ChannelSendRateLimit = ChannelWriteRateLimit,
|
||||
ServerWriteRateLimit = 20_029,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ServerWriteRateLimit} instead
|
||||
*/
|
||||
ServerSendRateLimit = ServerWriteRateLimit,
|
||||
|
||||
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20_031,
|
||||
|
||||
@@ -173,6 +181,9 @@ export enum RESTJSONErrorCodes {
|
||||
GuildWidgetDisabled,
|
||||
CannotEditMessageAuthoredByAnotherUser,
|
||||
CannotSendAnEmptyMessage,
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUser,
|
||||
CannotSendMessagesInNonTextChannel,
|
||||
ChannelVerificationLevelTooHighForYouToGainAccess,
|
||||
@@ -246,7 +257,11 @@ export enum RESTJSONErrorCodes {
|
||||
OwnerCannotBePendingMember = 50_131,
|
||||
OwnershipCannotBeMovedToABotUser,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50_138,
|
||||
FailedToResizeAssetBelowTheMaximumSize = 50_138,
|
||||
/**
|
||||
* @deprecated This name is incorrect. Use {@link RESTJSONErrorCodes.FailedToResizeAssetBelowTheMaximumSize} instead
|
||||
*/
|
||||
FailedToResizeAssetBelowTheMinimumSize = FailedToResizeAssetBelowTheMaximumSize,
|
||||
|
||||
CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50_144,
|
||||
CannotConvertBetweenPremiumEmojiAndNormalEmoji,
|
||||
@@ -266,6 +281,11 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
ProvidedFileDoesNotHaveAValidDuration = 50_192,
|
||||
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50_278,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50_600,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60_003,
|
||||
@@ -275,7 +295,8 @@ export enum RESTJSONErrorCodes {
|
||||
ReactionWasBlocked = 90_001,
|
||||
UserCannotUseBurstReactions,
|
||||
|
||||
ApplicationNotYetAvailable = 110_001,
|
||||
IndexNotYetAvailable = 110_000,
|
||||
ApplicationNotYetAvailable,
|
||||
|
||||
APIResourceOverloaded = 130_000,
|
||||
|
||||
@@ -288,6 +309,8 @@ export enum RESTJSONErrorCodes {
|
||||
MaximumActiveThreads,
|
||||
MaximumActiveAnnouncementThreads,
|
||||
|
||||
CannotForwardMessageWithUnreadableContent = 160_014,
|
||||
|
||||
InvalidJSONForUploadedLottieFile = 170_001,
|
||||
UploadedLottiesCannotContainRasterizedImages,
|
||||
StickerMaximumFramerateExceeded,
|
||||
@@ -324,8 +347,28 @@ export enum RESTJSONErrorCodes {
|
||||
CannotUseAnEmojiIncludedWithThePoll,
|
||||
|
||||
CannotExpireANonPollMessage = 520_006,
|
||||
|
||||
ProvisionalAccountsPermissionNotGranted = 530_000,
|
||||
IdTokenJWTExpired,
|
||||
IdTokenJWTIssuerMismatch,
|
||||
IdTokenJWTAudienceMismatch,
|
||||
IdTokenJWTIssuedTooLongAgo,
|
||||
|
||||
FailedToGenerateUniqueUsername = 530_006,
|
||||
InvalidClientSecret,
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Error Codes that represent "Cannot send messages to this user".
|
||||
* Discord uses two different error codes for this error:
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} (50_007)
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} (50_278)
|
||||
*/
|
||||
export const CannotSendMessagesToThisUserErrorCodes = [
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds,
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#locales}
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application';
|
||||
import type {
|
||||
APIActivityInstance,
|
||||
APIApplication,
|
||||
APIApplicationRoleConnectionMetadata,
|
||||
} from '../../payloads/v10/application';
|
||||
import type { _Nullable, _StrictPartial } from '../../utils/internals';
|
||||
|
||||
/**
|
||||
@@ -25,11 +29,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
@@ -43,3 +49,8 @@ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance}
|
||||
*/
|
||||
export type RESTGetAPIApplicationActivityInstanceResult = APIActivityInstance;
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -338,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,7 +411,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
*/
|
||||
export enum ReactionType {
|
||||
Normal,
|
||||
Super,
|
||||
Burst,
|
||||
// eslint-disable @typescript-eslint/no-duplicate-enum-values
|
||||
/**
|
||||
* @deprecated Use {@link ReactionType.Burst} instead
|
||||
*/
|
||||
Super = Burst,
|
||||
// eslint-enable @typescript-eslint/no-duplicate-enum-values
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -742,6 +752,10 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -832,6 +846,7 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* Get threads before this id or ISO8601 timestamp
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
before?: Snowflake | string;
|
||||
/**
|
||||
* Max number of thread to return
|
||||
|
||||
@@ -20,6 +20,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -29,6 +30,12 @@ import type {
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
APIMessageSearchIndexNotReadyResponse,
|
||||
APIMessageSearchResult,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
} from '../../payloads/v10/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -381,11 +388,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +529,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,6 +542,151 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
||||
*
|
||||
* @remarks The Search Guild Messages endpoint is restricted according to whether the `MESSAGE_CONTENT` Privileged Intent is enabled for your application.
|
||||
*
|
||||
* If the entity you are searching is not yet indexed, the endpoint will return a 202 accepted response. The response body will not contain any search results, and will look similar to an error response:
|
||||
* ```json
|
||||
* {
|
||||
* "message": "Index not yet available. Try again later",
|
||||
* "code": 110000,
|
||||
* "documents_indexed": 0,
|
||||
* "retry_after": 2
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Due to speed optimizations, search may return slightly fewer results than the limit specified when messages have not been accessed for a long time.
|
||||
* Clients should not rely on the length of the `messages` array to paginate results.
|
||||
*
|
||||
* Additionally, when messages are actively being created or deleted, the `total_results` field may not be accurate.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface RESTGetAPIGuildMessagesSearchQuery {
|
||||
/**
|
||||
* Max number of messages to return (1-25)
|
||||
*
|
||||
* @defaultValue `25`
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Number to offset the returned messages by (max 9975)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* Get messages before this message ID
|
||||
*/
|
||||
max_id?: Snowflake;
|
||||
/**
|
||||
* Get messages after this message ID
|
||||
*/
|
||||
min_id?: Snowflake;
|
||||
/**
|
||||
* Max number of words to skip between matching tokens in the search `content` (max 100)
|
||||
*
|
||||
* @defaultValue `2`
|
||||
*/
|
||||
slop?: number;
|
||||
/**
|
||||
* Filter messages by content (max 1024 characters)
|
||||
*/
|
||||
content?: string;
|
||||
/**
|
||||
* Filter messages by these channels (max 500)
|
||||
*/
|
||||
channel_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by author type
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
author_type?: MessageSearchAuthorType[];
|
||||
/**
|
||||
* Filter messages by these authors (max 100)
|
||||
*/
|
||||
author_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these users (max 100)
|
||||
*/
|
||||
mentions?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these roles (max 100)
|
||||
*/
|
||||
mentions_role_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that do or do not mention `@everyone`
|
||||
*/
|
||||
mention_everyone?: boolean;
|
||||
/**
|
||||
* Filter messages that reply to these users (max 100)
|
||||
*/
|
||||
replied_to_user_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that reply to these messages (max 100)
|
||||
*/
|
||||
replied_to_message_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by whether they are or are not pinned
|
||||
*/
|
||||
pinned?: boolean;
|
||||
/**
|
||||
* Filter messages by whether or not they have specific things
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
has?: MessageSearchHasType[];
|
||||
/**
|
||||
* Filter messages by embed type
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
embed_type?: MessageSearchEmbedType[];
|
||||
/**
|
||||
* Filter messages by embed provider (case-sensitive, e.g. `Tenor`) (max 256 characters, max 100)
|
||||
*/
|
||||
embed_provider?: string[];
|
||||
/**
|
||||
* Filter messages by link hostname (e.g. `discordapp.com`) (max 256 characters, max 100)
|
||||
*/
|
||||
link_hostname?: string[];
|
||||
/**
|
||||
* Filter messages by attachment filename (max 1024 characters, max 100)
|
||||
*/
|
||||
attachment_filename?: string[];
|
||||
/**
|
||||
* Filter messages by attachment extension (e.g. `txt`) (max 256 characters, max 100)
|
||||
*/
|
||||
attachment_extension?: string[];
|
||||
/**
|
||||
* The sorting algorithm to use
|
||||
*
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
sort_by?: MessageSearchSortMode;
|
||||
/**
|
||||
* The direction to sort (`asc` or `desc`)
|
||||
*
|
||||
* @defaultValue `'desc'`
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
*/
|
||||
sort_order?: 'asc' | 'desc';
|
||||
/**
|
||||
* Whether to include results from age-restricted channels
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
include_nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export type RESTGetAPIGuildMessagesSearchResult = APIMessageSearchIndexNotReadyResponse | APIMessageSearchResult;
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
||||
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -98,8 +98,12 @@ export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
@@ -313,6 +313,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/messages/search`
|
||||
*/
|
||||
guildMessagesSearch(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/messages/search` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - PATCH `/guilds/{guild.id}/members/@me/nick`
|
||||
@@ -985,6 +993,14 @@ export const Routes = {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/activity-instances/{instance_id}`
|
||||
*/
|
||||
applicationActivityInstance(applicationId: Snowflake, instanceId: string) {
|
||||
return `/applications/${applicationId}/activity-instances/${instanceId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
@@ -1098,8 +1114,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1112,9 +1128,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
@@ -1429,8 +1446,8 @@ export const CDNRoutes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) {
|
||||
CDNRoutes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -1445,7 +1462,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) {
|
||||
});
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
||||
*/
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
|
||||
export type RESTGetAPIOAuth2CurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v10/index';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
||||
*/
|
||||
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
|
||||
export type RESTPostAPISendSoundboardSoundResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}
|
||||
|
||||
@@ -101,7 +101,7 @@ export interface RESTPostAPICurrentUserCreateDMChannelJSONBody {
|
||||
/**
|
||||
* The recipient to open a DM channel with
|
||||
*/
|
||||
recipient_id: string;
|
||||
recipient_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
|
||||
@@ -256,7 +256,7 @@ export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTGetAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: string;
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +309,13 @@ export type RESTPatchAPIWebhookWithTokenMessageQuery = Pick<
|
||||
*/
|
||||
export type RESTPatchAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/webhook#delete-webhook-message-query-string-params}
|
||||
*/
|
||||
export interface RESTDeleteAPIWebhookWithTokenMessageQuery {
|
||||
thread_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}
|
||||
*/
|
||||
|
||||
@@ -522,8 +522,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -536,9 +536,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
@@ -778,8 +778,8 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
for (const [key, fn] of Object.entries(Routes)) {
|
||||
Routes[key] = (...args: (boolean | number | string | undefined)[]) => {
|
||||
for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) {
|
||||
Routes[key] = ((...args: any[]) => {
|
||||
const escaped = args.map((arg) => {
|
||||
if (arg) {
|
||||
// Skip already "safe" urls
|
||||
@@ -792,9 +792,10 @@ for (const [key, fn] of Object.entries(Routes)) {
|
||||
|
||||
return arg;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-useless-call
|
||||
return fn.call(null, ...escaped);
|
||||
};
|
||||
}) as any;
|
||||
}
|
||||
|
||||
// Freeze the object so it can't be changed
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application';
|
||||
import type {
|
||||
APIActivityInstance,
|
||||
APIApplication,
|
||||
APIApplicationRoleConnectionMetadata,
|
||||
} from '../../payloads/v9/application';
|
||||
import type { _StrictPartial, _Nullable } from '../../utils/internals';
|
||||
|
||||
/**
|
||||
@@ -25,11 +29,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
@@ -43,3 +49,8 @@ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance}
|
||||
*/
|
||||
export type RESTGetAPIApplicationActivityInstanceResult = APIActivityInstance;
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -345,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,7 +418,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
*/
|
||||
export enum ReactionType {
|
||||
Normal,
|
||||
Super,
|
||||
Burst,
|
||||
// eslint-disable @typescript-eslint/no-duplicate-enum-values
|
||||
/**
|
||||
* @deprecated Use {@link ReactionType.Burst} instead
|
||||
*/
|
||||
Super = Burst,
|
||||
// eslint-enable @typescript-eslint/no-duplicate-enum-values
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -755,6 +765,10 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -845,6 +859,7 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* Get threads before this id or ISO8601 timestamp
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
before?: Snowflake | string;
|
||||
/**
|
||||
* Max number of thread to return
|
||||
|
||||
162
rest/v9/guild.ts
162
rest/v9/guild.ts
@@ -18,6 +18,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -29,6 +30,12 @@ import type {
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
APIMessageSearchIndexNotReadyResponse,
|
||||
APIMessageSearchResult,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
} from '../../payloads/v9/index';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -381,11 +388,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +529,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -529,6 +542,151 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
||||
*
|
||||
* @remarks The Search Guild Messages endpoint is restricted according to whether the `MESSAGE_CONTENT` Privileged Intent is enabled for your application.
|
||||
*
|
||||
* If the entity you are searching is not yet indexed, the endpoint will return a 202 accepted response. The response body will not contain any search results, and will look similar to an error response:
|
||||
* ```json
|
||||
* {
|
||||
* "message": "Index not yet available. Try again later",
|
||||
* "code": 110000,
|
||||
* "documents_indexed": 0,
|
||||
* "retry_after": 2
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Due to speed optimizations, search may return slightly fewer results than the limit specified when messages have not been accessed for a long time.
|
||||
* Clients should not rely on the length of the `messages` array to paginate results.
|
||||
*
|
||||
* Additionally, when messages are actively being created or deleted, the `total_results` field may not be accurate.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface RESTGetAPIGuildMessagesSearchQuery {
|
||||
/**
|
||||
* Max number of messages to return (1-25)
|
||||
*
|
||||
* @defaultValue `25`
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Number to offset the returned messages by (max 9975)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* Get messages before this message ID
|
||||
*/
|
||||
max_id?: Snowflake;
|
||||
/**
|
||||
* Get messages after this message ID
|
||||
*/
|
||||
min_id?: Snowflake;
|
||||
/**
|
||||
* Max number of words to skip between matching tokens in the search `content` (max 100)
|
||||
*
|
||||
* @defaultValue `2`
|
||||
*/
|
||||
slop?: number;
|
||||
/**
|
||||
* Filter messages by content (max 1024 characters)
|
||||
*/
|
||||
content?: string;
|
||||
/**
|
||||
* Filter messages by these channels (max 500)
|
||||
*/
|
||||
channel_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by author type
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
author_type?: MessageSearchAuthorType[];
|
||||
/**
|
||||
* Filter messages by these authors (max 100)
|
||||
*/
|
||||
author_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these users (max 100)
|
||||
*/
|
||||
mentions?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these roles (max 100)
|
||||
*/
|
||||
mentions_role_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that do or do not mention `@everyone`
|
||||
*/
|
||||
mention_everyone?: boolean;
|
||||
/**
|
||||
* Filter messages that reply to these users (max 100)
|
||||
*/
|
||||
replied_to_user_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that reply to these messages (max 100)
|
||||
*/
|
||||
replied_to_message_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by whether they are or are not pinned
|
||||
*/
|
||||
pinned?: boolean;
|
||||
/**
|
||||
* Filter messages by whether or not they have specific things
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
has?: MessageSearchHasType[];
|
||||
/**
|
||||
* Filter messages by embed type
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
embed_type?: MessageSearchEmbedType[];
|
||||
/**
|
||||
* Filter messages by embed provider (case-sensitive, e.g. `Tenor`) (max 256 characters, max 100)
|
||||
*/
|
||||
embed_provider?: string[];
|
||||
/**
|
||||
* Filter messages by link hostname (e.g. `discordapp.com`) (max 256 characters, max 100)
|
||||
*/
|
||||
link_hostname?: string[];
|
||||
/**
|
||||
* Filter messages by attachment filename (max 1024 characters, max 100)
|
||||
*/
|
||||
attachment_filename?: string[];
|
||||
/**
|
||||
* Filter messages by attachment extension (e.g. `txt`) (max 256 characters, max 100)
|
||||
*/
|
||||
attachment_extension?: string[];
|
||||
/**
|
||||
* The sorting algorithm to use
|
||||
*
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
sort_by?: MessageSearchSortMode;
|
||||
/**
|
||||
* The direction to sort (`asc` or `desc`)
|
||||
*
|
||||
* @defaultValue `'desc'`
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
*/
|
||||
sort_order?: 'asc' | 'desc';
|
||||
/**
|
||||
* Whether to include results from age-restricted channels
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
include_nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export type RESTGetAPIGuildMessagesSearchResult = APIMessageSearchIndexNotReadyResponse | APIMessageSearchResult;
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
||||
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -98,8 +98,12 @@ export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user