Compare commits

..

94 Commits

Author SHA1 Message Date
Vlad Frangu
26580371d2 chore(release): 0.38.40 🎉 (#1528)
Build ran for 2a9dfd41db

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-20 12:03:01 +02:00
renovate[bot]
a57db79645 chore(deps): update patch/minor dependencies (#1530)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-20 05:00:10 +00:00
Almeida
2a9dfd41db feat: mark guild member role counts endpoint as stable (#1462) 2026-02-15 17:57:24 +00:00
Asad
8fd402464a fix: export missing properties and use interfaces on GatewayActivityAssets (#1519)
* fix: export missing properties and use interface

* docs: remove redundant comment

* fix: backport improvements to v9
2026-02-15 17:45:45 +00:00
Vlad Frangu
a8e30a616c chore(release): 0.38.39 🎉 (#1525)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-13 12:04:37 +02:00
renovate[bot]
b549a5fe8d chore(deps): lock file maintenance (#1524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-13 10:03:31 +00:00
renovate[bot]
f9496a795f chore(deps): update dependency eslint to v10 (#1521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-13 09:27:08 +00:00
renovate[bot]
2a42f0d0b5 chore(deps): update patch/minor dependencies (#1520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-13 06:46:12 +00:00
Jiralite
6f6b780851 fix(APIModalSubmitRadioGroupComponent): nullable value (#1518) 2026-02-13 00:45:06 +00:00
renovate[bot]
6df197ac47 chore(deps): lock file maintenance (#1516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 13:51:01 +00:00
renovate[bot]
b6b4027cb5 chore(deps): lock file maintenance (#1514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 08:28:44 +00:00
renovate[bot]
807f86cb87 chore(deps): update patch/minor dependencies (#1513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 05:33:36 +00:00
renovate[bot]
592503aa18 chore(deps): lock file maintenance (#1509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 21:14:40 +00:00
renovate[bot]
511ee8edd3 chore(deps): update patch/minor dependencies to v20.4.0 (#1508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 18:27:45 +00:00
renovate[bot]
dd79152139 chore(deps): lock file maintenance (#1506)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 12:46:42 +00:00
renovate[bot]
94d41859b7 chore(deps): lock file maintenance (#1505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 09:12:04 +00:00
renovate[bot]
a3aec11efd chore(deps): update dependency @aws-sdk/client-s3 to v3.978.0 (#1503)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 06:03:40 +00:00
Vlad Frangu
0bd1de5a97 chore(release): 0.38.38 🎉 (#1500)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-29 16:38:45 +02:00
Naiyar
18fa946bdf feat: radio groups and checkbox in modal (#1495)
* feat: radio groups and checkbox in modal

* fix: submit property type

* fix: value for radio group can be missing if not selected

* chore: mark unstable and update docs

* chore: update component enum names

* chore: fix component type

* chore: docs and links

* fix: component names

* chore: suggestions
2026-01-26 10:23:23 +00:00
renovate[bot]
df9c860cca chore(deps): lock file maintenance (#1498)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-23 14:26:55 +00:00
renovate[bot]
deea7340d3 chore(deps): lock file maintenance (#1497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-23 09:34:16 +00:00
renovate[bot]
5abb566fcb chore(deps): update dependency @aws-sdk/client-s3 to v3.974.0 (#1496)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-23 05:42:28 +00:00
renovate[bot]
b29dd22b52 chore(deps): lock file maintenance (#1490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 13:11:21 +00:00
renovate[bot]
5adaf81117 chore(deps): lock file maintenance (#1489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 10:58:27 +00:00
renovate[bot]
6ed498e4a1 chore(deps): update patch/minor dependencies (#1488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 06:02:09 +00:00
renovate[bot]
d6ce5e8259 chore(deps): lock file maintenance (#1485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-09 13:51:47 +00:00
renovate[bot]
ef46b927b6 chore(deps): update patch/minor dependencies (#1484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-09 09:52:12 +00:00
renovate[bot]
0192dab947 chore(deps): update eslint/prettier to v8.52.0 (#1483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-09 06:02:16 +00:00
renovate[bot]
3c846fc0dc chore(deps): lock file maintenance (#1481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-02 09:28:43 +00:00
renovate[bot]
e51f9c6cfc chore(deps): update patch/minor dependencies to v20.3.0 (#1480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-02 09:27:34 +00:00
renovate[bot]
ffec279615 chore(deps): update eslint/prettier to v8.51.0 (#1479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-02 05:57:20 +00:00
renovate[bot]
2389ed4f27 chore(deps): lock file maintenance (#1476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 16:30:15 +00:00
renovate[bot]
d8b6653b69 chore(deps): update dependency @aws-sdk/client-s3 to v3.958.0 (#1475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 10:11:18 +00:00
renovate[bot]
36500e61ae chore(deps): update eslint/prettier to v8.50.1 (#1474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 04:37:14 +00:00
renovate[bot]
d363c6b9b3 chore(deps): lock file maintenance (#1473)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 13:35:24 +00:00
renovate[bot]
acdf14ca54 chore(deps): update patch/minor dependencies (#1472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 10:33:51 +00:00
renovate[bot]
8aa9e9e849 chore(deps): update eslint/prettier (#1471)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 05:37:27 +00:00
renovate[bot]
b67f4bd157 chore(deps): lock file maintenance (#1468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 09:39:21 +00:00
renovate[bot]
aec9bc07e5 chore(deps): lock file maintenance (#1467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 08:40:01 +00:00
renovate[bot]
237d00ca3d chore(deps): update patch/minor dependencies (#1464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 06:25:56 +00:00
Vlad Frangu
4ba461e93f chore(release): 0.38.37 🎉 (#1463)
Build ran for dd55679e75

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-11 14:58:04 +02:00
renovate[bot]
dd55679e75 chore(deps): lock file maintenance (#1455)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-10 04:42:36 +00:00
renovate[bot]
60cdc321ef chore(deps): update eslint/prettier to v8.49.0 (#1453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-10 00:33:50 +02:00
dependabot[bot]
c533c76df9 chore(deps): bump js-yaml and markdownlint-cli2 in /website (#1437)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-10 00:31:37 +02:00
Copilot
5b82aa564c docs(APIAttachment): clarify title field distinction from filename (#1450)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: almeidx <42935195+almeidx@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-12-10 00:31:15 +02:00
renovate[bot]
5a4c4aff19 chore(deps): update actions/checkout action to v6 (#1444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-10 00:30:25 +02:00
Almeida
38e98c8063 chore: upgrade prettier (#1460) 2025-12-10 00:30:11 +02:00
Double Colon
8f0474b83c refactor: de-duplicate timestamp formatting patterns (#1440)
Co-authored-by: Almeida <almeidx@pm.me>
2025-12-07 13:33:42 +00:00
renovate[bot]
e8893bc7f4 chore(deps): update patch/minor dependencies (#1459)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 10:03:46 +00:00
Vlad Frangu
fd16e2799b chore(release): 0.38.36 🎉 (#1457)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-01 14:55:50 +02:00
Danial Raza
b6f328aa0f chore(PermissionFlagsBits): mark BypassSlowmode as stable (#1456) 2025-11-30 12:40:06 +00:00
Vlad Frangu
6579f2c9c5 chore(release): 0.38.35 🎉 (#1452)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-29 20:58:01 +02:00
renovate[bot]
176e2f59b6 chore(deps): update patch/minor dependencies (#1454)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 05:44:46 +00:00
renovate[bot]
0d35199598 chore(deps): lock file maintenance (#1445)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 13:46:59 +00:00
renovate[bot]
7d1b2a2ae0 chore(deps): update patch/minor dependencies (#1443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 10:49:50 +00:00
renovate[bot]
12760a8959 chore(deps): update eslint/prettier to v8.47.0 (#1442)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 06:01:38 +00:00
Jiralite
a8c28ab728 fix: Add missing s/S support to StyledTimestamp (#1439) 2025-11-20 13:09:55 +02:00
Vlad Frangu
cdec113cbf chore(release): 0.38.34 🎉 (#1436)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-17 19:15:58 +02:00
renovate[bot]
de72feaa35 chore(deps): lock file maintenance (#1435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-14 18:55:57 +00:00
renovate[bot]
aa6e72d34f chore(deps): update patch/minor dependencies (#1434)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-14 08:27:20 +00:00
renovate[bot]
2117f4926b chore(deps): update eslint/prettier to v8.46.4 (#1433)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-14 04:04:52 +00:00
LukeZ
f883770df6 feat: add isModalSubmitInteraction() type guard (#1428)
* Implement type-guard for modal submit interactions

Added a type-guard function to check for modal submit interactions.

* Implement missing isModalSubmitInteraction typeguard in deno types

Added a type-guard function to check for modal submit interactions in deno types because I missed that before.

* fix(typings): replace 'type-guard' with 'type guard'

This corrects the spacing in the term across multiple locations for consistency with standard TypeScript terminology.

* Revert "fix(typings): replace 'type-guard' with 'type guard'"

This reverts commit 822b2e0bbc.

* fix(typings): replace 'type-guard' with 'type guard' in jsdoc comments in v10

* fix(typings): update JSDoc comments to use 'type guard' instead of 'type-guard'

* fix(typings): replace "type-guard" with "type guard" in v9 utils

* feat(interactions): add type guard for modal submit interactions in v9

---------

Co-authored-by: Luca Hentschel <luca.hentschel@2peaches.de>
2025-11-10 13:59:15 +00:00
renovate[bot]
117b63dcd0 chore(deps): update dependency @types/node to v24 (#1417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 10:12:26 +02:00
Jiralite
5f25c39bc5 chore: fix contributing file (#1430) 2025-11-10 10:11:41 +02:00
Vlad Frangu
200f650539 chore(release): 0.38.33 🎉 (#1429)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-09 23:50:43 +02:00
Jiralite
2736687283 feat(PermissionFlagsBits): add BypassSlowmode (#1427) 2025-11-08 10:04:25 +02:00
renovate[bot]
388faf3d33 chore(deps): lock file maintenance (#1426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 14:36:27 +00:00
renovate[bot]
20b7057c50 chore(deps): update patch/minor dependencies (#1425)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 10:10:37 +00:00
renovate[bot]
5c73edb70a chore(deps): update eslint/prettier (#1424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 05:42:54 +00:00
Vlad Frangu
2b5a2bc1e9 chore(release): 0.38.32 🎉 (#1422)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-03 19:13:04 +02:00
dependabot[bot]
b89290fc95 chore(deps): bump tar from 7.5.1 to 7.5.2 (#1420)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-31 17:46:13 +02:00
Jiralite
bf4291bed8 feat(globals): Support new s/S timestamp styles (#1418) 2025-10-31 17:45:58 +02:00
Jiralite
4237b1a115 chore: update code owners (#1421) 2025-10-31 17:45:30 +02:00
renovate[bot]
d47172c0c9 chore(deps): lock file maintenance (#1419)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-31 10:48:20 +00:00
renovate[bot]
075ec3daf2 chore(deps): update patch/minor dependencies (#1416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-31 07:40:04 +00:00
renovate[bot]
4e69666fe6 chore(deps): lock file maintenance (#1415)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 19:50:03 +00:00
renovate[bot]
73760723b4 chore(deps): update patch/minor dependencies (#1414)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 11:49:38 +00:00
renovate[bot]
6fdf2c8a72 chore(deps): update eslint/prettier to v8.46.2 (#1413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 06:09:58 +00:00
Vlad Frangu
fb8972f52c chore(release): 0.38.31 🎉 (#1410)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 00:15:46 +03:00
Snazzah
fb0109e8e0 feat(GuildRole): add role member counts (#1412)
* feat(GuildRole): add role member counts

* chore: fix spacing in comment
2025-10-23 19:35:49 +01:00
Danial Raza
e37f802e39 fix(APIModalInteractionResponseCallbackComponent): remove APIFileUploadComponent (#1406)
Co-authored-by: Almeida <almeidx@pm.me>
2025-10-22 23:40:01 +01:00
Snazzah
ea2b922d12 feat(APIAuditLogChange): add some missing channel change types (#1409)
* feat(APIAuditLogChange): add some missing channel change types

* chore: fix formatting

* chore: move a type down the list

* chore: fix linting issue

* chore: fix types in deno
2025-10-22 23:36:05 +01:00
Snazzah
be8b372663 feat(Webhooks): add entitlement update and delete events (#1408)
* feat(Webhooks): add entitlement update and delete events

* chore: fix export order
2025-10-22 22:26:53 +01:00
Danial Raza
c5c0312867 feat(GuildFeature): add PinPermissionMigrationComplete (#1407) 2025-10-21 19:26:32 +01:00
Qjuh
7d6a934f66 fix: missing name and size property on APIFileComponent (#1404) 2025-10-21 06:32:03 +03:00
renovate[bot]
9347651bbe chore(deps): lock file maintenance (#1350)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 16:43:22 +00:00
Qjuh
6e5563e2b7 fix: tsdoc unstable tag is block not modifier (#1405) 2025-10-20 18:43:55 +03:00
renovate[bot]
8064df3722 chore(deps): update actions/setup-node action to v6 (#1402)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-17 09:58:41 +03:00
renovate[bot]
eeb99a9ea0 chore(deps): update patch/minor dependencies (#1401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-17 09:58:24 +03:00
renovate[bot]
63c9e4f72e chore(deps): update eslint/prettier to v8.46.1 (#1400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-17 04:30:13 +00:00
Vlad Frangu
4d73b0e509 chore: name 2025-10-15 08:52:50 +03:00
Vlad Frangu
a56c3c892e chore: name 2025-10-15 08:47:07 +03:00
Vlad Frangu
97b0580189 chore: oidc unification 2025-10-15 08:46:33 +03:00
Vlad Frangu
62e5b4a95c feat: publishing with OIDC 2025-10-15 08:41:44 +03:00
130 changed files with 4890 additions and 3113 deletions

17
.github/CODEOWNERS vendored
View File

@@ -1,10 +1,11 @@
* @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
/*.ts @discordjs/discord-api-types
deno/ @discordjs/discord-api-types
gateway/ @discordjs/discord-api-types
payloads/ @discordjs/discord-api-types
rest/ @discordjs/discord-api-types
rpc/ @discordjs/discord-api-types
tests/ @discordjs/discord-api-types
utils/ @discordjs/discord-api-types
voice/ @discordjs/discord-api-types

View File

@@ -1,12 +1,8 @@
# discord-api-types Contributing Guide
**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)
## Pull Request Guidelines
@@ -30,18 +26,18 @@
- 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](https://github.com/discordjs/discord-api-types/blob/main/.github/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)).
## Development Setup
You will need [Node.js](http://nodejs.org) **version 12+**, and [npm](https://www.npmjs.com/).
You will need an LTS version of [Node.js](http://nodejs.org) and [Yarn](https://yarnpkg.com).
After cloning the repo, run:
```bash
$ npm i # install the dependencies of the project
$ yarn install # Install the dependencies of the project
```
A high level overview of tools used:

View File

@@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json

View File

@@ -39,12 +39,12 @@ jobs:
steps:
- name: Checkout discord-api-types
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref || '' }}
- name: Use Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json
@@ -56,7 +56,7 @@ jobs:
# pnpm --filter="*api-*" --filter="scripts" --filter="actions" run build
- name: Checkout discord.js
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: discordjs/discord.js
path: djs

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Label sync
uses: crazy-max/ghaction-github-labeler@v5

View File

@@ -1,52 +0,0 @@
name: Publish next
on:
workflow_dispatch:
push:
branches:
- main
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: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v5
with:
cache: 'yarn'
node-version-file: package.json
- name: Install Dependencies
run: yarn
- name: Bump version
run: node ./scripts/bump-version.mjs
- name: Deprecate old @next versions
run: yarn npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish new @next version
run: |
yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
yarn npm publish --tag next
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

View File

@@ -1,4 +1,4 @@
name: Create PR for new releases and publish new version
name: Release flows
on:
workflow_dispatch:
@@ -10,6 +10,49 @@ on:
- cron: '0 12 * * 1,4'
jobs:
publish_next:
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: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json
- name: Install Dependencies
run: yarn
- name: Bump version
run: node ./scripts/bump-version.mjs
# TODO: we need a scoped token for this -.-, can't OIDC tmk
# - name: Deprecate old @next versions
# run: yarn npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish new @next version
run: |
yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
yarn npm publish --tag next
create_pr:
name: Create PR for new version
runs-on: ubuntu-latest
@@ -17,12 +60,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json
@@ -73,12 +116,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json
@@ -89,8 +132,6 @@ jobs:
- name: Publish release to npm
run: |
yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Create GitHub release
run: node ./scripts/actions/create-release.mjs

View File

@@ -10,10 +10,10 @@ jobs:
pull-requests: write
steps:
- name: Checkout Project
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@ enableGlobalCache: true
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.10.3.cjs
yarnPath: .yarn/releases/yarn-4.12.0.cjs
plugins:
- path: ./.yarn/plugins/postinstallDev.cjs

View File

@@ -1,3 +1,98 @@
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
### Bug Fixes
* export missing properties and use interfaces on GatewayActivityAssets ([#1519](https://github.com/discordjs/discord-api-types/issues/1519)) ([8fd4024](https://github.com/discordjs/discord-api-types/commit/8fd402464a9db8f5341a3146cdd166d557a48510))
### Features
* mark guild member role counts endpoint as stable ([#1462](https://github.com/discordjs/discord-api-types/issues/1462)) ([2a9dfd4](https://github.com/discordjs/discord-api-types/commit/2a9dfd41db635f918a3ca905206ddde8a0d3f83f))
## [0.38.39](https://github.com/discordjs/discord-api-types/compare/0.38.38...0.38.39) (2026-02-13)
### Bug Fixes
* **APIModalSubmitRadioGroupComponent:** nullable value ([#1518](https://github.com/discordjs/discord-api-types/issues/1518)) ([6f6b780](https://github.com/discordjs/discord-api-types/commit/6f6b780851124cc0aa8f06cc28abce992619ee2b))
## [0.38.38](https://github.com/discordjs/discord-api-types/compare/0.38.37...0.38.38) (2026-01-29)
### Features
* radio groups and checkbox in modal ([#1495](https://github.com/discordjs/discord-api-types/issues/1495)) ([18fa946](https://github.com/discordjs/discord-api-types/commit/18fa946bdfb8e0b1537e7538ca046f1647166d1e))
## [0.38.37](https://github.com/discordjs/discord-api-types/compare/0.38.36...0.38.37) (2025-12-11)
## [0.38.36](https://github.com/discordjs/discord-api-types/compare/0.38.35...0.38.36) (2025-12-01)
## [0.38.35](https://github.com/discordjs/discord-api-types/compare/0.38.34...0.38.35) (2025-11-27)
### Bug Fixes
* Add missing s/S support to `StyledTimestamp` ([#1439](https://github.com/discordjs/discord-api-types/issues/1439)) ([a8c28ab](https://github.com/discordjs/discord-api-types/commit/a8c28ab7289726c3f29f53c5c2468e8da400f02f))
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
### Features
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
### Features
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
### Features
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
### Bug Fixes
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
### Features
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)

95
deno/CHANGELOG.md generated
View File

@@ -1,3 +1,98 @@
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
### Bug Fixes
* export missing properties and use interfaces on GatewayActivityAssets ([#1519](https://github.com/discordjs/discord-api-types/issues/1519)) ([8fd4024](https://github.com/discordjs/discord-api-types/commit/8fd402464a9db8f5341a3146cdd166d557a48510))
### Features
* mark guild member role counts endpoint as stable ([#1462](https://github.com/discordjs/discord-api-types/issues/1462)) ([2a9dfd4](https://github.com/discordjs/discord-api-types/commit/2a9dfd41db635f918a3ca905206ddde8a0d3f83f))
## [0.38.39](https://github.com/discordjs/discord-api-types/compare/0.38.38...0.38.39) (2026-02-13)
### Bug Fixes
* **APIModalSubmitRadioGroupComponent:** nullable value ([#1518](https://github.com/discordjs/discord-api-types/issues/1518)) ([6f6b780](https://github.com/discordjs/discord-api-types/commit/6f6b780851124cc0aa8f06cc28abce992619ee2b))
## [0.38.38](https://github.com/discordjs/discord-api-types/compare/0.38.37...0.38.38) (2026-01-29)
### Features
* radio groups and checkbox in modal ([#1495](https://github.com/discordjs/discord-api-types/issues/1495)) ([18fa946](https://github.com/discordjs/discord-api-types/commit/18fa946bdfb8e0b1537e7538ca046f1647166d1e))
## [0.38.37](https://github.com/discordjs/discord-api-types/compare/0.38.36...0.38.37) (2025-12-11)
## [0.38.36](https://github.com/discordjs/discord-api-types/compare/0.38.35...0.38.36) (2025-12-01)
## [0.38.35](https://github.com/discordjs/discord-api-types/compare/0.38.34...0.38.35) (2025-11-27)
### Bug Fixes
* Add missing s/S support to `StyledTimestamp` ([#1439](https://github.com/discordjs/discord-api-types/issues/1439)) ([a8c28ab](https://github.com/discordjs/discord-api-types/commit/a8c28ab7289726c3f29f53c5c2468e8da400f02f))
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
### Features
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
### Features
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
### Features
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
### Bug Fixes
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
### Features
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)

6
deno/gateway/v10.ts generated
View File

@@ -1136,7 +1136,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends APIGuildMemberJoined,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1623,7 +1624,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
NonNullable<APIGuildMemberJoined>,

6
deno/gateway/v9.ts generated
View File

@@ -1135,7 +1135,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends APIGuildMemberJoined,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1622,7 +1623,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
NonNullable<APIGuildMemberJoined>,

10
deno/globals.ts generated
View File

@@ -8,6 +8,9 @@ export type Snowflake = string;
*/
export type Permissions = string;
const timestampStyles = 'DFRSTdfst';
const timestampLength = 13;
/**
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
*/
@@ -76,20 +79,19 @@ export const FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
// eslint-disable-next-line prefer-named-capture-group
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
Timestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})(:(?<style>[${timestampStyles}]))?>`),
/**
* Regular expression for matching strictly default styled timestamps
*
* The `timestamp` group property is present on the `exec` result of this expression
*/
DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
DefaultStyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})>`),
/**
* Regular expression for matching strictly custom styled timestamps
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
StyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}}):(?<style>[${timestampStyles}])>`),
/**
* Regular expression for matching a guild navigation mention
*

View File

@@ -294,6 +294,12 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text
*/
PinMessages: 1n << 51n,
/**
* Allows bypassing slowmode restrictions
*
* Applies to channel types: Text, Voice, Stage
*/
BypassSlowmode: 1n << 52n,
} as const;
/**

View File

@@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandIntegerOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataIntegerOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandNumberOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataNumberOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -5,8 +5,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
*/
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<string>
>;
export interface APIApplicationCommandInteractionDataStringOption
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.String,
string
> {
focused?: boolean;
}

View File

@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandSubcommandOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[];
}

View File

@@ -6,8 +6,7 @@ import type {
APIApplicationCommandSubcommandOption,
} from './subcommand.ts';
export interface APIApplicationCommandSubcommandGroupOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[];
}

View File

@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}

View File

@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake;
resolved: APIUserInteractionDataResolved;
}
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
target_id: Snowflake;
resolved: APIMessageApplicationCommandInteractionDataResolved;
}

View File

@@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
/**
* The user the command was run on, present only on user commands interactions
*/
@@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
/**
* ID of the message that contained the interactive component
*/
@@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel =
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember
extends APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined {
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
permissions: Permissions;
}

View File

@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
export interface APIMessageStringSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
values: string[];
}
export interface APIMessageUserSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
values: Snowflake[];
resolved: APIUserInteractionDataResolved;
}
export interface APIMessageRoleSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
}
export interface APIMessageMentionableSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
values: Snowflake[];
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
}
export interface APIMessageChannelSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
}

View File

@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
value: string | null;
}
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
values: string[];
}
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
value: boolean;
}
export type ModalSubmitComponent =
| APIModalSubmitChannelSelectComponent
| APIModalSubmitCheckboxComponent
| APIModalSubmitCheckboxGroupComponent
| APIModalSubmitFileUploadComponent
| APIModalSubmitMentionableSelectComponent
| APIModalSubmitRadioGroupComponent
| APIModalSubmitRoleSelectComponent
| APIModalSubmitStringSelectComponent
| APIModalSubmitTextInputComponent

View File

@@ -2,7 +2,6 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
import type {
APIActionRowComponent,
APIComponentInModalActionRow,
APIFileUploadComponent,
APILabelComponent,
APITextDisplayComponent,
} from '../message.ts';
@@ -134,7 +133,6 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
export type APIModalInteractionResponseCallbackComponent =
| APIActionRowComponent<APIComponentInModalActionRow>
| APIFileUploadComponent
| APILabelComponent
| APITextDisplayComponent;

View File

@@ -10,7 +10,13 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIChannel,
APIGuildForumDefaultReactionEmoji,
APIGuildForumTag,
APIOverwrite,
VideoQualityMode,
} from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRTCRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySafetyAlertsChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVideoQualityMode
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
*/
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a channel's rtc_region is changed
*/
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
*/
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a channel's video_quality_mode is changed
*/
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
/**
* Returned when a guild's explicit_content_filter is changed
*/

View File

@@ -138,10 +138,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends APITextBasedChannel<T>,
APIGuildChannel<T>,
APISortableChannel,
APIPinChannel<T> {
extends APITextBasedChannel<T>, APIGuildChannel<T>, APISortableChannel, APIPinChannel<T> {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
@@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
}
export interface APIVoiceChannelBase<T extends GuildChannelType>
extends APIGuildChannel<T>,
APISortableChannel,
APITextBasedChannel<T>,
APISlowmodeChannel<T> {
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
/**
* The bitrate (in bits) of the voice or stage channel
*/
@@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
extends APITextBasedChannel<Type>,
APIGuildChannel<Type>,
APIPinChannel<Type> {
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -358,8 +350,7 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T>,
APISortableChannel {
extends APIGuildChannel<T>, APISortableChannel {
/**
* The channel topic (0-4096 characters)
*/

View File

@@ -350,14 +350,57 @@ export interface GatewayActivityParty {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
export interface GatewayActivityAssets {
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
large_image?: string;
/**
* Text displayed when hovering over the large image of the activity
*/
large_text?: string;
/**
* URL that is opened when clicking on the large image
*/
large_url?: string;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
small_image?: string;
/**
* Text displayed when hovering over the small image of the activity
*/
small_text?: string;
/**
* URL that is opened when clicking on the small image
*/
small_url?: string;
/**
* Displayed as a banner on a Game Invite.
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
*/
invite_cover_image?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
export interface GatewayActivitySecrets {
/**
* The secret for joining a party
*/
join?: string;
/**
* The secret for spectating a game
*/
spectate?: string;
/**
* The secret for a specific instance of a match
*/
match?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}

View File

@@ -577,6 +577,12 @@ export enum GuildFeature {
* Guild has access to guest invites
*/
GuestsEnabled = 'GUESTS_ENABLED',
/**
* Guild has migrated to the new pin messages permission
*
* @unstable This feature is currently not documented by Discord, but has known value
*/
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
}
/**
@@ -759,7 +765,8 @@ export interface APIGuildMemberUser {
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIBaseVoiceGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,

View File

@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
*/
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
export interface APIStageInstanceGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
channel_id: Snowflake;
entity_metadata: null;
}
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
entity_metadata: null;
}
export interface APIExternalGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
channel_id: null;
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
}

View File

@@ -810,7 +810,10 @@ export interface APIAttachment {
*/
filename: string;
/**
* The title of the file
* The original filename of the upload with special characters preserved
*
* This will be present when the filename contains special characters (e.g. Cyrillic),
* in which case the `filename` field will be a sanitized version without those characters
*/
title?: string;
/**
@@ -1031,6 +1034,24 @@ export enum ComponentType {
* Component for uploading files
*/
FileUpload,
/**
* Single-choice set of radio group option
*
* @unstable This component is not publicly released and is currently in preview.
*/
RadioGroup = 21,
/**
* Multi-select group of checkboxes
*
* @unstable This component is not publicly released and is currently in preview.
*/
CheckboxGroup,
/**
* Single checkbox for binary choice
*
* @unstable This component is not publicly released and is currently in preview.
*/
Checkbox,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
/**
@@ -1046,8 +1067,9 @@ export enum ComponentType {
*
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
*/
export interface APIActionRowComponent<T extends APIComponentInActionRow>
extends APIBaseComponent<ComponentType.ActionRow> {
export interface APIActionRowComponent<
T extends APIComponentInActionRow,
> extends APIBaseComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
@@ -1097,10 +1119,9 @@ export interface APIMessageComponentEmoji {
/**
* @see {@link https://discord.com/developers/docs/components/reference#button}
*/
export interface APIButtonComponentWithCustomId
extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
/**
* The custom_id to be sent in the interaction when clicked
*/
@@ -1312,8 +1333,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
*
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
*/
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.ChannelSelect,
SelectMenuDefaultValueType.Channel
> {
/**
* List of channel types to include in the ChannelSelect component
*/
@@ -1582,6 +1605,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
* @defaultValue `false`
*/
spoiler?: boolean;
/**
* The name of the file. This field is ignored and provided by the API as part of the response
*/
name?: string;
/**
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
*/
size?: number;
}
/**
@@ -1675,11 +1708,134 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
*/
max_values?: number;
/**
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
* Whether the file upload requires files to be uploaded before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
/**
* Id for the radio group; max 100 characters
*/
custom_id: string;
/**
* 2-10 radio group options within the radio group component
*/
options: APIRadioGroupOption[];
/**
* Whether the radio group requires selection before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APIRadioGroupOption {
/**
* The value of the radio group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the radio group option; max 100 characters
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
/**
* Id for the checkbox group; max 100 characters
*/
custom_id: string;
/**
* Checkbox group option within the component; max 10
*/
options: APICheckboxGroupOption[];
/**
* Minimum number of checkbox that can be selected; min 0, max 10
*
* @defaultValue `1`
*/
min_values?: number;
/**
* Maximum number of checkbox that can be selected; min 1, max 10
*
* @defaultValue {@link APICheckboxGroupComponent.options} length
*/
max_values?: number;
/**
* Whether selecting within the group is required before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupOption {
/**
* The value of the checkbox group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the checkbox group option; max 100 characters;
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
/**
* Id for the checkbox; max 100 characters
*/
custom_id: string;
/**
* Whether this checkbox is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
*/
@@ -1760,7 +1916,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
*/
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
export type APIComponentInLabel =
| APICheckboxComponent
| APICheckboxGroupComponent
| APIFileUploadComponent
| APIRadioGroupComponent
| APISelectMenuComponent
| APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#section}

View File

@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
APIWebhookEventApplicationDeauthorizedData
>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
export interface APIWebhookEventApplicationAuthorizedData {
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
* Entitlement was created
*/
EntitlementCreate = 'ENTITLEMENT_CREATE',
/**
* Entitlement was updated
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
/**
* Entitlement was deleted
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementDelete = 'ENTITLEMENT_DELETE',
/**
* User was added to a Quest (currently unavailable)
*/

View File

@@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandIntegerOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataIntegerOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandNumberOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataNumberOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -5,8 +5,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
*/
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<string>
>;
export interface APIApplicationCommandInteractionDataStringOption
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.String,
string
> {
focused?: boolean;
}

View File

@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandSubcommandOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[];
}

View File

@@ -6,8 +6,7 @@ import type {
APIApplicationCommandSubcommandOption,
} from './subcommand.ts';
export interface APIApplicationCommandSubcommandGroupOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[];
}

View File

@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}

View File

@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake;
resolved: APIUserInteractionDataResolved;
}
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
target_id: Snowflake;
resolved: APIMessageApplicationCommandInteractionDataResolved;
}

View File

@@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
/**
* The user the command was run on, present only on user commands interactions
*/
@@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
/**
* ID of the message that contained the interactive component
*/
@@ -257,10 +255,7 @@ export type APIInteractionDataResolvedChannel =
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember
extends APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined {
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
permissions: Permissions;
}

View File

@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
export interface APIMessageStringSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
values: string[];
}
export interface APIMessageUserSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
values: Snowflake[];
resolved: APIUserInteractionDataResolved;
}
export interface APIMessageRoleSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
}
export interface APIMessageMentionableSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
values: Snowflake[];
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
}
export interface APIMessageChannelSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
}

View File

@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
value: string | null;
}
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
values: string[];
}
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
value: boolean;
}
export type ModalSubmitComponent =
| APIModalSubmitChannelSelectComponent
| APIModalSubmitCheckboxComponent
| APIModalSubmitCheckboxGroupComponent
| APIModalSubmitFileUploadComponent
| APIModalSubmitMentionableSelectComponent
| APIModalSubmitRadioGroupComponent
| APIModalSubmitRoleSelectComponent
| APIModalSubmitStringSelectComponent
| APIModalSubmitTextInputComponent

View File

@@ -2,7 +2,6 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
import type {
APIActionRowComponent,
APIComponentInModalActionRow,
APIFileUploadComponent,
APILabelComponent,
APITextDisplayComponent,
} from '../message.ts';
@@ -134,7 +133,6 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
export type APIModalInteractionResponseCallbackComponent =
| APIActionRowComponent<APIComponentInModalActionRow>
| APIFileUploadComponent
| APILabelComponent
| APITextDisplayComponent;

View File

@@ -10,7 +10,13 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration.ts';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
import type {
APIChannel,
APIGuildForumDefaultReactionEmoji,
APIGuildForumTag,
APIOverwrite,
VideoQualityMode,
} from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRTCRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySafetyAlertsChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVideoQualityMode
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
*/
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a channel's rtc_region is changed
*/
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
*/
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a channel's video_quality_mode is changed
*/
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
/**
* Returned when a guild's explicit_content_filter is changed
*/

View File

@@ -138,10 +138,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends APITextBasedChannel<T>,
APISortableChannel,
APIGuildChannel<T>,
APIPinChannel<T> {
extends APITextBasedChannel<T>, APISortableChannel, APIGuildChannel<T>, APIPinChannel<T> {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
@@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
}
export interface APIVoiceChannelBase<T extends GuildChannelType = GuildChannelType>
extends APIGuildChannel<T>,
APISortableChannel,
APITextBasedChannel<T>,
APISlowmodeChannel<T> {
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
/**
* The bitrate (in bits) of the voice or stage channel
*/
@@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
extends APITextBasedChannel<Type>,
APIGuildChannel<Type>,
APIPinChannel<Type> {
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -358,8 +350,7 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T>,
APISortableChannel {
extends APIGuildChannel<T>, APISortableChannel {
/**
* The channel topic (0-4096 characters)
*/

View File

@@ -338,14 +338,57 @@ export interface GatewayActivityParty {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
export interface GatewayActivityAssets {
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
large_image?: string;
/**
* Text displayed when hovering over the large image of the activity
*/
large_text?: string;
/**
* URL that is opened when clicking on the large image
*/
large_url?: string;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
small_image?: string;
/**
* Text displayed when hovering over the small image of the activity
*/
small_text?: string;
/**
* URL that is opened when clicking on the small image
*/
small_url?: string;
/**
* Displayed as a banner on a Game Invite.
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
*/
invite_cover_image?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
export interface GatewayActivitySecrets {
/**
* The secret for joining a party
*/
join?: string;
/**
* The secret for spectating a game
*/
spectate?: string;
/**
* The secret for a specific instance of a match
*/
match?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}

View File

@@ -569,6 +569,12 @@ export enum GuildFeature {
* Guild has access to guest invites
*/
GuestsEnabled = 'GUESTS_ENABLED',
/**
* Guild has migrated to the new pin messages permission
*
* @unstable This feature is currently not documented by Discord, but has known value
*/
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
}
/**
@@ -751,7 +757,8 @@ export interface APIGuildMemberUser {
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIBaseVoiceGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,

View File

@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
*/
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
export interface APIStageInstanceGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
channel_id: Snowflake;
entity_metadata: null;
}
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
entity_metadata: null;
}
export interface APIExternalGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
channel_id: null;
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
}

View File

@@ -805,7 +805,10 @@ export interface APIAttachment {
*/
filename: string;
/**
* The title of the file
* The original filename of the upload with special characters preserved
*
* This will be present when the filename contains special characters (e.g. Cyrillic),
* in which case the `filename` field will be a sanitized version without those characters
*/
title?: string;
/**
@@ -1026,6 +1029,24 @@ export enum ComponentType {
* Component for uploading files
*/
FileUpload,
/**
* Single-choice set of radio group option
*
* @unstable This component is not publicly released and is currently in preview.
*/
RadioGroup = 21,
/**
* Multi-select group of checkboxes
*
* @unstable This component is not publicly released and is currently in preview.
*/
CheckboxGroup,
/**
* Single checkbox for binary choice
*
* @unstable This component is not publicly released and is currently in preview.
*/
Checkbox,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
/**
@@ -1041,8 +1062,9 @@ export enum ComponentType {
*
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
*/
export interface APIActionRowComponent<T extends APIComponentInActionRow>
extends APIBaseComponent<ComponentType.ActionRow> {
export interface APIActionRowComponent<
T extends APIComponentInActionRow,
> extends APIBaseComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
@@ -1092,10 +1114,9 @@ export interface APIMessageComponentEmoji {
/**
* @see {@link https://discord.com/developers/docs/components/reference#button}
*/
export interface APIButtonComponentWithCustomId
extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
/**
* The custom_id to be sent in the interaction when clicked
*/
@@ -1307,8 +1328,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
*
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
*/
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.ChannelSelect,
SelectMenuDefaultValueType.Channel
> {
/**
* List of channel types to include in the ChannelSelect component
*/
@@ -1577,6 +1600,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
* @defaultValue `false`
*/
spoiler?: boolean;
/**
* The name of the file. This field is ignored and provided by the API as part of the response
*/
name?: string;
/**
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
*/
size?: number;
}
/**
@@ -1670,11 +1703,134 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
*/
max_values?: number;
/**
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
* Whether the file upload requires files to be uploaded before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
/**
* Id for the radio group; max 100 characters
*/
custom_id: string;
/**
* 2-10 radio group options within the radio group component
*/
options: APIRadioGroupOption[];
/**
* Whether the radio group requires selection before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APIRadioGroupOption {
/**
* The value of the radio group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the radio group option; max 100 characters
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
/**
* Id for the checkbox group; max 100 characters
*/
custom_id: string;
/**
* Checkbox group option within the component; max 10
*/
options: APICheckboxGroupOption[];
/**
* Minimum number of checkbox that can be selected; min 0, max 10
*
* @defaultValue `1`
*/
min_values?: number;
/**
* Maximum number of checkbox that can be selected; min 1, max 10
*
* @defaultValue {@link APICheckboxGroupComponent.options} length
*/
max_values?: number;
/**
* Whether selecting within the group is required before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupOption {
/**
* The value of the checkbox group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the checkbox group option; max 100 characters;
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
/**
* Id for the checkbox; max 100 characters
*/
custom_id: string;
/**
* Whether this checkbox is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
*/
@@ -1755,7 +1911,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
*/
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
export type APIComponentInLabel =
| APICheckboxComponent
| APICheckboxGroupComponent
| APIFileUploadComponent
| APIRadioGroupComponent
| APISelectMenuComponent
| APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#section}

View File

@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
APIWebhookEventApplicationDeauthorizedData
>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
export interface APIWebhookEventApplicationAuthorizedData {
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
* Entitlement was created
*/
EntitlementCreate = 'ENTITLEMENT_CREATE',
/**
* Entitlement was updated
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
/**
* Entitlement was deleted
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementDelete = 'ENTITLEMENT_DELETE',
/**
* User was added to a Quest (currently unavailable)
*/

14
deno/rest/v10/guild.ts generated
View File

@@ -813,6 +813,14 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
*/
export type RESTDeleteAPIGuildRoleResult = never;
/**
* A record mapping role IDs to the number of members that have that role.
*
* @remarks This does not include the `@everyone` role.
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role-member-counts}
*/
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
*/
@@ -999,7 +1007,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
};
export interface RESTAPIGuildOnboardingPrompt
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
>,
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
@@ -1015,7 +1024,8 @@ export interface RESTAPIGuildOnboardingPrompt
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
export interface RESTAPIGuildOnboardingPromptOption
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
>,
Pick<APIGuildOnboardingPromptOption, 'title'> {

View File

@@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
*/
export interface RESTPatchAPIGuildScheduledEventJSONBody
extends _Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
>,
extends
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
_StrictPartial<
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> {

View File

@@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
export interface RESTPostAPIBaseApplicationCommandsJSONBody
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Omit<
APIApplicationCommand,
| 'application_id'
@@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
/**
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
extends RESTPostAPIBaseApplicationCommandsJSONBody {
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
type: ApplicationCommandType.PrimaryEntryPoint;
}

8
deno/rest/v10/mod.ts generated
View File

@@ -380,6 +380,14 @@ export const Routes = {
return `/guilds/${guildId}/roles/${roleId}` as const;
},
/**
* Route for:
* - GET `/guilds/{guild.id}/roles/member-counts`
*/
guildRoleMemberCounts(guildId: Snowflake) {
return `/guilds/${guildId}/roles/member-counts` as const;
},
/**
* Route for:
* - GET `/guilds/{guild.id}/prune`

14
deno/rest/v9/guild.ts generated
View File

@@ -819,6 +819,14 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
*/
export type RESTDeleteAPIGuildRoleResult = never;
/**
* A record mapping role IDs to the number of members that have that role.
*
* @remarks This does not include the `@everyone` role.
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role-member-counts}
*/
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
*/
@@ -1005,7 +1013,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
};
export interface RESTAPIGuildOnboardingPrompt
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
>,
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
@@ -1021,7 +1030,8 @@ export interface RESTAPIGuildOnboardingPrompt
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
export interface RESTAPIGuildOnboardingPromptOption
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
>,
Pick<APIGuildOnboardingPromptOption, 'title'> {

View File

@@ -95,9 +95,8 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
*/
export interface RESTPatchAPIGuildScheduledEventJSONBody
extends _Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
>,
extends
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
_StrictPartial<
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> {

View File

@@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
export interface RESTPostAPIBaseApplicationCommandsJSONBody
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Omit<
APIApplicationCommand,
| 'application_id'
@@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
/**
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
extends RESTPostAPIBaseApplicationCommandsJSONBody {
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
type: ApplicationCommandType.PrimaryEntryPoint;
}

8
deno/rest/v9/mod.ts generated
View File

@@ -380,6 +380,14 @@ export const Routes = {
return `/guilds/${guildId}/roles/${roleId}` as const;
},
/**
* Route for:
* - GET `/guilds/{guild.id}/roles/member-counts`
*/
guildRoleMemberCounts(guildId: Snowflake) {
return `/guilds/${guildId}/roles/member-counts` as const;
},
/**
* Route for:
* - GET `/guilds/{guild.id}/prune`

21
deno/rpc/v10.ts generated
View File

@@ -1923,8 +1923,7 @@ export interface RPCCommandActivityInviteUserPayload extends RPCCommandMessage<R
args: RPCActivityInviteUserArgs;
}
export interface RPCCommandBraintreePopupBridgeCallbackPayload
extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
export interface RPCCommandBraintreePopupBridgeCallbackPayload extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
args: RPCBraintreePopupBridgeCallbackArgs;
}
@@ -1932,8 +1931,7 @@ export interface RPCCommandBrowserPayload extends RPCCommandMessage<RPCCommands.
args: RPCBrowserHandoffArgs;
}
export interface RPCCommandCloseActivityJoinRequestPayload
extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> {
export interface RPCCommandCloseActivityJoinRequestPayload extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> {
args: RPCCloseActivityJoinRequestArgs;
}
@@ -1973,8 +1971,7 @@ export interface RPCCommandGetRelationshipsPayload extends RPCCommandMessage<RPC
args: RPCGetRelationshipsArgs;
}
export interface RPCCommandGetSelectedVoiceChannelPayload
extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> {
export interface RPCCommandGetSelectedVoiceChannelPayload extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> {
args: RPCGetSelectedVoiceChannelArgs;
}
@@ -2002,13 +1999,11 @@ export interface RPCCommandNetworkingPeerMetricsPayload extends RPCCommandMessag
args: RPCNetworkingPeerMetricsArgs;
}
export interface RPCCommandNetworkingSystemMetricsPayload
extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> {
export interface RPCCommandNetworkingSystemMetricsPayload extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> {
args: RPCNetworkingSystemMetricsArgs;
}
export interface RPCCommandOpenOverlayActivityInvitePayload
extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> {
export interface RPCCommandOpenOverlayActivityInvitePayload extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> {
args: RPCOpenOverlayActivityInviteArgs;
}
@@ -2016,8 +2011,7 @@ export interface RPCCommandOpenOverlayGuildInvitePayload extends RPCCommandMessa
args: RPCOpenOverlayGuildInviteArgs;
}
export interface RPCCommandOpenOverlayVoiceSettingsPayload
extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> {
export interface RPCCommandOpenOverlayVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> {
args: RPCOpenOverlayVoiceSettingsArgs;
}
@@ -2261,8 +2255,7 @@ export interface RPCActivityInviteUserResult extends RPCCommandMessage<RPCComman
data: RPCActivityInviteUserResultData;
}
export interface RPCBraintreePopupBridgeCallbackResult
extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
export interface RPCBraintreePopupBridgeCallbackResult extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
data: RPCBraintreePopupBridgeCallbackResultData;
}

39
deno/utils/v10.ts generated
View File

@@ -15,13 +15,14 @@ import type {
APIMessageComponentGuildInteraction,
APIMessageComponentInteraction,
APIMessageComponentSelectMenuInteraction,
APIModalSubmitInteraction,
} from '../payloads/v10/mod.ts';
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v10/mod.ts';
// Interactions
/**
* A type-guard check for DM interactions
* A type guard check for DM interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction was received in a DM channel
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
}
/**
* A type-guard check for guild interactions
* A type guard check for guild interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction was received in a guild
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
// ApplicationCommandInteractions
/**
* A type-guard check for DM application command interactions
* A type guard check for DM application command interactions
*
* @param interaction - The application command interaction to check against
* @returns A boolean that indicates if the application command interaction was received in a DM channel
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
}
/**
* A type-guard check for guild application command interactions
* A type guard check for guild application command interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the application command interaction was received in a guild
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
// MessageComponentInteractions
/**
* A type-guard check for DM message component interactions
* A type guard check for DM message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component interaction was received in a DM channel
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
}
/**
* A type-guard check for guild message component interactions
* A type guard check for guild message component interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the message component interaction was received in a guild
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
// Buttons
/**
* A type-guard check for buttons that have a `url` attached to them.
* A type guard check for buttons that have a `url` attached to them.
*
* @param component - The button to check against
* @returns A boolean that indicates if the button has a `url` attached to it
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
}
/**
* A type-guard check for buttons that have a `custom_id` attached to them.
* A type guard check for buttons that have a `custom_id` attached to them.
*
* @param component - The button to check against
* @returns A boolean that indicates if the button has a `custom_id` attached to it
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Modal
/**
* A type guard check for modals submit interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a modal submission
*/
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
return interaction.type === InteractionType.ModalSubmit;
}
// Message Components
/**
* A type-guard check for message component interactions
* A type guard check for message component interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a message component
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
}
/**
* A type-guard check for button message component interactions
* A type guard check for button message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component is a button
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
}
/**
* A type-guard check for select menu message component interactions
* A type guard check for select menu message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component is a select menu
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
// Application Commands
/**
* A type-guard check for chat input application commands.
* A type guard check for chat input application commands.
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a chat input application command
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
}
/**
* A type-guard check for context menu application commands.
* A type guard check for context menu application commands.
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a context menu application command

39
deno/utils/v9.ts generated
View File

@@ -15,13 +15,14 @@ import type {
APIMessageComponentGuildInteraction,
APIMessageComponentInteraction,
APIMessageComponentSelectMenuInteraction,
APIModalSubmitInteraction,
} from '../payloads/v9/mod.ts';
import { ApplicationCommandType, ButtonStyle, ComponentType, InteractionType } from '../payloads/v9/mod.ts';
// Interactions
/**
* A type-guard check for DM interactions
* A type guard check for DM interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction was received in a DM channel
@@ -31,7 +32,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
}
/**
* A type-guard check for guild interactions
* A type guard check for guild interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction was received in a guild
@@ -43,7 +44,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
// ApplicationCommandInteractions
/**
* A type-guard check for DM application command interactions
* A type guard check for DM application command interactions
*
* @param interaction - The application command interaction to check against
* @returns A boolean that indicates if the application command interaction was received in a DM channel
@@ -55,7 +56,7 @@ export function isApplicationCommandDMInteraction(
}
/**
* A type-guard check for guild application command interactions
* A type guard check for guild application command interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the application command interaction was received in a guild
@@ -69,7 +70,7 @@ export function isApplicationCommandGuildInteraction(
// MessageComponentInteractions
/**
* A type-guard check for DM message component interactions
* A type guard check for DM message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component interaction was received in a DM channel
@@ -81,7 +82,7 @@ export function isMessageComponentDMInteraction(
}
/**
* A type-guard check for guild message component interactions
* A type guard check for guild message component interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the message component interaction was received in a guild
@@ -95,7 +96,7 @@ export function isMessageComponentGuildInteraction(
// Buttons
/**
* A type-guard check for buttons that have a `url` attached to them.
* A type guard check for buttons that have a `url` attached to them.
*
* @param component - The button to check against
* @returns A boolean that indicates if the button has a `url` attached to it
@@ -105,7 +106,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
}
/**
* A type-guard check for buttons that have a `custom_id` attached to them.
* A type guard check for buttons that have a `custom_id` attached to them.
*
* @param component - The button to check against
* @returns A boolean that indicates if the button has a `custom_id` attached to it
@@ -114,10 +115,22 @@ export function isInteractionButton(component: APIButtonComponent): component is
return ![ButtonStyle.Link, ButtonStyle.Premium].includes(component.style);
}
// Modal
/**
* A type guard check for modals submit interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a modal submission
*/
export function isModalSubmitInteraction(interaction: APIInteraction): interaction is APIModalSubmitInteraction {
return interaction.type === InteractionType.ModalSubmit;
}
// Message Components
/**
* A type-guard check for message component interactions
* A type guard check for message component interactions
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a message component
@@ -129,7 +142,7 @@ export function isMessageComponentInteraction(
}
/**
* A type-guard check for button message component interactions
* A type guard check for button message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component is a button
@@ -141,7 +154,7 @@ export function isMessageComponentButtonInteraction(
}
/**
* A type-guard check for select menu message component interactions
* A type guard check for select menu message component interactions
*
* @param interaction - The message component interaction to check against
* @returns A boolean that indicates if the message component is a select menu
@@ -161,7 +174,7 @@ export function isMessageComponentSelectMenuInteraction(
// Application Commands
/**
* A type-guard check for chat input application commands.
* A type guard check for chat input application commands.
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a chat input application command
@@ -173,7 +186,7 @@ export function isChatInputApplicationCommandInteraction(
}
/**
* A type-guard check for context menu application commands.
* A type guard check for context menu application commands.
*
* @param interaction - The interaction to check against
* @returns A boolean that indicates if the interaction is a context menu application command

View File

@@ -1136,7 +1136,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends APIGuildMemberJoined,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1623,7 +1624,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
NonNullable<APIGuildMemberJoined>,

View File

@@ -1135,7 +1135,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends APIGuildMemberJoined,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1622,7 +1623,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
NonNullable<APIGuildMemberJoined>,

View File

@@ -8,6 +8,9 @@ export type Snowflake = string;
*/
export type Permissions = string;
const timestampStyles = 'DFRSTdfst';
const timestampLength = 13;
/**
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
*/
@@ -76,20 +79,19 @@ export const FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
// eslint-disable-next-line prefer-named-capture-group
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
Timestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})(:(?<style>[${timestampStyles}]))?>`),
/**
* Regular expression for matching strictly default styled timestamps
*
* The `timestamp` group property is present on the `exec` result of this expression
*/
DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
DefaultStyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})>`),
/**
* Regular expression for matching strictly custom styled timestamps
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
StyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}}):(?<style>[${timestampStyles}])>`),
/**
* Regular expression for matching a guild navigation mention
*

View File

@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.38.30",
"version": "0.38.40",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"workspaces": [
@@ -139,12 +139,12 @@
"@octokit/webhooks-types": "^7.6.1",
"@sapphire/prettier-config": "^2.0.0",
"@types/lodash.merge": "^4",
"@types/node": "^22.15.29",
"@types/node": "^24.0.0",
"@typescript-eslint/utils": "^8.33.0",
"conventional-changelog": "^7.0.2",
"conventional-changelog-angular": "^8.0.0",
"conventional-recommended-bump": "^11.1.0",
"eslint": "^9.28.0",
"eslint": "^10.0.0",
"eslint-config-neon": "^0.2.7",
"eslint-formatter-pretty": "^7.0.0",
"eslint-import-resolver-typescript": "^4.4.2",
@@ -154,7 +154,7 @@
"lint-staged": "^16.1.0",
"lodash.merge": "^4.6.2",
"npm-run-all2": "^8.0.4",
"prettier": "^3.5.3",
"prettier": "^3.7.4",
"pretty-quick": "^4.1.1",
"rimraf": "^6.0.1",
"ts-morph": "^27.0.0",
@@ -207,9 +207,9 @@
]
}
},
"packageManager": "yarn@4.10.3",
"packageManager": "yarn@4.12.0",
"volta": {
"node": "24.10.0",
"yarn": "4.10.3"
"node": "24.13.1",
"yarn": "4.12.0"
}
}

View File

@@ -294,6 +294,12 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text
*/
PinMessages: 1n << 51n,
/**
* Allows bypassing slowmode restrictions
*
* Applies to channel types: Text, Voice, Stage
*/
BypassSlowmode: 1n << 52n,
} as const;
/**

View File

@@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandIntegerOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataIntegerOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandNumberOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataNumberOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -5,8 +5,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
*/
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<string>
>;
export interface APIApplicationCommandInteractionDataStringOption
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.String,
string
> {
focused?: boolean;
}

View File

@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
import type { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandSubcommandOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[];
}

View File

@@ -6,8 +6,7 @@ import type {
APIApplicationCommandSubcommandOption,
} from './subcommand';
export interface APIApplicationCommandSubcommandGroupOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[];
}

View File

@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}

View File

@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals';
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake;
resolved: APIUserInteractionDataResolved;
}
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
target_id: Snowflake;
resolved: APIMessageApplicationCommandInteractionDataResolved;
}

View File

@@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
/**
* The user the command was run on, present only on user commands interactions
*/
@@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
/**
* ID of the message that contained the interactive component
*/
@@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel =
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember
extends APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined {
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
permissions: Permissions;
}

View File

@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
export interface APIMessageStringSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
values: string[];
}
export interface APIMessageUserSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
values: Snowflake[];
resolved: APIUserInteractionDataResolved;
}
export interface APIMessageRoleSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
}
export interface APIMessageMentionableSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
values: Snowflake[];
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
}
export interface APIMessageChannelSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
}

View File

@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
value: string | null;
}
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
values: string[];
}
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
value: boolean;
}
export type ModalSubmitComponent =
| APIModalSubmitChannelSelectComponent
| APIModalSubmitCheckboxComponent
| APIModalSubmitCheckboxGroupComponent
| APIModalSubmitFileUploadComponent
| APIModalSubmitMentionableSelectComponent
| APIModalSubmitRadioGroupComponent
| APIModalSubmitRoleSelectComponent
| APIModalSubmitStringSelectComponent
| APIModalSubmitTextInputComponent

View File

@@ -2,7 +2,6 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10';
import type {
APIActionRowComponent,
APIComponentInModalActionRow,
APIFileUploadComponent,
APILabelComponent,
APITextDisplayComponent,
} from '../message';
@@ -134,7 +133,6 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
export type APIModalInteractionResponseCallbackComponent =
| APIActionRowComponent<APIComponentInModalActionRow>
| APIFileUploadComponent
| APILabelComponent
| APITextDisplayComponent;

View File

@@ -10,7 +10,13 @@ import type {
AutoModerationRuleEventType,
AutoModerationRuleTriggerType,
} from './autoModeration';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
import type {
APIChannel,
APIGuildForumDefaultReactionEmoji,
APIGuildForumTag,
APIOverwrite,
VideoQualityMode,
} from './channel';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
@@ -422,7 +428,9 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRTCRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySafetyAlertsChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
@@ -439,6 +447,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVideoQualityMode
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
@@ -488,6 +497,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
*/
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a channel's rtc_region is changed
*/
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
@@ -528,6 +542,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
*/
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a channel's video_quality_mode is changed
*/
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
/**
* Returned when a guild's explicit_content_filter is changed
*/

View File

@@ -138,10 +138,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
extends APITextBasedChannel<T>,
APIGuildChannel<T>,
APISortableChannel,
APIPinChannel<T> {
extends APITextBasedChannel<T>, APIGuildChannel<T>, APISortableChannel, APIPinChannel<T> {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
@@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
}
export interface APIVoiceChannelBase<T extends GuildChannelType>
extends APIGuildChannel<T>,
APISortableChannel,
APITextBasedChannel<T>,
APISlowmodeChannel<T> {
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
/**
* The bitrate (in bits) of the voice or stage channel
*/
@@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
extends APITextBasedChannel<Type>,
APIGuildChannel<Type>,
APIPinChannel<Type> {
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -358,8 +350,7 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T>,
APISortableChannel {
extends APIGuildChannel<T>, APISortableChannel {
/**
* The channel topic (0-4096 characters)
*/

View File

@@ -350,14 +350,57 @@ export interface GatewayActivityParty {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
>;
export interface GatewayActivityAssets {
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
large_image?: string;
/**
* Text displayed when hovering over the large image of the activity
*/
large_text?: string;
/**
* URL that is opened when clicking on the large image
*/
large_url?: string;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
*/
small_image?: string;
/**
* Text displayed when hovering over the small image of the activity
*/
small_text?: string;
/**
* URL that is opened when clicking on the small image
*/
small_url?: string;
/**
* Displayed as a banner on a Game Invite.
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
*/
invite_cover_image?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
export interface GatewayActivitySecrets {
/**
* The secret for joining a party
*/
join?: string;
/**
* The secret for spectating a game
*/
spectate?: string;
/**
* The secret for a specific instance of a match
*/
match?: string;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}

View File

@@ -577,6 +577,12 @@ export enum GuildFeature {
* Guild has access to guest invites
*/
GuestsEnabled = 'GUESTS_ENABLED',
/**
* Guild has migrated to the new pin messages permission
*
* @unstable This feature is currently not documented by Discord, but has known value
*/
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
}
/**
@@ -759,7 +765,8 @@ export interface APIGuildMemberUser {
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIBaseVoiceGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,

View File

@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
*/
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
export interface APIStageInstanceGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
channel_id: Snowflake;
entity_metadata: null;
}
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
entity_metadata: null;
}
export interface APIExternalGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
channel_id: null;
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
}

View File

@@ -810,7 +810,10 @@ export interface APIAttachment {
*/
filename: string;
/**
* The title of the file
* The original filename of the upload with special characters preserved
*
* This will be present when the filename contains special characters (e.g. Cyrillic),
* in which case the `filename` field will be a sanitized version without those characters
*/
title?: string;
/**
@@ -1031,6 +1034,24 @@ export enum ComponentType {
* Component for uploading files
*/
FileUpload,
/**
* Single-choice set of radio group option
*
* @unstable This component is not publicly released and is currently in preview.
*/
RadioGroup = 21,
/**
* Multi-select group of checkboxes
*
* @unstable This component is not publicly released and is currently in preview.
*/
CheckboxGroup,
/**
* Single checkbox for binary choice
*
* @unstable This component is not publicly released and is currently in preview.
*/
Checkbox,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
/**
@@ -1046,8 +1067,9 @@ export enum ComponentType {
*
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
*/
export interface APIActionRowComponent<T extends APIComponentInActionRow>
extends APIBaseComponent<ComponentType.ActionRow> {
export interface APIActionRowComponent<
T extends APIComponentInActionRow,
> extends APIBaseComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
@@ -1097,10 +1119,9 @@ export interface APIMessageComponentEmoji {
/**
* @see {@link https://discord.com/developers/docs/components/reference#button}
*/
export interface APIButtonComponentWithCustomId
extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
> {
/**
* The custom_id to be sent in the interaction when clicked
*/
@@ -1312,8 +1333,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
*
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
*/
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.ChannelSelect,
SelectMenuDefaultValueType.Channel
> {
/**
* List of channel types to include in the ChannelSelect component
*/
@@ -1582,6 +1605,16 @@ export interface APIFileComponent extends APIBaseComponent<ComponentType.File> {
* @defaultValue `false`
*/
spoiler?: boolean;
/**
* The name of the file. This field is ignored and provided by the API as part of the response
*/
name?: string;
/**
* The size of the file in bytes. This field is ignored and provided by the API as part of the response
*/
size?: number;
}
/**
@@ -1675,11 +1708,134 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
*/
max_values?: number;
/**
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
* Whether the file upload requires files to be uploaded before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
/**
* Id for the radio group; max 100 characters
*/
custom_id: string;
/**
* 2-10 radio group options within the radio group component
*/
options: APIRadioGroupOption[];
/**
* Whether the radio group requires selection before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APIRadioGroupOption {
/**
* The value of the radio group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the radio group option; max 100 characters
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
/**
* Id for the checkbox group; max 100 characters
*/
custom_id: string;
/**
* Checkbox group option within the component; max 10
*/
options: APICheckboxGroupOption[];
/**
* Minimum number of checkbox that can be selected; min 0, max 10
*
* @defaultValue `1`
*/
min_values?: number;
/**
* Maximum number of checkbox that can be selected; min 1, max 10
*
* @defaultValue {@link APICheckboxGroupComponent.options} length
*/
max_values?: number;
/**
* Whether selecting within the group is required before submitting the modal
*
* @defaultValue `true`
*/
required?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
* @unstable This feature is not publicly released and is currently in preview.
*/
export interface APICheckboxGroupOption {
/**
* The value of the checkbox group option; max 100 characters
*/
value: string;
/**
* The label text; max 100 characters
*/
label: string;
/**
* An optional description for the checkbox group option; max 100 characters;
*/
description?: string;
/**
* Whether this option is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
* @unstable This component is not publicly released and is currently in preview.
*/
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
/**
* Id for the checkbox; max 100 characters
*/
custom_id: string;
/**
* Whether this checkbox is selected by default
*
* @defaultValue `false`
*/
default?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
*/
@@ -1760,7 +1916,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
*/
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
export type APIComponentInLabel =
| APICheckboxComponent
| APICheckboxGroupComponent
| APIFileUploadComponent
| APIRadioGroupComponent
| APISelectMenuComponent
| APITextInputComponent;
/**
* @see {@link https://discord.com/developers/docs/components/reference#section}

View File

@@ -91,6 +91,8 @@ export type APIWebhookEventBody =
APIWebhookEventApplicationDeauthorizedData
>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
export interface APIWebhookEventApplicationAuthorizedData {
@@ -121,6 +123,16 @@ export interface APIWebhookEventApplicationDeauthorizedData {
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
/**
* @unstable
*/
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
@@ -187,6 +199,18 @@ export enum ApplicationWebhookEventType {
* Entitlement was created
*/
EntitlementCreate = 'ENTITLEMENT_CREATE',
/**
* Entitlement was updated
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
/**
* Entitlement was deleted
*
* @unstable This event is not yet documented but can be enabled from the developer portal
*/
EntitlementDelete = 'ENTITLEMENT_DELETE',
/**
* User was added to a Quest (currently unavailable)
*/

View File

@@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandIntegerOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataIntegerOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Integer,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -6,8 +6,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandNumberOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<number>
>;
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
export interface APIApplicationCommandInteractionDataNumberOption<
Type extends InteractionType = InteractionType,
> extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.Number,
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
> {
focused?: boolean;
}

View File

@@ -5,8 +5,7 @@ import type {
} from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
*/
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
APIApplicationCommandOptionChoice<string>
>;
export interface APIApplicationCommandInteractionDataStringOption
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
ApplicationCommandOptionType.String,
string
> {
focused?: boolean;
}

View File

@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
import type { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandSubcommandOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[];
}

View File

@@ -6,8 +6,7 @@ import type {
APIApplicationCommandSubcommandOption,
} from './subcommand';
export interface APIApplicationCommandSubcommandGroupOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[];
}

View File

@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}

View File

@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals';
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake;
resolved: APIUserInteractionDataResolved;
}
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
target_id: Snowflake;
resolved: APIMessageApplicationCommandInteractionDataResolved;
}

View File

@@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
/**
* The user the command was run on, present only on user commands interactions
*/
@@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
/**
* ID of the message that contained the interactive component
*/
@@ -257,10 +255,7 @@ export type APIInteractionDataResolvedChannel =
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember
extends APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined {
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
permissions: Permissions;
}

View File

@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
export interface APIMessageStringSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
values: string[];
}
export interface APIMessageUserSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
values: Snowflake[];
resolved: APIUserInteractionDataResolved;
}
export interface APIMessageRoleSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
}
export interface APIMessageMentionableSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
values: Snowflake[];
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
}
export interface APIMessageChannelSelectInteractionData
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
values: Snowflake[];
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
}

View File

@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
values: string[];
}
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
value: string | null;
}
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
values: string[];
}
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
value: boolean;
}
export type ModalSubmitComponent =
| APIModalSubmitChannelSelectComponent
| APIModalSubmitCheckboxComponent
| APIModalSubmitCheckboxGroupComponent
| APIModalSubmitFileUploadComponent
| APIModalSubmitMentionableSelectComponent
| APIModalSubmitRadioGroupComponent
| APIModalSubmitRoleSelectComponent
| APIModalSubmitStringSelectComponent
| APIModalSubmitTextInputComponent

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