Compare commits

...

215 Commits

Author SHA1 Message Date
github-actions[bot]
4ef182d009 chore(release): 0.37.97 🎉 (#1068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-22 15:22:57 +03:00
Almeida
86a9f965dd refactor(rest): ensure types follow naming pattern (#1065)
Co-authored-by: Synbulat Biishev <signin@syjalo.dev>
2024-08-22 14:41:56 +03:00
github-actions[bot]
b90fddc285 chore(release): 0.37.96 🎉 (#1066)
Build ran for f67043b3f4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-20 11:22:06 +03:00
Almeida
f67043b3f4 fix: nullable fields for scheduled event editing (#1064) 2024-08-19 17:48:33 +03:00
Almeida
19d2aeb4a8 fix: nullable recurrence_rule on patch (#1063) 2024-08-19 17:39:07 +03:00
github-actions[bot]
31b3766b19 chore(release): 0.37.95 🎉 (#1062)
Build ran for 1b1a865efe

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-19 15:23:04 +03:00
Naiyar
1b1a865efe feat(Routes): voice state endpoint (#1046) 2024-08-16 15:33:15 +03:00
renovate[bot]
a85521aa8b chore(deps): lock file maintenance (#1061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 15:30:44 +03:00
renovate[bot]
8b00031c51 chore(deps): lock file maintenance (#1060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-16 03:34:11 +03:00
Almeida
147e459a16 fix: interface name (#1059) 2024-08-15 21:16:59 +03:00
Almeida
fbfbc6b23f feat: recurring scheduled events (#1058) 2024-08-15 20:43:55 +03:00
Almeida
906dd8e241 feat(RESTJSONErrorCodes): UnknownStickerPack (#1055) 2024-08-15 20:02:28 +03:00
github-actions[bot]
25efb9c403 chore(release): 0.37.94 🎉 (#1054)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-15 15:32:12 +03:00
Almeida
822956fe78 feat: add Get Sticker Pack endpoint (#1053) 2024-08-15 01:58:20 +03:00
Almeida
d5047639e6 feat(APIApplication): approximate_user_install_count (#1052) 2024-08-15 01:54:52 +03:00
renovate[bot]
cbd8d108ee chore(deps): lock file maintenance (#1049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-14 23:56:11 +03:00
renovate[bot]
d816bf31ab chore(deps): update dependency eslint-plugin-local to v6 (#1048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-14 23:46:49 +03:00
renovate[bot]
71602b5c49 chore(deps): update patch/minor dependencies (#1047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-14 23:46:07 +03:00
Lars_und_so
6ead98b782 feat(RESTOAuth2): add RESTPostOAuth2TokenRevocationQuery (#1050) 2024-08-14 23:45:29 +03:00
TÆMBØ
ea1a6c3c86 feat(Routes): get method on role endpoint (#1051) 2024-08-14 19:03:52 +01:00
renovate[bot]
a59f9f002f chore(deps): lock file maintenance (#1045)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 13:22:10 +03:00
renovate[bot]
ace41f38e4 chore(deps): lock file maintenance (#1044)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 13:12:14 +03:00
renovate[bot]
25a6f5330f chore(deps): update dependency @typescript-eslint/utils to v8 (#1042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 12:59:39 +03:00
renovate[bot]
4409fc24c1 chore(deps): update dependency @types/node to v20.14.14 (#1041)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 12:59:29 +03:00
renovate[bot]
1178c23389 chore(deps): lock file maintenance (#1043)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 12:54:09 +03:00
renovate[bot]
34b0ddd105 chore(deps): lock file maintenance (#1039)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 09:40:44 +03:00
renovate[bot]
9c1fc9bdee chore(deps): update patch/minor dependencies (#1038)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 09:08:53 +03:00
github-actions[bot]
472fe5f837 chore(release): 0.37.93 🎉 (#1037)
Build ran for 588140c0a9

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-22 16:31:52 +04:00
Vlad Frangu
588140c0a9 chore: test for this in tsd land not ts land 2024-07-20 17:18:54 +04:00
Vlad Frangu
799044d3f0 chore: ensure routes definitions emit correct paths
to prevent a repeat of a bug
2024-07-20 17:07:37 +04:00
Back
eb7b3d90dd fix(CDNRoutes): inconsistency in route and wrong JSDoc (#1033) 2024-07-20 12:13:31 +03:00
Suneet Tipirneni
2c1ff0ea34 feat: add support for message forwarding (#971) 2024-07-20 12:11:45 +03:00
Danial Raza
5f22a6baca feat: application emojis (#1036) 2024-07-20 12:07:31 +03:00
renovate[bot]
cbcd51d093 chore(deps): lock file maintenance (#1035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-20 12:07:01 +03:00
Almeida
4f66b4dd04 feat(ConnectionService): add Roblox (#1032) 2024-07-20 12:05:47 +03:00
Almeida
da9496f291 feat(RESTAPIPartialCurrentUserGuild): add banner (#1028) 2024-07-20 12:05:30 +03:00
renovate[bot]
b1e1c60a07 chore(deps): update patch/minor dependencies (#1034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-20 12:04:12 +03:00
renovate[bot]
4fdc6db296 chore(deps): update dependency rimraf to v6 (#1030)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-15 01:23:09 +03:00
renovate[bot]
608f0fa8cd chore(deps): lock file maintenance (#1031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-15 01:15:25 +03:00
renovate[bot]
0e8b624c3e chore(deps): update patch/minor dependencies (#1029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-15 01:15:04 +03:00
renovate[bot]
1301b3417c chore(deps): update patch/minor dependencies (#1025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 22:19:52 +03:00
renovate[bot]
e098870a08 chore(deps): lock file maintenance (#1026)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-06 13:58:10 +03:00
github-actions[bot]
2049dde09a chore(release): 0.37.92 🎉 (#1024)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-04 15:21:59 +03:00
Almeida
ea7cafaafa chore: ignore deprecated versions on linters (#1023) 2024-07-02 23:55:34 +03:00
Almeida
c05998de27 fix(RESTAPIPollCreate): optional properties (#1022) 2024-07-02 23:34:48 +03:00
renovate[bot]
f50ae60ea9 chore(deps): lock file maintenance (#1021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 15:57:19 +03:00
renovate[bot]
0ebf2afb58 chore(deps): lock file maintenance (#1020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 14:26:19 +03:00
renovate[bot]
ee09eafb76 chore(deps): lock file maintenance (#1019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 04:38:05 +03:00
renovate[bot]
a7fac3dc04 chore(deps): update dependency eslint-plugin-local to v5 (#1018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 04:12:39 +03:00
renovate[bot]
1fd407f481 chore(deps): update patch/minor dependencies (#1017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 04:08:44 +03:00
github-actions[bot]
aa8e307f4d chore(release): 0.37.91 🎉 (#1016)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-27 15:21:42 +03:00
Danial Raza
897fd90bf2 feat(APIAttachment): add title (#1015) 2024-06-26 00:59:23 +03:00
Vlad Frangu
666f0e79bc chore: update my email 2024-06-24 16:07:34 +03:00
renovate[bot]
c9117a7bcc chore(deps): lock file maintenance (#1014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 13:23:43 +03:00
renovate[bot]
fe7ba16e3c chore(deps): lock file maintenance (#1013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 03:42:18 +03:00
renovate[bot]
643bf747be chore(deps): update patch/minor dependencies (#1012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 03:42:04 +03:00
github-actions[bot]
0340b3c3a1 chore(release): 0.37.90 🎉 (#1011)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-18 21:09:32 +03:00
renovate[bot]
45ef182b79 chore(deps): lock file maintenance (#1009)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 21:07:00 +03:00
renovate[bot]
17c19750ae chore(deps): update patch/minor dependencies (#1008)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 15:51:20 +03:00
TÆMBØ
088dbe016f feat: add premium buttons (#1010) 2024-06-18 11:30:44 +03:00
dependabot[bot]
e3eb86936e chore(deps): bump braces from 3.0.2 to 3.0.3 in /website (#1007)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 15:23:12 +03:00
github-actions[bot]
d201436233 chore(release): 0.37.89 🎉 (#1006)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-13 15:21:33 +03:00
Jiralite
d63bea7dfc feat: Add use external apps permission (#999) 2024-06-11 00:50:35 +03:00
github-actions[bot]
e330d3dcde chore(release): 0.37.88 🎉 (#1005)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-10 15:21:58 +03:00
renovate[bot]
fdb2d0a3c0 chore(deps): lock file maintenance (#1003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-09 01:27:21 +03:00
renovate[bot]
8657befda4 chore(deps): update patch/minor dependencies (#1002)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-09 01:19:00 +03:00
Danial Raza
173f9ed0fa feat(MessageType): add incident related types (#1004) 2024-06-09 01:18:07 +03:00
Jiralite
fdc04089e1 feat(RouteBases): Add media URL (#1001) 2024-06-07 01:24:12 +03:00
Almeida
c6a72a55e5 feat(AuditLogEvent): home settings events (#1000) 2024-06-07 01:17:00 +03:00
advaith
98544fa56a fix(APIGuildMember): make user required and omit in messages (#998) 2024-06-07 01:16:37 +03:00
github-actions[bot]
3ce9610ba0 chore(release): 0.37.87 🎉 (#997)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-03 15:49:48 +03:00
Jaw0r3k
509746003a feat(AutoModeration): add blocking words in member profile (#740)
Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-06-03 14:09:02 +03:00
cobalt
f859a96974 fix: Correct types for APIAuditLogChangeKey$Add and APIAuditLogChangeKey$Remove (#955)
Co-authored-by: almeidx <github@almeidx.dev>
2024-06-02 17:22:45 +03:00
renovate[bot]
344e43b307 chore(deps): lock file maintenance (#996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 17:07:09 +03:00
renovate[bot]
709153564e chore(deps): lock file maintenance (#995)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 10:27:46 +03:00
renovate[bot]
782a711236 chore(deps): lock file maintenance (#992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 09:00:50 +03:00
renovate[bot]
566f2bc2c7 chore(deps): update patch/minor dependencies (#994)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-31 08:59:16 +03:00
github-actions[bot]
2627c0c98c chore(release): 0.37.86 🎉 (#993)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-27 15:20:59 +03:00
renovate[bot]
0c46476110 chore(deps): lock file maintenance (#991)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 08:42:47 +03:00
renovate[bot]
d273000c32 chore(deps): update dependency lint-staged to v15.2.4 (#990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 08:26:37 +03:00
Danial Raza
5678a63875 docs: reeeee (#989) 2024-05-23 18:44:17 +03:00
github-actions[bot]
f9913cb9a1 chore(release): 0.37.85 🎉 (#988)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-23 15:20:50 +03:00
MateoDeveloper
16a6a46832 feat: add gateway events payload for super reactions (#878) 2024-05-23 13:29:47 +03:00
n1ck_pro
79d9875c5d feat(APIMessage): add call (#983) 2024-05-22 13:07:44 +03:00
MateoDeveloper
ddb2bde077 feat: add type query param for get reactions endpoint (#879) 2024-05-22 13:04:40 +03:00
renovate[bot]
c8bfdebf24 chore(deps): lock file maintenance (#986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 09:05:21 +03:00
renovate[bot]
707fd2e36e chore(deps): update patch/minor dependencies (#985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 09:02:27 +03:00
github-actions[bot]
a69286a361 chore(release): 0.37.84 🎉 (#984)
Build ran for c457b8d059

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-16 15:22:34 +03:00
Atora
c457b8d059 feat: user-installable apps (#921)
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-05-15 15:41:08 +03:00
Danial Raza
7650ce4f72 feat: support avatar decorations (#834) 2024-05-15 15:33:08 +03:00
Danial Raza
65eebd92d6 feat(RESTJSONErrorCodes): add error code 40333 (#854)
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-05-14 01:02:39 +03:00
renovate[bot]
0fafe5e901 chore(deps): update dependency rimraf to v5.0.7 (#982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-13 16:38:12 +03:00
renovate[bot]
0fce829175 chore(deps): lock file maintenance (#981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 11:19:42 +03:00
renovate[bot]
33d5b14f22 chore(deps): update dependency @octokit/action to v7 (#977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 11:18:21 +03:00
renovate[bot]
aa7d1ee943 chore(deps): update dependency @types/node to v20.12.11 (#976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 11:17:19 +03:00
dependabot[bot]
3e4c34cace chore(deps): bump ejs from 3.1.8 to 3.1.10 in /website (#972)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.8 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.8...v3.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03 10:43:42 +03:00
renovate[bot]
8c603dc838 chore(deps): lock file maintenance (#975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 10:43:12 +03:00
renovate[bot]
f9155dddb8 chore(deps): lock file maintenance (#974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 10:22:26 +03:00
renovate[bot]
d0e4018607 chore(deps): update patch/minor dependencies (#973)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-03 10:22:01 +03:00
github-actions[bot]
189e91d62c chore(release): 0.37.83 🎉 (#970)
Build ran for 2eae29d8ca

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-27 21:54:33 +03:00
renovate[bot]
2eae29d8ca chore(deps): lock file maintenance (#969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 11:40:17 +03:00
renovate[bot]
2c595f7b20 chore(deps): lock file maintenance (#968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 11:37:58 +03:00
renovate[bot]
cf4ecedced chore(deps): update patch/minor dependencies (#967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-26 09:47:42 +03:00
Fifty
4e37de7f72 feat(APIAuditLogChange): add missing keys (#964) 2024-04-25 19:33:38 +03:00
n1ck_pro
c9f2c5b020 feat: one time premium app purchases (#966) 2024-04-25 19:30:55 +03:00
github-actions[bot]
312947de1e chore(release): 0.37.82 🎉 (#965)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-25 15:17:07 +03:00
Almeida
3ae6d722fd feat(ConnectionService): add domain (#818) 2024-04-25 01:35:00 +03:00
Almeida
fddb2257db feat(AuditLogEvent): onboarding events (#795) 2024-04-25 01:34:09 +03:00
Vlad Frangu
8de6d6bb4c chore: make check deno actually work for once 2024-04-24 23:17:50 +03:00
Almeida
c4ee7907c2 feat(APIInvite): add type (#858)
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-04-24 23:06:31 +03:00
Vlad Frangu
02695c5c19 docs: update to allow PR for features present in the stable OpenAPI spec 2024-04-24 23:06:13 +03:00
github-actions[bot]
fcc48a43e6 chore(release): 0.37.81 🎉 (#963)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-22 23:52:13 +03:00
Marcos Susaña
308d7d40f4 fix(Polls): correct APIPollAnswer properties (#962) 2024-04-22 23:49:55 +03:00
github-actions[bot]
1572c2d291 chore(release): 0.37.80 🎉 (#961)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-22 15:48:28 +03:00
MateoDeveloper
a36449a028 feat: add support for polls (#925) 2024-04-21 23:48:20 +03:00
renovate[bot]
29d88445e9 chore(deps): lock file maintenance (#960)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 11:08:30 +03:00
renovate[bot]
df3457a520 chore(deps): update dependency eslint-plugin-local to v4.2.2 (#959)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 11:07:08 +03:00
renovate[bot]
e1653f8f3e chore(deps): lock file maintenance (#958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 08:56:24 +03:00
renovate[bot]
369d7b712f chore(deps): update patch/minor dependencies (#956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 08:53:04 +03:00
renovate[bot]
df495ecd20 chore(deps): lock file maintenance (#957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-19 08:52:44 +03:00
renovate[bot]
ee7fc06b75 chore(deps): lock file maintenance (#954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 10:33:22 +03:00
renovate[bot]
c6899314eb chore(deps): update patch/minor dependencies (#952)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 10:27:34 +03:00
renovate[bot]
547d6d118f chore(deps): update dependency eslint-config-neon to v0.1.62 (#951)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-12 10:27:05 +03:00
renovate[bot]
2831452fbd chore(deps): lock file maintenance (#950)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-05 15:04:05 +03:00
renovate[bot]
3c00105453 chore(deps): lock file maintenance (#949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-05 15:01:37 +03:00
renovate[bot]
781f8f198a chore(deps): update patch/minor dependencies (#948)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-05 15:00:58 +03:00
github-actions[bot]
77f5dde20e chore(release): 0.37.79 🎉 (#947)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-04 15:19:12 +03:00
Dmytro
e2b3eb5654 chore(StageInstancePrivacyLevel): mark public PrivacyLevel as deprecated (#946) 2024-04-03 21:23:26 +03:00
Vlad Frangu
46cc9ae288 chore: reading docs helps 2024-04-03 11:48:36 +03:00
Vlad Frangu
5934e43d01 chore: bite me renovate 2024-04-03 11:44:56 +03:00
renovate[bot]
5ae3514498 chore(deps): lock file maintenance (#944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 11:42:00 +03:00
Vlad Frangu
0322478a21 chore: make renovate run less often 2024-04-03 11:41:41 +03:00
renovate[bot]
33d3806d89 chore(deps): lock file maintenance (#943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 11:39:23 +03:00
renovate[bot]
aa5f15ed7d chore(deps): update dependency @types/node to v20.12.3 (#942)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 01:13:16 +03:00
MateoDeveloper
22b5f47787 feat(ConnectionService): add bungie connection (#907) 2024-04-02 21:27:47 +03:00
renovate[bot]
ddf0a7bdba chore(deps): lock file maintenance (#941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 15:16:07 +03:00
renovate[bot]
e70fa70526 chore(deps): lock file maintenance (#940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 09:15:53 +03:00
renovate[bot]
90c70c01bd chore(deps): update dependency @typescript-eslint/utils to v7.5.0 (#939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 09:12:37 +03:00
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
281 changed files with 18863 additions and 8376 deletions

View File

@@ -35,7 +35,10 @@ const schema = [
},
},
},
];
] as const;
const REST_TYPE_NAME_REGEX =
/^REST(?:Get|Patch|Post|Put|Delete)[a-zA-Z0-9]+(?:JSONBody|FormDataBody|URLEncodedData|Result|Query)$/;
export = {
rules: {
@@ -131,5 +134,54 @@ export = {
},
defaultOptions: [{ interfaceEndings: [] }],
}),
'rest-type-naming-convention': ESLintUtils.RuleCreator.withoutDocs<[{ whitelist: string[] }], 'invalidName'>({
create: (context) => {
const { whitelist } = context.options[0];
const whitelistSet = new Set(whitelist);
return {
'TSTypeAliasDeclaration, TSInterfaceDeclaration': (
node: TSESTree.TSTypeAliasDeclaration | TSESTree.TSInterfaceDeclaration,
) => {
if (node.id.type !== AST_NODE_TYPES.Identifier) {
return;
}
const { name } = node.id;
if (whitelistSet.has(name)) {
return;
}
if (!REST_TYPE_NAME_REGEX.test(name)) {
context.report({
node: node.id,
messageId: 'invalidName',
data: { name },
});
}
},
};
},
meta: {
messages: {
invalidName: `{{ name }} does not match REST type naming convention. Must match ${REST_TYPE_NAME_REGEX.source}.`,
},
type: 'problem',
schema: [
{
type: 'object',
properties: {
whitelist: {
type: 'array',
items: {
type: 'string',
},
},
},
},
] as const,
},
defaultOptions: [{ whitelist: [] }],
}),
},
};

View File

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

View File

@@ -1 +1,12 @@
deno/
gateway/v6/*
payloads/v6/*
rest/v6/*
v6.ts
gateway/v8/*
payloads/v8/*
rest/v8/*
utils/v8.ts
v8.ts

View File

@@ -1,20 +0,0 @@
{
"compileOnSave": true,
"compilerOptions": {
"alwaysStrict": true,
"lib": ["esnext"],
"module": "commonjs",
"noUnusedParameters": true,
"sourceMap": true,
"declaration": false,
"noUnusedLocals": true,
"removeComments": false,
"target": "ES2020",
"importsNotUsedAsValues": "error",
"strictNullChecks": true,
"preserveConstEnums": true,
"exactOptionalPropertyTypes": true,
"skipLibCheck": true
},
"include": ["./index.ts"]
}

View File

@@ -15,6 +15,56 @@
"tsdoc/syntax": "off",
"typescript-sort-keys/interface": "off",
"typescript-sort-keys/string-enum": "off",
"unicorn/prefer-math-trunc": "off"
}
"unicorn/prefer-math-trunc": "off",
"jsdoc/no-undefined-types": "off"
},
"overrides": [
{
"files": ["rest/v10/*.ts", "rest/v9/*.ts"],
"excludedFiles": ["rest/v10/index.ts", "rest/v9/index.ts"],
"rules": {
"local/rest-type-naming-convention": [
"error",
{
"whitelist": [
"RESTAPIAttachment",
"RESTAPIChannelPatchOverwrite",
"RESTAPIGuildChannelResolvable",
"RESTAPIGuildCreateOverwrite",
"RESTAPIGuildCreatePartialChannel",
"RESTAPIGuildCreateRole",
"RESTAPIGuildOnboardingPrompt",
"RESTAPIGuildOnboardingPromptOption",
"RESTAPIMessageReference",
"RESTAPIPartialCurrentUserGuild",
"RESTAPIPoll",
"RESTOAuth2AdvancedBotAuthorizationQuery",
"RESTOAuth2AdvancedBotAuthorizationQueryResult",
"RESTOAuth2AuthorizationQuery",
"RESTOAuth2BotAuthorizationQuery",
"RESTOAuth2ImplicitAuthorizationQuery",
"RESTOAuth2ImplicitAuthorizationURLFragmentResult",
// Deprecated types
"APIChannelPatchOverwrite",
"APIGuildChannelResolvable",
"APIGuildCreateOverwrite",
"APIGuildCreatePartialChannel",
"APIGuildCreateRole",
"APIMessageReferenceSend",
"GetAPIVoiceRegionsResult",
"RESTAPIModifyGuildOnboardingPromptData",
"RESTAPIModifyGuildOnboardingPromptOptionData",
"RESTAPIPollCreate",
"RESTDeleteAPIChannelMessageOwnReaction",
"RESTGetAPIStickerPack",
"RESTOAuth2AuthorizationQueryResult",
"RESTPostAPIEntitlementBody"
]
}
]
}
}
]
}

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

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/**/*

View File

@@ -10,14 +10,18 @@ jobs:
check_deno:
name: Ensure Deno types are in sync with the code
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
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,14 +17,14 @@ 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
@@ -65,18 +65,22 @@ 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

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,10 +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

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

6
.gitignore vendored
View File

@@ -1,9 +1,9 @@
node_modules/
# Custom ESLint rules
.eslintplugin/*
!.eslintplugin/index.ts
!.eslintplugin/tsconfig.json
.eslint-plugin-local/*
!.eslint-plugin-local/index.ts
!.eslint-plugin-local/tsconfig.json
# Don't commit build outputs
globals.js

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

@@ -18,3 +18,21 @@ website/build
# Miscellaneous
CODEOWNERS
renovate.json
CHANGELOG.md
# Format all of scripts
!scripts/**/*
!.prettierrc.mjs
# Deprecated versions
gateway/v6/*
payloads/v6/*
rest/v6/*
v6.ts
gateway/v8/*
payloads/v8/*
rest/v8/*
utils/v8.ts
v8.ts

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,280 @@
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
### Bug Fixes
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
### Bug Fixes
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
### Features
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
### Features
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
### Bug Fixes
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
### Features
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
### Bug Fixes
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
### Features
* **APIAttachment:** add `title` ([#1015](https://github.com/discordjs/discord-api-types/issues/1015)) ([897fd90](https://github.com/discordjs/discord-api-types/commit/897fd90bf2705d6ff5eebbb21fa8e735fc1e1e22))
## [0.37.90](https://github.com/discordjs/discord-api-types/compare/0.37.89...0.37.90) (2024-06-18)
### Features
* add premium buttons ([#1010](https://github.com/discordjs/discord-api-types/issues/1010)) ([088dbe0](https://github.com/discordjs/discord-api-types/commit/088dbe016fdb72fb751931938bf7240c34fa64c0))
## [0.37.89](https://github.com/discordjs/discord-api-types/compare/0.37.88...0.37.89) (2024-06-13)
### Features
* Add use external apps permission ([#999](https://github.com/discordjs/discord-api-types/issues/999)) ([d63bea7](https://github.com/discordjs/discord-api-types/commit/d63bea7dfc748472b2e5ed4e2d45752acc1a3d2a))
## [0.37.88](https://github.com/discordjs/discord-api-types/compare/0.37.87...0.37.88) (2024-06-10)
### Bug Fixes
* **APIGuildMember:** make user required and omit in messages ([#998](https://github.com/discordjs/discord-api-types/issues/998)) ([98544fa](https://github.com/discordjs/discord-api-types/commit/98544fa56aa7d6e98b23ead4e898a5f8424a437a))
### Features
* **AuditLogEvent:** home settings events ([#1000](https://github.com/discordjs/discord-api-types/issues/1000)) ([c6a72a5](https://github.com/discordjs/discord-api-types/commit/c6a72a55e5aa77413cfdb639b1c89b1a0774b624))
* **MessageType:** add incident related types ([#1004](https://github.com/discordjs/discord-api-types/issues/1004)) ([173f9ed](https://github.com/discordjs/discord-api-types/commit/173f9ed0fa9daf838c050aa246bc533f4c788c3b))
* **RouteBases:** Add media URL ([#1001](https://github.com/discordjs/discord-api-types/issues/1001)) ([fdc0408](https://github.com/discordjs/discord-api-types/commit/fdc04089e17e682c7db46990580a853c7b852957))
## [0.37.87](https://github.com/discordjs/discord-api-types/compare/0.37.86...0.37.87) (2024-06-03)
### Bug Fixes
* Correct types for `APIAuditLogChangeKey$Add` and `APIAuditLogChangeKey$Remove` ([#955](https://github.com/discordjs/discord-api-types/issues/955)) ([f859a96](https://github.com/discordjs/discord-api-types/commit/f859a96974e3188a18df575466e09b32fb70fbda))
### Features
* **AutoModeration:** add blocking words in member profile ([#740](https://github.com/discordjs/discord-api-types/issues/740)) ([5097460](https://github.com/discordjs/discord-api-types/commit/509746003a5544fc1b1a28a5a58a3cfe27e200ca))
## [0.37.86](https://github.com/discordjs/discord-api-types/compare/0.37.85...0.37.86) (2024-05-27)
## [0.37.85](https://github.com/discordjs/discord-api-types/compare/0.37.84...0.37.85) (2024-05-23)
### Features
* add gateway events payload for super reactions ([#878](https://github.com/discordjs/discord-api-types/issues/878)) ([16a6a46](https://github.com/discordjs/discord-api-types/commit/16a6a4683204cbf101372a233e235ebf6cb4df4e))
* add type query param for get reactions endpoint ([#879](https://github.com/discordjs/discord-api-types/issues/879)) ([ddb2bde](https://github.com/discordjs/discord-api-types/commit/ddb2bde07776f0b9f370ab8ff6bf5c95be0138fd))
* **APIMessage:** add `call` ([#983](https://github.com/discordjs/discord-api-types/issues/983)) ([79d9875](https://github.com/discordjs/discord-api-types/commit/79d9875c5d480b4ff4817edfecb58cd5c19c0d7b))
## [0.37.84](https://github.com/discordjs/discord-api-types/compare/0.37.83...0.37.84) (2024-05-16)
### Features
* **RESTJSONErrorCodes:** add error code 40333 ([#854](https://github.com/discordjs/discord-api-types/issues/854)) ([65eebd9](https://github.com/discordjs/discord-api-types/commit/65eebd92d636d4ea8e3319c8df84208f1d6ce94f))
* support avatar decorations ([#834](https://github.com/discordjs/discord-api-types/issues/834)) ([7650ce4](https://github.com/discordjs/discord-api-types/commit/7650ce4f7244c04f30e31938965e5023aa858945))
* user-installable apps ([#921](https://github.com/discordjs/discord-api-types/issues/921)) ([c457b8d](https://github.com/discordjs/discord-api-types/commit/c457b8d0596561fd1122e1d96bd168b322de368e))
## [0.37.83](https://github.com/discordjs/discord-api-types/compare/0.37.82...0.37.83) (2024-04-27)
### Features
* **APIAuditLogChange:** add missing keys ([#964](https://github.com/discordjs/discord-api-types/issues/964)) ([4e37de7](https://github.com/discordjs/discord-api-types/commit/4e37de7f72ad6b9502d3e3db97b10910d9970a92))
* one time premium app purchases ([#966](https://github.com/discordjs/discord-api-types/issues/966)) ([c9f2c5b](https://github.com/discordjs/discord-api-types/commit/c9f2c5b020b4c7a36330fe06463106e9cfd38fca))
## [0.37.82](https://github.com/discordjs/discord-api-types/compare/0.37.81...0.37.82) (2024-04-25)
### Features
* **APIInvite:** add `type` ([#858](https://github.com/discordjs/discord-api-types/issues/858)) ([c4ee790](https://github.com/discordjs/discord-api-types/commit/c4ee7907c2acf334e898862ed3d7d468dbdaaf5f))
* **AuditLogEvent:** onboarding events ([#795](https://github.com/discordjs/discord-api-types/issues/795)) ([fddb225](https://github.com/discordjs/discord-api-types/commit/fddb2257db7aac29129ec5d941c46fba167e2de8))
* **ConnectionService:** add `domain` ([#818](https://github.com/discordjs/discord-api-types/issues/818)) ([3ae6d72](https://github.com/discordjs/discord-api-types/commit/3ae6d722fd0b5aa18eb932a51172bba144c2d4ff))
## [0.37.81](https://github.com/discordjs/discord-api-types/compare/0.37.80...0.37.81) (2024-04-22)
### Bug Fixes
* **Polls:** correct APIPollAnswer properties ([#962](https://github.com/discordjs/discord-api-types/issues/962)) ([308d7d4](https://github.com/discordjs/discord-api-types/commit/308d7d40f45b7e3e78a6b13350d3ad7c8fd81b47))
## [0.37.80](https://github.com/discordjs/discord-api-types/compare/0.37.79...0.37.80) (2024-04-22)
### Features
* add support for polls ([#925](https://github.com/discordjs/discord-api-types/issues/925)) ([a36449a](https://github.com/discordjs/discord-api-types/commit/a36449a0283b733c59f5fdc0d6c3f2f786f0514d))
## [0.37.79](https://github.com/discordjs/discord-api-types/compare/0.37.78...0.37.79) (2024-04-04)
### Features
* **ConnectionService:** add bungie connection ([#907](https://github.com/discordjs/discord-api-types/issues/907)) ([22b5f47](https://github.com/discordjs/discord-api-types/commit/22b5f4778778baec7f414c4b253e96b0949de948))
## [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

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,280 @@
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
### Bug Fixes
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
### Bug Fixes
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
### Features
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
### Features
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
### Bug Fixes
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
### Features
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
### Bug Fixes
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
### Features
* **APIAttachment:** add `title` ([#1015](https://github.com/discordjs/discord-api-types/issues/1015)) ([897fd90](https://github.com/discordjs/discord-api-types/commit/897fd90bf2705d6ff5eebbb21fa8e735fc1e1e22))
## [0.37.90](https://github.com/discordjs/discord-api-types/compare/0.37.89...0.37.90) (2024-06-18)
### Features
* add premium buttons ([#1010](https://github.com/discordjs/discord-api-types/issues/1010)) ([088dbe0](https://github.com/discordjs/discord-api-types/commit/088dbe016fdb72fb751931938bf7240c34fa64c0))
## [0.37.89](https://github.com/discordjs/discord-api-types/compare/0.37.88...0.37.89) (2024-06-13)
### Features
* Add use external apps permission ([#999](https://github.com/discordjs/discord-api-types/issues/999)) ([d63bea7](https://github.com/discordjs/discord-api-types/commit/d63bea7dfc748472b2e5ed4e2d45752acc1a3d2a))
## [0.37.88](https://github.com/discordjs/discord-api-types/compare/0.37.87...0.37.88) (2024-06-10)
### Bug Fixes
* **APIGuildMember:** make user required and omit in messages ([#998](https://github.com/discordjs/discord-api-types/issues/998)) ([98544fa](https://github.com/discordjs/discord-api-types/commit/98544fa56aa7d6e98b23ead4e898a5f8424a437a))
### Features
* **AuditLogEvent:** home settings events ([#1000](https://github.com/discordjs/discord-api-types/issues/1000)) ([c6a72a5](https://github.com/discordjs/discord-api-types/commit/c6a72a55e5aa77413cfdb639b1c89b1a0774b624))
* **MessageType:** add incident related types ([#1004](https://github.com/discordjs/discord-api-types/issues/1004)) ([173f9ed](https://github.com/discordjs/discord-api-types/commit/173f9ed0fa9daf838c050aa246bc533f4c788c3b))
* **RouteBases:** Add media URL ([#1001](https://github.com/discordjs/discord-api-types/issues/1001)) ([fdc0408](https://github.com/discordjs/discord-api-types/commit/fdc04089e17e682c7db46990580a853c7b852957))
## [0.37.87](https://github.com/discordjs/discord-api-types/compare/0.37.86...0.37.87) (2024-06-03)
### Bug Fixes
* Correct types for `APIAuditLogChangeKey$Add` and `APIAuditLogChangeKey$Remove` ([#955](https://github.com/discordjs/discord-api-types/issues/955)) ([f859a96](https://github.com/discordjs/discord-api-types/commit/f859a96974e3188a18df575466e09b32fb70fbda))
### Features
* **AutoModeration:** add blocking words in member profile ([#740](https://github.com/discordjs/discord-api-types/issues/740)) ([5097460](https://github.com/discordjs/discord-api-types/commit/509746003a5544fc1b1a28a5a58a3cfe27e200ca))
## [0.37.86](https://github.com/discordjs/discord-api-types/compare/0.37.85...0.37.86) (2024-05-27)
## [0.37.85](https://github.com/discordjs/discord-api-types/compare/0.37.84...0.37.85) (2024-05-23)
### Features
* add gateway events payload for super reactions ([#878](https://github.com/discordjs/discord-api-types/issues/878)) ([16a6a46](https://github.com/discordjs/discord-api-types/commit/16a6a4683204cbf101372a233e235ebf6cb4df4e))
* add type query param for get reactions endpoint ([#879](https://github.com/discordjs/discord-api-types/issues/879)) ([ddb2bde](https://github.com/discordjs/discord-api-types/commit/ddb2bde07776f0b9f370ab8ff6bf5c95be0138fd))
* **APIMessage:** add `call` ([#983](https://github.com/discordjs/discord-api-types/issues/983)) ([79d9875](https://github.com/discordjs/discord-api-types/commit/79d9875c5d480b4ff4817edfecb58cd5c19c0d7b))
## [0.37.84](https://github.com/discordjs/discord-api-types/compare/0.37.83...0.37.84) (2024-05-16)
### Features
* **RESTJSONErrorCodes:** add error code 40333 ([#854](https://github.com/discordjs/discord-api-types/issues/854)) ([65eebd9](https://github.com/discordjs/discord-api-types/commit/65eebd92d636d4ea8e3319c8df84208f1d6ce94f))
* support avatar decorations ([#834](https://github.com/discordjs/discord-api-types/issues/834)) ([7650ce4](https://github.com/discordjs/discord-api-types/commit/7650ce4f7244c04f30e31938965e5023aa858945))
* user-installable apps ([#921](https://github.com/discordjs/discord-api-types/issues/921)) ([c457b8d](https://github.com/discordjs/discord-api-types/commit/c457b8d0596561fd1122e1d96bd168b322de368e))
## [0.37.83](https://github.com/discordjs/discord-api-types/compare/0.37.82...0.37.83) (2024-04-27)
### Features
* **APIAuditLogChange:** add missing keys ([#964](https://github.com/discordjs/discord-api-types/issues/964)) ([4e37de7](https://github.com/discordjs/discord-api-types/commit/4e37de7f72ad6b9502d3e3db97b10910d9970a92))
* one time premium app purchases ([#966](https://github.com/discordjs/discord-api-types/issues/966)) ([c9f2c5b](https://github.com/discordjs/discord-api-types/commit/c9f2c5b020b4c7a36330fe06463106e9cfd38fca))
## [0.37.82](https://github.com/discordjs/discord-api-types/compare/0.37.81...0.37.82) (2024-04-25)
### Features
* **APIInvite:** add `type` ([#858](https://github.com/discordjs/discord-api-types/issues/858)) ([c4ee790](https://github.com/discordjs/discord-api-types/commit/c4ee7907c2acf334e898862ed3d7d468dbdaaf5f))
* **AuditLogEvent:** onboarding events ([#795](https://github.com/discordjs/discord-api-types/issues/795)) ([fddb225](https://github.com/discordjs/discord-api-types/commit/fddb2257db7aac29129ec5d941c46fba167e2de8))
* **ConnectionService:** add `domain` ([#818](https://github.com/discordjs/discord-api-types/issues/818)) ([3ae6d72](https://github.com/discordjs/discord-api-types/commit/3ae6d722fd0b5aa18eb932a51172bba144c2d4ff))
## [0.37.81](https://github.com/discordjs/discord-api-types/compare/0.37.80...0.37.81) (2024-04-22)
### Bug Fixes
* **Polls:** correct APIPollAnswer properties ([#962](https://github.com/discordjs/discord-api-types/issues/962)) ([308d7d4](https://github.com/discordjs/discord-api-types/commit/308d7d40f45b7e3e78a6b13350d3ad7c8fd81b47))
## [0.37.80](https://github.com/discordjs/discord-api-types/compare/0.37.79...0.37.80) (2024-04-22)
### Features
* add support for polls ([#925](https://github.com/discordjs/discord-api-types/issues/925)) ([a36449a](https://github.com/discordjs/discord-api-types/commit/a36449a0283b733c59f5fdc0d6c3f2f786f0514d))
## [0.37.79](https://github.com/discordjs/discord-api-types/compare/0.37.78...0.37.79) (2024-04-04)
### Features
* **ConnectionService:** add bungie connection ([#907](https://github.com/discordjs/discord-api-types/issues/907)) ([22b5f47](https://github.com/discordjs/discord-api-types/commit/22b5f4778778baec7f414c4b253e96b0949de948))
## [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

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

@@ -28,13 +28,15 @@ import type {
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
GatewayThreadListSync as RawGatewayThreadListSync,
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
GatewayVoiceState,
APIVoiceState,
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
APIEntitlement,
ChannelType,
} from '../payloads/v10/mod.ts';
import type { ReactionType } from '../rest/v10/mod.ts';
import type { Nullable } from '../utils/internals.ts';
export * from './common.ts';
@@ -202,6 +204,8 @@ export enum GatewayIntentBits {
GuildScheduledEvents = 1 << 16,
AutoModerationConfiguration = 1 << 20,
AutoModerationExecution = 1 << 21,
GuildMessagePolls = 1 << 24,
DirectMessagePolls = 1 << 25,
}
/**
@@ -259,6 +263,8 @@ export enum GatewayDispatchEvents {
VoiceServerUpdate = 'VOICE_SERVER_UPDATE',
VoiceStateUpdate = 'VOICE_STATE_UPDATE',
WebhooksUpdate = 'WEBHOOKS_UPDATE',
MessagePollVoteAdd = 'MESSAGE_POLL_VOTE_ADD',
MessagePollVoteRemove = 'MESSAGE_POLL_VOTE_REMOVE',
GuildScheduledEventCreate = 'GUILD_SCHEDULED_EVENT_CREATE',
GuildScheduledEventUpdate = 'GUILD_SCHEDULED_EVENT_UPDATE',
GuildScheduledEventDelete = 'GUILD_SCHEDULED_EVENT_DELETE',
@@ -277,27 +283,29 @@ export enum GatewayDispatchEvents {
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
@@ -311,8 +319,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -325,28 +333,30 @@ export type GatewayDispatchPayload =
| GatewayMessageCreateDispatch
| GatewayMessageDeleteBulkDispatch
| GatewayMessageDeleteDispatch
| GatewayMessagePollVoteAddDispatch
| GatewayMessagePollVoteRemoveDispatch
| GatewayMessageReactionAddDispatch
| GatewayMessageReactionRemoveAllDispatch
| GatewayMessageReactionRemoveDispatch
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
| GatewayWebhooksUpdateDispatch;
// #region Dispatch Payloads
@@ -451,7 +461,7 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
@@ -466,8 +476,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -691,8 +701,8 @@ export type GatewayEntitlementModifyDispatchData = APIEntitlement;
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
| GatewayDispatchEvents.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementModifyDispatchData
>;
@@ -775,7 +785,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
*
* See https://discord.com/developers/docs/resources/voice#voice-state-object
*/
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
voice_states: Omit<APIVoiceState, 'guild_id'>[];
/**
* Users in the guild
*
@@ -1011,10 +1021,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
*/
@@ -1359,7 +1369,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
@@ -1372,8 +1382,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
*/
@@ -1397,7 +1407,7 @@ export interface GatewayMessageEventExtraFields {
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
*/
member?: APIGuildMember;
member?: Omit<APIGuildMember, 'user'>;
/**
* Users specifically mentioned in the message
*
@@ -1477,7 +1487,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<
GatewayDispatchEvents.MessageReactionRemove,
'member' | 'message_author_id'
'burst_colors' | 'member' | 'message_author_id'
>;
/**
@@ -1608,6 +1618,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
@@ -1620,7 +1634,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
@@ -1635,22 +1652,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
@@ -1706,7 +1748,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
*/
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
/**
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
@@ -1778,6 +1820,45 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add
*/
export type GatewayMessagePollVoteAddDispatch = DataPayload<
GatewayDispatchEvents.MessagePollVoteAdd,
GatewayMessagePollVoteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove
*/
export type GatewayMessagePollVoteRemoveDispatch = DataPayload<
GatewayDispatchEvents.MessagePollVoteRemove,
GatewayMessagePollVoteDispatchData
>;
export interface GatewayMessagePollVoteDispatchData {
/**
* ID of the user
*/
user_id: Snowflake;
/**
* ID of the channel
*/
channel_id: Snowflake;
/**
* ID of the message
*/
message_id: Snowflake;
/**
* ID of the guild
*/
guild_id?: Snowflake;
/**
* ID of the answer
*/
answer_id: number;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads
@@ -1944,8 +2025,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
@@ -2038,7 +2119,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -2085,6 +2166,18 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
* The id of the user that posted the message that was reacted to
*/
message_author_id?: Snowflake;
/**
* True if this is a super-reaction
*/
burst: boolean;
/**
* Colors used for super-reaction animation in "#rrggbb" format
*/
burst_colors: string[];
/**
* The type of reaction
*/
type: ReactionType;
},
O
>

View File

@@ -184,56 +184,56 @@ 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
@@ -571,7 +571,7 @@ export type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.Mes
*/
export type GatewayMessageUpdateDispatch = DataPayload<
GatewayDispatchEvents.MessageUpdate,
{ id: string; channel_id: string } & Partial<APIMessage>
Partial<APIMessage> & { id: string; channel_id: string }
>;
/**
@@ -768,11 +768,11 @@ export interface GatewayResume {
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;
};
}

View File

@@ -258,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.
@@ -292,8 +292,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -312,11 +312,11 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
@@ -440,7 +440,7 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
@@ -805,10 +805,10 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
*
* @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
*/
@@ -1243,10 +1243,10 @@ export type GatewayMessageUpdateDispatch = DataPayload<
*
* @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
@@ -1849,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

@@ -28,12 +28,14 @@ import type {
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
GatewayThreadListSync as RawGatewayThreadListSync,
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
GatewayVoiceState,
APIVoiceState,
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
ChannelType,
} from '../payloads/v9/mod.ts';
import type { ReactionType } from '../rest/v9/mod.ts';
import type { Nullable } from '../utils/internals.ts';
import type { APIEntitlement } from '../v10.ts';
@@ -201,6 +203,8 @@ export enum GatewayIntentBits {
GuildScheduledEvents = 1 << 16,
AutoModerationConfiguration = 1 << 20,
AutoModerationExecution = 1 << 21,
GuildMessagePolls = 1 << 24,
DirectMessagePolls = 1 << 25,
}
/**
@@ -258,6 +262,8 @@ export enum GatewayDispatchEvents {
VoiceServerUpdate = 'VOICE_SERVER_UPDATE',
VoiceStateUpdate = 'VOICE_STATE_UPDATE',
WebhooksUpdate = 'WEBHOOKS_UPDATE',
MessagePollVoteAdd = 'MESSAGE_POLL_VOTE_ADD',
MessagePollVoteRemove = 'MESSAGE_POLL_VOTE_REMOVE',
GuildScheduledEventCreate = 'GUILD_SCHEDULED_EVENT_CREATE',
GuildScheduledEventUpdate = 'GUILD_SCHEDULED_EVENT_UPDATE',
GuildScheduledEventDelete = 'GUILD_SCHEDULED_EVENT_DELETE',
@@ -276,27 +282,29 @@ export enum GatewayDispatchEvents {
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
@@ -310,8 +318,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -324,28 +332,30 @@ export type GatewayDispatchPayload =
| GatewayMessageCreateDispatch
| GatewayMessageDeleteBulkDispatch
| GatewayMessageDeleteDispatch
| GatewayMessagePollVoteAddDispatch
| GatewayMessagePollVoteRemoveDispatch
| GatewayMessageReactionAddDispatch
| GatewayMessageReactionRemoveAllDispatch
| GatewayMessageReactionRemoveDispatch
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadUpdateDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
| GatewayWebhooksUpdateDispatch;
// #region Dispatch Payloads
@@ -450,7 +460,7 @@ export interface GatewayReadyDispatchData {
*
* See https://discord.com/developers/docs/resources/application#application-object
*/
application: Pick<APIApplication, 'id' | 'flags'>;
application: Pick<APIApplication, 'flags' | 'id'>;
}
/**
@@ -465,8 +475,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -690,8 +700,8 @@ export type GatewayEntitlementModifyDispatchData = APIEntitlement;
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
| GatewayDispatchEvents.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementModifyDispatchData
>;
@@ -774,7 +784,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
*
* See https://discord.com/developers/docs/resources/voice#voice-state-object
*/
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
voice_states: Omit<APIVoiceState, 'guild_id'>[];
/**
* Users in the guild
*
@@ -1010,10 +1020,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
*/
@@ -1358,7 +1368,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
@@ -1371,8 +1381,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
*/
@@ -1396,7 +1406,7 @@ export interface GatewayMessageEventExtraFields {
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
*/
member?: APIGuildMember;
member?: Omit<APIGuildMember, 'user'>;
/**
* Users specifically mentioned in the message
*
@@ -1476,7 +1486,7 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<
GatewayDispatchEvents.MessageReactionRemove,
'member' | 'message_author_id'
'burst_colors' | 'member' | 'message_author_id'
>;
/**
@@ -1607,6 +1617,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
@@ -1619,7 +1633,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
@@ -1634,22 +1651,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
@@ -1705,7 +1747,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
*/
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
/**
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
@@ -1777,6 +1819,45 @@ export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLog
guild_id: Snowflake;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add
*/
export type GatewayMessagePollVoteAddDispatch = DataPayload<
GatewayDispatchEvents.MessagePollVoteAdd,
GatewayMessagePollVoteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove
*/
export type GatewayMessagePollVoteRemoveDispatch = DataPayload<
GatewayDispatchEvents.MessagePollVoteRemove,
GatewayMessagePollVoteDispatchData
>;
export interface GatewayMessagePollVoteDispatchData {
/**
* ID of the user
*/
user_id: Snowflake;
/**
* ID of the channel
*/
channel_id: Snowflake;
/**
* ID of the message
*/
message_id: Snowflake;
/**
* ID of the guild
*/
guild_id?: Snowflake;
/**
* ID of the answer
*/
answer_id: number;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads
@@ -1943,8 +2024,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
@@ -2037,7 +2118,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -2084,6 +2165,18 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
* The id of the user that posted the message that was reacted to
*/
message_author_id?: Snowflake;
/**
* True if this is a super-reaction
*/
burst: boolean;
/**
* Colors used for super-reaction animation in "#rrggbb" format
*/
burst_colors?: string[];
/**
* The type of reaction
*/
type: ReactionType;
},
O
>

View File

@@ -276,6 +276,18 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage
*/
SendVoiceMessages: 1n << 46n,
/**
* Allows sending polls
*
* Applies to channel types: Text, Voice, Stage
*/
SendPolls: 1n << 49n,
/**
* Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server
*
* Applies to channel types: Text, Voice, Stage
*/
UseExternalApps: 1n << 50n,
} as const;
/**
@@ -305,7 +317,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

@@ -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

@@ -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

@@ -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

@@ -54,6 +54,6 @@ export enum ApplicationCommandPermissionType {
*/
export const APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
Everyone: (guildId: string | bigint): Snowflake => String(guildId),
AllChannels: (guildId: string | bigint): Snowflake => String(BigInt(guildId) - 1n),
Everyone: (guildId: bigint | string): Snowflake => String(guildId),
AllChannels: (guildId: bigint | string): Snowflake => String(BigInt(guildId) - 1n),
};

View File

@@ -74,6 +74,8 @@ export interface APIApplicationCommand {
default_member_permissions: Permissions | null;
/**
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
*
* @deprecated Use `contexts` instead
*/
dm_permission?: boolean;
/**
@@ -88,6 +90,18 @@ export interface APIApplicationCommand {
* Indicates whether the command is age-restricted, defaults to `false`
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
* Autoincrementing version identifier updated during substantial record changes
*/
@@ -103,6 +117,38 @@ export enum ApplicationCommandType {
Message,
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
*/
export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
/**
* App is installable to users
*/
UserInstall = 1,
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
*/
export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
*/
@@ -118,7 +164,7 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommand, Data>,
'channel' | 'channel_id' | 'data' | 'app_permissions'
'app_permissions' | 'channel_id' | 'channel' | 'data'
>
>;

View File

@@ -1,5 +1,5 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v10.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v10.ts';
import type {
APIAttachment,
APIChannel,
@@ -14,17 +14,51 @@ import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
*/
export interface APIMessageInteractionMetadata {
/**
* ID of the interaction
*/
id: Snowflake;
/**
* Type of interaction
*/
type: InteractionType;
/**
* User who triggered the interaction
*/
user: APIUser;
/**
* IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* ID of the original response message, present only on follow-up messages
*/
original_response_message_id?: Snowflake;
/**
* ID of the message that contained interactive component, present only on messages created from component interactions
*/
interacted_message_id?: Snowflake;
/**
* Metadata for the interaction that was used to open the modal, present only on modal submit interactions
*/
triggering_interaction_metadata?: APIMessageInteractionMetadata;
}
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'
>;
/**
@@ -122,7 +156,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
*/
app_permissions?: Permissions;
app_permissions: Permissions;
/**
* The selected language of the invoking user
*/
@@ -135,11 +169,23 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
/**
* Mapping of installation contexts that the interaction was authorized for to related user or guild IDs.
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* Context where the interaction was triggered from
*/
context?: InteractionContextType;
}
export type APIAuthorizingIntegrationOwnersMap = {
[key in ApplicationIntegrationType]?: Snowflake;
};
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
Original,
'member' | 'guild_id'
'guild_id' | 'member'
> &
Required<Pick<Original, 'user'>>;
@@ -147,7 +193,7 @@ 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;
@@ -160,12 +206,12 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
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;
}
@@ -188,8 +234,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

@@ -15,7 +15,7 @@ export type APIMessageComponentInteraction = APIBaseInteraction<
Required<
Pick<
APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>,
'channel' | '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' | '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' | '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

@@ -18,12 +18,12 @@ 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
| APIPremiumRequiredInteractionResponse;
@@ -98,6 +98,8 @@ export enum InteractionResponseType {
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated See https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes
*/
PremiumRequired,
}
@@ -107,7 +109,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export interface APICommandAutocompleteInteractionResponseCallbackData {

View File

@@ -5,6 +5,7 @@
import type { Permissions, Snowflake } from '../../globals.ts';
import type { LocalizationMap } from '../common.ts';
import type { APIPartialGuild } from './guild.ts';
import type { ApplicationIntegrationType } from './interactions.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APITeam } from './teams.ts';
import type { APIUser } from './user.ts';
@@ -107,6 +108,10 @@ export interface APIApplication {
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Approximate count of users that have installed the app
*/
approximate_user_install_count?: number;
/**
* Array of redirect URIs for the application
*/
@@ -128,6 +133,12 @@ export interface APIApplication {
* Settings for the application's default in-app authorization link, if enabled
*/
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**
* The application's default custom authorization link, if enabled
*/
@@ -139,6 +150,14 @@ export interface APIApplicationInstallParams {
permissions: Permissions;
}
export interface APIApplicationIntegrationTypeConfiguration {
oauth2_install_params?: APIApplicationInstallParams;
}
export type APIApplicationIntegrationTypesConfigMap = {
[key in ApplicationIntegrationType]?: APIApplicationIntegrationTypeConfiguration;
};
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
*/

View File

@@ -10,13 +10,14 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIOverwrite } from './channel.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
IntegrationExpireBehavior,
} from './guild.ts';
@@ -204,6 +205,15 @@ export enum AuditLogEvent {
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
OnboardingPromptCreate = 163,
OnboardingPromptUpdate,
OnboardingPromptDelete,
OnboardingCreate,
OnboardingUpdate,
HomeSettingsCreate = 190,
HomeSettingsUpdate,
}
/**
@@ -335,82 +345,87 @@ 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
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyCommunicationDisabledUntil
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
| APIAuditLogChangeKeyEventType
| APIAuditLogChangeKeyExemptChannels
| APIAuditLogChangeKeyExemptRoles
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| 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
@@ -521,12 +536,12 @@ export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_c
/**
* Returned when new role(s) are added
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when role(s) are removed
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
@@ -543,6 +558,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
*/
@@ -816,6 +839,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;
/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;
interface AuditLogChangeData<K extends string, D> {
key: K;
/**

View File

@@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType {
* Check if content contains more mentions than allowed (Maximum of 1 per guild)
*/
MentionSpam,
/**
* Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild)
*/
MemberProfile,
}
/**
@@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
* 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}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
keyword_filter?: string[];
/**
@@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
* 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}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
allow_list?: string[];
/**
@@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
*
* Only Rust flavored regex is currently supported (Maximum of 260 characters)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
regex_patterns?: string[];
/**
@@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType {
* When a member sends or edits a message in the guild
*/
MessageSend = 1,
/**
* When a member edits their profile
*/
MemberUpdate,
}
/**
@@ -187,6 +195,10 @@ export enum AutoModerationActionType {
* Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
*/
Timeout,
/**
* Prevents a member from using text, voice, or other interactions
*/
BlockMemberInteraction,
}
/**

View File

@@ -6,8 +6,9 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication } from './application.ts';
import type { APIPartialEmoji } from './emoji.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions.ts';
import type { APIRole } from './permissions.ts';
import type { APIPoll } from './poll.ts';
import type { APISticker, APIStickerItem } from './sticker.ts';
import type { APIUser } from './user.ts';
@@ -41,15 +42,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.GuildVoice
| ChannelType.GuildStageVoice;
| ChannelType.PrivateThread
| ChannelType.PublicThread;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -110,7 +111,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 | ChannelType.GuildForum | ChannelType.GuildMedia>
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -134,7 +135,7 @@ export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>
export interface APIVoiceChannelBase<T extends ChannelType>
extends APIGuildChannel<T>,
Omit<APITextBasedChannel<T>, 'name' | 'last_pin_timestamp'> {
Omit<APITextBasedChannel<T>, 'last_pin_timestamp' | 'name'> {
/**
* The bitrate (in bits) of the voice or stage channel
*/
@@ -204,7 +205,7 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
@@ -373,16 +374,16 @@ 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
| APIGuildMediaChannel;
| APIGuildMediaChannel
| APIGuildStageVoiceChannel
| APIGuildVoiceChannel
| APINewsChannel
| APITextChannel
| APIThreadChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -607,7 +608,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
*/
@@ -666,8 +667,16 @@ export interface APIMessage {
* See https://discord.com/developers/docs/resources/channel#message-object
*/
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
* Sent if the message is a response to an Interaction
*
* @deprecated In favor of `interaction_metadata`
*/
interaction?: APIMessageInteraction;
/**
@@ -715,6 +724,25 @@ export interface APIMessage {
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
/**
* A poll!
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
*
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
*/
message_snapshots?: APIMessageSnapshot[];
/**
* The call associated with the message
*/
call?: APIMessageCall;
}
/**
@@ -757,6 +785,11 @@ export enum MessageType {
StageRaiseHand,
StageTopic,
GuildApplicationPremiumSubscription,
GuildIncidentAlertModeEnabled = 36,
GuildIncidentAlertModeDisabled,
GuildIncidentReportRaid,
GuildIncidentReportFalseAlarm,
}
/**
@@ -781,6 +814,10 @@ export interface APIMessageActivity {
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
*/
export interface APIMessageReference {
/**
* Type of reference
*/
type?: MessageReferenceType;
/**
* ID of the originating message
*/
@@ -805,6 +842,20 @@ export enum MessageActivityType {
JoinRequest = 5,
}
/**
* https://discord.com/developers/docs/resources/channel#message-reference-types
*/
export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
*/
@@ -859,6 +910,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}
/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/resources/channel#role-subscription-data-object-role-subscription-data-object-structure
*/
@@ -900,19 +965,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;
}
/**
@@ -1335,6 +1426,10 @@ export interface APIAttachment {
* Name of file attached
*/
filename: string;
/**
* The title of the file
*/
title?: string;
/**
* Description for the file
*/
@@ -1568,7 +1663,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
@@ -1583,7 +1678,18 @@ export interface APIButtonComponentWithURL extends APIButtonComponentBase<Button
url: string;
}
export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
export interface APIButtonComponentWithSKUId
extends Omit<APIButtonComponentBase<ButtonStyle.Premium>, 'custom_id' | 'emoji' | 'label'> {
/**
* The id for a purchasable SKU
*/
sku_id: Snowflake;
}
export type APIButtonComponent =
| APIButtonComponentWithCustomId
| APIButtonComponentWithSKUId
| APIButtonComponentWithURL;
/**
* https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
@@ -1594,6 +1700,7 @@ export enum ButtonStyle {
Success,
Danger,
Link,
Premium,
}
/**
@@ -1609,11 +1716,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
@@ -1645,10 +1752,10 @@ export interface APIBaseSelectMenuComponent<
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
| ComponentType.RoleSelect
| ComponentType.UserSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
@@ -1688,7 +1795,7 @@ export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
*/
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User
>;
/**
@@ -1729,18 +1836,18 @@ export type APIAutoPopulatedSelectMenuComponent =
* 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;
/**
@@ -1748,7 +1855,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;
/**
@@ -1799,6 +1906,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
*/
export interface APIMessageSnapshot {
/**
* Subset of the message object fields
*/
message: APIMessageSnapshotFields;
/**
* Id of the origin message's guild
*/
guild_id?: Snowflake;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
*/
@@ -1845,8 +1966,8 @@ export enum ChannelFlags {
/**
* 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;
@@ -1857,3 +1978,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
// Modal components
export type APIModalActionRowComponent = APITextInputComponent;
export type APIMessageSnapshotFields = Pick<
APIMessage,
| 'attachments'
| 'content'
| 'edited_timestamp'
| 'embeds'
| 'flags'
| 'mention_roles'
| 'mentions'
| 'timestamp'
| 'type'
>;

View File

@@ -227,7 +227,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -292,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
@@ -318,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

@@ -8,7 +8,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
import type { APIUser } from './user.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
@@ -121,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 | 1_800 | 3_600;
afk_timeout: 1_800 | 3_600 | 60 | 300 | 900;
/**
* `true` if the guild widget is enabled
*/
@@ -621,7 +621,7 @@ export interface APIGuildMember {
*
* See https://discord.com/developers/docs/resources/user#user-object
*/
user?: APIUser;
user: APIUser;
/**
* This users guild nickname
*/
@@ -668,6 +668,12 @@ export interface APIGuildMember {
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
communication_disabled_until?: string | null;
/**
* The data for the member's guild avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
@@ -806,7 +812,7 @@ export interface APIGuildIntegration {
scopes?: OAuth2Scopes[];
}
export type APIGuildIntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors

View File

@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
* The cover image of the scheduled event
*/
image?: string | null;
/**
* The definition for how often this event should recur
*/
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
*/
export interface APIGuildScheduledEventRecurrenceRule {
/**
* Starting time of the recurrence interval
*/
start: string;
/**
* Ending time of the recurrence interval
*/
end: string | null;
/**
* How often the event occurs
*/
frequency: GuildScheduledEventRecurrenceRuleFrequency;
/**
* The spacing between the events, defined by `frequency`.
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
* would be "every-other week"
*/
interval: number;
/**
* Set of specific days within a week for the event to recur on
*/
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
/**
* List of specific days within a specific week (1-5) to recur on
*/
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
/**
* Set of specific months to recur on
*/
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
/**
* Set of specific dates within a month to recur on
*/
by_month_day: number[] | null;
/**
* Set of days within a year to recur on (1-364)
*/
by_year_day: number[] | null;
/**
* The total amount of times that the event is allowed to recur before stopping
*/
count: number | null;
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
*/
export enum GuildScheduledEventRecurrenceRuleFrequency {
Yearly,
Monthly,
Weekly,
Daily,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
*/
export enum GuildScheduledEventRecurrenceRuleWeekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
*/
export enum GuildScheduledEventRecurrenceRuleMonth {
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
*/
export interface GuildScheduledEventRecurrenceRuleNWeekday {
/**
* The week to reoccur on.
*/
n: 1 | 2 | 3 | 4 | 5;
/**
* The day within the week to reoccur on
*/
day: GuildScheduledEventRecurrenceRuleWeekday;
}
export interface APIStageInstanceGuildScheduledEvent
@@ -90,9 +197,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'
>;
/**
@@ -90,6 +90,19 @@ export interface APIInvite {
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
*/
guild_scheduled_event?: APIGuildScheduledEvent;
/**
* The invite type
*/
type: InviteType;
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-types
*/
export enum InviteType {
Guild,
GroupDM,
Friend,
}
/**

View File

@@ -10,6 +10,7 @@ export * from './guildScheduledEvent.ts';
export * from './interactions.ts';
export * from './invite.ts';
export * from './oauth2.ts';
export * from './poll.ts';
export * from './permissions.ts';
export * from './stageInstance.ts';
export * from './sticker.ts';

View File

@@ -40,16 +40,48 @@ export interface APIEntitlement {
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
/**
* For consumable items, whether or not the entitlement has been consumed
*/
consumed?: boolean;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased by user
*/
Purchase = 1,
/**
* Entitlement for Discord Nitro subscription
*/
PremiumSubscription,
/**
* Entitlement was gifted by developer
*/
DeveloperGift,
/**
* Entitlement was purchased by a dev in application test mode
*/
TestModePurchase,
/**
* Entitlement was granted when the SKU was free
*/
FreePurchase,
/**
* Entitlement was gifted by another user
*/
UserGift,
/**
* Entitlement was claimed by user for free as a Nitro Subscriber
*/
PremiumPurchase,
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
ApplicationSubscription,
}
/**
@@ -104,6 +136,14 @@ export enum SKUFlags {
}
export enum SKUType {
/**
* Durable one-time purchase
*/
Durable = 2,
/**
* Consumable one-time purchase
*/
Consumable = 3,
/**
* Represents a recurring subscription
*/

111
deno/payloads/v10/poll.ts Normal file
View File

@@ -0,0 +1,111 @@
/**
* Types extracted from https://discord.com/developers/docs/resources/poll
*/
import type { APIPartialEmoji } from './emoji.ts';
/**
* https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure
*/
export interface APIPoll {
/**
* The question of the poll
*/
question: APIPollMedia;
/**
* Each of the answers available in the poll, up to 10
*/
answers: APIPollAnswer[];
/**
* The time when the poll ends (IS08601 timestamp)
*/
expiry: string;
/**
* Whether a user can select multiple answers
*
* @default false
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*
* @default PollLayoutType.Default
*/
layout_type: PollLayoutType;
/**
* The results of the poll
*/
results?: APIPollResults;
}
/**
* https://discord.com/developers/docs/resources/poll#layout-type
*/
export enum PollLayoutType {
/**
* The, uhm, default layout type
*/
Default = 1,
}
/**
* https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure
*/
export interface APIPollMedia {
/**
* The text of the field
*
* The maximum length is `300` for the question, and `55` for any answer
*/
text?: string;
/**
* The emoji of the field
*/
emoji?: APIPartialEmoji;
}
/**
* https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure
*/
export interface APIPollAnswer {
/**
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
*/
answer_id: number;
/**
* The data of the answer
*/
poll_media: APIPollMedia;
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure
*/
export interface APIPollResults {
/**
* Whether the votes have been precisely counted
*/
is_finalized: boolean;
/**
* The counts for each answer
*/
answer_counts: APIPollAnswerCount[];
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure
*/
export interface APIPollAnswerCount {
/**
* The `answer_id`
*/
id: number;
/**
* The number of votes for this answer
*/
count: number;
/**
* Whether the current user voted for this answer
*/
me_voted: boolean;
}

View File

@@ -45,6 +45,8 @@ export interface APIStageInstance {
export enum StageInstancePrivacyLevel {
/**
* The stage instance is visible publicly, such as on stage discovery
*
* @deprecated
*/
Public = 1,
/**

View File

@@ -92,7 +92,7 @@ export enum StickerFormatType {
/**
* 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

@@ -87,8 +87,16 @@ export interface APIUser {
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @deprecated Use `avatar_decoration_data` instead
*/
avatar_decoration?: string | null;
/**
* The data for the user's avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
@@ -266,6 +274,8 @@ export interface APIConnection {
export enum ConnectionService {
BattleNet = 'battlenet',
BungieNet = 'bungie',
Domain = 'domain',
eBay = 'ebay',
EpicGames = 'epicgames',
Facebook = 'facebook',
@@ -276,6 +286,7 @@ export enum ConnectionService {
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
RiotGames = 'riotgames',
Roblox = 'roblox',
Spotify = 'spotify',
Skype = 'skype',
Steam = 'steam',
@@ -316,5 +327,21 @@ 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>;
}
/**
* https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
export interface APIAvatarDecorationData {
/**
* The avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*/
asset: string;
/**
* The id of the avatar decoration's SKU
*/
sku_id: Snowflake;
}

View File

@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
*/
export interface GatewayVoiceState {
export type GatewayVoiceState = APIVoiceState;
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*/
export interface APIVoiceState {
/**
* The guild id this voice state is for
*/

View File

@@ -176,56 +176,56 @@ export enum AuditLogOptionsType {
* @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

View File

@@ -78,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;

View File

@@ -123,7 +123,7 @@ export interface GatewayActivityTimestamps {
*
* @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
@@ -149,7 +149,7 @@ export type GatewayActivityAssets = Partial<
*
* @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

View File

@@ -22,7 +22,7 @@ export enum ApplicationCommandOptionType {
*
* @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

@@ -72,15 +72,15 @@ export * from './_chatInput/user.ts';
* @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
@@ -88,9 +88,9 @@ export type APIApplicationCommandBasicOption =
* @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
@@ -98,23 +98,23 @@ export type APIApplicationCommandOption =
* @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

View File

@@ -56,8 +56,8 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
* @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
@@ -111,7 +111,7 @@ export type APIMessageApplicationCommandGuildInteraction =
*
* @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
@@ -119,8 +119,8 @@ export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | A
* @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
@@ -128,5 +128,5 @@ export type APIContextMenuDMInteraction =
* @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

@@ -101,7 +101,7 @@ export interface APIInteractionDataResolvedChannel extends Required<APIPartialCh
*
* @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;
}

View File

@@ -10,15 +10,15 @@ 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'
>;
/**
@@ -128,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'>>;
@@ -139,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

@@ -22,12 +22,12 @@ export enum InteractionType {
* @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;
/**
@@ -127,7 +127,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
/**

View File

@@ -271,70 +271,70 @@ export enum AuditLogOptionsType {
* @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

View File

@@ -53,11 +53,11 @@ export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GuildChannelType = Exclude<
| TextChannelType
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildNews
| ChannelType.GuildStore,
| ChannelType.GuildStageVoice
| ChannelType.GuildStore
| ChannelType.GuildVoice
| TextChannelType,
ChannelType.DM | ChannelType.GroupDM
>;
@@ -218,14 +218,14 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIChannel =
| APIGroupDMChannel
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildStoreChannel
| APIVoiceChannel
| APIGroupDMChannel
| APIGuildCategoryChannel
| APINewsChannel;
| APIGuildStoreChannel
| APINewsChannel
| APINewsChannel
| APITextChannel
| APIVoiceChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -397,7 +397,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
*/
@@ -1170,7 +1170,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
@@ -1327,11 +1327,11 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
export type APIMessageComponent = APIActionRowComponent<APIMessageActionRowComponent> | APIMessageActionRowComponent;
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
export type APIModalComponent = APIActionRowComponent<APIModalActionRowComponent> | APIModalActionRowComponent;
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.

View File

@@ -219,7 +219,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -284,7 +284,7 @@ export interface GatewayActivityTimestamps {
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
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#activity-object-activity-party
@@ -316,7 +316,7 @@ export type GatewayActivityAssets = Partial<
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
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

View File

@@ -790,7 +790,7 @@ export interface APIGuildIntegration {
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIGuildInteractionType = 'twitch' | 'youtube' | 'discord';
export type APIGuildInteractionType = 'discord' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors

View File

@@ -104,9 +104,9 @@ export interface APIExternalGuildScheduledEvent
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
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

@@ -34,11 +34,11 @@ export * from './_interactions/responses.ts';
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIInteraction =
| APIPingInteraction
| APIApplicationCommandAutocompleteInteraction
| APIApplicationCommandInteraction
| APIMessageComponentInteraction
| APIApplicationCommandAutocompleteInteraction
| APIModalSubmitInteraction;
| APIModalSubmitInteraction
| APIPingInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
@@ -46,9 +46,9 @@ export type APIInteraction =
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type APIDMInteraction =
| APIApplicationCommandAutocompleteDMInteraction
| APIApplicationCommandDMInteraction
| APIMessageComponentDMInteraction
| APIApplicationCommandAutocompleteDMInteraction
| APIModalSubmitDMInteraction;
/**
@@ -57,7 +57,7 @@ export type APIDMInteraction =
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
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'
>;
/**

View File

@@ -99,7 +99,7 @@ export enum StickerFormatType {
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
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

@@ -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

@@ -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

@@ -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

@@ -54,6 +54,6 @@ export enum ApplicationCommandPermissionType {
*/
export const APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
Everyone: (guildId: string | bigint): Snowflake => String(guildId),
AllChannels: (guildId: string | bigint): Snowflake => String(BigInt(guildId) - 1n),
Everyone: (guildId: bigint | string): Snowflake => String(guildId),
AllChannels: (guildId: bigint | string): Snowflake => String(BigInt(guildId) - 1n),
};

View File

@@ -74,6 +74,8 @@ export interface APIApplicationCommand {
default_member_permissions: Permissions | null;
/**
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
*
* @deprecated Use `contexts` instead
*/
dm_permission?: boolean;
/**
@@ -88,6 +90,18 @@ export interface APIApplicationCommand {
* Indicates whether the command is age-restricted, defaults to `false`
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
*
* @unstable
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
*
* @unstable
*/
contexts?: InteractionContextType[] | null;
/**
* Autoincrementing version identifier updated during substantial record changes
*/
@@ -103,6 +117,38 @@ export enum ApplicationCommandType {
Message,
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
*/
export enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
/**
* App is installable to users
*/
UserInstall = 1,
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
*/
export enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2,
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
*/
@@ -118,7 +164,7 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommand, Data>,
'channel' | 'channel_id' | 'data' | 'app_permissions'
'app_permissions' | 'channel_id' | 'channel' | 'data'
>
>;

View File

@@ -1,5 +1,5 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v9.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v9.ts';
import type {
APIAttachment,
APIChannel,
@@ -14,17 +14,51 @@ import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
*/
export interface APIMessageInteractionMetadata {
/**
* ID of the interaction
*/
id: Snowflake;
/**
* Type of interaction
*/
type: InteractionType;
/**
* User who triggered the interaction
*/
user: APIUser;
/**
* IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* ID of the original response message, present only on follow-up messages
*/
original_response_message_id?: Snowflake;
/**
* ID of the message that contained interactive component, present only on messages created from component interactions
*/
interacted_message_id?: Snowflake;
/**
* Metadata for the interaction that was used to open the modal, present only on modal submit interactions
*/
triggering_interaction_metadata?: APIMessageInteractionMetadata;
}
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'
>;
/**
@@ -122,7 +156,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
*/
app_permissions?: Permissions;
app_permissions: Permissions;
/**
* The selected language of the invoking user
*/
@@ -135,11 +169,23 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
/**
* Mapping of installation contexts that the interaction was authorized for to related user or guild IDs.
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* Context where the interaction was triggered from
*/
context?: InteractionContextType;
}
export type APIAuthorizingIntegrationOwnersMap = {
[key in ApplicationIntegrationType]?: Snowflake;
};
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
Original,
'member' | 'guild_id'
'guild_id' | 'member'
> &
Required<Pick<Original, 'user'>>;
@@ -147,7 +193,7 @@ 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;
@@ -160,12 +206,12 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
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;
}
@@ -188,8 +234,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

@@ -15,7 +15,7 @@ export type APIMessageComponentInteraction = APIBaseInteraction<
Required<
Pick<
APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>,
'channel' | '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' | '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' | '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

@@ -18,12 +18,12 @@ 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
| APIPremiumRequiredInteractionResponse;
@@ -98,6 +98,8 @@ export enum InteractionResponseType {
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated See https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes
*/
PremiumRequired,
}
@@ -107,7 +109,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export interface APICommandAutocompleteInteractionResponseCallbackData {

View File

@@ -5,6 +5,7 @@
import type { Permissions, Snowflake } from '../../globals.ts';
import type { LocalizationMap } from '../common.ts';
import type { APIPartialGuild } from './guild.ts';
import type { ApplicationIntegrationType } from './interactions.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APITeam } from './teams.ts';
import type { APIUser } from './user.ts';
@@ -107,6 +108,10 @@ export interface APIApplication {
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Approximate count of users that have installed the app
*/
approximate_user_install_count?: number;
/**
* Array of redirect URIs for the application
*/
@@ -128,6 +133,12 @@ export interface APIApplication {
* Settings for the application's default in-app authorization link, if enabled
*/
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*
* @unstable
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**
* The application's default custom authorization link, if enabled
*/
@@ -139,6 +150,14 @@ export interface APIApplicationInstallParams {
permissions: Permissions;
}
export interface APIApplicationIntegrationTypeConfiguration {
oauth2_install_params?: APIApplicationInstallParams;
}
export type APIApplicationIntegrationTypesConfigMap = {
[key in ApplicationIntegrationType]?: APIApplicationIntegrationTypeConfiguration;
};
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
*/

View File

@@ -10,13 +10,14 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIOverwrite } from './channel.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
IntegrationExpireBehavior,
} from './guild.ts';
@@ -204,6 +205,15 @@ export enum AuditLogEvent {
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
OnboardingPromptCreate = 163,
OnboardingPromptUpdate,
OnboardingPromptDelete,
OnboardingCreate,
OnboardingUpdate,
HomeSettingsCreate = 190,
HomeSettingsUpdate,
}
/**
@@ -335,82 +345,87 @@ 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
| APIAuditLogChangeKeyAvailableTags
| APIAuditLogChangeKeyAvatarHash
| APIAuditLogChangeKeyId
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyBitrate
| APIAuditLogChangeKeyChannelId
| APIAuditLogChangeKeyCode
| APIAuditLogChangeKeyColor
| APIAuditLogChangeKeyCommunicationDisabledUntil
| APIAuditLogChangeKeyDeaf
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
| APIAuditLogChangeKeyDefaultMessageNotifications
| APIAuditLogChangeKeyDefaultReactionEmoji
| APIAuditLogChangeKeyDefaultThreadRateLimitPerUser
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
| APIAuditLogChangeKeyEventType
| APIAuditLogChangeKeyExemptChannels
| APIAuditLogChangeKeyExemptRoles
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyPrivacyLevel
| APIAuditLogChangeKeyTags
| APIAuditLogChangeKeyExplicitContentFilter
| APIAuditLogChangeKeyFlags
| 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
@@ -521,12 +536,12 @@ export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_c
/**
* Returned when new role(s) are added
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when role(s) are removed
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
@@ -543,6 +558,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
*/
@@ -816,6 +839,33 @@ export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles',
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;
/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;
interface AuditLogChangeData<K extends string, D> {
key: K;
/**

View File

@@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType {
* Check if content contains more mentions than allowed (Maximum of 1 per guild)
*/
MentionSpam,
/**
* Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild)
*/
MemberProfile,
}
/**
@@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
* 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}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
keyword_filter?: string[];
/**
@@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
* 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}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
allow_list?: string[];
/**
@@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
*
* Only Rust flavored regex is currently supported (Maximum of 260 characters)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
regex_patterns?: string[];
/**
@@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType {
* When a member sends or edits a message in the guild
*/
MessageSend = 1,
/**
* When a member edits their profile
*/
MemberUpdate,
}
/**
@@ -187,6 +195,10 @@ export enum AutoModerationActionType {
* Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
*/
Timeout,
/**
* Prevents a member from using text, voice, or other interactions
*/
BlockMemberInteraction,
}
/**

View File

@@ -6,8 +6,9 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication } from './application.ts';
import type { APIPartialEmoji } from './emoji.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
import type { APIInteractionDataResolved, APIMessageInteraction, APIMessageInteractionMetadata } from './interactions.ts';
import type { APIRole } from './permissions.ts';
import type { APIPoll } from './poll.ts';
import type { APISticker, APIStickerItem } from './sticker.ts';
import type { APIUser } from './user.ts';
@@ -41,15 +42,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.GuildVoice
| ChannelType.GuildStageVoice;
| ChannelType.PrivateThread
| ChannelType.PublicThread;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -110,7 +111,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 | ChannelType.GuildForum | ChannelType.GuildMedia>
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -134,7 +135,7 @@ export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>
export interface APIVoiceChannelBase<T extends ChannelType>
extends APIGuildChannel<T>,
Omit<APITextBasedChannel<T>, 'name' | 'last_pin_timestamp'> {
Omit<APITextBasedChannel<T>, 'last_pin_timestamp' | 'name'> {
/**
* The bitrate (in bits) of the voice or stage channel
*/
@@ -200,7 +201,7 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
@@ -369,16 +370,16 @@ 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
| APIGuildMediaChannel;
| APIGuildMediaChannel
| APIGuildStageVoiceChannel
| APIGuildVoiceChannel
| APINewsChannel
| APITextChannel
| APIThreadChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -599,7 +600,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
*/
@@ -658,6 +659,12 @@ export interface APIMessage {
* See https://discord.com/developers/docs/resources/channel#message-object
*/
referenced_message?: APIMessage | null;
/**
* Sent if the message is sent as a result of an interaction
*
* @unstable
*/
interaction_metadata?: APIMessageInteractionMetadata;
/**
* Sent if the message is a response to an Interaction
*/
@@ -702,6 +709,25 @@ export interface APIMessage {
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
/**
* A poll!
*
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
*
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
*
* See https://support-dev.discord.com/hc/articles/4404772028055
*/
poll?: APIPoll;
/**
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
*/
message_snapshots?: APIMessageSnapshot[];
/**
* The call associated with the message
*/
call?: APIMessageCall;
}
/**
@@ -744,6 +770,11 @@ export enum MessageType {
StageRaiseHand,
StageTopic,
GuildApplicationPremiumSubscription,
GuildIncidentAlertModeEnabled = 36,
GuildIncidentAlertModeDisabled,
GuildIncidentReportRaid,
GuildIncidentReportFalseAlarm,
}
/**
@@ -768,6 +799,10 @@ export interface APIMessageActivity {
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
*/
export interface APIMessageReference {
/**
* Type of reference
*/
type?: MessageReferenceType;
/**
* ID of the originating message
*/
@@ -792,6 +827,20 @@ export enum MessageActivityType {
JoinRequest = 5,
}
/**
* https://discord.com/developers/docs/resources/channel#message-reference-types
*/
export enum MessageReferenceType {
/**
* A standard reference used by replies
*/
Default = 0,
/**
* Reference used to point to a message at a point in time
*/
Forward = 1,
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
*/
@@ -846,6 +895,20 @@ export enum MessageFlags {
IsVoiceMessage = 1 << 13,
}
/**
* https://discord.com/developers/docs/resources/channel#message-call-object-message-call-object-structure
*/
export interface APIMessageCall {
/**
* Array of user ids that participated in the call
*/
participants: Snowflake[];
/**
* ISO8601 timestamp when the call ended
*/
ended_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/resources/channel#followed-channel-object
*/
@@ -865,19 +928,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;
}
/**
@@ -1304,6 +1393,10 @@ export interface APIAttachment {
* Name of file attached
*/
filename: string;
/**
* The title of the file
*/
title?: string;
/**
* Description for the file
*/
@@ -1537,7 +1630,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
@@ -1552,7 +1645,18 @@ export interface APIButtonComponentWithURL extends APIButtonComponentBase<Button
url: string;
}
export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
export interface APIButtonComponentWithSKUId
extends Omit<APIButtonComponentBase<ButtonStyle.Premium>, 'custom_id' | 'emoji' | 'label'> {
/**
* The id for a purchasable SKU
*/
sku_id: Snowflake;
}
export type APIButtonComponent =
| APIButtonComponentWithCustomId
| APIButtonComponentWithSKUId
| APIButtonComponentWithURL;
/**
* https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
@@ -1563,6 +1667,7 @@ export enum ButtonStyle {
Success,
Danger,
Link,
Premium,
}
/**
@@ -1578,11 +1683,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
@@ -1614,10 +1719,10 @@ export interface APIBaseSelectMenuComponent<
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
| ComponentType.RoleSelect
| ComponentType.UserSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
@@ -1657,7 +1762,7 @@ export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
*/
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User
>;
/**
@@ -1698,18 +1803,18 @@ export type APIAutoPopulatedSelectMenuComponent =
* 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;
/**
@@ -1717,7 +1822,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;
/**
@@ -1768,6 +1873,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
required?: boolean;
}
/**
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
*/
export interface APIMessageSnapshot {
/**
* Subset of the message object fields
*/
message: APIMessageSnapshotFields;
/**
* Id of the origin message's guild
*/
guild_id?: Snowflake;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
*/
@@ -1814,8 +1933,8 @@ export enum ChannelFlags {
/**
* 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;
@@ -1826,3 +1945,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
// Modal components
export type APIModalActionRowComponent = APITextInputComponent;
export type APIMessageSnapshotFields = Pick<
APIMessage,
| 'attachments'
| 'content'
| 'edited_timestamp'
| 'embeds'
| 'flags'
| 'mention_roles'
| 'mentions'
| 'timestamp'
| 'type'
>;

View File

@@ -215,7 +215,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -280,7 +280,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
@@ -306,7 +306,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

@@ -8,7 +8,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
import type { APIUser } from './user.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
@@ -121,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 | 1_800 | 3_600;
afk_timeout: 1_800 | 3_600 | 60 | 300 | 900;
/**
* `true` if the guild widget is enabled
*/
@@ -613,7 +613,7 @@ export interface APIGuildMember {
*
* See https://discord.com/developers/docs/resources/user#user-object
*/
user?: APIUser;
user: APIUser;
/**
* This users guild nickname
*/
@@ -660,6 +660,12 @@ export interface APIGuildMember {
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
communication_disabled_until?: string | null;
/**
* The data for the member's guild avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
@@ -798,7 +804,7 @@ export interface APIGuildIntegration {
scopes?: OAuth2Scopes[];
}
export type APIGuildIntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors

View File

@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
* The cover image of the scheduled event
*/
image?: string | null;
/**
* The definition for how often this event should recur
*/
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
*/
export interface APIGuildScheduledEventRecurrenceRule {
/**
* Starting time of the recurrence interval
*/
start: string;
/**
* Ending time of the recurrence interval
*/
end: string | null;
/**
* How often the event occurs
*/
frequency: GuildScheduledEventRecurrenceRuleFrequency;
/**
* The spacing between the events, defined by `frequency`.
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
* would be "every-other week"
*/
interval: number;
/**
* Set of specific days within a week for the event to recur on
*/
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
/**
* List of specific days within a specific week (1-5) to recur on
*/
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
/**
* Set of specific months to recur on
*/
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
/**
* Set of specific dates within a month to recur on
*/
by_month_day: number[] | null;
/**
* Set of days within a year to recur on (1-364)
*/
by_year_day: number[] | null;
/**
* The total amount of times that the event is allowed to recur before stopping
*/
count: number | null;
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
*/
export enum GuildScheduledEventRecurrenceRuleFrequency {
Yearly,
Monthly,
Weekly,
Daily,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
*/
export enum GuildScheduledEventRecurrenceRuleWeekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
*/
export enum GuildScheduledEventRecurrenceRuleMonth {
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December,
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
*/
export interface GuildScheduledEventRecurrenceRuleNWeekday {
/**
* The week to reoccur on.
*/
n: 1 | 2 | 3 | 4 | 5;
/**
* The day within the week to reoccur on
*/
day: GuildScheduledEventRecurrenceRuleWeekday;
}
export interface APIStageInstanceGuildScheduledEvent
@@ -90,9 +197,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'
>;
/**
@@ -90,6 +90,19 @@ export interface APIInvite {
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
*/
guild_scheduled_event?: APIGuildScheduledEvent;
/**
* The invite type
*/
type: InviteType;
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-types
*/
export enum InviteType {
Guild,
GroupDM,
Friend,
}
/**

View File

@@ -10,6 +10,7 @@ export * from './guildScheduledEvent.ts';
export * from './interactions.ts';
export * from './invite.ts';
export * from './oauth2.ts';
export * from './poll.ts';
export * from './permissions.ts';
export * from './stageInstance.ts';
export * from './sticker.ts';

View File

@@ -40,16 +40,48 @@ export interface APIEntitlement {
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
/**
* For consumable items, whether or not the entitlement has been consumed
*/
consumed?: boolean;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased by user
*/
Purchase = 1,
/**
* Entitlement for Discord Nitro subscription
*/
PremiumSubscription,
/**
* Entitlement was gifted by developer
*/
DeveloperGift,
/**
* Entitlement was purchased by a dev in application test mode
*/
TestModePurchase,
/**
* Entitlement was granted when the SKU was free
*/
FreePurchase,
/**
* Entitlement was gifted by another user
*/
UserGift,
/**
* Entitlement was claimed by user for free as a Nitro Subscriber
*/
PremiumPurchase,
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
ApplicationSubscription,
}
/**
@@ -104,6 +136,14 @@ export enum SKUFlags {
}
export enum SKUType {
/**
* Durable one-time purchase
*/
Durable = 2,
/**
* Consumable one-time purchase
*/
Consumable = 3,
/**
* Represents a recurring subscription
*/

111
deno/payloads/v9/poll.ts Normal file
View File

@@ -0,0 +1,111 @@
/**
* Types extracted from https://discord.com/developers/docs/resources/poll
*/
import type { APIPartialEmoji } from './emoji.ts';
/**
* https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure
*/
export interface APIPoll {
/**
* The question of the poll
*/
question: APIPollMedia;
/**
* Each of the answers available in the poll, up to 10
*/
answers: APIPollAnswer[];
/**
* The time when the poll ends (IS08601 timestamp)
*/
expiry: string;
/**
* Whether a user can select multiple answers
*
* @default false
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*
* @default PollLayoutType.Default
*/
layout_type: PollLayoutType;
/**
* The results of the poll
*/
results?: APIPollResults;
}
/**
* https://discord.com/developers/docs/resources/poll#layout-type
*/
export enum PollLayoutType {
/**
* The, uhm, default layout type
*/
Default = 1,
}
/**
* https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure
*/
export interface APIPollMedia {
/**
* The text of the field
*
* The maximum length is `300` for the question, and `55` for any answer
*/
text?: string;
/**
* The emoji of the field
*/
emoji?: APIPartialEmoji;
}
/**
* https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure
*/
export interface APIPollAnswer {
/**
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
*/
answer_id: number;
/**
* The data of the answer
*/
poll_media: APIPollMedia;
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure
*/
export interface APIPollResults {
/**
* Whether the votes have been precisely counted
*/
is_finalized: boolean;
/**
* The counts for each answer
*/
answer_counts: APIPollAnswerCount[];
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure
*/
export interface APIPollAnswerCount {
/**
* The `answer_id`
*/
id: number;
/**
* The number of votes for this answer
*/
count: number;
/**
* Whether the current user voted for this answer
*/
me_voted: boolean;
}

View File

@@ -92,7 +92,7 @@ export enum StickerFormatType {
/**
* 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

@@ -87,8 +87,16 @@ export interface APIUser {
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @deprecated Use `avatar_decoration_data` instead
*/
avatar_decoration?: string | null;
/**
* The data for the user's avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
@@ -266,6 +274,8 @@ export interface APIConnection {
export enum ConnectionService {
BattleNet = 'battlenet',
BungieNet = 'bungie',
Domain = 'domain',
eBay = 'ebay',
EpicGames = 'epicgames',
Facebook = 'facebook',
@@ -275,6 +285,7 @@ export enum ConnectionService {
PlayStationNetwork = 'playstation',
Reddit = 'reddit',
RiotGames = 'riotgames',
Roblox = 'roblox',
PayPal = 'paypal',
Spotify = 'spotify',
Skype = 'skype',
@@ -316,5 +327,21 @@ 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>;
}
/**
* https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
*/
export interface APIAvatarDecorationData {
/**
* The avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*/
asset: string;
/**
* The id of the avatar decoration's SKU
*/
sku_id: Snowflake;
}

View File

@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
*/
export interface GatewayVoiceState {
export type GatewayVoiceState = APIVoiceState;
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*/
export interface APIVoiceState {
/**
* The guild id this voice state is for
*/

View File

@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
UnknownDiscoverableServerCategory = 10_059,
UnknownSticker,
UnknownInteraction = 10_062,
UnknownStickerPack,
UnknownInteraction,
UnknownApplicationCommand,
UnknownVoiceState = 10_065,
@@ -156,6 +156,8 @@ export enum RESTJSONErrorCodes {
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40_074,
CloudflareIsBlockingYourRequest = 40_333,
MissingAccess = 50_001,
InvalidAccountType,
CannotExecuteActionOnDMChannel,
@@ -254,6 +256,7 @@ export enum RESTJSONErrorCodes {
NoUsersWithDiscordTagExist = 80_004,
ReactionWasBlocked = 90_001,
UserCannotUseBurstReactions,
ApplicationNotYetAvailable = 110_001,
@@ -292,6 +295,16 @@ export enum RESTJSONErrorCodes {
CannotEnableOnboardingRequirementsAreNotMet = 350_000,
CannotUpdateOnboardingWhileBelowRequirements,
FailedToBanUsers = 500_000,
PollVotingBlocked = 520_000,
PollExpired,
InvalidChannelTypeForPollCreation,
CannotEditAPollMessage,
CannotUseAnEmojiIncludedWithThePoll,
CannotExpireANonPollMessage = 520_006,
}
/**
@@ -324,6 +337,7 @@ export enum Locale {
Romanian = 'ro',
Russian = 'ru',
SpanishES = 'es-ES',
SpanishLATAM = 'es-419',
Swedish = 'sv-SE',
Thai = 'th',
Turkish = 'tr',

View File

@@ -25,17 +25,18 @@ export type RESTGetCurrentApplicationResult = APIApplication;
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'role_connections_verification_url'
| 'install_params'
| 'interactions_endpoint_url'
| 'tags'
> &
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'install_params'
| 'integration_types_config'
| 'interactions_endpoint_url'
| 'role_connections_verification_url'
| 'tags'
>
>;
/**

View File

@@ -26,11 +26,17 @@ import type {
ChannelFlags,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
id: Snowflake;
}
/**
* @deprecated Use {@link RESTAPIChannelPatchOverwrite} instead
*/
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
/**
* https://discord.com/developers/docs/resources/channel#get-channel
*/
@@ -97,7 +103,7 @@ export interface RESTPatchAPIChannelJSONBody {
*
* Channel types: all excluding newsThread, publicThread, privateThread
*/
permission_overwrites?: APIChannelPatchOverwrite[] | null | undefined;
permission_overwrites?: RESTAPIChannelPatchOverwrite[] | null | undefined;
/**
* ID of the new parent category for a channel
*
@@ -236,8 +242,10 @@ export type RESTGetAPIChannelMessageResult = APIMessage;
/**
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
*/
export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Required<Pick<APIMessageReference, 'message_id'>>> & {
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Required<Pick<APIMessageReference, 'message_id'>>
> &
StrictPartial<APIMessageReference> & {
/**
* Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
*
@@ -246,6 +254,11 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
fail_if_not_exists?: boolean | undefined;
};
/**
* @deprecated Use {@link RESTAPIMessageReference} instead
*/
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
*/
@@ -297,7 +310,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
*/
message_reference?: APIMessageReferenceSend | undefined;
message_reference?: RESTAPIMessageReference | undefined;
/**
* The components to include with the message
*
@@ -309,7 +322,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
*/
sticker_ids?: [Snowflake] | [Snowflake, Snowflake] | [Snowflake, Snowflake, Snowflake] | undefined;
sticker_ids?: [Snowflake, Snowflake, Snowflake] | [Snowflake, Snowflake] | [Snowflake] | undefined;
/**
* Attachment objects with filename and description
*/
@@ -318,19 +331,28 @@ export interface RESTPostAPIChannelMessageJSONBody {
* Message flags combined as a bitfield
*/
flags?: MessageFlags | undefined;
/**
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
*/
enforce_nonce?: boolean | undefined;
/**
* A poll!
*/
poll?: RESTAPIPoll | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
*/
export type RESTPostAPIChannelMessageFormDataBody =
| ({
| (Record<`files[${bigint}]`, unknown> & {
/**
* JSON stringified message body
*/
payload_json?: string | undefined;
} & Record<`files[${bigint}]`, unknown>)
| (RESTPostAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
})
| (Record<`files[${bigint}]`, unknown> & RESTPostAPIChannelMessageJSONBody);
/**
* https://discord.com/developers/docs/resources/channel#create-message
@@ -350,7 +372,12 @@ export type RESTPutAPIChannelMessageReactionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
*/
export type RESTDeleteAPIChannelMessageOwnReaction = never;
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
/**
* @deprecated Use {@link RESTDeleteAPIChannelMessageOwnReactionResult} instead
*/
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
/**
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
@@ -361,6 +388,10 @@ export type RESTDeleteAPIChannelMessageUserReactionResult = never;
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
/**
* The reaction type
*/
type?: ReactionType;
/**
* Get users after this user ID
*/
@@ -373,6 +404,14 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
limit?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types
*/
export enum ReactionType {
Normal,
Super,
}
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
@@ -437,13 +476,13 @@ export interface RESTPatchAPIChannelMessageJSONBody {
* https://discord.com/developers/docs/resources/channel#edit-message
*/
export type RESTPatchAPIChannelMessageFormDataBody =
| ({
| (Record<`files[${bigint}]`, unknown> & {
/**
* JSON stringified message body
*/
payload_json?: string | undefined;
} & Record<`files[${bigint}]`, unknown>)
| (RESTPatchAPIChannelMessageJSONBody & Record<`files[${bigint}]`, unknown>);
})
| (Record<`files[${bigint}]`, unknown> & RESTPatchAPIChannelMessageJSONBody);
/**
* https://discord.com/developers/docs/resources/channel#edit-message

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