mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 11:20:10 +00:00
Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fab79feda | ||
|
|
4732f1abbe | ||
|
|
796f6d8a3b | ||
|
|
4488d8fd26 | ||
|
|
9a50367dad | ||
|
|
dc3d5df0a2 | ||
|
|
0e03e39aa2 | ||
|
|
f8a9c8b5c6 | ||
|
|
3eb239ce0c | ||
|
|
48016e5115 | ||
|
|
a08e82f097 | ||
|
|
1def1010ca | ||
|
|
af8e7c7a5b | ||
|
|
cecf17b415 | ||
|
|
cb6d4bacc4 | ||
|
|
0a2e7787c6 | ||
|
|
65b672e2af | ||
|
|
2b53b20b84 | ||
|
|
907d88ada9 | ||
|
|
8465c5866c | ||
|
|
09a114133c | ||
|
|
4577ac2609 | ||
|
|
59e247729f | ||
|
|
e78de0c83b | ||
|
|
3644b70e2e | ||
|
|
4af2ea9141 | ||
|
|
f2c3451c2a | ||
|
|
d503c71252 | ||
|
|
e253a4ac87 | ||
|
|
84226e402a | ||
|
|
2e84efb9b8 | ||
|
|
df1527c4bb | ||
|
|
2cade98ed0 | ||
|
|
d3535d6db1 | ||
|
|
2f2d4ae3fa | ||
|
|
0c65d40af0 | ||
|
|
12072b70a0 | ||
|
|
34908aa4ce | ||
|
|
b2eeb3f27b | ||
|
|
fc3aa1c911 | ||
|
|
06098869d5 | ||
|
|
a2d76fc7ca | ||
|
|
56d491fa68 | ||
|
|
3b10c60faa | ||
|
|
c6e320bd22 | ||
|
|
f49546c780 | ||
|
|
63959ef2aa | ||
|
|
f72fbc93f6 | ||
|
|
d83dadca17 | ||
|
|
0bb2204b5d | ||
|
|
292c6b58ee | ||
|
|
63ca86afbd | ||
|
|
20653b3481 | ||
|
|
7bef64df76 | ||
|
|
6477c1e5d8 |
101
CHANGELOG.md
101
CHANGELOG.md
@@ -1,3 +1,104 @@
|
||||
## [0.37.2](https://github.com/discordjs/discord-api-types/compare/0.37.1...0.37.2) (2022-08-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayGuildMembersChunkDispatchData:** make chunk pagination properties mandatory ([#558](https://github.com/discordjs/discord-api-types/issues/558)) ([0e03e39](https://github.com/discordjs/discord-api-types/commit/0e03e39aa2bf8f1b9a58113a3242c4722e64922b))
|
||||
- **GatewayRequestGuildMembersData:** limit being required with user_ids ([#559](https://github.com/discordjs/discord-api-types/issues/559)) ([dc3d5df](https://github.com/discordjs/discord-api-types/commit/dc3d5df0a2931eff63991987166634661d5bd1d8))
|
||||
- **RESTGetAPIChannelUsersThreadsArchivedResult:** add `has_more` missing field ([#543](https://github.com/discordjs/discord-api-types/issues/543)) ([796f6d8](https://github.com/discordjs/discord-api-types/commit/796f6d8a3b2f55d2a120137801e0450ddf30576e))
|
||||
|
||||
### Features
|
||||
|
||||
- add search that might or might not work ([f8a9c8b](https://github.com/discordjs/discord-api-types/commit/f8a9c8b5c6bdd73bcbf9dd6fff66fafac2594ba4))
|
||||
- **APIVoiceChannel:** support text in voice, properties `last_message_id` and `rate_limit_per_user` ([#544](https://github.com/discordjs/discord-api-types/issues/544)) ([4488d8f](https://github.com/discordjs/discord-api-types/commit/4488d8fd2611a6547fc6149ba1cec5682340a119))
|
||||
- **GatewayReadyDispatchData:** add `resume_gateway_url` ([#552](https://github.com/discordjs/discord-api-types/issues/552)) ([9a50367](https://github.com/discordjs/discord-api-types/commit/9a50367dad3a06fbca6e8d1fdd98fbf144595d4e))
|
||||
|
||||
## [0.37.1](https://github.com/discordjs/discord-api-types/compare/0.37.0...0.37.1) (2022-08-04)
|
||||
|
||||
# [0.37.0](https://github.com/discordjs/discord-api-types/compare/0.36.3...0.37.0) (2022-07-28)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **RESTJSONErrorCodes:** use `MaximumThreadParticipantsReached` instead in error code 30033 ([#540](https://github.com/discordjs/discord-api-types/issues/540)) ([cecf17b](https://github.com/discordjs/discord-api-types/commit/cecf17b4158fbebb3ee508518a9e9a7b1297356f))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **RESTJSONErrorCodes:** `MaximumThreadParticipants` was renamed to `MaximumThreadParticipantsReached` for consistency with the rest of the codes
|
||||
|
||||
## [0.36.3](https://github.com/discordjs/discord-api-types/compare/0.36.2...0.36.3) (2022-07-21)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIConnection:** add `ConnectionService` to `type` ([#491](https://github.com/discordjs/discord-api-types/issues/491)) ([4577ac2](https://github.com/discordjs/discord-api-types/commit/4577ac2609f4a861505bc41f4293f482db251cdc))
|
||||
- **APIThreadChannel:** add fields about new message counter capability ([#532](https://github.com/discordjs/discord-api-types/issues/532)) ([2b53b20](https://github.com/discordjs/discord-api-types/commit/2b53b20b84b7434b9a35b715d8ebdeb040835dca))
|
||||
- **GatewayGuildCreateDispatchData:** add missing `unavailable` ([#504](https://github.com/discordjs/discord-api-types/issues/504)) ([59e2477](https://github.com/discordjs/discord-api-types/commit/59e247729fcd27be839c88516939ec22843781ce))
|
||||
- **RESTJSONErrorCodes:** add `ApplicationNotYetAvailable` ([#507](https://github.com/discordjs/discord-api-types/issues/507)) ([09a1141](https://github.com/discordjs/discord-api-types/commit/09a114133c7599cc14d4a0eb61425162091c45ee))
|
||||
- **RESTJSONErrorCodes:** add error `30034` ([#530](https://github.com/discordjs/discord-api-types/issues/530)) ([0a2e778](https://github.com/discordjs/discord-api-types/commit/0a2e7787c672ffb4af83e055df632aae36811445))
|
||||
- **RESTJSONErrorCodes:** add error `50132` ([#505](https://github.com/discordjs/discord-api-types/issues/505)) ([907d88a](https://github.com/discordjs/discord-api-types/commit/907d88ada93221802a4aefe7dc0ca3b2b73f94f0))
|
||||
- **RESTJSONErrorCodes:** add error `50146` ([#527](https://github.com/discordjs/discord-api-types/issues/527)) ([e78de0c](https://github.com/discordjs/discord-api-types/commit/e78de0c83ba93145a2302ddea2e55b5050291c52))
|
||||
- **RESTJSONErrorCodes:** add new errors ([#506](https://github.com/discordjs/discord-api-types/issues/506)) ([65b672e](https://github.com/discordjs/discord-api-types/commit/65b672e2afd2135333272d4e7b771eba237a21b6))
|
||||
|
||||
## [0.36.2](https://github.com/discordjs/discord-api-types/compare/0.36.1...0.36.2) (2022-07-14)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add error `30032` ([#521](https://github.com/discordjs/discord-api-types/issues/521)) ([f2c3451](https://github.com/discordjs/discord-api-types/commit/f2c3451c2a8bc91bcca65372d2944a07a3c34a9a))
|
||||
- **RESTPutAPIApplicationGuildCommandsJSONBody:** add missing `id` ([#522](https://github.com/discordjs/discord-api-types/issues/522)) ([4af2ea9](https://github.com/discordjs/discord-api-types/commit/4af2ea91415a5662171d342379c4bd33bfa5a6d5))
|
||||
|
||||
## [0.36.1](https://github.com/discordjs/discord-api-types/compare/0.36.0...0.36.1) (2022-07-04)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIApplicationCommandStringOption:** add `min_length` and `max_length` ([#513](https://github.com/discordjs/discord-api-types/issues/513)) ([2cade98](https://github.com/discordjs/discord-api-types/commit/2cade98ed0a0a074254fbc1580fc56d0e0b3dc9c))
|
||||
|
||||
# [0.36.0](https://github.com/discordjs/discord-api-types/compare/0.35.0...0.36.0) (2022-06-30)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIBaseInteraction:** add `app_permissions` ([#509](https://github.com/discordjs/discord-api-types/issues/509)) ([0c65d40](https://github.com/discordjs/discord-api-types/commit/0c65d40af00499233830ce272a2a274bcd5b9e8c))
|
||||
- **MessageType:** update names ([#498](https://github.com/discordjs/discord-api-types/issues/498)) ([12072b7](https://github.com/discordjs/discord-api-types/commit/12072b70a0c70e1e1f9de920789e26829268de12))
|
||||
- **RESTJSONErrorCodes:** add error 20024 ([#480](https://github.com/discordjs/discord-api-types/issues/480)) ([34908aa](https://github.com/discordjs/discord-api-types/commit/34908aa4ceeca4b58276cc207f5bdb77cef04296))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **MessageType:** The following message types have been renamed:
|
||||
|
||||
* `GuildMemberJoin` -> `UserJoin`
|
||||
* `UserPremiumGuildSubscription` -> `GuildBoost`
|
||||
* `UserPremiumGuildSubscriptionTier1` -> `GuildBoostTier1`
|
||||
* `UserPremiumGuildSubscriptionTier2` -> `GuildBoostTier2`
|
||||
* `UserPremiumGuildSubscriptionTier3` -> `GuildBoostTier3`
|
||||
|
||||
# [0.35.0](https://github.com/discordjs/discord-api-types/compare/0.34.0...0.35.0) (2022-06-23)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **GatewayIdentifyProperties:** remove `$` prefix from keys ([#493](https://github.com/discordjs/discord-api-types/issues/493)) ([3b10c60](https://github.com/discordjs/discord-api-types/commit/3b10c60faa5943501ab1f7cfa0d5f3c5317cdbbd))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIEmbedVideo:** add missing `proxy_url` property ([#496](https://github.com/discordjs/discord-api-types/issues/496)) ([56d491f](https://github.com/discordjs/discord-api-types/commit/56d491fa6808d9a8762bff606ca8feb5e11f13a4))
|
||||
- **REST:** add `CDNRoutes` ([#502](https://github.com/discordjs/discord-api-types/issues/502)) ([0609886](https://github.com/discordjs/discord-api-types/commit/06098869d552139fadcc204b5ce4e1a7e5352b68))
|
||||
- **UserFlags:** add `Quarantined` flag ([#495](https://github.com/discordjs/discord-api-types/issues/495)) ([fc3aa1c](https://github.com/discordjs/discord-api-types/commit/fc3aa1c9110e4730c6b8ba3e36815ecd2da66c68))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **GatewayIdentifyProperties:** The fields for identify no longer use the `$` prefix for the values.
|
||||
|
||||
# [0.34.0](https://github.com/discordjs/discord-api-types/compare/0.33.5...0.34.0) (2022-06-13)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- separate `MESSAGE_CREATE` fields from `APIMessage` object ([#434](https://github.com/discordjs/discord-api-types/issues/434)) ([0bb2204](https://github.com/discordjs/discord-api-types/commit/0bb2204b5ddd32b791641a33d52669bc739bc208))
|
||||
|
||||
### Features
|
||||
|
||||
- add guild mfa endpoint and error `50017` ([#476](https://github.com/discordjs/discord-api-types/issues/476)) ([292c6b5](https://github.com/discordjs/discord-api-types/commit/292c6b58ee9384db2ce06addb80d2ea2bcd32de2))
|
||||
- **RESTJSONErrorCodes:** add 220003 error ([#466](https://github.com/discordjs/discord-api-types/issues/466)) ([20653b3](https://github.com/discordjs/discord-api-types/commit/20653b34819f6adf8116bef2a1e5edc3233c4117))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- Certain fields that come only through the gateway are now correctly typed as such
|
||||
|
||||
## [0.33.5](https://github.com/discordjs/discord-api-types/compare/0.33.4...0.33.5) (2022-06-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Discord API Types
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types)
|
||||
[](https://github.com/discordjs/discord-api-types)
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
|
||||
[](https://www.npmjs.com/package/discord-api-types)
|
||||
@@ -8,6 +8,7 @@
|
||||
[](https://www.patreon.com/vladfrangu)
|
||||
[](https://ko-fi.com/wolfgalvlad)
|
||||
[](https://github.com/sponsors/vladfrangu)
|
||||
[](https://vercel.com?utm_source=discordjs&utm_campaign=oss)
|
||||
|
||||
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
|
||||
@@ -1,3 +1,104 @@
|
||||
## [0.37.2](https://github.com/discordjs/discord-api-types/compare/0.37.1...0.37.2) (2022-08-11)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **GatewayGuildMembersChunkDispatchData:** make chunk pagination properties mandatory ([#558](https://github.com/discordjs/discord-api-types/issues/558)) ([0e03e39](https://github.com/discordjs/discord-api-types/commit/0e03e39aa2bf8f1b9a58113a3242c4722e64922b))
|
||||
- **GatewayRequestGuildMembersData:** limit being required with user_ids ([#559](https://github.com/discordjs/discord-api-types/issues/559)) ([dc3d5df](https://github.com/discordjs/discord-api-types/commit/dc3d5df0a2931eff63991987166634661d5bd1d8))
|
||||
- **RESTGetAPIChannelUsersThreadsArchivedResult:** add `has_more` missing field ([#543](https://github.com/discordjs/discord-api-types/issues/543)) ([796f6d8](https://github.com/discordjs/discord-api-types/commit/796f6d8a3b2f55d2a120137801e0450ddf30576e))
|
||||
|
||||
### Features
|
||||
|
||||
- add search that might or might not work ([f8a9c8b](https://github.com/discordjs/discord-api-types/commit/f8a9c8b5c6bdd73bcbf9dd6fff66fafac2594ba4))
|
||||
- **APIVoiceChannel:** support text in voice, properties `last_message_id` and `rate_limit_per_user` ([#544](https://github.com/discordjs/discord-api-types/issues/544)) ([4488d8f](https://github.com/discordjs/discord-api-types/commit/4488d8fd2611a6547fc6149ba1cec5682340a119))
|
||||
- **GatewayReadyDispatchData:** add `resume_gateway_url` ([#552](https://github.com/discordjs/discord-api-types/issues/552)) ([9a50367](https://github.com/discordjs/discord-api-types/commit/9a50367dad3a06fbca6e8d1fdd98fbf144595d4e))
|
||||
|
||||
## [0.37.1](https://github.com/discordjs/discord-api-types/compare/0.37.0...0.37.1) (2022-08-04)
|
||||
|
||||
# [0.37.0](https://github.com/discordjs/discord-api-types/compare/0.36.3...0.37.0) (2022-07-28)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **RESTJSONErrorCodes:** use `MaximumThreadParticipantsReached` instead in error code 30033 ([#540](https://github.com/discordjs/discord-api-types/issues/540)) ([cecf17b](https://github.com/discordjs/discord-api-types/commit/cecf17b4158fbebb3ee508518a9e9a7b1297356f))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **RESTJSONErrorCodes:** `MaximumThreadParticipants` was renamed to `MaximumThreadParticipantsReached` for consistency with the rest of the codes
|
||||
|
||||
## [0.36.3](https://github.com/discordjs/discord-api-types/compare/0.36.2...0.36.3) (2022-07-21)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIConnection:** add `ConnectionService` to `type` ([#491](https://github.com/discordjs/discord-api-types/issues/491)) ([4577ac2](https://github.com/discordjs/discord-api-types/commit/4577ac2609f4a861505bc41f4293f482db251cdc))
|
||||
- **APIThreadChannel:** add fields about new message counter capability ([#532](https://github.com/discordjs/discord-api-types/issues/532)) ([2b53b20](https://github.com/discordjs/discord-api-types/commit/2b53b20b84b7434b9a35b715d8ebdeb040835dca))
|
||||
- **GatewayGuildCreateDispatchData:** add missing `unavailable` ([#504](https://github.com/discordjs/discord-api-types/issues/504)) ([59e2477](https://github.com/discordjs/discord-api-types/commit/59e247729fcd27be839c88516939ec22843781ce))
|
||||
- **RESTJSONErrorCodes:** add `ApplicationNotYetAvailable` ([#507](https://github.com/discordjs/discord-api-types/issues/507)) ([09a1141](https://github.com/discordjs/discord-api-types/commit/09a114133c7599cc14d4a0eb61425162091c45ee))
|
||||
- **RESTJSONErrorCodes:** add error `30034` ([#530](https://github.com/discordjs/discord-api-types/issues/530)) ([0a2e778](https://github.com/discordjs/discord-api-types/commit/0a2e7787c672ffb4af83e055df632aae36811445))
|
||||
- **RESTJSONErrorCodes:** add error `50132` ([#505](https://github.com/discordjs/discord-api-types/issues/505)) ([907d88a](https://github.com/discordjs/discord-api-types/commit/907d88ada93221802a4aefe7dc0ca3b2b73f94f0))
|
||||
- **RESTJSONErrorCodes:** add error `50146` ([#527](https://github.com/discordjs/discord-api-types/issues/527)) ([e78de0c](https://github.com/discordjs/discord-api-types/commit/e78de0c83ba93145a2302ddea2e55b5050291c52))
|
||||
- **RESTJSONErrorCodes:** add new errors ([#506](https://github.com/discordjs/discord-api-types/issues/506)) ([65b672e](https://github.com/discordjs/discord-api-types/commit/65b672e2afd2135333272d4e7b771eba237a21b6))
|
||||
|
||||
## [0.36.2](https://github.com/discordjs/discord-api-types/compare/0.36.1...0.36.2) (2022-07-14)
|
||||
|
||||
### Features
|
||||
|
||||
- **RESTJSONErrorCodes:** add error `30032` ([#521](https://github.com/discordjs/discord-api-types/issues/521)) ([f2c3451](https://github.com/discordjs/discord-api-types/commit/f2c3451c2a8bc91bcca65372d2944a07a3c34a9a))
|
||||
- **RESTPutAPIApplicationGuildCommandsJSONBody:** add missing `id` ([#522](https://github.com/discordjs/discord-api-types/issues/522)) ([4af2ea9](https://github.com/discordjs/discord-api-types/commit/4af2ea91415a5662171d342379c4bd33bfa5a6d5))
|
||||
|
||||
## [0.36.1](https://github.com/discordjs/discord-api-types/compare/0.36.0...0.36.1) (2022-07-04)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIApplicationCommandStringOption:** add `min_length` and `max_length` ([#513](https://github.com/discordjs/discord-api-types/issues/513)) ([2cade98](https://github.com/discordjs/discord-api-types/commit/2cade98ed0a0a074254fbc1580fc56d0e0b3dc9c))
|
||||
|
||||
# [0.36.0](https://github.com/discordjs/discord-api-types/compare/0.35.0...0.36.0) (2022-06-30)
|
||||
|
||||
### Features
|
||||
|
||||
- **APIBaseInteraction:** add `app_permissions` ([#509](https://github.com/discordjs/discord-api-types/issues/509)) ([0c65d40](https://github.com/discordjs/discord-api-types/commit/0c65d40af00499233830ce272a2a274bcd5b9e8c))
|
||||
- **MessageType:** update names ([#498](https://github.com/discordjs/discord-api-types/issues/498)) ([12072b7](https://github.com/discordjs/discord-api-types/commit/12072b70a0c70e1e1f9de920789e26829268de12))
|
||||
- **RESTJSONErrorCodes:** add error 20024 ([#480](https://github.com/discordjs/discord-api-types/issues/480)) ([34908aa](https://github.com/discordjs/discord-api-types/commit/34908aa4ceeca4b58276cc207f5bdb77cef04296))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **MessageType:** The following message types have been renamed:
|
||||
|
||||
* `GuildMemberJoin` -> `UserJoin`
|
||||
* `UserPremiumGuildSubscription` -> `GuildBoost`
|
||||
* `UserPremiumGuildSubscriptionTier1` -> `GuildBoostTier1`
|
||||
* `UserPremiumGuildSubscriptionTier2` -> `GuildBoostTier2`
|
||||
* `UserPremiumGuildSubscriptionTier3` -> `GuildBoostTier3`
|
||||
|
||||
# [0.35.0](https://github.com/discordjs/discord-api-types/compare/0.34.0...0.35.0) (2022-06-23)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **GatewayIdentifyProperties:** remove `$` prefix from keys ([#493](https://github.com/discordjs/discord-api-types/issues/493)) ([3b10c60](https://github.com/discordjs/discord-api-types/commit/3b10c60faa5943501ab1f7cfa0d5f3c5317cdbbd))
|
||||
|
||||
### Features
|
||||
|
||||
- **APIEmbedVideo:** add missing `proxy_url` property ([#496](https://github.com/discordjs/discord-api-types/issues/496)) ([56d491f](https://github.com/discordjs/discord-api-types/commit/56d491fa6808d9a8762bff606ca8feb5e11f13a4))
|
||||
- **REST:** add `CDNRoutes` ([#502](https://github.com/discordjs/discord-api-types/issues/502)) ([0609886](https://github.com/discordjs/discord-api-types/commit/06098869d552139fadcc204b5ce4e1a7e5352b68))
|
||||
- **UserFlags:** add `Quarantined` flag ([#495](https://github.com/discordjs/discord-api-types/issues/495)) ([fc3aa1c](https://github.com/discordjs/discord-api-types/commit/fc3aa1c9110e4730c6b8ba3e36815ecd2da66c68))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **GatewayIdentifyProperties:** The fields for identify no longer use the `$` prefix for the values.
|
||||
|
||||
# [0.34.0](https://github.com/discordjs/discord-api-types/compare/0.33.5...0.34.0) (2022-06-13)
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- separate `MESSAGE_CREATE` fields from `APIMessage` object ([#434](https://github.com/discordjs/discord-api-types/issues/434)) ([0bb2204](https://github.com/discordjs/discord-api-types/commit/0bb2204b5ddd32b791641a33d52669bc739bc208))
|
||||
|
||||
### Features
|
||||
|
||||
- add guild mfa endpoint and error `50017` ([#476](https://github.com/discordjs/discord-api-types/issues/476)) ([292c6b5](https://github.com/discordjs/discord-api-types/commit/292c6b58ee9384db2ce06addb80d2ea2bcd32de2))
|
||||
- **RESTJSONErrorCodes:** add 220003 error ([#466](https://github.com/discordjs/discord-api-types/issues/466)) ([20653b3](https://github.com/discordjs/discord-api-types/commit/20653b34819f6adf8116bef2a1e5edc3233c4117))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- Certain fields that come only through the gateway are now correctly typed as such
|
||||
|
||||
## [0.33.5](https://github.com/discordjs/discord-api-types/compare/0.33.4...0.33.5) (2022-06-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Discord API Types
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types)
|
||||
[](https://github.com/discordjs/discord-api-types)
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
|
||||
[](https://www.npmjs.com/package/discord-api-types)
|
||||
@@ -8,6 +8,7 @@
|
||||
[](https://www.patreon.com/vladfrangu)
|
||||
[](https://ko-fi.com/wolfgalvlad)
|
||||
[](https://github.com/sponsors/vladfrangu)
|
||||
[](https://vercel.com?utm_source=discordjs&utm_campaign=oss)
|
||||
|
||||
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
|
||||
@@ -409,6 +409,10 @@ export interface GatewayReadyDispatchData {
|
||||
* Used for resuming connections
|
||||
*/
|
||||
session_id: string;
|
||||
/**
|
||||
* Gateway url for resuming connections
|
||||
*/
|
||||
resume_gateway_url: string;
|
||||
/**
|
||||
* The shard information associated with this session, if sent when identifying
|
||||
*
|
||||
@@ -533,6 +537,10 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
large: boolean;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
/**
|
||||
* Total number of members in this guild
|
||||
*
|
||||
@@ -817,11 +825,11 @@ export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
* The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
|
||||
*/
|
||||
chunk_index?: number;
|
||||
chunk_index: number;
|
||||
/**
|
||||
* The total number of expected chunks for this response
|
||||
*/
|
||||
chunk_count?: number;
|
||||
chunk_count: number;
|
||||
/**
|
||||
* If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
|
||||
*/
|
||||
@@ -1125,7 +1133,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = APIMessage;
|
||||
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
@@ -1138,10 +1146,43 @@ export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = {
|
||||
id: Snowflake;
|
||||
channel_id: Snowflake;
|
||||
} & Partial<APIMessage>;
|
||||
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
|
||||
GatewayMessageEventExtraFields & {
|
||||
/**
|
||||
* ID of the message
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
};
|
||||
|
||||
export interface GatewayMessageEventExtraFields {
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
@@ -1569,15 +1610,15 @@ export interface GatewayIdentifyProperties {
|
||||
/**
|
||||
* Your operating system
|
||||
*/
|
||||
$os: string;
|
||||
os: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$browser: string;
|
||||
browser: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$device: string;
|
||||
device: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1614,31 +1655,15 @@ export interface GatewayRequestGuildMembers {
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembersData {
|
||||
export interface GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* ID of the guild to get members for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
/**
|
||||
* Used to specify if we want the presences of the matched members
|
||||
*/
|
||||
presences?: boolean;
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids?: Snowflake | Snowflake[];
|
||||
/**
|
||||
* Nonce to identify the Guild Members Chunk response
|
||||
*
|
||||
@@ -1649,6 +1674,32 @@ export interface GatewayRequestGuildMembersData {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids: Snowflake | Snowflake[];
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export type GatewayRequestGuildMembersData =
|
||||
| GatewayRequestGuildMembersDataWithUserIds
|
||||
| GatewayRequestGuildMembersDataWithQuery;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
|
||||
@@ -408,6 +408,10 @@ export interface GatewayReadyDispatchData {
|
||||
* Used for resuming connections
|
||||
*/
|
||||
session_id: string;
|
||||
/**
|
||||
* Gateway url for resuming connections
|
||||
*/
|
||||
resume_gateway_url: string;
|
||||
/**
|
||||
* The shard information associated with this session, if sent when identifying
|
||||
*
|
||||
@@ -532,6 +536,10 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
large: boolean;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
/**
|
||||
* Total number of members in this guild
|
||||
*
|
||||
@@ -816,11 +824,11 @@ export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
* The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
|
||||
*/
|
||||
chunk_index?: number;
|
||||
chunk_index: number;
|
||||
/**
|
||||
* The total number of expected chunks for this response
|
||||
*/
|
||||
chunk_count?: number;
|
||||
chunk_count: number;
|
||||
/**
|
||||
* If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
|
||||
*/
|
||||
@@ -1124,7 +1132,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = APIMessage;
|
||||
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
@@ -1137,10 +1145,43 @@ export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = {
|
||||
id: Snowflake;
|
||||
channel_id: Snowflake;
|
||||
} & Partial<APIMessage>;
|
||||
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
|
||||
GatewayMessageEventExtraFields & {
|
||||
/**
|
||||
* ID of the message
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
};
|
||||
|
||||
export interface GatewayMessageEventExtraFields {
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
@@ -1568,15 +1609,15 @@ export interface GatewayIdentifyProperties {
|
||||
/**
|
||||
* Your operating system
|
||||
*/
|
||||
$os: string;
|
||||
os: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$browser: string;
|
||||
browser: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$device: string;
|
||||
device: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1613,31 +1654,15 @@ export interface GatewayRequestGuildMembers {
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembersData {
|
||||
export interface GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* ID of the guild to get members for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
/**
|
||||
* Used to specify if we want the presences of the matched members
|
||||
*/
|
||||
presences?: boolean;
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids?: Snowflake | Snowflake[];
|
||||
/**
|
||||
* Nonce to identify the Guild Members Chunk response
|
||||
*
|
||||
@@ -1648,6 +1673,32 @@ export interface GatewayRequestGuildMembersData {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids: Snowflake | Snowflake[];
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export type GatewayRequestGuildMembersData =
|
||||
| GatewayRequestGuildMembersDataWithUserIds
|
||||
| GatewayRequestGuildMembersDataWithQuery;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,20 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
min_length?: number;
|
||||
/**
|
||||
* For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
|
||||
*/
|
||||
max_length?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandStringOptionBase,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
@@ -27,7 +27,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
@@ -43,7 +43,7 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
|
||||
@@ -101,7 +101,7 @@ export enum ApplicationCommandType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface APIMessageInteraction {
|
||||
*/
|
||||
type: InteractionType;
|
||||
/**
|
||||
* The name of the ApplicationCommand
|
||||
* The name of the application command, including subcommands and subcommand groups
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
@@ -104,6 +104,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
|
||||
*/
|
||||
app_permissions?: Permissions;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#get-ticket
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker, APIStickerItem } from './sticker.ts';
|
||||
@@ -40,7 +39,6 @@ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel
|
||||
flags?: ChannelFlags;
|
||||
}
|
||||
|
||||
// TODO: update when text in voice is released
|
||||
export type TextChannelType =
|
||||
| ChannelType.DM
|
||||
| ChannelType.GroupDM
|
||||
@@ -49,7 +47,8 @@ export type TextChannelType =
|
||||
| ChannelType.GuildPrivateThread
|
||||
| ChannelType.GuildNewsThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum;
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice;
|
||||
|
||||
export type GuildChannelType = Exclude<
|
||||
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
|
||||
@@ -61,6 +60,16 @@ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBa
|
||||
* The id of the last message sent in this channel (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
@@ -112,23 +121,11 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
|
||||
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
|
||||
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
|
||||
|
||||
export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
|
||||
export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice channel
|
||||
*/
|
||||
@@ -143,6 +140,11 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildVoiceChannel
|
||||
extends APIVoiceChannelBase<ChannelType.GuildVoice>,
|
||||
APITextBasedChannel<ChannelType.GuildVoice> {
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -151,7 +153,9 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
video_quality_mode?: VideoQualityMode;
|
||||
}
|
||||
|
||||
interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
|
||||
export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
|
||||
|
||||
export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
|
||||
/**
|
||||
* The recipients of the DM
|
||||
*
|
||||
@@ -198,7 +202,9 @@ export interface APIThreadChannel
|
||||
*/
|
||||
thread_metadata?: APIThreadMetadata;
|
||||
/**
|
||||
* The approximate message count of the thread, does not count above 50 even if there are more messages
|
||||
* Number of messages (not including the initial message or deleted messages) in a thread
|
||||
*
|
||||
* If the thread was created before July 1, 2022, it stops counting at 50 messages
|
||||
*/
|
||||
message_count?: number;
|
||||
/**
|
||||
@@ -223,6 +229,12 @@ export interface APIThreadChannel
|
||||
* The id of the last message sent in this thread (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Number of messages ever sent in a thread
|
||||
*
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
}
|
||||
|
||||
export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
|
||||
@@ -235,7 +247,8 @@ export type APIChannel =
|
||||
| APIDMChannel
|
||||
| APITextChannel
|
||||
| APINewsChannel
|
||||
| APIVoiceChannel
|
||||
| APIGuildVoiceChannel
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APINewsChannel
|
||||
@@ -326,10 +339,6 @@ export interface APIMessage {
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The author of this message (only a valid user in the case where the message is generated by a user or bot user)
|
||||
*
|
||||
@@ -339,17 +348,15 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
author: APIUser;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Contents of the message
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
content: string;
|
||||
/**
|
||||
@@ -377,7 +384,7 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUser[];
|
||||
/**
|
||||
* Roles specifically mentioned in this message
|
||||
*
|
||||
@@ -400,12 +407,26 @@ export interface APIMessage {
|
||||
* Any attached files
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
attachments: APIAttachment[];
|
||||
/**
|
||||
* Any embedded content
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#embed-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
embeds: APIEmbed[];
|
||||
/**
|
||||
@@ -444,7 +465,7 @@ export interface APIMessage {
|
||||
/**
|
||||
* Sent with Rich Presence-related chat embeds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -489,6 +510,13 @@ export interface APIMessage {
|
||||
thread?: APIChannel;
|
||||
/**
|
||||
* Sent if the message contains components like buttons, action rows, or other interactive components
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
components?: APIActionRowComponent<APIMessageActionRowComponent>[];
|
||||
/**
|
||||
@@ -504,6 +532,12 @@ export interface APIMessage {
|
||||
* @deprecated Use `sticker_items` instead
|
||||
*/
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
||||
*
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,11 +551,11 @@ export enum MessageType {
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
UserJoin,
|
||||
GuildBoost,
|
||||
GuildBoostTier1,
|
||||
GuildBoostTier2,
|
||||
GuildBoostTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
@@ -917,6 +951,10 @@ export interface APIEmbedVideo {
|
||||
* Source url of video
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A proxied url of the video
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of video
|
||||
*/
|
||||
@@ -1156,7 +1194,7 @@ export interface APIBaseComponent<T extends ComponentType> {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-types
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
|
||||
*/
|
||||
export enum ComponentType {
|
||||
/**
|
||||
|
||||
@@ -69,10 +69,6 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,10 +385,6 @@ export enum GuildFeature {
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
@@ -413,6 +405,8 @@ export enum GuildFeature {
|
||||
* Guild is a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
Hub = 'HUB',
|
||||
/**
|
||||
@@ -423,6 +417,8 @@ export enum GuildFeature {
|
||||
* Guild is in a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
LinkedToHub = 'LINKED_TO_HUB',
|
||||
/**
|
||||
@@ -773,7 +769,7 @@ export interface APIBan {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -785,7 +781,7 @@ export interface APIGuildWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -794,7 +790,7 @@ export interface APIGuildWidgetChannel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface APITeam {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/template
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild-template
|
||||
*/
|
||||
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -7,7 +7,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
* https://discord.com/developers/docs/resources/guild-template#guild-template-object
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
|
||||
@@ -143,8 +143,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,8 +178,10 @@ export interface APIConnection {
|
||||
name: string;
|
||||
/**
|
||||
* The service of the connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-services
|
||||
*/
|
||||
type: string;
|
||||
type: ConnectionService;
|
||||
/**
|
||||
* Whether the connection is revoked
|
||||
*/
|
||||
@@ -202,6 +212,24 @@ export interface APIConnection {
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionService {
|
||||
BattleNet = 'battlenet',
|
||||
EpicGames = 'epicgames',
|
||||
Facebook = 'facebook',
|
||||
GitHub = 'github',
|
||||
LeagueOfLegends = 'leagueoflegends',
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
SamsungGalaxy = 'samsunggalaxy',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
|
||||
@@ -15,7 +15,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -145,8 +145,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,20 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
min_length?: number;
|
||||
/**
|
||||
* For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
|
||||
*/
|
||||
max_length?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandStringOptionBase,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
@@ -27,7 +27,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
@@ -43,7 +43,7 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
|
||||
@@ -101,7 +101,7 @@ export enum ApplicationCommandType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface APIMessageInteraction {
|
||||
*/
|
||||
type: InteractionType;
|
||||
/**
|
||||
* The name of the ApplicationCommand
|
||||
* The name of the application command, including subcommands and subcommand groups
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
@@ -104,6 +104,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
|
||||
*/
|
||||
app_permissions?: Permissions;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#get-ticket
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIMessageInteraction } from './interactions.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker, APIStickerItem } from './sticker.ts';
|
||||
@@ -40,7 +39,6 @@ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel
|
||||
flags?: ChannelFlags;
|
||||
}
|
||||
|
||||
// TODO: update when text in voice is released
|
||||
export type TextChannelType =
|
||||
| ChannelType.DM
|
||||
| ChannelType.GroupDM
|
||||
@@ -49,7 +47,8 @@ export type TextChannelType =
|
||||
| ChannelType.GuildPrivateThread
|
||||
| ChannelType.GuildNewsThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum;
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice;
|
||||
|
||||
export type GuildChannelType = Exclude<
|
||||
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
|
||||
@@ -61,6 +60,16 @@ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBa
|
||||
* The id of the last message sent in this channel (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
@@ -112,23 +121,11 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
|
||||
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
|
||||
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
|
||||
|
||||
export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
|
||||
export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice channel
|
||||
*/
|
||||
@@ -143,6 +140,11 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildVoiceChannel
|
||||
extends APIVoiceChannelBase<ChannelType.GuildVoice>,
|
||||
APITextBasedChannel<ChannelType.GuildVoice> {
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -151,7 +153,9 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
video_quality_mode?: VideoQualityMode;
|
||||
}
|
||||
|
||||
interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
|
||||
export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
|
||||
|
||||
export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
|
||||
/**
|
||||
* The recipients of the DM
|
||||
*
|
||||
@@ -198,7 +202,9 @@ export interface APIThreadChannel
|
||||
*/
|
||||
thread_metadata?: APIThreadMetadata;
|
||||
/**
|
||||
* The approximate message count of the thread, does not count above 50 even if there are more messages
|
||||
* Number of messages (not including the initial message or deleted messages) in a thread
|
||||
*
|
||||
* If the thread was created before July 1, 2022, it stops counting at 50 messages
|
||||
*/
|
||||
message_count?: number;
|
||||
/**
|
||||
@@ -223,6 +229,12 @@ export interface APIThreadChannel
|
||||
* The id of the last message sent in this thread (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Number of messages ever sent in a thread
|
||||
*
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
}
|
||||
|
||||
export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
|
||||
@@ -235,7 +247,8 @@ export type APIChannel =
|
||||
| APIDMChannel
|
||||
| APITextChannel
|
||||
| APINewsChannel
|
||||
| APIVoiceChannel
|
||||
| APIGuildVoiceChannel
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APINewsChannel
|
||||
@@ -326,10 +339,6 @@ export interface APIMessage {
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The author of this message (only a valid user in the case where the message is generated by a user or bot user)
|
||||
*
|
||||
@@ -339,17 +348,14 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
author: APIUser;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Contents of the message
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
content: string;
|
||||
/**
|
||||
@@ -377,7 +383,7 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUser[];
|
||||
/**
|
||||
* Roles specifically mentioned in this message
|
||||
*
|
||||
@@ -400,12 +406,24 @@ export interface APIMessage {
|
||||
* Any attached files
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
attachments: APIAttachment[];
|
||||
/**
|
||||
* Any embedded content
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#embed-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
embeds: APIEmbed[];
|
||||
/**
|
||||
@@ -444,7 +462,7 @@ export interface APIMessage {
|
||||
/**
|
||||
* Sent with Rich Presence-related chat embeds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -489,6 +507,12 @@ export interface APIMessage {
|
||||
thread?: APIChannel;
|
||||
/**
|
||||
* Sent if the message contains components like buttons, action rows, or other interactive components
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
components?: APIActionRowComponent<APIMessageActionRowComponent>[];
|
||||
/**
|
||||
@@ -504,6 +528,12 @@ export interface APIMessage {
|
||||
* @deprecated Use `sticker_items` instead
|
||||
*/
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
||||
*
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,11 +547,11 @@ export enum MessageType {
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
UserJoin,
|
||||
GuildBoost,
|
||||
GuildBoostTier1,
|
||||
GuildBoostTier2,
|
||||
GuildBoostTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
@@ -921,6 +951,10 @@ export interface APIEmbedVideo {
|
||||
* Source url of video
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A proxied url of the video
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of video
|
||||
*/
|
||||
@@ -1160,7 +1194,7 @@ export interface APIBaseComponent<T extends ComponentType> {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-types
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
|
||||
*/
|
||||
export enum ComponentType {
|
||||
/**
|
||||
|
||||
@@ -69,10 +69,6 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,10 +385,6 @@ export enum GuildFeature {
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
@@ -413,6 +405,8 @@ export enum GuildFeature {
|
||||
* Guild is a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
Hub = 'HUB',
|
||||
/**
|
||||
@@ -423,6 +417,8 @@ export enum GuildFeature {
|
||||
* Guild is in a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
LinkedToHub = 'LINKED_TO_HUB',
|
||||
/**
|
||||
@@ -773,7 +769,7 @@ export interface APIBan {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -785,7 +781,7 @@ export interface APIGuildWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -794,7 +790,7 @@ export interface APIGuildWidgetChannel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface APITeam {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/template
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild-template
|
||||
*/
|
||||
|
||||
import type { APIUser } from './user.ts';
|
||||
@@ -7,7 +7,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v9/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
* https://discord.com/developers/docs/resources/guild-template#template-object
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
|
||||
@@ -143,8 +143,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,8 +178,10 @@ export interface APIConnection {
|
||||
name: string;
|
||||
/**
|
||||
* The service of the connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-services
|
||||
*/
|
||||
type: string;
|
||||
type: ConnectionService;
|
||||
/**
|
||||
* Whether the connection is revoked
|
||||
*/
|
||||
@@ -202,6 +212,24 @@ export interface APIConnection {
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionService {
|
||||
BattleNet = 'battlenet',
|
||||
EpicGames = 'epicgames',
|
||||
Facebook = 'facebook',
|
||||
GitHub = 'github',
|
||||
LeagueOfLegends = 'leagueoflegends',
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
SamsungGalaxy = 'samsunggalaxy',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
|
||||
@@ -70,6 +70,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
AnnouncementEditLimitExceeded = 20022,
|
||||
|
||||
UnderMinimumAge = 20024,
|
||||
|
||||
ChannelSendRateLimit = 20028,
|
||||
ServerSendRateLimit,
|
||||
|
||||
@@ -99,10 +101,10 @@ export enum RESTJSONErrorCodes {
|
||||
MaximumNumberOfServerCategoriesReached = 30030,
|
||||
|
||||
GuildAlreadyHasTemplate = 30031,
|
||||
|
||||
MaximumThreadParticipants = 30033,
|
||||
|
||||
MaximumNumberOfNonGuildMemberBansHasBeenExceeded = 30035,
|
||||
MaximumNumberOfApplicationCommandsReached,
|
||||
MaximumThreadParticipantsReached,
|
||||
MaximumDailyApplicationCommandCreatesReached,
|
||||
MaximumNumberOfNonGuildMemberBansHasBeenExceeded,
|
||||
|
||||
MaximumNumberOfBanFetchesHasBeenReached = 30037,
|
||||
MaximumNumberOfUncompletedGuildScheduledEventsReached,
|
||||
@@ -126,11 +128,15 @@ export enum RESTJSONErrorCodes {
|
||||
FeatureTemporarilyDisabledServerSide,
|
||||
UserBannedFromThisGuild,
|
||||
|
||||
ConnectionHasBeenRevoked = 40012,
|
||||
|
||||
TargetUserIsNotConnectedToVoice = 40032,
|
||||
ThisMessageWasAlreadyCrossposted,
|
||||
|
||||
ApplicationCommandWithThatNameAlreadyExists = 40041,
|
||||
|
||||
ApplicationInteractionFailedToSend = 40043,
|
||||
|
||||
InteractionHasAlreadyBeenAcknowledged = 40060,
|
||||
TagNamesMustBeUnique,
|
||||
|
||||
@@ -150,6 +156,7 @@ export enum RESTJSONErrorCodes {
|
||||
InvalidToken,
|
||||
NoteWasTooLong,
|
||||
ProvidedTooFewOrTooManyMessagesToDelete,
|
||||
InvalidMFALevel,
|
||||
|
||||
MessageCanOnlyBePinnedInTheChannelItWasSentIn = 50019,
|
||||
InviteCodeInvalidOrTaken,
|
||||
@@ -197,6 +204,12 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
RequestBodyContainsInvalidJSON = 50109,
|
||||
|
||||
OwnershipCannotBeMovedToABotUser = 50132,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50138,
|
||||
|
||||
UploadedFileNotFound = 50146,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50600,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60003,
|
||||
@@ -205,6 +218,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
ReactionWasBlocked = 90001,
|
||||
|
||||
ApplicationNotYetAvailable = 110001,
|
||||
|
||||
APIResourceOverloaded = 130000,
|
||||
|
||||
TheStageIsAlreadyOpen = 150006,
|
||||
@@ -227,6 +242,11 @@ export enum RESTJSONErrorCodes {
|
||||
CannotUpdateAFinishedEvent = 180000,
|
||||
|
||||
FailedToCreateStageNeededForStageEvent = 180002,
|
||||
|
||||
MessageWasBlockedByAutomaticModeration = 200000,
|
||||
TitleWasBlockedByAutomaticModeration,
|
||||
|
||||
WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
nsfw?: boolean | null;
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, news, voice
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
parent_id?: Snowflake | null;
|
||||
/**
|
||||
@@ -665,4 +665,9 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
|
||||
*/
|
||||
export type RESTGetAPIChannelUsersThreadsArchivedResult = APIThreadList;
|
||||
export interface RESTGetAPIChannelUsersThreadsArchivedResult extends APIThreadList {
|
||||
/**
|
||||
* Whether there are potentially additional threads
|
||||
*/
|
||||
has_more: boolean;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
@@ -158,6 +159,23 @@ export type RESTPostAPIGuildsJSONBody = AddUndefinedToPossiblyUndefinedPropertie
|
||||
*/
|
||||
export type RESTPostAPIGuildsResult = APIGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
/**
|
||||
* MFA level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
level: GuildMFALevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild
|
||||
*/
|
||||
@@ -339,7 +357,7 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = Array<
|
||||
export type RESTPatchAPIGuildChannelPositionsResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-threads
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-guild-threads
|
||||
*/
|
||||
export type RESTGetAPIGuildThreadsResult = APIThreadList;
|
||||
|
||||
|
||||
@@ -129,8 +129,10 @@ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationComma
|
||||
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
||||
*/
|
||||
export type RESTPutAPIApplicationGuildCommandsJSONBody = (
|
||||
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| (Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
| (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
)[];
|
||||
|
||||
/**
|
||||
|
||||
@@ -274,6 +274,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/${memberId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/guilds/{guild.id}/mfa`
|
||||
*/
|
||||
guildMFA(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/mfa` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/bans`
|
||||
@@ -836,6 +844,262 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/embed/avatars/{user.discriminator % 5}.png`
|
||||
*
|
||||
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
|
||||
return `/embed/avatars/${userDiscriminator}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/stickers/{sticker.id}.{png|json}`
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
|
||||
export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
*
|
||||
* Image size can be any power of two between 16 and 4096
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const RouteBases = {
|
||||
api: `https://discord.com/api/v${APIVersion}`,
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
|
||||
@@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
nsfw?: boolean | null;
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, news, voice
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
parent_id?: Snowflake | null;
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
@@ -158,6 +159,23 @@ export type RESTPostAPIGuildsJSONBody = AddUndefinedToPossiblyUndefinedPropertie
|
||||
*/
|
||||
export type RESTPostAPIGuildsResult = APIGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
/**
|
||||
* MFA level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
level: GuildMFALevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild
|
||||
*/
|
||||
@@ -339,7 +357,7 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = Array<
|
||||
export type RESTPatchAPIGuildChannelPositionsResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-threads
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-guild-threads
|
||||
*/
|
||||
export type RESTGetAPIGuildThreadsResult = Omit<APIThreadList, 'has_more'>;
|
||||
|
||||
|
||||
@@ -129,8 +129,10 @@ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationComma
|
||||
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
||||
*/
|
||||
export type RESTPutAPIApplicationGuildCommandsJSONBody = (
|
||||
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| (Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
| (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
)[];
|
||||
|
||||
/**
|
||||
|
||||
@@ -274,6 +274,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/${memberId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/guilds/{guild.id}/mfa`
|
||||
*/
|
||||
guildMFA(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/mfa` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/bans`
|
||||
@@ -845,6 +853,262 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/embed/avatars/{user.discriminator % 5}.png`
|
||||
*
|
||||
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
|
||||
return `/embed/avatars/${userDiscriminator}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/stickers/{sticker.id}.{png|json}`
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
|
||||
export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
*
|
||||
* Image size can be any power of two between 16 and 4096
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const RouteBases = {
|
||||
api: `https://discord.com/api/v${APIVersion}`,
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
|
||||
105
gateway/v10.ts
105
gateway/v10.ts
@@ -409,6 +409,10 @@ export interface GatewayReadyDispatchData {
|
||||
* Used for resuming connections
|
||||
*/
|
||||
session_id: string;
|
||||
/**
|
||||
* Gateway url for resuming connections
|
||||
*/
|
||||
resume_gateway_url: string;
|
||||
/**
|
||||
* The shard information associated with this session, if sent when identifying
|
||||
*
|
||||
@@ -533,6 +537,10 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
large: boolean;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
/**
|
||||
* Total number of members in this guild
|
||||
*
|
||||
@@ -817,11 +825,11 @@ export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
* The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
|
||||
*/
|
||||
chunk_index?: number;
|
||||
chunk_index: number;
|
||||
/**
|
||||
* The total number of expected chunks for this response
|
||||
*/
|
||||
chunk_count?: number;
|
||||
chunk_count: number;
|
||||
/**
|
||||
* If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
|
||||
*/
|
||||
@@ -1125,7 +1133,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = APIMessage;
|
||||
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
@@ -1138,10 +1146,43 @@ export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = {
|
||||
id: Snowflake;
|
||||
channel_id: Snowflake;
|
||||
} & Partial<APIMessage>;
|
||||
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
|
||||
GatewayMessageEventExtraFields & {
|
||||
/**
|
||||
* ID of the message
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
};
|
||||
|
||||
export interface GatewayMessageEventExtraFields {
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
@@ -1569,15 +1610,15 @@ export interface GatewayIdentifyProperties {
|
||||
/**
|
||||
* Your operating system
|
||||
*/
|
||||
$os: string;
|
||||
os: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$browser: string;
|
||||
browser: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$device: string;
|
||||
device: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1614,31 +1655,15 @@ export interface GatewayRequestGuildMembers {
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembersData {
|
||||
export interface GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* ID of the guild to get members for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
/**
|
||||
* Used to specify if we want the presences of the matched members
|
||||
*/
|
||||
presences?: boolean;
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids?: Snowflake | Snowflake[];
|
||||
/**
|
||||
* Nonce to identify the Guild Members Chunk response
|
||||
*
|
||||
@@ -1649,6 +1674,32 @@ export interface GatewayRequestGuildMembersData {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids: Snowflake | Snowflake[];
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export type GatewayRequestGuildMembersData =
|
||||
| GatewayRequestGuildMembersDataWithUserIds
|
||||
| GatewayRequestGuildMembersDataWithQuery;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
|
||||
105
gateway/v9.ts
105
gateway/v9.ts
@@ -408,6 +408,10 @@ export interface GatewayReadyDispatchData {
|
||||
* Used for resuming connections
|
||||
*/
|
||||
session_id: string;
|
||||
/**
|
||||
* Gateway url for resuming connections
|
||||
*/
|
||||
resume_gateway_url: string;
|
||||
/**
|
||||
* The shard information associated with this session, if sent when identifying
|
||||
*
|
||||
@@ -532,6 +536,10 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
large: boolean;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
/**
|
||||
* Total number of members in this guild
|
||||
*
|
||||
@@ -816,11 +824,11 @@ export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
* The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`)
|
||||
*/
|
||||
chunk_index?: number;
|
||||
chunk_index: number;
|
||||
/**
|
||||
* The total number of expected chunks for this response
|
||||
*/
|
||||
chunk_count?: number;
|
||||
chunk_count: number;
|
||||
/**
|
||||
* If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here
|
||||
*/
|
||||
@@ -1124,7 +1132,7 @@ export type GatewayMessageCreateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = APIMessage;
|
||||
export type GatewayMessageCreateDispatchData = Omit<APIMessage, 'mentions'> & GatewayMessageEventExtraFields;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
@@ -1137,10 +1145,43 @@ export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = {
|
||||
id: Snowflake;
|
||||
channel_id: Snowflake;
|
||||
} & Partial<APIMessage>;
|
||||
export type GatewayMessageUpdateDispatchData = Omit<Partial<APIMessage>, 'mentions'> &
|
||||
GatewayMessageEventExtraFields & {
|
||||
/**
|
||||
* ID of the message
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
};
|
||||
|
||||
export interface GatewayMessageEventExtraFields {
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
@@ -1568,15 +1609,15 @@ export interface GatewayIdentifyProperties {
|
||||
/**
|
||||
* Your operating system
|
||||
*/
|
||||
$os: string;
|
||||
os: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$browser: string;
|
||||
browser: string;
|
||||
/**
|
||||
* Your library name
|
||||
*/
|
||||
$device: string;
|
||||
device: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1613,31 +1654,15 @@ export interface GatewayRequestGuildMembers {
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembersData {
|
||||
export interface GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* ID of the guild to get members for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query?: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
/**
|
||||
* Used to specify if we want the presences of the matched members
|
||||
*/
|
||||
presences?: boolean;
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids?: Snowflake | Snowflake[];
|
||||
/**
|
||||
* Nonce to identify the Guild Members Chunk response
|
||||
*
|
||||
@@ -1648,6 +1673,32 @@ export interface GatewayRequestGuildMembersData {
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithUserIds extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* Used to specify which users you wish to fetch
|
||||
*/
|
||||
user_ids: Snowflake | Snowflake[];
|
||||
}
|
||||
|
||||
export interface GatewayRequestGuildMembersDataWithQuery extends GatewayRequestGuildMembersDataBase {
|
||||
/**
|
||||
* String that username starts with, or an empty string to return all members
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* Maximum number of members to send matching the `query`;
|
||||
* a limit of `0` can be used with an empty string `query` to return all members
|
||||
*/
|
||||
limit: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export type GatewayRequestGuildMembersData =
|
||||
| GatewayRequestGuildMembersDataWithUserIds
|
||||
| GatewayRequestGuildMembersDataWithQuery;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.33.5",
|
||||
"version": "0.37.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "discord-api-types",
|
||||
"version": "0.33.5",
|
||||
"version": "0.37.2",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/runtime-corejs3": "^7.18.0",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.33.5",
|
||||
"version": "0.37.2",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
"./globals": {
|
||||
"require": "./globals.js",
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,20 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
min_length?: number;
|
||||
/**
|
||||
* For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
|
||||
*/
|
||||
max_length?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandStringOptionBase,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
@@ -27,7 +27,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
@@ -43,7 +43,7 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
|
||||
@@ -101,7 +101,7 @@ export enum ApplicationCommandType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface APIMessageInteraction {
|
||||
*/
|
||||
type: InteractionType;
|
||||
/**
|
||||
* The name of the ApplicationCommand
|
||||
* The name of the application command, including subcommands and subcommand groups
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
@@ -104,6 +104,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
|
||||
*/
|
||||
app_permissions?: Permissions;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#get-ticket
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { APIMessageInteraction } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker, APIStickerItem } from './sticker';
|
||||
@@ -40,7 +39,6 @@ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel
|
||||
flags?: ChannelFlags;
|
||||
}
|
||||
|
||||
// TODO: update when text in voice is released
|
||||
export type TextChannelType =
|
||||
| ChannelType.DM
|
||||
| ChannelType.GroupDM
|
||||
@@ -49,7 +47,8 @@ export type TextChannelType =
|
||||
| ChannelType.GuildPrivateThread
|
||||
| ChannelType.GuildNewsThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum;
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice;
|
||||
|
||||
export type GuildChannelType = Exclude<
|
||||
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
|
||||
@@ -61,6 +60,16 @@ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBa
|
||||
* The id of the last message sent in this channel (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
@@ -112,23 +121,11 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
|
||||
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
|
||||
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
|
||||
|
||||
export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
|
||||
export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice channel
|
||||
*/
|
||||
@@ -143,6 +140,11 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildVoiceChannel
|
||||
extends APIVoiceChannelBase<ChannelType.GuildVoice>,
|
||||
APITextBasedChannel<ChannelType.GuildVoice> {
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -151,7 +153,9 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
video_quality_mode?: VideoQualityMode;
|
||||
}
|
||||
|
||||
interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
|
||||
export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
|
||||
|
||||
export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
|
||||
/**
|
||||
* The recipients of the DM
|
||||
*
|
||||
@@ -198,7 +202,9 @@ export interface APIThreadChannel
|
||||
*/
|
||||
thread_metadata?: APIThreadMetadata;
|
||||
/**
|
||||
* The approximate message count of the thread, does not count above 50 even if there are more messages
|
||||
* Number of messages (not including the initial message or deleted messages) in a thread
|
||||
*
|
||||
* If the thread was created before July 1, 2022, it stops counting at 50 messages
|
||||
*/
|
||||
message_count?: number;
|
||||
/**
|
||||
@@ -223,6 +229,12 @@ export interface APIThreadChannel
|
||||
* The id of the last message sent in this thread (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Number of messages ever sent in a thread
|
||||
*
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
}
|
||||
|
||||
export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
|
||||
@@ -235,7 +247,8 @@ export type APIChannel =
|
||||
| APIDMChannel
|
||||
| APITextChannel
|
||||
| APINewsChannel
|
||||
| APIVoiceChannel
|
||||
| APIGuildVoiceChannel
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APINewsChannel
|
||||
@@ -326,10 +339,6 @@ export interface APIMessage {
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The author of this message (only a valid user in the case where the message is generated by a user or bot user)
|
||||
*
|
||||
@@ -339,17 +348,15 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
author: APIUser;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Contents of the message
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
content: string;
|
||||
/**
|
||||
@@ -377,7 +384,7 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUser[];
|
||||
/**
|
||||
* Roles specifically mentioned in this message
|
||||
*
|
||||
@@ -400,12 +407,26 @@ export interface APIMessage {
|
||||
* Any attached files
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
attachments: APIAttachment[];
|
||||
/**
|
||||
* Any embedded content
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#embed-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
embeds: APIEmbed[];
|
||||
/**
|
||||
@@ -444,7 +465,7 @@ export interface APIMessage {
|
||||
/**
|
||||
* Sent with Rich Presence-related chat embeds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -489,6 +510,13 @@ export interface APIMessage {
|
||||
thread?: APIChannel;
|
||||
/**
|
||||
* Sent if the message contains components like buttons, action rows, or other interactive components
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**.
|
||||
* You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
components?: APIActionRowComponent<APIMessageActionRowComponent>[];
|
||||
/**
|
||||
@@ -504,6 +532,12 @@ export interface APIMessage {
|
||||
* @deprecated Use `sticker_items` instead
|
||||
*/
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
||||
*
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,11 +551,11 @@ export enum MessageType {
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
UserJoin,
|
||||
GuildBoost,
|
||||
GuildBoostTier1,
|
||||
GuildBoostTier2,
|
||||
GuildBoostTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
@@ -917,6 +951,10 @@ export interface APIEmbedVideo {
|
||||
* Source url of video
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A proxied url of the video
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of video
|
||||
*/
|
||||
@@ -1156,7 +1194,7 @@ export interface APIBaseComponent<T extends ComponentType> {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-types
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
|
||||
*/
|
||||
export enum ComponentType {
|
||||
/**
|
||||
|
||||
@@ -69,10 +69,6 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,10 +385,6 @@ export enum GuildFeature {
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
@@ -413,6 +405,8 @@ export enum GuildFeature {
|
||||
* Guild is a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
Hub = 'HUB',
|
||||
/**
|
||||
@@ -423,6 +417,8 @@ export enum GuildFeature {
|
||||
* Guild is in a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
LinkedToHub = 'LINKED_TO_HUB',
|
||||
/**
|
||||
@@ -773,7 +769,7 @@ export interface APIBan {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -785,7 +781,7 @@ export interface APIGuildWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -794,7 +790,7 @@ export interface APIGuildWidgetChannel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface APITeam {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/template
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild-template
|
||||
*/
|
||||
|
||||
import type { APIUser } from './user';
|
||||
@@ -7,7 +7,7 @@ import type { Snowflake } from '../../globals';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
* https://discord.com/developers/docs/resources/guild-template#guild-template-object
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
|
||||
@@ -143,8 +143,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,8 +178,10 @@ export interface APIConnection {
|
||||
name: string;
|
||||
/**
|
||||
* The service of the connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-services
|
||||
*/
|
||||
type: string;
|
||||
type: ConnectionService;
|
||||
/**
|
||||
* Whether the connection is revoked
|
||||
*/
|
||||
@@ -202,6 +212,24 @@ export interface APIConnection {
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionService {
|
||||
BattleNet = 'battlenet',
|
||||
EpicGames = 'epicgames',
|
||||
Facebook = 'facebook',
|
||||
GitHub = 'github',
|
||||
LeagueOfLegends = 'leagueoflegends',
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
SamsungGalaxy = 'samsunggalaxy',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
|
||||
@@ -15,7 +15,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -145,8 +145,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface APIApplicationCommandNumberOptionBase
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the maximum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,20 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
min_length?: number;
|
||||
/**
|
||||
* For option type `STRING`, the maximum allowed length (minimum of `1`, maximum of `6000`).
|
||||
*/
|
||||
max_length?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandStringOptionBase,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
@@ -27,7 +27,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
@@ -43,7 +43,7 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
|
||||
@@ -101,7 +101,7 @@ export enum ApplicationCommandType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface APIMessageInteraction {
|
||||
*/
|
||||
type: InteractionType;
|
||||
/**
|
||||
* The name of the ApplicationCommand
|
||||
* The name of the application command, including subcommands and subcommand groups
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
@@ -104,6 +104,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
|
||||
*/
|
||||
app_permissions?: Permissions;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#get-ticket
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import type { APIApplication } from './application';
|
||||
import type { APIPartialEmoji } from './emoji';
|
||||
import type { APIGuildMember } from './guild';
|
||||
import type { APIMessageInteraction } from './interactions';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker, APIStickerItem } from './sticker';
|
||||
@@ -40,7 +39,6 @@ export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel
|
||||
flags?: ChannelFlags;
|
||||
}
|
||||
|
||||
// TODO: update when text in voice is released
|
||||
export type TextChannelType =
|
||||
| ChannelType.DM
|
||||
| ChannelType.GroupDM
|
||||
@@ -49,7 +47,8 @@ export type TextChannelType =
|
||||
| ChannelType.GuildPrivateThread
|
||||
| ChannelType.GuildNewsThread
|
||||
| ChannelType.GuildText
|
||||
| ChannelType.GuildForum;
|
||||
| ChannelType.GuildForum
|
||||
| ChannelType.GuildVoice;
|
||||
|
||||
export type GuildChannelType = Exclude<
|
||||
TextChannelType | ChannelType.GuildVoice | ChannelType.GuildStageVoice | ChannelType.GuildNews,
|
||||
@@ -61,6 +60,16 @@ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBa
|
||||
* The id of the last message sent in this channel (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
@@ -112,23 +121,11 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
* For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value.
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
export type APITextChannel = APIGuildTextChannel<ChannelType.GuildText>;
|
||||
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
|
||||
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
|
||||
|
||||
export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
|
||||
export interface APIVoiceChannelBase<T extends ChannelType> extends APIGuildChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice channel
|
||||
*/
|
||||
@@ -143,6 +140,11 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region?: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildVoiceChannel
|
||||
extends APIVoiceChannelBase<ChannelType.GuildVoice>,
|
||||
APITextBasedChannel<ChannelType.GuildVoice> {
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -151,7 +153,9 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
video_quality_mode?: VideoQualityMode;
|
||||
}
|
||||
|
||||
interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
|
||||
export type APIGuildStageVoiceChannel = APIVoiceChannelBase<ChannelType.GuildStageVoice>;
|
||||
|
||||
export interface APIDMChannelBase<T extends ChannelType> extends Omit<APITextBasedChannel<T>, 'rate_limit_per_user'> {
|
||||
/**
|
||||
* The recipients of the DM
|
||||
*
|
||||
@@ -198,7 +202,9 @@ export interface APIThreadChannel
|
||||
*/
|
||||
thread_metadata?: APIThreadMetadata;
|
||||
/**
|
||||
* The approximate message count of the thread, does not count above 50 even if there are more messages
|
||||
* Number of messages (not including the initial message or deleted messages) in a thread
|
||||
*
|
||||
* If the thread was created before July 1, 2022, it stops counting at 50 messages
|
||||
*/
|
||||
message_count?: number;
|
||||
/**
|
||||
@@ -223,6 +229,12 @@ export interface APIThreadChannel
|
||||
* The id of the last message sent in this thread (may not point to an existing or valid message)
|
||||
*/
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Number of messages ever sent in a thread
|
||||
*
|
||||
* Similar to `message_count` on message creation, but won't decrement when a message is deleted
|
||||
*/
|
||||
total_message_sent?: number;
|
||||
}
|
||||
|
||||
export type APIGuildForumChannel = APIGuildTextChannel<ChannelType.GuildForum>;
|
||||
@@ -235,7 +247,8 @@ export type APIChannel =
|
||||
| APIDMChannel
|
||||
| APITextChannel
|
||||
| APINewsChannel
|
||||
| APIVoiceChannel
|
||||
| APIGuildVoiceChannel
|
||||
| APIGuildStageVoiceChannel
|
||||
| APIGuildCategoryChannel
|
||||
| APIThreadChannel
|
||||
| APINewsChannel
|
||||
@@ -326,10 +339,6 @@ export interface APIMessage {
|
||||
* ID of the channel the message was sent in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild the message was sent in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The author of this message (only a valid user in the case where the message is generated by a user or bot user)
|
||||
*
|
||||
@@ -339,17 +348,14 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
author: APIUser;
|
||||
/**
|
||||
* Member properties for this message's author
|
||||
*
|
||||
* The member object exists in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* Contents of the message
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
content: string;
|
||||
/**
|
||||
@@ -377,7 +383,7 @@ export interface APIMessage {
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUser[];
|
||||
/**
|
||||
* Roles specifically mentioned in this message
|
||||
*
|
||||
@@ -400,12 +406,24 @@ export interface APIMessage {
|
||||
* Any attached files
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#attachment-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
attachments: APIAttachment[];
|
||||
/**
|
||||
* Any embedded content
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#embed-object
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
embeds: APIEmbed[];
|
||||
/**
|
||||
@@ -444,7 +462,7 @@ export interface APIMessage {
|
||||
/**
|
||||
* Sent with Rich Presence-related chat embeds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -489,6 +507,12 @@ export interface APIMessage {
|
||||
thread?: APIChannel;
|
||||
/**
|
||||
* Sent if the message contains components like buttons, action rows, or other interactive components
|
||||
*
|
||||
* The `MESSAGE_CONTENT` privileged gateway intent will become required after **August 31, 2022** for verified applications to receive a non-empty value from this field
|
||||
*
|
||||
* In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot > Privileged Gateway Intents**
|
||||
*
|
||||
* See https://support-dev.discord.com/hc/en-us/articles/4404772028055
|
||||
*/
|
||||
components?: APIActionRowComponent<APIMessageActionRowComponent>[];
|
||||
/**
|
||||
@@ -504,6 +528,12 @@ export interface APIMessage {
|
||||
* @deprecated Use `sticker_items` instead
|
||||
*/
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
||||
*
|
||||
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
|
||||
*/
|
||||
position?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -517,11 +547,11 @@ export enum MessageType {
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
UserJoin,
|
||||
GuildBoost,
|
||||
GuildBoostTier1,
|
||||
GuildBoostTier2,
|
||||
GuildBoostTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
@@ -921,6 +951,10 @@ export interface APIEmbedVideo {
|
||||
* Source url of video
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A proxied url of the video
|
||||
*/
|
||||
proxy_url?: string;
|
||||
/**
|
||||
* Height of video
|
||||
*/
|
||||
@@ -1160,7 +1194,7 @@ export interface APIBaseComponent<T extends ComponentType> {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-types
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
|
||||
*/
|
||||
export enum ComponentType {
|
||||
/**
|
||||
|
||||
@@ -69,10 +69,6 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,10 +385,6 @@ export enum GuildFeature {
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
@@ -413,6 +405,8 @@ export enum GuildFeature {
|
||||
* Guild is a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
Hub = 'HUB',
|
||||
/**
|
||||
@@ -423,6 +417,8 @@ export enum GuildFeature {
|
||||
* Guild is in a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
LinkedToHub = 'LINKED_TO_HUB',
|
||||
/**
|
||||
@@ -773,7 +769,7 @@ export interface APIBan {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -785,7 +781,7 @@ export interface APIGuildWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -794,7 +790,7 @@ export interface APIGuildWidgetChannel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ export interface APIInvite {
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface APITeam {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/template
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild-template
|
||||
*/
|
||||
|
||||
import type { APIUser } from './user';
|
||||
@@ -7,7 +7,7 @@ import type { Snowflake } from '../../globals';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v9/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
* https://discord.com/developers/docs/resources/guild-template#template-object
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
|
||||
@@ -143,8 +143,16 @@ export enum UserFlags {
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
/**
|
||||
* User's account has been quarantined based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
Quarantined = Math.pow(2, 44),
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,8 +178,10 @@ export interface APIConnection {
|
||||
name: string;
|
||||
/**
|
||||
* The service of the connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-services
|
||||
*/
|
||||
type: string;
|
||||
type: ConnectionService;
|
||||
/**
|
||||
* Whether the connection is revoked
|
||||
*/
|
||||
@@ -202,6 +212,24 @@ export interface APIConnection {
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionService {
|
||||
BattleNet = 'battlenet',
|
||||
EpicGames = 'epicgames',
|
||||
Facebook = 'facebook',
|
||||
GitHub = 'github',
|
||||
LeagueOfLegends = 'leagueoflegends',
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
SamsungGalaxy = 'samsunggalaxy',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
Twitch = 'twitch',
|
||||
Twitter = 'twitter',
|
||||
Xbox = 'xbox',
|
||||
YouTube = 'youtube',
|
||||
}
|
||||
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
|
||||
@@ -70,6 +70,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
AnnouncementEditLimitExceeded = 20022,
|
||||
|
||||
UnderMinimumAge = 20024,
|
||||
|
||||
ChannelSendRateLimit = 20028,
|
||||
ServerSendRateLimit,
|
||||
|
||||
@@ -99,10 +101,10 @@ export enum RESTJSONErrorCodes {
|
||||
MaximumNumberOfServerCategoriesReached = 30030,
|
||||
|
||||
GuildAlreadyHasTemplate = 30031,
|
||||
|
||||
MaximumThreadParticipants = 30033,
|
||||
|
||||
MaximumNumberOfNonGuildMemberBansHasBeenExceeded = 30035,
|
||||
MaximumNumberOfApplicationCommandsReached,
|
||||
MaximumThreadParticipantsReached,
|
||||
MaximumDailyApplicationCommandCreatesReached,
|
||||
MaximumNumberOfNonGuildMemberBansHasBeenExceeded,
|
||||
|
||||
MaximumNumberOfBanFetchesHasBeenReached = 30037,
|
||||
MaximumNumberOfUncompletedGuildScheduledEventsReached,
|
||||
@@ -126,11 +128,15 @@ export enum RESTJSONErrorCodes {
|
||||
FeatureTemporarilyDisabledServerSide,
|
||||
UserBannedFromThisGuild,
|
||||
|
||||
ConnectionHasBeenRevoked = 40012,
|
||||
|
||||
TargetUserIsNotConnectedToVoice = 40032,
|
||||
ThisMessageWasAlreadyCrossposted,
|
||||
|
||||
ApplicationCommandWithThatNameAlreadyExists = 40041,
|
||||
|
||||
ApplicationInteractionFailedToSend = 40043,
|
||||
|
||||
InteractionHasAlreadyBeenAcknowledged = 40060,
|
||||
TagNamesMustBeUnique,
|
||||
|
||||
@@ -150,6 +156,7 @@ export enum RESTJSONErrorCodes {
|
||||
InvalidToken,
|
||||
NoteWasTooLong,
|
||||
ProvidedTooFewOrTooManyMessagesToDelete,
|
||||
InvalidMFALevel,
|
||||
|
||||
MessageCanOnlyBePinnedInTheChannelItWasSentIn = 50019,
|
||||
InviteCodeInvalidOrTaken,
|
||||
@@ -197,6 +204,12 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
RequestBodyContainsInvalidJSON = 50109,
|
||||
|
||||
OwnershipCannotBeMovedToABotUser = 50132,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50138,
|
||||
|
||||
UploadedFileNotFound = 50146,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50600,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60003,
|
||||
@@ -205,6 +218,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
ReactionWasBlocked = 90001,
|
||||
|
||||
ApplicationNotYetAvailable = 110001,
|
||||
|
||||
APIResourceOverloaded = 130000,
|
||||
|
||||
TheStageIsAlreadyOpen = 150006,
|
||||
@@ -227,6 +242,11 @@ export enum RESTJSONErrorCodes {
|
||||
CannotUpdateAFinishedEvent = 180000,
|
||||
|
||||
FailedToCreateStageNeededForStageEvent = 180002,
|
||||
|
||||
MessageWasBlockedByAutomaticModeration = 200000,
|
||||
TitleWasBlockedByAutomaticModeration,
|
||||
|
||||
WebhooksCanOnlyCreateThreadsInForumChannels = 220003,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
nsfw?: boolean | null;
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, news, voice
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
parent_id?: Snowflake | null;
|
||||
/**
|
||||
@@ -665,4 +665,9 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
|
||||
*/
|
||||
export type RESTGetAPIChannelUsersThreadsArchivedResult = APIThreadList;
|
||||
export interface RESTGetAPIChannelUsersThreadsArchivedResult extends APIThreadList {
|
||||
/**
|
||||
* Whether there are potentially additional threads
|
||||
*/
|
||||
has_more: boolean;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
@@ -158,6 +159,23 @@ export type RESTPostAPIGuildsJSONBody = AddUndefinedToPossiblyUndefinedPropertie
|
||||
*/
|
||||
export type RESTPostAPIGuildsResult = APIGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
/**
|
||||
* MFA level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
level: GuildMFALevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild
|
||||
*/
|
||||
@@ -339,7 +357,7 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = Array<
|
||||
export type RESTPatchAPIGuildChannelPositionsResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-threads
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-guild-threads
|
||||
*/
|
||||
export type RESTGetAPIGuildThreadsResult = APIThreadList;
|
||||
|
||||
|
||||
@@ -274,6 +274,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/${memberId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/guilds/{guild.id}/mfa`
|
||||
*/
|
||||
guildMFA(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/mfa` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/bans`
|
||||
@@ -836,6 +844,262 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/embed/avatars/{user.discriminator % 5}.png`
|
||||
*
|
||||
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
|
||||
return `/embed/avatars/${userDiscriminator}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/stickers/{sticker.id}.{png|json}`
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
|
||||
export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
*
|
||||
* Image size can be any power of two between 16 and 4096
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const RouteBases = {
|
||||
api: `https://discord.com/api/v${APIVersion}`,
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
|
||||
@@ -129,8 +129,10 @@ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationComma
|
||||
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
||||
*/
|
||||
export type RESTPutAPIApplicationGuildCommandsJSONBody = (
|
||||
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| (Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
| (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
)[];
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* Whether the channel is nsfw
|
||||
*
|
||||
* Channel types: text, news
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
nsfw?: boolean | null;
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ export type RESTPatchAPIChannelJSONBody = AddUndefinedToPossiblyUndefinedPropert
|
||||
/**
|
||||
* ID of the new parent category for a channel
|
||||
*
|
||||
* Channel types: text, news, voice
|
||||
* Channel types: text, voice, news
|
||||
*/
|
||||
parent_id?: Snowflake | null;
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
@@ -158,6 +159,23 @@ export type RESTPostAPIGuildsJSONBody = AddUndefinedToPossiblyUndefinedPropertie
|
||||
*/
|
||||
export type RESTPostAPIGuildsResult = APIGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
/**
|
||||
* MFA level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
level: GuildMFALevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
|
||||
*/
|
||||
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild
|
||||
*/
|
||||
@@ -339,7 +357,7 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = Array<
|
||||
export type RESTPatchAPIGuildChannelPositionsResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-threads
|
||||
* https://discord.com/developers/docs/resources/guild#list-active-guild-threads
|
||||
*/
|
||||
export type RESTGetAPIGuildThreadsResult = Omit<APIThreadList, 'has_more'>;
|
||||
|
||||
|
||||
264
rest/v9/index.ts
264
rest/v9/index.ts
@@ -274,6 +274,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/members/${memberId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/guilds/{guild.id}/mfa`
|
||||
*/
|
||||
guildMFA(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/mfa` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/bans`
|
||||
@@ -845,6 +853,262 @@ export const Routes = {
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
|
||||
export const CDNRoutes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/emojis/{emoji.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
emoji(emojiId: Snowflake, format: EmojiFormat) {
|
||||
return `/emojis/${emojiId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/splashes/{guild.id}/{guild.splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
|
||||
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/discovery-splashes/{guild.id}/{guild.discovery_splash}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
|
||||
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{guild.id}/{guild.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
|
||||
return `/banners/${guildId}/${guildBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/banners/{user.id}/{user.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
|
||||
return `/banners/${userId}/${userBanner}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/embed/avatars/{user.discriminator % 5}.png`
|
||||
*
|
||||
* The `userDiscriminator` parameter should be the user discriminator modulo 5 (e.g. 1337 % 5 = 2)
|
||||
*
|
||||
* This route supports the extension: PNG
|
||||
*/
|
||||
defaultUserAvatar(userDiscriminator: DefaultUserAvatarAssets) {
|
||||
return `/embed/avatars/${userDiscriminator}.png` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/avatars/{user.id}/{user.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
|
||||
return `/avatars/${userId}/${userAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.cover_image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-icons/{application.id}/{application.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
|
||||
return `/app-icons/${applicationId}/${applicationAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/{application.id}/achievements/{achievement.id}/icons/{achievement.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
achievementIcon(
|
||||
applicationId: Snowflake,
|
||||
achievementId: Snowflake,
|
||||
achievementIconHash: string,
|
||||
format: AchievementIconFormat,
|
||||
) {
|
||||
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/app-assets/710982414301790216/store/{sticker_pack.banner.asset_id}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
|
||||
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
|
||||
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/stickers/{sticker.id}.{png|json}`
|
||||
*
|
||||
* This route supports the extensions: PNG, Lottie
|
||||
*/
|
||||
sticker(stickerId: Snowflake, format: StickerFormat) {
|
||||
return `/stickers/${stickerId}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/role-icons/{role.id}/{role.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
|
||||
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guild-events/{guild_scheduled_event.id}/{guild_scheduled_event.image}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
guildScheduledEventCover(
|
||||
guildScheduledEventId: Snowflake,
|
||||
guildScheduledEventCoverImage: string,
|
||||
format: GuildScheduledEventCoverFormat,
|
||||
) {
|
||||
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/users/${user.id}/banners/${guild_member.banner}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
|
||||
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
|
||||
export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie>;
|
||||
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
|
||||
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
||||
|
||||
export enum ImageFormat {
|
||||
JPEG = 'jpeg',
|
||||
PNG = 'png',
|
||||
WebP = 'webp',
|
||||
GIF = 'gif',
|
||||
Lottie = 'json',
|
||||
}
|
||||
|
||||
export interface CDNQuery {
|
||||
/**
|
||||
* The returned image can have the size changed by using this query parameter
|
||||
*
|
||||
* Image size can be any power of two between 16 and 4096
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export const RouteBases = {
|
||||
api: `https://discord.com/api/v${APIVersion}`,
|
||||
cdn: 'https://cdn.discordapp.com',
|
||||
|
||||
@@ -129,8 +129,10 @@ export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationComma
|
||||
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
||||
*/
|
||||
export type RESTPutAPIApplicationGuildCommandsJSONBody = (
|
||||
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>
|
||||
| (Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
| (Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'> &
|
||||
Pick<Partial<APIApplicationCommand>, 'id'>)
|
||||
)[];
|
||||
|
||||
/**
|
||||
|
||||
2
website/.npmrc
Normal file
2
website/.npmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# REMOVE ME ONCE NEXT BETA OF DOCUSAURUS IS OUT
|
||||
force=true
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
_Code is forked from the Sapphire Community's Website under the MIT license_
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/website/LICENSE.md)
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/website/LICENSE.md)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -24,4 +24,4 @@ version of the documentation, as well as being able to preview builds internally
|
||||
|
||||
[][vercel]
|
||||
|
||||
[vercel]: https://vercel.com?utm_source=sapphiredev&utm_campaign=oss
|
||||
[vercel]: https://vercel.com?utm_source=discordjs&utm_campaign=oss
|
||||
|
||||
@@ -18,8 +18,8 @@ We recommend you contribute either through locally editing the files on your des
|
||||
|
||||
:::info Still can't figure it out?
|
||||
|
||||
No problem! We await you with open hands in our [`Discord Server`](https://discord.gg/djs) in the `#discord-api-types`
|
||||
channel (under the `Miscellaneous` category)
|
||||
No problem! We await you with open hands in our [`Discord Server`](https://discord.gg/djs) in the `#developing-djs`
|
||||
channel.
|
||||
|
||||
:::
|
||||
|
||||
@@ -162,7 +162,7 @@ normal name (for instance `UserFlags`).
|
||||
#### `rest`
|
||||
|
||||
This folder holds all the types that are related to Discord's REST API. Just like [`payloads`](#payloads), it is split
|
||||
into folders that have an `index.ts` file. from the structure in [`Discord's API Documentation`](https://discord.dev),
|
||||
into folders that have an `index.ts` file, from the structure in [`Discord's API Documentation`](https://discord.dev),
|
||||
under the `Resources` category.
|
||||
|
||||
:::info
|
||||
@@ -170,7 +170,7 @@ under the `Resources` category.
|
||||
Types created here must start with the `REST` prefix (for instance `RESTGetAPIUserResult`) unless they are objects or
|
||||
enums (for instance `Routes`).
|
||||
|
||||
They must also follow the following structure: `REST{http_method}{type_name}{Query|(JSON|FormData)|Result}`, where:
|
||||
They must also follow the following structure: `REST{http_method}{type_name}{Query|(JSON|FormData)Body|Result}`, where:
|
||||
|
||||
- `http_method` is the PascalCase HTTP method name (for instance `Get`, `Post`, and so on)
|
||||
- `type_name` is the actual name of the type it returns (for instance `APIUser`)
|
||||
|
||||
@@ -102,7 +102,8 @@ const config = {
|
||||
customCss: [
|
||||
require.resolve('./src/css/custom.scss'),
|
||||
require.resolve('./src/css/tippy-discord.css'),
|
||||
require.resolve('./src/css/discordjs.scss')
|
||||
require.resolve('./src/css/discordjs.scss'),
|
||||
require.resolve('./src/css/font.scss')
|
||||
]
|
||||
}
|
||||
})
|
||||
@@ -166,6 +167,9 @@ const config = {
|
||||
{ property: 'og:url', content: BaseUrl }
|
||||
],
|
||||
navbar: {
|
||||
logo: {
|
||||
src: '/svgs/mini_logo.svg'
|
||||
},
|
||||
items: [
|
||||
{
|
||||
to: '/',
|
||||
@@ -207,7 +211,7 @@ const config = {
|
||||
logo: {
|
||||
alt: 'Powered By Vercel',
|
||||
src: '/powered-by-vercel.svg',
|
||||
href: 'https://vercel.com/?utm_source=sapphiredev&utm_campaign=oss'
|
||||
href: 'https://vercel.com/?utm_source=discordjs&utm_campaign=oss'
|
||||
},
|
||||
links: [
|
||||
{
|
||||
@@ -248,13 +252,13 @@ const config = {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
additionalLanguages: ['powershell', 'batch']
|
||||
},
|
||||
algolia: {
|
||||
appId: 'TR1O0DBFL9',
|
||||
apiKey: '6822440beca69053ab122881d75064dc',
|
||||
indexName: 'discord-api-types',
|
||||
contextualSearch: false
|
||||
}
|
||||
// algolia: {
|
||||
// appId: 'TO_BE_DONE',
|
||||
// apiKey: 'TO_BE_DONE',
|
||||
// indexName: 'TO_BE_DONE',
|
||||
// contextualSearch: false
|
||||
// }
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
256
website/package-lock.json
generated
256
website/package-lock.json
generated
@@ -9,10 +9,10 @@
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "0.0.0-5101",
|
||||
"@docusaurus/plugin-pwa": "0.0.0-5101",
|
||||
"@docusaurus/preset-classic": "0.0.0-5101",
|
||||
"@docusaurus/theme-search-algolia": "0.0.0-5101",
|
||||
"@docusaurus/core": "canary",
|
||||
"@docusaurus/plugin-pwa": "canary",
|
||||
"@docusaurus/preset-classic": "canary",
|
||||
"@docusaurus/theme-search-algolia": "canary",
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@sapphire/docusaurus-plugin-npm2yarn2pnpm": "^1.1.0",
|
||||
@@ -25,24 +25,24 @@
|
||||
"prism-react-renderer": "^1.3.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"sass": "^1.52.2",
|
||||
"sass": "^1.52.3",
|
||||
"swr": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.0.2",
|
||||
"@commitlint/config-conventional": "^17.0.2",
|
||||
"@docusaurus/module-type-aliases": "0.0.0-5101",
|
||||
"@docusaurus/module-type-aliases": "canary",
|
||||
"@sapphire/prettier-config": "^1.4.3",
|
||||
"@sapphire/ts-config": "^3.3.4",
|
||||
"@types/node": "^17.0.40",
|
||||
"@types/node": "^17.0.42",
|
||||
"@types/react": "^18.0.12",
|
||||
"@types/react-dom": "^18.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
||||
"@typescript-eslint/parser": "^5.27.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
||||
"@typescript-eslint/parser": "^5.27.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.17.0",
|
||||
"lint-staged": "^13.0.0",
|
||||
"lint-staged": "^13.0.1",
|
||||
"markdownlint": "^0.25.1",
|
||||
"markdownlint-cli2": "^0.4.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
@@ -5309,9 +5309,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "17.0.40",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.40.tgz",
|
||||
"integrity": "sha512-UXdBxNGqTMtm7hCwh9HtncFVLrXoqA3oJW30j6XWp5BH/wu3mVeaxo7cq5benFdBw34HB3XDT2TRPI7rXZ+mDg=="
|
||||
"version": "17.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.42.tgz",
|
||||
"integrity": "sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ=="
|
||||
},
|
||||
"node_modules/@types/normalize-package-data": {
|
||||
"version": "2.4.1",
|
||||
@@ -5462,14 +5462,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz",
|
||||
"integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz",
|
||||
"integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/type-utils": "5.27.0",
|
||||
"@typescript-eslint/utils": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/type-utils": "5.27.1",
|
||||
"@typescript-eslint/utils": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"ignore": "^5.2.0",
|
||||
@@ -5495,14 +5495,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz",
|
||||
"integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz",
|
||||
"integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/typescript-estree": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/typescript-estree": "5.27.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -5522,13 +5522,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz",
|
||||
"integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz",
|
||||
"integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/visitor-keys": "5.27.0"
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/visitor-keys": "5.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -5539,12 +5539,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz",
|
||||
"integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz",
|
||||
"integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "5.27.0",
|
||||
"@typescript-eslint/utils": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
@@ -5565,9 +5565,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz",
|
||||
"integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz",
|
||||
"integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -5578,13 +5578,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz",
|
||||
"integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz",
|
||||
"integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/visitor-keys": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/visitor-keys": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -5605,15 +5605,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz",
|
||||
"integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz",
|
||||
"integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/typescript-estree": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/typescript-estree": "5.27.1",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
},
|
||||
@@ -5629,12 +5629,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz",
|
||||
"integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz",
|
||||
"integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -6982,9 +6982,9 @@
|
||||
"integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ=="
|
||||
},
|
||||
"node_modules/colorette": {
|
||||
"version": "2.0.16",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
|
||||
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
|
||||
"version": "2.0.17",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.17.tgz",
|
||||
"integrity": "sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g=="
|
||||
},
|
||||
"node_modules/combine-promises": {
|
||||
"version": "1.1.0",
|
||||
@@ -11536,13 +11536,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lint-staged": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.0.tgz",
|
||||
"integrity": "sha512-vWban5utFt78VZohbosUxNIa46KKJ+KOQTDWTQ8oSl1DLEEVl9zhUtaQbiiydAmx+h2wKJK2d0+iMaRmknuWRQ==",
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.1.tgz",
|
||||
"integrity": "sha512-Ykaf4QTi0a02BF7cnq7JIPGOJxH4TkNMWhSlJdH9wOekd0X+gog47Jfh/0L31DqZe5AiydLGC7LkPqpaNm+Kvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cli-truncate": "^3.1.0",
|
||||
"colorette": "^2.0.16",
|
||||
"colorette": "^2.0.17",
|
||||
"commander": "^9.3.0",
|
||||
"debug": "^4.3.4",
|
||||
"execa": "^6.1.0",
|
||||
@@ -11551,7 +11551,7 @@
|
||||
"micromatch": "^4.0.5",
|
||||
"normalize-path": "^3.0.0",
|
||||
"object-inspect": "^1.12.2",
|
||||
"pidtree": "^0.5.0",
|
||||
"pidtree": "^0.6.0",
|
||||
"string-argv": "^0.3.1",
|
||||
"yaml": "^2.1.1"
|
||||
},
|
||||
@@ -13479,9 +13479,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pidtree": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz",
|
||||
"integrity": "sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==",
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz",
|
||||
"integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"pidtree": "bin/pidtree.js"
|
||||
@@ -15939,9 +15939,9 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.52.2",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.52.2.tgz",
|
||||
"integrity": "sha512-mfHB2VSeFS7sZlPv9YohB9GB7yWIgQNTGniQwfQ04EoQN0wsQEv7SwpCwy/x48Af+Z3vDeFXz+iuXM3HK/phZQ==",
|
||||
"version": "1.52.3",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.52.3.tgz",
|
||||
"integrity": "sha512-LNNPJ9lafx+j1ArtA7GyEJm9eawXN8KlA1+5dF6IZyoONg1Tyo/g+muOsENWJH/2Q1FHbbV4UwliU0cXMa/VIA==",
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
@@ -17013,9 +17013,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.14.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz",
|
||||
"integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==",
|
||||
"version": "5.14.2",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
|
||||
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.2",
|
||||
"acorn": "^8.5.0",
|
||||
@@ -23002,9 +23002,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "17.0.40",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.40.tgz",
|
||||
"integrity": "sha512-UXdBxNGqTMtm7hCwh9HtncFVLrXoqA3oJW30j6XWp5BH/wu3mVeaxo7cq5benFdBw34HB3XDT2TRPI7rXZ+mDg=="
|
||||
"version": "17.0.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.42.tgz",
|
||||
"integrity": "sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ=="
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
"version": "2.4.1",
|
||||
@@ -23155,14 +23155,14 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz",
|
||||
"integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz",
|
||||
"integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/type-utils": "5.27.0",
|
||||
"@typescript-eslint/utils": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/type-utils": "5.27.1",
|
||||
"@typescript-eslint/utils": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"ignore": "^5.2.0",
|
||||
@@ -23172,52 +23172,52 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz",
|
||||
"integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz",
|
||||
"integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/typescript-estree": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/typescript-estree": "5.27.1",
|
||||
"debug": "^4.3.4"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz",
|
||||
"integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz",
|
||||
"integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/visitor-keys": "5.27.0"
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/visitor-keys": "5.27.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/type-utils": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz",
|
||||
"integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz",
|
||||
"integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/utils": "5.27.0",
|
||||
"@typescript-eslint/utils": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz",
|
||||
"integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz",
|
||||
"integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz",
|
||||
"integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz",
|
||||
"integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/visitor-keys": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/visitor-keys": "5.27.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -23226,26 +23226,26 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz",
|
||||
"integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz",
|
||||
"integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/typescript-estree": "5.27.0",
|
||||
"@typescript-eslint/scope-manager": "5.27.1",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"@typescript-eslint/typescript-estree": "5.27.1",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz",
|
||||
"integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==",
|
||||
"version": "5.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz",
|
||||
"integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.27.0",
|
||||
"@typescript-eslint/types": "5.27.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
@@ -24263,9 +24263,9 @@
|
||||
"integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ=="
|
||||
},
|
||||
"colorette": {
|
||||
"version": "2.0.16",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
|
||||
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
|
||||
"version": "2.0.17",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.17.tgz",
|
||||
"integrity": "sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g=="
|
||||
},
|
||||
"combine-promises": {
|
||||
"version": "1.1.0",
|
||||
@@ -27564,13 +27564,13 @@
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.0.tgz",
|
||||
"integrity": "sha512-vWban5utFt78VZohbosUxNIa46KKJ+KOQTDWTQ8oSl1DLEEVl9zhUtaQbiiydAmx+h2wKJK2d0+iMaRmknuWRQ==",
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.1.tgz",
|
||||
"integrity": "sha512-Ykaf4QTi0a02BF7cnq7JIPGOJxH4TkNMWhSlJdH9wOekd0X+gog47Jfh/0L31DqZe5AiydLGC7LkPqpaNm+Kvg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cli-truncate": "^3.1.0",
|
||||
"colorette": "^2.0.16",
|
||||
"colorette": "^2.0.17",
|
||||
"commander": "^9.3.0",
|
||||
"debug": "^4.3.4",
|
||||
"execa": "^6.1.0",
|
||||
@@ -27579,7 +27579,7 @@
|
||||
"micromatch": "^4.0.5",
|
||||
"normalize-path": "^3.0.0",
|
||||
"object-inspect": "^1.12.2",
|
||||
"pidtree": "^0.5.0",
|
||||
"pidtree": "^0.6.0",
|
||||
"string-argv": "^0.3.1",
|
||||
"yaml": "^2.1.1"
|
||||
},
|
||||
@@ -28961,9 +28961,9 @@
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
|
||||
},
|
||||
"pidtree": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz",
|
||||
"integrity": "sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==",
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz",
|
||||
"integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==",
|
||||
"dev": true
|
||||
},
|
||||
"pify": {
|
||||
@@ -30725,9 +30725,9 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.52.2",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.52.2.tgz",
|
||||
"integrity": "sha512-mfHB2VSeFS7sZlPv9YohB9GB7yWIgQNTGniQwfQ04EoQN0wsQEv7SwpCwy/x48Af+Z3vDeFXz+iuXM3HK/phZQ==",
|
||||
"version": "1.52.3",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.52.3.tgz",
|
||||
"integrity": "sha512-LNNPJ9lafx+j1ArtA7GyEJm9eawXN8KlA1+5dF6IZyoONg1Tyo/g+muOsENWJH/2Q1FHbbV4UwliU0cXMa/VIA==",
|
||||
"requires": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
@@ -31532,9 +31532,9 @@
|
||||
}
|
||||
},
|
||||
"terser": {
|
||||
"version": "5.14.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz",
|
||||
"integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==",
|
||||
"version": "5.14.2",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
|
||||
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
|
||||
"requires": {
|
||||
"@jridgewell/source-map": "^0.3.2",
|
||||
"acorn": "^8.5.0",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "npm run clean && docusaurus start",
|
||||
"build": "npm run clean && cross-env DOCUSAURUS_SSR_CONCURRENCY=2 NODE_OPTIONS=\"--max_old_space_size=7000\" docusaurus build",
|
||||
"build": "npm run clean && cross-env DOCUSAURUS_SSR_CONCURRENCY=2 NODE_OPTIONS=\"--max_old_space_size=7500\" docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
@@ -27,10 +27,10 @@
|
||||
"vercel-build": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "0.0.0-5101",
|
||||
"@docusaurus/plugin-pwa": "0.0.0-5101",
|
||||
"@docusaurus/preset-classic": "0.0.0-5101",
|
||||
"@docusaurus/theme-search-algolia": "0.0.0-5101",
|
||||
"@docusaurus/core": "canary",
|
||||
"@docusaurus/plugin-pwa": "canary",
|
||||
"@docusaurus/preset-classic": "canary",
|
||||
"@docusaurus/theme-search-algolia": "canary",
|
||||
"@heroicons/react": "^1.0.6",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"@sapphire/docusaurus-plugin-npm2yarn2pnpm": "^1.1.0",
|
||||
@@ -43,24 +43,24 @@
|
||||
"prism-react-renderer": "^1.3.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"sass": "^1.52.2",
|
||||
"sass": "^1.52.3",
|
||||
"swr": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.0.2",
|
||||
"@commitlint/config-conventional": "^17.0.2",
|
||||
"@docusaurus/module-type-aliases": "0.0.0-5101",
|
||||
"@docusaurus/module-type-aliases": "canary",
|
||||
"@sapphire/prettier-config": "^1.4.3",
|
||||
"@sapphire/ts-config": "^3.3.4",
|
||||
"@types/node": "^17.0.40",
|
||||
"@types/node": "^17.0.42",
|
||||
"@types/react": "^18.0.12",
|
||||
"@types/react-dom": "^18.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
||||
"@typescript-eslint/parser": "^5.27.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
||||
"@typescript-eslint/parser": "^5.27.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.17.0",
|
||||
"lint-staged": "^13.0.0",
|
||||
"lint-staged": "^13.0.1",
|
||||
"markdownlint": "^0.25.1",
|
||||
"markdownlint-cli2": "^0.4.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
|
||||
@@ -12,7 +12,6 @@ const HeadTags: FC = () => (
|
||||
<link rel="canonical" href="https://discord-api-types.dev" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png" />
|
||||
<link rel="icon" type="image/png" sizes="194x194" href="/android-chrome-194x194.png" />
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-top: -4rem;
|
||||
margin-bottom: -4rem;
|
||||
max-height: 24rem;
|
||||
margin-bottom: 2rem;
|
||||
max-height: 12rem;
|
||||
}
|
||||
|
||||
.fontSemiTitle {
|
||||
@@ -22,11 +21,6 @@
|
||||
}
|
||||
|
||||
@media screen and (max-width: 966px) {
|
||||
.logo {
|
||||
padding-top: 4rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
|
||||
.fontSemiTitle {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
@@ -74,15 +74,13 @@ footer > .container {
|
||||
}
|
||||
|
||||
.markdown__logo {
|
||||
margin-top: -8rem;
|
||||
margin-bottom: -8rem;
|
||||
max-height: 12rem;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 966px) {
|
||||
.markdown__logo {
|
||||
padding-top: 6rem;
|
||||
padding-bottom: 6rem;
|
||||
}
|
||||
.navbar__logo {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navbar__logo > img {
|
||||
@@ -114,7 +112,8 @@ footer > .container {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
.navbar__item {
|
||||
.navbar__item,
|
||||
.navbar__brand {
|
||||
margin-right: 2rem;
|
||||
font-size: 14px;
|
||||
height: 100%;
|
||||
@@ -122,7 +121,8 @@ footer > .container {
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.navbar__item:hover {
|
||||
.navbar__item:hover,
|
||||
.navbar__brand:hover {
|
||||
background-color: rgba($color: #000000, $alpha: 0.3);
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
1
website/src/css/font.scss
Normal file
1
website/src/css/font.scss
Normal file
@@ -0,0 +1 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user