Compare commits

...

221 Commits

Author SHA1 Message Date
github-actions[bot]
3442d5657a chore(release): 0.37.78 🎉 (#938)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-01 15:20:36 +03:00
renovate[bot]
43803d6c52 chore(deps): lock file maintenance (#937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 05:53:54 +03:00
renovate[bot]
0c3383558d chore(deps): update dependency @types/node to v20.12.2 (#935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 05:52:28 +03:00
renovate[bot]
e030fe2ab7 chore(deps): update dependency tsd to ^0.31.0 (#936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 05:49:56 +03:00
renovate[bot]
634df000c6 chore(deps): lock file maintenance (#926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-31 21:28:05 +03:00
Jaw0r3k
495148dc46 feat: bot banners (#906) 2024-03-31 21:24:03 +03:00
codershiba
61ce329f61 feat(Guild): add RESTPostAPIGuildBulkBan result and json body (#910) 2024-03-31 21:18:51 +03:00
codershiba
7dcad582ce feat(Routes): Add guildBulkBan() route (#909) 2024-03-31 21:16:59 +03:00
codershiba
4db44b553d feat(RESTJSONErrorCodes): Add 500_000 (#908) 2024-03-31 21:15:48 +03:00
github-actions[bot]
ccb7ef479c chore(release): 0.37.77 🎉 (#934)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-28 14:20:13 +02:00
renovate[bot]
37b08a293f chore(deps): update dependency eslint-config-neon to v0.1.60 (#932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-27 10:48:18 +02:00
Vlad Frangu
db89f0ef66 chore: vlad merged too fast, forgot to lint 2024-03-27 10:46:57 +02:00
Dmytro
47c9ad0e70 feat(APIAuditLogChange): add APIAuditLogChangeKeySystemChannelFlags (#933) 2024-03-27 10:34:11 +02:00
dependabot[bot]
eaaa8254b9 chore(deps): bump express from 4.18.1 to 4.19.2 in /website (#931)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 23:46:31 +02:00
renovate[bot]
1d5646e5a0 chore(deps): update dependency @typescript-eslint/utils to v7.4.0 (#930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 23:41:00 +02:00
Almeida
b7ae342faa ci: ignore commits by dependabot (#929) 2024-03-25 14:39:11 +02:00
dependabot[bot]
698282f4b0 chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /website (#927)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 11:30:47 +02:00
renovate[bot]
19327a5d66 chore(deps): lock file maintenance (#924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 14:21:07 +02:00
github-actions[bot]
66958cb67e chore(release): 0.37.76 🎉 (#923)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-21 14:18:44 +02:00
renovate[bot]
bd7e1e7b4f chore(deps): lock file maintenance (#922)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 12:51:39 +02:00
renovate[bot]
6ce581c0db chore(deps): lock file maintenance (#918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-21 12:30:05 +02:00
renovate[bot]
7f22d4da37 chore(deps): update dependency typescript to v5.4.3 (#920)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-20 21:53:55 +02:00
renovate[bot]
d6d2fb69c9 chore(deps): update dependency @types/node to v20.11.30 (#919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 15:05:35 +02:00
renovate[bot]
dfc109f3f1 chore(deps): update patch/minor dependencies (#917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 10:59:04 +02:00
Almeida
1377730766 ci: ignore new releases triggered only by renovate (#916) 2024-03-18 22:52:38 +02:00
renovate[bot]
22e6bafd39 chore(deps): lock file maintenance (#915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 22:12:47 +02:00
renovate[bot]
5e175e1595 chore(deps): update dependency @typescript-eslint/utils to v7.3.0 (#914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 22:09:02 +02:00
Vlad Frangu
fcf14c3ea2 chore: make renovate be less spamy 2024-03-18 22:06:09 +02:00
renovate[bot]
8640cdd360 chore(deps): update dependency @types/node to v20.11.29 (#912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 22:03:03 +02:00
github-actions[bot]
1f83534ccb chore(release): 0.37.75 🎉 (#911)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-18 14:28:55 +02:00
dependabot[bot]
affc669a73 chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 in /website (#905)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-15 12:55:36 +02:00
renovate[bot]
15fe19b39d chore(deps): update dependency @commitlint/cli to v19.2.0 (#903)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 12:55:20 +02:00
renovate[bot]
c83a604076 chore(deps): update dependency @types/node to v20.11.28 (#904)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-15 12:52:31 +02:00
github-actions[bot]
6887b8fc46 chore(release): 0.37.74 🎉 (#902)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-14 14:20:15 +02:00
renovate[bot]
f509930e00 chore(deps): update dependency @types/node to v20.11.27 (#901)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-13 17:01:31 +02:00
renovate[bot]
597b7f7fb0 chore(deps): update commitlint monorepo to v19.1.0 (#900)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 10:52:13 +02:00
renovate[bot]
badf590103 chore(deps): update dependency @types/node to v20.11.26 (#898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 01:01:04 +02:00
renovate[bot]
d7d089e3cd chore(deps): update dependency @octokit/webhooks-types to v7.4.0 (#899)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-12 00:55:37 +02:00
renovate[bot]
36e8d3caed chore(deps): update dependency @typescript-eslint/utils to v7.2.0 (#897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 21:26:47 +02:00
github-actions[bot]
9fc46f8ecb chore(release): 0.37.73 🎉 (#895)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-07 14:26:22 +02:00
Vlad Frangu
930162c7a6 chore: fix release flow 2024-03-07 14:24:26 +02:00
github-actions[bot]
1cf1a57365 chore(release): 0.37.72 🎉 (#894)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-07 14:18:44 +02:00
Vlad Frangu
a39a5d9d41 chore: remove useless all matcher for labeler 2024-03-06 21:48:17 +02:00
renovate[bot]
a0e00ffaf7 chore(deps): update actions/labeler action to v5 (#893)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-03-06 21:45:57 +02:00
renovate[bot]
45e2d17c65 chore(deps): update dependency typescript to v5.4.2 (#892)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-06 21:22:01 +02:00
renovate[bot]
8691b992e0 chore(deps): update dependency @types/node to v20.11.25 (#891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-06 21:21:37 +02:00
renovate[bot]
36d1b4ba50 chore(deps): update actions/setup-node action to v4 (#889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 10:00:31 +02:00
renovate[bot]
de02125eec chore(deps): update dependency npm-run-all2 to v6 (#890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 10:00:19 +02:00
Vlad Frangu
8acc356d27 chore: use github provided concurrency to prevent multiple publish nexts 2024-03-05 00:12:53 +02:00
renovate[bot]
803e5b31b9 chore(deps): update styfle/cancel-workflow-action action to v0.12.1 (#886)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 00:01:43 +02:00
renovate[bot]
c7e0e32aa5 chore(deps): replace dependency npm-run-all with npm-run-all2 ^5.0.0 (#885)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-05 00:01:21 +02:00
renovate[bot]
5aec2d293e chore: Configure Renovate (#884)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-03-04 23:59:04 +02:00
Vlad Frangu
5e09570716 chore: woopsie daisy 2024-03-04 23:13:50 +02:00
Vlad Frangu
d98c991c35 chore: my bad boo 2024-03-04 21:45:48 +02:00
Vlad Frangu
2814d7e2f5 chore: wowzah 2024-03-04 21:41:06 +02:00
Vlad Frangu
23f87a8ff2 chore: fix rimraf and build script 2024-03-04 21:29:45 +02:00
Vlad Frangu
1d39612329 chore: give this repo some LOVE 2024-03-04 21:17:19 +02:00
René
ef31e116b6 chore: remove deprecated importsNotUsedAsValues from tsconfig (#831) 2024-03-04 21:12:01 +02:00
Superchupu
abbd4b2e21 ci: enable npm provenance (#882) 2024-03-04 21:04:22 +02:00
Isidro Casiano
5e295706b8 docs(APISelectMenuOption): correct character limit (#881) 2024-03-04 20:59:49 +02:00
github-actions[bot]
803dcd7bdd chore(release): 0.37.71 🎉 (#880)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-26 14:19:12 +02:00
dependabot[bot]
62de95fd6f chore(deps): bump follow-redirects from 1.15.1 to 1.15.4 in /website (#865)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 02:17:45 +02:00
dependabot[bot]
4f46175c3c chore(deps-dev): bump ip from 1.1.5 to 1.1.9 (#876)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 02:17:36 +02:00
MateoDeveloper
150dc46b87 feat: add initial support for super reactions (#744)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-02-23 02:16:59 +02:00
github-actions[bot]
c008413a8a chore(release): 0.37.70 🎉 (#875)
Build ran for 9564941b3a

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-15 14:18:10 +02:00
n1ck_pro
9564941b3a feat(RESTPostAPIChannelMessageJSONBody): add enforce_nonce (#874) 2024-02-12 23:13:34 +02:00
github-actions[bot]
f329a80a6b chore(release): 0.37.69 🎉 (#873)
Build ran for 0cfe05dad8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-08 14:19:06 +02:00
MateoDeveloper
0cfe05dad8 feat(Locale): add SpanishLATAM (#859) 2024-02-07 21:38:22 +02:00
github-actions[bot]
4473293b0e chore(release): 0.37.68 🎉 (#872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-05 14:22:11 +02:00
TÆMBØ
a28b2d749e types(CDNRoutes): use generics for format options (#868) 2024-02-05 14:19:50 +02:00
Danial Raza
55efcca4f8 fix(CDNRoutes): make format optional and default to png (#869) 2024-02-01 02:59:16 +02:00
Danial Raza
6f541d58d2 fix(CDNRoutes): fix store page wrong extension (#867) 2024-02-01 00:19:20 +02:00
github-actions[bot]
71caf7cfc6 chore(release): 0.37.67 🎉 (#863)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-28 14:19:11 +02:00
Walter Min
819d85207a fix(GatewayThreadDispatch): properly type thread create/update/delete dispatches (#861)
* fix: properly type thread create/update/delete dispatches

* fix(GatewayThreadDispatch): deno types

* fix(GatewayThreadDispatch): deprecate GatewayThreadModifyDispatch
2023-12-27 14:22:42 +02:00
github-actions[bot]
7f797b2b4b chore(release): 0.37.66 🎉 (#857)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-07 14:24:45 +02:00
Danial Raza
470fe189ae chore: use string values in vs code settings (#856) 2023-12-05 19:29:13 +02:00
Danial Raza
b4226bb708 feat(RESTPostAPIWebhookWithTokenJSONBody): add applied_tags (#855) 2023-12-05 19:28:52 +02:00
github-actions[bot]
72a78a4f6f chore(release): 0.37.65 🎉 (#852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-23 14:21:14 +02:00
Jiralite
957488134e fix(TextChannelType): Remove forum and media channels (#849)
* fix: remove forum and media channels from text channel types

* refactor: extend `APIGuildChannel` instead
2023-11-21 17:42:53 +00:00
github-actions[bot]
5327f3f38c chore(release): 0.37.64 🎉 (#850)
Build ran for ca05ee5eb2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-20 14:20:47 +02:00
Almeida
ca05ee5eb2 feat(PermissionFlagsBits): split up expressions and events perms (#790) 2023-11-16 23:16:57 +00:00
github-actions[bot]
1d8399d925 chore(release): 0.37.63 🎉 (#846)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-09 14:29:41 +02:00
Almeida
a8efb1949a fix(RESTPutAPIGuildOnboardingJSONBody): optional keys and flattened emoji (#839)
* fix(RESTPutAPIGuildOnboardingJSONBody): optional keys and flattened emoji

* fix: requested changes
2023-11-07 21:37:36 +02:00
github-actions[bot]
c0f68e9509 chore(release): 0.37.62 🎉 (#845)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-30 14:20:23 +02:00
Almeida
28ed3701e6 feat(RESTJSONErrorCodes): add 40074 and 50057 (#844) 2023-10-28 12:24:36 +03:00
github-actions[bot]
4640f80274 chore(release): 0.37.61 🎉 (#842)
Build ran for ba08061917

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-23 15:20:36 +03:00
Jaw0r3k
ba08061917 feat: premium app subscriptions (#833)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2023-10-22 22:02:01 +03:00
dependabot[bot]
f51c2d95ae chore(deps-dev): bump postcss from 8.4.23 to 8.4.31 (#837)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:45:31 +03:00
dependabot[bot]
984eacdef6 chore(deps): bump postcss from 8.4.14 to 8.4.31 in /website (#838)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:45:15 +03:00
dependabot[bot]
0a914acd11 chore(deps): bump @babel/traverse from 7.18.2 to 7.23.2 in /website (#840)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:22:02 +03:00
dependabot[bot]
3f1d9b47aa chore(deps-dev): bump @babel/traverse from 7.21.5 to 7.23.2 (#841)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:21:17 +03:00
github-actions[bot]
8541201a96 chore(release): 0.37.60 🎉 (#836)
Build ran for 17f42e0b38

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-05 15:21:55 +03:00
Jiralite
17f42e0b38 feat: Application patch and new properties (#810)
* feat: application patch and properties

* docs(APIApplication): update tag documentation

* fix(RESTPatchCurrentApplicationJSONBody): add `flags`

* docs(APIApplication): update `approximate_guild_count`
2023-10-03 20:34:06 +02:00
github-actions[bot]
5515e2914a chore(release): 0.37.59 🎉 (#835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 15:20:05 +03:00
Suneet Tipirneni
ecef5b492b feat(RESTPostAPIStageInstanceJSONBody): add guild_scheduled_event_id (#656) 2023-09-28 22:01:27 +03:00
github-actions[bot]
c71258ceb4 chore(release): 0.37.58 🎉 (#832)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-25 16:04:11 +03:00
Suneet Tipirneni
a4cdbbfdf8 fix(RESTPatchAPIChannelJSONBody): add missing applied_tags field (#828) 2023-09-25 13:23:01 +02:00
Almeida
06fb47c51d chore: change docusaurus branch name (#830) 2023-09-24 01:23:22 +03:00
Jiralite
cc47220e87 docs(RESTPostAPIGuildForumThreadsJSONBody): Fix reference link (#827) 2023-09-24 00:36:57 +03:00
Renegade334
4defa9ea12 refactor(APIInteractionDataResolvedChannel): thread channels (#825)
- bring APIInteractionDataResolvedChannel into line with API specification
  (thread_metadata, parent_id only exist on thread channel partials)
- also adds a ThreadChannelType utility export
2023-09-23 22:23:15 +01:00
Jaw0r3k
1290c942ab feat: default select menu values (#824)
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
2023-09-23 20:14:35 +02:00
github-actions[bot]
4309463634 chore(release): 0.37.57 🎉 (#823)
Build ran for 1b8f62fc98

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-21 15:20:17 +03:00
Danial Raza
1b8f62fc98 docs: fix TypeDoc typos (#821) 2023-09-19 21:32:06 +01:00
Danial Raza
32ba5ce36c feat(ConnectionService): support twitter rebrand update (#819) 2023-09-19 20:25:11 +02:00
github-actions[bot]
1598baf0c3 chore(release): 0.37.56 🎉 (#817)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-31 15:19:18 +03:00
Danial Raza
ceb2f033f7 docs(APITeamMember): update deprecation message (#816) 2023-08-29 01:52:48 +03:00
Danial Raza
36e3d156c6 refactor(TeamMemberRole): remove owner role (#814) 2023-08-26 00:26:26 +03:00
Danial Raza
a26629c0e8 feat: add support for teams update (#813) 2023-08-25 14:59:12 +03:00
Almeida
018d889d9a fix: standard stickers are now free (#789) 2023-08-25 02:54:47 +03:00
Jiralite
1eb01618a3 fix(RESTPostAPIChannelMessageJSONBody): number for attachment ids (#811) 2023-08-25 02:52:43 +03:00
Almeida
31c8549fe3 feat(APIAuditLogOptions): add integration_type (#809) 2023-08-25 02:50:54 +03:00
github-actions[bot]
729d4bf719 chore(release): 0.37.55 🎉 (#812)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-24 15:38:36 +03:00
Jiralite
19beae59e0 chore: use code owners (#808) 2023-08-22 16:58:45 +03:00
github-actions[bot]
d24e928051 chore(release): 0.37.54 🎉 (#807)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-17 15:55:29 +03:00
dependabot[bot]
27bebd978b chore(deps): bump vm2 from 3.9.16 to 3.9.19 (#769)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 15:26:27 +03:00
MARCROCK22
b919e721bc fix(Guild): union with never type (#797)
Co-authored-by: Marcos Susaña <marcosjgs03@gmail.com>
2023-08-14 15:25:23 +03:00
Jiralite
138b9f2bf2 feat: Add Media channels (#777) 2023-08-14 15:24:40 +03:00
github-actions[bot]
382fb0317c chore(release): 0.37.53 🎉 (#806)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-14 15:20:49 +03:00
advaith
e095e09b0b feat(GatewayActivityUpdateData): allow sending state (#801)
* feat(GatewayActivityUpdateData): allow sending state

* docs: edit description of state

* fix: custom activity type description
2023-08-13 11:55:19 +03:00
Jaw0r3k
9212ab8b99 chore(RoleFlags): add link to api docs (#804) 2023-08-12 13:25:52 +00:00
github-actions[bot]
460b72c518 chore(release): 0.37.52 🎉 (#803)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-07 15:19:50 +03:00
Jiralite
52611242fb fix(RESTPatchAPIChannelJSONBody): available_tags requires name only (#802) 2023-08-07 11:31:50 +03:00
github-actions[bot]
d2bb76574b chore(release): 0.37.51 🎉 (#800)
Build ran for 1071d24362

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-31 16:21:44 +04:00
advaith
1071d24362 fix(Presence): cannot receive invisible status (#799) 2023-07-28 13:48:07 +04:00
github-actions[bot]
ae8503f0e7 chore(release): 0.37.50 🎉 (#796)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-20 15:42:31 +03:00
Almeida
773556aa32 feat: onboarding updates, mode field, and error codes (#773) 2023-07-19 17:55:48 +03:00
dependabot[bot]
06ee56475c chore(deps): bump word-wrap from 1.2.3 to 1.2.4 in /website (#794)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 02:38:07 +03:00
dependabot[bot]
a1c26c2372 chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#793)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 02:36:48 +03:00
github-actions[bot]
387f37f1d5 chore(release): 0.37.49 🎉 (#792)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-17 15:29:28 +03:00
Almeida
874f13573b feat(APIApplication): approx guild count and get self application endpoint (#728)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-07-17 15:26:47 +03:00
dependabot[bot]
289c53ab31 chore(deps): bump semver from 5.7.1 to 5.7.2 in /website (#786)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 02:06:58 +03:00
advaith
f556455ba6 feat(APIUser): add avatar decorations (#664) 2023-07-17 02:05:50 +03:00
Almeida
7f9a7e5b94 feat(APIAttachment): add flags (#783) 2023-07-17 02:04:42 +03:00
Jiralite
47f78bcc69 feat(AuditLogEvent): Add creator monetisation events (#787) 2023-07-17 02:03:55 +03:00
advaith
488b5adf04 feat(APIRole): role flags (#782) 2023-07-17 02:03:09 +03:00
Almeida
82d7024dfd feat(GatewayMessageReactionAddDispatch): add message_author_id (#754) 2023-07-14 00:37:27 +03:00
github-actions[bot]
9d6ae11e30 chore(release): 0.37.48 🎉 (#785)
Build ran for 3bb2821e8d

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-10 15:23:47 +03:00
Danial Raza
3bb2821e8d docs(APITextInputComponent): correct label max characters (#784) 2023-07-08 18:33:54 +03:00
github-actions[bot]
201cb13b6d chore(release): 0.37.47 🎉 (#781)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-29 15:22:52 +03:00
advaith
844ad568c4 feat(Guild): add join raid and mention raid protection (#677)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-06-27 14:28:51 +03:00
Jiralite
374f690860 docs(RESTPostAPIChannelMessagesThreadsJSONBody): Remove 3/7-day requirement text (#778) 2023-06-22 18:04:38 +03:00
github-actions[bot]
e5d8050f39 chore(release): 0.37.46 🎉 (#776)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-19 15:22:15 +03:00
MateoDeveloper
300e31b514 feat(RESTJSONErrorCodes): add error 50131 (#753)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-06-15 19:33:19 +03:00
github-actions[bot]
40b9d60549 chore(release): 0.37.45 🎉 (#775)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-15 15:43:43 +03:00
n1ck_pro
5af7147863 feat: support new username system (#765) 2023-06-15 15:24:48 +03:00
github-actions[bot]
e01cf7cfb4 chore(release): 0.37.44 🎉 (#774)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-15 15:23:52 +03:00
Almeida
eced39cc3f feat: guild onboarding (#713) 2023-06-14 15:12:08 +03:00
github-actions[bot]
f3fe162848 chore(release): 0.37.43 🎉 (#771)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-29 15:19:28 +03:00
Almeida
da09a267d1 chore(PermissionFlagsBits): mark UseExternalSounds as stable (#770) 2023-05-26 00:53:47 +03:00
Almeida
30fb4978b7 feat(RESTJSONErrorCodes): add error 50178 (#752) 2023-05-26 00:53:29 +03:00
github-actions[bot]
1db56d30a8 chore(release): 0.37.42 🎉 (#766)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-08 16:27:20 +03:00
Almeida
0e6b19d2bc fix: allow sending empty choices with autocomplete: true (#762) 2023-05-04 18:50:48 +03:00
Jiralite
21d1be9e18 chore: migrate to eslint-config-neon (#756) 2023-05-04 18:50:10 +03:00
github-actions[bot]
db49793666 chore(release): 0.37.41 🎉 (#764)
Build ran for 9dce6ed392

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-01 15:22:02 +03:00
Mateusz Burzyński
9dce6ed392 fix(types): move types condition to the front (#763) 2023-05-01 02:45:11 +03:00
dependabot[bot]
be770c91be chore(deps): bump vm2 from 3.9.16 to 3.9.17 (#755)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-30 14:06:18 +03:00
dependabot[bot]
cd8b63f9ba chore(deps): bump yaml, @commitlint/load and lint-staged (#759)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-30 13:53:09 +03:00
Jiralite
5079b164db fix(GatewayGuildMembersChunkDispatchData): Omit guild_id for presences (#761) 2023-04-30 13:52:20 +03:00
github-actions[bot]
50ace3b7e0 chore(release): 0.37.40 🎉 (#758)
Build ran for 7c69137a47

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-24 18:30:35 +03:00
Almeida
7c69137a47 docs(PermissionFlagsBits): add descriptions (#757) 2023-04-24 10:59:13 +03:00
MateoDeveloper
3dac5b93e7 feat: add support for voice messages (#749)
Co-authored-by: advaith <advaithj1@gmail.com>
2023-04-21 11:33:12 +03:00
github-actions[bot]
0f7602605c chore(release): 0.37.39 🎉 (#751)
Build ran for ca6a95d69c

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-17 15:46:05 +03:00
Aura Román
ca6a95d69c fix(RESTPostAPIChannelMessagesThreadsJSONBody): mark auto_archive_duration as optional 2023-04-16 12:26:49 +03:00
Vitor
9a66d21f49 feat(APIGuild): add max_stage_video_channel_users (#550) 2023-04-13 20:25:22 +03:00
dependabot[bot]
bb0ccf1e28 chore(deps): bump dns-packet from 5.3.1 to 5.4.0 in /website (#729)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v5.3.1...5.4.0)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 19:03:10 +03:00
Almeida
cfedc17338 refactor(PermissionFlagsBits): update permissions (#737)
Co-authored-by: advaith <advaithj1@gmail.com>
2023-04-13 18:50:08 +03:00
dependabot[bot]
e647e795c9 chore(deps): bump vm2 from 3.9.11 to 3.9.16 (#747)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.16.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.11...3.9.16)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 18:49:40 +03:00
github-actions[bot]
f52efabbb1 chore(release): 0.37.38 🎉 (#746)
Build ran for 9074621085

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-10 15:19:17 +03:00
MateoDeveloper
9074621085 feat(RESTJSONErrorCodes): add error 50163 (#725) 2023-04-06 21:52:42 +03:00
Almeida
8e2a5d2451 docs(ApplicationFlags): ApplicationAutoModerationRuleCreateBadge is no longer unstable (#738) 2023-04-06 21:52:10 +03:00
Almeida
311b7a2eb9 feat(APIBaseInteraction): add channel (#741) 2023-04-06 21:51:44 +03:00
Aura Román
4aa9646d05 chore(docsearch): increase contrast for hits in dark mode (#742) 2023-04-05 18:23:04 +00:00
github-actions[bot]
d8435774d6 chore(release): 0.37.37 🎉 (#736)
Build ran for 8f9370d259

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-23 14:21:44 +02:00
Almeida
8f9370d259 feat(RESTPostAPIGuildChannelJSONBody): add default_thread_rate_limit_per_user (#730) 2023-03-22 20:49:53 +02:00
Almeida
0cd9b0debb feat(RESTGetAPICurrentUserGuildsQuery): add with_counts (#641) 2023-03-22 20:36:51 +02:00
advaith
4723d29c9e feat: add various new flags (#733) 2023-03-22 20:28:57 +02:00
Suneet Tipirneni
2a78a517d2 fix: add missing RESTGetAPIWebhookWithTokenQuery (#735) 2023-03-22 20:27:46 +02:00
github-actions[bot]
08cbcd74a8 chore(release): 0.37.36 🎉 (#731)Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Build ran for 9e68e0c9e0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-13 22:25:32 +02:00
Vlad Frangu
9e68e0c9e0 chore: fix workflow 2023-03-13 22:22:24 +02:00
DD
590e0e4883 refactor: remove over-use of AddUndefinedToPossiblyUndefinedPropertiesOfInterface (#726) 2023-02-25 16:35:52 +02:00
MateoDeveloper
0d47c69ca8 feat(AutoModeration): add custom_message field support (#727) 2023-02-25 16:17:33 +02:00
github-actions[bot]
dc09aceb2f chore(release): 0.37.35 🎉 (#724)
Build ran for a968c5f78a

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-17 17:54:56 +02:00
Almeida
a968c5f78a docs(AutoModerationRuleTriggerType): increase keyword limits (#709) 2023-02-17 17:51:31 +02:00
dependabot[bot]
b37b34277b chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /website (#711)
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 17:51:08 +02:00
Jiralite
85051eaab7 fix: StageRaiseHand should be unstable (#722) 2023-02-17 17:48:21 +02:00
MateoDeveloper
040b6826c3 refactor(APIVoiceChannelBase): support text and video in stages (#721) 2023-02-17 16:01:31 +02:00
github-actions[bot]
c09c5f5093 chore(release): 0.37.34 🎉 (#723)Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Build ran for b1446279a8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-16 14:24:31 +02:00
Jiralite
b1446279a8 refactor(MessageType): remove @unstable stage message types (#718) 2023-02-15 22:53:21 +02:00
MateoDeveloper
20153f6fe2 feat(RESTJSONErrorCodes): add error 30060 (#720) 2023-02-15 21:51:25 +02:00
Almeida
d661ff5ee7 docs(RESTPostAPIGuildStickerFormDataBody): clarify constraints (#696) 2023-02-15 21:42:40 +02:00
Almeida
4cf6fd2cec feat(CDNRoutes): add storePageAsset() (#695) 2023-02-15 21:42:01 +02:00
MateoDeveloper
c65e214fdd feat(ConnectionService): add instagram (#701) 2023-02-15 21:40:38 +02:00
panley01
8477deb6a8 feat: add managed field to ChannelType.GroupDM (#698) 2023-02-15 21:40:25 +02:00
MateoDeveloper
41b31ebfd6 feat(RESTJSONErrorCodes): add error 30011 (#697) 2023-02-15 21:39:57 +02:00
Almeida
d609efc746 feat(RESTJSONErrorCodes): add error 30061 (#717) 2023-02-15 21:37:46 +02:00
Jiralite
8d37bc5e30 fix(GuildSystemChannelFlags): "suppress" typo (#719) 2023-02-15 15:16:00 +02:00
github-actions[bot]
052ceb2d02 chore(release): 0.37.33 🎉 (#716)
Build ran for 602c16eee1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-12 01:07:04 +02:00
IRONM00N
602c16eee1 fix(GatewayDispatchPayload): add missing GuildAuditLogEntry (#715)
closes https://github.com/discordjs/discord-api-types/issues/714
2023-02-12 01:02:44 +02:00
github-actions[bot]
1247cfc624 chore(release): 0.37.32 🎉 (#712)Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Build ran for b14aea65f8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-09 15:12:15 +02:00
Almeida
b14aea65f8 feat(MessageType): add SuppressNotifications (#710) 2023-02-09 00:01:17 +02:00
dependabot[bot]
fddb6f1362 chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /website (#706)Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 14:50:36 +02:00
dependabot[bot]
4edd16cc7e chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#705)Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 14:50:31 +02:00
github-actions[bot]
cc3aec7aa1 chore(release): 0.37.31 🎉 (#704)
Build ran for 0e44dd9681

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-30 15:35:43 +02:00
dependabot[bot]
0e44dd9681 chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /website (#703)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-26 23:00:55 +02:00
github-actions[bot]
ff20a503bc chore(release): 0.37.30 🎉 (#702)
Build ran for 31ca234dec

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-26 14:22:19 +02:00
Almeida
31ca234dec feat(GatewayDispatchEvents): add GuildAuditLogEntryCreate (#692) 2023-01-24 00:33:22 +02:00
MateoDeveloper
e902671411 feat(APIGuildMember): add support for guild member flags (#700) 2023-01-24 00:31:41 +02:00
github-actions[bot]
2df39d296f chore(release): 0.37.29 🎉 (#699)
Build ran for 4edcd6a8dd

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-23 14:21:00 +02:00
Almeida
4edcd6a8dd docs(APIApplicationRoleConnectionMetadata): specify lower bound of fields (#694)
* docs(APIApplicationRoleConnectionMetadata): specify lower bound of fields

* docs: requested changes
2023-01-22 21:55:51 +02:00
github-actions[bot]
14a54994b7 chore(release): 0.37.28 🎉 (#691)
Build ran for 7798f2642b

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-12 15:15:21 +02:00
Jiralite
7798f2642b chore: add blocked label (#690) 2023-01-11 01:44:09 +02:00
Jiralite
792c60b332 feat: Add role subscription data and system channel flags (#686) 2023-01-11 01:03:19 +02:00
Almeida
3dbe985b6e feat(APIRoleTags): add guild_connections (#675) 2023-01-10 21:16:13 +00:00
advaith
af06df6cae feat(ConnectionService): add TikTok (#632) 2023-01-10 23:11:05 +02:00
Almeida
8869e92336 feat(RESTJSONErrorCodes): add error 50091 (#671) 2023-01-10 23:09:52 +02:00
Almeida
b10e9bbe5a fix(GuildIntegration): enabled and user are present on bots (#660) 2023-01-10 23:09:35 +02:00
Almeida
a6bcb3f0fe feat(StickerFormatType): add GIF (#688) 2023-01-10 23:09:08 +02:00
MateoDeveloper
e2fb5ee488 feat(APIThreadMember): add support for thread member pagination (#689) 2023-01-10 23:08:36 +02:00
Almeida
0b4058bdd4 feat: role subscriptions (#665) 2023-01-10 23:07:28 +02:00
github-actions[bot]
195156480c chore(release): 0.37.27 🎉 (#687)
Build ran for 7d55b33bac

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-09 14:29:12 +02:00
Almeida
7d55b33bac feat(MessageType): add missing types (#681) 2023-01-07 18:54:39 +02:00
447 changed files with 27159 additions and 15405 deletions

View File

@@ -0,0 +1,135 @@
import { AST_NODE_TYPES, ESLintUtils, TSESTree } from '@typescript-eslint/utils';
import * as typescript from 'typescript';
import * as tsutils from 'tsutils';
type Options = [
{
interfaceEndings: string[];
},
];
function shouldRun(eslNode: TSESTree.TSPropertySignature, interfaceEndings: string[]): boolean {
// The first parent is the TSInterfaceBody, the second is the TSInterfaceDeclaration
const interfaceNode = eslNode.parent?.parent;
if (!(interfaceNode && 'id' in interfaceNode && interfaceNode.id?.type === AST_NODE_TYPES.Identifier)) {
return false;
}
const { name } = interfaceNode.id;
if (typeof name !== 'string') {
return false;
}
return interfaceEndings.some((ending) => name.endsWith(ending));
}
const schema = [
{
type: 'object',
properties: {
interfaceEndings: {
type: 'array',
items: {
type: 'string',
},
},
},
},
] as const;
export = {
rules: {
'explicitly-optional-undefined-properties': ESLintUtils.RuleCreator.withoutDocs<Options, 'missingOptional'>({
create: (context) => {
const { interfaceEndings } = context.options[0];
return {
TSPropertySignature: (eslNode) => {
if (!shouldRun(eslNode, interfaceEndings)) {
return;
}
if (eslNode.optional) {
return;
}
const parserServices = ESLintUtils.getParserServices(context);
const checker = parserServices.program.getTypeChecker();
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(eslNode);
const type = checker.getApparentType(checker.getTypeAtLocation(tsNode));
const unionParts = tsutils.unionTypeParts(type);
// If our prop is not optional, but has undefined in its union, we should report
if (!unionParts.some((ty) => tsutils.isTypeFlagSet(ty, typescript.TypeFlags.Undefined))) {
return;
}
context.report({
node: eslNode,
messageId: 'missingOptional',
fix: (fixer) => fixer.insertTextAfter(eslNode.key, '?'),
});
},
};
},
meta: {
fixable: 'code',
messages: {
missingOptional: 'When a property has `| undefined`, it should be marked as optional.',
},
type: 'problem',
schema: schema,
},
defaultOptions: [{ interfaceEndings: [] }],
}),
'explicit-undefined-on-optional-properties': ESLintUtils.RuleCreator.withoutDocs<Options, 'missingUndefined'>({
create: (context) => {
const { interfaceEndings } = context.options[0];
return {
// This is done naively because type-checking the node will always include `| undefined`
// due to it being optional. ideally, we'd have a way to get the type of the node disregarding
// the optional flag, which would make this check a lot more trivial
TSPropertySignature: (eslNode) => {
if (!shouldRun(eslNode, interfaceEndings)) {
return;
}
// If our prop is't optional or if it doesn't have a type annotation, we don't need to do anything
if (!eslNode.optional || !eslNode.typeAnnotation) {
return;
}
const { typeAnnotation } = eslNode.typeAnnotation;
switch (typeAnnotation.type) {
case AST_NODE_TYPES.TSUnionType: {
if (typeAnnotation.types.some((t) => t.type === AST_NODE_TYPES.TSUndefinedKeyword)) {
return;
}
break;
}
case AST_NODE_TYPES.TSUndefinedKeyword: {
return;
}
}
context.report({
node: eslNode,
messageId: 'missingUndefined',
fix: (fixer) => fixer.insertTextAfter(eslNode.typeAnnotation!, ' | undefined'),
});
},
};
},
meta: {
fixable: 'code',
messages: {
missingUndefined: 'When a property is optional, explicitly include `undefined` in the union.',
},
type: 'suggestion',
schema: schema,
},
defaultOptions: [{ interfaceEndings: [] }],
}),
},
};

View File

@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": ["./index.ts"]
}

View File

@@ -1,8 +1,21 @@
{
"extends": "marine/prettier/node",
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json",
"extraFileExtensions": [".mjs"]
"project": "./tsconfig.eslint.json"
},
"plugins": ["local"],
"rules": {
"local/explicit-undefined-on-optional-properties": ["error", { "interfaceEndings": ["JSONBody"] }],
"local/explicitly-optional-undefined-properties": ["error", { "interfaceEndings": ["JSONBody"] }],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/prefer-literal-enum-member": "off",
"@typescript-eslint/sort-type-union-intersection-members": "off",
"import/extensions": "off",
"tsdoc/syntax": "off",
"typescript-sort-keys/interface": "off",
"typescript-sort-keys/string-enum": "off",
"unicorn/prefer-math-trunc": "off",
"jsdoc/no-undefined-types": "off"
}
}

10
.github/CODEOWNERS vendored Normal file
View 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

View File

@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities

View File

@@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
### Body

View File

@@ -2,39 +2,39 @@
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue, or on [GitHub Discussions](https://github.com/discordjs/discord-api-types/discussions) you will get redirected there anyway.**
- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
- [Contributing Tests](#contributing-tests)
- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
- [Contributing Tests](#contributing-tests)
## Pull Request Guidelines
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- If adding a new feature:
- If adding a new feature:
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- If fixing a bug:
- If fixing a bug:
- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.
- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.
```
fix(Guild): handle events correctly
```
fix(Guild): handle events correctly
close #28
```
close #28
```
- Provide a detailed description of the bug in the PR. Live demo preferred.
- Provide a detailed description of the bug in the PR. Live demo preferred.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Make sure tests pass!
- Make sure tests pass!
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
## Development Setup
@@ -48,6 +48,6 @@ $ npm i # install the dependencies of the project
A high level overview of tools used:
- [TypeScript](https://www.typescriptlang.org/) as the development language
- [ESLint](https://eslint.org/) for code-style
- [Prettier](https://prettier.io/) for code formatting
- [TypeScript](https://www.typescriptlang.org/) as the development language
- [ESLint](https://eslint.org/) for code-style
- [Prettier](https://prettier.io/) for code formatting

View File

@@ -1,8 +0,0 @@
addReviewers: true
reviewers:
- iCrawl
- SpaceEEC
- kyranet
- vladfrangu
numberOfReviewers: 0
runOnDraft: true

87
.github/labeler.yml vendored
View File

@@ -1,58 +1,83 @@
chore:
- any: ['*']
all:
[
'!deno/**/*',
'!gateway/**/*',
'!payloads/**/*',
'!rest/**/*',
'!rpc/**/*',
'!tests/**/*',
'!utils/**/*',
'!voice/**/*',
]
- changed-files:
- all-globs-to-any-file:
- '*'
- '!deno/**/*'
- '!gateway/**/*'
- '!payloads/**/*'
- '!rest/**/*'
- '!rpc/**/*'
- '!tests/**/*'
- '!utils/**/*'
- '!voice/**/*'
ci:
- .github/**/*
- .husky/**/*
- scripts/actions/**/*
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- .husky/**/*
- scripts/actions/**/*
dependencies:
- package.json
- package-lock.json
- website/package.json
- website/package-lock.json
- changed-files:
- any-glob-to-any-file:
- package.json
- package-lock.json
- website/package.json
- website/package-lock.json
'topic:deno':
- scripts/deno.mjs
- scripts/actions/report-deno-not-ran.mjs
- changed-files:
- any-glob-to-any-file:
- scripts/deno.mjs
- scripts/actions/report-deno-not-ran.mjs
'topic:gateway':
- gateway/**/*
- changed-files:
- any-glob-to-any-file:
- gateway/**/*
'topic:payloads':
- payloads/**/*
- changed-files:
- any-glob-to-any-file:
- payloads/**/*
'topic:rest':
- rest/**/*
- changed-files:
- any-glob-to-any-file:
- rest/**/*
'topic:rpc':
- rpc/**/*
- changed-files:
- any-glob-to-any-file:
- rpc/**/*
'topic:scripts':
- scripts/**/*
- changed-files:
- any-glob-to-any-file:
- scripts/**/*
'topic:tests':
- tests/**/*
- changed-files:
- any-glob-to-any-file:
- tests/**/*
'topic:utils':
- utils/**/*
- changed-files:
- any-glob-to-any-file:
- utils/**/*
'topic:voice':
- voice/**/*
- changed-files:
- any-glob-to-any-file:
- voice/**/*
'topic:globals':
- globals.ts
- changed-files:
- any-glob-to-any-file:
- globals.ts
'topic:website':
- website/**/*
- changed-files:
- any-glob-to-any-file:
- website/**/*

2
.github/labels.yml vendored
View File

@@ -5,6 +5,8 @@
color: 'e4f486'
- name: 'semver:patch'
color: 'e8be8b'
- name: 'blocked'
color: 'fc1423'
- name: 'question (please use Discord instead)'
color: 'd876e3'
- name: 'regression'

View File

@@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Install Dependencies
run: npm ci

View File

@@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
cache: npm
registry-url: https://registry.npmjs.org/
@@ -42,12 +42,12 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js v16
uses: actions/setup-node@v2
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Install Dependencies
run: npm ci

View File

@@ -17,18 +17,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node v16
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci --ignore-scripts
run: npm ci
- name: Install website dependencies
run: pushd website && npm ci --ignore-scripts && popd
@@ -65,22 +65,26 @@ jobs:
create_release:
name: Create release and publish
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node v16
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci --ignore-scripts
run: npm ci
- name: Publish release to npm
run: npm publish

View File

@@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Label sync
uses: crazy-max/ghaction-github-labeler@v3
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -5,14 +5,13 @@ on:
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v3
uses: actions/labeler@v5
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

View File

@@ -8,28 +8,34 @@ on:
jobs:
publish:
concurrency:
group: publish-next
cancel-in-progress: true
name: Publish @next release to npm
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.repository_owner == 'discordjs' && !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)'))
steps:
- name: Cancel previous publish attempts
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
# - name: Cancel previous publish attempts
# uses: styfle/cancel-workflow-action@0.12.1
# with:
# access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node v16
uses: actions/setup-node@v2
- name: Install Node v20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci --ignore-scripts
run: npm ci
- name: Bump version
run: node ./scripts/bump-version.mjs
@@ -42,6 +48,6 @@ jobs:
- name: Publish new @next version
run: |
npm version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
npm publish --tag next || true
npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

18
.gitignore vendored
View File

@@ -1,15 +1,25 @@
node_modules/
# Custom ESLint rules
.eslint-plugin-local/*
!.eslint-plugin-local/index.ts
!.eslint-plugin-local/tsconfig.json
# Don't commit build outputs
globals.js
globals.*map
globals.d.ts
globals.mjs
./v*.js
./v*.*map
./v*.d.ts
./v*.mjs
v*.js
v*.*map
v*.d.ts
v*.mjs
deno/**/*.js
deno/**/*.map
deno/**/*.d.ts
deno/**/*.mjs
gateway/**/*.js
gateway/**/*.map

1
.husky/.gitignore vendored
View File

@@ -1 +0,0 @@
_

View File

@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit $1

View File

@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install pretty-quick --staged && npx --no-install lint-staged && npm run build:deno && git add deno

View File

@@ -1,4 +1,3 @@
# Node modules
node_modules/
@@ -11,3 +10,17 @@ website/versioned_docs/
website/versions.json
website/.docusaurus/
website/build
# Don't format build outputs
*.js
*.d.ts
*.mjs
# Miscellaneous
CODEOWNERS
renovate.json
CHANGELOG.md
# Format all of scripts
!scripts/**/*
!.prettierrc.mjs

View File

@@ -1,8 +0,0 @@
{
"printWidth": 120,
"useTabs": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"endOfLine": "lf"
}

12
.prettierrc.mjs Normal file
View File

@@ -0,0 +1,12 @@
import sapphirePrettierConfig from '@sapphire/prettier-config';
export default {
...sapphirePrettierConfig,
printWidth: 120,
useTabs: true,
singleQuote: true,
quoteProps: 'as-needed',
trailingComma: 'all',
endOfLine: 'lf',
experimentalTernaries: true,
};

View File

@@ -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"]
}

View File

@@ -1,3 +1,346 @@
## [0.37.78](https://github.com/discordjs/discord-api-types/compare/0.37.77...0.37.78) (2024-04-01)
### Features
* bot banners ([#906](https://github.com/discordjs/discord-api-types/issues/906)) ([495148d](https://github.com/discordjs/discord-api-types/commit/495148dc466fcc3cd47ff62377369a97a9cec13d))
* **Guild:** add `RESTPostAPIGuildBulkBan` result and json body ([#910](https://github.com/discordjs/discord-api-types/issues/910)) ([61ce329](https://github.com/discordjs/discord-api-types/commit/61ce329f614d5bc923c3ab4d2b318aa2e66c767b))
* **RESTJSONErrorCodes:** Add `500_000` ([#908](https://github.com/discordjs/discord-api-types/issues/908)) ([4db44b5](https://github.com/discordjs/discord-api-types/commit/4db44b553d7164415b9f20468716beb5223fcec0))
* **Routes:** Add `guildBulkBan()` route ([#909](https://github.com/discordjs/discord-api-types/issues/909)) ([7dcad58](https://github.com/discordjs/discord-api-types/commit/7dcad582ce2fa16ac7bde35f5b158648c2c7c9bf))
## [0.37.77](https://github.com/discordjs/discord-api-types/compare/0.37.76...0.37.77) (2024-03-28)
### Features
* **APIAuditLogChange:** add `APIAuditLogChangeKeySystemChannelFlags` ([#933](https://github.com/discordjs/discord-api-types/issues/933)) ([47c9ad0](https://github.com/discordjs/discord-api-types/commit/47c9ad0e7043c098d103107e95f8a97e67ad3eb4))
## [0.37.76](https://github.com/discordjs/discord-api-types/compare/0.37.75...0.37.76) (2024-03-21)
## [0.37.75](https://github.com/discordjs/discord-api-types/compare/0.37.74...0.37.75) (2024-03-18)
## [0.37.74](https://github.com/discordjs/discord-api-types/compare/0.37.73...0.37.74) (2024-03-14)
## [0.37.73](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.73) (2024-03-07)
## [0.37.72](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.72) (2024-03-07)
## [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)
### Features
- guild onboarding ([#713](https://github.com/discordjs/discord-api-types/issues/713)) ([eced39c](https://github.com/discordjs/discord-api-types/commit/eced39cc3fa305e336d5752827812cb790ac485d))
## [0.37.43](https://github.com/discordjs/discord-api-types/compare/0.37.42...0.37.43) (2023-05-29)
### Features
- **RESTJSONErrorCodes:** add error `50178` ([#752](https://github.com/discordjs/discord-api-types/issues/752)) ([30fb497](https://github.com/discordjs/discord-api-types/commit/30fb4978b76f30a00453470f643d71e8f1d1f817))
## [0.37.42](https://github.com/discordjs/discord-api-types/compare/0.37.41...0.37.42) (2023-05-08)
### Bug Fixes
- allow sending empty choices with autocomplete: true ([#762](https://github.com/discordjs/discord-api-types/issues/762)) ([0e6b19d](https://github.com/discordjs/discord-api-types/commit/0e6b19d2bcfe6e9806d3d20125668b3464845517))
## [0.37.41](https://github.com/discordjs/discord-api-types/compare/0.37.40...0.37.41) (2023-05-01)
### Bug Fixes
- **GatewayGuildMembersChunkDispatchData:** Omit `guild_id` for presences ([#761](https://github.com/discordjs/discord-api-types/issues/761)) ([5079b16](https://github.com/discordjs/discord-api-types/commit/5079b164db3ac3bda25675a553a586f099555667))
- **types:** move `types` condition to the front ([#763](https://github.com/discordjs/discord-api-types/issues/763)) ([9dce6ed](https://github.com/discordjs/discord-api-types/commit/9dce6ed392b64e602c3cc05946bc0f30bac7279e))
## [0.37.40](https://github.com/discordjs/discord-api-types/compare/0.37.39...0.37.40) (2023-04-24)
### Features
- add support for voice messages ([#749](https://github.com/discordjs/discord-api-types/issues/749)) ([3dac5b9](https://github.com/discordjs/discord-api-types/commit/3dac5b93e7568ba2fbd3bc30d229d2df80f96eed))
## [0.37.39](https://github.com/discordjs/discord-api-types/compare/0.37.38...0.37.39) (2023-04-17)
### Bug Fixes
- **RESTPostAPIChannelMessagesThreadsJSONBody:** mark `auto_archive_duration` as optional ([ca6a95d](https://github.com/discordjs/discord-api-types/commit/ca6a95d69c7b93f564f10cce422faf5ea4133be7))
### Features
- **APIGuild:** add `max_stage_video_channel_users` ([#550](https://github.com/discordjs/discord-api-types/issues/550)) ([9a66d21](https://github.com/discordjs/discord-api-types/commit/9a66d21f4913c63ed7c192cf9340febe603bf516))
## [0.37.38](https://github.com/discordjs/discord-api-types/compare/0.37.37...0.37.38) (2023-04-10)
### Features
- **APIBaseInteraction:** add `channel` ([#741](https://github.com/discordjs/discord-api-types/issues/741)) ([311b7a2](https://github.com/discordjs/discord-api-types/commit/311b7a2eb9bdc6ad9d6ed7af2b7faf6f95631698))
- **RESTJSONErrorCodes:** add error `50163` ([#725](https://github.com/discordjs/discord-api-types/issues/725)) ([9074621](https://github.com/discordjs/discord-api-types/commit/9074621085d0e2d7b32b82c0bf0604e3cf42bbdf))
## [0.37.37](https://github.com/discordjs/discord-api-types/compare/0.37.36...0.37.37) (2023-03-23)
### Bug Fixes
- add missing `RESTGetAPIWebhookWithTokenQuery` ([#735](https://github.com/discordjs/discord-api-types/issues/735)) ([2a78a51](https://github.com/discordjs/discord-api-types/commit/2a78a517d2a3511913a8b2b74bba942db097b577))
### Features
- add various new flags ([#733](https://github.com/discordjs/discord-api-types/issues/733)) ([4723d29](https://github.com/discordjs/discord-api-types/commit/4723d29c9ee17c3efa8e8e86351754dee13428ef))
- **RESTGetAPICurrentUserGuildsQuery:** add `with_counts` ([#641](https://github.com/discordjs/discord-api-types/issues/641)) ([0cd9b0d](https://github.com/discordjs/discord-api-types/commit/0cd9b0debbf17f60267bf2f42349fcebea5bf588))
- **RESTPostAPIGuildChannelJSONBody:** add `default_thread_rate_limit_per_user` ([#730](https://github.com/discordjs/discord-api-types/issues/730)) ([8f9370d](https://github.com/discordjs/discord-api-types/commit/8f9370d2592d6a450820bee52fe153eb00ba830f))
## [0.37.36](https://github.com/discordjs/discord-api-types/compare/0.37.35...0.37.36) (2023-03-13)
### Features
- **AutoModeration:** add `custom_message` field support ([#727](https://github.com/discordjs/discord-api-types/issues/727)) ([0d47c69](https://github.com/discordjs/discord-api-types/commit/0d47c69ca80909205f14004aaf26645f367c06d0))
## [0.37.35](https://github.com/discordjs/discord-api-types/compare/0.37.34...0.37.35) (2023-02-17)
### Bug Fixes
- `StageRaiseHand` should be unstable ([#722](https://github.com/discordjs/discord-api-types/issues/722)) ([85051ea](https://github.com/discordjs/discord-api-types/commit/85051eaab7e262b4f60e3f5565bf8a7a5225513e))
## [0.37.34](https://github.com/discordjs/discord-api-types/compare/0.37.33...0.37.34) (2023-02-16)
### Bug Fixes
- **GuildSystemChannelFlags:** "suppress" typo ([#719](https://github.com/discordjs/discord-api-types/issues/719)) ([8d37bc5](https://github.com/discordjs/discord-api-types/commit/8d37bc5e30f76552bca402c858cc67bb8a5ddc9c))
### Features
- add `managed` field to `ChannelType.GroupDM` ([#698](https://github.com/discordjs/discord-api-types/issues/698)) ([8477deb](https://github.com/discordjs/discord-api-types/commit/8477deb6a832b0c985fa0f6d1df4b99eaeab2a87))
- **CDNRoutes:** add `storePageAsset()` ([#695](https://github.com/discordjs/discord-api-types/issues/695)) ([4cf6fd2](https://github.com/discordjs/discord-api-types/commit/4cf6fd2cecd92a9c3ffa32368ccc7b1994295be3))
- **ConnectionService:** add `instagram` ([#701](https://github.com/discordjs/discord-api-types/issues/701)) ([c65e214](https://github.com/discordjs/discord-api-types/commit/c65e214fddeb3aa959034ac14de39edab38ff0f3))
- **RESTJSONErrorCodes:** add error `30011` ([#697](https://github.com/discordjs/discord-api-types/issues/697)) ([41b31eb](https://github.com/discordjs/discord-api-types/commit/41b31ebfd62a8dba32da1e748c49877924c0602d))
- **RESTJSONErrorCodes:** add error `30060` ([#720](https://github.com/discordjs/discord-api-types/issues/720)) ([20153f6](https://github.com/discordjs/discord-api-types/commit/20153f6fe24676d73bcb41e92c6d9d52961f1f73))
- **RESTJSONErrorCodes:** add error `30061` ([#717](https://github.com/discordjs/discord-api-types/issues/717)) ([d609efc](https://github.com/discordjs/discord-api-types/commit/d609efc746df620925237575dd24fd0f38213f09))
## [0.37.33](https://github.com/discordjs/discord-api-types/compare/0.37.32...0.37.33) (2023-02-11)
### Bug Fixes
- **GatewayDispatchPayload:** add missing GuildAuditLogEntry ([#715](https://github.com/discordjs/discord-api-types/issues/715)) ([602c16e](https://github.com/discordjs/discord-api-types/commit/602c16eee12e85a8052f40c695314a42b1d15979))
## [0.37.32](https://github.com/discordjs/discord-api-types/compare/0.37.31...0.37.32) (2023-02-09)
### Features
- **MessageType:** add `SuppressNotifications` ([#710](https://github.com/discordjs/discord-api-types/issues/710)) ([b14aea6](https://github.com/discordjs/discord-api-types/commit/b14aea65f886db047ea9fcbd1b8f49f1bc38f594))
## [0.37.31](https://github.com/discordjs/discord-api-types/compare/0.37.30...0.37.31) (2023-01-30)
## [0.37.30](https://github.com/discordjs/discord-api-types/compare/0.37.29...0.37.30) (2023-01-26)
### Features
- **APIGuildMember:** add support for guild member flags ([#700](https://github.com/discordjs/discord-api-types/issues/700)) ([e902671](https://github.com/discordjs/discord-api-types/commit/e902671411b518504b9adc6b0d7310501fd531ad))
- **GatewayDispatchEvents:** add `GuildAuditLogEntryCreate` ([#692](https://github.com/discordjs/discord-api-types/issues/692)) ([31ca234](https://github.com/discordjs/discord-api-types/commit/31ca234decd6d62b503aadd88111a2af3778f455))
## [0.37.29](https://github.com/discordjs/discord-api-types/compare/0.37.28...0.37.29) (2023-01-23)
## [0.37.28](https://github.com/discordjs/discord-api-types/compare/0.37.27...0.37.28) (2023-01-12)
### Bug Fixes
- **GuildIntegration:** `enabled` and `user` are present on bots ([#660](https://github.com/discordjs/discord-api-types/issues/660)) ([b10e9bb](https://github.com/discordjs/discord-api-types/commit/b10e9bbe5ab450df065fc78da85d49f335db2b82))
### Features
- Add role subscription data and system channel flags ([#686](https://github.com/discordjs/discord-api-types/issues/686)) ([792c60b](https://github.com/discordjs/discord-api-types/commit/792c60b3328d8440de79546bf43d6b317400c788))
- **APIRoleTags:** add `guild_connections` ([#675](https://github.com/discordjs/discord-api-types/issues/675)) ([3dbe985](https://github.com/discordjs/discord-api-types/commit/3dbe985b6e05e6aa68248e79f45d550e783bc6a7))
- **APIThreadMember:** add support for thread member pagination ([#689](https://github.com/discordjs/discord-api-types/issues/689)) ([e2fb5ee](https://github.com/discordjs/discord-api-types/commit/e2fb5ee4886a33bb752a75d5894f726f6f76340f))
- **ConnectionService:** add TikTok ([#632](https://github.com/discordjs/discord-api-types/issues/632)) ([af06df6](https://github.com/discordjs/discord-api-types/commit/af06df6cae224a60e7a35e356028677e8736ed89))
- **RESTJSONErrorCodes:** add error `50091` ([#671](https://github.com/discordjs/discord-api-types/issues/671)) ([8869e92](https://github.com/discordjs/discord-api-types/commit/8869e923362740e491f267d71073d4266d36cb42))
- role subscriptions ([#665](https://github.com/discordjs/discord-api-types/issues/665)) ([0b4058b](https://github.com/discordjs/discord-api-types/commit/0b4058bdd48b74fcd9944dcf4b6f98d5e0bee105))
- **StickerFormatType:** add `GIF` ([#688](https://github.com/discordjs/discord-api-types/issues/688)) ([a6bcb3f](https://github.com/discordjs/discord-api-types/commit/a6bcb3f0fe7bc4edceee61b7cdab0e46db9c7109))
## [0.37.27](https://github.com/discordjs/discord-api-types/compare/0.37.26...0.37.27) (2023-01-09)
### Features
- **MessageType:** add missing types ([#681](https://github.com/discordjs/discord-api-types/issues/681)) ([7d55b33](https://github.com/discordjs/discord-api-types/commit/7d55b33bacb96e156f41fb67a1819c07c8fa959f))
## [0.37.26](https://github.com/discordjs/discord-api-types/compare/0.37.25...0.37.26) (2023-01-05)
### Features

View File

@@ -77,25 +77,25 @@ import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
The exports of each API version is split into three main parts:
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.

View File

@@ -1,3 +1,346 @@
## [0.37.78](https://github.com/discordjs/discord-api-types/compare/0.37.77...0.37.78) (2024-04-01)
### Features
* bot banners ([#906](https://github.com/discordjs/discord-api-types/issues/906)) ([495148d](https://github.com/discordjs/discord-api-types/commit/495148dc466fcc3cd47ff62377369a97a9cec13d))
* **Guild:** add `RESTPostAPIGuildBulkBan` result and json body ([#910](https://github.com/discordjs/discord-api-types/issues/910)) ([61ce329](https://github.com/discordjs/discord-api-types/commit/61ce329f614d5bc923c3ab4d2b318aa2e66c767b))
* **RESTJSONErrorCodes:** Add `500_000` ([#908](https://github.com/discordjs/discord-api-types/issues/908)) ([4db44b5](https://github.com/discordjs/discord-api-types/commit/4db44b553d7164415b9f20468716beb5223fcec0))
* **Routes:** Add `guildBulkBan()` route ([#909](https://github.com/discordjs/discord-api-types/issues/909)) ([7dcad58](https://github.com/discordjs/discord-api-types/commit/7dcad582ce2fa16ac7bde35f5b158648c2c7c9bf))
## [0.37.77](https://github.com/discordjs/discord-api-types/compare/0.37.76...0.37.77) (2024-03-28)
### Features
* **APIAuditLogChange:** add `APIAuditLogChangeKeySystemChannelFlags` ([#933](https://github.com/discordjs/discord-api-types/issues/933)) ([47c9ad0](https://github.com/discordjs/discord-api-types/commit/47c9ad0e7043c098d103107e95f8a97e67ad3eb4))
## [0.37.76](https://github.com/discordjs/discord-api-types/compare/0.37.75...0.37.76) (2024-03-21)
## [0.37.75](https://github.com/discordjs/discord-api-types/compare/0.37.74...0.37.75) (2024-03-18)
## [0.37.74](https://github.com/discordjs/discord-api-types/compare/0.37.73...0.37.74) (2024-03-14)
## [0.37.73](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.73) (2024-03-07)
## [0.37.72](https://github.com/discordjs/discord-api-types/compare/0.37.71...0.37.72) (2024-03-07)
## [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)
### Features
- guild onboarding ([#713](https://github.com/discordjs/discord-api-types/issues/713)) ([eced39c](https://github.com/discordjs/discord-api-types/commit/eced39cc3fa305e336d5752827812cb790ac485d))
## [0.37.43](https://github.com/discordjs/discord-api-types/compare/0.37.42...0.37.43) (2023-05-29)
### Features
- **RESTJSONErrorCodes:** add error `50178` ([#752](https://github.com/discordjs/discord-api-types/issues/752)) ([30fb497](https://github.com/discordjs/discord-api-types/commit/30fb4978b76f30a00453470f643d71e8f1d1f817))
## [0.37.42](https://github.com/discordjs/discord-api-types/compare/0.37.41...0.37.42) (2023-05-08)
### Bug Fixes
- allow sending empty choices with autocomplete: true ([#762](https://github.com/discordjs/discord-api-types/issues/762)) ([0e6b19d](https://github.com/discordjs/discord-api-types/commit/0e6b19d2bcfe6e9806d3d20125668b3464845517))
## [0.37.41](https://github.com/discordjs/discord-api-types/compare/0.37.40...0.37.41) (2023-05-01)
### Bug Fixes
- **GatewayGuildMembersChunkDispatchData:** Omit `guild_id` for presences ([#761](https://github.com/discordjs/discord-api-types/issues/761)) ([5079b16](https://github.com/discordjs/discord-api-types/commit/5079b164db3ac3bda25675a553a586f099555667))
- **types:** move `types` condition to the front ([#763](https://github.com/discordjs/discord-api-types/issues/763)) ([9dce6ed](https://github.com/discordjs/discord-api-types/commit/9dce6ed392b64e602c3cc05946bc0f30bac7279e))
## [0.37.40](https://github.com/discordjs/discord-api-types/compare/0.37.39...0.37.40) (2023-04-24)
### Features
- add support for voice messages ([#749](https://github.com/discordjs/discord-api-types/issues/749)) ([3dac5b9](https://github.com/discordjs/discord-api-types/commit/3dac5b93e7568ba2fbd3bc30d229d2df80f96eed))
## [0.37.39](https://github.com/discordjs/discord-api-types/compare/0.37.38...0.37.39) (2023-04-17)
### Bug Fixes
- **RESTPostAPIChannelMessagesThreadsJSONBody:** mark `auto_archive_duration` as optional ([ca6a95d](https://github.com/discordjs/discord-api-types/commit/ca6a95d69c7b93f564f10cce422faf5ea4133be7))
### Features
- **APIGuild:** add `max_stage_video_channel_users` ([#550](https://github.com/discordjs/discord-api-types/issues/550)) ([9a66d21](https://github.com/discordjs/discord-api-types/commit/9a66d21f4913c63ed7c192cf9340febe603bf516))
## [0.37.38](https://github.com/discordjs/discord-api-types/compare/0.37.37...0.37.38) (2023-04-10)
### Features
- **APIBaseInteraction:** add `channel` ([#741](https://github.com/discordjs/discord-api-types/issues/741)) ([311b7a2](https://github.com/discordjs/discord-api-types/commit/311b7a2eb9bdc6ad9d6ed7af2b7faf6f95631698))
- **RESTJSONErrorCodes:** add error `50163` ([#725](https://github.com/discordjs/discord-api-types/issues/725)) ([9074621](https://github.com/discordjs/discord-api-types/commit/9074621085d0e2d7b32b82c0bf0604e3cf42bbdf))
## [0.37.37](https://github.com/discordjs/discord-api-types/compare/0.37.36...0.37.37) (2023-03-23)
### Bug Fixes
- add missing `RESTGetAPIWebhookWithTokenQuery` ([#735](https://github.com/discordjs/discord-api-types/issues/735)) ([2a78a51](https://github.com/discordjs/discord-api-types/commit/2a78a517d2a3511913a8b2b74bba942db097b577))
### Features
- add various new flags ([#733](https://github.com/discordjs/discord-api-types/issues/733)) ([4723d29](https://github.com/discordjs/discord-api-types/commit/4723d29c9ee17c3efa8e8e86351754dee13428ef))
- **RESTGetAPICurrentUserGuildsQuery:** add `with_counts` ([#641](https://github.com/discordjs/discord-api-types/issues/641)) ([0cd9b0d](https://github.com/discordjs/discord-api-types/commit/0cd9b0debbf17f60267bf2f42349fcebea5bf588))
- **RESTPostAPIGuildChannelJSONBody:** add `default_thread_rate_limit_per_user` ([#730](https://github.com/discordjs/discord-api-types/issues/730)) ([8f9370d](https://github.com/discordjs/discord-api-types/commit/8f9370d2592d6a450820bee52fe153eb00ba830f))
## [0.37.36](https://github.com/discordjs/discord-api-types/compare/0.37.35...0.37.36) (2023-03-13)
### Features
- **AutoModeration:** add `custom_message` field support ([#727](https://github.com/discordjs/discord-api-types/issues/727)) ([0d47c69](https://github.com/discordjs/discord-api-types/commit/0d47c69ca80909205f14004aaf26645f367c06d0))
## [0.37.35](https://github.com/discordjs/discord-api-types/compare/0.37.34...0.37.35) (2023-02-17)
### Bug Fixes
- `StageRaiseHand` should be unstable ([#722](https://github.com/discordjs/discord-api-types/issues/722)) ([85051ea](https://github.com/discordjs/discord-api-types/commit/85051eaab7e262b4f60e3f5565bf8a7a5225513e))
## [0.37.34](https://github.com/discordjs/discord-api-types/compare/0.37.33...0.37.34) (2023-02-16)
### Bug Fixes
- **GuildSystemChannelFlags:** "suppress" typo ([#719](https://github.com/discordjs/discord-api-types/issues/719)) ([8d37bc5](https://github.com/discordjs/discord-api-types/commit/8d37bc5e30f76552bca402c858cc67bb8a5ddc9c))
### Features
- add `managed` field to `ChannelType.GroupDM` ([#698](https://github.com/discordjs/discord-api-types/issues/698)) ([8477deb](https://github.com/discordjs/discord-api-types/commit/8477deb6a832b0c985fa0f6d1df4b99eaeab2a87))
- **CDNRoutes:** add `storePageAsset()` ([#695](https://github.com/discordjs/discord-api-types/issues/695)) ([4cf6fd2](https://github.com/discordjs/discord-api-types/commit/4cf6fd2cecd92a9c3ffa32368ccc7b1994295be3))
- **ConnectionService:** add `instagram` ([#701](https://github.com/discordjs/discord-api-types/issues/701)) ([c65e214](https://github.com/discordjs/discord-api-types/commit/c65e214fddeb3aa959034ac14de39edab38ff0f3))
- **RESTJSONErrorCodes:** add error `30011` ([#697](https://github.com/discordjs/discord-api-types/issues/697)) ([41b31eb](https://github.com/discordjs/discord-api-types/commit/41b31ebfd62a8dba32da1e748c49877924c0602d))
- **RESTJSONErrorCodes:** add error `30060` ([#720](https://github.com/discordjs/discord-api-types/issues/720)) ([20153f6](https://github.com/discordjs/discord-api-types/commit/20153f6fe24676d73bcb41e92c6d9d52961f1f73))
- **RESTJSONErrorCodes:** add error `30061` ([#717](https://github.com/discordjs/discord-api-types/issues/717)) ([d609efc](https://github.com/discordjs/discord-api-types/commit/d609efc746df620925237575dd24fd0f38213f09))
## [0.37.33](https://github.com/discordjs/discord-api-types/compare/0.37.32...0.37.33) (2023-02-11)
### Bug Fixes
- **GatewayDispatchPayload:** add missing GuildAuditLogEntry ([#715](https://github.com/discordjs/discord-api-types/issues/715)) ([602c16e](https://github.com/discordjs/discord-api-types/commit/602c16eee12e85a8052f40c695314a42b1d15979))
## [0.37.32](https://github.com/discordjs/discord-api-types/compare/0.37.31...0.37.32) (2023-02-09)
### Features
- **MessageType:** add `SuppressNotifications` ([#710](https://github.com/discordjs/discord-api-types/issues/710)) ([b14aea6](https://github.com/discordjs/discord-api-types/commit/b14aea65f886db047ea9fcbd1b8f49f1bc38f594))
## [0.37.31](https://github.com/discordjs/discord-api-types/compare/0.37.30...0.37.31) (2023-01-30)
## [0.37.30](https://github.com/discordjs/discord-api-types/compare/0.37.29...0.37.30) (2023-01-26)
### Features
- **APIGuildMember:** add support for guild member flags ([#700](https://github.com/discordjs/discord-api-types/issues/700)) ([e902671](https://github.com/discordjs/discord-api-types/commit/e902671411b518504b9adc6b0d7310501fd531ad))
- **GatewayDispatchEvents:** add `GuildAuditLogEntryCreate` ([#692](https://github.com/discordjs/discord-api-types/issues/692)) ([31ca234](https://github.com/discordjs/discord-api-types/commit/31ca234decd6d62b503aadd88111a2af3778f455))
## [0.37.29](https://github.com/discordjs/discord-api-types/compare/0.37.28...0.37.29) (2023-01-23)
## [0.37.28](https://github.com/discordjs/discord-api-types/compare/0.37.27...0.37.28) (2023-01-12)
### Bug Fixes
- **GuildIntegration:** `enabled` and `user` are present on bots ([#660](https://github.com/discordjs/discord-api-types/issues/660)) ([b10e9bb](https://github.com/discordjs/discord-api-types/commit/b10e9bbe5ab450df065fc78da85d49f335db2b82))
### Features
- Add role subscription data and system channel flags ([#686](https://github.com/discordjs/discord-api-types/issues/686)) ([792c60b](https://github.com/discordjs/discord-api-types/commit/792c60b3328d8440de79546bf43d6b317400c788))
- **APIRoleTags:** add `guild_connections` ([#675](https://github.com/discordjs/discord-api-types/issues/675)) ([3dbe985](https://github.com/discordjs/discord-api-types/commit/3dbe985b6e05e6aa68248e79f45d550e783bc6a7))
- **APIThreadMember:** add support for thread member pagination ([#689](https://github.com/discordjs/discord-api-types/issues/689)) ([e2fb5ee](https://github.com/discordjs/discord-api-types/commit/e2fb5ee4886a33bb752a75d5894f726f6f76340f))
- **ConnectionService:** add TikTok ([#632](https://github.com/discordjs/discord-api-types/issues/632)) ([af06df6](https://github.com/discordjs/discord-api-types/commit/af06df6cae224a60e7a35e356028677e8736ed89))
- **RESTJSONErrorCodes:** add error `50091` ([#671](https://github.com/discordjs/discord-api-types/issues/671)) ([8869e92](https://github.com/discordjs/discord-api-types/commit/8869e923362740e491f267d71073d4266d36cb42))
- role subscriptions ([#665](https://github.com/discordjs/discord-api-types/issues/665)) ([0b4058b](https://github.com/discordjs/discord-api-types/commit/0b4058bdd48b74fcd9944dcf4b6f98d5e0bee105))
- **StickerFormatType:** add `GIF` ([#688](https://github.com/discordjs/discord-api-types/issues/688)) ([a6bcb3f](https://github.com/discordjs/discord-api-types/commit/a6bcb3f0fe7bc4edceee61b7cdab0e46db9c7109))
## [0.37.27](https://github.com/discordjs/discord-api-types/compare/0.37.26...0.37.27) (2023-01-09)
### Features
- **MessageType:** add missing types ([#681](https://github.com/discordjs/discord-api-types/issues/681)) ([7d55b33](https://github.com/discordjs/discord-api-types/commit/7d55b33bacb96e156f41fb67a1819c07c8fa959f))
## [0.37.26](https://github.com/discordjs/discord-api-types/compare/0.37.25...0.37.26) (2023-01-05)
### Features

View File

@@ -77,25 +77,25 @@ import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
The exports of each API version is split into three main parts:
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.

View File

@@ -3,6 +3,6 @@
*/
export interface GatewayURLQuery {
v: string;
encoding: 'json' | 'etf';
encoding: 'etf' | 'json';
compress?: 'zlib-stream';
}

View File

@@ -32,6 +32,9 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
APIEntitlement,
ChannelType,
} from '../payloads/v10/mod.ts';
import type { Nullable } from '../utils/internals.ts';
@@ -97,7 +100,7 @@ export enum GatewayCloseCodes {
/**
* We're not sure what went wrong. Try reconnecting?
*/
UnknownError = 4000,
UnknownError = 4_000,
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
@@ -131,7 +134,7 @@ export enum GatewayCloseCodes {
*
* See https://discord.com/developers/docs/topics/gateway-events#resume
*/
InvalidSeq = 4007,
InvalidSeq = 4_007,
/**
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
*/
@@ -179,7 +182,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
@@ -262,32 +269,38 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
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 =
| GatewayHeartbeat
| GatewayIdentify
| GatewayUpdatePresence
| GatewayVoiceStateUpdate
| GatewayRequestGuildMembers
| GatewayResume
| GatewayRequestGuildMembers;
| GatewayUpdatePresence
| GatewayVoiceStateUpdate;
export type GatewayReceivePayload =
| GatewayHello
| GatewayHeartbeatRequest
| GatewayDispatchPayload
| GatewayHeartbeatAck
| GatewayHeartbeatRequest
| GatewayHello
| GatewayInvalidSession
| GatewayReconnect
| GatewayDispatchPayload;
| GatewayReconnect;
export type GatewayDispatchPayload =
| GatewayAutoModerationRuleModifyDispatch
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayEntitlementModifyDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayGuildBanModifyDispatch
| GatewayGuildCreateDispatch
| GatewayGuildDeleteDispatch
@@ -301,8 +314,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -321,15 +334,17 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
@@ -439,7 +454,7 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
@@ -454,8 +469,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -665,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.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
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
*/
@@ -950,10 +1014,10 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-member-update
*/
export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> &
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> &
Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> &
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
Required<Pick<APIGuildMember, 'user'>> &
Nullable<Pick<APIGuildMember, 'joined_at'>> & {
Required<Pick<APIGuildMember, 'user'>> & {
/**
* The id of the guild
*/
@@ -968,6 +1032,11 @@ export type GatewayGuildMembersChunkDispatch = DataPayload<
GatewayGuildMembersChunkDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence
*/
export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
*/
@@ -999,7 +1068,7 @@ export interface GatewayGuildMembersChunkDispatchData {
*
* See https://discord.com/developers/docs/topics/gateway-events#update-presence
*/
presences?: RawGatewayPresenceUpdate[];
presences?: GatewayGuildMembersChunkPresence[];
/**
* The nonce used in the Guild Members Request
*
@@ -1293,7 +1362,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#message-create
*/
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
export type GatewayMessageCreateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-update
@@ -1306,8 +1375,8 @@ export type GatewayMessageUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#message-update
*/
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
GatewayMessageEventExtraFields & {
export type GatewayMessageUpdateDispatchData = GatewayMessageEventExtraFields &
Omit<Partial<APIMessage>, 'mentions'> & {
/**
* ID of the message
*/
@@ -1409,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
@@ -1539,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
@@ -1551,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
@@ -1566,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
@@ -1691,6 +1795,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads
@@ -1857,8 +1979,8 @@ export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestG
* https://discord.com/developers/docs/topics/gateway-events#request-guild-members
*/
export type GatewayRequestGuildMembersData =
| GatewayRequestGuildMembersDataWithUserIds
| GatewayRequestGuildMembersDataWithQuery;
| GatewayRequestGuildMembersDataWithQuery
| GatewayRequestGuildMembersDataWithUserIds;
/**
* https://discord.com/developers/docs/topics/gateway-events#update-voice-state
@@ -1927,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
@@ -1951,7 +2073,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -1994,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
>

View File

@@ -27,6 +27,7 @@ export const GatewayVersion = '6';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum GatewayOPCodes {
@@ -46,17 +47,18 @@ export enum GatewayOPCodes {
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum GatewayCloseCodes {
UnknownError = 4000,
UnknownError = 4_000,
UnknownOpCode,
DecodeError,
NotAuthenticated,
AuthenticationFailed,
AlreadyAuthenticated,
InvalidSeq = 4007,
InvalidSeq = 4_007,
RateLimited,
SessionTimedOut,
InvalidShard,
@@ -68,6 +70,7 @@ export enum GatewayCloseCodes {
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum VoiceOPCodes {
@@ -87,28 +90,30 @@ export enum VoiceOPCodes {
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum VoiceCloseCodes {
UnknownOpCode = 4001,
UnknownOpCode = 4_001,
NotAuthenticated = 4003,
NotAuthenticated = 4_003,
AuthenticationFailed,
AlreadyAuthenticated,
SessionNoLongerValid,
SessionTimeout = 4009,
SessionTimeout = 4_009,
ServerNotFound = 4011,
ServerNotFound = 4_011,
UnknownProtocol,
Disconnected = 4014,
Disconnected = 4_014,
VoiceServerCrashed,
UnknownEncryptionMode,
}
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum GatewayIntentBits {
@@ -131,6 +136,7 @@ export enum GatewayIntentBits {
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export enum GatewayDispatchEvents {
@@ -178,61 +184,62 @@ export enum GatewayDispatchEvents {
export type GatewaySendPayload =
| GatewayHeartbeat
| GatewayIdentify
| GatewayUpdatePresence
| GatewayVoiceStateUpdate
| GatewayRequestGuildMembers
| GatewayResume
| GatewayRequestGuildMembers;
| GatewayUpdatePresence
| GatewayVoiceStateUpdate;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayReceivePayload =
| GatewayHello
| GatewayHeartbeatRequest
| GatewayDispatchPayload
| GatewayHeartbeatAck
| GatewayHeartbeatRequest
| GatewayHello
| GatewayInvalidSession
| GatewayReconnect
| GatewayDispatchPayload;
| GatewayReconnect;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayDispatchPayload =
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayGuildModifyDispatch
| GatewayGuildDeleteDispatch
| GatewayGuildBanModifyDispatch
| GatewayGuildDeleteDispatch
| GatewayGuildEmojisUpdateDispatch
| GatewayGuildIntegrationsUpdateDispatch
| GatewayGuildMemberAddDispatch
| GatewayGuildMemberRemoveDispatch
| GatewayGuildMemberUpdateDispatch
| GatewayGuildMembersChunkDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildMemberUpdateDispatch
| GatewayGuildModifyDispatch
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayInviteCreateDispatch
| GatewayInviteDeleteDispatch
| GatewayMessageCreateDispatch
| GatewayMessageUpdateDispatch
| GatewayMessageDeleteDispatch
| GatewayMessageDeleteBulkDispatch
| GatewayMessageDeleteDispatch
| GatewayMessageReactionAddDispatch
| GatewayMessageReactionRemoveDispatch
| GatewayMessageReactionRemoveAllDispatch
| GatewayMessageReactionRemoveDispatch
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch;
// #region Dispatch Payloads
/**
* https://discord.com/developers/docs/topics/gateway#hello
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHello extends NonDispatchPayload {
@@ -244,6 +251,7 @@ export interface GatewayHello extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
@@ -253,6 +261,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeatAck extends NonDispatchPayload {
@@ -262,6 +271,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#invalid-session
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayInvalidSession extends NonDispatchPayload {
@@ -271,6 +281,7 @@ export interface GatewayInvalidSession extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#reconnect
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayReconnect extends NonDispatchPayload {
@@ -280,6 +291,7 @@ export interface GatewayReconnect extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#ready
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayReadyDispatch = DataPayload<
@@ -296,6 +308,7 @@ export type GatewayReadyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#resumed
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
@@ -305,6 +318,7 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update
* https://discord.com/developers/docs/topics/gateway#channel-delete
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayChannelModifyDispatch = DataPayload<
@@ -330,6 +344,7 @@ export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayChannelPinsUpdateDispatch = DataPayload<
@@ -344,6 +359,7 @@ export type GatewayChannelPinsUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
* https://discord.com/developers/docs/topics/gateway#guild-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildModifyDispatch = DataPayload<
@@ -363,6 +379,7 @@ export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-delete
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, APIUnavailableGuild>;
@@ -370,6 +387,7 @@ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.Guild
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildBanModifyDispatch = DataPayload<
@@ -392,6 +410,7 @@ export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildEmojisUpdateDispatch = DataPayload<
@@ -404,6 +423,7 @@ export type GatewayGuildEmojisUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
@@ -413,6 +433,7 @@ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-add
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildMemberAddDispatch = DataPayload<
@@ -422,6 +443,7 @@ export type GatewayGuildMemberAddDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildMemberRemoveDispatch = DataPayload<
@@ -434,6 +456,7 @@ export type GatewayGuildMemberRemoveDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildMemberUpdateDispatch = DataPayload<
@@ -445,6 +468,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildMembersChunkDispatch = DataPayload<
@@ -463,6 +487,7 @@ export type GatewayGuildMembersChunkDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
* https://discord.com/developers/docs/topics/gateway#guild-role-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildRoleModifyDispatch = DataPayload<
@@ -485,6 +510,7 @@ export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayGuildRoleDeleteDispatch = DataPayload<
@@ -497,6 +523,7 @@ export type GatewayGuildRoleDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#invite-create
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayInviteCreateDispatch = DataPayload<
@@ -518,6 +545,7 @@ export type GatewayInviteCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#invite-delete
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayInviteDeleteDispatch = DataPayload<
@@ -531,21 +559,24 @@ export type GatewayInviteDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-create
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, APIMessage>;
/**
* https://discord.com/developers/docs/topics/gateway#message-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageUpdateDispatch = DataPayload<
GatewayDispatchEvents.MessageUpdate,
{ id: string; channel_id: string } & Partial<APIMessage>
Partial<APIMessage> & { id: string; channel_id: string }
>;
/**
* https://discord.com/developers/docs/topics/gateway#message-delete
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageDeleteDispatch = DataPayload<
@@ -559,6 +590,7 @@ export type GatewayMessageDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageDeleteBulkDispatch = DataPayload<
@@ -572,18 +604,21 @@ export type GatewayMessageDeleteBulkDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
@@ -593,6 +628,7 @@ export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
@@ -604,12 +640,14 @@ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#presence-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, RawGatewayPresenceUpdate>;
/**
* https://discord.com/developers/docs/topics/gateway#typing-start
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayTypingStartDispatch = DataPayload<
@@ -625,18 +663,21 @@ export type GatewayTypingStartDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#user-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, APIUser>;
/**
* https://discord.com/developers/docs/topics/gateway#voice-state-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceState>;
/**
* https://discord.com/developers/docs/topics/gateway#voice-server-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayVoiceServerUpdateDispatch = DataPayload<
@@ -650,6 +691,7 @@ export type GatewayVoiceServerUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#webhooks-update
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayWebhooksUpdateDispatch = DataPayload<
@@ -666,6 +708,7 @@ export type GatewayWebhooksUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeat {
@@ -675,6 +718,7 @@ export interface GatewayHeartbeat {
/**
* https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayIdentifyProperties {
@@ -685,6 +729,7 @@ export interface GatewayIdentifyProperties {
/**
* https://discord.com/developers/docs/topics/gateway#identify
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayIdentify {
@@ -703,6 +748,7 @@ export interface GatewayIdentify {
/**
* https://discord.com/developers/docs/topics/gateway#resume
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayResume {
@@ -716,22 +762,24 @@ export interface GatewayResume {
/**
* https://discord.com/developers/docs/topics/gateway#request-guild-members
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayRequestGuildMembers {
op: GatewayOPCodes.RequestGuildMembers;
d: {
guild_id: string | string[];
guild_id: string[] | string;
query?: string;
limit: number;
presences?: boolean;
user_ids?: string | string[];
user_ids?: string[] | string;
nonce?: string;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#update-voice-state
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayVoiceStateUpdate {
@@ -746,6 +794,7 @@ export interface GatewayVoiceStateUpdate {
/**
* https://discord.com/developers/docs/topics/gateway#update-status
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayUpdatePresence {
@@ -755,6 +804,7 @@ export interface GatewayUpdatePresence {
/**
* https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure
*
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayPresenceUpdateData {

View File

@@ -35,6 +35,7 @@ export const GatewayVersion = '8';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum GatewayOpcodes {
@@ -87,13 +88,14 @@ export enum GatewayOpcodes {
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum GatewayCloseCodes {
/**
* We're not sure what went wrong. Try reconnecting?
*/
UnknownError = 4000,
UnknownError = 4_000,
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
@@ -127,7 +129,7 @@ export enum GatewayCloseCodes {
*
* See https://discord.com/developers/docs/topics/gateway#resume
*/
InvalidSeq = 4007,
InvalidSeq = 4_007,
/**
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
*/
@@ -171,6 +173,7 @@ export enum GatewayCloseCodes {
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum GatewayIntentBits {
@@ -194,6 +197,7 @@ export enum GatewayIntentBits {
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum GatewayDispatchEvents {
@@ -254,21 +258,21 @@ export enum GatewayDispatchEvents {
export type GatewaySendPayload =
| GatewayHeartbeat
| GatewayIdentify
| GatewayUpdatePresence
| GatewayVoiceStateUpdate
| GatewayRequestGuildMembers
| GatewayResume
| GatewayRequestGuildMembers;
| GatewayUpdatePresence
| GatewayVoiceStateUpdate;
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayReceivePayload =
| GatewayHello
| GatewayHeartbeatRequest
| GatewayDispatchPayload
| GatewayHeartbeatAck
| GatewayHeartbeatRequest
| GatewayHello
| GatewayInvalidSession
| GatewayReconnect
| GatewayDispatchPayload;
| GatewayReconnect;
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
@@ -288,8 +292,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -308,11 +312,11 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
@@ -323,6 +327,7 @@ export type GatewayDispatchPayload =
/**
* https://discord.com/developers/docs/topics/gateway#hello
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayHello extends NonDispatchPayload {
@@ -332,6 +337,7 @@ export interface GatewayHello extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#hello
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayHelloData {
@@ -343,6 +349,7 @@ export interface GatewayHelloData {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
@@ -352,6 +359,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayHeartbeatAck extends NonDispatchPayload {
@@ -361,6 +369,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#invalid-session
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayInvalidSession extends NonDispatchPayload {
@@ -370,12 +379,14 @@ export interface GatewayInvalidSession extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#invalid-session
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayInvalidSessionData = boolean;
/**
* https://discord.com/developers/docs/topics/gateway#reconnect
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayReconnect extends NonDispatchPayload {
@@ -385,12 +396,14 @@ export interface GatewayReconnect extends NonDispatchPayload {
/**
* https://discord.com/developers/docs/topics/gateway#ready
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>;
/**
* https://discord.com/developers/docs/topics/gateway#ready
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayReadyDispatchData {
@@ -427,11 +440,12 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
* https://discord.com/developers/docs/topics/gateway#resumed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
@@ -440,6 +454,7 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update
* https://discord.com/developers/docs/topics/gateway#channel-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelModifyDispatch = DataPayload<
@@ -451,48 +466,56 @@ export type GatewayChannelModifyDispatch = DataPayload<
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update
* https://discord.com/developers/docs/topics/gateway#channel-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelModifyDispatchData = APIChannel;
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#channel-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#channel-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#channel-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#channel-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayChannelPinsUpdateDispatch = DataPayload<
@@ -502,6 +525,7 @@ export type GatewayChannelPinsUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayChannelPinsUpdateDispatchData {
@@ -522,6 +546,7 @@ export interface GatewayChannelPinsUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
* https://discord.com/developers/docs/topics/gateway#guild-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildModifyDispatch = DataPayload<
@@ -532,42 +557,49 @@ export type GatewayGuildModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
* https://discord.com/developers/docs/topics/gateway#guild-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildModifyDispatchData = APIGuild;
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
@@ -575,6 +607,7 @@ export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildBanModifyDispatch = DataPayload<
@@ -585,6 +618,7 @@ export type GatewayGuildBanModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildBanModifyDispatchData {
@@ -602,30 +636,35 @@ export interface GatewayGuildBanModifyDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildEmojisUpdateDispatch = DataPayload<
@@ -635,6 +674,7 @@ export type GatewayGuildEmojisUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildEmojisUpdateDispatchData {
@@ -652,6 +692,7 @@ export interface GatewayGuildEmojisUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-stickers-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildStickersUpdateDispatch = DataPayload<
@@ -661,6 +702,7 @@ export type GatewayGuildStickersUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-stickers-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildStickersUpdateDispatchData {
@@ -678,6 +720,7 @@ export interface GatewayGuildStickersUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
@@ -687,6 +730,7 @@ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildIntegrationsUpdateDispatchData {
@@ -698,6 +742,7 @@ export interface GatewayGuildIntegrationsUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberAddDispatch = DataPayload<
@@ -707,6 +752,7 @@ export type GatewayGuildMemberAddDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
@@ -718,6 +764,7 @@ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberRemoveDispatch = DataPayload<
@@ -727,6 +774,7 @@ export type GatewayGuildMemberRemoveDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildMemberRemoveDispatchData {
@@ -744,6 +792,7 @@ export interface GatewayGuildMemberRemoveDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberUpdateDispatch = DataPayload<
@@ -753,12 +802,13 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> &
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> &
Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> &
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
Required<Pick<APIGuildMember, 'user'>> &
Nullable<Pick<APIGuildMember, 'joined_at'>> & {
Required<Pick<APIGuildMember, 'user'>> & {
/**
* The id of the guild
*/
@@ -767,6 +817,7 @@ export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' |
/**
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMembersChunkDispatch = DataPayload<
@@ -776,6 +827,7 @@ export type GatewayGuildMembersChunkDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildMembersChunkDispatchData {
@@ -818,6 +870,7 @@ export interface GatewayGuildMembersChunkDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
* https://discord.com/developers/docs/topics/gateway#guild-role-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleModifyDispatch = DataPayload<
@@ -828,6 +881,7 @@ export type GatewayGuildRoleModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
* https://discord.com/developers/docs/topics/gateway#guild-role-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildRoleModifyDispatchData {
@@ -845,30 +899,35 @@ export interface GatewayGuildRoleModifyDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildRoleDeleteDispatch = DataPayload<
@@ -878,6 +937,7 @@ export type GatewayGuildRoleDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayGuildRoleDeleteDispatchData {
@@ -966,6 +1026,7 @@ export interface GatewayGuildScheduledEventUserRemoveDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#integration-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayIntegrationCreateDispatch = DataPayload<
@@ -975,12 +1036,14 @@ export type GatewayIntegrationCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#integration-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { guild_id: Snowflake };
/**
* https://discord.com/developers/docs/topics/gateway#integration-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayIntegrationUpdateDispatch = DataPayload<
@@ -990,12 +1053,14 @@ export type GatewayIntegrationUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#integration-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { guild_id: Snowflake };
/**
* https://discord.com/developers/docs/topics/gateway#integration-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayIntegrationDeleteDispatch = DataPayload<
@@ -1005,6 +1070,7 @@ export type GatewayIntegrationDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#integration-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayIntegrationDeleteDispatchData {
@@ -1024,6 +1090,7 @@ export interface GatewayIntegrationDeleteDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#interaction-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayInteractionCreateDispatch = DataPayload<
@@ -1033,12 +1100,14 @@ export type GatewayInteractionCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#interaction-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayInteractionCreateDispatchData = APIInteraction;
/**
* https://discord.com/developers/docs/topics/gateway#invite-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayInviteCreateDispatch = DataPayload<
@@ -1048,6 +1117,7 @@ export type GatewayInviteCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#invite-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayInviteCreateDispatchData {
@@ -1111,6 +1181,7 @@ export interface GatewayInviteCreateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#invite-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayInviteDeleteDispatch = DataPayload<
@@ -1120,6 +1191,7 @@ export type GatewayInviteDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#invite-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayInviteDeleteDispatchData {
@@ -1141,6 +1213,7 @@ export interface GatewayInviteDeleteDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#message-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageCreateDispatch = DataPayload<
@@ -1150,12 +1223,14 @@ export type GatewayMessageCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageCreateDispatchData = APIMessage;
/**
* https://discord.com/developers/docs/topics/gateway#message-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageUpdateDispatch = DataPayload<
@@ -1165,15 +1240,17 @@ export type GatewayMessageUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageUpdateDispatchData = {
export type GatewayMessageUpdateDispatchData = Partial<APIMessage> & {
id: Snowflake;
channel_id: Snowflake;
} & Partial<APIMessage>;
};
/**
* https://discord.com/developers/docs/topics/gateway#message-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageDeleteDispatch = DataPayload<
@@ -1183,6 +1260,7 @@ export type GatewayMessageDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayMessageDeleteDispatchData {
@@ -1202,6 +1280,7 @@ export interface GatewayMessageDeleteDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageDeleteBulkDispatch = DataPayload<
@@ -1211,6 +1290,7 @@ export type GatewayMessageDeleteBulkDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayMessageDeleteBulkDispatchData {
@@ -1230,30 +1310,35 @@ export interface GatewayMessageDeleteBulkDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
@@ -1263,12 +1348,14 @@ export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
@@ -1278,6 +1365,7 @@ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData {
@@ -1289,6 +1377,7 @@ export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageRe
/**
* https://discord.com/developers/docs/topics/gateway#presence-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayPresenceUpdateDispatch = DataPayload<
@@ -1298,12 +1387,14 @@ export type GatewayPresenceUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#presence-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceCreateDispatch = DataPayload<
@@ -1313,12 +1404,14 @@ export type GatewayStageInstanceCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-create
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceCreateDispatchData = APIStageInstance;
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceDeleteDispatch = DataPayload<
@@ -1328,12 +1421,14 @@ export type GatewayStageInstanceDeleteDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-delete
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceDeleteDispatchData = APIStageInstance;
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceUpdateDispatch = DataPayload<
@@ -1343,18 +1438,21 @@ export type GatewayStageInstanceUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#stage-instance-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayStageInstanceUpdateDispatchData = APIStageInstance;
/**
* https://discord.com/developers/docs/topics/gateway#typing-start
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>;
/**
* https://discord.com/developers/docs/topics/gateway#typing-start
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayTypingStartDispatchData {
@@ -1384,18 +1482,21 @@ export interface GatewayTypingStartDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#user-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>;
/**
* https://discord.com/developers/docs/topics/gateway#user-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayUserUpdateDispatchData = APIUser;
/**
* https://discord.com/developers/docs/topics/gateway#voice-state-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayVoiceStateUpdateDispatch = DataPayload<
@@ -1405,12 +1506,14 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#voice-state-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
/**
* https://discord.com/developers/docs/topics/gateway#voice-server-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayVoiceServerUpdateDispatch = DataPayload<
@@ -1420,6 +1523,7 @@ export type GatewayVoiceServerUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#voice-server-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayVoiceServerUpdateDispatchData {
@@ -1443,6 +1547,7 @@ export interface GatewayVoiceServerUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#webhooks-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayWebhooksUpdateDispatch = DataPayload<
@@ -1452,6 +1557,7 @@ export type GatewayWebhooksUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway#webhooks-update
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayWebhooksUpdateDispatchData {
@@ -1471,6 +1577,7 @@ export interface GatewayWebhooksUpdateDispatchData {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayHeartbeat {
@@ -1480,12 +1587,14 @@ export interface GatewayHeartbeat {
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayHeartbeatData = number | null;
/**
* https://discord.com/developers/docs/topics/gateway#identify
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayIdentify {
@@ -1495,6 +1604,7 @@ export interface GatewayIdentify {
/**
* https://discord.com/developers/docs/topics/gateway#identify
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayIdentifyData {
@@ -1543,6 +1653,7 @@ export interface GatewayIdentifyData {
/**
* https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayIdentifyProperties {
@@ -1562,6 +1673,7 @@ export interface GatewayIdentifyProperties {
/**
* https://discord.com/developers/docs/topics/gateway#resume
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayResume {
@@ -1571,6 +1683,7 @@ export interface GatewayResume {
/**
* https://discord.com/developers/docs/topics/gateway#resume
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayResumeData {
@@ -1590,6 +1703,7 @@ export interface GatewayResumeData {
/**
* https://discord.com/developers/docs/topics/gateway#request-guild-members
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayRequestGuildMembers {
@@ -1599,6 +1713,7 @@ export interface GatewayRequestGuildMembers {
/**
* https://discord.com/developers/docs/topics/gateway#request-guild-members
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayRequestGuildMembersData {
@@ -1635,6 +1750,7 @@ export interface GatewayRequestGuildMembersData {
/**
* https://discord.com/developers/docs/topics/gateway#update-voice-state
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayVoiceStateUpdate {
@@ -1644,6 +1760,7 @@ export interface GatewayVoiceStateUpdate {
/**
* https://discord.com/developers/docs/topics/gateway#update-voice-state
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayVoiceStateUpdateData {
@@ -1667,6 +1784,7 @@ export interface GatewayVoiceStateUpdateData {
/**
* https://discord.com/developers/docs/topics/gateway#update-presence
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayUpdatePresence {
@@ -1676,6 +1794,7 @@ export interface GatewayUpdatePresence {
/**
* https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface GatewayPresenceUpdateData {
@@ -1703,6 +1822,7 @@ export interface GatewayPresenceUpdateData {
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
@@ -1729,7 +1849,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};

View File

@@ -32,8 +32,11 @@ import type {
InviteTargetType,
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';
@@ -97,7 +100,7 @@ export enum GatewayCloseCodes {
/**
* We're not sure what went wrong. Try reconnecting?
*/
UnknownError = 4000,
UnknownError = 4_000,
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
@@ -131,7 +134,7 @@ export enum GatewayCloseCodes {
*
* See https://discord.com/developers/docs/topics/gateway-events#resume
*/
InvalidSeq = 4007,
InvalidSeq = 4_007,
/**
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
*/
@@ -179,7 +182,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
@@ -261,32 +268,38 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
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 =
| GatewayHeartbeat
| GatewayIdentify
| GatewayUpdatePresence
| GatewayVoiceStateUpdate
| GatewayRequestGuildMembers
| GatewayResume
| GatewayRequestGuildMembers;
| GatewayUpdatePresence
| GatewayVoiceStateUpdate;
export type GatewayReceivePayload =
| GatewayHello
| GatewayHeartbeatRequest
| GatewayDispatchPayload
| GatewayHeartbeatAck
| GatewayHeartbeatRequest
| GatewayHello
| GatewayInvalidSession
| GatewayReconnect
| GatewayDispatchPayload;
| GatewayReconnect;
export type GatewayDispatchPayload =
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayEntitlementModifyDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayGuildBanModifyDispatch
| GatewayGuildCreateDispatch
| GatewayGuildDeleteDispatch
@@ -300,8 +313,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -320,15 +333,17 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
@@ -438,7 +453,7 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
@@ -453,8 +468,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -664,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.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
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
*/
@@ -949,10 +1013,10 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-member-update
*/
export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> &
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> &
Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> &
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
Required<Pick<APIGuildMember, 'user'>> &
Nullable<Pick<APIGuildMember, 'joined_at'>> & {
Required<Pick<APIGuildMember, 'user'>> & {
/**
* The id of the guild
*/
@@ -967,6 +1031,11 @@ export type GatewayGuildMembersChunkDispatch = DataPayload<
GatewayGuildMembersChunkDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence
*/
export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
*/
@@ -998,7 +1067,7 @@ export interface GatewayGuildMembersChunkDispatchData {
*
* See https://discord.com/developers/docs/topics/gateway-events#update-presence
*/
presences?: RawGatewayPresenceUpdate[];
presences?: GatewayGuildMembersChunkPresence[];
/**
* The nonce used in the Guild Members Request
*
@@ -1292,7 +1361,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#message-create
*/
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
export type GatewayMessageCreateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-update
@@ -1305,8 +1374,8 @@ export type GatewayMessageUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#message-update
*/
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
GatewayMessageEventExtraFields & {
export type GatewayMessageUpdateDispatchData = GatewayMessageEventExtraFields &
Omit<Partial<APIMessage>, 'mentions'> & {
/**
* ID of the message
*/
@@ -1408,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
@@ -1538,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
@@ -1550,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
@@ -1565,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
@@ -1690,6 +1794,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads
@@ -1856,8 +1978,8 @@ export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestG
* https://discord.com/developers/docs/topics/gateway-events#request-guild-members
*/
export type GatewayRequestGuildMembersData =
| GatewayRequestGuildMembersDataWithUserIds
| GatewayRequestGuildMembersDataWithQuery;
| GatewayRequestGuildMembersDataWithQuery
| GatewayRequestGuildMembersDataWithUserIds;
/**
* https://discord.com/developers/docs/topics/gateway-events#update-voice-state
@@ -1926,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
@@ -1950,7 +2072,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -1993,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
>

View File

@@ -5,6 +5,7 @@ export type Snowflake = string;
/**
* https://discord.com/developers/docs/topics/permissions
*
* @internal
*/
export type Permissions = string;
@@ -23,6 +24,7 @@ export const FormattingPatterns = {
* Regular expression for matching a user mention, strictly with a nickname
*
* The `id` group property is present on the `exec` result of this expression
*
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
*/
UserWithNickname: /<@!(?<id>\d{17,20})>/,
@@ -30,6 +32,7 @@ export const FormattingPatterns = {
* Regular expression for matching a user mention, with or without a nickname
*
* The `id` group property is present on the `exec` result of this expression
*
* @deprecated Passing `!` in user mentions is no longer necessary / supported, and future message contents won't have it
*/
UserWithOptionalNickname: /<@!?(?<id>\d{17,20})>/,
@@ -51,6 +54,7 @@ export const FormattingPatterns = {
* The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
*/
SlashCommand:
// eslint-disable-next-line unicorn/no-unsafe-regex
/<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u,
/**
* Regular expression for matching a custom emoji, either static or animated
@@ -75,7 +79,8 @@ export const FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[tTdDfFR]))?>/,
// eslint-disable-next-line prefer-named-capture-group
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
/**
* Regular expression for matching strictly default styled timestamps
*
@@ -87,11 +92,12 @@ export const FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[tTdDfFR])>/,
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
} as const;
/**
* Freezes the formatting patterns
*
* @internal
*/
Object.freeze(FormattingPatterns);

View File

@@ -8,51 +8,279 @@ import type { LocaleString } from '../rest/common.ts';
* replicate them in some way
*/
export const PermissionFlagsBits = {
/**
* Allows creation of instant invites
*
* Applies to channel types: Text, Voice, Stage
*/
CreateInstantInvite: 1n << 0n,
/**
* Allows kicking members
*/
// eslint-disable-next-line sonarjs/no-identical-expressions
KickMembers: 1n << 1n,
/**
* Allows banning members
*/
BanMembers: 1n << 2n,
/**
* Allows all permissions and bypasses channel permission overwrites
*/
Administrator: 1n << 3n,
/**
* Allows management and editing of channels
*
* Applies to channel types: Text, Voice, Stage
*/
ManageChannels: 1n << 4n,
/**
* Allows management and editing of the guild
*/
ManageGuild: 1n << 5n,
/**
* Allows for the addition of reactions to messages
*
* Applies to channel types: Text, Voice, Stage
*/
AddReactions: 1n << 6n,
/**
* Allows for viewing of audit logs
*/
ViewAuditLog: 1n << 7n,
/**
* Allows for using priority speaker in a voice channel
*
* Applies to channel types: Voice
*/
PrioritySpeaker: 1n << 8n,
/**
* Allows the user to go live
*
* Applies to channel types: Voice, Stage
*/
Stream: 1n << 9n,
/**
* Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels
*
* Applies to channel types: Text, Voice, Stage
*/
ViewChannel: 1n << 10n,
/**
* Allows for sending messages in a channel and creating threads in a forum
* (does not allow sending messages in threads)
*
* Applies to channel types: Text, Voice, Stage
*/
SendMessages: 1n << 11n,
/**
* Allows for sending of `/tts` messages
*
* Applies to channel types: Text, Voice, Stage
*/
SendTTSMessages: 1n << 12n,
/**
* Allows for deletion of other users messages
*
* Applies to channel types: Text, Voice, Stage
*/
ManageMessages: 1n << 13n,
/**
* Links sent by users with this permission will be auto-embedded
*
* Applies to channel types: Text, Voice, Stage
*/
EmbedLinks: 1n << 14n,
/**
* Allows for uploading images and files
*
* Applies to channel types: Text, Voice, Stage
*/
AttachFiles: 1n << 15n,
/**
* Allows for reading of message history
*
* Applies to channel types: Text, Voice, Stage
*/
ReadMessageHistory: 1n << 16n,
/**
* Allows for using the `@everyone` tag to notify all users in a channel,
* and the `@here` tag to notify all online users in a channel
*
* Applies to channel types: Text, Voice, Stage
*/
MentionEveryone: 1n << 17n,
/**
* Allows the usage of custom emojis from other servers
*
* Applies to channel types: Text, Voice, Stage
*/
UseExternalEmojis: 1n << 18n,
/**
* Allows for viewing guild insights
*/
ViewGuildInsights: 1n << 19n,
/**
* Allows for joining of a voice channel
*
* Applies to channel types: Voice, Stage
*/
Connect: 1n << 20n,
/**
* Allows for speaking in a voice channel
*
* Applies to channel types: Voice
*/
Speak: 1n << 21n,
/**
* Allows for muting members in a voice channel
*
* Applies to channel types: Voice, Stage
*/
MuteMembers: 1n << 22n,
/**
* Allows for deafening of members in a voice channel
*
* Applies to channel types: Voice
*/
DeafenMembers: 1n << 23n,
/**
* Allows for moving of members between voice channels
*
* Applies to channel types: Voice, Stage
*/
MoveMembers: 1n << 24n,
/**
* Allows for using voice-activity-detection in a voice channel
*
* Applies to channel types: Voice
*/
UseVAD: 1n << 25n,
/**
* Allows for modification of own nickname
*/
ChangeNickname: 1n << 26n,
/**
* Allows for modification of other users nicknames
*/
ManageNicknames: 1n << 27n,
/**
* Allows management and editing of roles
*
* Applies to channel types: Text, Voice, Stage
*/
ManageRoles: 1n << 28n,
/**
* Allows management and editing of webhooks
*
* Applies to channel types: Text, Voice, Stage
*/
ManageWebhooks: 1n << 29n,
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
*
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
*/
ManageEmojisAndStickers: 1n << 30n,
/**
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
*/
ManageGuildExpressions: 1n << 30n,
/**
* Allows members to use application commands, including slash commands and context menu commands
*
* Applies to channel types: Text, Voice, Stage
*/
UseApplicationCommands: 1n << 31n,
/**
* Allows for requesting to speak in stage channels
*
* Applies to channel types: Stage
*/
RequestToSpeak: 1n << 32n,
/**
* Allows for editing and deleting scheduled events created by all users
*
* Applies to channel types: Voice, Stage
*/
ManageEvents: 1n << 33n,
/**
* Allows for deleting and archiving threads, and viewing all private threads
*
* Applies to channel types: Text
*/
ManageThreads: 1n << 34n,
/**
* Allows for creating public and announcement threads
*
* Applies to channel types: Text
*/
CreatePublicThreads: 1n << 35n,
/**
* Allows for creating private threads
*
* Applies to channel types: Text
*/
CreatePrivateThreads: 1n << 36n,
/**
* Allows the usage of custom stickers from other servers
*
* Applies to channel types: Text, Voice, Stage
*/
UseExternalStickers: 1n << 37n,
/**
* Allows for sending messages in threads
*
* Applies to channel types: Text
*/
SendMessagesInThreads: 1n << 38n,
/**
* Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
*
* Applies to channel types: Voice
*/
UseEmbeddedActivities: 1n << 39n,
/**
* Allows for timing out users to prevent them from sending or reacting to messages in chat and threads,
* and from speaking in voice and stage channels
*/
ModerateMembers: 1n << 40n,
/**
* Allows for viewing role subscription insights
*/
ViewCreatorMonetizationAnalytics: 1n << 41n,
/**
* Allows for using soundboard in a voice channel
*
* 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
*
* Applies to channel types: Voice
*/
UseExternalSounds: 1n << 45n,
/**
* Allows sending voice messages
*
* Applies to channel types: Text, Voice, Stage
*/
SendVoiceMessages: 1n << 46n,
} as const;
/**
* Freeze the object of bits, preventing any modifications to it
*
* @internal
*/
Object.freeze(PermissionFlagsBits);
@@ -77,7 +305,7 @@ export interface RESTErrorGroupWrapper {
_errors: RESTErrorData[];
}
export type RESTErrorData = RESTErrorGroupWrapper | RESTErrorFieldInformation | { [k: string]: RESTErrorData } | string;
export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper | string | { [k: string]: RESTErrorData };
/**
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
export type APIApplicationCommandAttachmentOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;

View File

@@ -1,5 +1,5 @@
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
import type { LocalizationMap } from '../../../../../v10.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
type: Type;
@@ -22,6 +22,7 @@ export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
> =
| (Base & {
autocomplete: true;
choices?: [];
})
| (Base & {
autocomplete?: false;

View File

@@ -1,7 +1,7 @@
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
import type { ChannelType } from '../../../channel.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
export type APIApplicationCommandMentionableOption =
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;

View File

@@ -20,7 +20,7 @@ export enum ApplicationCommandOptionType {
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
*/
export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string;
name_localizations?: LocalizationMap | null;
value: ValueType;

View File

@@ -1,6 +1,6 @@
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
export interface APIApplicationCommandSubcommandOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;

View File

@@ -1,3 +1,6 @@
import type { APIInteractionDataResolved } from '../../mod.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
@@ -43,9 +46,6 @@ import type {
APIApplicationCommandUserOption,
} from './_chatInput/user.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
import type { APIInteractionDataResolved } from '../../mod.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
export * from './_chatInput/attachment.ts';
export * from './_chatInput/base.ts';
@@ -65,42 +65,42 @@ export * from './_chatInput/user.ts';
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
*/
export type APIApplicationCommandBasicOption =
| APIApplicationCommandStringOption
| APIApplicationCommandIntegerOption
| APIApplicationCommandAttachmentOption
| APIApplicationCommandBooleanOption
| APIApplicationCommandUserOption
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandIntegerOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;
| APIApplicationCommandRoleOption
| APIApplicationCommandStringOption
| APIApplicationCommandUserOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
*/
export type APIApplicationCommandOption =
| APIApplicationCommandSubcommandOption
| APIApplicationCommandBasicOption
| APIApplicationCommandSubcommandGroupOption
| APIApplicationCommandBasicOption;
| APIApplicationCommandSubcommandOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
*/
export type APIApplicationCommandInteractionDataOption =
| APIApplicationCommandInteractionDataSubcommandOption
| APIApplicationCommandInteractionDataBasicOption
| APIApplicationCommandInteractionDataSubcommandGroupOption
| APIApplicationCommandInteractionDataBasicOption;
| APIApplicationCommandInteractionDataSubcommandOption;
export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataAttachmentOption
| APIApplicationCommandInteractionDataBooleanOption
| APIApplicationCommandInteractionDataUserOption
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataUserOption;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data

View File

@@ -1,8 +1,8 @@
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
import type { Snowflake } from '../../../../globals.ts';
import type { APIMessage } from '../../channel.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
@@ -33,8 +33,8 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
*/
export type APIContextMenuInteractionData =
| APIUserApplicationCommandInteractionData
| APIMessageApplicationCommandInteractionData;
| APIMessageApplicationCommandInteractionData
| APIUserApplicationCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
@@ -74,18 +74,18 @@ export type APIMessageApplicationCommandGuildInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIContextMenuDMInteraction =
| APIUserApplicationCommandDMInteraction
| APIMessageApplicationCommandDMInteraction;
| APIMessageApplicationCommandDMInteraction
| APIUserApplicationCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIContextMenuGuildInteraction =
| APIUserApplicationCommandGuildInteraction
| APIMessageApplicationCommandGuildInteraction;
| APIMessageApplicationCommandGuildInteraction
| APIUserApplicationCommandGuildInteraction;

View File

@@ -53,6 +53,7 @@ export enum ApplicationCommandPermissionType {
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
*/
export const APIApplicationCommandPermissionsConstant = {
Everyone: (guildId: string | bigint): Snowflake => String(guildId),
AllChannels: (guildId: string | bigint): Snowflake => String(BigInt(guildId) - 1n),
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
Everyone: (guildId: bigint | string): Snowflake => String(guildId),
AllChannels: (guildId: bigint | string): Snowflake => String(BigInt(guildId) - 1n),
};

View File

@@ -1,3 +1,5 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { LocalizationMap } from '../../../v10.ts';
import type {
APIApplicationCommandOption,
APIChatInputApplicationCommandDMInteraction,
@@ -13,8 +15,6 @@ import type {
} from './_applicationCommands/contextMenu.ts';
import type { APIBaseInteraction } from './base.ts';
import type { InteractionType } from './responses.ts';
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { LocalizationMap } from '../../../v10.ts';
export * from './_applicationCommands/chatInput.ts';
export * from './_applicationCommands/contextMenu.ts';
@@ -80,6 +80,7 @@ export interface APIApplicationCommand {
* Whether the command is enabled by default when the app is added to a guild
*
* If missing, this property should be assumed as `true`
*
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
*/
default_permission?: boolean;
@@ -115,7 +116,10 @@ export type APIApplicationCommandInteractionData =
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
Required<
Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel_id' | 'data' | 'app_permissions'>
Pick<
APIBaseInteraction<InteractionType.ApplicationCommand, Data>,
'app_permissions' | 'channel_id' | 'channel' | 'data'
>
>;
/**

View File

@@ -1,21 +1,30 @@
import type { InteractionType } from './responses.ts';
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v10.ts';
import type { APIAttachment, 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';
export type PartialAPIMessageInteractionGuildMember = Pick<
APIGuildMember,
| 'roles'
| 'premium_since'
| 'pending'
| 'nick'
| 'mute'
| 'joined_at'
| 'deaf'
| 'communication_disabled_until'
| 'avatar'
| 'communication_disabled_until'
| 'deaf'
| 'joined_at'
| 'mute'
| 'nick'
| 'pending'
| 'premium_since'
| 'roles'
>;
/**
@@ -81,6 +90,12 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* The channel it was sent from
*/
channel?: Partial<APIChannel> & Pick<APIChannel, 'id' | 'type'>;
/**
* The id of the channel it was sent from
*
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
*/
channel_id?: Snowflake;
/**
* Guild member data for the invoking user, including permissions
@@ -116,11 +131,15 @@ 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<
Original,
'member' | 'guild_id'
'guild_id' | 'member'
> &
Required<Pick<Original, 'user'>>;
@@ -128,21 +147,25 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
Original,
'user'
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
Required<Pick<Original, 'guild_id' | 'member'>>;
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, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
@@ -165,8 +188,8 @@ export type APIChatInputApplicationCommandInteractionDataResolved = APIInteracti
/**
* `users` and optional `members` from APIInteractionDataResolved, for user commands and user selects
*/
export type APIUserInteractionDataResolved = Required<Pick<APIInteractionDataResolved, 'users'>> &
Pick<APIInteractionDataResolved, 'members'>;
export type APIUserInteractionDataResolved = Pick<APIInteractionDataResolved, 'members'> &
Required<Pick<APIInteractionDataResolved, 'users'>>;
/**
* @deprecated Renamed to `APIUserInteractionDataResolved`

View File

@@ -1,12 +1,12 @@
import type { Snowflake } from '../../../globals.ts';
import type { ComponentType } from '../channel.ts';
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
import type {
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
APIInteractionDataResolved,
APIUserInteractionDataResolved,
} from './base.ts';
import type { Snowflake } from '../../../globals.ts';
import type { ComponentType } from '../channel.ts';
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
export type APIMessageComponentInteraction = APIBaseInteraction<
InteractionType.MessageComponent,
@@ -15,7 +15,7 @@ export type APIMessageComponentInteraction = APIBaseInteraction<
Required<
Pick<
APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>,
'channel_id' | 'data' | 'app_permissions' | 'message'
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
>
>;
@@ -26,7 +26,7 @@ export type APIMessageComponentButtonInteraction = APIBaseInteraction<
Required<
Pick<
APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>,
'channel_id' | 'data' | 'app_permissions' | 'message'
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
>
>;
@@ -37,7 +37,7 @@ export type APIMessageComponentSelectMenuInteraction = APIBaseInteraction<
Required<
Pick<
APIBaseInteraction<InteractionType.MessageComponent, APIMessageSelectMenuInteractionData>,
'channel_id' | 'data' | 'app_permissions' | 'message'
'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'
>
>;
@@ -76,7 +76,7 @@ export interface APIMessageRoleSelectInteractionData
export interface APIMessageMentionableSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
values: Snowflake[];
resolved: Pick<APIInteractionDataResolved, 'users' | 'members' | 'roles'>;
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
}
export interface APIMessageChannelSelectInteractionData
@@ -86,11 +86,11 @@ export interface APIMessageChannelSelectInteractionData
}
export type APIMessageSelectMenuInteractionData =
| APIMessageStringSelectInteractionData
| APIMessageUserSelectInteractionData
| APIMessageRoleSelectInteractionData
| APIMessageChannelSelectInteractionData
| APIMessageMentionableSelectInteractionData
| APIMessageChannelSelectInteractionData;
| APIMessageRoleSelectInteractionData
| APIMessageStringSelectInteractionData
| APIMessageUserSelectInteractionData;
export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;

View File

@@ -1,7 +1,7 @@
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { MessageFlags } from '../mod.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
@@ -18,13 +18,14 @@ export enum InteractionType {
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
*/
export type APIInteractionResponse =
| APIInteractionResponsePong
| APIApplicationCommandAutocompleteResponse
| APIInteractionResponseChannelMessageWithSource
| APIInteractionResponseDeferredChannelMessageWithSource
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponsePong
| 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,
}
/**
@@ -98,7 +107,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export interface APICommandAutocompleteInteractionResponseCallbackData {

View File

@@ -2,11 +2,12 @@
* Types extracted from https://discord.com/developers/docs/resources/application
*/
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';
import type { Permissions, Snowflake } from '../../globals.ts';
import type { LocalizationMap } from '../common.ts';
/**
* https://discord.com/developers/docs/resources/application#application-object
@@ -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 {
@@ -123,19 +144,27 @@ export interface APIApplicationInstallParams {
*/
export enum ApplicationFlags {
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedReleased = 1 << 1,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ManagedEmoji = 1 << 2,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedIAP = 1 << 3,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
GroupDMCreate = 1 << 4,
/**
* @unstable
* Indicates if an app uses the Auto Moderation API
*/
ApplicationAutoModerationRuleCreateBadge = 1 << 6,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
RPCHasConnected = 1 << 11,
/**
@@ -174,7 +203,7 @@ export enum ApplicationFlags {
*/
GatewayMessageContentLimited = 1 << 19,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedFirstParty = 1 << 20,
/**
@@ -192,11 +221,11 @@ export interface APIApplicationRoleConnectionMetadata {
*/
type: ApplicationRoleConnectionMetadataType;
/**
* Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; max 50 characters)
* Dictionary key for the metadata field (must be `a-z`, `0-9`, or `_` characters; 1-50 characters)
*/
key: string;
/**
* Name of the metadata field (max 100 characters)
* Name of the metadata field (1-100 characters)
*/
name: string;
/**
@@ -204,7 +233,7 @@ export interface APIApplicationRoleConnectionMetadata {
*/
name_localizations?: LocalizationMap;
/**
* Description of the metadata field (max 200 characters)
* Description of the metadata field (1-200 characters)
*/
description: string;
/**

View File

@@ -2,6 +2,7 @@
* Types extracted from https://discord.com/developers/docs/resources/audit-log
*/
import type { Snowflake } from '../../globals.ts';
import type {
APIAutoModerationAction,
APIAutoModerationRule,
@@ -12,9 +13,11 @@ import type {
import type { APIChannel, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
IntegrationExpireBehavior,
} from './guild.ts';
@@ -29,7 +32,6 @@ import type { StageInstancePrivacyLevel } from './stageInstance.ts';
import type { StickerFormatType } from './sticker.ts';
import type { APIUser } from './user.ts';
import type { APIWebhook } from './webhook.ts';
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
@@ -200,6 +202,9 @@ export enum AuditLogEvent {
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
}
/**
@@ -309,6 +314,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 {
@@ -322,82 +336,83 @@ export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
*/
export type APIAuditLogChange =
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeyImageHash
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyOwnerId
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyPreferredLocale
| APIAuditLogChangeKeyAFKChannelId
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeyPublicUpdatesChannelId
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKey$Add
| APIAuditLogChangeKey$Remove
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyWidgetEnabled
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeySystemChannelId
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyApplicationId
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyActions
| APIAuditLogChangeKeyAFKChannelId
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyAllow
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyInviterId
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyApplicationId
| APIAuditLogChangeKeyArchived
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyCommunicationDisabledUntil
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
| APIAuditLogChangeKeyEventType
| APIAuditLogChangeKeyExemptChannels
| APIAuditLogChangeKeyExemptRoles
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyArchived
| APIAuditLogChangeKeyLocked
| APIAuditLogChangeKeyAutoArchiveDuration
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyEntityType
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyImageHash
| APIAuditLogChangeKeyInviterId
| APIAuditLogChangeKeyLocation
| APIAuditLogChangeKeyCommunicationDisabledUntil
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyEventType
| APIAuditLogChangeKeyLocked
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyOwnerId
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyPreferredLocale
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyPublicUpdatesChannelId
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelFlags
| APIAuditLogChangeKeySystemChannelId
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyTriggerMetadata
| APIAuditLogChangeKeyActions
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyExemptRoles
| APIAuditLogChangeKeyExemptChannels;
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
/**
* Returned when an entity's name is changed
@@ -469,6 +484,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
*/
@@ -525,6 +545,14 @@ export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabl
*/
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
/**
* Returned when a guild's system_channel_flags is changed
*/
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
'system_channel_flags',
GuildSystemChannelFlags
>;
/**
* Returned when a guild's system_channel_id is changed
*/
@@ -717,22 +745,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<

View File

@@ -59,7 +59,7 @@ export interface APIAutoModerationRule {
*/
export enum AutoModerationRuleTriggerType {
/**
* Check if content contains words from a user defined list of keywords (Maximum of 3 per guild)
* Check if content contains words from a user defined list of keywords (Maximum of 6 per guild)
*/
Keyword = 1,
/**
@@ -83,7 +83,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
/**
* Substrings which will be searched for in content (Maximum of 1000)
*
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 30 characters or less
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
@@ -98,7 +98,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
/**
* Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
*
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 30 characters or less
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
@@ -107,7 +107,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
/**
* Regular expression patterns which will be matched against content (Maximum of 10)
*
* Only Rust flavored regex is currently supported (Maximum of 75 characters)
* Only Rust flavored regex is currently supported (Maximum of 260 characters)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
*/
@@ -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;
}
/**
@@ -169,7 +175,8 @@ export interface APIAutoModerationAction {
*/
export enum AutoModerationActionType {
/**
* Blocks the content of a message according to the rule
* Blocks a member's message and prevents it from being posted.
* A custom explanation can be specified and shown to members whenever their message is blocked
*/
BlockMessage = 1,
/**
@@ -200,4 +207,10 @@ export interface APIAutoModerationActionMetadata {
* Associated action type: {@link AutoModerationActionType.Timeout}
*/
duration_seconds?: number;
/**
* Additional explanation that will be shown to members whenever their message is blocked (Maximum 150 characters)
*
* Associated action type {@link AutoModerationActionType.BlockMessage}
*/
custom_message?: string;
}

View File

@@ -2,13 +2,14 @@
* Types extracted from https://discord.com/developers/docs/resources/channel
*/
import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication } from './application.ts';
import type { APIPartialEmoji } from './emoji.ts';
import type { APIMessageInteraction } from './interactions.ts';
import type { APIGuildMember } from './guild.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';
import type { Permissions, Snowflake } from '../../globals.ts';
/**
* Not documented, but partial only includes id, name, and type
@@ -40,15 +41,15 @@ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel
}
export type TextChannelType =
| ChannelType.AnnouncementThread
| ChannelType.DM
| ChannelType.GroupDM
| ChannelType.GuildAnnouncement
| ChannelType.PublicThread
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildStageVoice
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice;
| ChannelType.GuildVoice
| ChannelType.PrivateThread
| ChannelType.PublicThread;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -109,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 ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -122,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;
}
@@ -131,13 +132,15 @@ export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildAnnouncement>;
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T> {
export interface APIVoiceChannelBase<T extends ChannelType>
extends APIGuildChannel<T>,
Omit<APITextBasedChannel<T>, 'last_pin_timestamp' | 'name'> {
/**
* The bitrate (in bits) of the voice channel
* The bitrate (in bits) of the voice or stage channel
*/
bitrate?: number;
/**
* The user limit of the voice channel
* The user limit of the voice or stage channel
*/
user_limit?: number;
/**
@@ -146,19 +149,16 @@ export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChan
* See https://discord.com/developers/docs/resources/voice#voice-region-object
*/
rtc_region?: string | null;
}
export interface APIGuildVoiceChannel
extends APIVoiceChannelBase<ChannelType.GuildVoice>,
Omit<APITextBasedChannel<ChannelType.GuildVoice>, 'name' | 'last_pin_timestamp'> {
/**
* The camera video quality mode of the voice channel, `1` when not present
* The camera video quality mode of the voice or stage channel, `1` when not present
*
* See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
*/
video_quality_mode?: VideoQualityMode;
}
export type APIGuildVoiceChannel = APIVoiceChannelBase<ChannelType.GuildVoice>;
export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
@@ -198,14 +198,17 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
* The id of the last message sent in this channel (may not point to an existing or valid message)
*/
last_message_id?: Snowflake | null;
/**
* Whether the channel is managed by an OAuth2 application
*/
managed?: boolean;
}
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
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
*/
@@ -235,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[];
}
@@ -312,38 +315,74 @@ 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
*/
export type APIChannel =
| APIGroupDMChannel
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildVoiceChannel
| APIGuildStageVoiceChannel
| APIGroupDMChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel
| APIGuildStageVoiceChannel
| APIGuildVoiceChannel
| APINewsChannel
| APITextChannel
| APIThreadChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -405,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 //
@@ -421,6 +466,7 @@ export enum ChannelType {
*
* @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
*/
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
GuildNewsThread = 10,
/**
* A temporary sub-channel within a Guild Text channel
@@ -561,7 +607,7 @@ export interface APIMessage {
* **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE`
* event to ensure it got sent**
*/
nonce?: string | number;
nonce?: number | string;
/**
* Whether this message is pinned
*/
@@ -649,6 +695,7 @@ export interface APIMessage {
* The stickers sent with the message
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
*
* @deprecated Use `sticker_items` instead
*/
stickers?: APISticker[];
@@ -658,6 +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;
}
/**
@@ -677,6 +734,7 @@ export enum MessageType {
GuildBoostTier2,
GuildBoostTier3,
ChannelFollowAdd,
GuildDiscoveryDisqualified = 14,
GuildDiscoveryRequalified,
GuildDiscoveryGracePeriodInitialWarning,
@@ -688,6 +746,17 @@ export enum MessageType {
GuildInviteReminder,
ContextMenuCommand,
AutoModerationAction,
RoleSubscriptionPurchase,
InteractionPremiumUpsell,
StageStart,
StageEnd,
StageSpeaker,
/**
* @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
*/
StageRaiseHand,
StageTopic,
GuildApplicationPremiumSubscription,
}
/**
@@ -776,6 +845,40 @@ export enum MessageFlags {
* This message failed to mention some roles and add their members to the thread
*/
FailedToMentionSomeRolesInThread = 1 << 8,
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ShouldShowLinkNotDiscordWarning = 1 << 10,
/**
* This message will not trigger push and desktop notifications
*/
SuppressNotifications = 1 << 12,
/**
* This message is a voice message
*/
IsVoiceMessage = 1 << 13,
}
/**
* https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
*/
export interface APIMessageRoleSubscriptionData {
/**
* The id of the SKU and listing the user is subscribed to
*/
role_subscription_listing_id: Snowflake;
/**
* The name of the tier the user is subscribed to
*/
tier_name: string;
/**
* The number of months the user has been subscribed for
*/
total_months_subscribed: number;
/**
* Whether this notification is for a renewal
*/
is_renewal: boolean;
}
/**
@@ -797,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;
}
/**
@@ -881,9 +1010,9 @@ export interface APIThreadMetadata {
export enum ThreadAutoArchiveDuration {
OneHour = 60,
OneDay = 1440,
ThreeDays = 4320,
OneWeek = 10080,
OneDay = 1_440,
ThreeDays = 4_320,
OneWeek = 10_080,
}
/**
@@ -912,9 +1041,34 @@ export interface APIThreadMember {
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: ThreadMemberFlags;
/**
* Additional information about the user
*
* **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event**
*
* **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`**
*/
member?: APIGuildMember;
}
export enum ThreadMemberFlags {}
export enum ThreadMemberFlags {
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
HasInteracted = 1 << 0,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AllMessages = 1 << 1,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
OnlyMentions = 1 << 2,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
NoMessages = 1 << 3,
}
export interface APIThreadList {
/**
@@ -1013,6 +1167,7 @@ export interface APIEmbed {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
*
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
*/
export enum EmbedType {
@@ -1240,6 +1395,28 @@ export interface APIAttachment {
* Whether this attachment is ephemeral
*/
ephemeral?: boolean;
/**
* The duration of the audio file (currently for voice messages)
*/
duration_secs?: number;
/**
* 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,
}
/**
@@ -1417,7 +1594,7 @@ export interface APIMessageComponentEmoji {
export interface APIButtonComponentWithCustomId
extends APIButtonComponentBase<
ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success | ButtonStyle.Danger
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
/**
* The custom_id to be sent in the interaction when clicked
@@ -1458,11 +1635,11 @@ export enum TextInputStyle {
*/
export interface APIBaseSelectMenuComponent<
T extends
| ComponentType.StringSelect
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
| ComponentType.RoleSelect
| ComponentType.StringSelect
| ComponentType.UserSelect,
> extends APIBaseComponent<T> {
/**
* A developer-defined identifier for the select menu, max 100 characters
@@ -1492,6 +1669,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.RoleSelect
| ComponentType.UserSelect,
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
*/
@@ -1505,44 +1696,77 @@ 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.Role | SelectMenuDefaultValueType.User
>;
/**
* 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
*/
export type APISelectMenuComponent =
| APIStringSelectComponent
| APIUserSelectComponent
| APIRoleSelectComponent
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIChannelSelectComponent;
| APIRoleSelectComponent
| APIStringSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
*/
export interface APISelectMenuOption {
/**
* The user-facing name of the option (max 25 chars)
* The user-facing name of the option (max 100 chars)
*/
label: string;
/**
@@ -1550,7 +1774,7 @@ export interface APISelectMenuOption {
*/
value: string;
/**
* An additional description of the option (max 50 chars)
* An additional description of the option (max 100 chars)
*/
description?: string;
/**
@@ -1576,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;
/**
@@ -1605,22 +1829,50 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
*/
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.
*/
GuildFeedRemoved = 1 << 0,
/**
* This thread is pinned to the top of its parent forum channel
*/
Pinned = 1 << 1,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ActiveChannelsRemoved = 1 << 2,
/**
* Whether a tag is required to be specified when creating a thread in a forum channel.
* Tags are specified in the `applied_tags` field
*/
RequireTag = 1 << 4,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsSpam = 1 << 5,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsGuildResourceChannel = 1 << 7,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ClydeAI = 1 << 8,
/**
* @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,
}
/**
* https://discord.com/developers/docs/interactions/message-components#message-components
*/
export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
export type APIMessageComponent = APIActionRowComponent<APIMessageActionRowComponent> | APIMessageActionRowComponent;
export type APIModalComponent = APIActionRowComponent<APIModalActionRowComponent> | APIModalActionRowComponent;
export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;

View File

@@ -2,9 +2,9 @@
* Types extracted from https://discord.com/developers/docs/resources/emoji
*/
import type { Snowflake } from '../../globals.ts';
import type { APIRole } from './permissions.ts';
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
/**
* Not documented but mentioned

View File

@@ -4,10 +4,10 @@
* - https://discord.com/developers/docs/topics/gateway-events
*/
import type { Snowflake } from '../../globals.ts';
import type { APIChannel, APIThreadMember } from './channel.ts';
import type { APIEmoji } from './emoji.ts';
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
@@ -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;
}
/**
@@ -129,6 +134,7 @@ export interface GatewayPresenceClientStatus {
export interface GatewayActivity {
/**
* The activity's id
*
* @unstable
*/
id: string;
@@ -156,11 +162,13 @@ export interface GatewayActivity {
timestamps?: GatewayActivityTimestamps;
/**
* The Spotify song id
*
* @unstable
*/
sync_id?: string;
/**
* The platform this activity is being done on
*
* @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate
*/
platform?: string;
@@ -173,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;
/**
@@ -219,7 +227,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -258,7 +266,7 @@ export enum ActivityType {
*/
Watching,
/**
* {emoji} {details}
* {emoji} {state}
*/
Custom,
/**
@@ -284,7 +292,7 @@ export interface GatewayActivityTimestamps {
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
*/
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
@@ -310,7 +318,7 @@ export type GatewayActivityAssets = Partial<
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags

View File

@@ -2,13 +2,13 @@
* Types extracted from https://discord.com/developers/docs/resources/guild
*/
import type { APIEmoji } from './emoji.ts';
import type { PresenceUpdateStatus } from './gateway.ts';
import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIEmoji, APIPartialEmoji } from './emoji.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';
import type { APIUser } from './user.ts';
import type { Permissions, Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
@@ -110,6 +110,7 @@ export interface APIGuild extends APIPartialGuild {
* Voice region id for the guild
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
*
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
*/
region: string;
@@ -120,7 +121,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
*/
afk_timeout: 60 | 300 | 900 | 1800 | 3600;
afk_timeout: 1_800 | 3_600 | 60 | 300 | 900;
/**
* `true` if the guild widget is enabled
*/
@@ -236,11 +237,17 @@ export interface APIGuild extends APIPartialGuild {
*/
max_video_channel_users?: number;
/**
* **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
* The maximum amount of users in a stage video channel
*/
max_stage_video_channel_users?: number;
/**
* Approximate number of members in this guild,
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_member_count?: number;
/**
* **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
* Approximate number of non-offline members in this guild,
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
*/
approximate_presence_count?: number;
/**
@@ -269,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;
}
/**
@@ -368,6 +379,14 @@ export enum GuildSystemChannelFlags {
* Hide member join sticker reply buttons
*/
SuppressJoinNotificationReplies = 1 << 3,
/**
* Suppress role subscription purchase and renewal notifications
*/
SuppressRoleSubscriptionPurchaseNotifications = 1 << 4,
/**
* Hide role subscription sticker reply buttons
*/
SuppressRoleSubscriptionPurchaseNotificationReplies = 1 << 5,
}
/**
@@ -400,7 +419,15 @@ export enum GuildFeature {
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
*/
Community = 'COMMUNITY',
/*
/**
* Guild has enabled monetization
*/
CreatorMonetizableProvisional = 'CREATOR_MONETIZABLE_PROVISIONAL',
/**
* 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',
@@ -446,6 +473,8 @@ export enum GuildFeature {
MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED',
/**
* Guild has enabled monetization
*
* @unstable This feature is no longer documented by Discord
*/
MonetizationEnabled = 'MONETIZATION_ENABLED',
/**
@@ -468,11 +497,23 @@ 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
*/
RoleIcons = 'ROLE_ICONS',
/**
* Guild has role subscriptions that can be purchased
*/
RoleSubscriptionsAvailableForPurchase = 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE',
/**
* Guild has enabled role subscriptions
*/
RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED',
/**
* Guild has enabled ticketed events
*/
@@ -613,10 +654,14 @@ export interface APIGuildMember {
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
* *If this field is not present, it can be assumed as `false`.*
* @remarks If this field is not present, it can be assumed as `false`.
*/
pending?: boolean;
/**
@@ -625,6 +670,44 @@ export interface APIGuildMember {
communication_disabled_until?: string | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
*/
export enum GuildMemberFlags {
/**
* Member has left and rejoined the guild
*/
DidRejoin = 1 << 0,
/**
* Member has completed onboarding
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedBio = 1 << 8,
}
/**
* https://discord.com/developers/docs/resources/guild#integration-object
*/
@@ -644,7 +727,7 @@ export interface APIGuildIntegration {
/**
* Is this integration enabled
*/
enabled?: boolean;
enabled: boolean;
/**
* Is this integration syncing
*
@@ -680,7 +763,7 @@ export interface APIGuildIntegration {
/**
* User for this integration
*
* **This field is not provided for `discord` bot integrations.**
* **Some older integrations may not have an attached user.**
*
* See https://discord.com/developers/docs/resources/user#user-object
*/
@@ -723,7 +806,7 @@ export interface APIGuildIntegration {
scopes?: OAuth2Scopes[];
}
export type APIGuildIntegrationType = 'twitch' | 'youtube' | 'discord';
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
@@ -820,7 +903,7 @@ export interface APIGuildWidgetMember {
username: string;
discriminator: string;
avatar: string | null;
status: PresenceUpdateStatus;
status: PresenceUpdateReceiveStatus;
activity?: { name: string };
avatar_url: string;
}
@@ -924,3 +1007,116 @@ export enum MembershipScreeningFieldType {
*/
Terms = 'TERMS',
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
*/
export interface APIGuildOnboarding {
/**
* Id of the guild this onboarding is part of
*/
guild_id: Snowflake;
/**
* Prompts shown during onboarding and in customize community
*/
prompts: APIGuildOnboardingPrompt[];
/**
* Channel ids that members get opted into automatically
*/
default_channel_ids: Snowflake[];
/**
* Whether onboarding is enabled in the guild
*/
enabled: boolean;
/**
* Current mode of onboarding
*/
mode: GuildOnboardingMode;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
*/
export interface APIGuildOnboardingPrompt {
/**
* Id of the prompt
*/
id: Snowflake;
/**
* Options available within the prompt
*/
options: APIGuildOnboardingPromptOption[];
/**
* Title of the prompt
*/
title: string;
/**
* Indicates whether users are limited to selecting one option for the prompt
*/
single_select: boolean;
/**
* Indicates whether the prompt is required before a user completes the onboarding flow
*/
required: boolean;
/**
* Indicates whether the prompt is present in the onboarding flow.
* If `false`, the prompt will only appear in the Channels & Roles tab
*/
in_onboarding: boolean;
/**
* Type of prompt
*/
type: GuildOnboardingPromptType;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
*/
export interface APIGuildOnboardingPromptOption {
/**
* Id of the prompt option
*/
id: Snowflake;
/**
* Ids for channels a member is added to when the option is selected
*/
channel_ids: Snowflake[];
/**
* Ids for roles assigned to a member when the option is selected
*/
role_ids: Snowflake[];
/**
* Emoji of the option
*/
emoji: APIPartialEmoji;
/**
* Title of the option
*/
title: string;
/**
* Description of the option
*/
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
*/
export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
/**
@@ -90,9 +90,9 @@ export interface APIExternalGuildScheduledEvent
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
*/
export type APIGuildScheduledEvent =
| APIExternalGuildScheduledEvent
| APIStageInstanceGuildScheduledEvent
| APIVoiceGuildScheduledEvent
| APIExternalGuildScheduledEvent;
| APIVoiceGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata

View File

@@ -32,26 +32,26 @@ export * from './_interactions/responses.ts';
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIInteraction =
| APIPingInteraction
| APIApplicationCommandAutocompleteInteraction
| APIApplicationCommandInteraction
| APIMessageComponentInteraction
| APIApplicationCommandAutocompleteInteraction
| APIModalSubmitInteraction;
| APIModalSubmitInteraction
| APIPingInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIDMInteraction =
| APIApplicationCommandAutocompleteDMInteraction
| APIApplicationCommandDMInteraction
| APIMessageComponentDMInteraction
| APIApplicationCommandAutocompleteDMInteraction
| APIModalSubmitDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*/
export type APIGuildInteraction =
| APIApplicationCommandAutocompleteGuildInteraction
| APIApplicationCommandGuildInteraction
| APIMessageComponentGuildInteraction
| APIApplicationCommandAutocompleteGuildInteraction
| APIModalSubmitGuildInteraction;

View File

@@ -11,17 +11,17 @@ import type { APIUser } from './user.ts';
export type APIInviteGuild = Pick<
APIGuild,
| 'id'
| 'name'
| 'splash'
| 'banner'
| 'icon'
| 'vanity_url_code'
| 'description'
| 'features'
| 'verification_level'
| 'icon'
| 'id'
| 'name'
| 'nsfw_level'
| 'premium_subscription_count'
| 'splash'
| 'vanity_url_code'
| 'verification_level'
>;
/**
@@ -82,6 +82,7 @@ export interface APIInvite {
expires_at?: string | null;
/**
* The stage instance data if there is a public stage instance in the stage channel this invite is for
*
* @deprecated
*/
stage_instance?: APIInviteStageInstance;

View File

@@ -18,3 +18,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';

View 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,
}

View File

@@ -54,6 +54,10 @@ export interface APIRole {
* The tags this role has
*/
tags?: APIRoleTags;
/**
* Role flags
*/
flags: RoleFlags;
}
/**
@@ -72,4 +76,26 @@ export interface APIRoleTags {
* The id of the integration this role belongs to
*/
integration_id?: Snowflake;
/**
* The id of this role's subscription sku and listing
*/
subscription_listing_id?: Snowflake;
/**
* Whether this role is available for purchase
*/
available_for_purchase?: null;
/**
* Whether this role is a guild's linked role
*/
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,
}

View File

@@ -1,5 +1,5 @@
import type { APIGuildMember } from './guild.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
@@ -29,6 +29,7 @@ export interface APIStageInstance {
privacy_level: StageInstancePrivacyLevel;
/**
* Whether or not stage discovery is disabled
*
* @deprecated
*/
discoverable_disabled: boolean;

View File

@@ -2,8 +2,8 @@
* Types extracted from https://discord.com/developers/docs/resources/sticker
*/
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object
@@ -31,6 +31,7 @@ export interface APISticker {
tags: string;
/**
* Previously the sticker asset hash, now an empty string
*
* @deprecated
*/
asset?: '';
@@ -69,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,
/**
@@ -85,12 +86,13 @@ export enum StickerFormatType {
PNG = 1,
APNG,
Lottie,
GIF,
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
*/
export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>;
/**
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object

View File

@@ -2,8 +2,8 @@
* Types extracted from https://discord.com/developers/docs/topics/teams
*/
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-object
@@ -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',
}

View File

@@ -2,9 +2,9 @@
* Types extracted from https://discord.com/developers/docs/resources/guild-template
*/
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/mod.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild-template#guild-template-object

View File

@@ -2,8 +2,8 @@
* Types extracted from https://discord.com/developers/docs/resources/user
*/
import type { APIGuildIntegration } from './guild.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIGuildIntegration } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/user#user-object
@@ -18,9 +18,13 @@ export interface APIUser {
*/
username: string;
/**
* The user's 4-digit discord-tag
* The user's Discord-tag
*/
discriminator: string;
/**
* The user's display name, if it is set. For bots, this is the application name
*/
global_name: string | null;
/**
* The user's avatar hash
*
@@ -79,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;
}
/**
@@ -101,6 +111,14 @@ export enum UserFlags {
* Bug Hunter Level 1
*/
BugHunterLevel1 = 1 << 3,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
MFASMS = 1 << 4,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
PremiumPromoDismissed = 1 << 5,
/**
* House Bravery Member
*/
@@ -121,6 +139,10 @@ export enum UserFlags {
* User is a [team](https://discord.com/developers/docs/topics/teams)
*/
TeamPseudoUser = 1 << 10,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
HasUnreadUrgentMessages = 1 << 13,
/**
* Bug Hunter Level 2
*/
@@ -147,6 +169,10 @@ export enum UserFlags {
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
Spammer = 1 << 20,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
DisablePremium = 1 << 21,
/**
* User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
*/
@@ -155,12 +181,25 @@ export enum UserFlags {
* User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
*
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*
* @privateRemarks
*
* This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
*/
Quarantined = 17592186044416,
Quarantined = 17_592_186_044_416,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
*/
Collaborator = 1_125_899_906_842_624,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
*/
RestrictedCollaborator = 2_251_799_813_685_248,
}
/**
@@ -231,6 +270,7 @@ export enum ConnectionService {
EpicGames = 'epicgames',
Facebook = 'facebook',
GitHub = 'github',
Instagram = 'instagram',
LeagueOfLegends = 'leagueoflegends',
PayPal = 'paypal',
PlayStationNetwork = 'playstation',
@@ -239,8 +279,13 @@ export enum ConnectionService {
Spotify = 'spotify',
Skype = 'skype',
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',
}
@@ -271,5 +316,5 @@ export interface APIApplicationRoleConnection {
/**
* Object mapping application role connection metadata keys to their `string`-ified value (max 100 characters) for the user on the platform a bot has connected
*/
metadata: Record<string, string | number>;
metadata: Record<string, number | string>;
}

View File

@@ -2,8 +2,8 @@
* Types extracted from https://discord.com/developers/docs/resources/voice
*/
import type { APIGuildMember } from './guild.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object

View File

@@ -2,8 +2,8 @@
* Types extracted from https://discord.com/developers/docs/resources/webhook
*/
import type { APIPartialChannel, APIPartialGuild, APIUser } from './mod.ts';
import type { Snowflake } from '../../globals.ts';
import type { APIPartialChannel, APIPartialGuild, APIUser } from './mod.ts';
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object

View File

@@ -17,6 +17,7 @@ import type { APIWebhook } from './webhook.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLog {
@@ -28,6 +29,7 @@ export interface APIAuditLog {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogEntry {
@@ -42,6 +44,7 @@ export interface APIAuditLogEntry {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum AuditLogEvent {
@@ -92,6 +95,7 @@ export enum AuditLogEvent {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogOptions {
@@ -168,116 +172,127 @@ export enum AuditLogOptionsType {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChange =
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyOwnerID
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyAFKChannelID
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKey$Add
| APIAuditLogChangeKey$Remove
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyWidgetEnabled
| APIAuditLogChangeKeyWidgetChannelID
| APIAuditLogChangeKeySystemChannelID
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyApplicationID
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyPermissionsNew
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyAFKChannelID
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyAllow
| APIAuditLogChangeKeyAllowNew
| APIAuditLogChangeKeyApplicationID
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyChannelID
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDenyNew
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyChannelID
| APIAuditLogChangeKeyInviterID
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyID
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod;
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeyID
| APIAuditLogChangeKeyInviterID
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyOwnerID
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyPermissionsNew
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeySystemChannelID
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyWidgetChannelID
| APIAuditLogChangeKeyWidgetEnabled;
/**
* Returned when a guild's name is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
/**
* Returned when a guild's icon is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's splash is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's owner ID is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', string>;
/**
* Returned when a guild's region is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
/**
* Returned when a guild's afk_channel_id is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyAFKChannelID = AuditLogChangeData<'afk_channel_id', string>;
/**
* Returned when a guild's afk_timeout is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's mfa_level is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a guild's explicit_content_filter is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
@@ -287,6 +302,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
/**
* Returned when a guild's default_message_notifications is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
@@ -296,78 +312,91 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
/**
* Returned when a guild's vanity_url_code is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when new role(s) are added
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
/**
* Returned when role(s) are removed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyWidgetChannelID = AuditLogChangeData<'widget_channel_id', string>;
/**
* Returned when a guild's system_channel_id is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeySystemChannelID = AuditLogChangeData<'system_channel_id', string>;
/**
* Returned when a channel's position is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyApplicationID = AuditLogChangeData<'application_id', string>;
@@ -375,12 +404,14 @@ export type APIAuditLogChangeKeyApplicationID = AuditLogChangeData<'application_
/**
* Returned when a channel's amount of seconds a user has to wait before sending another message
* is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a permission bitfield is changed
*
* @deprecated Use `permissions_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
@@ -388,30 +419,35 @@ export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions',
/**
* Returned when a permission bitfield is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyPermissionsNew = AuditLogChangeData<'permissions_new', string>;
/**
* Returned when a role's color is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
/**
* Returned when a role's hoist status is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*
* @deprecated Use `allow_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
@@ -419,12 +455,14 @@ export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', number>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyAllowNew = AuditLogChangeData<'allow_new', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*
* @deprecated Use `deny_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
@@ -432,78 +470,91 @@ export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', number>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyDenyNew = AuditLogChangeData<'deny_new', string>;
/**
* Returned when an invite's code is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
/**
* Returned when an invite's channel_id is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyChannelID = AuditLogChangeData<'channel_id', string>;
/**
* Returned when an invite's inviter_id is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyInviterID = AuditLogChangeData<'inviter_id', string>;
/**
* Returned when an invite's max_uses is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's avatar_hash is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogChangeKeyID {
@@ -514,24 +565,28 @@ export interface APIAuditLogChangeKeyID {
/**
* The type of entity created
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', ChannelType | string>;
/**
* Returned when an integration's enable_emoticons is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;

View File

@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
/**
* Not documented, but partial only includes id, name, and type
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIPartialChannel {
@@ -18,6 +19,7 @@ export interface APIPartialChannel {
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIChannel extends APIPartialChannel {
@@ -41,6 +43,7 @@ export interface APIChannel extends APIPartialChannel {
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum ChannelType {
@@ -55,6 +58,7 @@ export enum ChannelType {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessage {
@@ -74,7 +78,7 @@ export interface APIMessage {
attachments: APIAttachment[];
embeds: APIEmbed[];
reactions?: APIReaction[];
nonce?: string | number;
nonce?: number | string;
pinned: boolean;
webhook_id?: string;
type: MessageType;
@@ -87,6 +91,7 @@ export interface APIMessage {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum MessageType {
@@ -111,6 +116,7 @@ export enum MessageType {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageActivity {
@@ -120,6 +126,7 @@ export interface APIMessageActivity {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageApplication {
@@ -132,6 +139,7 @@ export interface APIMessageApplication {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageReference {
@@ -142,6 +150,7 @@ export interface APIMessageReference {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum MessageActivityType {
@@ -153,6 +162,7 @@ export enum MessageActivityType {
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum MessageFlags {
@@ -165,6 +175,7 @@ export enum MessageFlags {
/**
* https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIReaction {
@@ -175,6 +186,7 @@ export interface APIReaction {
/**
* https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIOverwrite {
@@ -202,6 +214,7 @@ export enum OverwriteType {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbed {
@@ -225,6 +238,7 @@ export interface APIEmbed {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
*
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
@@ -239,6 +253,7 @@ export enum EmbedType {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedThumbnail {
@@ -250,6 +265,7 @@ export interface APIEmbedThumbnail {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedVideo {
@@ -260,6 +276,7 @@ export interface APIEmbedVideo {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedImage {
@@ -271,6 +288,7 @@ export interface APIEmbedImage {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedProvider {
@@ -280,6 +298,7 @@ export interface APIEmbedProvider {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedAuthor {
@@ -291,6 +310,7 @@ export interface APIEmbedAuthor {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedFooter {
@@ -301,6 +321,7 @@ export interface APIEmbedFooter {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedField {
@@ -311,6 +332,7 @@ export interface APIEmbedField {
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAttachment {
@@ -325,6 +347,7 @@ export interface APIAttachment {
/**
* https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIChannelMention {

View File

@@ -6,6 +6,7 @@ import type { APIUser } from './user.ts';
/**
* Not documented but mentioned
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIPartialEmoji {
@@ -16,6 +17,7 @@ export interface APIPartialEmoji {
/**
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmoji extends APIPartialEmoji {

View File

@@ -7,6 +7,7 @@ import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGatewayInfo {
@@ -15,6 +16,7 @@ export interface APIGatewayInfo {
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGatewayBotInfo extends APIGatewayInfo {
@@ -24,6 +26,7 @@ export interface APIGatewayBotInfo extends APIGatewayInfo {
/**
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGatewaySessionStartLimit {
@@ -34,6 +37,7 @@ export interface APIGatewaySessionStartLimit {
/**
* https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayPresenceUpdate {
@@ -63,12 +67,14 @@ export enum PresenceUpdateStatus {
/**
* https://discord.com/developers/docs/topics/gateway#client-status-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayPresenceClientStatus = Partial<Record<'desktop' | 'mobile' | 'web', PresenceUpdateStatus>>;
/**
* https://discord.com/developers/docs/topics/gateway#activity-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayActivity {
@@ -90,6 +96,7 @@ export interface GatewayActivity {
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum ActivityType {
@@ -103,6 +110,7 @@ export enum ActivityType {
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayActivityTimestamps {
@@ -112,12 +120,14 @@ export interface GatewayActivityTimestamps {
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'name' | 'animated'>> & Pick<APIEmoji, 'id'>;
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'name'>> & Pick<APIEmoji, 'id'>;
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayActivityParty {
@@ -127,6 +137,7 @@ export interface GatewayActivityParty {
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayActivityAssets = Partial<
@@ -135,12 +146,14 @@ export type GatewayActivityAssets = Partial<
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
/**
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum ActivityFlags {

View File

@@ -11,6 +11,7 @@ import type { GatewayVoiceState } from './voice.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIUnavailableGuild {
@@ -99,6 +100,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildDefaultMessageNotifications {
@@ -108,6 +110,7 @@ export enum GuildDefaultMessageNotifications {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildExplicitContentFilter {
@@ -118,6 +121,7 @@ export enum GuildExplicitContentFilter {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildMFALevel {
@@ -127,6 +131,7 @@ export enum GuildMFALevel {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildVerificationLevel {
@@ -139,6 +144,7 @@ export enum GuildVerificationLevel {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildPremiumTier {
@@ -150,6 +156,7 @@ export enum GuildPremiumTier {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildSystemChannelFlags {
@@ -159,6 +166,7 @@ export enum GuildSystemChannelFlags {
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildFeature {
@@ -180,6 +188,7 @@ export enum GuildFeature {
/**
* https://discord.com/developers/docs/resources/guild#guild-preview-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGuildPreview {
@@ -202,6 +211,7 @@ export type APIGuildWidget = APIGuildWidgetSettings;
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGuildWidgetSettings {
@@ -211,6 +221,7 @@ export interface APIGuildWidgetSettings {
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGuildMember {
@@ -225,6 +236,7 @@ export interface APIGuildMember {
/**
* https://discord.com/developers/docs/resources/guild#integration-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGuildIntegration {
@@ -247,6 +259,7 @@ export interface APIGuildIntegration {
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum IntegrationExpireBehavior {
@@ -256,6 +269,7 @@ export enum IntegrationExpireBehavior {
/**
* https://discord.com/developers/docs/resources/guild#integration-account-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIIntegrationAccount {
@@ -265,6 +279,7 @@ export interface APIIntegrationAccount {
/**
* https://discord.com/developers/docs/resources/guild#integration-application-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIGuildIntegrationApplication {
@@ -278,6 +293,7 @@ export interface APIGuildIntegrationApplication {
/**
* https://discord.com/developers/docs/resources/guild#ban-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIBan {
@@ -287,6 +303,7 @@ export interface APIBan {
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum GuildWidgetStyle {

View File

@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/invite#invite-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIInvite {
@@ -23,6 +24,7 @@ export interface APIInvite {
/**
* https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum InviteTargetUserType {
@@ -31,6 +33,7 @@ export enum InviteTargetUserType {
/**
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIExtendedInvite extends APIInvite {

View File

@@ -7,6 +7,7 @@ import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/oauth2#get-current-application-information-response-structure
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIApplication {

View File

@@ -9,6 +9,7 @@
* convert them in a number by wrapping it in `Number()`, however be careful as any
* further bits added may cause issues if done so. Try to use BigInts as much as possible
* or modules that can replicate them in some way.
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export const PermissionFlagsBits = {
@@ -22,37 +23,39 @@ export const PermissionFlagsBits = {
VIEW_AUDIT_LOG: 128n,
PRIORITY_SPEAKER: 256n,
STREAM: 512n,
VIEW_CHANNEL: 1024n,
SEND_MESSAGES: 2048n,
SEND_TTS_MESSAGES: 4096n,
MANAGE_MESSAGES: 8192n,
EMBED_LINKS: 16384n,
ATTACH_FILES: 32768n,
READ_MESSAGE_HISTORY: 65536n,
MENTION_EVERYONE: 131072n,
USE_EXTERNAL_EMOJIS: 262144n,
VIEW_GUILD_INSIGHTS: 524288n,
CONNECT: 1048576n,
SPEAK: 2097152n,
MUTE_MEMBERS: 4194304n,
DEAFEN_MEMBERS: 8388608n,
MOVE_MEMBERS: 16777216n,
USE_VAD: 33554432n,
CHANGE_NICKNAME: 67108864n,
MANAGE_NICKNAMES: 134217728n,
MANAGE_ROLES: 268435456n,
MANAGE_WEBHOOKS: 536870912n,
MANAGE_EMOJIS: 1073741824n,
VIEW_CHANNEL: 1_024n,
SEND_MESSAGES: 2_048n,
SEND_TTS_MESSAGES: 4_096n,
MANAGE_MESSAGES: 8_192n,
EMBED_LINKS: 16_384n,
ATTACH_FILES: 32_768n,
READ_MESSAGE_HISTORY: 65_536n,
MENTION_EVERYONE: 131_072n,
USE_EXTERNAL_EMOJIS: 262_144n,
VIEW_GUILD_INSIGHTS: 524_288n,
CONNECT: 1_048_576n,
SPEAK: 2_097_152n,
MUTE_MEMBERS: 4_194_304n,
DEAFEN_MEMBERS: 8_388_608n,
MOVE_MEMBERS: 16_777_216n,
USE_VAD: 33_554_432n,
CHANGE_NICKNAME: 67_108_864n,
MANAGE_NICKNAMES: 134_217_728n,
MANAGE_ROLES: 268_435_456n,
MANAGE_WEBHOOKS: 536_870_912n,
MANAGE_EMOJIS: 1_073_741_824n,
} as const;
/**
* Freeze the object of bits, preventing any modifications to it.
*
* @internal
*/
Object.freeze(PermissionFlagsBits);
/**
* https://discord.com/developers/docs/topics/permissions#role-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIRole {

View File

@@ -6,6 +6,7 @@ import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APITeam {
@@ -17,6 +18,7 @@ export interface APITeam {
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APITeamMember {
@@ -28,6 +30,7 @@ export interface APITeamMember {
/**
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum TeamMemberMembershipState {

View File

@@ -6,6 +6,7 @@ import type { APIGuildIntegration } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/user#user-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIUser {
@@ -26,6 +27,7 @@ export interface APIUser {
/**
* https://discord.com/developers/docs/resources/user#user-object-user-flags
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum UserFlags {
@@ -47,6 +49,7 @@ export enum UserFlags {
/**
* https://discord.com/developers/docs/resources/user#user-object-premium-types
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum UserPremiumType {
@@ -57,6 +60,7 @@ export enum UserPremiumType {
/**
* https://discord.com/developers/docs/resources/user#connection-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIConnection {

View File

@@ -6,6 +6,7 @@ import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayVoiceState {
@@ -25,6 +26,7 @@ export interface GatewayVoiceState {
/**
* https://discord.com/developers/docs/resources/voice#voice-region-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIVoiceRegion {

View File

@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object
*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIWebhook {

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,7 +1,7 @@
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
import type { ChannelType } from '../../../channel.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,5 +1,6 @@
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum ApplicationCommandOptionType {
@@ -18,9 +19,10 @@ export enum ApplicationCommandOptionType {
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string;
value: ValueType;
}

View File

@@ -1,6 +1,6 @@
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type { Snowflake } from '../../../../../globals.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -1,3 +1,12 @@
import type { Snowflake } from '../../../../globals.ts';
import type { APIAttachment, APIRole, APIUser } from '../../mod.ts';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
APIInteractionDataResolvedGuildMember,
ApplicationCommandType,
} from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type {
APIApplicationCommandAttachmentOption,
APIApplicationCommandInteractionDataAttachmentOption,
@@ -43,15 +52,6 @@ import type {
APIApplicationCommandUserOption,
} from './_chatInput/user.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
import type { Snowflake } from '../../../../globals.ts';
import type { APIAttachment, APIRole, APIUser } from '../../mod.ts';
import type {
APIApplicationCommandInteractionWrapper,
APIInteractionDataResolvedChannel,
APIInteractionDataResolvedGuildMember,
ApplicationCommandType,
} from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
export * from './_chatInput/attachment.ts';
export * from './_chatInput/boolean.ts';
@@ -68,53 +68,57 @@ export * from './_chatInput/user.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandBasicOption =
| APIApplicationCommandStringOption
| APIApplicationCommandIntegerOption
| APIApplicationCommandAttachmentOption
| APIApplicationCommandBooleanOption
| APIApplicationCommandUserOption
| APIApplicationCommandChannelOption
| APIApplicationCommandRoleOption
| APIApplicationCommandIntegerOption
| APIApplicationCommandMentionableOption
| APIApplicationCommandNumberOption
| APIApplicationCommandAttachmentOption;
| APIApplicationCommandRoleOption
| APIApplicationCommandStringOption
| APIApplicationCommandUserOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandOption =
| APIApplicationCommandSubcommandOption
| APIApplicationCommandBasicOption
| APIApplicationCommandSubcommandGroupOption
| APIApplicationCommandBasicOption;
| APIApplicationCommandSubcommandOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandInteractionDataOption =
| APIApplicationCommandInteractionDataSubcommandOption
| APIApplicationCommandInteractionDataBasicOption
| APIApplicationCommandInteractionDataSubcommandGroupOption
| APIApplicationCommandInteractionDataBasicOption;
| APIApplicationCommandInteractionDataSubcommandOption;
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandInteractionDataBasicOption =
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataAttachmentOption
| APIApplicationCommandInteractionDataBooleanOption
| APIApplicationCommandInteractionDataUserOption
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataAttachmentOption;
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataUserOption;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIChatInputApplicationCommandInteractionData
@@ -125,6 +129,7 @@ export interface APIChatInputApplicationCommandInteractionData
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIChatInputApplicationCommandInteractionDataResolved {
@@ -137,6 +142,7 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIChatInputApplicationCommandInteraction =
@@ -144,6 +150,7 @@ export type APIChatInputApplicationCommandInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIChatInputApplicationCommandDMInteraction =
@@ -151,6 +158,7 @@ export type APIChatInputApplicationCommandDMInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIChatInputApplicationCommandGuildInteraction =

View File

@@ -1,4 +1,3 @@
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
import type { Snowflake } from '../../../../globals.ts';
import type { APIMessage } from '../../channel.ts';
import type { APIUser } from '../../user.ts';
@@ -8,9 +7,11 @@ import type {
ApplicationCommandType,
} from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIUserApplicationCommandInteractionData
@@ -21,6 +22,7 @@ export interface APIUserApplicationCommandInteractionData
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIUserApplicationCommandInteractionDataResolved {
@@ -30,6 +32,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIMessageApplicationCommandInteractionData
@@ -40,6 +43,7 @@ export interface APIMessageApplicationCommandInteractionData
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIMessageApplicationCommandInteractionDataResolved {
@@ -48,14 +52,16 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIContextMenuInteractionData =
| APIUserApplicationCommandInteractionData
| APIMessageApplicationCommandInteractionData;
| APIMessageApplicationCommandInteractionData
| APIUserApplicationCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIUserApplicationCommandInteraction =
@@ -63,12 +69,14 @@ export type APIUserApplicationCommandInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIUserApplicationCommandGuildInteraction =
@@ -76,6 +84,7 @@ export type APIUserApplicationCommandGuildInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIMessageApplicationCommandInteraction =
@@ -83,6 +92,7 @@ export type APIMessageApplicationCommandInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIMessageApplicationCommandDMInteraction =
@@ -90,6 +100,7 @@ export type APIMessageApplicationCommandDMInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIMessageApplicationCommandGuildInteraction =
@@ -97,22 +108,25 @@ export type APIMessageApplicationCommandGuildInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIContextMenuDMInteraction =
| APIUserApplicationCommandDMInteraction
| APIMessageApplicationCommandDMInteraction;
| APIMessageApplicationCommandDMInteraction
| APIUserApplicationCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIContextMenuGuildInteraction =
| APIUserApplicationCommandGuildInteraction
| APIMessageApplicationCommandGuildInteraction;
| APIMessageApplicationCommandGuildInteraction
| APIUserApplicationCommandGuildInteraction;

View File

@@ -2,6 +2,7 @@ import type { Snowflake } from '../../../../globals.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIGuildApplicationCommandPermissions {
@@ -25,6 +26,7 @@ export interface APIGuildApplicationCommandPermissions {
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIApplicationCommandPermission {
@@ -44,6 +46,7 @@ export interface APIApplicationCommandPermission {
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum ApplicationCommandPermissionType {

View File

@@ -1,3 +1,6 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIPartialChannel } from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type {
APIApplicationCommandOption,
APIChatInputApplicationCommandDMInteraction,
@@ -13,9 +16,6 @@ import type {
} from './_applicationCommands/contextMenu.ts';
import type { APIBaseInteraction } from './base.ts';
import type { InteractionType } from './responses.ts';
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIPartialChannel } from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
export * from './_applicationCommands/chatInput.ts';
export * from './_applicationCommands/contextMenu.ts';
@@ -23,6 +23,7 @@ export * from './_applicationCommands/permissions.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIApplicationCommand {
@@ -68,6 +69,7 @@ export interface APIApplicationCommand {
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum ApplicationCommandType {
@@ -78,6 +80,7 @@ export enum ApplicationCommandType {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandInteractionData =
@@ -86,6 +89,7 @@ export type APIApplicationCommandInteractionData =
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
@@ -94,14 +98,16 @@ export interface APIInteractionDataResolvedChannel extends Required<APIPartialCh
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
@@ -110,12 +116,14 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandDMInteraction =
@@ -124,6 +132,7 @@ export type APIApplicationCommandDMInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandGuildInteraction =

View File

@@ -25,6 +25,7 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandAutocompleteDMInteraction =
@@ -32,6 +33,7 @@ export type APIApplicationCommandAutocompleteDMInteraction =
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIApplicationCommandAutocompleteGuildInteraction =

View File

@@ -1,28 +1,29 @@
import type { InteractionType } from './responses.ts';
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { LocaleString } from '../../../v8.ts';
import type { APIMessage } from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type PartialAPIMessageInteractionGuildMember = Pick<
APIGuildMember,
| 'roles'
| 'premium_since'
| 'pending'
| 'nick'
| 'mute'
| 'joined_at'
| 'deaf'
| 'communication_disabled_until'
| 'avatar'
| 'communication_disabled_until'
| 'deaf'
| 'joined_at'
| 'mute'
| 'nick'
| 'pending'
| 'premium_since'
| 'roles'
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIMessageInteraction {
@@ -50,6 +51,7 @@ export interface APIMessageInteraction {
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIInteractionGuildMember extends APIGuildMember {
@@ -61,6 +63,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIBaseInteraction<Type extends InteractionType, Data> {
@@ -125,7 +128,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
*/
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
Original,
'member' | 'guild_id'
'guild_id' | 'member'
> &
Required<Pick<Original, 'user'>>;
@@ -136,4 +139,4 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
Original,
'user'
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
Required<Pick<Original, 'guild_id' | 'member'>>;

View File

@@ -1,6 +1,6 @@
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base.ts';
import type { ComponentType } from '../channel.ts';
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base.ts';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -40,6 +40,7 @@ export interface APIModalSubmission {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
@@ -47,12 +48,14 @@ export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.Modal
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;

View File

@@ -1,10 +1,11 @@
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8.ts';
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { MessageFlags } from '../mod.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum InteractionType {
@@ -17,15 +18,16 @@ export enum InteractionType {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIInteractionResponse =
| APIInteractionResponsePong
| APIApplicationCommandAutocompleteResponse
| APIInteractionResponseChannelMessageWithSource
| APIInteractionResponseDeferredChannelMessageWithSource
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponsePong
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
/**
@@ -84,6 +86,7 @@ export interface APIInteractionResponseUpdateMessage {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum InteractionResponseType {
@@ -119,11 +122,12 @@ export enum InteractionResponseType {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
/**
@@ -135,6 +139,7 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIModalInteractionResponseCallbackData {

View File

@@ -2,13 +2,14 @@
* Types extracted from https://discord.com/developers/docs/resources/application
*/
import type { Permissions, Snowflake } from '../../globals.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APITeam } from './teams.ts';
import type { APIUser } from './user.ts';
import type { Permissions, Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/application#application-object
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIApplication {
@@ -116,6 +117,7 @@ export interface APIApplicationInstallParams {
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum ApplicationFlags {

View File

@@ -2,6 +2,7 @@
* Types extracted from https://discord.com/developers/docs/resources/audit-log
*/
import type { Snowflake } from '../../globals.ts';
import type { APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
@@ -21,10 +22,10 @@ import type { StageInstancePrivacyLevel } from './stageInstance.ts';
import type { StickerFormatType } from './sticker.ts';
import type { APIUser } from './user.ts';
import type { APIWebhook } from './webhook.ts';
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIAuditLog {
@@ -62,6 +63,7 @@ export interface APIAuditLog {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIAuditLogEntry {
@@ -105,6 +107,7 @@ export interface APIAuditLogEntry {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum AuditLogEvent {
@@ -166,6 +169,7 @@ export enum AuditLogEvent {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APIAuditLogOptions {
@@ -263,166 +267,183 @@ export enum AuditLogOptionsType {
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChange =
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyOwnerId
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyPreferredLocale
| APIAuditLogChangeKeyAFKChannelId
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeyPublicUpdatesChannelId
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKey$Add
| APIAuditLogChangeKey$Remove
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyWidgetEnabled
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeySystemChannelId
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyApplicationId
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyAFKChannelId
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyAllow
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyInviterId
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyApplicationId
| APIAuditLogChangeKeyAsset
| APIAuditLogChangeKeyAvailable
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyCommunicationDisabledUntil
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFormatType
| APIAuditLogChangeKeyGuildId
| APIAuditLogChangeKeyHoist
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyInviterId
| APIAuditLogChangeKeyLocation
| APIAuditLogChangeKeyCommunicationDisabledUntil;
| APIAuditLogChangeKeyMaxAge
| APIAuditLogChangeKeyMaxUses
| APIAuditLogChangeKeyMentionable
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyMute
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyNick
| APIAuditLogChangeKeyNSFW
| APIAuditLogChangeKeyOwnerId
| APIAuditLogChangeKeyPermissionOverwrites
| APIAuditLogChangeKeyPermissions
| APIAuditLogChangeKeyPosition
| APIAuditLogChangeKeyPreferredLocale
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyPruneDeleteDays
| APIAuditLogChangeKeyPublicUpdatesChannelId
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelId
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyTemporary
| APIAuditLogChangeKeyTopic
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
/**
* Returned when an entity's name is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
/**
* Returned when a guild's or sticker's or guild scheduled event's description is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
/**
* Returned when a guild's icon is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's splash is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's discovery splash is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
/**
* Returned when a guild's banner hash is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
/**
* Returned when a guild's owner_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
/**
* Returned when a guild's region is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
/**
* Returned when a guild's preferred_locale is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
/**
* Returned when a guild's afk_channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
/**
* Returned when a guild's afk_timeout is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's rules_channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
/**
* Returned when a guild's public_updates_channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
/**
* Returned when a guild's mfa_level is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a guild's explicit_content_filter is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
@@ -432,6 +453,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
/**
* Returned when a guild's default_message_notifications is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
@@ -441,78 +463,91 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
/**
* Returned when a guild's vanity_url_code is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when new role(s) are added
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
/**
* Returned when role(s) are removed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
/**
* Returned when a guild's system_channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
/**
* Returned when a channel's position is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
@@ -520,204 +555,238 @@ export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_
/**
* Returned when a channel's amount of seconds a user has to wait before sending another message
* is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a permission bitfield is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
/**
* Returned when a role's color is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
/**
* Returned when a role's hoist status is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
/**
* Returned when an invite's code is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
/**
* Returned when an invite's or guild scheduled event's channel_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
/**
* Returned when an invite's inviter_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
/**
* Returned when an invite's max_uses is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
/**
* Returned when a user's avatar_hash is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
/**
* The type of entity created
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
/**
* Returned when an integration's enable_emoticons is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
/**
* Returned when a voice channel's user_limit is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
/**
* Returned when privacy level of a stage instance or guild scheduled event is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
/**
* Returned when a sticker's related emoji is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
/**
* Returned when a sticker's format_type is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
/**
* Empty string
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
/**
* Returned when a sticker's availability is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
/**
* Returned when a sticker's guild_id is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/**
* Returned when entity type of a guild scheduled event is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
/**
* Returned when status of a guild scheduled event is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
/**
* Returned when location of a guild scheduled event is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
/**
* Returned when a user's timeout is changed
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;

Some files were not shown because too many files have changed in this diff Show More