Compare commits

...

204 Commits

Author SHA1 Message Date
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
github-actions[bot]
72a78a4f6f chore(release): 0.37.65 🎉 (#852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-23 14:21:14 +02:00
Jiralite
957488134e fix(TextChannelType): Remove forum and media channels (#849)
* fix: remove forum and media channels from text channel types

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

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

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

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

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

* docs(APIApplication): update tag documentation

* fix(RESTPatchCurrentApplicationJSONBody): add `flags`

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

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

* docs: edit description of state

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

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

View File

@@ -35,7 +35,7 @@ const schema = [
},
},
},
];
] as const;
export = {
rules: {

View File

@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": false,
"declarationMap": false,
"skipLibCheck": true
},
"include": ["./index.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,7 @@
"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"
}
}

10
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,10 @@
* @vladfrangu
/*.ts @discordjs/discord-api-types @discordjs/core
gateway/ @discordjs/discord-api-types @discordjs/core
payloads/ @discordjs/discord-api-types @discordjs/core
rest/ @discordjs/discord-api-types @discordjs/core
rpc/ @discordjs/discord-api-types @discordjs/core
tests/ @discordjs/discord-api-types @discordjs/core
utils/ @discordjs/discord-api-types @discordjs/core
voice/ @discordjs/discord-api-types @discordjs/core

View File

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

View File

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

View File

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

View File

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

87
.github/labeler.yml vendored
View File

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

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,14 +5,13 @@ on:
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v3
uses: actions/labeler@v5
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
- name: Automatically assign reviewers
if: github.event.action == 'opened'
uses: kentaro-m/auto-assign-action@v1.2.4

View File

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

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

@@ -15,3 +15,12 @@ website/build
*.js
*.d.ts
*.mjs
# Miscellaneous
CODEOWNERS
renovate.json
CHANGELOG.md
# Format all of scripts
!scripts/**/*
!.prettierrc.mjs

View File

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

12
.prettierrc.mjs Normal file
View File

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

View File

@@ -2,9 +2,9 @@
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll": true,
"source.fixAll.eslint": true
"source.organizeImports": "never",
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
"cSpell.enableFiletypes": ["mdx"]
}

View File

