Compare commits

..

257 Commits

Author SHA1 Message Date
almeidx
83df57b45a fix(Interactions): add missing fields to types
Add `messages` to `APIInteractionDataResolved` and `id` to
`APIMessageComponentBaseInteractionData` per Discord API docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 16:39:18 +00:00
Almeida
a4aa724eb8 fix(Channel): correct PATCH channel field nullability (#1575)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:08:49 +02:00
Almeida
dea22dc487 fix(poll): mark expiry as nullable (#1576)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:08:37 +02:00
Almeida
cf6476dc8a fix(Guild): correct optionality and nullability (#1574)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:08:15 +02:00
Almeida
f76c2fa249 fix: split grouped gateway dispatch types (#1563) 2026-03-19 10:04:56 +00:00
Almeida
0000e9afe3 fix: role colors optionality, color deprecation, and stale annotations (#1566)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:40:56 +02:00
kshitijanurag
c3b331d80a feat(message): shared client themes (#1565) 2026-03-19 09:40:28 +02:00
Almeida
f1a3cb7bb7 fix: send soundboard result type (#1568) 2026-03-19 09:37:28 +02:00
Almeida
38b9467178 fix(Gateway): invite create timestamp type, zstd-stream (#1569)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:37:05 +02:00
Almeida
32b544e05e chore: run clean:node on pre-commit (#1564) 2026-03-19 09:36:39 +02:00
Almeida
e1ff008cd6 feat(Application): add webhook event fields to PATCH (#1570)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:35:34 +02:00
Almeida
46b8cbd46f feat(Guild): add flags to modify guild member (#1571)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:35:15 +02:00
Almeida
c8ef2fefde feat(Guild): add collectibles to guild member (#1572)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:35:02 +02:00
Almeida
bf12195401 fix(guildScheduledEvent): entity_type required, channel_id nullable (#1573)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:34:45 +02:00
kshitijanurag
a73d1d0ce2 docs: update TSDoc comments for PermissionFlagsBits (#1558) 2026-03-17 01:36:23 +02:00
renovate[bot]
17eade718c chore(deps): update crazy-max/ghaction-github-labeler action to v6 (#1552)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 01:35:55 +02:00
dependabot[bot]
c242454e9f chore(deps): bump immutable from 5.0.3 to 5.1.5 in /website (#1545)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 01:34:45 +02:00
dependabot[bot]
6dc3caa692 chore(deps): bump svgo from 3.3.2 to 3.3.3 in /website (#1546)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 01:34:34 +02:00
kshitijanurag
6b47a0c960 docs(channel): update slowmode bypass permission information (#1562) 2026-03-17 01:34:21 +02:00
renovate[bot]
e9169b8acb chore(deps): lock file maintenance (#1561)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-13 08:52:09 +00:00
renovate[bot]
d7a38425c0 chore(deps): update patch/minor dependencies (#1560)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-13 06:15:34 +00:00
Vlad Frangu
8190a1a475 chore(release): 0.38.42 🎉 (#1557)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-09 23:24:31 +02:00
advaith
818b899f9d feat: mark new modal components as stable (#1556) 2026-03-09 13:19:42 +02:00
renovate[bot]
61788ced57 chore(deps): lock file maintenance (#1555)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 13:51:38 +00:00
renovate[bot]
f6ae280ab5 chore(deps): update dependency @types/node to v24.12.0 (#1554)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 13:50:16 +00:00
renovate[bot]
6708005f0c chore(deps): lock file maintenance (#1553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 09:02:14 +00:00
renovate[bot]
9b00e9d441 chore(deps): update patch/minor dependencies (#1551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 05:10:57 +00:00
Vlad Frangu
cbec753710 chore(release): 0.38.41 🎉 (#1550)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-05 16:07:35 +02:00
Denis-Adrian Cristea
5ea94a6629 feat: application command option allowed channel type (#1548) 2026-03-05 15:53:53 +02:00
renovate[bot]
cef79b442e chore(deps): lock file maintenance (#1542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 18:07:58 +00:00
kshitijanurag
1353b5915c feat(voice): add close code 4017 (#1538) 2026-02-27 14:34:09 +02:00
Vlad Frangu
beb982dd82 ci: PR CI should throw errors on voice v4, not v8 2026-02-27 14:33:59 +02:00
renovate[bot]
da016bd49d chore(deps): lock file maintenance (#1541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 10:16:11 +00:00
renovate[bot]
0ee3cf31bb chore(deps): lock file maintenance (#1540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 09:30:42 +00:00
renovate[bot]
8b22f9511f chore(deps): update patch/minor dependencies (#1539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-27 05:10:28 +00:00
Almeida
32975aecea Revert "chore(deps): bump webpack from 5.96.1 to 5.105.0 in /website (#1515)" (#1535) 2026-02-22 22:01:43 +02:00
renovate[bot]
c93fdc0996 chore(deps): update dependency @actions/core to v3 (#1504)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-21 17:23:24 +02:00
renovate[bot]
164f79e6c4 chore(deps): update actions/cache action to v5 (#1465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-21 17:21:31 +02:00
renovate[bot]
e60a3f8aac chore(deps): update dependency @actions/glob to ^0.6.0 (#1502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-21 17:20:40 +02:00
dependabot[bot]
36e76904ef chore(deps): bump qs and express in /website (#1523)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:19:23 +02:00
dependabot[bot]
177e9d199b chore(deps): bump webpack from 5.96.1 to 5.105.0 in /website (#1515)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:16:05 +02:00
dependabot[bot]
7e0de6eaa1 chore(deps): bump @isaacs/brace-expansion in /website (#1511)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:15:41 +02:00
dependabot[bot]
c2872acc40 chore(deps): bump node-forge from 1.3.1 to 1.3.3 in /website (#1478)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:15:23 +02:00
dependabot[bot]
47b0d075b0 chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /website (#1458)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:15:16 +02:00
dependabot[bot]
c726e8be53 chore(deps): bump zx from 8.2.4 to 8.8.5 in /website (#1446)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-21 17:15:09 +02:00
renovate[bot]
6b6b256d5f chore(deps): lock file maintenance (#1531)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-20 14:12:32 +00:00
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
Vlad Frangu
c96926b6a2 chore(release): 0.38.30 🎉 (#1398)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-13 17:55:13 +03:00
Denis-Adrian Cristea
790b4deb0f refactor: improved channel types (#1397) 2025-10-13 12:26:03 +03:00
Jiralite
51b2d4e1c9 feat: Add support for file upload components (#1372) 2025-10-13 12:15:24 +03:00
renovate[bot]
687f474d4e chore(deps): update patch/minor dependencies (#1396)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 09:39:22 +00:00
renovate[bot]
ff892fa66e chore(deps): update eslint/prettier (#1395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 04:26:21 +00:00
Vlad Frangu
84f312db2a chore(release): 0.38.29 🎉 (#1394)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-06 20:48:35 +03:00
Jiralite
9665e02367 fix: edit self result (#1393) 2025-10-04 19:53:21 +03:00
Vlad Frangu
71a0b8d211 chore(release): 0.38.28 🎉 (#1392)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-04 18:14:18 +03:00
Almeida
00c46946a0 fix: move applied_tags back to thread channels (#1391) 2025-10-04 17:17:32 +03:00
Vlad Frangu
f65b30a3bf chore(release): 0.38.27 🎉 (#1390)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-04 15:51:24 +03:00
Jiralite
6295858de5 fix(RESTPutAPIGuildIncidentActionsJSONBody): add null (#1387) 2025-10-04 15:46:31 +03:00
Jiralite
0c6d4249b6 fix: add RESTPutAPIGuildIncidentActionsResult (#1388) 2025-10-04 15:46:18 +03:00
Jiralite
95b186deb7 fix: @unstable screening (#1389) 2025-10-04 15:45:59 +03:00
Nabil Ahmed
18cf4a514e fix: Narrow thread-related properties for channels (#1377) 2025-10-03 11:48:44 +03:00
renovate[bot]
7a07478721 chore(deps): update commitlint monorepo to v20 (#1381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 11:47:44 +03:00
renovate[bot]
97cc33d528 chore(deps): update dependency ts-morph to v27 (#1376)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 11:47:26 +03:00
dependabot[bot]
f6e0da697b chore(deps): bump webpack-dev-server, @docusaurus/core, @docusaurus/plugin-client-redirects, @docusaurus/plugin-pwa, @docusaurus/preset-classic, @docusaurus/plugin-content-docs and @docusaurus/theme-search-algolia (#1383)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-03 11:32:41 +03:00
renovate[bot]
6f286522b4 chore(deps): update dependency p-queue to v9 (#1386)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 11:31:47 +03:00
renovate[bot]
d74c6f1923 chore(deps): update patch/minor dependencies (#1385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 11:31:25 +03:00
renovate[bot]
7937338193 chore(deps): update eslint/prettier to v8.45.0 (#1384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 04:24:43 +00:00
renovate[bot]
d0ed48c189 chore(deps): update dependency eslint-formatter-pretty to v7 (#1382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 14:43:56 +00:00
renovate[bot]
607dd01f09 chore(deps): update patch/minor dependencies (#1380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 08:57:25 +00:00
renovate[bot]
34485bc840 chore(deps): update eslint/prettier (#1379)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 05:49:49 +00:00
renovate[bot]
eb252bd049 chore(deps): update patch/minor dependencies (#1375)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 08:49:52 +00:00
renovate[bot]
34bd7d0aba chore(deps): update eslint/prettier to v8.44.0 (#1374)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-19 05:02:55 +00:00
Vlad Frangu
de7ac23d41 chore(release): 0.38.26 🎉 (#1373)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-18 15:28:49 +03:00
ducktrshessami
e52ac85e9d fix: add guild_id back to GatewayVoiceStateUpdateDispatchData (#1346) 2025-09-16 12:31:42 +03:00
Vlad Frangu
aca4683388 chore(release): 0.38.25 🎉 (#1371)
Build ran for e316373609

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-15 15:29:49 +03:00
renovate[bot]
e316373609 chore(deps): update patch/minor dependencies (#1370)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-14 02:06:26 +00:00
renovate[bot]
cf57fc92dd chore(deps): update eslint/prettier (#1369)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-12 16:18:15 +00:00
Almeida
14963d61d4 feat: add RateLimited gateway event (#1334) 2025-09-11 00:04:31 +03:00
Vlad Frangu
041583d8da chore(release): 0.38.24 🎉 (#1366)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-10 19:45:43 +03:00
Jiralite
35a4084647 feat(RESTPatchAPICurrentGuildMemberJSONBody): Add banner, avatar, and bio (#1356) 2025-09-10 19:28:36 +03:00
Jiralite
35867c19e6 feat: Update invite types (#1365) 2025-09-09 14:28:09 +03:00
Jiralite
8eb66a1512 feat(RESTPostAPIChannelThreadsResult): narrow response (#1364) 2025-09-08 17:37:48 +03:00
Vlad Frangu
5a07684ef9 chore(release): 0.38.23 🎉 (#1363)
Build ran for 464a9c8cbf

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-05 19:20:29 +03:00
Naiyar
464a9c8cbf fix: add missing text display in modal submission (#1362)
* fix: add missing text display in modal submission

* chore: lint
2025-09-05 19:18:09 +03:00
Almeida
4d3d83d09e refactor: split messages from channels (#1075)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-09-05 12:15:29 +03:00
Jiralite
af3907b106 fix(RESTPatchAPIWebhookWithTokenMessageJSONBody): add flags (#1354) 2025-09-05 10:47:44 +03:00
Jiralite
fa05a7503f feat: More label components and text display in modals (#1351) 2025-09-05 10:47:26 +03:00
renovate[bot]
36567c75e8 chore(deps): update dependency cloudflare to v5 (#1361)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 10:43:20 +03:00
renovate[bot]
51106df44d chore(deps): update actions/setup-node action to v5 (#1360)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 10:42:58 +03:00
renovate[bot]
7df81ce484 chore(deps): update actions/labeler action to v6 (#1359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 10:42:50 +03:00
renovate[bot]
28dfa78080 chore(deps): update patch/minor dependencies (#1358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 10:39:53 +03:00
renovate[bot]
9f7933dd03 chore(deps): update eslint/prettier to v8.42.0 (#1357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-05 05:22:37 +00:00
Jiralite
ae09e2b9e4 feat: add 400001 (#1352) 2025-09-02 19:25:43 +03:00
renovate[bot]
d3dc8c13d7 chore(deps): update patch/minor dependencies (#1348)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 14:01:10 +03:00
renovate[bot]
e665ddc003 chore(deps): update eslint/prettier (#1347)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 13:21:10 +03:00
Vlad Frangu
a4063bd034 chore(release): 0.38.22 🎉 (#1349)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-29 13:20:35 +03:00
Jiralite
3659c59ce7 feat: Support select in modals (#1321) 2025-08-29 13:16:14 +03:00
renovate[bot]
e849c17e84 chore(deps): lock file maintenance (#1345)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-22 18:43:06 +00:00
renovate[bot]
8947930088 chore(deps): update patch/minor dependencies (#1344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-22 14:05:08 +03:00
renovate[bot]
ad46fc3d38 chore(deps): update eslint/prettier to v8.40.0 (#1343)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-22 06:47:28 +00:00
dependabot[bot]
4d1f9d96bc chore(deps): bump brace-expansion in /website (#1342)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 15:32:51 +03:00
Vlad Frangu
72445f8ae2 chore(release): 0.38.21 🎉 (#1341)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-21 15:30:17 +03:00
Danial Raza
1a37ae3eea feat: guest invites (#1290)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-08-20 19:27:49 +03:00
Almeida
b05df17466 feat(PermissionFlagsBits): add PinMessages (#1340) 2025-08-20 19:26:07 +03:00
renovate[bot]
51705cba50 chore(deps): lock file maintenance (#1338)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 13:00:02 +00:00
renovate[bot]
77ffcfecb9 chore(deps): update dependency @types/node to v22.17.2 (#1337)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 12:59:21 +00:00
renovate[bot]
3cb4bb409b chore(deps): lock file maintenance (#1336)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 10:08:48 +00:00
renovate[bot]
8db0929ba1 chore(deps): update dependency p-limit to v7 (#1335)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 10:33:39 +03:00
renovate[bot]
5e096f7e61 chore(deps): update patch/minor dependencies (#1333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 10:33:28 +03:00
renovate[bot]
4a6bfd2a56 chore(deps): update eslint/prettier (#1332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 06:14:49 +00:00
Vlad Frangu
f35fc69267 chore(release): 0.38.20 🎉 (#1331)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-14 15:38:29 +03:00
Jiralite
2a7c1d271f ci: actions/checkout@v5 (#1330) 2025-08-12 20:39:23 +03:00
Vlad Frangu
b7e8a9f527 chore(release): 0.38.19 🎉 (#1329)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-12 14:56:27 +03:00
Jiralite
e428c7590f refactor(APIInvite): expires_at always present (#1328) 2025-08-12 14:41:50 +03:00
lew
5f9c1e1b1c feat(GatewayActivity): add url & status display type fields (#1326) 2025-08-10 19:44:35 +03:00
renovate[bot]
87b52b7890 chore(deps): lock file maintenance (#1325)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-08 17:30:35 +00:00
renovate[bot]
256911b9ad chore(deps): lock file maintenance (#1324)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-08 12:55:08 +00:00
renovate[bot]
26a6dd5c77 chore(deps): update patch/minor dependencies (#1323)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-08 08:30:04 +00:00
renovate[bot]
a45f0161e7 chore(deps): update eslint/prettier to v8.39.0 (#1322)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-08 04:56:58 +00:00
renovate[bot]
53f47105dc chore(deps): lock file maintenance (#1320)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 15:59:51 +03:00
renovate[bot]
36b23c126b chore(deps): update patch/minor dependencies (#1319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 11:49:39 +00:00
renovate[bot]
53ac69e1a7 chore(deps): update dependency eslint to v9.32.0 (#1318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 05:47:39 +00:00
Vlad Frangu
fe08e2d1e2 chore(release): 0.38.18 🎉 (#1317)
Build ran for 4afd0c13fd

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-31 15:37:09 +03:00
Jiralite
4afd0c13fd fix: Deprecate API related to guild ownership (#1316) 2025-07-30 14:39:10 +03:00
Jiralite
03f02a5a9e feat(GuildFeature): add GUILD_TAGS (#1315) 2025-07-30 14:38:21 +03:00
renovate[bot]
b4285c1d7e chore(deps): lock file maintenance (#1314)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 15:41:03 +03:00
Vlad Frangu
295276a581 chore(release): 0.38.17 🎉 (#1311)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-25 11:59:26 +03:00
Vlad Frangu
46bb280690 chore: enable automerge for more things
cuz i am lazy
2025-07-25 11:59:04 +03:00
renovate[bot]
cda030d74e chore(deps): update patch/minor dependencies (#1313)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 11:58:15 +03:00
renovate[bot]
79534f2e9d chore(deps): update eslint/prettier to v8.38.0 (#1312)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 06:24:27 +00:00
Jiralite
e6c12634e9 ci: disallow changes to these directories (#829) 2025-07-24 14:58:31 +03:00
Jiralite
a41e646d3d feat(GuildMemberFlags): add AutoModQuarantinedGuildTag (#1309) 2025-07-24 14:57:06 +03:00
Jiralite
a72e4545a3 feat(auditLog): add AUTO_MODERATION_QUARANTINE_USER (#1310) 2025-07-24 14:56:34 +03:00
Vlad Frangu
0785436e2f chore: find replace? 2025-07-23 00:21:44 +03:00
Vlad Frangu
5cd2511798 docs: generate routes interfaces automatically on build (#1308) 2025-07-23 00:15:59 +03:00
renovate[bot]
b760be279a chore(deps): lock file maintenance (#1305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 15:22:54 +03:00
renovate[bot]
c47e14570d chore(deps): update patch/minor dependencies (#1304)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 13:58:06 +03:00
renovate[bot]
30f95bc938 chore(deps): update eslint/prettier (#1303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 13:57:48 +03:00
dependabot[bot]
fe220db046 chore(deps): bump on-headers and compression in /website (#1302)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-18 13:57:38 +03:00
Vlad Frangu
2f3b892feb chore(release): 0.38.16 🎉 (#1301)
Build ran for 574e5c12bd

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-13 19:41:15 +03:00
Jiralite
574e5c12bd fix(APIApplicationCommandChannelOption): exclude directory channels (#1300) 2025-07-13 19:33:21 +03:00
renovate[bot]
3eb77eb89e chore(deps): lock file maintenance (#1299)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 13:45:21 +03:00
renovate[bot]
cbee43cdcd chore(deps): update patch/minor dependencies (#1298)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 13:37:43 +03:00
renovate[bot]
ecb4c336c0 chore(deps): update eslint/prettier to v8.36.0 (#1297)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 13:37:36 +03:00
renovate[bot]
9b68f04fb7 chore(deps): lock file maintenance (#1296)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 14:01:32 +03:00
renovate[bot]
82f8ec4366 chore(deps): update eslint/prettier (#1294)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-05 22:42:26 +03:00
renovate[bot]
92b6632981 chore(deps): update patch/minor dependencies (#1295)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-05 22:42:16 +03:00
Vlad Frangu
a8faa02857 chore(release): 0.38.15 🎉 (#1293)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-03 15:33:22 +03:00
Danial Raza
1fee6339bf fix(CDNRoutes): correct guildTagBadge route (#1291) 2025-07-02 19:17:33 +03:00
Danial Raza
3245f7de92 feat: user guild tags (#1287) 2025-07-02 12:39:15 +03:00
Vlad Frangu
b238cc5b67 chore(release): 0.38.14 🎉 (#1288)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-01 00:10:38 +03:00
renovate[bot]
e2ce6a3d2d chore(deps): lock file maintenance (#1286)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 13:07:17 +03:00
renovate[bot]
f1d456de8c chore(deps): update eslint/prettier (#1284)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-06-27 13:04:35 +03:00
Jiralite
71c6d2609f feat: support new pinned messages routes (#1254) 2025-06-27 13:01:20 +03:00
Danial Raza
7fbb3e3310 feat: role gradient colors (#1281) 2025-06-27 12:58:57 +03:00
renovate[bot]
ef1f32acd0 chore(deps): update patch/minor dependencies (#1285)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 12:57:05 +03:00
Snazzah
6b05db5a2f feat(voice): add close codes 4021 and 4022 (#1283) 2025-06-27 12:56:39 +03:00
Qjuh
ab926eb038 chore: fix weird issue with api-extractor (#1282) 2025-06-27 01:18:07 +03:00
Vlad Frangu
3e394aa44b chore(release): 0.38.13 🎉 (#1280)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-23 15:32:39 +03:00
renovate[bot]
077623299d chore(deps): lock file maintenance (#1279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 13:59:52 +03:00
renovate[bot]
fa5ab47b5e chore(deps): lock file maintenance (#1278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 13:57:30 +03:00
Almeida
77cb32746f feat(APIUser): add collectibles (#1274) 2025-06-20 13:57:05 +03:00
renovate[bot]
60e2b679f8 chore(deps): update patch/minor dependencies (#1277)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 13:47:28 +03:00
renovate[bot]
818d4ee6e7 chore(deps): update eslint/prettier (#1276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 13:47:08 +03:00
199 changed files with 20875 additions and 15069 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,23 +1,17 @@
# 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
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
- If adding a new feature:
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- If fixing a bug:
- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.
```
@@ -32,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

@@ -1,33 +0,0 @@
name: Deno
on:
pull_request:
types:
- opened
- synchronize
jobs:
check_deno:
name: Ensure Deno types are in sync with the code
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version-file: package.json
- name: Install Dependencies
run: yarn
- name: Run Check Script
run: node ./scripts/actions/report-deno-not-ran.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -12,13 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
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@v4
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@v4
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref || '' }}
- name: Use Node.js
uses: actions/setup-node@v4
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@v4
uses: actions/checkout@v6
with:
repository: discordjs/discord.js
path: djs
@@ -67,7 +67,7 @@ jobs:
with:
swap-size-gb: 10
- uses: pnpm/action-setup@v4.1.0
- uses: pnpm/action-setup@v4.3.0
name: Install pnpm
with:
run_install: false
@@ -85,7 +85,7 @@ jobs:
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}

View File

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

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v5
uses: actions/labeler@v6
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true

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@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
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@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
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@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
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

@@ -0,0 +1,41 @@
name: Validate Pull Request
on:
pull_request:
jobs:
deno:
name: Ensure Deno types are synchronized
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Project
uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: 'yarn'
node-version-file: package.json
- name: Install Dependencies
run: yarn
- name: Run Check Script
run: node ./scripts/actions/report-deno-not-ran.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
validate-supported-versions:
runs-on: ubuntu-latest
name: Disallow unsupported API versions
steps:
- name: Check for unsupported API changes
env:
GH_TOKEN: ${{ github.token }}
run: |
PATTERNS="gateway/v6.ts|gateway/v8.ts|payloads/v6/|payloads/v8/|rest/v6/|rest/v8/|rpc/v8.ts|utils/v8.ts|voice/v4.ts|^v6.ts$|^v8.ts$"
if gh pr view ${{ github.event.pull_request.number }} --repo ${{github.repository}} --json files --jq ".files[].path | select(test(\"$PATTERNS\"))" | grep -q .; then
echo "::error::Unsupported API versions modified. Please make changes to current API versions only."
exit 1
fi

2
.gitignore vendored
View File

@@ -66,3 +66,5 @@ docs/*
# djs repo clone
djs
_generated_

View File

@@ -1 +1 @@
yarn pretty-quick --staged && yarn lint-staged && yarn build:deno && git add deno
yarn pretty-quick --staged && yarn lint-staged && yarn clean:node && yarn build:deno && git add deno

View File

@@ -38,3 +38,5 @@ utils/v8.ts
v8.ts
.yarn/*
djs/*
_generated_

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.9.2.cjs
yarnPath: .yarn/releases/yarn-4.12.0.cjs
plugins:
- path: ./.yarn/plugins/postinstallDev.cjs

View File

@@ -1,3 +1,298 @@
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
### Features
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
### Features
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
## [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)
### Features
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
### Bug Fixes
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
### Bug Fixes
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
### Bug Fixes
* `[@unstable](https://github.com/unstable)` screening ([#1389](https://github.com/discordjs/discord-api-types/issues/1389)) ([95b186d](https://github.com/discordjs/discord-api-types/commit/95b186deb7410ff5a667a1cbac5e7b6dd915f6fe))
* add `RESTPutAPIGuildIncidentActionsResult` ([#1388](https://github.com/discordjs/discord-api-types/issues/1388)) ([0c6d424](https://github.com/discordjs/discord-api-types/commit/0c6d4249b6e39b52607235b273bf0c46caa331dc))
* Narrow thread-related properties for channels ([#1377](https://github.com/discordjs/discord-api-types/issues/1377)) ([18cf4a5](https://github.com/discordjs/discord-api-types/commit/18cf4a514e644d039f18f55d4062318dbeb1c3f6))
* **RESTPutAPIGuildIncidentActionsJSONBody:** add `null` ([#1387](https://github.com/discordjs/discord-api-types/issues/1387)) ([6295858](https://github.com/discordjs/discord-api-types/commit/6295858de5d7bde4b2b289ef301d994ed78bf964))
## [0.38.26](https://github.com/discordjs/discord-api-types/compare/0.38.25...0.38.26) (2025-09-18)
### Bug Fixes
* add guild_id back to GatewayVoiceStateUpdateDispatchData ([#1346](https://github.com/discordjs/discord-api-types/issues/1346)) ([e52ac85](https://github.com/discordjs/discord-api-types/commit/e52ac85e9d60b4032bb21cd958cf032cad50643f))
## [0.38.25](https://github.com/discordjs/discord-api-types/compare/0.38.24...0.38.25) (2025-09-15)
### Features
* add RateLimited gateway event ([#1334](https://github.com/discordjs/discord-api-types/issues/1334)) ([14963d6](https://github.com/discordjs/discord-api-types/commit/14963d61d488af2be8d3655651fd0677ad4c46ed))
## [0.38.24](https://github.com/discordjs/discord-api-types/compare/0.38.23...0.38.24) (2025-09-10)
### Features
* **RESTPatchAPICurrentGuildMemberJSONBody:** Add `banner`, `avatar`, and `bio` ([#1356](https://github.com/discordjs/discord-api-types/issues/1356)) ([35a4084](https://github.com/discordjs/discord-api-types/commit/35a40846473eebfe5245656ee5437347ff2fa88f))
* **RESTPostAPIChannelThreadsResult:** narrow response ([#1364](https://github.com/discordjs/discord-api-types/issues/1364)) ([8eb66a1](https://github.com/discordjs/discord-api-types/commit/8eb66a1512e5b8c57ba7e4a85a18380664ac6219))
* Update invite types ([#1365](https://github.com/discordjs/discord-api-types/issues/1365)) ([35867c1](https://github.com/discordjs/discord-api-types/commit/35867c19e6942e82ac6b2bcd93f61853b0b41666))
## [0.38.23](https://github.com/discordjs/discord-api-types/compare/0.38.22...0.38.23) (2025-09-05)
### Bug Fixes
* add missing text display in modal submission ([#1362](https://github.com/discordjs/discord-api-types/issues/1362)) ([464a9c8](https://github.com/discordjs/discord-api-types/commit/464a9c8cbf613428c3da6b3a9ebd0da4bd827c2b))
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** add `flags` ([#1354](https://github.com/discordjs/discord-api-types/issues/1354)) ([af3907b](https://github.com/discordjs/discord-api-types/commit/af3907b10690c224dcd3106127fd67491262cc6c))
### Features
* add 400001 ([#1352](https://github.com/discordjs/discord-api-types/issues/1352)) ([ae09e2b](https://github.com/discordjs/discord-api-types/commit/ae09e2b9e47460b07907fc3b6e317bc1ae426663))
* More label components and text display in modals ([#1351](https://github.com/discordjs/discord-api-types/issues/1351)) ([fa05a75](https://github.com/discordjs/discord-api-types/commit/fa05a7503f59017efc16ba2ca6cfb3fc99d331a3))
## [0.38.22](https://github.com/discordjs/discord-api-types/compare/0.38.21...0.38.22) (2025-08-29)
### Features
* Support select in modals ([#1321](https://github.com/discordjs/discord-api-types/issues/1321)) ([3659c59](https://github.com/discordjs/discord-api-types/commit/3659c59ce7b3ee8c0281bf28499e733e1bc0752b))
## [0.38.21](https://github.com/discordjs/discord-api-types/compare/0.38.20...0.38.21) (2025-08-21)
### Features
* guest invites ([#1290](https://github.com/discordjs/discord-api-types/issues/1290)) ([1a37ae3](https://github.com/discordjs/discord-api-types/commit/1a37ae3eea156108e1add538b1d42c5fc2ce08ee))
* **PermissionFlagsBits:** add `PinMessages` ([#1340](https://github.com/discordjs/discord-api-types/issues/1340)) ([b05df17](https://github.com/discordjs/discord-api-types/commit/b05df17466ade5bf58578b8a230d9cb5ec9e1024))
## [0.38.20](https://github.com/discordjs/discord-api-types/compare/0.38.19...0.38.20) (2025-08-14)
## [0.38.19](https://github.com/discordjs/discord-api-types/compare/0.38.18...0.38.19) (2025-08-12)
### Features
* **GatewayActivity:** add url & status display type fields ([#1326](https://github.com/discordjs/discord-api-types/issues/1326)) ([5f9c1e1](https://github.com/discordjs/discord-api-types/commit/5f9c1e1b1c9f1a63d80718629fb2775b7bae62b3))
## [0.38.18](https://github.com/discordjs/discord-api-types/compare/0.38.17...0.38.18) (2025-07-31)
### Bug Fixes
* Deprecate API related to guild ownership ([#1316](https://github.com/discordjs/discord-api-types/issues/1316)) ([4afd0c1](https://github.com/discordjs/discord-api-types/commit/4afd0c13fde05fa7117ecdeaf20534545cfdb005))
### Features
* **GuildFeature:** add `GUILD_TAGS` ([#1315](https://github.com/discordjs/discord-api-types/issues/1315)) ([03f02a5](https://github.com/discordjs/discord-api-types/commit/03f02a5a9ee2e533b58b7790c4deb7ad571e5a92))
## [0.38.17](https://github.com/discordjs/discord-api-types/compare/0.38.16...0.38.17) (2025-07-24)
### Features
* **auditLog:** add `AUTO_MODERATION_QUARANTINE_USER` ([#1310](https://github.com/discordjs/discord-api-types/issues/1310)) ([a72e454](https://github.com/discordjs/discord-api-types/commit/a72e4545a3409388a9c5ec0b5555ecc258de0ac2))
* **GuildMemberFlags:** add `AutoModQuarantinedGuildTag` ([#1309](https://github.com/discordjs/discord-api-types/issues/1309)) ([a41e646](https://github.com/discordjs/discord-api-types/commit/a41e646d3d9b9f6bb15c2f6165043ef8042b26bf))
## [0.38.16](https://github.com/discordjs/discord-api-types/compare/0.38.15...0.38.16) (2025-07-13)
### Bug Fixes
* **APIApplicationCommandChannelOption:** exclude directory channels ([#1300](https://github.com/discordjs/discord-api-types/issues/1300)) ([574e5c1](https://github.com/discordjs/discord-api-types/commit/574e5c12bddd2c515fd2b96b5705b5ef9f9d2787))
## [0.38.15](https://github.com/discordjs/discord-api-types/compare/0.38.14...0.38.15) (2025-07-03)
### Bug Fixes
* **CDNRoutes:** correct `guildTagBadge` route ([#1291](https://github.com/discordjs/discord-api-types/issues/1291)) ([1fee633](https://github.com/discordjs/discord-api-types/commit/1fee6339bf05a98900d8703207c77b8e6d047f24))
### Features
* user guild tags ([#1287](https://github.com/discordjs/discord-api-types/issues/1287)) ([3245f7d](https://github.com/discordjs/discord-api-types/commit/3245f7de92c40d3b74014dbf97a2c0eafea8bcd2))
## [0.38.14](https://github.com/discordjs/discord-api-types/compare/0.38.13...0.38.14) (2025-06-30)
### Features
* role gradient colors ([#1281](https://github.com/discordjs/discord-api-types/issues/1281)) ([7fbb3e3](https://github.com/discordjs/discord-api-types/commit/7fbb3e3310bde5ea0e977afb83ea21bda0220633))
* support new pinned messages routes ([#1254](https://github.com/discordjs/discord-api-types/issues/1254)) ([71c6d26](https://github.com/discordjs/discord-api-types/commit/71c6d2609f1713827e95c5f617011c053cd3eb6a))
* **voice:** add close codes 4021 and 4022 ([#1283](https://github.com/discordjs/discord-api-types/issues/1283)) ([6b05db5](https://github.com/discordjs/discord-api-types/commit/6b05db5a2f9ea540e34e8429c07b96411d418b73))
## [0.38.13](https://github.com/discordjs/discord-api-types/compare/0.38.12...0.38.13) (2025-06-23)
### Features
* **APIUser:** add `collectibles` ([#1274](https://github.com/discordjs/discord-api-types/issues/1274)) ([77cb327](https://github.com/discordjs/discord-api-types/commit/77cb32746f47247a4229910db8ec64f844038529))
## [0.38.12](https://github.com/discordjs/discord-api-types/compare/0.38.11...0.38.12) (2025-06-16)

View File

@@ -82,15 +82,12 @@ The exports of each API version is split into three main parts:
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).

295
deno/CHANGELOG.md generated
View File

@@ -1,3 +1,298 @@
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
### Features
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
### Features
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
## [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)
### Features
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
### Bug Fixes
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
### Bug Fixes
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
### Bug Fixes
* `[@unstable](https://github.com/unstable)` screening ([#1389](https://github.com/discordjs/discord-api-types/issues/1389)) ([95b186d](https://github.com/discordjs/discord-api-types/commit/95b186deb7410ff5a667a1cbac5e7b6dd915f6fe))
* add `RESTPutAPIGuildIncidentActionsResult` ([#1388](https://github.com/discordjs/discord-api-types/issues/1388)) ([0c6d424](https://github.com/discordjs/discord-api-types/commit/0c6d4249b6e39b52607235b273bf0c46caa331dc))
* Narrow thread-related properties for channels ([#1377](https://github.com/discordjs/discord-api-types/issues/1377)) ([18cf4a5](https://github.com/discordjs/discord-api-types/commit/18cf4a514e644d039f18f55d4062318dbeb1c3f6))
* **RESTPutAPIGuildIncidentActionsJSONBody:** add `null` ([#1387](https://github.com/discordjs/discord-api-types/issues/1387)) ([6295858](https://github.com/discordjs/discord-api-types/commit/6295858de5d7bde4b2b289ef301d994ed78bf964))
## [0.38.26](https://github.com/discordjs/discord-api-types/compare/0.38.25...0.38.26) (2025-09-18)
### Bug Fixes
* add guild_id back to GatewayVoiceStateUpdateDispatchData ([#1346](https://github.com/discordjs/discord-api-types/issues/1346)) ([e52ac85](https://github.com/discordjs/discord-api-types/commit/e52ac85e9d60b4032bb21cd958cf032cad50643f))
## [0.38.25](https://github.com/discordjs/discord-api-types/compare/0.38.24...0.38.25) (2025-09-15)
### Features
* add RateLimited gateway event ([#1334](https://github.com/discordjs/discord-api-types/issues/1334)) ([14963d6](https://github.com/discordjs/discord-api-types/commit/14963d61d488af2be8d3655651fd0677ad4c46ed))
## [0.38.24](https://github.com/discordjs/discord-api-types/compare/0.38.23...0.38.24) (2025-09-10)
### Features
* **RESTPatchAPICurrentGuildMemberJSONBody:** Add `banner`, `avatar`, and `bio` ([#1356](https://github.com/discordjs/discord-api-types/issues/1356)) ([35a4084](https://github.com/discordjs/discord-api-types/commit/35a40846473eebfe5245656ee5437347ff2fa88f))
* **RESTPostAPIChannelThreadsResult:** narrow response ([#1364](https://github.com/discordjs/discord-api-types/issues/1364)) ([8eb66a1](https://github.com/discordjs/discord-api-types/commit/8eb66a1512e5b8c57ba7e4a85a18380664ac6219))
* Update invite types ([#1365](https://github.com/discordjs/discord-api-types/issues/1365)) ([35867c1](https://github.com/discordjs/discord-api-types/commit/35867c19e6942e82ac6b2bcd93f61853b0b41666))
## [0.38.23](https://github.com/discordjs/discord-api-types/compare/0.38.22...0.38.23) (2025-09-05)
### Bug Fixes
* add missing text display in modal submission ([#1362](https://github.com/discordjs/discord-api-types/issues/1362)) ([464a9c8](https://github.com/discordjs/discord-api-types/commit/464a9c8cbf613428c3da6b3a9ebd0da4bd827c2b))
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** add `flags` ([#1354](https://github.com/discordjs/discord-api-types/issues/1354)) ([af3907b](https://github.com/discordjs/discord-api-types/commit/af3907b10690c224dcd3106127fd67491262cc6c))
### Features
* add 400001 ([#1352](https://github.com/discordjs/discord-api-types/issues/1352)) ([ae09e2b](https://github.com/discordjs/discord-api-types/commit/ae09e2b9e47460b07907fc3b6e317bc1ae426663))
* More label components and text display in modals ([#1351](https://github.com/discordjs/discord-api-types/issues/1351)) ([fa05a75](https://github.com/discordjs/discord-api-types/commit/fa05a7503f59017efc16ba2ca6cfb3fc99d331a3))
## [0.38.22](https://github.com/discordjs/discord-api-types/compare/0.38.21...0.38.22) (2025-08-29)
### Features
* Support select in modals ([#1321](https://github.com/discordjs/discord-api-types/issues/1321)) ([3659c59](https://github.com/discordjs/discord-api-types/commit/3659c59ce7b3ee8c0281bf28499e733e1bc0752b))
## [0.38.21](https://github.com/discordjs/discord-api-types/compare/0.38.20...0.38.21) (2025-08-21)
### Features
* guest invites ([#1290](https://github.com/discordjs/discord-api-types/issues/1290)) ([1a37ae3](https://github.com/discordjs/discord-api-types/commit/1a37ae3eea156108e1add538b1d42c5fc2ce08ee))
* **PermissionFlagsBits:** add `PinMessages` ([#1340](https://github.com/discordjs/discord-api-types/issues/1340)) ([b05df17](https://github.com/discordjs/discord-api-types/commit/b05df17466ade5bf58578b8a230d9cb5ec9e1024))
## [0.38.20](https://github.com/discordjs/discord-api-types/compare/0.38.19...0.38.20) (2025-08-14)
## [0.38.19](https://github.com/discordjs/discord-api-types/compare/0.38.18...0.38.19) (2025-08-12)
### Features
* **GatewayActivity:** add url & status display type fields ([#1326](https://github.com/discordjs/discord-api-types/issues/1326)) ([5f9c1e1](https://github.com/discordjs/discord-api-types/commit/5f9c1e1b1c9f1a63d80718629fb2775b7bae62b3))
## [0.38.18](https://github.com/discordjs/discord-api-types/compare/0.38.17...0.38.18) (2025-07-31)
### Bug Fixes
* Deprecate API related to guild ownership ([#1316](https://github.com/discordjs/discord-api-types/issues/1316)) ([4afd0c1](https://github.com/discordjs/discord-api-types/commit/4afd0c13fde05fa7117ecdeaf20534545cfdb005))
### Features
* **GuildFeature:** add `GUILD_TAGS` ([#1315](https://github.com/discordjs/discord-api-types/issues/1315)) ([03f02a5](https://github.com/discordjs/discord-api-types/commit/03f02a5a9ee2e533b58b7790c4deb7ad571e5a92))
## [0.38.17](https://github.com/discordjs/discord-api-types/compare/0.38.16...0.38.17) (2025-07-24)
### Features
* **auditLog:** add `AUTO_MODERATION_QUARANTINE_USER` ([#1310](https://github.com/discordjs/discord-api-types/issues/1310)) ([a72e454](https://github.com/discordjs/discord-api-types/commit/a72e4545a3409388a9c5ec0b5555ecc258de0ac2))
* **GuildMemberFlags:** add `AutoModQuarantinedGuildTag` ([#1309](https://github.com/discordjs/discord-api-types/issues/1309)) ([a41e646](https://github.com/discordjs/discord-api-types/commit/a41e646d3d9b9f6bb15c2f6165043ef8042b26bf))
## [0.38.16](https://github.com/discordjs/discord-api-types/compare/0.38.15...0.38.16) (2025-07-13)
### Bug Fixes
* **APIApplicationCommandChannelOption:** exclude directory channels ([#1300](https://github.com/discordjs/discord-api-types/issues/1300)) ([574e5c1](https://github.com/discordjs/discord-api-types/commit/574e5c12bddd2c515fd2b96b5705b5ef9f9d2787))
## [0.38.15](https://github.com/discordjs/discord-api-types/compare/0.38.14...0.38.15) (2025-07-03)
### Bug Fixes
* **CDNRoutes:** correct `guildTagBadge` route ([#1291](https://github.com/discordjs/discord-api-types/issues/1291)) ([1fee633](https://github.com/discordjs/discord-api-types/commit/1fee6339bf05a98900d8703207c77b8e6d047f24))
### Features
* user guild tags ([#1287](https://github.com/discordjs/discord-api-types/issues/1287)) ([3245f7d](https://github.com/discordjs/discord-api-types/commit/3245f7de92c40d3b74014dbf97a2c0eafea8bcd2))
## [0.38.14](https://github.com/discordjs/discord-api-types/compare/0.38.13...0.38.14) (2025-06-30)
### Features
* role gradient colors ([#1281](https://github.com/discordjs/discord-api-types/issues/1281)) ([7fbb3e3](https://github.com/discordjs/discord-api-types/commit/7fbb3e3310bde5ea0e977afb83ea21bda0220633))
* support new pinned messages routes ([#1254](https://github.com/discordjs/discord-api-types/issues/1254)) ([71c6d26](https://github.com/discordjs/discord-api-types/commit/71c6d2609f1713827e95c5f617011c053cd3eb6a))
* **voice:** add close codes 4021 and 4022 ([#1283](https://github.com/discordjs/discord-api-types/issues/1283)) ([6b05db5](https://github.com/discordjs/discord-api-types/commit/6b05db5a2f9ea540e34e8429c07b96411d418b73))
## [0.38.13](https://github.com/discordjs/discord-api-types/compare/0.38.12...0.38.13) (2025-06-23)
### Features
* **APIUser:** add `collectibles` ([#1274](https://github.com/discordjs/discord-api-types/issues/1274)) ([77cb327](https://github.com/discordjs/discord-api-types/commit/77cb32746f47247a4229910db8ec64f844038529))
## [0.38.12](https://github.com/discordjs/discord-api-types/compare/0.38.11...0.38.12) (2025-06-16)

3
deno/README.md generated
View File

@@ -82,15 +82,12 @@ The exports of each API version is split into three main parts:
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).

View File

@@ -4,5 +4,5 @@
export interface GatewayURLQuery {
v: string;
encoding: 'etf' | 'json';
compress?: 'zlib-stream';
compress?: 'zlib-stream' | 'zstd-stream';
}

185
deno/gateway/v10.ts generated
View File

@@ -26,7 +26,6 @@ import type {
GatewayPresenceUpdate,
GatewayThreadListSync,
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
APIVoiceState,
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
@@ -47,6 +46,7 @@ import type {
APIGuildMemberUser,
GatewayGuildMembersChunkPresence,
APIBaseMessage,
APIVoiceState,
} from '../payloads/v10/mod.ts';
import type { ReactionType } from '../rest/v10/mod.ts';
import type { _Nullable } from '../utils/internals.ts';
@@ -286,6 +286,7 @@ export enum GatewayDispatchEvents {
MessageReactionRemoveEmoji = 'MESSAGE_REACTION_REMOVE_EMOJI',
MessageUpdate = 'MESSAGE_UPDATE',
PresenceUpdate = 'PRESENCE_UPDATE',
RateLimited = 'RATE_LIMITED',
Ready = 'READY',
Resumed = 'RESUMED',
StageInstanceCreate = 'STAGE_INSTANCE_CREATE',
@@ -330,12 +331,17 @@ export type GatewayDispatchPayload =
| GatewayAutoModerationActionExecutionDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayChannelModifyDispatch
| GatewayAutoModerationRuleUpdateDispatch
| GatewayChannelCreateDispatch
| GatewayChannelDeleteDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayEntitlementModifyDispatch
| GatewayChannelUpdateDispatch
| GatewayEntitlementCreateDispatch
| GatewayEntitlementDeleteDispatch
| GatewayEntitlementUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayGuildBanModifyDispatch
| GatewayGuildBanAddDispatch
| GatewayGuildBanRemoveDispatch
| GatewayGuildCreateDispatch
| GatewayGuildDeleteDispatch
| GatewayGuildEmojisUpdateDispatch
@@ -345,8 +351,9 @@ export type GatewayDispatchPayload =
| GatewayGuildMembersChunkDispatch
| GatewayGuildMemberUpdateDispatch
| GatewayGuildModifyDispatch
| GatewayGuildRoleCreateDispatch
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildRoleUpdateDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
@@ -374,13 +381,16 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayRateLimitedDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewaySoundboardSoundsDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewaySubscriptionModifyDispatch
| GatewaySubscriptionCreateDispatch
| GatewaySubscriptionDeleteDispatch
| GatewaySubscriptionUpdateDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
@@ -527,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
*/
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleCreate,
GatewayAutoModerationRuleCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
@@ -537,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
*/
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
@@ -547,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
*/
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleDelete,
GatewayAutoModerationRuleDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
@@ -672,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
*/
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionCreateDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionCreate,
GatewaySubscriptionCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
@@ -682,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
*/
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionUpdate,
GatewaySubscriptionUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
@@ -692,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
*/
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionDelete,
GatewaySubscriptionDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
@@ -722,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
*/
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelCreateDispatch = _DataPayload<
GatewayDispatchEvents.ChannelCreate,
GatewayChannelCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
@@ -732,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
*/
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelUpdateDispatch = _DataPayload<
GatewayDispatchEvents.ChannelUpdate,
GatewayChannelUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
@@ -742,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
*/
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelDeleteDispatch = _DataPayload<
GatewayDispatchEvents.ChannelDelete,
GatewayChannelDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
@@ -802,7 +839,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementCreateDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementCreate,
GatewayEntitlementCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
@@ -812,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementUpdateDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
@@ -822,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementDeleteDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
@@ -997,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
*/
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
export type GatewayGuildBanAddDispatch = _DataPayload<
GatewayDispatchEvents.GuildBanAdd,
GatewayGuildBanAddDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
@@ -1007,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
*/
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
export type GatewayGuildBanRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildBanRemove,
GatewayGuildBanRemoveDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
@@ -1134,7 +1186,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends _Nullable<APIGuildMemberJoined>,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1223,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
*/
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
export type GatewayGuildRoleCreateDispatch = _DataPayload<
GatewayDispatchEvents.GuildRoleCreate,
GatewayGuildRoleCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
@@ -1233,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
*/
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
GatewayDispatchEvents.GuildRoleUpdate,
GatewayGuildRoleUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
@@ -1517,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
/**
* The time at which the invite was created
*/
created_at: number;
created_at: string;
/**
* The guild of the invite
*/
@@ -1560,6 +1619,10 @@ export interface GatewayInviteCreateDispatchData {
* How many times the invite has been used (always will be `0`)
*/
uses: 0;
/**
* The expiration date of this invite.
*/
expires_at: string | null;
}
/**
@@ -1617,10 +1680,11 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined,
NonNullable<APIGuildMemberJoined>,
APIBaseVoiceGuildMember {}
export interface APIUserWithMember extends APIUser {
@@ -2213,6 +2277,73 @@ export interface GatewayMessagePollVoteDispatchData {
answer_id: number;
}
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedDispatch<
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
> = _DataPayload<GatewayDispatchEvents.RateLimited, GatewayRateLimitedDispatchData<Opcode>>;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedRequestGuildMembersDispatch =
GatewayRateLimitedDispatch<GatewayOpcodes.RequestGuildMembers>;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export interface GatewayRateLimitedDispatchData<
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
> {
/**
* {@link GatewayOpcodes | Gateway opcode} of the event that was rate limited
*/
opcode: Opcode;
/**
* The number of seconds to wait before submitting another request
*/
retry_after: number;
/**
* Metadata for the event that was rate limited
*/
meta: GatewayOpcodeRateLimitMetadataMap[Opcode];
}
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedRequestGuildMembersDispatchData =
GatewayRateLimitedDispatchData<GatewayOpcodes.RequestGuildMembers>;
/**
* Map of gateway opcodes to their rate limit metadata types
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited-rate-limit-metadata-for-opcode-structure}
*/
export interface GatewayOpcodeRateLimitMetadataMap {
[GatewayOpcodes.RequestGuildMembers]: GatewayRequestGuildMemberRateLimitMetadata;
}
/**
* Types of metadata that can be received in a {@link GatewayRateLimitedDispatchData.meta} field
*/
export type GatewayRateLimitedMetadata = GatewayOpcodeRateLimitMetadataMap[keyof GatewayOpcodeRateLimitMetadataMap];
/**
* Rate limit metadata for the {@link GatewayOpcodes.RequestGuildMembers} opcode
*/
export interface GatewayRequestGuildMemberRateLimitMetadata {
/**
* Id of the guild members were requested for
*/
guild_id: Snowflake;
/**
* Nonce used to identify the {@link GatewayGuildMembersChunkDispatch} response
*/
nonce?: string;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads

185
deno/gateway/v9.ts generated
View File

@@ -26,7 +26,6 @@ import type {
GatewayPresenceUpdate,
GatewayThreadListSync,
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
APIVoiceState,
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
@@ -47,6 +46,7 @@ import type {
GatewayGuildMembersChunkPresence,
APIBaseMessage,
APIGuildMemberJoined,
APIVoiceState,
} from '../payloads/v9/mod.ts';
import type { ReactionType } from '../rest/v9/mod.ts';
import type { _Nullable } from '../utils/internals.ts';
@@ -285,6 +285,7 @@ export enum GatewayDispatchEvents {
MessageReactionRemoveEmoji = 'MESSAGE_REACTION_REMOVE_EMOJI',
MessageUpdate = 'MESSAGE_UPDATE',
PresenceUpdate = 'PRESENCE_UPDATE',
RateLimited = 'RATE_LIMITED',
Ready = 'READY',
Resumed = 'RESUMED',
StageInstanceCreate = 'STAGE_INSTANCE_CREATE',
@@ -329,12 +330,17 @@ export type GatewayDispatchPayload =
| GatewayAutoModerationActionExecutionDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayChannelModifyDispatch
| GatewayAutoModerationRuleUpdateDispatch
| GatewayChannelCreateDispatch
| GatewayChannelDeleteDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayEntitlementModifyDispatch
| GatewayChannelUpdateDispatch
| GatewayEntitlementCreateDispatch
| GatewayEntitlementDeleteDispatch
| GatewayEntitlementUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayGuildBanModifyDispatch
| GatewayGuildBanAddDispatch
| GatewayGuildBanRemoveDispatch
| GatewayGuildCreateDispatch
| GatewayGuildDeleteDispatch
| GatewayGuildEmojisUpdateDispatch
@@ -344,8 +350,9 @@ export type GatewayDispatchPayload =
| GatewayGuildMembersChunkDispatch
| GatewayGuildMemberUpdateDispatch
| GatewayGuildModifyDispatch
| GatewayGuildRoleCreateDispatch
| GatewayGuildRoleDeleteDispatch
| GatewayGuildRoleModifyDispatch
| GatewayGuildRoleUpdateDispatch
| GatewayGuildScheduledEventCreateDispatch
| GatewayGuildScheduledEventDeleteDispatch
| GatewayGuildScheduledEventUpdateDispatch
@@ -373,13 +380,16 @@ export type GatewayDispatchPayload =
| GatewayMessageReactionRemoveEmojiDispatch
| GatewayMessageUpdateDispatch
| GatewayPresenceUpdateDispatch
| GatewayRateLimitedDispatch
| GatewayReadyDispatch
| GatewayResumedDispatch
| GatewaySoundboardSoundsDispatch
| GatewayStageInstanceCreateDispatch
| GatewayStageInstanceDeleteDispatch
| GatewayStageInstanceUpdateDispatch
| GatewaySubscriptionModifyDispatch
| GatewaySubscriptionCreateDispatch
| GatewaySubscriptionDeleteDispatch
| GatewaySubscriptionUpdateDispatch
| GatewayThreadCreateDispatch
| GatewayThreadDeleteDispatch
| GatewayThreadListSyncDispatch
@@ -526,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
*/
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleCreate,
GatewayAutoModerationRuleCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
@@ -536,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
*/
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleUpdate,
GatewayAutoModerationRuleUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
@@ -546,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
*/
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
GatewayDispatchEvents.AutoModerationRuleDelete,
GatewayAutoModerationRuleDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
@@ -671,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
*/
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionCreateDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionCreate,
GatewaySubscriptionCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
@@ -681,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
*/
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionUpdate,
GatewaySubscriptionUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
@@ -691,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
*/
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
GatewayDispatchEvents.SubscriptionDelete,
GatewaySubscriptionDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
@@ -721,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
*/
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelCreateDispatch = _DataPayload<
GatewayDispatchEvents.ChannelCreate,
GatewayChannelCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
@@ -731,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
*/
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelUpdateDispatch = _DataPayload<
GatewayDispatchEvents.ChannelUpdate,
GatewayChannelUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
@@ -741,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
*/
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayChannelDeleteDispatch = _DataPayload<
GatewayDispatchEvents.ChannelDelete,
GatewayChannelDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
@@ -801,7 +838,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementCreateDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementCreate,
GatewayEntitlementCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
@@ -811,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementUpdateDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementUpdate,
GatewayEntitlementUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
@@ -821,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
export type GatewayEntitlementDeleteDispatch = _DataPayload<
GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementDeleteDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
@@ -996,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
*/
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
export type GatewayGuildBanAddDispatch = _DataPayload<
GatewayDispatchEvents.GuildBanAdd,
GatewayGuildBanAddDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
@@ -1006,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
*/
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
export type GatewayGuildBanRemoveDispatch = _DataPayload<
GatewayDispatchEvents.GuildBanRemove,
GatewayGuildBanRemoveDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
@@ -1133,7 +1185,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
*/
export interface GatewayGuildMemberUpdateDispatchData
extends _Nullable<APIGuildMemberJoined>,
extends
APIGuildMemberJoined,
APIBaseGuildMember,
Partial<APIBaseVoiceGuildMember>,
Partial<APIFlaggedGuildMember>,
@@ -1222,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
*/
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
export type GatewayGuildRoleCreateDispatch = _DataPayload<
GatewayDispatchEvents.GuildRoleCreate,
GatewayGuildRoleCreateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
@@ -1232,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
*/
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
GatewayDispatchEvents.GuildRoleUpdate,
GatewayGuildRoleUpdateDispatchData
>;
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
@@ -1516,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
/**
* The time at which the invite was created
*/
created_at: number;
created_at: string;
/**
* The guild of the invite
*/
@@ -1559,6 +1618,10 @@ export interface GatewayInviteCreateDispatchData {
* How many times the invite has been used (always will be `0`)
*/
uses: 0;
/**
* The expiration date of this invite.
*/
expires_at: string | null;
}
/**
@@ -1616,10 +1679,11 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
export interface APIGuildMemberNoUser
extends APIBaseGuildMember,
extends
APIBaseGuildMember,
APIFlaggedGuildMember,
APIGuildMemberAvatar,
APIGuildMemberJoined,
NonNullable<APIGuildMemberJoined>,
APIBaseVoiceGuildMember {}
export interface APIUserWithMember extends APIUser {
@@ -2212,6 +2276,73 @@ export interface GatewayMessagePollVoteDispatchData {
answer_id: number;
}
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedDispatch<
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
> = _DataPayload<GatewayDispatchEvents.RateLimited, GatewayRateLimitedDispatchData<Opcode>>;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedRequestGuildMembersDispatch =
GatewayRateLimitedDispatch<GatewayOpcodes.RequestGuildMembers>;
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export interface GatewayRateLimitedDispatchData<
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
> {
/**
* {@link GatewayOpcodes | Gateway opcode} of the event that was rate limited
*/
opcode: Opcode;
/**
* The number of seconds to wait before submitting another request
*/
retry_after: number;
/**
* Metadata for the event that was rate limited
*/
meta: GatewayOpcodeRateLimitMetadataMap[Opcode];
}
/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedRequestGuildMembersDispatchData =
GatewayRateLimitedDispatchData<GatewayOpcodes.RequestGuildMembers>;
/**
* Map of gateway opcodes to their rate limit metadata types
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited-rate-limit-metadata-for-opcode-structure}
*/
export interface GatewayOpcodeRateLimitMetadataMap {
[GatewayOpcodes.RequestGuildMembers]: GatewayRequestGuildMemberRateLimitMetadata;
}
/**
* Types of metadata that can be received in a {@link GatewayRateLimitedDispatchData.meta} field
*/
export type GatewayRateLimitedMetadata = GatewayOpcodeRateLimitMetadataMap[keyof GatewayOpcodeRateLimitMetadataMap];
/**
* Rate limit metadata for the {@link GatewayOpcodes.RequestGuildMembers} opcode
*/
export interface GatewayRequestGuildMemberRateLimitMetadata {
/**
* Id of the guild members were requested for
*/
guild_id: Snowflake;
/**
* Nonce used to identify the {@link GatewayGuildMembersChunkDispatch} response
*/
nonce?: string;
}
// #endregion Dispatch Payloads
// #region Sendable Payloads

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

@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
/**
* Allows kicking members
*/
KickMembers: 1n << 1n,
/**
* Allows banning members
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
*/
ManageGuild: 1n << 5n,
/**
* Allows for the addition of reactions to messages
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
*
* Applies to channel types: Text, Voice, Stage
*/
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
*/
SendMessagesInThreads: 1n << 38n,
/**
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
*
* Applies to channel types: Voice
* Applies to channel types: Text, Voice
*/
UseEmbeddedActivities: 1n << 39n,
/**
@@ -288,6 +287,18 @@ export const PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage
*/
UseExternalApps: 1n << 50n,
/**
* Allows pinning and unpinning messages
*
* 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

@@ -1,11 +1,10 @@
import type { Snowflake } from '../../../../../globals.ts';
import type { ChannelType } from '../../../channel.ts';
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel.ts';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
export interface APIApplicationCommandChannelOption
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: ApplicationCommandOptionAllowedChannelType[];
}
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<

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

@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals.ts';
import type { APIMessage } from '../../channel.ts';
import type { APIMessage } from '../../message.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
@@ -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

@@ -1,14 +1,6 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v10.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel.ts';
import type {
APIBaseGuildMember,
APIFlaggedGuildMember,
@@ -17,6 +9,7 @@ import type {
APIGuildMemberJoined,
APIPartialInteractionGuild,
} from '../guild.ts';
import type { APIAttachment, APIMessage } from '../message.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
@@ -55,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
*/
@@ -71,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
*/
@@ -261,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;
}
@@ -276,6 +264,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../globals.ts';
import type { ComponentType } from '../channel.ts';
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
import type { ComponentType } from '../message.ts';
import type {
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
@@ -52,35 +52,34 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
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

@@ -1,26 +1,94 @@
import type { APIBaseComponent } from '../channel.ts';
import type {
APIBaseInteraction,
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
APIInteractionDataResolved,
ComponentType,
InteractionType,
} from '../mod.ts';
import type { APIBaseComponent } from '../message.ts';
export interface ModalSubmitComponent {
type: ComponentType;
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
custom_id: string;
}
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
value: string;
}
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
components: ModalSubmitComponent[];
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
values: string[];
}
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
values: string[];
}
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
values: string[];
}
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
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
| APIModalSubmitUserSelectComponent;
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
components: APIModalSubmitTextInputComponent[];
}
export interface ModalSubmitTextDisplayComponent extends APIBaseComponent<ComponentType.TextDisplay> {}
export interface ModalSubmitLabelComponent extends APIBaseComponent<ComponentType.Label> {
component: ModalSubmitComponent;
}
export type APIModalSubmissionComponent =
| ModalSubmitActionRowComponent
| ModalSubmitLabelComponent
| ModalSubmitTextDisplayComponent;
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
*/
export interface APIModalSubmission {
/**
* Data for users, members, channels, and roles in the modal's auto-populated select menus
*
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
resolved?: APIInteractionDataResolved;
/**
* A developer-defined identifier for the component, max 100 characters
*/
@@ -28,7 +96,7 @@ export interface APIModalSubmission {
/**
* A list of child components
*/
components: ModalSubmitActionRowComponent[];
components: APIModalSubmissionComponent[];
}
/**

View File

@@ -1,5 +1,10 @@
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type {
APIActionRowComponent,
APIComponentInModalActionRow,
APILabelComponent,
APITextDisplayComponent,
} from '../message.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
@@ -126,6 +131,11 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
choices?: APIApplicationCommandOptionChoice[];
}
export type APIModalInteractionResponseCallbackComponent =
| APIActionRowComponent<APIComponentInModalActionRow>
| APILabelComponent
| APITextDisplayComponent;
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
*/
@@ -140,6 +150,8 @@ export interface APIModalInteractionResponseCallbackData {
title: string;
/**
* Between 1 and 5 (inclusive) components that make up the modal
*
* @remarks Using action rows inside modals is deprecated.
*/
components: APIActionRowComponent<APIComponentInModalActionRow>[];
components: APIModalInteractionResponseCallbackComponent[];
}

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,
@@ -207,6 +213,7 @@ export enum AuditLogEvent {
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
AutoModerationQuarantineUser,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
@@ -232,6 +239,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_name?: string;
/**
@@ -241,6 +249,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
/**
@@ -272,6 +281,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
channel_id?: Snowflake;
@@ -418,7 +428,9 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRTCRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySafetyAlertsChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
@@ -435,6 +447,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVideoQualityMode
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
@@ -484,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
*/
@@ -524,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
*/

File diff suppressed because it is too large Load Diff

View File

@@ -182,14 +182,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -280,6 +294,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -316,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' | 'small_image' | 'small_text', 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

@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
export interface APIBaseGuild {
/**
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
*/
region: string;
region?: string | null;
/**
* ID of afk channel
*/
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
*
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
stickers: APISticker[];
stickers?: APISticker[];
/**
* Whether the guild has the boost progress bar enabled.
*/
@@ -565,6 +565,24 @@ export enum GuildFeature {
* Guild has enabled the welcome screen
*/
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
/**
* Guild has access to set guild tags
*/
GuildTags = 'GUILD_TAGS',
/**
* Guild is able to set gradient colors to roles
*/
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
/**
* 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',
}
/**
@@ -620,7 +638,7 @@ export interface APIGuildPreview {
/**
* The description for the guild
*/
description: string;
description: string | null;
/**
* Custom guild stickers
*/
@@ -677,6 +695,12 @@ export interface APIBaseGuildMember {
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
/**
* The data for the member's collectibles
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
collectibles?: APICollectibles | null;
}
/**
@@ -698,7 +722,7 @@ export interface APIGuildMemberJoined {
/**
* When the user joined the guild
*/
joined_at: string;
joined_at: string | null;
}
/**
@@ -747,7 +771,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,
@@ -799,6 +824,10 @@ export enum GuildMemberFlags {
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
/**
* Member's guild tag is blocked by AutoMod
*/
AutoModQuarantinedGuildTag = 1 << 10,
}
/**
@@ -1058,6 +1087,9 @@ export interface APIGuildWelcomeScreenChannel {
emoji_name: string | null;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreening {
/**
* When the fields were last updated
@@ -1073,8 +1105,9 @@ export interface APIGuildMembershipScreening {
description: string | null;
}
// TODO: make this a union based on the type in the future, when new types are added
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreeningField {
/**
* The type of field
@@ -1094,6 +1127,9 @@ export interface APIGuildMembershipScreeningField {
required: boolean;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export enum MembershipScreeningFieldType {
/**
* Server Rules
@@ -1214,6 +1250,9 @@ export enum GuildOnboardingPromptType {
Dropdown,
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
*/
export interface APIIncidentsData {
/**
* When invites get enabled again

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

@@ -6,7 +6,6 @@ import type { APIApplication } from './application.ts';
import type { APIInviteChannel } from './channel.ts';
import type { APIGuild } from './guild.ts';
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
import type { APIInviteStageInstance } from './stageInstance.ts';
import type { APIUser } from './user.ts';
export type APIInviteGuild = Pick<
@@ -77,16 +76,16 @@ export interface APIInvite {
*/
approximate_member_count?: number;
/**
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
* The expiration date of this invite
*/
expires_at?: string | null;
expires_at: string | null;
/**
* The stage instance data if there is a public stage instance in the stage channel this invite is for
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
* @deprecated This has been removed from the documentation.
* {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779}
*/
stage_instance?: APIInviteStageInstance;
stage_instance?: never;
/**
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
*/
@@ -95,6 +94,17 @@ export interface APIInvite {
* The invite type
*/
type: InviteType;
/**
* The flags of the invite
*/
flags?: InviteFlags;
}
/**
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags}
*/
export enum InviteFlags {
IsGuestInvite = 1 << 0,
}
/**

1999
deno/payloads/v10/message.ts generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,7 @@ export * from './guild.ts';
export * from './guildScheduledEvent.ts';
export * from './interactions.ts';
export * from './invite.ts';
export * from './message.ts';
export * from './monetization.ts';
export * from './oauth2.ts';
export * from './permissions.ts';

View File

@@ -18,8 +18,15 @@ export interface APIRole {
name: string;
/**
* Integer representation of hexadecimal color code
*
* @deprecated Use `colors` instead.
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color: number;
/**
* The role's colors
*/
colors: APIRoleColors;
/**
* If this role is pinned in the user listing
*/
@@ -99,3 +106,23 @@ export enum RoleFlags {
*/
InPrompt = 1 << 0,
}
/**
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
*/
export interface APIRoleColors {
/**
* The primary color for the role
*/
primary_color: number;
/**
* The secondary color for the role, this will make the role a gradient between the other provided colors
*/
secondary_color: number | null;
/**
* The tertiary color for the role, this will turn the gradient into a holographic style
*
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
*/
tertiary_color: number | null;
}

View File

@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
/**
* The time when the poll ends (IS08601 timestamp)
*/
expiry: string;
expiry: string | null;
/**
* The results of the poll
*/

View File

@@ -96,6 +96,18 @@ export interface APIUser {
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
/**
* The data for the user's collectibles
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
collectibles?: APICollectibles | null;
/**
* The user's primary guild
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
*/
primary_guild?: APIUserPrimaryGuild | null;
}
/**
@@ -348,3 +360,81 @@ export interface APIAvatarDecorationData {
*/
sku_id: Snowflake;
}
/**
* The collectibles the user has, excluding Avatar Decorations and Profile Effects.
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
export interface APICollectibles {
/**
* Object mapping of {@link APINameplateData}
*/
nameplate?: APINameplateData;
}
/**
* @see {@link https://discord.com/developers/docs/resources/user#nameplate}
*/
export interface APINameplateData {
/**
* ID of the nameplate SKU
*/
sku_id: Snowflake;
/**
* Path to the nameplate asset
*
* @example `nameplates/nameplates/twilight/`
*/
asset: string;
/**
* The label of this nameplate. Currently unused
*/
label: string;
/**
* Background color of the nameplate
*/
palette: NameplatePalette;
}
/**
* Background color of a nameplate.
*/
export enum NameplatePalette {
Berry = 'berry',
BubbleGum = 'bubble_gum',
Clover = 'clover',
Cobalt = 'cobalt',
Crimson = 'crimson',
Forest = 'forest',
Lemon = 'lemon',
Sky = 'sky',
Teal = 'teal',
Violet = 'violet',
White = 'white',
}
/**
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
*/
export interface APIUserPrimaryGuild {
/**
* The id of the user's primary guild
*/
identity_guild_id: Snowflake | null;
/**
* Whether the user is displaying the primary guild's server tag.
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
*/
identity_enabled: boolean | null;
/**
* The text of the user's server tag. Limited to 4 characters
*/
tag: string | null;
/**
* The server tag badge hash
*
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
badge: string | null;
}

View File

@@ -26,6 +26,7 @@ export interface APIBaseVoiceState {
/**
* The guild member this voice state is for
*
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
member?: APIGuildMember;

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,10 @@ export interface APIWebhookEventApplicationDeauthorizedData {
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
@@ -187,6 +193,14 @@ export enum ApplicationWebhookEventType {
* Entitlement was created
*/
EntitlementCreate = 'ENTITLEMENT_CREATE',
/**
* Entitlement was updated
*/
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
/**
* Entitlement was deleted
*/
EntitlementDelete = 'ENTITLEMENT_DELETE',
/**
* User was added to a Quest (currently unavailable)
*/

View File

@@ -3,9 +3,8 @@ 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> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<

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

@@ -1,5 +1,5 @@
import type { Snowflake } from '../../../../globals.ts';
import type { APIMessage } from '../../channel.ts';
import type { APIMessage } from '../../message.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base.ts';
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
@@ -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

@@ -1,14 +1,6 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v9.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel.ts';
import type {
APIBaseGuildMember,
APIFlaggedGuildMember,
@@ -17,6 +9,7 @@ import type {
APIGuildMemberJoined,
APIPartialInteractionGuild,
} from '../guild.ts';
import type { APIAttachment, APIMessage } from '../message.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
@@ -58,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
*/
@@ -74,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
*/
@@ -264,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;
}
@@ -279,6 +267,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../globals.ts';
import type { ComponentType } from '../channel.ts';
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
import type { ComponentType } from '../message.ts';
import type {
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
@@ -52,35 +52,34 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
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

@@ -1,26 +1,94 @@
import type { APIBaseComponent } from '../channel.ts';
import type {
APIBaseInteraction,
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
APIInteractionDataResolved,
ComponentType,
InteractionType,
} from '../mod.ts';
import type { APIBaseComponent } from '../message.ts';
export interface ModalSubmitComponent {
type: ComponentType;
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
custom_id: string;
}
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
value: string;
}
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
components: ModalSubmitComponent[];
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
values: string[];
}
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
values: string[];
}
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
values: string[];
}
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
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
| APIModalSubmitUserSelectComponent;
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
components: APIModalSubmitTextInputComponent[];
}
export interface ModalSubmitTextDisplayComponent extends APIBaseComponent<ComponentType.TextDisplay> {}
export interface ModalSubmitLabelComponent extends APIBaseComponent<ComponentType.Label> {
component: ModalSubmitComponent;
}
export type APIModalSubmissionComponent =
| ModalSubmitActionRowComponent
| ModalSubmitLabelComponent
| ModalSubmitTextDisplayComponent;
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
*/
export interface APIModalSubmission {
/**
* Data for users, members, channels, and roles in the modal's auto-populated select menus
*
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
resolved?: APIInteractionDataResolved;
/**
* A developer-defined identifier for the component, max 100 characters
*/
@@ -28,7 +96,7 @@ export interface APIModalSubmission {
/**
* A list of child components
*/
components: ModalSubmitActionRowComponent[];
components: APIModalSubmissionComponent[];
}
/**

View File

@@ -1,5 +1,10 @@
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type {
APIActionRowComponent,
APIComponentInModalActionRow,
APILabelComponent,
APITextDisplayComponent,
} from '../message.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
@@ -126,6 +131,11 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
choices?: APIApplicationCommandOptionChoice[];
}
export type APIModalInteractionResponseCallbackComponent =
| APIActionRowComponent<APIComponentInModalActionRow>
| APILabelComponent
| APITextDisplayComponent;
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
*/
@@ -140,6 +150,8 @@ export interface APIModalInteractionResponseCallbackData {
title: string;
/**
* Between 1 and 5 (inclusive) components that make up the modal
*
* @remarks Using action rows inside modals is deprecated.
*/
components: APIActionRowComponent<APIComponentInModalActionRow>[];
components: APIModalInteractionResponseCallbackComponent[];
}

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,
@@ -207,6 +213,7 @@ export enum AuditLogEvent {
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
AutoModerationQuarantineUser,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted,
@@ -232,6 +239,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_name?: string;
/**
@@ -241,6 +249,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
/**
@@ -272,6 +281,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
channel_id?: Snowflake;
@@ -418,7 +428,9 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRateLimitPerUser
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRTCRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySafetyAlertsChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
@@ -435,6 +447,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVideoQualityMode
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;
@@ -484,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
*/
@@ -524,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
*/

File diff suppressed because it is too large Load Diff

View File

@@ -173,14 +173,28 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
@@ -268,6 +282,26 @@ export enum ActivityType {
Competing,
}
/**
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name,
/**
* Playing \{state\}
*/
State,
/**
* Playing \{details\}
*/
Details,
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
@@ -304,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' | 'small_image' | 'small_text', 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

@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
import type { OAuth2Scopes } from './oauth2.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker } from './sticker.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
export interface APIBaseGuild {
/**
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
*/
region: string;
region?: string | null;
/**
* ID of afk channel
*/
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
*
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
stickers: APISticker[];
stickers?: APISticker[];
/**
* Whether the guild has the boost progress bar enabled.
*/
@@ -557,6 +557,24 @@ export enum GuildFeature {
* Guild has enabled the welcome screen
*/
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
/**
* Guild has access to set guild tags
*/
GuildTags = 'GUILD_TAGS',
/**
* Guild is able to set gradient colors to roles
*/
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
/**
* 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',
}
/**
@@ -612,7 +630,7 @@ export interface APIGuildPreview {
/**
* The description for the guild
*/
description: string;
description: string | null;
/**
* Custom guild stickers
*/
@@ -669,6 +687,12 @@ export interface APIBaseGuildMember {
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
/**
* The data for the member's collectibles
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
collectibles?: APICollectibles | null;
}
/**
@@ -690,7 +714,7 @@ export interface APIGuildMemberJoined {
/**
* When the user joined the guild
*/
joined_at: string;
joined_at: string | null;
}
/**
@@ -739,7 +763,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,
@@ -791,6 +816,10 @@ export enum GuildMemberFlags {
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 1 << 9,
/**
* Member's guild tag is blocked by AutoMod
*/
AutoModQuarantinedGuildTag = 1 << 10,
}
/**
@@ -1050,6 +1079,9 @@ export interface APIGuildWelcomeScreenChannel {
emoji_name: string | null;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreening {
/**
* When the fields were last updated
@@ -1065,8 +1097,9 @@ export interface APIGuildMembershipScreening {
description: string | null;
}
// TODO: make this a union based on the type in the future, when new types are added
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreeningField {
/**
* The type of field
@@ -1086,6 +1119,9 @@ export interface APIGuildMembershipScreeningField {
required: boolean;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export enum MembershipScreeningFieldType {
/**
* Server Rules
@@ -1206,6 +1242,9 @@ export enum GuildOnboardingPromptType {
Dropdown,
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
*/
export interface APIIncidentsData {
/**
* When invites get enabled again

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

@@ -6,7 +6,6 @@ import type { APIApplication } from './application.ts';
import type { APIInviteChannel } from './channel.ts';
import type { APIGuild } from './guild.ts';
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
import type { APIInviteStageInstance } from './stageInstance.ts';
import type { APIUser } from './user.ts';
export type APIInviteGuild = Pick<
@@ -77,16 +76,16 @@ export interface APIInvite {
*/
approximate_member_count?: number;
/**
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
* The expiration date of this invite
*/
expires_at?: string | null;
expires_at: string | null;
/**
* The stage instance data if there is a public stage instance in the stage channel this invite is for
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
* @deprecated This has been removed from the documentation.
* {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779}
*/
stage_instance?: APIInviteStageInstance;
stage_instance?: never;
/**
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
*/
@@ -95,6 +94,17 @@ export interface APIInvite {
* The invite type
*/
type: InviteType;
/**
* The flags of the invite
*/
flags?: InviteFlags;
}
/**
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags}
*/
export enum InviteFlags {
IsGuestInvite = 1 << 0,
}
/**

1995
deno/payloads/v9/message.ts generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -9,6 +9,7 @@ export * from './guild.ts';
export * from './guildScheduledEvent.ts';
export * from './interactions.ts';
export * from './invite.ts';
export * from './message.ts';
export * from './monetization.ts';
export * from './oauth2.ts';
export * from './permissions.ts';

View File

@@ -18,8 +18,15 @@ export interface APIRole {
name: string;
/**
* Integer representation of hexadecimal color code
*
* @deprecated Use `colors` instead.
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color: number;
/**
* The role's colors
*/
colors: APIRoleColors;
/**
* If this role is pinned in the user listing
*/
@@ -99,3 +106,23 @@ export enum RoleFlags {
*/
InPrompt = 1 << 0,
}
/**
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
*/
export interface APIRoleColors {
/**
* The primary color for the role
*/
primary_color: number;
/**
* The secondary color for the role, this will make the role a gradient between the other provided colors
*/
secondary_color: number | null;
/**
* The tertiary color for the role, this will turn the gradient into a holographic style
*
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
*/
tertiary_color: number | null;
}

View File

@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
/**
* The time when the poll ends (IS08601 timestamp)
*/
expiry: string;
expiry: string | null;
/**
* The results of the poll
*/

View File

@@ -96,6 +96,18 @@ export interface APIUser {
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
/**
* The data for the user's collectibles
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
collectibles?: APICollectibles | null;
/**
* The user's primary guild
*
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
*/
primary_guild?: APIUserPrimaryGuild | null;
}
/**
@@ -348,3 +360,81 @@ export interface APIAvatarDecorationData {
*/
sku_id: Snowflake;
}
/**
* The collectibles the user has, excluding Avatar Decorations and Profile Effects.
*
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
*/
export interface APICollectibles {
/**
* Object mapping of {@link APINameplateData}
*/
nameplate?: APINameplateData;
}
/**
* @see {@link https://discord.com/developers/docs/resources/user#nameplate}
*/
export interface APINameplateData {
/**
* ID of the nameplate SKU
*/
sku_id: Snowflake;
/**
* Path to the nameplate asset
*
* @example `nameplates/nameplates/twilight/`
*/
asset: string;
/**
* The label of this nameplate. Currently unused
*/
label: string;
/**
* Background color of the nameplate
*/
palette: NameplatePalette;
}
/**
* Background color of a nameplate.
*/
export enum NameplatePalette {
Berry = 'berry',
BubbleGum = 'bubble_gum',
Clover = 'clover',
Cobalt = 'cobalt',
Crimson = 'crimson',
Forest = 'forest',
Lemon = 'lemon',
Sky = 'sky',
Teal = 'teal',
Violet = 'violet',
White = 'white',
}
/**
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
*/
export interface APIUserPrimaryGuild {
/**
* The id of the user's primary guild
*/
identity_guild_id: Snowflake | null;
/**
* Whether the user is displaying the primary guild's server tag.
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
*/
identity_enabled: boolean | null;
/**
* The text of the user's server tag. Limited to 4 characters
*/
tag: string | null;
/**
* The server tag badge hash
*
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
badge: string | null;
}

View File

@@ -23,6 +23,7 @@ export interface APIBaseVoiceState {
/**
* The guild member this voice state is for
*
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
member?: APIGuildMember;

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,10 @@ export interface APIWebhookEventApplicationDeauthorizedData {
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
@@ -187,6 +193,14 @@ export enum ApplicationWebhookEventType {
* Entitlement was created
*/
EntitlementCreate = 'ENTITLEMENT_CREATE',
/**
* Entitlement was updated
*/
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
/**
* Entitlement was deleted
*/
EntitlementDelete = 'ENTITLEMENT_DELETE',
/**
* User was added to a Quest (currently unavailable)
*/

2
deno/rest/common.ts generated
View File

@@ -313,6 +313,8 @@ export enum RESTJSONErrorCodes {
CannotEnableOnboardingRequirementsAreNotMet = 350_000,
CannotUpdateOnboardingWhileBelowRequirements,
AccessToFileUploadsHasBeenLimitedForThisGuild = 400_001,
FailedToBanUsers = 500_000,
PollVotingBlocked = 520_000,

View File

@@ -25,11 +25,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
*/
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'event_webhooks_status'
| 'event_webhooks_types'
| 'flags'
| 'install_params'
| 'integration_types_config'

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -24,6 +25,10 @@ import type {
ChannelFlags,
APIAttachment,
APIMessageTopLevelComponent,
APIMessagePin,
APIAnnouncementThreadChannel,
APIPrivateThreadChannel,
APIPublicThreadChannel,
} from '../../payloads/v10/mod.ts';
import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
@@ -80,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
nsfw?: boolean | null | undefined;
/**
* Amount of seconds a user has to wait before sending another message (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
@@ -145,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
*
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
/**
* Channel flags combined as a bit field.
*/
@@ -167,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
*
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
@@ -334,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**
@@ -617,17 +625,60 @@ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
export type RESTPostAPIChannelTypingResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
*/
export interface RESTGetAPIChannelMessagesPinsQuery {
/**
* Get messages pinned before this timestamp
*/
before?: string;
/**
* Maximum number of pins to return (1-50).
*
* @defaultValue `50`
*/
limit?: number;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
*/
export interface RESTGetAPIChannelMessagesPinsResult {
/**
* Array of pinned messages
*/
items: APIMessagePin[];
/**
* Whether there are more items available
*/
has_more: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#pin-message}
*/
export type RESTPutAPIChannelMessagesPinResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/message#unpin-message}
*/
export type RESTDeleteAPIChannelMessagesPinResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/message#get-pinned-messages-deprecated}
* @deprecated
*/
export type RESTGetAPIChannelPinsResult = APIMessage[];
/**
* @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
* @see {@link https://discord.com/developers/docs/resources/message#pin-message-deprecated}
* @deprecated
*/
export type RESTPutAPIChannelPinResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
* @see {@link https://discord.com/developers/docs/resources/message#unpin-message-deprecated}
* @deprecated
*/
export type RESTDeleteAPIChannelPinResult = never;
@@ -723,7 +774,10 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult = APIChannel;
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}

View File

@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals.ts';
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10.ts';
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10/mod.ts';
/**
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}

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

@@ -20,12 +20,16 @@ import type {
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildFeature,
GuildMemberFlags,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
GuildWidgetStyle,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
APIRoleColors,
APIIncidentsData,
APIGuildChannel,
} from '../../payloads/v10/mod.ts';
import type {
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
@@ -96,7 +100,8 @@ export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export interface RESTPostAPIGuildsJSONBody {
/**
@@ -184,12 +189,14 @@ export interface RESTPostAPIGuildsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTPostAPIGuildsResult = APIGuild;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export interface RESTPostAPIGuildsMFAJSONBody {
/**
@@ -201,7 +208,8 @@ export interface RESTPostAPIGuildsMFAJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
@@ -275,6 +283,8 @@ export interface RESTPatchAPIGuildJSONBody {
icon?: string | null | undefined;
/**
* User id to transfer guild ownership to (must be owner)
*
* @deprecated
*/
owner_id?: Snowflake | undefined;
/**
@@ -341,14 +351,15 @@ export interface RESTPatchAPIGuildJSONBody {
export type RESTPatchAPIGuildResult = APIGuild;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTDeleteAPIGuildResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
*/
export type RESTGetAPIGuildChannelsResult = APIChannel[];
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
@@ -371,11 +382,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
/**
* Sorting position of the channel
*/
position: number;
position?: number | null | undefined;
/**
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
*/
lock_permissions?: boolean | undefined;
lock_permissions?: boolean | null | undefined;
/**
* The new parent id of this channel
*/
@@ -512,6 +523,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
communication_disabled_until?: string | null | undefined;
/**
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
*
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
flags?: GuildMemberFlags | undefined;
}
/**
@@ -532,6 +549,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
nick?: string | null | undefined;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
*/
export type RESTPatchAPICurrentGuildMemberNicknameResult =
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
*/
@@ -542,14 +566,24 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
* Requires `CHANGE_NICKNAME` permission
*/
nick?: string | null | undefined;
/**
* Data URI base64 encoded banner image
*/
banner?: string | null | undefined;
/**
* Data URI base64 encoded avatar image
*/
avatar?: string | null | undefined;
/**
* Guild member bio
*/
bio?: string | null | undefined;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
*/
export type RESTPatchAPICurrentGuildMemberNicknameResult =
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
@@ -676,8 +710,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
* RGB color value
*
* @defaultValue `0`
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color?: number | null | undefined;
/**
* The role's colors
*
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
*/
colors?: APIRoleColors | undefined;
/**
* Whether the role should be displayed separately in the sidebar
*
@@ -738,8 +779,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
permissions?: Permissions | null | undefined;
/**
* RGB color value
*
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color?: number | null | undefined;
/**
* The role's colors
*/
colors?: APIRoleColors | undefined;
/**
* Whether the role should be displayed separately in the sidebar
*/
@@ -773,6 +820,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}
*/
@@ -898,6 +953,9 @@ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface RESTPatchAPIGuildMemberVerificationJSONBody {
/**
* Whether Membership Screening is enabled
@@ -913,6 +971,9 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
description?: string | null | undefined;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
/**
@@ -953,7 +1014,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
};
export interface RESTAPIGuildOnboardingPrompt
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
>,
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
@@ -969,7 +1031,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'> {
@@ -1004,9 +1067,11 @@ export interface RESTPutAPIGuildIncidentActionsJSONBody {
/**
* When invites will be enabled again
*/
invites_disabled_until?: string | undefined;
invites_disabled_until?: string | null | undefined;
/**
* When direct messages will be enabled again
*/
dms_disabled_until?: string | undefined;
dms_disabled_until?: string | null | undefined;
}
export type RESTPutAPIGuildIncidentActionsResult = APIIncidentsData;

View File

@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
/**
* The scheduled entity type of the guild event
*/
entity_type?: GuildScheduledEventEntityType | undefined;
entity_type: GuildScheduledEventEntityType;
/**
* The entity metadata of the scheduled event
*/
@@ -95,12 +95,15 @@ 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'>
Omit<
RESTPostAPIGuildScheduledEventJSONBody,
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
>
> {
channel_id?: Snowflake | null | undefined;
/**
* The status of the scheduled event
*/

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

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

@@ -181,9 +181,28 @@ export const Routes = {
return `/channels/${channelId}/typing` as const;
},
/**
* Route for:
* - GET `/channels/{channel.id}/messages/pins`
*/
channelMessagesPins(channelId: Snowflake) {
return `/channels/${channelId}/messages/pins` as const;
},
/**
* Route for:
* - PUT `/channels/{channel.id}/messages/pins/{message.id}`
* - DELETE `/channels/{channel.id}/messages/pins/{message.id}`
*/
channelMessagesPin(channelId: Snowflake, messageId: Snowflake) {
return `/channels/${channelId}/messages/pins/${messageId}` as const;
},
/**
* Route for:
* - GET `/channels/{channel.id}/pins`
*
* @deprecated Use {@link Routes.channelMessagesPins} instead.
*/
channelPins(channelId: Snowflake) {
return `/channels/${channelId}/pins` as const;
@@ -193,6 +212,8 @@ export const Routes = {
* Route for:
* - PUT `/channels/{channel.id}/pins/{message.id}`
* - DELETE `/channels/{channel.id}/pins/{message.id}`
*
* @deprecated Use {@link Routes.channelMessagesPin} instead.
*/
channelPin(channelId: Snowflake, messageId: Snowflake) {
return `/channels/${channelId}/pins/${messageId}` as const;
@@ -229,6 +250,8 @@ export const Routes = {
/**
* Route for:
* - POST `/guilds`
*
* @deprecated {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
*/
guilds() {
return '/guilds' as const;
@@ -238,7 +261,7 @@ export const Routes = {
* Route for:
* - GET `/guilds/{guild.id}`
* - PATCH `/guilds/{guild.id}`
* - DELETE `/guilds/{guild.id}`
* - DELETE `/guilds/{guild.id}` (**deprecated**)
*/
guild(guildId: Snowflake) {
return `/guilds/${guildId}` as const;
@@ -312,6 +335,8 @@ export const Routes = {
/**
* Route for:
* - POST `/guilds/{guild.id}/mfa`
*
* @deprecated
*/
guildMFA(guildId: Snowflake) {
return `/guilds/${guildId}/mfa` as const;
@@ -355,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`
@@ -441,7 +474,7 @@ export const Routes = {
/**
* Route for:
* - GET `/guilds/templates/{template.code}`
* - POST `/guilds/templates/{template.code}`
* - POST `/guilds/templates/{template.code}` (**deprecated**)
*/
template(code: string) {
return `/guilds/templates/${code}` as const;
@@ -783,6 +816,8 @@ export const Routes = {
* Route for:
* - GET `/guilds/{guild.id}/member-verification`
* - PATCH `/guilds/{guild.id}/member-verification`
*
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
guildMemberVerification(guildId: Snowflake) {
return `/guilds/${guildId}/member-verification` as const;
@@ -1382,6 +1417,16 @@ export const CDNRoutes = {
soundboardSound(soundId: Snowflake) {
return `/soundboard-sounds/${soundId}` as const;
},
/**
* Route for:
* - GET `/guild-tag-badges/{guild.id}/{badge}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
return `/guild-tag-badges/${guildId}/${guildTagBadge}.${format}` as const;
},
};
for (const [key, fn] of Object.entries(CDNRoutes)) {
@@ -1428,6 +1473,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
/**
* @deprecated Use {@link DefaultUserAvatarFormat} instead.

View File

@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v10/mod.ts';
/**
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
*/
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
export type RESTPostAPISendSoundboardSoundResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}

View File

@@ -7,7 +7,8 @@ import type { _StrictPartial } from '../../utils/internals.ts';
export type RESTGetAPITemplateResult = APITemplate;
/**
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export interface RESTPostAPITemplateCreateGuildJSONBody {
/**
@@ -23,7 +24,8 @@ export interface RESTPostAPITemplateCreateGuildJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTPostAPITemplateCreateGuildResult = APIGuild;

View File

@@ -263,7 +263,9 @@ export interface RESTGetAPIWebhookWithTokenMessageQuery {
* @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}
*/
export type RESTPatchAPIWebhookWithTokenMessageJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
_Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>
_Nullable<
Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds' | 'flags'>
>
> & {
/**
* Attached files to keep

View File

@@ -25,11 +25,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
*/
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'event_webhooks_status'
| 'event_webhooks_types'
| 'flags'
| 'install_params'
| 'integration_types_config'

View File

@@ -7,6 +7,7 @@ import type {
APIFollowedChannel,
APIMessage,
APIMessageReference,
APIMessageSharedClientTheme,
APIThreadList,
APIThreadMember,
APIUser,
@@ -24,6 +25,10 @@ import type {
ChannelFlags,
APIAttachment,
APIMessageTopLevelComponent,
APIMessagePin,
APIAnnouncementThreadChannel,
APIPrivateThreadChannel,
APIPublicThreadChannel,
} from '../../payloads/v9/mod.ts';
import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
@@ -80,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
nsfw?: boolean | null | undefined;
/**
* Amount of seconds a user has to wait before sending another message (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
@@ -145,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
*
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
/**
* Channel flags combined as a bit field.
*/
@@ -167,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
*
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
@@ -341,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
* A poll!
*/
poll?: RESTAPIPoll | undefined;
/**
* The custom client-side theme to share via the message
*/
shared_client_theme?: APIMessageSharedClientTheme | undefined;
}
/**
@@ -631,12 +639,54 @@ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
export type RESTPostAPIChannelTypingResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
*/
export interface RESTGetAPIChannelMessagesPinsQuery {
/**
* Get messages pinned before this timestamp
*/
before?: string;
/**
* Maximum number of pins to return (1-50).
*
* @defaultValue `50`
*/
limit?: number;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
*/
export interface RESTGetAPIChannelMessagesPinsResult {
/**
* Array of pinned messages
*/
items: APIMessagePin[];
/**
* Whether there are more items available
*/
has_more: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#pin-message}
*/
export type RESTPutAPIChannelMessagesPinResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/message#unpin-message}
*/
export type RESTDeleteAPIChannelMessagesPinResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/message#get-pinned-messages-deprecated}
* @deprecated
*/
export type RESTGetAPIChannelPinsResult = APIMessage[];
/**
* @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
* @see {@link https://discord.com/developers/docs/resources/message#pin-message-deprecated}
* @deprecated
*/
export type RESTPutAPIChannelPinResult = never;
@@ -737,7 +787,10 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult = APIChannel;
export type RESTPostAPIChannelThreadsResult =
| APIAnnouncementThreadChannel
| APIPrivateThreadChannel
| APIPublicThreadChannel;
/**
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}

2
deno/rest/v9/emoji.ts generated
View File

@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals.ts';
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v9.ts';
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v9/mod.ts';
/**
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}

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

@@ -18,6 +18,7 @@ import type {
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildFeature,
GuildMemberFlags,
GuildMFALevel,
GuildSystemChannelFlags,
GuildVerificationLevel,
@@ -26,6 +27,9 @@ import type {
APIGroupDMChannel,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
APIRoleColors,
APIIncidentsData,
APIGuildChannel,
} from '../../payloads/v9/mod.ts';
import type {
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
@@ -97,6 +101,7 @@ export type APIGuildCreateRole = RESTAPIGuildCreateRole;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
* @deprecated {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
*/
export interface RESTPostAPIGuildsJSONBody {
/**
@@ -184,12 +189,14 @@ export interface RESTPostAPIGuildsJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTPostAPIGuildsResult = APIGuild;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export interface RESTPostAPIGuildsMFAJSONBody {
/**
@@ -201,7 +208,8 @@ export interface RESTPostAPIGuildsMFAJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
@@ -275,6 +283,8 @@ export interface RESTPatchAPIGuildJSONBody {
icon?: string | null | undefined;
/**
* User id to transfer guild ownership to (must be owner)
*
* @deprecated
*/
owner_id?: Snowflake | undefined;
/**
@@ -341,14 +351,15 @@ export interface RESTPatchAPIGuildJSONBody {
export type RESTPatchAPIGuildResult = APIGuild;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export type RESTDeleteAPIGuildResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
*/
export type RESTGetAPIGuildChannelsResult = APIChannel[];
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
/**
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
@@ -371,11 +382,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
/**
* Sorting position of the channel
*/
position: number;
position?: number | null | undefined;
/**
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
*/
lock_permissions?: boolean | undefined;
lock_permissions?: boolean | null | undefined;
/**
* The new parent id of this channel
*/
@@ -512,6 +523,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
communication_disabled_until?: string | null | undefined;
/**
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
*
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
flags?: GuildMemberFlags | undefined;
}
/**
@@ -532,6 +549,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
nick?: string | null | undefined;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
*/
export type RESTPatchAPICurrentGuildMemberNicknameResult =
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
*/
@@ -542,14 +566,24 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
* Requires `CHANGE_NICKNAME` permission
*/
nick?: string | null | undefined;
/**
* Data URI base64 encoded banner image
*/
banner?: string | null | undefined;
/**
* Data URI base64 encoded avatar image
*/
avatar?: string | null | undefined;
/**
* Guild member bio
*/
bio?: string | null | undefined;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
*/
export type RESTPatchAPICurrentGuildMemberNicknameResult =
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
@@ -682,8 +716,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
* RGB color value
*
* @defaultValue `0`
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color?: number | null | undefined;
/**
* The role's colors
*
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
*/
colors?: APIRoleColors | undefined;
/**
* Whether the role should be displayed separately in the sidebar
*
@@ -744,8 +785,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
permissions?: Permissions | null | undefined;
/**
* RGB color value
*
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
*/
color?: number | null | undefined;
/**
* The role's colors
*/
colors?: APIRoleColors | undefined;
/**
* Whether the role should be displayed separately in the sidebar
*/
@@ -779,6 +826,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}
*/
@@ -904,6 +959,9 @@ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface RESTPatchAPIGuildMemberVerificationJSONBody {
/**
* Whether Membership Screening is enabled
@@ -919,6 +977,9 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
description?: string | null | undefined;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
/**
@@ -959,7 +1020,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
};
export interface RESTAPIGuildOnboardingPrompt
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
extends
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
>,
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
@@ -975,7 +1037,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'> {
@@ -1010,9 +1073,11 @@ export interface RESTPutAPIGuildIncidentActionsJSONBody {
/**
* When invites will be enabled again
*/
invites_disabled_until?: string | undefined;
invites_disabled_until?: string | null | undefined;
/**
* When direct messages will be enabled again
*/
dms_disabled_until?: string | undefined;
dms_disabled_until?: string | null | undefined;
}
export type RESTPutAPIGuildIncidentActionsResult = APIIncidentsData;

View File

@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
/**
* The scheduled entity type of the guild event
*/
entity_type?: GuildScheduledEventEntityType | undefined;
entity_type: GuildScheduledEventEntityType;
/**
* The entity metadata of the scheduled event
*/
@@ -95,12 +95,15 @@ 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'>
Omit<
RESTPostAPIGuildScheduledEventJSONBody,
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
>
> {
channel_id?: Snowflake | null | undefined;
/**
* The status of the scheduled event
*/

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

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

@@ -181,9 +181,28 @@ export const Routes = {
return `/channels/${channelId}/typing` as const;
},
/**
* Route for:
* - GET `/channels/{channel.id}/messages/pins`
*/
channelMessagesPins(channelId: Snowflake) {
return `/channels/${channelId}/messages/pins` as const;
},
/**
* Route for:
* - PUT `/channels/{channel.id}/messages/pins/{message.id}`
* - DELETE `/channels/{channel.id}/messages/pins/{message.id}`
*/
channelMessagesPin(channelId: Snowflake, messageId: Snowflake) {
return `/channels/${channelId}/messages/pins/${messageId}` as const;
},
/**
* Route for:
* - GET `/channels/{channel.id}/pins`
*
* @deprecated Use {@link Routes.channelMessagesPins} instead.
*/
channelPins(channelId: Snowflake) {
return `/channels/${channelId}/pins` as const;
@@ -193,6 +212,8 @@ export const Routes = {
* Route for:
* - PUT `/channels/{channel.id}/pins/{message.id}`
* - DELETE `/channels/{channel.id}/pins/{message.id}`
*
* @deprecated Use {@link Routes.channelMessagesPin} instead.
*/
channelPin(channelId: Snowflake, messageId: Snowflake) {
return `/channels/${channelId}/pins/${messageId}` as const;
@@ -229,6 +250,8 @@ export const Routes = {
/**
* Route for:
* - POST `/guilds`
*
* @deprecated {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
*/
guilds() {
return '/guilds' as const;
@@ -238,7 +261,7 @@ export const Routes = {
* Route for:
* - GET `/guilds/{guild.id}`
* - PATCH `/guilds/{guild.id}`
* - DELETE `/guilds/{guild.id}`
* - DELETE `/guilds/{guild.id}` (**deprecated**)
*/
guild(guildId: Snowflake) {
return `/guilds/${guildId}` as const;
@@ -312,6 +335,8 @@ export const Routes = {
/**
* Route for:
* - POST `/guilds/{guild.id}/mfa`
*
* @deprecated
*/
guildMFA(guildId: Snowflake) {
return `/guilds/${guildId}/mfa` as const;
@@ -355,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`
@@ -441,7 +474,7 @@ export const Routes = {
/**
* Route for:
* - GET `/guilds/templates/{template.code}`
* - POST `/guilds/templates/{template.code}`
* - POST `/guilds/templates/{template.code}` (**deprecated**)
*/
template(code: string) {
return `/guilds/templates/${code}` as const;
@@ -792,6 +825,8 @@ export const Routes = {
* Route for:
* - GET `/guilds/{guild.id}/member-verification`
* - PATCH `/guilds/{guild.id}/member-verification`
*
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
guildMemberVerification(guildId: Snowflake) {
return `/guilds/${guildId}/member-verification` as const;
@@ -1391,6 +1426,16 @@ export const CDNRoutes = {
soundboardSound(soundId: Snowflake) {
return `/soundboard-sounds/${soundId}` as const;
},
/**
* Route for:
* - GET `/guild-tag-badges/{guild.id}/{badge}.{png|jpeg|webp}`
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildTagBadge<Format extends GuildTagBadgeFormat>(guildId: Snowflake, guildTagBadge: string, format: Format) {
return `/guild-tag-badges/${guildId}/${guildTagBadge}.${format}` as const;
},
};
for (const [key, fn] of Object.entries(CDNRoutes)) {
@@ -1437,6 +1482,7 @@ export type StickerFormat = Extract<ImageFormat, ImageFormat.GIF | ImageFormat.L
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type GuildTagBadgeFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
/**
* @deprecated Use {@link DefaultUserAvatarFormat} instead.

View File

@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v9/mod.ts';
/**
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
*/
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
export type RESTPostAPISendSoundboardSoundResult = never;
/**
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}

View File

@@ -7,7 +7,8 @@ import type { _StrictPartial } from '../../utils/internals.ts';
export type RESTGetAPITemplateResult = APITemplate;
/**
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
* @deprecated
*/
export interface RESTPostAPITemplateCreateGuildJSONBody {
/**
@@ -23,12 +24,13 @@ export interface RESTPostAPITemplateCreateGuildJSONBody {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template}
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
*/
export type RESTPostAPITemplateCreateGuildResult = APIGuild;
/**
* @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}
* @deprecated
*/
export type RESTGetAPIGuildTemplatesResult = APITemplate[];

View File

@@ -263,7 +263,9 @@ export interface RESTGetAPIWebhookWithTokenMessageQuery {
* @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}
*/
export type RESTPatchAPIWebhookWithTokenMessageJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
_Nullable<Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds'>>
_Nullable<
Pick<RESTPostAPIWebhookWithTokenJSONBody, 'allowed_mentions' | 'components' | 'content' | 'embeds' | 'flags'>
>
> & {
/**
* Attached files to keep

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

12
deno/voice/v4.ts generated
View File

@@ -156,8 +156,20 @@ export enum VoiceCloseCodes {
* We didn't recognize your encryption
*/
UnknownEncryptionMode,
/**
* E2EE/DAVE protocol required
*/
EndToEndEncryptionDAVEProtocolRequired,
/**
* You sent a malformed request
*/
BadRequest = 4_020,
/**
* Disconnect due to rate limit exceeded. Should not reconnect
*/
RateLimited,
/**
* Disconnect all clients due to call terminated (channel deleted, voice server changed, etc.). Should not reconnect
*/
CallTerminated,
}

12
deno/voice/v8.ts generated
View File

@@ -152,10 +152,22 @@ export enum VoiceCloseCodes {
* We didn't recognize your encryption
*/
UnknownEncryptionMode,
/**
* E2EE/DAVE protocol required
*/
EndToEndEncryptionDAVEProtocolRequired,
/**
* You sent a malformed request
*/
BadRequest = 4_020,
/**
* Disconnect due to rate limit exceeded. Should not reconnect
*/
RateLimited,
/**
* Disconnect all clients due to call terminated (channel deleted, voice server changed, etc.). Should not reconnect
*/
CallTerminated,
}
/**

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