mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 19:30:09 +00:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
803dcd7bdd | ||
|
|
62de95fd6f | ||
|
|
4f46175c3c | ||
|
|
150dc46b87 | ||
|
|
c008413a8a | ||
|
|
9564941b3a | ||
|
|
f329a80a6b | ||
|
|
0cfe05dad8 | ||
|
|
4473293b0e | ||
|
|
a28b2d749e | ||
|
|
55efcca4f8 | ||
|
|
6f541d58d2 | ||
|
|
71caf7cfc6 | ||
|
|
819d85207a | ||
|
|
7f797b2b4b | ||
|
|
470fe189ae | ||
|
|
b4226bb708 | ||
|
|
72a78a4f6f | ||
|
|
957488134e | ||
|
|
5327f3f38c | ||
|
|
ca05ee5eb2 | ||
|
|
1d8399d925 | ||
|
|
a8efb1949a | ||
|
|
c0f68e9509 | ||
|
|
28ed3701e6 | ||
|
|
4640f80274 | ||
|
|
ba08061917 | ||
|
|
f51c2d95ae | ||
|
|
984eacdef6 | ||
|
|
0a914acd11 | ||
|
|
3f1d9b47aa | ||
|
|
8541201a96 | ||
|
|
17f42e0b38 | ||
|
|
5515e2914a | ||
|
|
ecef5b492b | ||
|
|
c71258ceb4 | ||
|
|
a4cdbbfdf8 | ||
|
|
06fb47c51d | ||
|
|
cc47220e87 | ||
|
|
4defa9ea12 | ||
|
|
1290c942ab | ||
|
|
4309463634 | ||
|
|
1b8f62fc98 | ||
|
|
32ba5ce36c | ||
|
|
1598baf0c3 | ||
|
|
ceb2f033f7 | ||
|
|
36e3d156c6 | ||
|
|
a26629c0e8 | ||
|
|
018d889d9a | ||
|
|
1eb01618a3 | ||
|
|
31c8549fe3 | ||
|
|
729d4bf719 | ||
|
|
19beae59e0 | ||
|
|
d24e928051 | ||
|
|
27bebd978b | ||
|
|
b919e721bc | ||
|
|
138b9f2bf2 | ||
|
|
382fb0317c | ||
|
|
e095e09b0b | ||
|
|
9212ab8b99 | ||
|
|
460b72c518 | ||
|
|
52611242fb | ||
|
|
d2bb76574b | ||
|
|
1071d24362 | ||
|
|
ae8503f0e7 | ||
|
|
773556aa32 | ||
|
|
06ee56475c | ||
|
|
a1c26c2372 | ||
|
|
387f37f1d5 | ||
|
|
874f13573b | ||
|
|
289c53ab31 | ||
|
|
f556455ba6 | ||
|
|
7f9a7e5b94 | ||
|
|
47f78bcc69 | ||
|
|
488b5adf04 | ||
|
|
82d7024dfd | ||
|
|
9d6ae11e30 | ||
|
|
3bb2821e8d | ||
|
|
201cb13b6d | ||
|
|
844ad568c4 | ||
|
|
374f690860 | ||
|
|
e5d8050f39 | ||
|
|
300e31b514 |
10
.github/CODEOWNERS
vendored
Normal file
10
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
* @vladfrangu
|
||||
|
||||
/*.ts @discordjs/discord-api-types @discordjs/core
|
||||
gateway/ @discordjs/discord-api-types @discordjs/core
|
||||
payloads/ @discordjs/discord-api-types @discordjs/core
|
||||
rest/ @discordjs/discord-api-types @discordjs/core
|
||||
rpc/ @discordjs/discord-api-types @discordjs/core
|
||||
tests/ @discordjs/discord-api-types @discordjs/core
|
||||
utils/ @discordjs/discord-api-types @discordjs/core
|
||||
voice/ @discordjs/discord-api-types @discordjs/core
|
||||
8
.github/auto_assign.yml
vendored
8
.github/auto_assign.yml
vendored
@@ -1,8 +0,0 @@
|
||||
addReviewers: true
|
||||
reviewers:
|
||||
- iCrawl
|
||||
- SpaceEEC
|
||||
- kyranet
|
||||
- vladfrangu
|
||||
numberOfReviewers: 0
|
||||
runOnDraft: true
|
||||
4
.github/workflows/pr-automation.yml
vendored
4
.github/workflows/pr-automation.yml
vendored
@@ -12,7 +12,3 @@ jobs:
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
sync-labels: true
|
||||
|
||||
- name: Automatically assign reviewers
|
||||
if: github.event.action == 'opened'
|
||||
uses: kentaro-m/auto-assign-action@v1.2.4
|
||||
|
||||
@@ -15,3 +15,6 @@ website/build
|
||||
*.js
|
||||
*.d.ts
|
||||
*.mjs
|
||||
|
||||
# Miscellaneous
|
||||
CODEOWNERS
|
||||
|
||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -2,9 +2,9 @@
|
||||
"files.eol": "\n",
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": false,
|
||||
"source.fixAll": true,
|
||||
"source.fixAll.eslint": true
|
||||
"source.organizeImports": "never",
|
||||
"source.fixAll": "explicit",
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"cSpell.enableFiletypes": ["mdx"]
|
||||
}
|
||||
|
||||
168
CHANGELOG.md
168
CHANGELOG.md
@@ -1,3 +1,171 @@
|
||||
## [0.37.71](https://github.com/discordjs/discord-api-types/compare/0.37.70...0.37.71) (2024-02-26)
|
||||
|
||||
### Features
|
||||
|
||||
- add initial support for super reactions ([#744](https://github.com/discordjs/discord-api-types/issues/744)) ([150dc46](https://github.com/discordjs/discord-api-types/commit/150dc46b8739ca9cf10a46bb48d390f70c679b6e))
|
||||
|
||||
## [0.37.70](https://github.com/discordjs/discord-api-types/compare/0.37.69...0.37.70) (2024-02-15)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIChannelMessageJSONBody:** add enforce_nonce ([#874](https://github.com/discordjs/discord-api-types/issues/874)) ([9564941](https://github.com/discordjs/discord-api-types/commit/9564941b3ae51c8bc9b1f915d66b43775089db18))
|
||||
|
||||
## [0.37.69](https://github.com/discordjs/discord-api-types/compare/0.37.68...0.37.69) (2024-02-08)
|
||||
|
||||
### Features
|
||||
|
||||
- **Locale:** add `SpanishLATAM` ([#859](https://github.com/discordjs/discord-api-types/issues/859)) ([0cfe05d](https://github.com/discordjs/discord-api-types/commit/0cfe05dad8271513a2ef58e4f183c530555c7c2d))
|
||||
|
||||
## [0.37.68](https://github.com/discordjs/discord-api-types/compare/0.37.67...0.37.68) (2024-02-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **CDNRoutes:** fix store page wrong extension ([#867](https://github.com/discordjs/discord-api-types/issues/867)) ([6f541d5](https://github.com/discordjs/discord-api-types/commit/6f541d58d278f1e610916250c003c1344831e3ad))
|
||||
- **CDNRoutes:** make format optional and default to png ([#869](https://github.com/discordjs/discord-api-types/issues/869)) ([55efcca](https://github.com/discordjs/discord-api-types/commit/55efcca4f8480f96243d9d802ce632833ac8e3ff))
|
||||
|
||||
## [0.37.67](https://github.com/discordjs/discord-api-types/compare/0.37.66...0.37.67) (2023-12-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayThreadDispatch:** properly type thread create/update/delete dispatches ([#861](https://github.com/discordjs/discord-api-types/issues/861)) ([819d852](https://github.com/discordjs/discord-api-types/commit/819d85207ae7e07322e404a5ef9e3eb283b4aa03))
|
||||
|
||||
## [0.37.66](https://github.com/discordjs/discord-api-types/compare/0.37.65...0.37.66) (2023-12-07)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIWebhookWithTokenJSONBody:** add `applied_tags` ([#855](https://github.com/discordjs/discord-api-types/issues/855)) ([b4226bb](https://github.com/discordjs/discord-api-types/commit/b4226bb708763ebe04d9f7abcafa148bb5588ba4))
|
||||
|
||||
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
|
||||
|
||||
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
|
||||
|
||||
### Features
|
||||
|
||||
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
|
||||
|
||||
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
|
||||
|
||||
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
|
||||
|
||||
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
|
||||
|
||||
### Features
|
||||
|
||||
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
|
||||
|
||||
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
|
||||
|
||||
### Features
|
||||
|
||||
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
|
||||
|
||||
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
|
||||
|
||||
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
|
||||
|
||||
### Features
|
||||
|
||||
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
|
||||
|
||||
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
|
||||
|
||||
### Features
|
||||
|
||||
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
|
||||
|
||||
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
|
||||
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
|
||||
|
||||
### Features
|
||||
|
||||
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
|
||||
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
|
||||
|
||||
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
|
||||
|
||||
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
|
||||
|
||||
### Features
|
||||
|
||||
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
|
||||
|
||||
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
|
||||
|
||||
### Features
|
||||
|
||||
- **GatewayActivityUpdateData:** allow sending state ([#801](https://github.com/discordjs/discord-api-types/issues/801)) ([e095e09](https://github.com/discordjs/discord-api-types/commit/e095e09b0b5e3c85107705de124858e1fbb29bf0))
|
||||
|
||||
## [0.37.52](https://github.com/discordjs/discord-api-types/compare/0.37.51...0.37.52) (2023-08-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPatchAPIChannelJSONBody:** `available_tags` requires `name` only ([#802](https://github.com/discordjs/discord-api-types/issues/802)) ([5261124](https://github.com/discordjs/discord-api-types/commit/52611242fb73ac56d8cfedd8953ce558bf6e842e))
|
||||
|
||||
## [0.37.51](https://github.com/discordjs/discord-api-types/compare/0.37.50...0.37.51) (2023-07-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Presence:** cannot receive invisible status ([#799](https://github.com/discordjs/discord-api-types/issues/799)) ([1071d24](https://github.com/discordjs/discord-api-types/commit/1071d24362bbf1d39d528f73c3233f22aee99778))
|
||||
|
||||
## [0.37.50](https://github.com/discordjs/discord-api-types/compare/0.37.49...0.37.50) (2023-07-20)
|
||||
|
||||
### Features
|
||||
|
||||
- onboarding updates, mode field, and error codes ([#773](https://github.com/discordjs/discord-api-types/issues/773)) ([773556a](https://github.com/discordjs/discord-api-types/commit/773556aa329750839262874b4af6c4113d9906d3))
|
||||
|
||||
## [0.37.49](https://github.com/discordjs/discord-api-types/compare/0.37.48...0.37.49) (2023-07-17)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIApplication:** approx guild count and get self application endpoint ([#728](https://github.com/discordjs/discord-api-types/issues/728)) ([874f135](https://github.com/discordjs/discord-api-types/commit/874f13573b35fe1e5e40549d007aebe5ec3bbcc0))
|
||||
- **APIAttachment:** add `flags` ([#783](https://github.com/discordjs/discord-api-types/issues/783)) ([7f9a7e5](https://github.com/discordjs/discord-api-types/commit/7f9a7e5b94529fbcd254ffdd1fcac1ceff62e890))
|
||||
- **APIRole:** role flags ([#782](https://github.com/discordjs/discord-api-types/issues/782)) ([488b5ad](https://github.com/discordjs/discord-api-types/commit/488b5adf04d3b2c7f457bea787c2a5d1b0bf8ba6))
|
||||
- **APIUser:** add avatar decorations ([#664](https://github.com/discordjs/discord-api-types/issues/664)) ([f556455](https://github.com/discordjs/discord-api-types/commit/f556455ba6e396e1b798e85f71d2a58e1aacf043))
|
||||
- **AuditLogEvent:** Add creator monetisation events ([#787](https://github.com/discordjs/discord-api-types/issues/787)) ([47f78bc](https://github.com/discordjs/discord-api-types/commit/47f78bcc691ee6d551f2eb441e427384a928dd11))
|
||||
- **GatewayMessageReactionAddDispatch:** add `message_author_id` ([#754](https://github.com/discordjs/discord-api-types/issues/754)) ([82d7024](https://github.com/discordjs/discord-api-types/commit/82d7024dfd0e30178e9e38647bfa882fdddd1681))
|
||||
|
||||
## [0.37.48](https://github.com/discordjs/discord-api-types/compare/0.37.47...0.37.48) (2023-07-10)
|
||||
|
||||
## [0.37.47](https://github.com/discordjs/discord-api-types/compare/0.37.46...0.37.47) (2023-06-29)
|
||||
|
||||
### Features
|
||||
|
||||
- **Guild:** add join raid and mention raid protection ([#677](https://github.com/discordjs/discord-api-types/issues/677)) ([844ad56](https://github.com/discordjs/discord-api-types/commit/844ad568c4e6bb379aee59e4e2256a8281276991))
|
||||
|
||||
## [0.37.46](https://github.com/discordjs/discord-api-types/compare/0.37.45...0.37.46) (2023-06-19)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add error `50131` ([#753](https://github.com/discordjs/discord-api-types/issues/753)) ([300e31b](https://github.com/discordjs/discord-api-types/commit/300e31b51490c81bfd96c2ed5e0f810a7e3ee4ae))
|
||||
|
||||
## [0.37.45](https://github.com/discordjs/discord-api-types/compare/0.37.44...0.37.45) (2023-06-15)
|
||||
|
||||
## [0.37.44](https://github.com/discordjs/discord-api-types/compare/0.37.43...0.37.44) (2023-06-15)
|
||||
|
||||
@@ -1,3 +1,171 @@
|
||||
## [0.37.71](https://github.com/discordjs/discord-api-types/compare/0.37.70...0.37.71) (2024-02-26)
|
||||
|
||||
### Features
|
||||
|
||||
- add initial support for super reactions ([#744](https://github.com/discordjs/discord-api-types/issues/744)) ([150dc46](https://github.com/discordjs/discord-api-types/commit/150dc46b8739ca9cf10a46bb48d390f70c679b6e))
|
||||
|
||||
## [0.37.70](https://github.com/discordjs/discord-api-types/compare/0.37.69...0.37.70) (2024-02-15)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIChannelMessageJSONBody:** add enforce_nonce ([#874](https://github.com/discordjs/discord-api-types/issues/874)) ([9564941](https://github.com/discordjs/discord-api-types/commit/9564941b3ae51c8bc9b1f915d66b43775089db18))
|
||||
|
||||
## [0.37.69](https://github.com/discordjs/discord-api-types/compare/0.37.68...0.37.69) (2024-02-08)
|
||||
|
||||
### Features
|
||||
|
||||
- **Locale:** add `SpanishLATAM` ([#859](https://github.com/discordjs/discord-api-types/issues/859)) ([0cfe05d](https://github.com/discordjs/discord-api-types/commit/0cfe05dad8271513a2ef58e4f183c530555c7c2d))
|
||||
|
||||
## [0.37.68](https://github.com/discordjs/discord-api-types/compare/0.37.67...0.37.68) (2024-02-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **CDNRoutes:** fix store page wrong extension ([#867](https://github.com/discordjs/discord-api-types/issues/867)) ([6f541d5](https://github.com/discordjs/discord-api-types/commit/6f541d58d278f1e610916250c003c1344831e3ad))
|
||||
- **CDNRoutes:** make format optional and default to png ([#869](https://github.com/discordjs/discord-api-types/issues/869)) ([55efcca](https://github.com/discordjs/discord-api-types/commit/55efcca4f8480f96243d9d802ce632833ac8e3ff))
|
||||
|
||||
## [0.37.67](https://github.com/discordjs/discord-api-types/compare/0.37.66...0.37.67) (2023-12-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayThreadDispatch:** properly type thread create/update/delete dispatches ([#861](https://github.com/discordjs/discord-api-types/issues/861)) ([819d852](https://github.com/discordjs/discord-api-types/commit/819d85207ae7e07322e404a5ef9e3eb283b4aa03))
|
||||
|
||||
## [0.37.66](https://github.com/discordjs/discord-api-types/compare/0.37.65...0.37.66) (2023-12-07)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIWebhookWithTokenJSONBody:** add `applied_tags` ([#855](https://github.com/discordjs/discord-api-types/issues/855)) ([b4226bb](https://github.com/discordjs/discord-api-types/commit/b4226bb708763ebe04d9f7abcafa148bb5588ba4))
|
||||
|
||||
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
|
||||
|
||||
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
|
||||
|
||||
### Features
|
||||
|
||||
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
|
||||
|
||||
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
|
||||
|
||||
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
|
||||
|
||||
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
|
||||
|
||||
### Features
|
||||
|
||||
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
|
||||
|
||||
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
|
||||
|
||||
### Features
|
||||
|
||||
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
|
||||
|
||||
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
|
||||
|
||||
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
|
||||
|
||||
### Features
|
||||
|
||||
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
|
||||
|
||||
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
|
||||
|
||||
### Features
|
||||
|
||||
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
|
||||
|
||||
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
|
||||
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
|
||||
|
||||
### Features
|
||||
|
||||
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
|
||||
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
|
||||
|
||||
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
|
||||
|
||||
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
|
||||
|
||||
### Features
|
||||
|
||||
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
|
||||
|
||||
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
|
||||
|
||||
### Features
|
||||
|
||||
- **GatewayActivityUpdateData:** allow sending state ([#801](https://github.com/discordjs/discord-api-types/issues/801)) ([e095e09](https://github.com/discordjs/discord-api-types/commit/e095e09b0b5e3c85107705de124858e1fbb29bf0))
|
||||
|
||||
## [0.37.52](https://github.com/discordjs/discord-api-types/compare/0.37.51...0.37.52) (2023-08-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **RESTPatchAPIChannelJSONBody:** `available_tags` requires `name` only ([#802](https://github.com/discordjs/discord-api-types/issues/802)) ([5261124](https://github.com/discordjs/discord-api-types/commit/52611242fb73ac56d8cfedd8953ce558bf6e842e))
|
||||
|
||||
## [0.37.51](https://github.com/discordjs/discord-api-types/compare/0.37.50...0.37.51) (2023-07-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Presence:** cannot receive invisible status ([#799](https://github.com/discordjs/discord-api-types/issues/799)) ([1071d24](https://github.com/discordjs/discord-api-types/commit/1071d24362bbf1d39d528f73c3233f22aee99778))
|
||||
|
||||
## [0.37.50](https://github.com/discordjs/discord-api-types/compare/0.37.49...0.37.50) (2023-07-20)
|
||||
|
||||
### Features
|
||||
|
||||
- onboarding updates, mode field, and error codes ([#773](https://github.com/discordjs/discord-api-types/issues/773)) ([773556a](https://github.com/discordjs/discord-api-types/commit/773556aa329750839262874b4af6c4113d9906d3))
|
||||
|
||||
## [0.37.49](https://github.com/discordjs/discord-api-types/compare/0.37.48...0.37.49) (2023-07-17)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIApplication:** approx guild count and get self application endpoint ([#728](https://github.com/discordjs/discord-api-types/issues/728)) ([874f135](https://github.com/discordjs/discord-api-types/commit/874f13573b35fe1e5e40549d007aebe5ec3bbcc0))
|
||||
- **APIAttachment:** add `flags` ([#783](https://github.com/discordjs/discord-api-types/issues/783)) ([7f9a7e5](https://github.com/discordjs/discord-api-types/commit/7f9a7e5b94529fbcd254ffdd1fcac1ceff62e890))
|
||||
- **APIRole:** role flags ([#782](https://github.com/discordjs/discord-api-types/issues/782)) ([488b5ad](https://github.com/discordjs/discord-api-types/commit/488b5adf04d3b2c7f457bea787c2a5d1b0bf8ba6))
|
||||
- **APIUser:** add avatar decorations ([#664](https://github.com/discordjs/discord-api-types/issues/664)) ([f556455](https://github.com/discordjs/discord-api-types/commit/f556455ba6e396e1b798e85f71d2a58e1aacf043))
|
||||
- **AuditLogEvent:** Add creator monetisation events ([#787](https://github.com/discordjs/discord-api-types/issues/787)) ([47f78bc](https://github.com/discordjs/discord-api-types/commit/47f78bcc691ee6d551f2eb441e427384a928dd11))
|
||||
- **GatewayMessageReactionAddDispatch:** add `message_author_id` ([#754](https://github.com/discordjs/discord-api-types/issues/754)) ([82d7024](https://github.com/discordjs/discord-api-types/commit/82d7024dfd0e30178e9e38647bfa882fdddd1681))
|
||||
|
||||
## [0.37.48](https://github.com/discordjs/discord-api-types/compare/0.37.47...0.37.48) (2023-07-10)
|
||||
|
||||
## [0.37.47](https://github.com/discordjs/discord-api-types/compare/0.37.46...0.37.47) (2023-06-29)
|
||||
|
||||
### Features
|
||||
|
||||
- **Guild:** add join raid and mention raid protection ([#677](https://github.com/discordjs/discord-api-types/issues/677)) ([844ad56](https://github.com/discordjs/discord-api-types/commit/844ad568c4e6bb379aee59e4e2256a8281276991))
|
||||
|
||||
## [0.37.46](https://github.com/discordjs/discord-api-types/compare/0.37.45...0.37.46) (2023-06-19)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add error `50131` ([#753](https://github.com/discordjs/discord-api-types/issues/753)) ([300e31b](https://github.com/discordjs/discord-api-types/commit/300e31b51490c81bfd96c2ed5e0f810a7e3ee4ae))
|
||||
|
||||
## [0.37.45](https://github.com/discordjs/discord-api-types/compare/0.37.44...0.37.45) (2023-06-15)
|
||||
|
||||
## [0.37.44](https://github.com/discordjs/discord-api-types/compare/0.37.43...0.37.44) (2023-06-15)
|
||||
|
||||
@@ -33,6 +33,8 @@ import type {
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
APIAuditLogEntry,
|
||||
APIEntitlement,
|
||||
ChannelType,
|
||||
} from '../payloads/v10/mod.ts';
|
||||
import type { Nullable } from '../utils/internals.ts';
|
||||
|
||||
@@ -268,6 +270,9 @@ export enum GatewayDispatchEvents {
|
||||
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
|
||||
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
|
||||
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
}
|
||||
|
||||
export type GatewaySendPayload =
|
||||
@@ -335,13 +340,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayThreadListSyncDispatch
|
||||
| GatewayThreadMembersUpdateDispatch
|
||||
| GatewayThreadMemberUpdateDispatch
|
||||
| GatewayThreadModifyDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadUpdateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayTypingStartDispatch
|
||||
| GatewayUserUpdateDispatch
|
||||
| GatewayVoiceServerUpdateDispatch
|
||||
| GatewayVoiceStateUpdateDispatch
|
||||
| GatewayWebhooksUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch;
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayEntitlementModifyDispatch;
|
||||
|
||||
// #region Dispatch Payloads
|
||||
|
||||
@@ -672,6 +680,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatch = DataPayload<
|
||||
| GatewayDispatchEvents.EntitlementCreate
|
||||
| GatewayDispatchEvents.EntitlementUpdate
|
||||
| GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementModifyDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#guild-create
|
||||
*/
|
||||
@@ -1421,7 +1478,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'member' | 'message_author_id'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
@@ -1551,6 +1611,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
|
||||
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* @deprecated This type doesn't accurately reflect the Discord API.
|
||||
* Use {@apilink GatewayThreadCreateDispatch},
|
||||
* {@apilink GatewayThreadUpdateDispatch}, or
|
||||
* {@apilink GatewayThreadDeleteDispatch} instead.
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
@@ -1563,7 +1627,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
*/
|
||||
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate,
|
||||
GatewayThreadCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
@@ -1578,22 +1645,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayThreadUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadDelete,
|
||||
GatewayThreadDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
|
||||
export interface GatewayThreadDeleteDispatchData {
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The id of the parent channel of the thread
|
||||
*/
|
||||
parent_id: Snowflake;
|
||||
/**
|
||||
* The type of the channel
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
*/
|
||||
type: ChannelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#typing-start
|
||||
@@ -1957,7 +2049,7 @@ export interface GatewayPresenceUpdateData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
|
||||
*/
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
|
||||
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
@@ -2024,6 +2116,10 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
},
|
||||
O
|
||||
>
|
||||
|
||||
@@ -33,8 +33,10 @@ import type {
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
APIAuditLogEntry,
|
||||
ChannelType,
|
||||
} from '../payloads/v9/mod.ts';
|
||||
import type { Nullable } from '../utils/internals.ts';
|
||||
import type { APIEntitlement } from '../v10.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
|
||||
@@ -267,6 +269,9 @@ export enum GatewayDispatchEvents {
|
||||
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
|
||||
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
|
||||
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
}
|
||||
|
||||
export type GatewaySendPayload =
|
||||
@@ -334,13 +339,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayThreadListSyncDispatch
|
||||
| GatewayThreadMembersUpdateDispatch
|
||||
| GatewayThreadMemberUpdateDispatch
|
||||
| GatewayThreadModifyDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadUpdateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayTypingStartDispatch
|
||||
| GatewayUserUpdateDispatch
|
||||
| GatewayVoiceServerUpdateDispatch
|
||||
| GatewayVoiceStateUpdateDispatch
|
||||
| GatewayWebhooksUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch;
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayEntitlementModifyDispatch;
|
||||
|
||||
// #region Dispatch Payloads
|
||||
|
||||
@@ -671,6 +679,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatch = DataPayload<
|
||||
| GatewayDispatchEvents.EntitlementCreate
|
||||
| GatewayDispatchEvents.EntitlementUpdate
|
||||
| GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementModifyDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#guild-update
|
||||
*/
|
||||
@@ -1420,7 +1477,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'member' | 'message_author_id'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
@@ -1550,6 +1610,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
|
||||
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* @deprecated This type doesn't accurately reflect the Discord API.
|
||||
* Use {@apilink GatewayThreadCreateDispatch},
|
||||
* {@apilink GatewayThreadUpdateDispatch}, or
|
||||
* {@apilink GatewayThreadDeleteDispatch} instead.
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
@@ -1562,7 +1626,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
*/
|
||||
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate,
|
||||
GatewayThreadCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
@@ -1577,22 +1644,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayThreadUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadDelete,
|
||||
GatewayThreadDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
|
||||
export interface GatewayThreadDeleteDispatchData {
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The id of the parent channel of the thread
|
||||
*/
|
||||
parent_id: Snowflake;
|
||||
/**
|
||||
* The type of the channel
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
*/
|
||||
type: ChannelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#typing-start
|
||||
@@ -1956,7 +2048,7 @@ export interface GatewayPresenceUpdateData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
|
||||
*/
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
|
||||
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
@@ -2023,6 +2115,10 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
},
|
||||
O
|
||||
>
|
||||
|
||||
@@ -182,7 +182,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
/**
|
||||
* Allows management and editing of emojis, stickers, and soundboard sounds
|
||||
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
|
||||
*/
|
||||
ManageGuildExpressions: 1n << 30n,
|
||||
/**
|
||||
@@ -198,7 +198,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
RequestToSpeak: 1n << 32n,
|
||||
/**
|
||||
* Allows for creating, editing, and deleting scheduled events
|
||||
* Allows for editing and deleting scheduled events created by all users
|
||||
*
|
||||
* Applies to channel types: Voice, Stage
|
||||
*/
|
||||
@@ -254,6 +254,16 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Voice
|
||||
*/
|
||||
UseSoundboard: 1n << 42n,
|
||||
/**
|
||||
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user
|
||||
*/
|
||||
CreateGuildExpressions: 1n << 43n,
|
||||
/**
|
||||
* Allows for creating scheduled events, and editing and deleting those created by the current user
|
||||
*
|
||||
* Applies to channel types: Voice, Stage
|
||||
*/
|
||||
CreateEvents: 1n << 44n,
|
||||
/**
|
||||
* Allows the usage of custom soundboard sounds from other servers
|
||||
*
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, LocaleString } from '../../../v10.ts';
|
||||
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIEntitlement } from '../monetization.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
entitlements: APIEntitlement[];
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
|
||||
> &
|
||||
Required<Pick<Original, 'member' | 'guild_id'>>;
|
||||
|
||||
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
|
||||
type: T;
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
thread_metadata?: APIThreadMetadata | null;
|
||||
permissions: Permissions;
|
||||
parent_id?: string | null;
|
||||
}
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
|
||||
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
|
||||
@@ -24,7 +24,8 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
| APIModalInteractionResponse
|
||||
| APIPremiumRequiredInteractionResponse;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIPremiumRequiredInteractionResponse {
|
||||
type: InteractionResponseType.PremiumRequired;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*/
|
||||
PremiumRequired,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { LocalizationMap } from '../common.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APITeam } from './teams.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -40,6 +41,10 @@ export interface APIApplication {
|
||||
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
|
||||
*/
|
||||
bot_require_code_grant: boolean;
|
||||
/**
|
||||
* Partial user object for the bot user associated with the application
|
||||
*/
|
||||
bot?: APIUser;
|
||||
/**
|
||||
* The url of the application's terms of service
|
||||
*/
|
||||
@@ -59,7 +64,7 @@ export interface APIApplication {
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
@@ -76,6 +81,10 @@ export interface APIApplication {
|
||||
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* A partial object of the associated guild
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
|
||||
*/
|
||||
@@ -95,7 +104,24 @@ export interface APIApplication {
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Up to 5 tags describing the content and functionality of the application
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
redirect_uris?: string[];
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
tags?: [string, string?, string?, string?, string?];
|
||||
/**
|
||||
@@ -106,11 +132,6 @@ export interface APIApplication {
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
import type { APIChannel, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildMFALevel,
|
||||
@@ -200,6 +201,9 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +313,15 @@ export interface APIAuditLogOptions {
|
||||
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
/**
|
||||
* Type of integration which performed the action
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_KICK
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -469,6 +482,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
@@ -717,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
|
||||
@@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_total_limit?: number;
|
||||
/**
|
||||
* Whether to automatically detect mention raids
|
||||
*
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_raid_protection_enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker, APIStickerItem } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -48,7 +48,6 @@ export type TextChannelType =
|
||||
| ChannelType.PrivateThread
|
||||
| ChannelType.AnnouncementThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice
|
||||
| ChannelType.GuildStageVoice;
|
||||
|
||||
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
|
||||
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends Omit<APITextBasedChannel<T>, 'name'>,
|
||||
APIGuildChannel<T> {
|
||||
/**
|
||||
@@ -124,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
|
||||
* The channel topic (0-1024 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
}
|
||||
@@ -205,12 +204,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
|
||||
managed?: boolean;
|
||||
}
|
||||
|
||||
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
|
||||
|
||||
export interface APIThreadChannel
|
||||
extends Omit<
|
||||
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
|
||||
'name'
|
||||
>,
|
||||
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
|
||||
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
|
||||
APIGuildChannel<ThreadChannelType> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -240,7 +238,7 @@ export interface APIThreadChannel
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
@@ -317,25 +315,60 @@ export enum ForumLayoutType {
|
||||
GalleryView,
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
/**
|
||||
* The id of the last thread created in this channel (may not point to an existing or valid thread)
|
||||
*/
|
||||
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
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
/**
|
||||
* When the last pinned message was pinned.
|
||||
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
|
||||
*/
|
||||
last_pin_timestamp?: string | null;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel
|
||||
*/
|
||||
available_tags: APIGuildForumTag[];
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
* The initial `rate_limit_per_user` to set on newly created threads.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*/
|
||||
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
/**
|
||||
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
|
||||
*/
|
||||
default_forum_layout: ForumLayoutType;
|
||||
}
|
||||
|
||||
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
|
||||
*/
|
||||
@@ -348,7 +381,8 @@ export type APIChannel =
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APIGuildForumChannel;
|
||||
| APIGuildForumChannel
|
||||
| APIGuildMediaChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
@@ -410,6 +444,12 @@ export enum ChannelType {
|
||||
* A channel that can only contain threads
|
||||
*/
|
||||
GuildForum,
|
||||
/**
|
||||
* A channel like forum channels but contains media for server subscriptions
|
||||
*
|
||||
* See https://creator-support.discord.com/hc/articles/14346342766743
|
||||
*/
|
||||
GuildMedia,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
@@ -665,11 +705,16 @@ export interface APIMessage {
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
|
||||
/**
|
||||
* Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
|
||||
*/
|
||||
role_subscription_data?: APIMessageRoleSubscriptionData;
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the message's auto-populated select menus
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -855,19 +900,45 @@ export interface APIFollowedChannel {
|
||||
*/
|
||||
export interface APIReaction {
|
||||
/**
|
||||
* Times this emoji has been used to react
|
||||
* Total number of times this emoji has been used to react (including super reacts)
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
* An object detailing the individual reaction counts for different types of reactions
|
||||
*/
|
||||
count_details: APIReactionCountDetails;
|
||||
/**
|
||||
* Whether the current user reacted using this emoji
|
||||
*/
|
||||
me: boolean;
|
||||
/**
|
||||
* Whether the current user super-reacted using this emoji
|
||||
*/
|
||||
me_burst: boolean;
|
||||
/**
|
||||
* Emoji information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIPartialEmoji;
|
||||
/**
|
||||
* Hexadecimal colors used for this super reaction
|
||||
*/
|
||||
burst_colors: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
|
||||
*/
|
||||
export interface APIReactionCountDetails {
|
||||
/**
|
||||
* Count of super reactions
|
||||
*/
|
||||
burst: number;
|
||||
/**
|
||||
* Count of normal reactions
|
||||
*/
|
||||
normal: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1332,6 +1403,20 @@ export interface APIAttachment {
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
/**
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1584,6 +1669,20 @@ export interface APIBaseSelectMenuComponent<
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface APIBaseAutoPopulatedSelectMenuComponent<
|
||||
T extends
|
||||
| ComponentType.UserSelect
|
||||
| ComponentType.RoleSelect
|
||||
| ComponentType.MentionableSelect
|
||||
| ComponentType.ChannelSelect,
|
||||
D extends SelectMenuDefaultValueType,
|
||||
> extends APIBaseSelectMenuComponent<T> {
|
||||
/**
|
||||
* List of default values for auto-populated select menu components
|
||||
*/
|
||||
default_values?: APISelectMenuDefaultValue<D>[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1597,28 +1696,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
|
||||
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.UserSelect,
|
||||
SelectMenuDefaultValueType.User
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
|
||||
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.RoleSelect,
|
||||
SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
|
||||
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.MentionableSelect,
|
||||
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
channel_types?: ChannelType[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export enum SelectMenuDefaultValueType {
|
||||
Channel = 'channel',
|
||||
Role = 'role',
|
||||
User = 'user',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
|
||||
type: T;
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
export type APIAutoPopulatedSelectMenuComponent =
|
||||
| APIChannelSelectComponent
|
||||
| APIMentionableSelectComponent
|
||||
| APIRoleSelectComponent
|
||||
| APIUserSelectComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1668,7 +1800,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
@@ -1730,6 +1862,10 @@ export enum ChannelFlags {
|
||||
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
IsScheduledForDeletion = 1 << 9,
|
||||
/**
|
||||
* Whether media download options are hidden.
|
||||
*/
|
||||
HideMediaDownloadOptions = 1 << 15,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
status?: PresenceUpdateStatus;
|
||||
status?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
*/
|
||||
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
||||
*/
|
||||
desktop?: PresenceUpdateStatus;
|
||||
desktop?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active mobile (iOS, Android) application session
|
||||
*/
|
||||
mobile?: PresenceUpdateStatus;
|
||||
mobile?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active web (browser, bot account) application session
|
||||
*/
|
||||
web?: PresenceUpdateStatus;
|
||||
web?: PresenceUpdateReceiveStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,7 +181,7 @@ export interface GatewayActivity {
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* The user's current party status
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
@@ -261,7 +266,7 @@ export enum ActivityType {
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {details}
|
||||
* {emoji} {state}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
|
||||
import type { PresenceUpdateStatus } from './gateway.ts';
|
||||
import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
@@ -276,6 +276,10 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* The type of Student Hub the guild is
|
||||
*/
|
||||
hub_type: GuildHubType | null;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,7 +427,7 @@ export enum GuildFeature {
|
||||
* Guild has enabled the role subscription promo page
|
||||
*/
|
||||
CreatorStorePage = 'CREATOR_STORE_PAGE',
|
||||
/*
|
||||
/**
|
||||
* Guild has been set as a support server on the App Directory
|
||||
*/
|
||||
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
|
||||
@@ -493,6 +497,10 @@ export enum GuildFeature {
|
||||
* Guild has access to create private threads
|
||||
*/
|
||||
PrivateThreads = 'PRIVATE_THREADS',
|
||||
/**
|
||||
* Guild has disabled alerts for join raids in the configured safety alerts channel
|
||||
*/
|
||||
RaidAlertsDisabled = 'RAID_ALERTS_DISABLED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild is able to set role icons
|
||||
@@ -895,7 +903,7 @@ export interface APIGuildWidgetMember {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
status: PresenceUpdateStatus;
|
||||
status: PresenceUpdateReceiveStatus;
|
||||
activity?: { name: string };
|
||||
avatar_url: string;
|
||||
}
|
||||
@@ -1020,6 +1028,10 @@ export interface APIGuildOnboarding {
|
||||
* Whether onboarding is enabled in the guild
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Current mode of onboarding
|
||||
*/
|
||||
mode: GuildOnboardingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1087,6 +1099,20 @@ export interface APIGuildOnboardingPromptOption {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
|
||||
*/
|
||||
export enum GuildOnboardingMode {
|
||||
/**
|
||||
* Counts only Default Channels towards constraints
|
||||
*/
|
||||
OnboardingDefault,
|
||||
/**
|
||||
* Counts Default Channels and Questions towards constraints
|
||||
*/
|
||||
OnboardingAdvanced,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
|
||||
*/
|
||||
|
||||
@@ -18,3 +18,4 @@ export * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
export * from './monetization.ts';
|
||||
|
||||
115
deno/payloads/v10/monetization.ts
Normal file
115
deno/payloads/v10/monetization.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
|
||||
*/
|
||||
export interface APIEntitlement {
|
||||
/**
|
||||
* ID of the entitlement
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the user that is granted access to the entitlement's sku
|
||||
*/
|
||||
user_id?: Snowflake;
|
||||
/**
|
||||
* ID of the guild that is granted access to the entitlement's sku
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Type of entitlement
|
||||
*/
|
||||
type: EntitlementType;
|
||||
/**
|
||||
* Whether the entitlement was deleted
|
||||
*/
|
||||
deleted: boolean;
|
||||
/**
|
||||
* Start date at which the entitlement is valid. Not present when using test entitlements.
|
||||
*/
|
||||
starts_at?: string;
|
||||
/**
|
||||
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
||||
*/
|
||||
ends_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
||||
*/
|
||||
export enum EntitlementType {
|
||||
/**
|
||||
* Entitlement was purchased as an app subscription
|
||||
*/
|
||||
ApplicationSubscription = 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
|
||||
*/
|
||||
export interface APISKU {
|
||||
/**
|
||||
* ID of SKU
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of SKU
|
||||
*/
|
||||
type: SKUType;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Customer-facing name of your premium offering
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* System-generated URL slug based on the SKU's name
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
* SKU flags combined as a bitfield
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
flags: SKUFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
|
||||
*/
|
||||
export enum SKUFlags {
|
||||
/**
|
||||
* SKU is available for purchase
|
||||
*/
|
||||
Available = 1 << 2,
|
||||
/**
|
||||
* Recurring SKU that can be purchased by a user and applied to a single server.
|
||||
* Grants access to every user in that server.
|
||||
*/
|
||||
GuildSubscription = 1 << 7,
|
||||
/**
|
||||
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
|
||||
*/
|
||||
UserSubscription = 1 << 8,
|
||||
}
|
||||
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Represents a recurring subscription
|
||||
*/
|
||||
Subscription = 5,
|
||||
/**
|
||||
* System-generated group for each Subscription SKU created
|
||||
*/
|
||||
SubscriptionGroup = 6,
|
||||
}
|
||||
@@ -54,6 +54,10 @@ export interface APIRole {
|
||||
* The tags this role has
|
||||
*/
|
||||
tags?: APIRoleTags;
|
||||
/**
|
||||
* Role flags
|
||||
*/
|
||||
flags: RoleFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,3 +89,13 @@ export interface APIRoleTags {
|
||||
*/
|
||||
guild_connections?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
||||
*/
|
||||
export enum RoleFlags {
|
||||
/**
|
||||
* Role can be selected by members in an onboarding prompt
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface APISticker {
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
|
||||
* An official sticker in a pack
|
||||
*/
|
||||
Standard = 1,
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,8 @@ export interface APITeamMember {
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
@@ -55,6 +57,12 @@ export interface APITeamMember {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The user's role in the team.
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#team-member-roles
|
||||
*/
|
||||
role: TeamMemberRole;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
|
||||
*/
|
||||
export enum TeamMemberRole {
|
||||
Admin = 'admin',
|
||||
Developer = 'developer',
|
||||
ReadOnly = 'read_only',
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ export interface APIUser {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +281,11 @@ export enum ConnectionService {
|
||||
Steam = 'steam',
|
||||
TikTok = 'tiktok',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
*/
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
@@ -1297,7 +1297,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, LocaleString } from '../../../v9.ts';
|
||||
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIEntitlement } from '../monetization.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
entitlements: APIEntitlement[];
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
|
||||
> &
|
||||
Required<Pick<Original, 'member' | 'guild_id'>>;
|
||||
|
||||
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
|
||||
type: T;
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
thread_metadata?: APIThreadMetadata | null;
|
||||
permissions: Permissions;
|
||||
parent_id?: string | null;
|
||||
}
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
|
||||
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
|
||||
@@ -24,7 +24,8 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
| APIModalInteractionResponse
|
||||
| APIPremiumRequiredInteractionResponse;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIPremiumRequiredInteractionResponse {
|
||||
type: InteractionResponseType.PremiumRequired;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*/
|
||||
PremiumRequired,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { LocalizationMap } from '../common.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APITeam } from './teams.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -40,6 +41,10 @@ export interface APIApplication {
|
||||
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
|
||||
*/
|
||||
bot_require_code_grant: boolean;
|
||||
/**
|
||||
* Partial user object for the bot user associated with the application
|
||||
*/
|
||||
bot?: APIUser;
|
||||
/**
|
||||
* The url of the application's terms of service
|
||||
*/
|
||||
@@ -59,7 +64,7 @@ export interface APIApplication {
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
@@ -76,6 +81,10 @@ export interface APIApplication {
|
||||
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* A partial object of the associated guild
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
|
||||
*/
|
||||
@@ -95,7 +104,24 @@ export interface APIApplication {
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Up to 5 tags describing the content and functionality of the application
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
redirect_uris?: string[];
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
tags?: [string, string?, string?, string?, string?];
|
||||
/**
|
||||
@@ -106,11 +132,6 @@ export interface APIApplication {
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
import type { APIChannel, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildMFALevel,
|
||||
@@ -200,6 +201,9 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +313,15 @@ export interface APIAuditLogOptions {
|
||||
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
/**
|
||||
* Type of integration which performed the action
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_KICK
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -469,6 +482,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
@@ -717,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
|
||||
@@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_total_limit?: number;
|
||||
/**
|
||||
* Whether to automatically detect mention raids
|
||||
*
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_raid_protection_enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker, APIStickerItem } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -48,7 +48,6 @@ export type TextChannelType =
|
||||
| ChannelType.PrivateThread
|
||||
| ChannelType.AnnouncementThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice
|
||||
| ChannelType.GuildStageVoice;
|
||||
|
||||
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
|
||||
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends Omit<APITextBasedChannel<T>, 'name'>,
|
||||
APIGuildChannel<T> {
|
||||
/**
|
||||
@@ -201,12 +200,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
|
||||
managed?: boolean;
|
||||
}
|
||||
|
||||
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
|
||||
|
||||
export interface APIThreadChannel
|
||||
extends Omit<
|
||||
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
|
||||
'name'
|
||||
>,
|
||||
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
|
||||
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
|
||||
APIGuildChannel<ThreadChannelType> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -236,7 +234,7 @@ export interface APIThreadChannel
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
@@ -313,25 +311,60 @@ export enum ForumLayoutType {
|
||||
GalleryView,
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
/**
|
||||
* The id of the last thread created in this channel (may not point to an existing or valid thread)
|
||||
*/
|
||||
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
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
/**
|
||||
* When the last pinned message was pinned.
|
||||
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
|
||||
*/
|
||||
last_pin_timestamp?: string | null;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel
|
||||
*/
|
||||
available_tags: APIGuildForumTag[];
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
* The initial `rate_limit_per_user` to set on newly created threads.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*/
|
||||
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
/**
|
||||
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
|
||||
*/
|
||||
default_forum_layout: ForumLayoutType;
|
||||
}
|
||||
|
||||
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
|
||||
*/
|
||||
@@ -344,7 +377,8 @@ export type APIChannel =
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APIGuildForumChannel;
|
||||
| APIGuildForumChannel
|
||||
| APIGuildMediaChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
@@ -406,6 +440,12 @@ export enum ChannelType {
|
||||
* A channel that can only contain threads
|
||||
*/
|
||||
GuildForum,
|
||||
/**
|
||||
* A channel like forum channels but contains media for server subscriptions
|
||||
*
|
||||
* See https://creator-support.discord.com/hc/articles/14346342766743
|
||||
*/
|
||||
GuildMedia,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
|
||||
/**
|
||||
@@ -656,6 +696,12 @@ export interface APIMessage {
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the message's auto-populated select menus
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -819,19 +865,45 @@ export interface APIFollowedChannel {
|
||||
*/
|
||||
export interface APIReaction {
|
||||
/**
|
||||
* Times this emoji has been used to react
|
||||
* Total number of times this emoji has been used to react (including super reacts)
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
* An object detailing the individual reaction counts for different types of reactions
|
||||
*/
|
||||
count_details: APIReactionCountDetails;
|
||||
/**
|
||||
* Whether the current user reacted using this emoji
|
||||
*/
|
||||
me: boolean;
|
||||
/**
|
||||
* Whether the current user super-reacted using this emoji
|
||||
*/
|
||||
me_burst: boolean;
|
||||
/**
|
||||
* Emoji information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIPartialEmoji;
|
||||
/**
|
||||
* Hexadecimal colors used for this super reaction
|
||||
*/
|
||||
burst_colors: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
|
||||
*/
|
||||
export interface APIReactionCountDetails {
|
||||
/**
|
||||
* Count of super reactions
|
||||
*/
|
||||
burst: number;
|
||||
/**
|
||||
* Count of normal reactions
|
||||
*/
|
||||
normal: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1300,6 +1372,20 @@ export interface APIAttachment {
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
/**
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1552,6 +1638,20 @@ export interface APIBaseSelectMenuComponent<
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface APIBaseAutoPopulatedSelectMenuComponent<
|
||||
T extends
|
||||
| ComponentType.UserSelect
|
||||
| ComponentType.RoleSelect
|
||||
| ComponentType.MentionableSelect
|
||||
| ComponentType.ChannelSelect,
|
||||
D extends SelectMenuDefaultValueType,
|
||||
> extends APIBaseSelectMenuComponent<T> {
|
||||
/**
|
||||
* List of default values for auto-populated select menu components
|
||||
*/
|
||||
default_values?: APISelectMenuDefaultValue<D>[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1565,28 +1665,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
|
||||
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.UserSelect,
|
||||
SelectMenuDefaultValueType.User
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
|
||||
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.RoleSelect,
|
||||
SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
|
||||
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.MentionableSelect,
|
||||
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
channel_types?: ChannelType[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export enum SelectMenuDefaultValueType {
|
||||
Channel = 'channel',
|
||||
Role = 'role',
|
||||
User = 'user',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
|
||||
type: T;
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
export type APIAutoPopulatedSelectMenuComponent =
|
||||
| APIChannelSelectComponent
|
||||
| APIMentionableSelectComponent
|
||||
| APIRoleSelectComponent
|
||||
| APIUserSelectComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1636,7 +1769,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
@@ -1698,6 +1831,10 @@ export enum ChannelFlags {
|
||||
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
IsScheduledForDeletion = 1 << 9,
|
||||
/**
|
||||
* Whether media download options are hidden.
|
||||
*/
|
||||
HideMediaDownloadOptions = 1 << 15,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
status?: PresenceUpdateStatus;
|
||||
status?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
*/
|
||||
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
||||
*/
|
||||
desktop?: PresenceUpdateStatus;
|
||||
desktop?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active mobile (iOS, Android) application session
|
||||
*/
|
||||
mobile?: PresenceUpdateStatus;
|
||||
mobile?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active web (browser, bot account) application session
|
||||
*/
|
||||
web?: PresenceUpdateStatus;
|
||||
web?: PresenceUpdateReceiveStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,7 +172,7 @@ export interface GatewayActivity {
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* The user's current party status
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
@@ -249,7 +254,7 @@ export enum ActivityType {
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {details}
|
||||
* {emoji} {state}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
|
||||
import type { PresenceUpdateStatus } from './gateway.ts';
|
||||
import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
@@ -276,6 +276,10 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* The type of Student Hub the guild is
|
||||
*/
|
||||
hub_type: GuildHubType | null;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -415,7 +419,7 @@ export enum GuildFeature {
|
||||
* Guild has enabled the role subscription promo page
|
||||
*/
|
||||
CreatorStorePage = 'CREATOR_STORE_PAGE',
|
||||
/*
|
||||
/**
|
||||
* Guild has been set as a support server on the App Directory
|
||||
*/
|
||||
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
|
||||
@@ -485,6 +489,10 @@ export enum GuildFeature {
|
||||
* Guild has access to create private threads
|
||||
*/
|
||||
PrivateThreads = 'PRIVATE_THREADS',
|
||||
/**
|
||||
* Guild has disabled alerts for join raids in the configured safety alerts channel
|
||||
*/
|
||||
RaidAlertsDisabled = 'RAID_ALERTS_DISABLED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild is able to set role icons
|
||||
@@ -887,7 +895,7 @@ export interface APIGuildWidgetMember {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
status: PresenceUpdateStatus;
|
||||
status: PresenceUpdateReceiveStatus;
|
||||
activity?: { name: string };
|
||||
avatar_url: string;
|
||||
}
|
||||
@@ -1012,6 +1020,10 @@ export interface APIGuildOnboarding {
|
||||
* Whether onboarding is enabled in the guild
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Current mode of onboarding
|
||||
*/
|
||||
mode: GuildOnboardingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1079,6 +1091,20 @@ export interface APIGuildOnboardingPromptOption {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
|
||||
*/
|
||||
export enum GuildOnboardingMode {
|
||||
/**
|
||||
* Counts only Default Channels towards constraints
|
||||
*/
|
||||
OnboardingDefault,
|
||||
/**
|
||||
* Counts Default Channels and Questions towards constraints
|
||||
*/
|
||||
OnboardingAdvanced,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
|
||||
*/
|
||||
|
||||
@@ -18,3 +18,4 @@ export * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
export * from './monetization.ts';
|
||||
|
||||
115
deno/payloads/v9/monetization.ts
Normal file
115
deno/payloads/v9/monetization.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
|
||||
*/
|
||||
export interface APIEntitlement {
|
||||
/**
|
||||
* ID of the entitlement
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the user that is granted access to the entitlement's sku
|
||||
*/
|
||||
user_id?: Snowflake;
|
||||
/**
|
||||
* ID of the guild that is granted access to the entitlement's sku
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Type of entitlement
|
||||
*/
|
||||
type: EntitlementType;
|
||||
/**
|
||||
* Whether the entitlement was deleted
|
||||
*/
|
||||
deleted: boolean;
|
||||
/**
|
||||
* Start date at which the entitlement is valid. Not present when using test entitlements.
|
||||
*/
|
||||
starts_at?: string;
|
||||
/**
|
||||
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
||||
*/
|
||||
ends_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
||||
*/
|
||||
export enum EntitlementType {
|
||||
/**
|
||||
* Entitlement was purchased as an app subscription
|
||||
*/
|
||||
ApplicationSubscription = 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
|
||||
*/
|
||||
export interface APISKU {
|
||||
/**
|
||||
* ID of SKU
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of SKU
|
||||
*/
|
||||
type: SKUType;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Customer-facing name of your premium offering
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* System-generated URL slug based on the SKU's name
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
* SKU flags combined as a bitfield
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
flags: SKUFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
|
||||
*/
|
||||
export enum SKUFlags {
|
||||
/**
|
||||
* SKU is available for purchase
|
||||
*/
|
||||
Available = 1 << 2,
|
||||
/**
|
||||
* Recurring SKU that can be purchased by a user and applied to a single server.
|
||||
* Grants access to every user in that server.
|
||||
*/
|
||||
GuildSubscription = 1 << 7,
|
||||
/**
|
||||
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
|
||||
*/
|
||||
UserSubscription = 1 << 8,
|
||||
}
|
||||
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Represents a recurring subscription
|
||||
*/
|
||||
Subscription = 5,
|
||||
/**
|
||||
* System-generated group for each Subscription SKU created
|
||||
*/
|
||||
SubscriptionGroup = 6,
|
||||
}
|
||||
@@ -54,6 +54,10 @@ export interface APIRole {
|
||||
* The tags this role has
|
||||
*/
|
||||
tags?: APIRoleTags;
|
||||
/**
|
||||
* Role flags
|
||||
*/
|
||||
flags: RoleFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,3 +89,13 @@ export interface APIRoleTags {
|
||||
*/
|
||||
guild_connections?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
||||
*/
|
||||
export enum RoleFlags {
|
||||
/**
|
||||
* Role can be selected by members in an onboarding prompt
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface APISticker {
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
|
||||
* An official sticker in a pack
|
||||
*/
|
||||
Standard = 1,
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,8 @@ export interface APITeamMember {
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
@@ -55,6 +57,12 @@ export interface APITeamMember {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The user's role in the team.
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#team-member-roles
|
||||
*/
|
||||
role: TeamMemberRole;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
|
||||
*/
|
||||
export enum TeamMemberRole {
|
||||
Admin = 'admin',
|
||||
Developer = 'developer',
|
||||
ReadOnly = 'read_only',
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ export interface APIUser {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +281,11 @@ export enum ConnectionService {
|
||||
Steam = 'steam',
|
||||
TikTok = 'tiktok',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
*/
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
@@ -154,6 +154,8 @@ export enum RESTJSONErrorCodes {
|
||||
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40_066,
|
||||
TagRequiredToCreateAForumPostInThisChannel,
|
||||
|
||||
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40_074,
|
||||
|
||||
MissingAccess = 50_001,
|
||||
InvalidAccountType,
|
||||
CannotExecuteActionOnDMChannel,
|
||||
@@ -198,6 +200,8 @@ export enum RESTJSONErrorCodes {
|
||||
CannotSelfRedeemThisGift = 50_054,
|
||||
InvalidGuild,
|
||||
|
||||
InvalidSKU = 50_057,
|
||||
|
||||
InvalidRequestOrigin = 50_067,
|
||||
InvalidMessageType,
|
||||
|
||||
@@ -224,7 +228,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
RequestBodyContainsInvalidJSON = 50_109,
|
||||
|
||||
OwnershipCannotBeMovedToABotUser = 50_132,
|
||||
OwnerCannotBePendingMember = 50_131,
|
||||
OwnershipCannotBeMovedToABotUser,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50_138,
|
||||
|
||||
@@ -249,6 +254,7 @@ export enum RESTJSONErrorCodes {
|
||||
NoUsersWithDiscordTagExist = 80_004,
|
||||
|
||||
ReactionWasBlocked = 90_001,
|
||||
UserCannotUseBurstReactions,
|
||||
|
||||
ApplicationNotYetAvailable = 110_001,
|
||||
|
||||
@@ -284,6 +290,9 @@ export enum RESTJSONErrorCodes {
|
||||
WebhookServicesCannotBeUsedInForumChannels,
|
||||
|
||||
MessageBlockedByHarmfulLinksFilter = 240_000,
|
||||
|
||||
CannotEnableOnboardingRequirementsAreNotMet = 350_000,
|
||||
CannotUpdateOnboardingWhileBelowRequirements,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,6 +325,7 @@ export enum Locale {
|
||||
Romanian = 'ro',
|
||||
Russian = 'ru',
|
||||
SpanishES = 'es-ES',
|
||||
SpanishLATAM = 'es-419',
|
||||
Swedish = 'sv-SE',
|
||||
Thai = 'th',
|
||||
Turkish = 'tr',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
||||
@@ -14,3 +15,30 @@ export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplication
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
||||
*/
|
||||
export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#get-current-application
|
||||
*/
|
||||
export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'flags'
|
||||
| 'role_connections_verification_url'
|
||||
| 'install_params'
|
||||
| 'interactions_endpoint_url'
|
||||
| 'tags'
|
||||
> &
|
||||
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIAllowedMentions,
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIEmbed,
|
||||
APIExtendedInvite,
|
||||
@@ -18,11 +17,13 @@ import type {
|
||||
MessageFlags,
|
||||
OverwriteType,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadChannelType,
|
||||
VideoQualityMode,
|
||||
APIGuildForumTag,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
SortOrderType,
|
||||
ForumLayoutType,
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* 0-1024 character channel topic (0-4096 characters for forum channels)
|
||||
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
|
||||
*
|
||||
* Channel types: text, news, forum
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
topic?: string | null | undefined;
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, voice, news, forum
|
||||
* Channel types: text, voice, news, forum, media
|
||||
*/
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, voice, news
|
||||
* Channel types: text, voice, news, stage, forum, media
|
||||
*/
|
||||
parent_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
flags?: ChannelFlags | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel; limited to 20
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread
|
||||
*
|
||||
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
invitable?: boolean | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel; limited to 20
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
*/
|
||||
available_tags?: APIGuildForumTag[] | undefined;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | 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
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: text, forum, media
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_sort_order?: SortOrderType | null | undefined;
|
||||
/**
|
||||
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* Channel types: forum
|
||||
*/
|
||||
default_forum_layout?: ForumLayoutType | undefined;
|
||||
/**
|
||||
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
export interface RESTAPIAttachment {
|
||||
/**
|
||||
* Attachment id or a number that matches `n` in `files[n]`
|
||||
*/
|
||||
id: Snowflake | number;
|
||||
/**
|
||||
* Name of the file
|
||||
*/
|
||||
filename?: string | undefined;
|
||||
/**
|
||||
* Description of the file
|
||||
*/
|
||||
description?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#create-message
|
||||
*/
|
||||
@@ -284,11 +313,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
flags?: MessageFlags | undefined;
|
||||
/**
|
||||
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
|
||||
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
|
||||
*/
|
||||
enforce_nonce?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -328,7 +362,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-reactions
|
||||
*/
|
||||
export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
@@ -395,7 +429,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -605,8 +639,6 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
name: string;
|
||||
/**
|
||||
* The amount of time in minutes to wait before automatically archiving the thread
|
||||
*
|
||||
* The 3 day and 7 day archive durations require the server to be boosted. The [guild features](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) will indicate if a server is able to use those settings.
|
||||
*/
|
||||
auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
@@ -616,25 +648,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: RESTPostAPIChannelMessageJSONBody;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
@@ -658,7 +690,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
|
||||
*
|
||||
* @default ChannelType.PrivateThread
|
||||
*/
|
||||
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
|
||||
type?: ThreadChannelType | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
|
||||
*/
|
||||
@@ -718,7 +750,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
|
||||
*/
|
||||
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
|
||||
*/
|
||||
export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -306,6 +309,10 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
* Whether the boosts progress bar should be enabled.
|
||||
*/
|
||||
premium_progress_bar_enabled?: boolean | undefined;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id?: Snowflake | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
|
||||
deaf?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-member
|
||||
@@ -922,3 +929,48 @@ export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
|
||||
*/
|
||||
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
@@ -18,6 +18,7 @@ export * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
export * from './monetization.ts';
|
||||
|
||||
export const APIVersion = '10';
|
||||
|
||||
@@ -494,7 +495,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/prviate`
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/private`
|
||||
*/
|
||||
channelJoinedArchivedThreads(channelId: Snowflake) {
|
||||
return `/channels/${channelId}/users/@me/threads/archived/private` as const;
|
||||
@@ -830,6 +831,16 @@ export const Routes = {
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*/
|
||||
stickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*
|
||||
* @deprecated Use {@link Routes.stickerPacks} instead.
|
||||
*/
|
||||
nitroStickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
@@ -883,14 +894,54 @@ export const Routes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/@me`
|
||||
* - PATCH `/applications/@me`
|
||||
*/
|
||||
currentApplication() {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
* - POST `/applications/{application.id}/entitlements`
|
||||
*/
|
||||
entitlements(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
|
||||
*/
|
||||
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/skus`
|
||||
*/
|
||||
skus(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/skus` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
@@ -900,7 +951,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -912,7 +963,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -922,7 +973,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -932,7 +983,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
|
||||
guildId: Snowflake,
|
||||
guildDiscoverySplash: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -944,7 +999,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -956,7 +1011,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -970,7 +1025,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(index: DefaultUserAvatarAssets) {
|
||||
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
|
||||
return `/embed/avatars/${index}.png` as const;
|
||||
},
|
||||
|
||||
@@ -982,7 +1037,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -994,17 +1049,36 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
memberAvatar: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string) {
|
||||
return `/avatar-decorations/${userId}/${userAvatarDecoration}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
applicationIcon<Format extends ApplicationIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationIcon: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1014,7 +1088,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
applicationCover<Format extends ApplicationCoverFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationCoverImage: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1024,7 +1102,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
applicationAsset<Format extends ApplicationAssetFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationAssetId: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1034,11 +1116,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
achievementIcon<Format extends AchievementIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
@@ -1049,7 +1131,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1059,8 +1141,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
storePageAsset(applicationId: Snowflake, assetId: string) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
|
||||
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
|
||||
applicationId: Snowflake,
|
||||
assetId: string,
|
||||
format: Format = ImageFormat.PNG as Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1069,7 +1155,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1079,7 +1165,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie, GIF
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1089,7 +1175,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1099,10 +1185,10 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
@@ -1113,7 +1199,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
guildMemberBanner<Format extends GuildMemberBannerFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
guildMemberBanner: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
@@ -1135,19 +1226,12 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
|
||||
85
deno/rest/v10/monetization.ts
Normal file
85
deno/rest/v10/monetization.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIEntitlement, APISKU } from '../../v10.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export interface RESTGetAPIEntitlementsQuery {
|
||||
/**
|
||||
* User ID to look up entitlements for
|
||||
*/
|
||||
user_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Optional list of SKU IDs to check entitlements for
|
||||
* Comma-delimited set of snowflakes
|
||||
*/
|
||||
sku_ids?: string | undefined;
|
||||
/**
|
||||
* Retrieve entitlements before this entitlement ID
|
||||
*/
|
||||
before?: Snowflake | undefined;
|
||||
/**
|
||||
* Retrieve entitlements after this entitlement ID
|
||||
*/
|
||||
after?: Snowflake | undefined;
|
||||
/**
|
||||
* Number of entitlements to return (1-100)
|
||||
*
|
||||
* @default 100
|
||||
*/
|
||||
limit?: number | undefined;
|
||||
/**
|
||||
* Guild ID to look up entitlements for
|
||||
*/
|
||||
guild_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Whether ended entitlements should be omitted
|
||||
*/
|
||||
exclude_ended?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild or user to grant the entitlement to
|
||||
*/
|
||||
owner_id: Snowflake;
|
||||
/**
|
||||
* The type of entitlement owner
|
||||
*/
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export enum EntitlementOwnerType {
|
||||
Guild = 1,
|
||||
User,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
|
||||
*/
|
||||
export type RESTDeleteAPIEntitlementResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#list-skus
|
||||
*/
|
||||
export type RESTGetAPISKUsResult = APISKU[];
|
||||
@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
|
||||
* Notify @everyone that a stage instance has started
|
||||
*/
|
||||
send_start_notification?: boolean | undefined;
|
||||
/**
|
||||
* The guild scheduled event associated with this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v10/mod.ts';
|
||||
export type RESTGetAPIStickerResult = APISticker;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*/
|
||||
export interface RESTGetNitroStickerPacksResult {
|
||||
export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
* @deprecated Use `RESTGetStickerPacksResult` instead
|
||||
*/
|
||||
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
|
||||
*/
|
||||
|
||||
@@ -5,11 +5,11 @@ import type {
|
||||
APIEmbed,
|
||||
APIMessage,
|
||||
APIWebhook,
|
||||
APIAttachment,
|
||||
MessageFlags,
|
||||
APIMessageActionRowComponent,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
|
||||
import type { RESTAPIAttachment } from './channel.ts';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
|
||||
*/
|
||||
thread_name?: string | undefined;
|
||||
/**
|
||||
* Array of tag ids to apply to the thread
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -454,7 +454,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-member
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application.ts';
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application.ts';
|
||||
import type { StrictPartial, Nullable } from '../../utils/internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
||||
@@ -14,3 +15,30 @@ export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplication
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
||||
*/
|
||||
export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#get-current-application
|
||||
*/
|
||||
export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'flags'
|
||||
| 'role_connections_verification_url'
|
||||
| 'install_params'
|
||||
| 'interactions_endpoint_url'
|
||||
| 'tags'
|
||||
> &
|
||||
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIAllowedMentions,
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIEmbed,
|
||||
APIExtendedInvite,
|
||||
@@ -18,11 +17,13 @@ import type {
|
||||
MessageFlags,
|
||||
OverwriteType,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadChannelType,
|
||||
VideoQualityMode,
|
||||
APIGuildForumTag,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
SortOrderType,
|
||||
ForumLayoutType,
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* 0-1024 character channel topic (0-4096 characters for forum channels)
|
||||
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
|
||||
*
|
||||
* Channel types: text, news, forum
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
topic?: string | null | undefined;
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, voice, news, forum
|
||||
* Channel types: text, voice, news, forum, media
|
||||
*/
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, voice, news
|
||||
* Channel types: text, voice, news, stage, forum, media
|
||||
*/
|
||||
parent_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
flags?: ChannelFlags | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel; limited to 20
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread
|
||||
*
|
||||
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
invitable?: boolean | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel; limited to 20
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
*/
|
||||
available_tags?: APIGuildForumTag[] | undefined;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | 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
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: text, forum, media
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_sort_order?: SortOrderType | null | undefined;
|
||||
/**
|
||||
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* Channel types: forum
|
||||
*/
|
||||
default_forum_layout?: ForumLayoutType | undefined;
|
||||
/**
|
||||
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
export interface RESTAPIAttachment {
|
||||
/**
|
||||
* Attachment id or a number that matches `n` in `files[n]`
|
||||
*/
|
||||
id: Snowflake | number;
|
||||
/**
|
||||
* Name of the file
|
||||
*/
|
||||
filename?: string | undefined;
|
||||
/**
|
||||
* Description of the file
|
||||
*/
|
||||
description?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#create-message
|
||||
*/
|
||||
@@ -292,11 +321,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
flags?: MessageFlags | undefined;
|
||||
/**
|
||||
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
|
||||
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
|
||||
*/
|
||||
enforce_nonce?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -336,7 +370,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-reactions
|
||||
*/
|
||||
export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
@@ -411,7 +445,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -621,8 +655,6 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
name: string;
|
||||
/**
|
||||
* The amount of time in minutes to wait before automatically archiving the thread
|
||||
*
|
||||
* The 3 day and 7 day archive durations require the server to be boosted. The [guild features](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) will indicate if a server is able to use those settings.
|
||||
*/
|
||||
auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
@@ -632,25 +664,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: RESTPostAPIChannelMessageJSONBody;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
@@ -674,7 +706,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
|
||||
*
|
||||
* @default ChannelType.PrivateThread
|
||||
*/
|
||||
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
|
||||
type?: ThreadChannelType | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
|
||||
*/
|
||||
@@ -734,7 +766,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
|
||||
*/
|
||||
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
|
||||
*/
|
||||
export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildWidgetStyle,
|
||||
APIDMChannel,
|
||||
APIGroupDMChannel,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -306,6 +309,10 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
* Whether the boosts progress bar should be enabled.
|
||||
*/
|
||||
premium_progress_bar_enabled?: boolean | undefined;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id?: Snowflake | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
|
||||
deaf?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-member
|
||||
@@ -928,3 +935,48 @@ export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
|
||||
*/
|
||||
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
@@ -18,6 +18,7 @@ export * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
export * from './monetization.ts';
|
||||
|
||||
export const APIVersion = '9';
|
||||
|
||||
@@ -503,7 +504,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/prviate`
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/private`
|
||||
*/
|
||||
channelJoinedArchivedThreads(channelId: Snowflake) {
|
||||
return `/channels/${channelId}/users/@me/threads/archived/private` as const;
|
||||
@@ -839,6 +840,16 @@ export const Routes = {
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*/
|
||||
stickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*
|
||||
* @deprecated Use {@link Routes.stickerPacks} instead.
|
||||
*/
|
||||
nitroStickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
@@ -892,14 +903,54 @@ export const Routes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/@me`
|
||||
* - PATCH `/applications/@me`
|
||||
*/
|
||||
currentApplication() {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
* - POST `/applications/{application.id}/entitlements`
|
||||
*/
|
||||
entitlements(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
|
||||
*/
|
||||
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/skus`
|
||||
*/
|
||||
skus(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/skus` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
@@ -909,7 +960,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -921,7 +972,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -931,7 +982,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -941,7 +992,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
|
||||
guildId: Snowflake,
|
||||
guildDiscoverySplash: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -953,7 +1008,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -965,7 +1020,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -979,7 +1034,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(index: DefaultUserAvatarAssets) {
|
||||
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
|
||||
return `/embed/avatars/${index}.png` as const;
|
||||
},
|
||||
|
||||
@@ -991,7 +1046,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1003,17 +1058,36 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
memberAvatar: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string) {
|
||||
return `/avatar-decorations/${userId}/${userAvatarDecoration}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
applicationIcon<Format extends ApplicationIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationIcon: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1023,7 +1097,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
applicationCover<Format extends ApplicationCoverFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationCoverImage: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1033,7 +1111,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
applicationAsset<Format extends ApplicationAssetFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationAssetId: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1043,11 +1125,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
achievementIcon<Format extends AchievementIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
@@ -1058,7 +1140,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1068,8 +1150,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
storePageAsset(applicationId: Snowflake, assetId: string) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
|
||||
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
|
||||
applicationId: Snowflake,
|
||||
assetId: string,
|
||||
format: Format = ImageFormat.PNG as Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1078,7 +1164,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1088,7 +1174,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie, GIF
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1098,7 +1184,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1108,10 +1194,10 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
@@ -1122,7 +1208,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
guildMemberBanner<Format extends GuildMemberBannerFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
guildMemberBanner: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
@@ -1143,20 +1234,13 @@ export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
|
||||
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
|
||||
85
deno/rest/v9/monetization.ts
Normal file
85
deno/rest/v9/monetization.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIEntitlement, APISKU } from '../../v10.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export interface RESTGetAPIEntitlementsQuery {
|
||||
/**
|
||||
* User ID to look up entitlements for
|
||||
*/
|
||||
user_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Optional list of SKU IDs to check entitlements for
|
||||
* Comma-delimited set of snowflakes
|
||||
*/
|
||||
sku_ids?: string | undefined;
|
||||
/**
|
||||
* Retrieve entitlements before this entitlement ID
|
||||
*/
|
||||
before?: Snowflake | undefined;
|
||||
/**
|
||||
* Retrieve entitlements after this entitlement ID
|
||||
*/
|
||||
after?: Snowflake | undefined;
|
||||
/**
|
||||
* Number of entitlements to return (1-100)
|
||||
*
|
||||
* @default 100
|
||||
*/
|
||||
limit?: number | undefined;
|
||||
/**
|
||||
* Guild ID to look up entitlements for
|
||||
*/
|
||||
guild_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Whether ended entitlements should be omitted
|
||||
*/
|
||||
exclude_ended?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild or user to grant the entitlement to
|
||||
*/
|
||||
owner_id: Snowflake;
|
||||
/**
|
||||
* The type of entitlement owner
|
||||
*/
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export enum EntitlementOwnerType {
|
||||
Guild = 1,
|
||||
User,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
|
||||
*/
|
||||
export type RESTDeleteAPIEntitlementResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#list-skus
|
||||
*/
|
||||
export type RESTGetAPISKUsResult = APISKU[];
|
||||
@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
|
||||
* Notify @everyone that a stage instance has started
|
||||
*/
|
||||
send_start_notification?: boolean | undefined;
|
||||
/**
|
||||
* The guild scheduled event associated with this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v9/mod.ts';
|
||||
export type RESTGetAPIStickerResult = APISticker;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*/
|
||||
export interface RESTGetNitroStickerPacksResult {
|
||||
export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
* @deprecated Use `RESTGetStickerPacksResult` instead
|
||||
*/
|
||||
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
|
||||
*/
|
||||
|
||||
@@ -5,11 +5,11 @@ import type {
|
||||
APIEmbed,
|
||||
APIMessage,
|
||||
APIWebhook,
|
||||
APIAttachment,
|
||||
MessageFlags,
|
||||
APIMessageActionRowComponent,
|
||||
} from '../../payloads/v9/mod.ts';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
|
||||
import type { RESTAPIAttachment } from './channel.ts';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
|
||||
*/
|
||||
thread_name?: string | undefined;
|
||||
/**
|
||||
* Array of tag ids to apply to the thread
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
114
gateway/v10.ts
114
gateway/v10.ts
@@ -33,6 +33,8 @@ import type {
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
APIAuditLogEntry,
|
||||
APIEntitlement,
|
||||
ChannelType,
|
||||
} from '../payloads/v10/index';
|
||||
import type { Nullable } from '../utils/internals';
|
||||
|
||||
@@ -268,6 +270,9 @@ export enum GatewayDispatchEvents {
|
||||
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
|
||||
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
|
||||
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
}
|
||||
|
||||
export type GatewaySendPayload =
|
||||
@@ -335,13 +340,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayThreadListSyncDispatch
|
||||
| GatewayThreadMembersUpdateDispatch
|
||||
| GatewayThreadMemberUpdateDispatch
|
||||
| GatewayThreadModifyDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadUpdateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayTypingStartDispatch
|
||||
| GatewayUserUpdateDispatch
|
||||
| GatewayVoiceServerUpdateDispatch
|
||||
| GatewayVoiceStateUpdateDispatch
|
||||
| GatewayWebhooksUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch;
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayEntitlementModifyDispatch;
|
||||
|
||||
// #region Dispatch Payloads
|
||||
|
||||
@@ -672,6 +680,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatch = DataPayload<
|
||||
| GatewayDispatchEvents.EntitlementCreate
|
||||
| GatewayDispatchEvents.EntitlementUpdate
|
||||
| GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementModifyDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#guild-create
|
||||
*/
|
||||
@@ -1421,7 +1478,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'member' | 'message_author_id'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
@@ -1551,6 +1611,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
|
||||
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* @deprecated This type doesn't accurately reflect the Discord API.
|
||||
* Use {@apilink GatewayThreadCreateDispatch},
|
||||
* {@apilink GatewayThreadUpdateDispatch}, or
|
||||
* {@apilink GatewayThreadDeleteDispatch} instead.
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
@@ -1563,7 +1627,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
*/
|
||||
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate,
|
||||
GatewayThreadCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
@@ -1578,22 +1645,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayThreadUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadDelete,
|
||||
GatewayThreadDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
|
||||
export interface GatewayThreadDeleteDispatchData {
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The id of the parent channel of the thread
|
||||
*/
|
||||
parent_id: Snowflake;
|
||||
/**
|
||||
* The type of the channel
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
*/
|
||||
type: ChannelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#typing-start
|
||||
@@ -1957,7 +2049,7 @@ export interface GatewayPresenceUpdateData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
|
||||
*/
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
|
||||
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
@@ -2024,6 +2116,10 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
},
|
||||
O
|
||||
>
|
||||
|
||||
114
gateway/v9.ts
114
gateway/v9.ts
@@ -33,8 +33,10 @@ import type {
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
APIAuditLogEntry,
|
||||
ChannelType,
|
||||
} from '../payloads/v9/index';
|
||||
import type { Nullable } from '../utils/internals';
|
||||
import type { APIEntitlement } from '../v10';
|
||||
|
||||
export * from './common';
|
||||
|
||||
@@ -267,6 +269,9 @@ export enum GatewayDispatchEvents {
|
||||
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
|
||||
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
|
||||
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
}
|
||||
|
||||
export type GatewaySendPayload =
|
||||
@@ -334,13 +339,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayThreadListSyncDispatch
|
||||
| GatewayThreadMembersUpdateDispatch
|
||||
| GatewayThreadMemberUpdateDispatch
|
||||
| GatewayThreadModifyDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadUpdateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayTypingStartDispatch
|
||||
| GatewayUserUpdateDispatch
|
||||
| GatewayVoiceServerUpdateDispatch
|
||||
| GatewayVoiceStateUpdateDispatch
|
||||
| GatewayWebhooksUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch;
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayEntitlementModifyDispatch;
|
||||
|
||||
// #region Dispatch Payloads
|
||||
|
||||
@@ -671,6 +679,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementModifyDispatch = DataPayload<
|
||||
| GatewayDispatchEvents.EntitlementCreate
|
||||
| GatewayDispatchEvents.EntitlementUpdate
|
||||
| GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementModifyDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#guild-update
|
||||
*/
|
||||
@@ -1420,7 +1477,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'member' | 'message_author_id'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
|
||||
@@ -1550,6 +1610,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
|
||||
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* @deprecated This type doesn't accurately reflect the Discord API.
|
||||
* Use {@apilink GatewayThreadCreateDispatch},
|
||||
* {@apilink GatewayThreadUpdateDispatch}, or
|
||||
* {@apilink GatewayThreadDeleteDispatch} instead.
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
@@ -1562,7 +1626,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
*/
|
||||
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate,
|
||||
GatewayThreadCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-create
|
||||
@@ -1577,22 +1644,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayThreadUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-update
|
||||
*/
|
||||
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayThreadDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadDelete,
|
||||
GatewayThreadDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
|
||||
*/
|
||||
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
|
||||
export interface GatewayThreadDeleteDispatchData {
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The id of the parent channel of the thread
|
||||
*/
|
||||
parent_id: Snowflake;
|
||||
/**
|
||||
* The type of the channel
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
*/
|
||||
type: ChannelType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#typing-start
|
||||
@@ -1956,7 +2048,7 @@ export interface GatewayPresenceUpdateData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
|
||||
*/
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
|
||||
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
@@ -2023,6 +2115,10 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
},
|
||||
O
|
||||
>
|
||||
|
||||
236
package-lock.json
generated
236
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.45",
|
||||
"version": "0.37.71",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.45",
|
||||
"version": "0.37.71",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/runtime-corejs3": "^7.18.0",
|
||||
@@ -436,24 +436,96 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.21.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
|
||||
"integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==",
|
||||
"version": "7.22.13",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
|
||||
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.18.6"
|
||||
"@babel/highlight": "^7.22.13",
|
||||
"chalk": "^2.4.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz",
|
||||
"integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==",
|
||||
"node_modules/@babel/code-frame/node_modules/ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.21.5",
|
||||
"color-convert": "^1.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame/node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-flag": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
|
||||
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.23.0",
|
||||
"@jridgewell/gen-mapping": "^0.3.2",
|
||||
"@jridgewell/trace-mapping": "^0.3.17",
|
||||
"jsesc": "^2.5.1"
|
||||
@@ -462,20 +534,14 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator/node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.14",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
||||
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.18",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
|
||||
"integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
|
||||
"version": "0.3.20",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
||||
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "1.4.14"
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator/node_modules/jsesc": {
|
||||
@@ -491,77 +557,77 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-environment-visitor": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz",
|
||||
"integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==",
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
|
||||
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-function-name": {
|
||||
"version": "7.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz",
|
||||
"integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==",
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
|
||||
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.20.7",
|
||||
"@babel/types": "^7.21.0"
|
||||
"@babel/template": "^7.22.15",
|
||||
"@babel/types": "^7.23.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-hoist-variables": {
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
|
||||
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
|
||||
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.18.6"
|
||||
"@babel/types": "^7.22.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-split-export-declaration": {
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
|
||||
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
|
||||
"version": "7.22.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
|
||||
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.18.6"
|
||||
"@babel/types": "^7.22.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz",
|
||||
"integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==",
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
|
||||
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
|
||||
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
|
||||
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/highlight": {
|
||||
"version": "7.18.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
|
||||
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
|
||||
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.18.6",
|
||||
"chalk": "^2.0.0",
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"chalk": "^2.4.2",
|
||||
"js-tokens": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -640,9 +706,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.5.tgz",
|
||||
"integrity": "sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==",
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
|
||||
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@@ -676,33 +742,33 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
|
||||
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
|
||||
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
"@babel/parser": "^7.20.7",
|
||||
"@babel/types": "^7.20.7"
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/parser": "^7.22.15",
|
||||
"@babel/types": "^7.22.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.5.tgz",
|
||||
"integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==",
|
||||
"version": "7.23.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
|
||||
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.21.4",
|
||||
"@babel/generator": "^7.21.5",
|
||||
"@babel/helper-environment-visitor": "^7.21.5",
|
||||
"@babel/helper-function-name": "^7.21.0",
|
||||
"@babel/helper-hoist-variables": "^7.18.6",
|
||||
"@babel/helper-split-export-declaration": "^7.18.6",
|
||||
"@babel/parser": "^7.21.5",
|
||||
"@babel/types": "^7.21.5",
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/generator": "^7.23.0",
|
||||
"@babel/helper-environment-visitor": "^7.22.20",
|
||||
"@babel/helper-function-name": "^7.23.0",
|
||||
"@babel/helper-hoist-variables": "^7.22.5",
|
||||
"@babel/helper-split-export-declaration": "^7.22.6",
|
||||
"@babel/parser": "^7.23.0",
|
||||
"@babel/types": "^7.23.0",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0"
|
||||
},
|
||||
@@ -720,13 +786,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.5.tgz",
|
||||
"integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==",
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
|
||||
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.21.5",
|
||||
"@babel/helper-validator-identifier": "^7.19.1",
|
||||
"@babel/helper-string-parser": "^7.22.5",
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -5461,8 +5527,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ip": {
|
||||
"version": "1.1.5",
|
||||
"integrity": "sha512-rBtCAQAJm8A110nbwn6YdveUnuZH3WrC36IwkRXxDnq53JvXA2NVQvB7IHyKomxK1MJ4VDNw3UtFDdXQ+AvLYA==",
|
||||
"version": "1.1.9",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz",
|
||||
"integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/irregular-plurals": {
|
||||
@@ -7638,9 +7705,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.23",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
|
||||
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -9448,9 +9515,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vm2": {
|
||||
"version": "3.9.16",
|
||||
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz",
|
||||
"integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==",
|
||||
"version": "3.9.19",
|
||||
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz",
|
||||
"integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.7.0",
|
||||
@@ -9591,8 +9658,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
|
||||
"integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.45",
|
||||
"version": "0.37.71",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
|
||||
@@ -182,7 +182,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
/**
|
||||
* Allows management and editing of emojis, stickers, and soundboard sounds
|
||||
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
|
||||
*/
|
||||
ManageGuildExpressions: 1n << 30n,
|
||||
/**
|
||||
@@ -198,7 +198,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
RequestToSpeak: 1n << 32n,
|
||||
/**
|
||||
* Allows for creating, editing, and deleting scheduled events
|
||||
* Allows for editing and deleting scheduled events created by all users
|
||||
*
|
||||
* Applies to channel types: Voice, Stage
|
||||
*/
|
||||
@@ -254,6 +254,16 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Voice
|
||||
*/
|
||||
UseSoundboard: 1n << 42n,
|
||||
/**
|
||||
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user
|
||||
*/
|
||||
CreateGuildExpressions: 1n << 43n,
|
||||
/**
|
||||
* Allows for creating scheduled events, and editing and deleting those created by the current user
|
||||
*
|
||||
* Applies to channel types: Voice, Stage
|
||||
*/
|
||||
CreateEvents: 1n << 44n,
|
||||
/**
|
||||
* Allows the usage of custom soundboard sounds from other servers
|
||||
*
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals';
|
||||
import type { APIRole, LocaleString } from '../../../v10';
|
||||
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel';
|
||||
import type { APIGuildMember } from '../guild';
|
||||
import type { APIEntitlement } from '../monetization';
|
||||
import type { APIUser } from '../user';
|
||||
import type { InteractionType } from './responses';
|
||||
|
||||
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
entitlements: APIEntitlement[];
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
|
||||
> &
|
||||
Required<Pick<Original, 'member' | 'guild_id'>>;
|
||||
|
||||
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
|
||||
type: T;
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
thread_metadata?: APIThreadMetadata | null;
|
||||
permissions: Permissions;
|
||||
parent_id?: string | null;
|
||||
}
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
|
||||
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
|
||||
@@ -24,7 +24,8 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
| APIModalInteractionResponse
|
||||
| APIPremiumRequiredInteractionResponse;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIPremiumRequiredInteractionResponse {
|
||||
type: InteractionResponseType.PremiumRequired;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*/
|
||||
PremiumRequired,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { LocalizationMap } from '../common';
|
||||
import type { APIPartialGuild } from './guild';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APITeam } from './teams';
|
||||
import type { APIUser } from './user';
|
||||
@@ -40,6 +41,10 @@ export interface APIApplication {
|
||||
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
|
||||
*/
|
||||
bot_require_code_grant: boolean;
|
||||
/**
|
||||
* Partial user object for the bot user associated with the application
|
||||
*/
|
||||
bot?: APIUser;
|
||||
/**
|
||||
* The url of the application's terms of service
|
||||
*/
|
||||
@@ -59,7 +64,7 @@ export interface APIApplication {
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
@@ -76,6 +81,10 @@ export interface APIApplication {
|
||||
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* A partial object of the associated guild
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
|
||||
*/
|
||||
@@ -95,7 +104,24 @@ export interface APIApplication {
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Up to 5 tags describing the content and functionality of the application
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
redirect_uris?: string[];
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
tags?: [string, string?, string?, string?, string?];
|
||||
/**
|
||||
@@ -106,11 +132,6 @@ export interface APIApplication {
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
import type { APIChannel, APIOverwrite } from './channel';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildMFALevel,
|
||||
@@ -200,6 +201,9 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +313,15 @@ export interface APIAuditLogOptions {
|
||||
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
/**
|
||||
* Type of integration which performed the action
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_KICK
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -469,6 +482,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
@@ -717,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
|
||||
@@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_total_limit?: number;
|
||||
/**
|
||||
* Whether to automatically detect mention raids
|
||||
*
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_raid_protection_enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { APIMessageInteraction } from './interactions';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker, APIStickerItem } from './sticker';
|
||||
import type { APIUser } from './user';
|
||||
@@ -48,7 +48,6 @@ export type TextChannelType =
|
||||
| ChannelType.PrivateThread
|
||||
| ChannelType.AnnouncementThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice
|
||||
| ChannelType.GuildStageVoice;
|
||||
|
||||
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
|
||||
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends Omit<APITextBasedChannel<T>, 'name'>,
|
||||
APIGuildChannel<T> {
|
||||
/**
|
||||
@@ -124,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
|
||||
* The channel topic (0-1024 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
}
|
||||
@@ -205,12 +204,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
|
||||
managed?: boolean;
|
||||
}
|
||||
|
||||
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
|
||||
|
||||
export interface APIThreadChannel
|
||||
extends Omit<
|
||||
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
|
||||
'name'
|
||||
>,
|
||||
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
|
||||
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
|
||||
APIGuildChannel<ThreadChannelType> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -240,7 +238,7 @@ export interface APIThreadChannel
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
@@ -317,25 +315,60 @@ export enum ForumLayoutType {
|
||||
GalleryView,
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
/**
|
||||
* The id of the last thread created in this channel (may not point to an existing or valid thread)
|
||||
*/
|
||||
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
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
/**
|
||||
* When the last pinned message was pinned.
|
||||
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
|
||||
*/
|
||||
last_pin_timestamp?: string | null;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel
|
||||
*/
|
||||
available_tags: APIGuildForumTag[];
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
* The initial `rate_limit_per_user` to set on newly created threads.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*/
|
||||
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
/**
|
||||
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
|
||||
*/
|
||||
default_forum_layout: ForumLayoutType;
|
||||
}
|
||||
|
||||
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
|
||||
*/
|
||||
@@ -348,7 +381,8 @@ export type APIChannel =
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APIGuildForumChannel;
|
||||
| APIGuildForumChannel
|
||||
| APIGuildMediaChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
@@ -410,6 +444,12 @@ export enum ChannelType {
|
||||
* A channel that can only contain threads
|
||||
*/
|
||||
GuildForum,
|
||||
/**
|
||||
* A channel like forum channels but contains media for server subscriptions
|
||||
*
|
||||
* See https://creator-support.discord.com/hc/articles/14346342766743
|
||||
*/
|
||||
GuildMedia,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
@@ -665,11 +705,16 @@ export interface APIMessage {
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
|
||||
/**
|
||||
* Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
|
||||
*/
|
||||
role_subscription_data?: APIMessageRoleSubscriptionData;
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the message's auto-populated select menus
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -855,19 +900,45 @@ export interface APIFollowedChannel {
|
||||
*/
|
||||
export interface APIReaction {
|
||||
/**
|
||||
* Times this emoji has been used to react
|
||||
* Total number of times this emoji has been used to react (including super reacts)
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
* An object detailing the individual reaction counts for different types of reactions
|
||||
*/
|
||||
count_details: APIReactionCountDetails;
|
||||
/**
|
||||
* Whether the current user reacted using this emoji
|
||||
*/
|
||||
me: boolean;
|
||||
/**
|
||||
* Whether the current user super-reacted using this emoji
|
||||
*/
|
||||
me_burst: boolean;
|
||||
/**
|
||||
* Emoji information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIPartialEmoji;
|
||||
/**
|
||||
* Hexadecimal colors used for this super reaction
|
||||
*/
|
||||
burst_colors: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
|
||||
*/
|
||||
export interface APIReactionCountDetails {
|
||||
/**
|
||||
* Count of super reactions
|
||||
*/
|
||||
burst: number;
|
||||
/**
|
||||
* Count of normal reactions
|
||||
*/
|
||||
normal: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1332,6 +1403,20 @@ export interface APIAttachment {
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
/**
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1584,6 +1669,20 @@ export interface APIBaseSelectMenuComponent<
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface APIBaseAutoPopulatedSelectMenuComponent<
|
||||
T extends
|
||||
| ComponentType.UserSelect
|
||||
| ComponentType.RoleSelect
|
||||
| ComponentType.MentionableSelect
|
||||
| ComponentType.ChannelSelect,
|
||||
D extends SelectMenuDefaultValueType,
|
||||
> extends APIBaseSelectMenuComponent<T> {
|
||||
/**
|
||||
* List of default values for auto-populated select menu components
|
||||
*/
|
||||
default_values?: APISelectMenuDefaultValue<D>[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1597,28 +1696,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
|
||||
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.UserSelect,
|
||||
SelectMenuDefaultValueType.User
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
|
||||
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.RoleSelect,
|
||||
SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
|
||||
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.MentionableSelect,
|
||||
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
channel_types?: ChannelType[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export enum SelectMenuDefaultValueType {
|
||||
Channel = 'channel',
|
||||
Role = 'role',
|
||||
User = 'user',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
|
||||
type: T;
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
export type APIAutoPopulatedSelectMenuComponent =
|
||||
| APIChannelSelectComponent
|
||||
| APIMentionableSelectComponent
|
||||
| APIRoleSelectComponent
|
||||
| APIUserSelectComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1668,7 +1800,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
@@ -1730,6 +1862,10 @@ export enum ChannelFlags {
|
||||
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
IsScheduledForDeletion = 1 << 9,
|
||||
/**
|
||||
* Whether media download options are hidden.
|
||||
*/
|
||||
HideMediaDownloadOptions = 1 << 15,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
status?: PresenceUpdateStatus;
|
||||
status?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
*/
|
||||
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
||||
*/
|
||||
desktop?: PresenceUpdateStatus;
|
||||
desktop?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active mobile (iOS, Android) application session
|
||||
*/
|
||||
mobile?: PresenceUpdateStatus;
|
||||
mobile?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active web (browser, bot account) application session
|
||||
*/
|
||||
web?: PresenceUpdateStatus;
|
||||
web?: PresenceUpdateReceiveStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,7 +181,7 @@ export interface GatewayActivity {
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* The user's current party status
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
@@ -261,7 +266,7 @@ export enum ActivityType {
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {details}
|
||||
* {emoji} {state}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji';
|
||||
import type { PresenceUpdateStatus } from './gateway';
|
||||
import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker } from './sticker';
|
||||
@@ -276,6 +276,10 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* The type of Student Hub the guild is
|
||||
*/
|
||||
hub_type: GuildHubType | null;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,7 +427,7 @@ export enum GuildFeature {
|
||||
* Guild has enabled the role subscription promo page
|
||||
*/
|
||||
CreatorStorePage = 'CREATOR_STORE_PAGE',
|
||||
/*
|
||||
/**
|
||||
* Guild has been set as a support server on the App Directory
|
||||
*/
|
||||
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
|
||||
@@ -493,6 +497,10 @@ export enum GuildFeature {
|
||||
* Guild has access to create private threads
|
||||
*/
|
||||
PrivateThreads = 'PRIVATE_THREADS',
|
||||
/**
|
||||
* Guild has disabled alerts for join raids in the configured safety alerts channel
|
||||
*/
|
||||
RaidAlertsDisabled = 'RAID_ALERTS_DISABLED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild is able to set role icons
|
||||
@@ -895,7 +903,7 @@ export interface APIGuildWidgetMember {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
status: PresenceUpdateStatus;
|
||||
status: PresenceUpdateReceiveStatus;
|
||||
activity?: { name: string };
|
||||
avatar_url: string;
|
||||
}
|
||||
@@ -1020,6 +1028,10 @@ export interface APIGuildOnboarding {
|
||||
* Whether onboarding is enabled in the guild
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Current mode of onboarding
|
||||
*/
|
||||
mode: GuildOnboardingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1087,6 +1099,20 @@ export interface APIGuildOnboardingPromptOption {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
|
||||
*/
|
||||
export enum GuildOnboardingMode {
|
||||
/**
|
||||
* Counts only Default Channels towards constraints
|
||||
*/
|
||||
OnboardingDefault,
|
||||
/**
|
||||
* Counts Default Channels and Questions towards constraints
|
||||
*/
|
||||
OnboardingAdvanced,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
|
||||
*/
|
||||
|
||||
@@ -18,3 +18,4 @@ export * from './template';
|
||||
export * from './user';
|
||||
export * from './voice';
|
||||
export * from './webhook';
|
||||
export * from './monetization';
|
||||
|
||||
115
payloads/v10/monetization.ts
Normal file
115
payloads/v10/monetization.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
|
||||
*/
|
||||
export interface APIEntitlement {
|
||||
/**
|
||||
* ID of the entitlement
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the user that is granted access to the entitlement's sku
|
||||
*/
|
||||
user_id?: Snowflake;
|
||||
/**
|
||||
* ID of the guild that is granted access to the entitlement's sku
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Type of entitlement
|
||||
*/
|
||||
type: EntitlementType;
|
||||
/**
|
||||
* Whether the entitlement was deleted
|
||||
*/
|
||||
deleted: boolean;
|
||||
/**
|
||||
* Start date at which the entitlement is valid. Not present when using test entitlements.
|
||||
*/
|
||||
starts_at?: string;
|
||||
/**
|
||||
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
||||
*/
|
||||
ends_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
||||
*/
|
||||
export enum EntitlementType {
|
||||
/**
|
||||
* Entitlement was purchased as an app subscription
|
||||
*/
|
||||
ApplicationSubscription = 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
|
||||
*/
|
||||
export interface APISKU {
|
||||
/**
|
||||
* ID of SKU
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of SKU
|
||||
*/
|
||||
type: SKUType;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Customer-facing name of your premium offering
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* System-generated URL slug based on the SKU's name
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
* SKU flags combined as a bitfield
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
flags: SKUFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
|
||||
*/
|
||||
export enum SKUFlags {
|
||||
/**
|
||||
* SKU is available for purchase
|
||||
*/
|
||||
Available = 1 << 2,
|
||||
/**
|
||||
* Recurring SKU that can be purchased by a user and applied to a single server.
|
||||
* Grants access to every user in that server.
|
||||
*/
|
||||
GuildSubscription = 1 << 7,
|
||||
/**
|
||||
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
|
||||
*/
|
||||
UserSubscription = 1 << 8,
|
||||
}
|
||||
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Represents a recurring subscription
|
||||
*/
|
||||
Subscription = 5,
|
||||
/**
|
||||
* System-generated group for each Subscription SKU created
|
||||
*/
|
||||
SubscriptionGroup = 6,
|
||||
}
|
||||
@@ -54,6 +54,10 @@ export interface APIRole {
|
||||
* The tags this role has
|
||||
*/
|
||||
tags?: APIRoleTags;
|
||||
/**
|
||||
* Role flags
|
||||
*/
|
||||
flags: RoleFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,3 +89,13 @@ export interface APIRoleTags {
|
||||
*/
|
||||
guild_connections?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
||||
*/
|
||||
export enum RoleFlags {
|
||||
/**
|
||||
* Role can be selected by members in an onboarding prompt
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface APISticker {
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
|
||||
* An official sticker in a pack
|
||||
*/
|
||||
Standard = 1,
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,8 @@ export interface APITeamMember {
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
@@ -55,6 +57,12 @@ export interface APITeamMember {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The user's role in the team.
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#team-member-roles
|
||||
*/
|
||||
role: TeamMemberRole;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
|
||||
*/
|
||||
export enum TeamMemberRole {
|
||||
Admin = 'admin',
|
||||
Developer = 'developer',
|
||||
ReadOnly = 'read_only',
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ export interface APIUser {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +281,11 @@ export enum ConnectionService {
|
||||
Steam = 'steam',
|
||||
TikTok = 'tiktok',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
*/
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
@@ -1297,7 +1297,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals';
|
||||
import type { APIRole, LocaleString } from '../../../v9';
|
||||
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel';
|
||||
import type { APIGuildMember } from '../guild';
|
||||
import type { APIEntitlement } from '../monetization';
|
||||
import type { APIUser } from '../user';
|
||||
import type { InteractionType } from './responses';
|
||||
|
||||
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
entitlements: APIEntitlement[];
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
|
||||
> &
|
||||
Required<Pick<Original, 'member' | 'guild_id'>>;
|
||||
|
||||
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
|
||||
type: T;
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
thread_metadata?: APIThreadMetadata | null;
|
||||
permissions: Permissions;
|
||||
parent_id?: string | null;
|
||||
}
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
|
||||
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
|
||||
@@ -24,7 +24,8 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
| APIModalInteractionResponse
|
||||
| APIPremiumRequiredInteractionResponse;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIPremiumRequiredInteractionResponse {
|
||||
type: InteractionResponseType.PremiumRequired;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*/
|
||||
PremiumRequired,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { LocalizationMap } from '../common';
|
||||
import type { APIPartialGuild } from './guild';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APITeam } from './teams';
|
||||
import type { APIUser } from './user';
|
||||
@@ -40,6 +41,10 @@ export interface APIApplication {
|
||||
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
|
||||
*/
|
||||
bot_require_code_grant: boolean;
|
||||
/**
|
||||
* Partial user object for the bot user associated with the application
|
||||
*/
|
||||
bot?: APIUser;
|
||||
/**
|
||||
* The url of the application's terms of service
|
||||
*/
|
||||
@@ -59,7 +64,7 @@ export interface APIApplication {
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
@@ -76,6 +81,10 @@ export interface APIApplication {
|
||||
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* A partial object of the associated guild
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
|
||||
*/
|
||||
@@ -95,7 +104,24 @@ export interface APIApplication {
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Up to 5 tags describing the content and functionality of the application
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
redirect_uris?: string[];
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
tags?: [string, string?, string?, string?, string?];
|
||||
/**
|
||||
@@ -106,11 +132,6 @@ export interface APIApplication {
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
|
||||
@@ -13,6 +13,7 @@ import type {
|
||||
import type { APIChannel, APIOverwrite } from './channel';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildMFALevel,
|
||||
@@ -200,6 +201,9 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,6 +313,15 @@ export interface APIAuditLogOptions {
|
||||
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
/**
|
||||
* Type of integration which performed the action
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_KICK
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -469,6 +482,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
@@ -717,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
|
||||
@@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_total_limit?: number;
|
||||
/**
|
||||
* Whether to automatically detect mention raids
|
||||
*
|
||||
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
|
||||
*/
|
||||
mention_raid_protection_enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { APIMessageInteraction } from './interactions';
|
||||
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker, APIStickerItem } from './sticker';
|
||||
import type { APIUser } from './user';
|
||||
@@ -48,7 +48,6 @@ export type TextChannelType =
|
||||
| ChannelType.PrivateThread
|
||||
| ChannelType.AnnouncementThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice
|
||||
| ChannelType.GuildStageVoice;
|
||||
|
||||
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
|
||||
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends Omit<APITextBasedChannel<T>, 'name'>,
|
||||
APIGuildChannel<T> {
|
||||
/**
|
||||
@@ -201,12 +200,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
|
||||
managed?: boolean;
|
||||
}
|
||||
|
||||
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
|
||||
|
||||
export interface APIThreadChannel
|
||||
extends Omit<
|
||||
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
|
||||
'name'
|
||||
>,
|
||||
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
|
||||
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
|
||||
APIGuildChannel<ThreadChannelType> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -236,7 +234,7 @@ export interface APIThreadChannel
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel
|
||||
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
|
||||
*/
|
||||
applied_tags: Snowflake[];
|
||||
}
|
||||
@@ -313,25 +311,60 @@ export enum ForumLayoutType {
|
||||
GalleryView,
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
topic?: string | null;
|
||||
/**
|
||||
* The id of the last thread created in this channel (may not point to an existing or valid thread)
|
||||
*/
|
||||
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
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
/**
|
||||
* When the last pinned message was pinned.
|
||||
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
|
||||
*/
|
||||
last_pin_timestamp?: string | null;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel
|
||||
*/
|
||||
available_tags: APIGuildForumTag[];
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
* The initial `rate_limit_per_user` to set on newly created threads.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*/
|
||||
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*/
|
||||
default_sort_order: SortOrderType | null;
|
||||
}
|
||||
|
||||
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
|
||||
/**
|
||||
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
|
||||
*/
|
||||
default_forum_layout: ForumLayoutType;
|
||||
}
|
||||
|
||||
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
|
||||
*/
|
||||
@@ -344,7 +377,8 @@ export type APIChannel =
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APIGuildForumChannel;
|
||||
| APIGuildForumChannel
|
||||
| APIGuildMediaChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
@@ -406,6 +440,12 @@ export enum ChannelType {
|
||||
* A channel that can only contain threads
|
||||
*/
|
||||
GuildForum,
|
||||
/**
|
||||
* A channel like forum channels but contains media for server subscriptions
|
||||
*
|
||||
* See https://creator-support.discord.com/hc/articles/14346342766743
|
||||
*/
|
||||
GuildMedia,
|
||||
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
|
||||
/**
|
||||
@@ -656,6 +696,12 @@ export interface APIMessage {
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the message's auto-populated select menus
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -819,19 +865,45 @@ export interface APIFollowedChannel {
|
||||
*/
|
||||
export interface APIReaction {
|
||||
/**
|
||||
* Times this emoji has been used to react
|
||||
* Total number of times this emoji has been used to react (including super reacts)
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
* An object detailing the individual reaction counts for different types of reactions
|
||||
*/
|
||||
count_details: APIReactionCountDetails;
|
||||
/**
|
||||
* Whether the current user reacted using this emoji
|
||||
*/
|
||||
me: boolean;
|
||||
/**
|
||||
* Whether the current user super-reacted using this emoji
|
||||
*/
|
||||
me_burst: boolean;
|
||||
/**
|
||||
* Emoji information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emoji: APIPartialEmoji;
|
||||
/**
|
||||
* Hexadecimal colors used for this super reaction
|
||||
*/
|
||||
burst_colors: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
|
||||
*/
|
||||
export interface APIReactionCountDetails {
|
||||
/**
|
||||
* Count of super reactions
|
||||
*/
|
||||
burst: number;
|
||||
/**
|
||||
* Count of normal reactions
|
||||
*/
|
||||
normal: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1300,6 +1372,20 @@ export interface APIAttachment {
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
/**
|
||||
* Attachment flags combined as a bitfield
|
||||
*/
|
||||
flags?: AttachmentFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
|
||||
*/
|
||||
export enum AttachmentFlags {
|
||||
/**
|
||||
* This attachment has been edited using the remix feature on mobile
|
||||
*/
|
||||
IsRemix = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1552,6 +1638,20 @@ export interface APIBaseSelectMenuComponent<
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface APIBaseAutoPopulatedSelectMenuComponent<
|
||||
T extends
|
||||
| ComponentType.UserSelect
|
||||
| ComponentType.RoleSelect
|
||||
| ComponentType.MentionableSelect
|
||||
| ComponentType.ChannelSelect,
|
||||
D extends SelectMenuDefaultValueType,
|
||||
> extends APIBaseSelectMenuComponent<T> {
|
||||
/**
|
||||
* List of default values for auto-populated select menu components
|
||||
*/
|
||||
default_values?: APISelectMenuDefaultValue<D>[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1565,28 +1665,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
|
||||
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.UserSelect,
|
||||
SelectMenuDefaultValueType.User
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
|
||||
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.RoleSelect,
|
||||
SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
|
||||
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.MentionableSelect,
|
||||
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
channel_types?: ChannelType[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export enum SelectMenuDefaultValueType {
|
||||
Channel = 'channel',
|
||||
Role = 'role',
|
||||
User = 'user',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
|
||||
*/
|
||||
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
|
||||
type: T;
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
export type APIAutoPopulatedSelectMenuComponent =
|
||||
| APIChannelSelectComponent
|
||||
| APIMentionableSelectComponent
|
||||
| APIRoleSelectComponent
|
||||
| APIUserSelectComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
*/
|
||||
@@ -1636,7 +1769,7 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Text that appears on top of the text input field, max 80 characters
|
||||
* Text that appears on top of the text input field, max 45 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
@@ -1698,6 +1831,10 @@ export enum ChannelFlags {
|
||||
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
IsScheduledForDeletion = 1 << 9,
|
||||
/**
|
||||
* Whether media download options are hidden.
|
||||
*/
|
||||
HideMediaDownloadOptions = 1 << 15,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
status?: PresenceUpdateStatus;
|
||||
status?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
*/
|
||||
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
||||
*/
|
||||
desktop?: PresenceUpdateStatus;
|
||||
desktop?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active mobile (iOS, Android) application session
|
||||
*/
|
||||
mobile?: PresenceUpdateStatus;
|
||||
mobile?: PresenceUpdateReceiveStatus;
|
||||
/**
|
||||
* The user's status set for an active web (browser, bot account) application session
|
||||
*/
|
||||
web?: PresenceUpdateStatus;
|
||||
web?: PresenceUpdateReceiveStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,7 +172,7 @@ export interface GatewayActivity {
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* The user's current party status
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
@@ -249,7 +254,7 @@ export enum ActivityType {
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {details}
|
||||
* {emoji} {state}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji';
|
||||
import type { PresenceUpdateStatus } from './gateway';
|
||||
import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker } from './sticker';
|
||||
@@ -276,6 +276,10 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* The type of Student Hub the guild is
|
||||
*/
|
||||
hub_type: GuildHubType | null;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -415,7 +419,7 @@ export enum GuildFeature {
|
||||
* Guild has enabled the role subscription promo page
|
||||
*/
|
||||
CreatorStorePage = 'CREATOR_STORE_PAGE',
|
||||
/*
|
||||
/**
|
||||
* Guild has been set as a support server on the App Directory
|
||||
*/
|
||||
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
|
||||
@@ -485,6 +489,10 @@ export enum GuildFeature {
|
||||
* Guild has access to create private threads
|
||||
*/
|
||||
PrivateThreads = 'PRIVATE_THREADS',
|
||||
/**
|
||||
* Guild has disabled alerts for join raids in the configured safety alerts channel
|
||||
*/
|
||||
RaidAlertsDisabled = 'RAID_ALERTS_DISABLED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild is able to set role icons
|
||||
@@ -887,7 +895,7 @@ export interface APIGuildWidgetMember {
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
status: PresenceUpdateStatus;
|
||||
status: PresenceUpdateReceiveStatus;
|
||||
activity?: { name: string };
|
||||
avatar_url: string;
|
||||
}
|
||||
@@ -1012,6 +1020,10 @@ export interface APIGuildOnboarding {
|
||||
* Whether onboarding is enabled in the guild
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Current mode of onboarding
|
||||
*/
|
||||
mode: GuildOnboardingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1079,6 +1091,20 @@ export interface APIGuildOnboardingPromptOption {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
|
||||
*/
|
||||
export enum GuildOnboardingMode {
|
||||
/**
|
||||
* Counts only Default Channels towards constraints
|
||||
*/
|
||||
OnboardingDefault,
|
||||
/**
|
||||
* Counts Default Channels and Questions towards constraints
|
||||
*/
|
||||
OnboardingAdvanced,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
|
||||
*/
|
||||
|
||||
@@ -18,3 +18,4 @@ export * from './template';
|
||||
export * from './user';
|
||||
export * from './voice';
|
||||
export * from './webhook';
|
||||
export * from './monetization';
|
||||
|
||||
115
payloads/v9/monetization.ts
Normal file
115
payloads/v9/monetization.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
|
||||
*/
|
||||
export interface APIEntitlement {
|
||||
/**
|
||||
* ID of the entitlement
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the user that is granted access to the entitlement's sku
|
||||
*/
|
||||
user_id?: Snowflake;
|
||||
/**
|
||||
* ID of the guild that is granted access to the entitlement's sku
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Type of entitlement
|
||||
*/
|
||||
type: EntitlementType;
|
||||
/**
|
||||
* Whether the entitlement was deleted
|
||||
*/
|
||||
deleted: boolean;
|
||||
/**
|
||||
* Start date at which the entitlement is valid. Not present when using test entitlements.
|
||||
*/
|
||||
starts_at?: string;
|
||||
/**
|
||||
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
||||
*/
|
||||
ends_at?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
||||
*/
|
||||
export enum EntitlementType {
|
||||
/**
|
||||
* Entitlement was purchased as an app subscription
|
||||
*/
|
||||
ApplicationSubscription = 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
|
||||
*/
|
||||
export interface APISKU {
|
||||
/**
|
||||
* ID of SKU
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of SKU
|
||||
*/
|
||||
type: SKUType;
|
||||
/**
|
||||
* ID of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Customer-facing name of your premium offering
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* System-generated URL slug based on the SKU's name
|
||||
*/
|
||||
slug: string;
|
||||
/**
|
||||
* SKU flags combined as a bitfield
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
flags: SKUFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
|
||||
*/
|
||||
export enum SKUFlags {
|
||||
/**
|
||||
* SKU is available for purchase
|
||||
*/
|
||||
Available = 1 << 2,
|
||||
/**
|
||||
* Recurring SKU that can be purchased by a user and applied to a single server.
|
||||
* Grants access to every user in that server.
|
||||
*/
|
||||
GuildSubscription = 1 << 7,
|
||||
/**
|
||||
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
|
||||
*/
|
||||
UserSubscription = 1 << 8,
|
||||
}
|
||||
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Represents a recurring subscription
|
||||
*/
|
||||
Subscription = 5,
|
||||
/**
|
||||
* System-generated group for each Subscription SKU created
|
||||
*/
|
||||
SubscriptionGroup = 6,
|
||||
}
|
||||
@@ -54,6 +54,10 @@ export interface APIRole {
|
||||
* The tags this role has
|
||||
*/
|
||||
tags?: APIRoleTags;
|
||||
/**
|
||||
* Role flags
|
||||
*/
|
||||
flags: RoleFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,3 +89,13 @@ export interface APIRoleTags {
|
||||
*/
|
||||
guild_connections?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
||||
*/
|
||||
export enum RoleFlags {
|
||||
/**
|
||||
* Role can be selected by members in an onboarding prompt
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface APISticker {
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
|
||||
* An official sticker in a pack
|
||||
*/
|
||||
Standard = 1,
|
||||
/**
|
||||
|
||||
@@ -43,6 +43,8 @@ export interface APITeamMember {
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
@@ -55,6 +57,12 @@ export interface APITeamMember {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The user's role in the team.
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#team-member-roles
|
||||
*/
|
||||
role: TeamMemberRole;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
|
||||
*/
|
||||
export enum TeamMemberRole {
|
||||
Admin = 'admin',
|
||||
Developer = 'developer',
|
||||
ReadOnly = 'read_only',
|
||||
}
|
||||
|
||||
@@ -83,6 +83,12 @@ export interface APIUser {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +281,11 @@ export enum ConnectionService {
|
||||
Steam = 'steam',
|
||||
TikTok = 'tiktok',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
*/
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
@@ -154,6 +154,8 @@ export enum RESTJSONErrorCodes {
|
||||
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40_066,
|
||||
TagRequiredToCreateAForumPostInThisChannel,
|
||||
|
||||
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40_074,
|
||||
|
||||
MissingAccess = 50_001,
|
||||
InvalidAccountType,
|
||||
CannotExecuteActionOnDMChannel,
|
||||
@@ -198,6 +200,8 @@ export enum RESTJSONErrorCodes {
|
||||
CannotSelfRedeemThisGift = 50_054,
|
||||
InvalidGuild,
|
||||
|
||||
InvalidSKU = 50_057,
|
||||
|
||||
InvalidRequestOrigin = 50_067,
|
||||
InvalidMessageType,
|
||||
|
||||
@@ -224,7 +228,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
RequestBodyContainsInvalidJSON = 50_109,
|
||||
|
||||
OwnershipCannotBeMovedToABotUser = 50_132,
|
||||
OwnerCannotBePendingMember = 50_131,
|
||||
OwnershipCannotBeMovedToABotUser,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50_138,
|
||||
|
||||
@@ -249,6 +254,7 @@ export enum RESTJSONErrorCodes {
|
||||
NoUsersWithDiscordTagExist = 80_004,
|
||||
|
||||
ReactionWasBlocked = 90_001,
|
||||
UserCannotUseBurstReactions,
|
||||
|
||||
ApplicationNotYetAvailable = 110_001,
|
||||
|
||||
@@ -284,6 +290,9 @@ export enum RESTJSONErrorCodes {
|
||||
WebhookServicesCannotBeUsedInForumChannels,
|
||||
|
||||
MessageBlockedByHarmfulLinksFilter = 240_000,
|
||||
|
||||
CannotEnableOnboardingRequirementsAreNotMet = 350_000,
|
||||
CannotUpdateOnboardingWhileBelowRequirements,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,6 +325,7 @@ export enum Locale {
|
||||
Romanian = 'ro',
|
||||
Russian = 'ru',
|
||||
SpanishES = 'es-ES',
|
||||
SpanishLATAM = 'es-419',
|
||||
Swedish = 'sv-SE',
|
||||
Thai = 'th',
|
||||
Turkish = 'tr',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application';
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application';
|
||||
import type { Nullable, StrictPartial } from '../../utils/internals';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
||||
@@ -14,3 +15,30 @@ export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplication
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
||||
*/
|
||||
export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#get-current-application
|
||||
*/
|
||||
export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'flags'
|
||||
| 'role_connections_verification_url'
|
||||
| 'install_params'
|
||||
| 'interactions_endpoint_url'
|
||||
| 'tags'
|
||||
> &
|
||||
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#edit-current-application
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIAllowedMentions,
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIEmbed,
|
||||
APIExtendedInvite,
|
||||
@@ -18,11 +17,13 @@ import type {
|
||||
MessageFlags,
|
||||
OverwriteType,
|
||||
ThreadAutoArchiveDuration,
|
||||
ThreadChannelType,
|
||||
VideoQualityMode,
|
||||
APIGuildForumTag,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
SortOrderType,
|
||||
ForumLayoutType,
|
||||
ChannelFlags,
|
||||
} from '../../payloads/v10/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
|
||||
|
||||
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* 0-1024 character channel topic (0-4096 characters for forum channels)
|
||||
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
|
||||
*
|
||||
* Channel types: text, news, forum
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
topic?: string | null | undefined;
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, voice, news, forum
|
||||
* Channel types: text, voice, news, forum, media
|
||||
*/
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, voice, news
|
||||
* Channel types: text, voice, news, stage, forum, media
|
||||
*/
|
||||
parent_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
flags?: ChannelFlags | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a thread-only channel; limited to 20
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread
|
||||
*
|
||||
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*/
|
||||
invitable?: boolean | undefined;
|
||||
/**
|
||||
* The set of tags that can be used in a forum channel; limited to 20
|
||||
* The emoji to show in the add reaction button on a thread in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
*/
|
||||
available_tags?: APIGuildForumTag[] | undefined;
|
||||
/**
|
||||
* The emoji to show in the add reaction button on a thread in a forum channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | 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
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: text, forum, media
|
||||
*/
|
||||
default_thread_rate_limit_per_user?: number | null | undefined;
|
||||
/**
|
||||
* The default sort order type used to order posts in a forum channel
|
||||
* The default sort order type used to order posts in a thread-only channel
|
||||
*
|
||||
* Channel types: forum
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_sort_order?: SortOrderType | null | undefined;
|
||||
/**
|
||||
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* Channel types: forum
|
||||
*/
|
||||
default_forum_layout?: ForumLayoutType | undefined;
|
||||
/**
|
||||
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
|
||||
fail_if_not_exists?: boolean | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
export interface RESTAPIAttachment {
|
||||
/**
|
||||
* Attachment id or a number that matches `n` in `files[n]`
|
||||
*/
|
||||
id: Snowflake | number;
|
||||
/**
|
||||
* Name of the file
|
||||
*/
|
||||
filename?: string | undefined;
|
||||
/**
|
||||
* Description of the file
|
||||
*/
|
||||
description?: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#create-message
|
||||
*/
|
||||
@@ -284,11 +313,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
flags?: MessageFlags | undefined;
|
||||
/**
|
||||
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
|
||||
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
|
||||
*/
|
||||
enforce_nonce?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -328,7 +362,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#get-reactions
|
||||
*/
|
||||
export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
@@ -395,7 +429,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
@@ -605,8 +639,6 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
name: string;
|
||||
/**
|
||||
* The amount of time in minutes to wait before automatically archiving the thread
|
||||
*
|
||||
* The 3 day and 7 day archive durations require the server to be boosted. The [guild features](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) will indicate if a server is able to use those settings.
|
||||
*/
|
||||
auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
/**
|
||||
@@ -616,25 +648,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: RESTPostAPIChannelMessageJSONBody;
|
||||
/**
|
||||
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
|
||||
*/
|
||||
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
|
||||
/**
|
||||
* First message in the forum thread
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
@@ -658,7 +690,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
|
||||
*
|
||||
* @default ChannelType.PrivateThread
|
||||
*/
|
||||
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
|
||||
type?: ThreadChannelType | undefined;
|
||||
/**
|
||||
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
|
||||
*/
|
||||
@@ -718,7 +750,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
|
||||
*/
|
||||
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
|
||||
|
||||
/*
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
|
||||
*/
|
||||
export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
|
||||
@@ -24,8 +24,11 @@ import type {
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
} from '../../payloads/v10/index';
|
||||
import type {
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
DistributiveOmit,
|
||||
DistributivePick,
|
||||
Nullable,
|
||||
@@ -306,6 +309,10 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
* Whether the boosts progress bar should be enabled.
|
||||
*/
|
||||
premium_progress_bar_enabled?: boolean | undefined;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id?: Snowflake | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
|
||||
deaf?: boolean | undefined;
|
||||
}
|
||||
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
|
||||
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-member
|
||||
@@ -922,3 +929,48 @@ export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
|
||||
*/
|
||||
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
|
||||
> & {
|
||||
/**
|
||||
* Prompts shown during onboarding and in customize community
|
||||
*/
|
||||
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
|
||||
};
|
||||
|
||||
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
|
||||
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
|
||||
> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
|
||||
*/
|
||||
export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
|
||||
|
||||
@@ -18,6 +18,7 @@ export * from './template';
|
||||
export * from './user';
|
||||
export * from './voice';
|
||||
export * from './webhook';
|
||||
export * from './monetization';
|
||||
|
||||
export const APIVersion = '10';
|
||||
|
||||
@@ -494,7 +495,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/prviate`
|
||||
* - GET `/channels/{channel.id}/users/@me/threads/archived/private`
|
||||
*/
|
||||
channelJoinedArchivedThreads(channelId: Snowflake) {
|
||||
return `/channels/${channelId}/users/@me/threads/archived/private` as const;
|
||||
@@ -830,6 +831,16 @@ export const Routes = {
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*/
|
||||
stickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
*
|
||||
* @deprecated Use {@link Routes.stickerPacks} instead.
|
||||
*/
|
||||
nitroStickerPacks() {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
@@ -883,14 +894,54 @@ export const Routes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/@me`
|
||||
* - PATCH `/applications/@me`
|
||||
*/
|
||||
currentApplication() {
|
||||
return '/applications/@me' as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/entitlements`
|
||||
* - POST `/applications/{application.id}/entitlements`
|
||||
*/
|
||||
entitlements(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
|
||||
*/
|
||||
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
|
||||
},
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/skus`
|
||||
*/
|
||||
skus(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/skus` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
@@ -900,7 +951,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -912,7 +963,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -922,7 +973,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -932,7 +983,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
|
||||
guildId: Snowflake,
|
||||
guildDiscoverySplash: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -944,7 +999,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -956,7 +1011,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -970,7 +1025,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(index: DefaultUserAvatarAssets) {
|
||||
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
|
||||
return `/embed/avatars/${index}.png` as const;
|
||||
},
|
||||
|
||||
@@ -982,7 +1037,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -994,17 +1049,36 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
memberAvatar: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatar-decorations/{user.id}/{user.avatar_decoration}.png`
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
userAvatarDecoration(userId: Snowflake, userAvatarDecoration: string) {
|
||||
return `/avatar-decorations/${userId}/${userAvatarDecoration}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
applicationIcon<Format extends ApplicationIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationIcon: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1014,7 +1088,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
applicationCover<Format extends ApplicationCoverFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationCoverImage: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1024,7 +1102,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
applicationAsset<Format extends ApplicationAssetFormat>(
|
||||
applicationId: Snowflake,
|
||||
applicationAssetId: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1034,11 +1116,11 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
achievementIcon<Format extends AchievementIconFormat>(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
@@ -1049,7 +1131,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1059,8 +1141,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
storePageAsset(applicationId: Snowflake, assetId: string) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
|
||||
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
|
||||
applicationId: Snowflake,
|
||||
assetId: string,
|
||||
format: Format = ImageFormat.PNG as Format,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1069,7 +1155,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1079,7 +1165,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie, GIF
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1089,7 +1175,7 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
@@ -1099,10 +1185,10 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
@@ -1113,7 +1199,12 @@ export const CDNRoutes = {
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
guildMemberBanner<Format extends GuildMemberBannerFormat>(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
guildMemberBanner: string,
|
||||
format: Format,
|
||||
) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
@@ -1135,19 +1226,12 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
|
||||
85
rest/v10/monetization.ts
Normal file
85
rest/v10/monetization.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIEntitlement, APISKU } from '../../v10';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export interface RESTGetAPIEntitlementsQuery {
|
||||
/**
|
||||
* User ID to look up entitlements for
|
||||
*/
|
||||
user_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Optional list of SKU IDs to check entitlements for
|
||||
* Comma-delimited set of snowflakes
|
||||
*/
|
||||
sku_ids?: string | undefined;
|
||||
/**
|
||||
* Retrieve entitlements before this entitlement ID
|
||||
*/
|
||||
before?: Snowflake | undefined;
|
||||
/**
|
||||
* Retrieve entitlements after this entitlement ID
|
||||
*/
|
||||
after?: Snowflake | undefined;
|
||||
/**
|
||||
* Number of entitlements to return (1-100)
|
||||
*
|
||||
* @default 100
|
||||
*/
|
||||
limit?: number | undefined;
|
||||
/**
|
||||
* Guild ID to look up entitlements for
|
||||
*/
|
||||
guild_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Whether ended entitlements should be omitted
|
||||
*/
|
||||
exclude_ended?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
||||
*/
|
||||
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export interface RESTPostAPIEntitlementBody {
|
||||
/**
|
||||
* ID of the SKU to grant the entitlement to
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild or user to grant the entitlement to
|
||||
*/
|
||||
owner_id: Snowflake;
|
||||
/**
|
||||
* The type of entitlement owner
|
||||
*/
|
||||
owner_type: EntitlementOwnerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
|
||||
*/
|
||||
export enum EntitlementOwnerType {
|
||||
Guild = 1,
|
||||
User,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
|
||||
*/
|
||||
export type RESTDeleteAPIEntitlementResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#list-skus
|
||||
*/
|
||||
export type RESTGetAPISKUsResult = APISKU[];
|
||||
@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
|
||||
* Notify @everyone that a stage instance has started
|
||||
*/
|
||||
send_start_notification?: boolean | undefined;
|
||||
/**
|
||||
* The guild scheduled event associated with this stage instance
|
||||
*/
|
||||
guild_scheduled_event_id?: Snowflake | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v10/index';
|
||||
export type RESTGetAPIStickerResult = APISticker;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*/
|
||||
export interface RESTGetNitroStickerPacksResult {
|
||||
export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
* @deprecated Use `RESTGetStickerPacksResult` instead
|
||||
*/
|
||||
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
|
||||
*/
|
||||
|
||||
@@ -5,11 +5,11 @@ import type {
|
||||
APIEmbed,
|
||||
APIMessage,
|
||||
APIWebhook,
|
||||
APIAttachment,
|
||||
MessageFlags,
|
||||
APIMessageActionRowComponent,
|
||||
} from '../../payloads/v10/index';
|
||||
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
|
||||
import type { RESTAPIAttachment } from './channel';
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#create-webhook
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
/**
|
||||
* Attachment objects with filename and description
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
/**
|
||||
* Message flags combined as a bitfield
|
||||
*/
|
||||
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
|
||||
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
|
||||
*/
|
||||
thread_name?: string | undefined;
|
||||
/**
|
||||
* Array of tag ids to apply to the thread
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*/
|
||||
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
|
||||
attachments?: RESTAPIAttachment[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user