@@ -1,3 +1,286 @@
## [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
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
### Bug Fixes
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
### Features
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
### Features
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
### Features
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
### Features
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
### Features
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
### Features
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
### Bug Fixes
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
### Features
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
### Bug Fixes
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
### Features
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
### Features
- **GatewayActivityUpdateData:** allow sending state ([#801](https://github.com/discordjs/discord-api-types/issues/801)) ([e095e09](https://github.com/discordjs/discord-api-types/commit/e095e09b0b5e3c85107705de124858e1fbb29bf0))
## [0.37.52](https://github.com/discordjs/discord-api-types/compare/0.37.51...0.37.52) (2023-08-07)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** `available_tags` requires `name` only ([#802](https://github.com/discordjs/discord-api-types/issues/802)) ([5261124](https://github.com/discordjs/discord-api-types/commit/52611242fb73ac56d8cfedd8953ce558bf6e842e))
## [0.37.51](https://github.com/discordjs/discord-api-types/compare/0.37.50...0.37.51) (2023-07-31)
### Bug Fixes
- **Presence:** cannot receive invisible status ([#799](https://github.com/discordjs/discord-api-types/issues/799)) ([1071d24](https://github.com/discordjs/discord-api-types/commit/1071d24362bbf1d39d528f73c3233f22aee99778))
## [0.37.50](https://github.com/discordjs/discord-api-types/compare/0.37.49...0.37.50) (2023-07-20)
### Features
- onboarding updates, mode field, and error codes ([#773](https://github.com/discordjs/discord-api-types/issues/773)) ([773556a](https://github.com/discordjs/discord-api-types/commit/773556aa329750839262874b4af6c4113d9906d3))
## [0.37.49](https://github.com/discordjs/discord-api-types/compare/0.37.48...0.37.49) (2023-07-17)
### Features
- **APIApplication:** approx guild count and get self application endpoint ([#728](https://github.com/discordjs/discord-api-types/issues/728)) ([874f135](https://github.com/discordjs/discord-api-types/commit/874f13573b35fe1e5e40549d007aebe5ec3bbcc0))
- **APIAttachment:** add `flags` ([#783](https://github.com/discordjs/discord-api-types/issues/783)) ([7f9a7e5](https://github.com/discordjs/discord-api-types/commit/7f9a7e5b94529fbcd254ffdd1fcac1ceff62e890))
- **APIRole:** role flags ([#782](https://github.com/discordjs/discord-api-types/issues/782)) ([488b5ad](https://github.com/discordjs/discord-api-types/commit/488b5adf04d3b2c7f457bea787c2a5d1b0bf8ba6))
- **APIUser:** add avatar decorations ([#664](https://github.com/discordjs/discord-api-types/issues/664)) ([f556455](https://github.com/discordjs/discord-api-types/commit/f556455ba6e396e1b798e85f71d2a58e1aacf043))
- **AuditLogEvent:** Add creator monetisation events ([#787](https://github.com/discordjs/discord-api-types/issues/787)) ([47f78bc](https://github.com/discordjs/discord-api-types/commit/47f78bcc691ee6d551f2eb441e427384a928dd11))
- **GatewayMessageReactionAddDispatch:** add `message_author_id` ([#754](https://github.com/discordjs/discord-api-types/issues/754)) ([82d7024](https://github.com/discordjs/discord-api-types/commit/82d7024dfd0e30178e9e38647bfa882fdddd1681))
## [0.37.48](https://github.com/discordjs/discord-api-types/compare/0.37.47...0.37.48) (2023-07-10)
## [0.37.47](https://github.com/discordjs/discord-api-types/compare/0.37.46...0.37.47) (2023-06-29)

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,286 @@
## [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
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
### Bug Fixes
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
### Features
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
### Features
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
### Features
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
### Features
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
### Features
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
### Features
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
### Bug Fixes
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
### Features
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
### Bug Fixes
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
### Features
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
### Features
- **GatewayActivityUpdateData:** allow sending state ([#801](https://github.com/discordjs/discord-api-types/issues/801)) ([e095e09](https://github.com/discordjs/discord-api-types/commit/e095e09b0b5e3c85107705de124858e1fbb29bf0))
## [0.37.52](https://github.com/discordjs/discord-api-types/compare/0.37.51...0.37.52) (2023-08-07)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** `available_tags` requires `name` only ([#802](https://github.com/discordjs/discord-api-types/issues/802)) ([5261124](https://github.com/discordjs/discord-api-types/commit/52611242fb73ac56d8cfedd8953ce558bf6e842e))
## [0.37.51](https://github.com/discordjs/discord-api-types/compare/0.37.50...0.37.51) (2023-07-31)
### Bug Fixes
- **Presence:** cannot receive invisible status ([#799](https://github.com/discordjs/discord-api-types/issues/799)) ([1071d24](https://github.com/discordjs/discord-api-types/commit/1071d24362bbf1d39d528f73c3233f22aee99778))
## [0.37.50](https://github.com/discordjs/discord-api-types/compare/0.37.49...0.37.50) (2023-07-20)
### Features
- onboarding updates, mode field, and error codes ([#773](https://github.com/discordjs/discord-api-types/issues/773)) ([773556a](https://github.com/discordjs/discord-api-types/commit/773556aa329750839262874b4af6c4113d9906d3))
## [0.37.49](https://github.com/discordjs/discord-api-types/compare/0.37.48...0.37.49) (2023-07-17)
### Features
- **APIApplication:** approx guild count and get self application endpoint ([#728](https://github.com/discordjs/discord-api-types/issues/728)) ([874f135](https://github.com/discordjs/discord-api-types/commit/874f13573b35fe1e5e40549d007aebe5ec3bbcc0))
- **APIAttachment:** add `flags` ([#783](https://github.com/discordjs/discord-api-types/issues/783)) ([7f9a7e5](https://github.com/discordjs/discord-api-types/commit/7f9a7e5b94529fbcd254ffdd1fcac1ceff62e890))
- **APIRole:** role flags ([#782](https://github.com/discordjs/discord-api-types/issues/782)) ([488b5ad](https://github.com/discordjs/discord-api-types/commit/488b5adf04d3b2c7f457bea787c2a5d1b0bf8ba6))
- **APIUser:** add avatar decorations ([#664](https://github.com/discordjs/discord-api-types/issues/664)) ([f556455](https://github.com/discordjs/discord-api-types/commit/f556455ba6e396e1b798e85f71d2a58e1aacf043))
- **AuditLogEvent:** Add creator monetisation events ([#787](https://github.com/discordjs/discord-api-types/issues/787)) ([47f78bc](https://github.com/discordjs/discord-api-types/commit/47f78bcc691ee6d551f2eb441e427384a928dd11))
- **GatewayMessageReactionAddDispatch:** add `message_author_id` ([#754](https://github.com/discordjs/discord-api-types/issues/754)) ([82d7024](https://github.com/discordjs/discord-api-types/commit/82d7024dfd0e30178e9e38647bfa882fdddd1681))
## [0.37.48](https://github.com/discordjs/discord-api-types/compare/0.37.47...0.37.48) (2023-07-10)
## [0.37.47](https://github.com/discordjs/discord-api-types/compare/0.37.46...0.37.47) (2023-06-29)

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

@@ -33,7 +33,10 @@ import type {
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';
@@ -201,6 +204,8 @@ export enum GatewayIntentBits {
GuildScheduledEvents = 1 << 16,
AutoModerationConfiguration = 1 << 20,
AutoModerationExecution = 1 << 21,
GuildMessagePolls = 1 << 24,
DirectMessagePolls = 1 << 25,
}
/**
@@ -258,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',
@@ -268,32 +275,37 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
| 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
@@ -307,8 +319,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -321,27 +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;
| GatewayWebhooksUpdateDispatch;
// #region Dispatch Payloads
@@ -446,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'>;
}
/**
@@ -461,8 +476,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -672,6 +687,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-create
*/
@@ -957,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
*/
@@ -1305,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
@@ -1318,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
*/
@@ -1421,7 +1485,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
/**
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
export type GatewayMessageReactionRemoveDispatch = ReactionData<
GatewayDispatchEvents.MessageReactionRemove,
'burst_colors' | 'member' | 'message_author_id'
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
@@ -1551,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
@@ -1563,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
@@ -1578,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
@@ -1721,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
@@ -1887,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
@@ -1957,7 +2095,7 @@ export interface GatewayPresenceUpdateData {
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
*/
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
// #endregion Sendable Payloads
@@ -1981,7 +2119,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -2024,6 +2162,22 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIEmoji;
/**
* The id of the user that posted the message that was reacted to
*/
message_author_id?: Snowflake;
/**
* 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

@@ -33,8 +33,11 @@ import type {
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';
export * from './common.ts';
@@ -200,6 +203,8 @@ export enum GatewayIntentBits {
GuildScheduledEvents = 1 << 16,
AutoModerationConfiguration = 1 << 20,
AutoModerationExecution = 1 << 21,
GuildMessagePolls = 1 << 24,
DirectMessagePolls = 1 << 25,
}
/**
@@ -257,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',
@@ -267,32 +274,37 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
| 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
@@ -306,8 +318,8 @@ export type GatewayDispatchPayload =
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
| GatewayGuildScheduledEventUserAddDispatch
| GatewayGuildScheduledEventUserRemoveDispatch
| GatewayGuildStickersUpdateDispatch
@@ -320,27 +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;
| GatewayWebhooksUpdateDispatch;
// #region Dispatch Payloads
@@ -445,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'>;
}
/**
@@ -460,8 +475,8 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
*/
export type GatewayAutoModerationRuleModifyDispatch = DataPayload<
| GatewayDispatchEvents.AutoModerationRuleCreate
| GatewayDispatchEvents.AutoModerationRuleUpdate
| GatewayDispatchEvents.AutoModerationRuleDelete,
| GatewayDispatchEvents.AutoModerationRuleDelete
| GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleModifyDispatchData
>;
@@ -671,6 +686,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementDelete
| GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-update
*/
@@ -956,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
*/
@@ -1304,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
@@ -1317,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
*/
@@ -1420,7 +1484,10 @@ export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDis
/**
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
*/
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
export type GatewayMessageReactionRemoveDispatch = ReactionData<
GatewayDispatchEvents.MessageReactionRemove,
'burst_colors' | 'member' | 'message_author_id'
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
@@ -1550,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
@@ -1562,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
@@ -1577,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
@@ -1720,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
@@ -1886,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
@@ -1956,7 +2094,7 @@ export interface GatewayPresenceUpdateData {
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
*/
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' | 'type' | 'url'>;
// #endregion Sendable Payloads
@@ -1980,7 +2118,7 @@ interface BasePayload {
t?: string;
}
type NonDispatchPayload = Omit<BasePayload, 't' | 's'> & {
type NonDispatchPayload = Omit<BasePayload, 's' | 't'> & {
t: null;
s: null;
};
@@ -2023,6 +2161,22 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIEmoji;
/**
* The id of the user that posted the message that was reacted to
*/
message_author_id?: Snowflake;
/**
* 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

@@ -182,7 +182,7 @@ export const PermissionFlagsBits = {
*/
ManageEmojisAndStickers: 1n << 30n,
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
*/
ManageGuildExpressions: 1n << 30n,
/**
@@ -198,7 +198,7 @@ export const PermissionFlagsBits = {
*/
RequestToSpeak: 1n << 32n,
/**
* Allows for creating, editing, and deleting scheduled events
* Allows for editing and deleting scheduled events created by all users
*
* Applies to channel types: Voice, Stage
*/
@@ -254,6 +254,16 @@ export const PermissionFlagsBits = {
* Applies to channel types: Voice
*/
UseSoundboard: 1n << 42n,
/**
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user
*/
CreateGuildExpressions: 1n << 43n,
/**
* Allows for creating scheduled events, and editing and deleting those created by the current user
*
* Applies to channel types: Voice, Stage
*/
CreateEvents: 1n << 44n,
/**
* Allows the usage of custom soundboard sounds from other servers
*
@@ -266,6 +276,12 @@ 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,
} as const;
/**
@@ -295,7 +311,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,21 +1,64 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v10.ts';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v10.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* 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'
>;
/**
@@ -113,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
*/
@@ -122,11 +165,27 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
/**
* 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'>>;
@@ -134,21 +193,25 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
Original,
'user'
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
Required<Pick<Original, 'guild_id' | 'member'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
@@ -171,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,13 +18,14 @@ export enum InteractionType {
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
*/
export type APIInteractionResponse =
| APIInteractionResponsePong
| APIApplicationCommandAutocompleteResponse
| APIInteractionResponseChannelMessageWithSource
| APIInteractionResponseDeferredChannelMessageWithSource
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponsePong
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**
@@ -98,7 +107,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export interface APICommandAutocompleteInteractionResponseCallbackData {

View File

@@ -4,6 +4,8 @@
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';
@@ -40,6 +42,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -59,7 +65,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -76,6 +82,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -95,22 +105,40 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
* 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
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
}
export interface APIApplicationInstallParams {
@@ -118,6 +146,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,12 +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';
@@ -200,6 +202,15 @@ export enum AuditLogEvent {
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
OnboardingPromptCreate = 163,
OnboardingPromptUpdate,
OnboardingPromptDelete,
OnboardingCreate,
OnboardingUpdate,
}
/**
@@ -309,6 +320,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -322,82 +342,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
@@ -508,12 +533,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
@@ -530,6 +555,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
*/
@@ -722,22 +755,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
@@ -803,6 +836,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 { 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,16 +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.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
| ChannelType.PrivateThread
| ChannelType.PublicThread;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -111,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>
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -124,7 +124,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -135,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
*/
@@ -205,12 +205,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -240,7 +239,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -317,38 +316,74 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
export type APIChannel =
| APIGroupDMChannel
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildVoiceChannel
| APIGuildStageVoiceChannel
| APIGroupDMChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel
| APIGuildStageVoiceChannel
| APIGuildVoiceChannel
| APINewsChannel
| APITextChannel
| APIThreadChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -410,6 +445,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
@@ -567,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
*/
@@ -626,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;
/**
@@ -665,11 +714,31 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
*/
role_subscription_data?: APIMessageRoleSubscriptionData;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
/**
* 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 call associated with the message
*/
call?: APIMessageCall;
}
/**
@@ -814,6 +883,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
*/
@@ -855,19 +938,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1332,6 +1441,20 @@ export interface APIAttachment {
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
*/
waveform?: string;
/**
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
*/
export enum AttachmentFlags {
/**
* This attachment has been edited using the remix feature on mobile
*/
IsRemix = 1 << 2,
}
/**
@@ -1509,7 +1632,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
@@ -1550,11 +1673,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
@@ -1584,6 +1707,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.RoleSelect
| ComponentType.UserSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1597,44 +1734,77 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APISelectMenuComponent =
| APIStringSelectComponent
| APIUserSelectComponent
| APIRoleSelectComponent
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIChannelSelectComponent;
| APIRoleSelectComponent
| APIStringSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
*/
export interface APISelectMenuOption {
/**
* The user-facing name of the option (max 25 chars)
* The user-facing name of the option (max 100 chars)
*/
label: string;
/**
@@ -1642,7 +1812,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;
/**
@@ -1730,13 +1900,17 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**
* https://discord.com/developers/docs/interactions/message-components#message-components
*/
export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
export type APIMessageComponent = APIActionRowComponent<APIMessageActionRowComponent> | APIMessageActionRowComponent;
export type APIModalComponent = APIActionRowComponent<APIModalActionRowComponent> | APIModalActionRowComponent;
export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;

View File

@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
/**
* Either "idle", "dnd", "online", or "offline"
*/
status?: PresenceUpdateStatus;
status?: PresenceUpdateReceiveStatus;
/**
* User's current activities
*
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
client_status?: GatewayPresenceClientStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
*/
export enum PresenceUpdateStatus {
Online = 'online',
DoNotDisturb = 'dnd',
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
Offline = 'offline',
}
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
/**
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
*/
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
/**
* The user's status set for an active desktop (Windows, Linux, Mac) application session
*/
desktop?: PresenceUpdateStatus;
desktop?: PresenceUpdateReceiveStatus;
/**
* The user's status set for an active mobile (iOS, Android) application session
*/
mobile?: PresenceUpdateStatus;
mobile?: PresenceUpdateReceiveStatus;
/**
* The user's status set for an active web (browser, bot account) application session
*/
web?: PresenceUpdateStatus;
web?: PresenceUpdateReceiveStatus;
}
/**
@@ -176,7 +181,7 @@ export interface GatewayActivity {
*/
details?: string | null;
/**
* The user's current party status
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
@@ -222,7 +227,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -261,7 +266,7 @@ export enum ActivityType {
*/
Watching,
/**
* {emoji} {details}
* {emoji} {state}
*/
Custom,
/**
@@ -287,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
@@ -313,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

@@ -4,11 +4,11 @@
import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
import type { PresenceUpdateStatus } from './gateway.ts';
import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
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
*/
@@ -427,7 +427,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
@@ -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
@@ -903,7 +909,7 @@ export interface APIGuildWidgetMember {
username: string;
discriminator: string;
avatar: string | null;
status: PresenceUpdateStatus;
status: PresenceUpdateReceiveStatus;
activity?: { name: string };
avatar_url: string;
}
@@ -1028,6 +1034,10 @@ export interface APIGuildOnboarding {
* Whether onboarding is enabled in the guild
*/
enabled: boolean;
/**
* Current mode of onboarding
*/
mode: GuildOnboardingMode;
}
/**
@@ -1095,6 +1105,20 @@ export interface APIGuildOnboardingPromptOption {
description: string | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
*/
export enum GuildOnboardingMode {
/**
* Counts only Default Channels towards constraints
*/
OnboardingDefault,
/**
* Counts Default Channels and Questions towards constraints
*/
OnboardingAdvanced,
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
*/

View File

@@ -90,9 +90,9 @@ export interface APIExternalGuildScheduledEvent
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
*/
export type APIGuildScheduledEvent =
| APIExternalGuildScheduledEvent
| APIStageInstanceGuildScheduledEvent
| APIVoiceGuildScheduledEvent
| APIExternalGuildScheduledEvent;
| APIVoiceGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata

View File

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

View File

@@ -11,17 +11,17 @@ import type { APIUser } from './user.ts';
export type APIInviteGuild = Pick<
APIGuild,
| 'id'
| 'name'
| 'splash'
| 'banner'
| 'icon'
| 'vanity_url_code'
| 'description'
| 'features'
| 'verification_level'
| 'icon'
| 'id'
| 'name'
| 'nsfw_level'
| 'premium_subscription_count'
| 'splash'
| 'vanity_url_code'
| 'verification_level'
>;
/**
@@ -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';
@@ -18,3 +19,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';

View File

@@ -0,0 +1,155 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
/**
* 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,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Durable one-time purchase
*/
Durable = 2,
/**
* Consumable one-time purchase
*/
Consumable = 3,
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -54,6 +54,10 @@ export interface APIRole {
* The tags this role has
*/
tags?: APIRoleTags;
/**
* Role flags
*/
flags: RoleFlags;
}
/**
@@ -85,3 +89,13 @@ export interface APIRoleTags {
*/
guild_connections?: null;
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
*/
export enum RoleFlags {
/**
* Role can be selected by members in an onboarding prompt
*/
InPrompt = 1 << 0,
}

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

@@ -0,0 +1,107 @@
/**
* 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
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*/
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

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**
@@ -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

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -83,6 +83,20 @@ export interface APIUser {
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
*/
public_flags?: UserFlags;
/**
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @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;
}
/**
@@ -260,6 +274,8 @@ export interface APIConnection {
export enum ConnectionService {
BattleNet = 'battlenet',
BungieNet = 'bungie',
Domain = 'domain',
eBay = 'ebay',
EpicGames = 'epicgames',
Facebook = 'facebook',
@@ -275,7 +291,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}
@@ -306,5 +326,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

@@ -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,21 +1,64 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v9.ts';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v9.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* 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'
>;
/**
@@ -113,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
*/
@@ -122,11 +165,27 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
/**
* 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'>>;
@@ -134,21 +193,25 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
Original,
'user'
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
Required<Pick<Original, 'guild_id' | 'member'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
@@ -171,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,13 +18,14 @@ export enum InteractionType {
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
*/
export type APIInteractionResponse =
| APIInteractionResponsePong
| APIApplicationCommandAutocompleteResponse
| APIInteractionResponseChannelMessageWithSource
| APIInteractionResponseDeferredChannelMessageWithSource
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponsePong
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**
@@ -98,7 +107,7 @@ export enum InteractionResponseType {
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'username' | 'avatar_url'
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export interface APICommandAutocompleteInteractionResponseCallbackData {

View File

@@ -4,6 +4,8 @@
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';
@@ -40,6 +42,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -59,7 +65,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -76,6 +82,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -95,22 +105,40 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
* 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
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
}
export interface APIApplicationInstallParams {
@@ -118,6 +146,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,12 +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';
@@ -200,6 +202,15 @@ export enum AuditLogEvent {
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
OnboardingPromptCreate = 163,
OnboardingPromptUpdate,
OnboardingPromptDelete,
OnboardingCreate,
OnboardingUpdate,
}
/**
@@ -309,6 +320,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -322,82 +342,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
@@ -508,12 +533,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
@@ -530,6 +555,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
*/
@@ -722,22 +755,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
@@ -803,6 +836,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 { 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,16 +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.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
| ChannelType.PrivateThread
| ChannelType.PublicThread;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -111,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>
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -135,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
*/
@@ -201,12 +201,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -236,7 +235,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -313,38 +312,74 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
export type APIChannel =
| APIGroupDMChannel
| APIDMChannel
| APITextChannel
| APINewsChannel
| APIGuildVoiceChannel
| APIGuildStageVoiceChannel
| APIGroupDMChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel
| APIGuildStageVoiceChannel
| APIGuildVoiceChannel
| APINewsChannel
| APITextChannel
| APIThreadChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -406,6 +441,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
/**
@@ -559,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
*/
@@ -618,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
*/
@@ -656,6 +703,27 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
/**
* 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 call associated with the message
*/
call?: APIMessageCall;
}
/**
@@ -800,6 +868,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
*/
@@ -819,19 +901,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1300,6 +1408,20 @@ export interface APIAttachment {
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
*/
waveform?: string;
/**
* Attachment flags combined as a bitfield
*/
flags?: AttachmentFlags;
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
*/
export enum AttachmentFlags {
/**
* This attachment has been edited using the remix feature on mobile
*/
IsRemix = 1 << 2,
}
/**
@@ -1477,7 +1599,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
@@ -1518,11 +1640,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
@@ -1552,6 +1674,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.ChannelSelect
| ComponentType.MentionableSelect
| ComponentType.RoleSelect
| ComponentType.UserSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1565,44 +1701,77 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APISelectMenuComponent =
| APIStringSelectComponent
| APIUserSelectComponent
| APIRoleSelectComponent
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIChannelSelectComponent;
| APIRoleSelectComponent
| APIStringSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
*/
export interface APISelectMenuOption {
/**
* The user-facing name of the option (max 25 chars)
* The user-facing name of the option (max 100 chars)
*/
label: string;
/**
@@ -1610,7 +1779,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;
/**
@@ -1698,13 +1867,17 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**
* https://discord.com/developers/docs/interactions/message-components#message-components
*/
export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
export type APIMessageComponent = APIActionRowComponent<APIMessageActionRowComponent> | APIMessageActionRowComponent;
export type APIModalComponent = APIActionRowComponent<APIModalActionRowComponent> | APIModalActionRowComponent;
export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;

View File

@@ -79,7 +79,7 @@ export interface GatewayPresenceUpdate {
/**
* Either "idle", "dnd", "online", or "offline"
*/
status?: PresenceUpdateStatus;
status?: PresenceUpdateReceiveStatus;
/**
* User's current activities
*
@@ -94,6 +94,9 @@ export interface GatewayPresenceUpdate {
client_status?: GatewayPresenceClientStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
*/
export enum PresenceUpdateStatus {
Online = 'online',
DoNotDisturb = 'dnd',
@@ -105,6 +108,8 @@ export enum PresenceUpdateStatus {
Offline = 'offline',
}
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
/**
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
*/
@@ -112,15 +117,15 @@ export interface GatewayPresenceClientStatus {
/**
* The user's status set for an active desktop (Windows, Linux, Mac) application session
*/
desktop?: PresenceUpdateStatus;
desktop?: PresenceUpdateReceiveStatus;
/**
* The user's status set for an active mobile (iOS, Android) application session
*/
mobile?: PresenceUpdateStatus;
mobile?: PresenceUpdateReceiveStatus;
/**
* The user's status set for an active web (browser, bot account) application session
*/
web?: PresenceUpdateStatus;
web?: PresenceUpdateReceiveStatus;
}
/**
@@ -167,7 +172,7 @@ export interface GatewayActivity {
*/
details?: string | null;
/**
* The user's current party status
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
@@ -210,7 +215,7 @@ export interface GatewayActivity {
/**
* The custom buttons shown in the Rich Presence (max 2)
*/
buttons?: string[] | GatewayActivityButton[];
buttons?: GatewayActivityButton[] | string[];
}
/**
@@ -249,7 +254,7 @@ export enum ActivityType {
*/
Watching,
/**
* {emoji} {details}
* {emoji} {state}
*/
Custom,
/**
@@ -275,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
@@ -301,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

@@ -4,11 +4,11 @@
import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
import type { PresenceUpdateStatus } from './gateway.ts';
import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
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
*/
@@ -419,7 +419,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',
@@ -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
@@ -895,7 +901,7 @@ export interface APIGuildWidgetMember {
username: string;
discriminator: string;
avatar: string | null;
status: PresenceUpdateStatus;
status: PresenceUpdateReceiveStatus;
activity?: { name: string };
avatar_url: string;
}
@@ -1020,6 +1026,10 @@ export interface APIGuildOnboarding {
* Whether onboarding is enabled in the guild
*/
enabled: boolean;
/**
* Current mode of onboarding
*/
mode: GuildOnboardingMode;
}
/**
@@ -1087,6 +1097,20 @@ export interface APIGuildOnboardingPromptOption {
description: string | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
*/
export enum GuildOnboardingMode {
/**
* Counts only Default Channels towards constraints
*/
OnboardingDefault,
/**
* Counts Default Channels and Questions towards constraints
*/
OnboardingAdvanced,
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
*/

View File

@@ -90,9 +90,9 @@ export interface APIExternalGuildScheduledEvent
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
*/
export type APIGuildScheduledEvent =
| APIExternalGuildScheduledEvent
| APIStageInstanceGuildScheduledEvent
| APIVoiceGuildScheduledEvent
| APIExternalGuildScheduledEvent;
| APIVoiceGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata

View File

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

View File

@@ -11,17 +11,17 @@ import type { APIUser } from './user.ts';
export type APIInviteGuild = Pick<
APIGuild,
| 'id'
| 'name'
| 'splash'
| 'banner'
| 'icon'
| 'vanity_url_code'
| 'description'
| 'features'
| 'verification_level'
| 'icon'
| 'id'
| 'name'
| 'nsfw_level'
| 'premium_subscription_count'
| 'splash'
| 'vanity_url_code'
| 'verification_level'
>;
/**
@@ -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';
@@ -18,3 +19,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';

View File

@@ -0,0 +1,155 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
/**
* 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,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Durable one-time purchase
*/
Durable = 2,
/**
* Consumable one-time purchase
*/
Consumable = 3,
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -54,6 +54,10 @@ export interface APIRole {
* The tags this role has
*/
tags?: APIRoleTags;
/**
* Role flags
*/
flags: RoleFlags;
}
/**
@@ -85,3 +89,13 @@ export interface APIRoleTags {
*/
guild_connections?: null;
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
*/
export enum RoleFlags {
/**
* Role can be selected by members in an onboarding prompt
*/
InPrompt = 1 << 0,
}

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

@@ -0,0 +1,107 @@
/**
* 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
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*/
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

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**
@@ -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

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -83,6 +83,20 @@ export interface APIUser {
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
*/
public_flags?: UserFlags;
/**
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @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;
}
/**
@@ -260,6 +274,8 @@ export interface APIConnection {
export enum ConnectionService {
BattleNet = 'battlenet',
BungieNet = 'bungie',
Domain = 'domain',
eBay = 'ebay',
EpicGames = 'epicgames',
Facebook = 'facebook',
@@ -275,7 +291,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}
@@ -306,5 +326,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;
}

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