Compare commits

...

37 Commits

Author SHA1 Message Date
github-actions[bot]
04ee6ac7f1 chore(release): 0.38.2 🎉 (#1229)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-01 15:28:01 +03:00
Jiralite
f5f850eb10 docs: update privilege intents link (#1227) 2025-04-28 17:19:09 +03:00
Vlad Frangu
771745c424 chore(release): 0.38.1 🎉 2025-04-22 11:37:43 +03:00
Vlad Frangu
d3ef6c9fd8 chore: cannot be a release without a .1 2025-04-22 11:34:25 +03:00
github-actions[bot]
a50d6f4fd3 chore(release): 0.38.0 🎉 (#1223)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-04-22 11:23:45 +03:00
Vlad Frangu
a2c1eccc68 chore: mark as breaking
BREAKING CHANGE: Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow
2025-04-22 11:16:29 +03:00
Danial Raza
ebd9814412 refactor(ImageSize): allow other sizes (#1221) 2025-04-22 02:11:59 +03:00
Andrew
527ac2fe0f feat(CDNQuery)!: add ImageSize type (#1098)
Co-authored-by: Noro95 <66942330+Noro95@users.noreply.github.com>
Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-04-22 01:38:55 +03:00
dependabot[bot]
aa68bd5336 chore(deps): bump http-proxy-middleware from 2.0.7 to 2.0.9 in /website (#1220)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:59:24 +03:00
dependabot[bot]
bf3a9f3c35 chore(deps): bump @babel/runtime-corejs3 in /website (#1216)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:59:13 +03:00
dependabot[bot]
0799b367db chore(deps): bump @babel/helpers from 7.26.0 to 7.27.0 in /website (#1218)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:59:04 +03:00
dependabot[bot]
8f675f6a95 chore(deps): bump @babel/runtime from 7.26.0 to 7.27.0 in /website (#1217)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:58:56 +03:00
dependabot[bot]
f0918bbdef chore(deps): bump estree-util-value-to-estree in /website (#1213)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:58:40 +03:00
dependabot[bot]
e981f95482 chore(deps): bump image-size from 1.1.1 to 1.2.1 in /website (#1212)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:58:33 +03:00
dependabot[bot]
65a0e8a12d chore(deps): bump prismjs from 1.29.0 to 1.30.0 in /website (#1209)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 00:58:17 +03:00
renovate[bot]
b66c4af72a chore(deps): update patch/minor dependencies (#1204)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-04-22 00:55:34 +03:00
advaith
9f769c319e feat!: components v2 (#1190) 2025-04-22 00:52:14 +03:00
github-actions[bot]
076e7b8f7b chore(release): 0.37.120 🎉 (#1215)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-10 19:54:21 +03:00
Almeida
048772d1f1 docs: resolve api-extractor warnings (#1205)
* docs: resolve api-extractor warnings

* docs: solo links

* fix: new changes

* fix: more

* fix: again
2025-04-09 22:54:09 +03:00
Almeida
5b6f0d43a4 feat(APIBaseInteraction): add attachment_size_limit (#1214) 2025-04-09 21:59:06 +03:00
Jiralite
cfac62e44a fix: Ensure autocomplete option values resolve to string for numerical types (#1198)
* fix: string values for autocomplete

* fix: default types

* test: add tests
2025-04-08 23:54:35 +03:00
Danial Raza
def67dbe90 feat(webhook): add with_components query param (#1208)
* feat(webhook): add `with_components` query param

* docs: use `defaultValue`

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-04-08 23:53:38 +03:00
Micah Benac
ac4d59d17e feat(RPC): types (#1200)
* feat: rpc types

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

* feat: complete documented types

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

* feat: implement all of the interfaces and documented types

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

* chore: minor type changes

* feat: type changes

* feat: shortcut and relationship types

* feat: more types

* fix: subscribe args types should be truly empty types

* feat: more types

* types: lobby/achievement stuff

* types: now I remove the lobby types

* types: now I remove the lobby types

* chore: totally didn't forget this

* fix: lol

* types: forgor to test out these undocumented types

* Update rpc/v10.ts

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

* chore: suggested changes

* chore: requested changes

---------

Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-04-08 23:52:19 +03:00
dependabot[bot]
d12dcb103c chore(deps-dev): bump undici from 6.21.0 to 6.21.1 (#1196)
Bumps [undici](https://github.com/nodejs/undici) from 6.21.0 to 6.21.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-16 17:05:03 +02:00
renovate[bot]
699c3df1ec chore(deps): lock file maintenance (#1185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-16 16:43:14 +02:00
github-actions[bot]
78d6acfdb8 chore(release): 0.37.119 🎉 (#1202)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-02 02:27:06 +02:00
renovate[bot]
19a8371695 chore(deps): update patch/minor dependencies (#1194)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-02 02:23:25 +02:00
Vlad Frangu
d5cdb37a8f fix: route escaping round three 2025-02-02 02:22:59 +02:00
github-actions[bot]
2023a0ab2a chore(release): 0.37.118 🎉 (#1201)
Build ran for 8fe9c072b3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-27 14:28:08 +02:00
Danial Raza
8fe9c072b3 feat(APIGuild): add incidents_data (#822) 2025-01-25 21:16:48 +02:00
Jiralite
d446be5ecd feat(MessageFlags): add HasSnapshot (#1141) 2025-01-24 11:35:38 +02:00
github-actions[bot]
27840d1086 chore(release): 0.37.117 🎉 (#1195)
Build ran for 1fc2a6ece8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-20 14:27:35 +02:00
Jiralite
1fc2a6ece8 refactor: remove flags override (#1193) 2025-01-16 18:27:55 +02:00
github-actions[bot]
f90b47c95c chore(release): 0.37.116 🎉 (#1192)
Build ran for cf076b868b

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-16 14:25:47 +02:00
HotDog640
cf076b868b docs(MessageEmbed): remove deprecation for EmbedType (#1187)
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-01-15 12:07:55 +02:00
renovate[bot]
470f340e75 chore(deps): update patch/minor dependencies (#1184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 12:06:53 +02:00
Almeida
d9b6935b01 feat(VoiceCloseCodes): add BadRequest (#1191) 2025-01-15 12:06:37 +02:00
297 changed files with 14103 additions and 6548 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
deno/** linguist-generated

View File

@@ -6,5 +6,10 @@
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
"cSpell.enableFiletypes": ["mdx"]
"cSpell.enableFiletypes": ["mdx"],
"search.exclude": {
"**/v6": true,
"**/v8": true,
"deno": true
}
}

View File

@@ -1,3 +1,69 @@
## [0.38.2](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) (2025-05-01)
# [0.38.1](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) (2025-04-22)
### Features
* components v2 ([9f769c3](https://github.com/discordjs/discord-api-types/commit/9f769c319eed0cb3d26d5a5c0cb06f8f4a78c071))
* **CDNQuery:** add ImageSize type ([527ac2f](https://github.com/discordjs/discord-api-types/commit/527ac2fe0f80d88e62c025bcdab48d251ac171d6))
### BREAKING CHANGES
* Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow
## [0.37.120](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) (2025-04-10)
### Bug Fixes
* Ensure autocomplete option values resolve to string for numerical types ([#1198](https://github.com/discordjs/discord-api-types/issues/1198)) ([cfac62e](https://github.com/discordjs/discord-api-types/commit/cfac62e44a02a535b8ed412dae263b8c31475c4a))
### Features
* **APIBaseInteraction:** add `attachment_size_limit` ([#1214](https://github.com/discordjs/discord-api-types/issues/1214)) ([5b6f0d4](https://github.com/discordjs/discord-api-types/commit/5b6f0d43a4e4886a924af840b388c3f482b79f5e))
* **RPC:** types ([#1200](https://github.com/discordjs/discord-api-types/issues/1200)) ([ac4d59d](https://github.com/discordjs/discord-api-types/commit/ac4d59d17edfa77cf28c644f8797204035508a0a))
* **webhook:** add `with_components` query param ([#1208](https://github.com/discordjs/discord-api-types/issues/1208)) ([def67db](https://github.com/discordjs/discord-api-types/commit/def67dbe90206a2a5c7d08ce734a2db6a9175ca3))
## [0.37.119](https://github.com/discordjs/discord-api-types/compare/0.37.118...0.37.119) (2025-02-02)
### Bug Fixes
* route escaping round three ([d5cdb37](https://github.com/discordjs/discord-api-types/commit/d5cdb37a8f06128e472f1ef13ec4d7823f956e7d))
## [0.37.118](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) (2025-01-27)
### Features
* **APIGuild:** add `incidents_data` ([#822](https://github.com/discordjs/discord-api-types/issues/822)) ([8fe9c07](https://github.com/discordjs/discord-api-types/commit/8fe9c072b3188c51bb3713dae640ba227a266438))
* **MessageFlags:** add HasSnapshot ([#1141](https://github.com/discordjs/discord-api-types/issues/1141)) ([d446be5](https://github.com/discordjs/discord-api-types/commit/d446be5ecdcc3889e30a8af1ce2ac598ffe1b49d))
## [0.37.117](https://github.com/discordjs/discord-api-types/compare/0.37.116...0.37.117) (2025-01-20)
## [0.37.116](https://github.com/discordjs/discord-api-types/compare/0.37.115...0.37.116) (2025-01-16)
### Features
* **VoiceCloseCodes:** add `BadRequest` ([#1191](https://github.com/discordjs/discord-api-types/issues/1191)) ([d9b6935](https://github.com/discordjs/discord-api-types/commit/d9b6935b01665db70ddf8971be5ee42c96f12706))
## [0.37.115](https://github.com/discordjs/discord-api-types/compare/0.37.114...0.37.115) (2025-01-02)

66
deno/CHANGELOG.md generated
View File

@@ -1,3 +1,69 @@
## [0.38.2](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) (2025-05-01)
# [0.38.1](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) (2025-04-22)
### Features
* components v2 ([9f769c3](https://github.com/discordjs/discord-api-types/commit/9f769c319eed0cb3d26d5a5c0cb06f8f4a78c071))
* **CDNQuery:** add ImageSize type ([527ac2f](https://github.com/discordjs/discord-api-types/commit/527ac2fe0f80d88e62c025bcdab48d251ac171d6))
### BREAKING CHANGES
* Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow
## [0.37.120](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) (2025-04-10)
### Bug Fixes
* Ensure autocomplete option values resolve to string for numerical types ([#1198](https://github.com/discordjs/discord-api-types/issues/1198)) ([cfac62e](https://github.com/discordjs/discord-api-types/commit/cfac62e44a02a535b8ed412dae263b8c31475c4a))
### Features
* **APIBaseInteraction:** add `attachment_size_limit` ([#1214](https://github.com/discordjs/discord-api-types/issues/1214)) ([5b6f0d4](https://github.com/discordjs/discord-api-types/commit/5b6f0d43a4e4886a924af840b388c3f482b79f5e))
* **RPC:** types ([#1200](https://github.com/discordjs/discord-api-types/issues/1200)) ([ac4d59d](https://github.com/discordjs/discord-api-types/commit/ac4d59d17edfa77cf28c644f8797204035508a0a))
* **webhook:** add `with_components` query param ([#1208](https://github.com/discordjs/discord-api-types/issues/1208)) ([def67db](https://github.com/discordjs/discord-api-types/commit/def67dbe90206a2a5c7d08ce734a2db6a9175ca3))
## [0.37.119](https://github.com/discordjs/discord-api-types/compare/0.37.118...0.37.119) (2025-02-02)
### Bug Fixes
* route escaping round three ([d5cdb37](https://github.com/discordjs/discord-api-types/commit/d5cdb37a8f06128e472f1ef13ec4d7823f956e7d))
## [0.37.118](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) (2025-01-27)
### Features
* **APIGuild:** add `incidents_data` ([#822](https://github.com/discordjs/discord-api-types/issues/822)) ([8fe9c07](https://github.com/discordjs/discord-api-types/commit/8fe9c072b3188c51bb3713dae640ba227a266438))
* **MessageFlags:** add HasSnapshot ([#1141](https://github.com/discordjs/discord-api-types/issues/1141)) ([d446be5](https://github.com/discordjs/discord-api-types/commit/d446be5ecdcc3889e30a8af1ce2ac598ffe1b49d))
## [0.37.117](https://github.com/discordjs/discord-api-types/compare/0.37.116...0.37.117) (2025-01-20)
## [0.37.116](https://github.com/discordjs/discord-api-types/compare/0.37.115...0.37.116) (2025-01-16)
### Features
* **VoiceCloseCodes:** add `BadRequest` ([#1191](https://github.com/discordjs/discord-api-types/issues/1191)) ([d9b6935](https://github.com/discordjs/discord-api-types/commit/d9b6935b01665db70ddf8971be5ee42c96f12706))
## [0.37.115](https://github.com/discordjs/discord-api-types/compare/0.37.114...0.37.115) (2025-01-02)

View File

@@ -1,5 +1,5 @@
/**
* https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params
* @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params}
*/
export interface GatewayURLQuery {
v: string;

749
deno/gateway/v10.ts generated

File diff suppressed because it is too large Load Diff

4
deno/gateway/v8.ts generated
View File

@@ -24,7 +24,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
} from '../payloads/v8/mod.ts';
import type { Nullable } from '../utils/internals.ts';
import type { _Nullable } from '../utils/internals.ts';
export * from './common.ts';
@@ -805,7 +805,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> &
export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> &
Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> &
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
Required<Pick<APIGuildMember, 'user'>> & {

749
deno/gateway/v9.ts generated

File diff suppressed because it is too large Load Diff

8
deno/globals.ts generated
View File

@@ -1,17 +1,15 @@
/**
* https://discord.com/developers/docs/reference#snowflakes
* @see {@link https://discord.com/developers/docs/reference#snowflakes}
*/
export type Snowflake = string;
/**
* https://discord.com/developers/docs/topics/permissions
*
* @internal
* @see {@link https://discord.com/developers/docs/topics/permissions}
*/
export type Permissions = string;
/**
* https://discord.com/developers/docs/reference#message-formatting-formats
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
*/
export const FormattingPatterns = {
/**

View File

@@ -1,7 +1,7 @@
import type { Locale } from '../rest/common.ts';
/**
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
*
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
* may cause issues, try to use BigInts as much as possible or modules that can
@@ -178,7 +178,7 @@ export const PermissionFlagsBits = {
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
*
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
* @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions}
*/
ManageEmojisAndStickers: 1n << 30n,
/**
@@ -234,7 +234,7 @@ export const PermissionFlagsBits = {
*/
SendMessagesInThreads: 1n << 38n,
/**
* Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
*
* Applies to channel types: Voice
*/
@@ -300,7 +300,7 @@ Object.freeze(PermissionFlagsBits);
export type LocalizationMap = Partial<Record<Locale, string | null>>;
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json}
*/
export interface RESTError {
code: number;
@@ -320,7 +320,7 @@ export interface RESTErrorGroupWrapper {
export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper | string | { [k: string]: RESTErrorData };
/**
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
* @see {@link https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure}
*/
export interface RESTRateLimit {
/**

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
import type { LocalizationMap } from '../../../../../v10.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
*/
export enum ApplicationCommandOptionType {
Subcommand = 1,
@@ -18,7 +18,7 @@ export enum ApplicationCommandOptionType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
*/
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string;

View File

@@ -5,7 +5,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
interface APIApplicationCommandStringOptionBase
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).

View File

@@ -1,3 +1,4 @@
import type { InteractionType } from '../../responses.ts';
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
@@ -7,8 +8,8 @@ export interface APIApplicationCommandSubcommandOption
options?: APIApplicationCommandBasicOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandOption {
export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
name: string;
type: ApplicationCommandOptionType.Subcommand;
options?: APIApplicationCommandInteractionDataBasicOption[];
options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
}

View File

@@ -1,3 +1,4 @@
import type { InteractionType } from '../../responses.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type {
@@ -10,8 +11,10 @@ export interface APIApplicationCommandSubcommandGroupOption
options?: APIApplicationCommandSubcommandOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
Type extends InteractionType = InteractionType,
> {
name: string;
type: ApplicationCommandOptionType.SubcommandGroup;
options: APIApplicationCommandInteractionDataSubcommandOption[];
options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
}

View File

@@ -1,4 +1,4 @@
import type { APIInteractionDataResolved } from '../../mod.ts';
import type { APIInteractionDataResolved, InteractionType } from '../../mod.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type {
@@ -62,7 +62,7 @@ export * from './_chatInput/subcommandGroup.ts';
export * from './_chatInput/user.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandBasicOption =
| APIApplicationCommandAttachmentOption
@@ -76,7 +76,7 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandUserOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandOption =
| APIApplicationCommandBasicOption
@@ -84,47 +84,56 @@ export type APIApplicationCommandOption =
| APIApplicationCommandSubcommandOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure}
*/
export type APIApplicationCommandInteractionDataOption =
| APIApplicationCommandInteractionDataBasicOption
| APIApplicationCommandInteractionDataSubcommandGroupOption
| APIApplicationCommandInteractionDataSubcommandOption;
export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> =
| APIApplicationCommandInteractionDataBasicOption<Type>
| APIApplicationCommandInteractionDataSubcommandGroupOption<Type>
| APIApplicationCommandInteractionDataSubcommandOption<Type>;
export type APIApplicationCommandInteractionDataBasicOption =
export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> =
| APIApplicationCommandInteractionDataAttachmentOption
| APIApplicationCommandInteractionDataBooleanOption
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataIntegerOption<Type>
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataNumberOption<Type>
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataUserOption;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption[];
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandDMInteraction =
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;

View File

@@ -5,7 +5,7 @@ import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserIntera
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
@@ -14,7 +14,7 @@ export interface APIUserApplicationCommandInteractionData
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
@@ -23,68 +23,68 @@ export interface APIMessageApplicationCommandInteractionData
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
export interface APIMessageApplicationCommandInteractionDataResolved {
messages: Record<Snowflake, APIMessage>;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIContextMenuInteractionData =
| APIMessageApplicationCommandInteractionData
| APIUserApplicationCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandDMInteraction =
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuDMInteraction =
| APIMessageApplicationCommandDMInteraction
| APIUserApplicationCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuGuildInteraction =
| APIMessageApplicationCommandGuildInteraction

View File

@@ -3,24 +3,24 @@ import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../bas
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIPrimaryEntryPointCommandInteractionData =
APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandInteraction =
APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandGuildInteraction =
APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;

View File

@@ -1,7 +1,7 @@
import type { Snowflake } from '../../../../globals.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure}
*/
export interface APIGuildApplicationCommandPermissions {
/**
@@ -23,7 +23,7 @@ export interface APIGuildApplicationCommandPermissions {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
*/
export interface APIApplicationCommandPermission {
/**
@@ -41,7 +41,7 @@ export interface APIApplicationCommandPermission {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
*/
export enum ApplicationCommandPermissionType {
Role = 1,
@@ -50,7 +50,7 @@ export enum ApplicationCommandPermissionType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
*/
export const APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions

View File

@@ -26,9 +26,10 @@ export * from './_applicationCommands/chatInput.ts';
export * from './_applicationCommands/contextMenu.ts';
export * from './_applicationCommands/permissions.ts';
export * from './_applicationCommands/entryPoint.ts';
export * from './_applicationCommands/internals.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
export interface APIApplicationCommand {
/**
@@ -82,7 +83,7 @@ export interface APIApplicationCommand {
/**
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
*
* @deprecated Use `contexts` instead
* @deprecated Use {@link APIApplicationCommand.contexts} instead
*/
dm_permission?: boolean;
/**
@@ -90,7 +91,7 @@ export interface APIApplicationCommand {
*
* If missing, this property should be assumed as `true`
*
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
* @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead
*/
default_permission?: boolean;
/**
@@ -119,7 +120,7 @@ export interface APIApplicationCommand {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
*/
export enum ApplicationCommandType {
/**
@@ -141,7 +142,7 @@ export enum ApplicationCommandType {
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
*/
export enum ApplicationIntegrationType {
/**
@@ -155,7 +156,7 @@ export enum ApplicationIntegrationType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
*/
export enum InteractionContextType {
/**
@@ -173,7 +174,7 @@ export enum InteractionContextType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
*/
export enum EntryPointCommandHandlerType {
/**
@@ -188,7 +189,7 @@ export enum EntryPointCommandHandlerType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIApplicationCommandInteractionData =
| APIChatInputApplicationCommandInteractionData
@@ -196,7 +197,7 @@ export type APIApplicationCommandInteractionData =
| APIPrimaryEntryPointCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
@@ -208,7 +209,7 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandInteraction =
| APIChatInputApplicationCommandInteraction
@@ -216,7 +217,7 @@ export type APIApplicationCommandInteraction =
| APIPrimaryEntryPointCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandDMInteraction =
| APIChatInputApplicationCommandDMInteraction
@@ -224,7 +225,7 @@ export type APIApplicationCommandDMInteraction =
| APIPrimaryEntryPointCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandGuildInteraction =
| APIChatInputApplicationCommandGuildInteraction

View File

@@ -1,6 +1,6 @@
import type {
APIBaseInteraction,
APIChatInputApplicationCommandInteractionData,
APIAutocompleteApplicationCommandInteractionData,
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
InteractionType,
@@ -8,26 +8,26 @@ import type {
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
APIChatInputApplicationCommandInteractionData
APIAutocompleteApplicationCommandInteractionData
> &
Required<
Pick<
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandAutocompleteDMInteraction =
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandAutocompleteGuildInteraction =
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;

View File

@@ -15,14 +15,14 @@ import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
*/
export type APIMessageInteractionMetadata =
| APIApplicationCommandInteractionMetadata
| APIMessageComponentInteractionMetadata
| APIModalSubmitInteractionMetadata;
interface APIBaseInteractionMetadata<Type extends InteractionType> {
export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* ID of the interaction
*/
@@ -46,7 +46,7 @@ interface APIBaseInteractionMetadata<Type extends InteractionType> {
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
@@ -62,7 +62,7 @@ export interface APIApplicationCommandInteractionMetadata
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
@@ -73,7 +73,7 @@ export interface APIMessageComponentInteractionMetadata
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure}
*/
export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> {
/**
@@ -96,7 +96,7 @@ export type PartialAPIMessageInteractionGuildMember = Pick<
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object}
*/
export interface APIMessageInteraction {
/**
@@ -122,7 +122,7 @@ export interface APIMessageInteraction {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionGuildMember extends APIGuildMember {
permissions: Permissions;
@@ -132,7 +132,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
// INTERACTIONS RECEIVED
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
@@ -166,7 +166,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* The id of the channel it was sent from
*
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
* @deprecated Use {@link APIBaseInteraction.channel} instead
*/
channel_id?: Snowflake;
/**
@@ -215,6 +215,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* Context where the interaction was triggered from
*/
context?: InteractionContextType;
/**
* Attachment size limit in bytes
*/
attachment_size_limit: number;
}
export type APIAuthorizingIntegrationOwnersMap = {
@@ -239,7 +243,7 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
@@ -247,14 +251,14 @@ export type APIInteractionDataResolvedChannel =
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
export interface APIInteractionDataResolved {
users?: Record<Snowflake, APIUser>;

View File

@@ -1,4 +1,4 @@
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type {
APIBaseInteraction,
APIDMInteractionWrapper,
@@ -14,12 +14,12 @@ export interface ModalSubmitComponent {
}
export interface ModalSubmitActionRowComponent
extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
extends Omit<APIActionRowComponent<APIComponentInModalActionRow>, 'components'> {
components: ModalSubmitComponent[];
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
*/
export interface APIModalSubmission {
/**
@@ -33,17 +33,17 @@ export interface APIModalSubmission {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;

View File

@@ -1,10 +1,9 @@
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { MessageFlags } from '../mod.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
*/
export enum InteractionType {
Ping = 1,
@@ -15,7 +14,7 @@ export enum InteractionType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object}
*/
export type APIInteractionResponse =
| APIApplicationCommandAutocompleteResponse
@@ -70,7 +69,7 @@ export interface APIInteractionResponseLaunchActivity {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
*/
export enum InteractionResponseType {
/**
@@ -104,7 +103,8 @@ export enum InteractionResponseType {
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated See https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes
* @deprecated Send a button with Premium type instead.
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
*/
PremiumRequired,
@@ -118,19 +118,16 @@ export enum InteractionResponseType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure}
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
export interface APICommandAutocompleteInteractionResponseCallbackData {
choices?: APIApplicationCommandOptionChoice[];
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
*/
export interface APIModalInteractionResponseCallbackData {
/**
@@ -144,5 +141,5 @@ export interface APIModalInteractionResponseCallbackData {
/**
* Between 1 and 5 (inclusive) components that make up the modal
*/
components: APIActionRowComponent<APIModalActionRowComponent>[];
components: APIActionRowComponent<APIComponentInModalActionRow>[];
}

View File

@@ -12,7 +12,7 @@ import type { APIUser } from './user.ts';
import type { ApplicationWebhookEventType } from './webhook.ts';
/**
* https://discord.com/developers/docs/resources/application#application-object
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
*/
export interface APIApplication {
/**
@@ -58,7 +58,7 @@ export interface APIApplication {
/**
* Partial user object containing info on the owner of the application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
owner?: APIUser;
/**
@@ -71,13 +71,13 @@ 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#getticket
* @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket}
*/
verify_key: string;
/**
* The team this application belongs to
*
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
*/
team: APITeam | null;
/**
@@ -103,7 +103,7 @@ export interface APIApplication {
/**
* The application's public flags
*
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
flags: ApplicationFlags;
/**
@@ -171,7 +171,7 @@ export type APIApplicationIntegrationTypesConfigMap = {
};
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
export enum ApplicationFlags {
/**
@@ -208,12 +208,14 @@ export enum ApplicationFlags {
GatewayPresenceLimited = 1 << 13,
/**
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembers = 1 << 14,
/**
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembersLimited = 1 << 15,
/**
@@ -225,11 +227,11 @@ export enum ApplicationFlags {
*/
Embedded = 1 << 17,
/**
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
*/
GatewayMessageContent = 1 << 18,
/**
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
* found in Bot Settings
*/
GatewayMessageContentLimited = 1 << 19,
@@ -238,13 +240,13 @@ export enum ApplicationFlags {
*/
EmbeddedFirstParty = 1 << 20,
/**
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
*/
ApplicationCommandBadge = 1 << 23,
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure}
*/
export interface APIApplicationRoleConnectionMetadata {
/**
@@ -274,7 +276,7 @@ export interface APIApplicationRoleConnectionMetadata {
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
*/
export enum ApplicationRoleConnectionMetadataType {
/**
@@ -312,7 +314,7 @@ export enum ApplicationRoleConnectionMetadataType {
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
*/
export enum ApplicationWebhookEventStatus {
/**

View File

@@ -35,43 +35,43 @@ import type { APIUser } from './user.ts';
import type { APIWebhook } from './webhook.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure}
*/
export interface APIAuditLog {
/**
* List of application commands found in the audit log
*
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
application_commands: APIApplicationCommand[];
/**
* Webhooks found in the audit log
*
* See https://discord.com/developers/docs/resources/webhook#webhook-object
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
*/
webhooks: APIWebhook[];
/**
* Users found in the audit log
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
users: APIUser[];
/**
* Audit log entries
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object}
*/
audit_log_entries: APIAuditLogEntry[];
/**
* List of auto moderation rules referenced in the audit log
*
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object}
*/
auto_moderation_rules: APIAutoModerationRule[];
/**
* Partial integration objects
*
* See https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
integrations: APIGuildIntegration[];
/**
@@ -79,19 +79,19 @@ export interface APIAuditLog {
*
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
*
* See https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
threads: APIChannel[];
/**
* The guild scheduled events in the audit log
*
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object}
*/
guild_scheduled_events: APIGuildScheduledEvent[];
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure}
*/
export interface APIAuditLogEntry {
/**
@@ -101,7 +101,7 @@ export interface APIAuditLogEntry {
/**
* Changes made to the `target_id`
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object}
*/
changes?: APIAuditLogChange[];
/**
@@ -117,13 +117,13 @@ export interface APIAuditLogEntry {
/**
* Type of action that occurred
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
action_type: AuditLogEvent;
/**
* Additional info for certain action types
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
options?: APIAuditLogOptions;
/**
@@ -133,7 +133,7 @@ export interface APIAuditLogEntry {
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
export enum AuditLogEvent {
GuildUpdate = 1,
@@ -222,7 +222,7 @@ export enum AuditLogEvent {
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
export interface APIAuditLogOptions {
/**
@@ -325,7 +325,7 @@ export interface APIAuditLogOptions {
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
*/
role_name?: string;
@@ -347,7 +347,7 @@ export enum AuditLogOptionsType {
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure}
*/
export type APIAuditLogChange =
| APIAuditLogChangeKey$Add
@@ -442,92 +442,92 @@ export type APIAuditLogChange =
/**
* Returned when an entity's name is changed
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>;
/**
* Returned when a guild's or sticker's or guild scheduled event's description is changed
*/
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>;
/**
* Returned when a guild's icon is changed
*/
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's scheduled event's cover image is changed
*/
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>;
/**
* Returned when a guild's splash is changed
*/
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's discovery splash is changed
*/
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>;
/**
* Returned when a guild's banner hash is changed
*/
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>;
/**
* Returned when a guild's owner_id is changed
*/
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>;
/**
* Returned when a guild's region is changed
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>;
/**
* Returned when a guild's afk_channel_id is changed
*/
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>;
/**
* Returned when a guild's afk_timeout is changed
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's rules_channel_id is changed
*/
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>;
/**
* Returned when a guild's public_updates_channel_id is changed
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>;
/**
* Returned when a guild's safety_alerts_channel_id is changed
*/
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>;
/**
* Returned when a guild's mfa_level is changed
*/
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
*/
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a guild's explicit_content_filter is changed
*/
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<
'explicit_content_filter',
GuildExplicitContentFilter
>;
@@ -535,7 +535,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
/**
* Returned when a guild's default_message_notifications is changed
*/
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<
'default_message_notifications',
GuildDefaultMessageNotifications
>;
@@ -543,42 +543,45 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
/**
* Returned when a guild's vanity_url_code is changed
*/
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when a guild's boost progress bar is enabled
*/
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = AuditLogChangeData<'premium_progress_bar_enabled', boolean>;
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<
'premium_progress_bar_enabled',
boolean
>;
/**
* Returned when new role(s) are added
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when role(s) are removed
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
*/
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
*/
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
*/
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>;
/**
* Returned when a guild's system_channel_flags is changed
*/
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<
'system_channel_flags',
GuildSystemChannelFlags
>;
@@ -586,48 +589,48 @@ export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
/**
* Returned when a guild's system_channel_id is changed
*/
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>;
/**
* Returned when a channel's position is changed
*/
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
*/
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
*/
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
*/
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
*/
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
*/
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>;
/**
* Returned when a channel's amount of seconds a user has to wait before sending another message
* is changed
*/
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a guild scheduled event's recurrence_rule is changed
* Returned when a guild scheduled event's recurrence_rule is changed
*/
export type APIAuditLogChangeKeyRecurrenceRule = AuditLogChangeData<
export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<
'recurrence_rule',
APIGuildScheduledEventRecurrenceRule
>;
@@ -635,173 +638,173 @@ export type APIAuditLogChangeKeyRecurrenceRule = AuditLogChangeData<
/**
* Returned when a permission bitfield is changed
*/
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>;
/**
* Returned when a role's color is changed
*/
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>;
/**
* Represents a change where the key is a snowflake.
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
* Currently, the only known instance of this is returned when permissions for a command were updated
*/
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>;
/**
* Returned when a role's hoist status is changed
*/
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
*/
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*/
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*/
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>;
/**
* Returned when an invite's code is changed
*/
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>;
/**
* Returned when an invite's or guild scheduled event's channel_id is changed
*/
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>;
/**
* Returned when an invite's inviter_id is changed
*/
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>;
/**
* Returned when an invite's max_uses is changed
*/
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
*/
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
*/
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
*/
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
*/
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
*/
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
*/
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>;
/**
* Returned when a user's avatar_hash is changed
*/
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
*/
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>;
/**
* The type of entity created
*/
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>;
/**
* Returned when an integration's enable_emoticons is changed
*/
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
*/
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
*/
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>;
/**
* Returned when a voice channel's user_limit is changed
*/
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>;
/**
* Returned when privacy level of a stage instance or guild scheduled event is changed
*/
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
/**
* Returned when a sticker's related emoji is changed
*/
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>;
/**
* Returned when a sticker's format_type is changed
*/
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>;
/**
* Empty string
*/
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>;
/**
* Returned when a sticker's availability is changed
*/
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>;
/**
* Returned when a sticker's guild_id is changed
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>;
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>;
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>;
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>;
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<
'default_auto_archive_duration',
number
>;
@@ -809,37 +812,40 @@ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
/**
* Returned when entity type of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
/**
* Returned when status of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>;
/**
* Returned when location of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>;
/**
* Returned when a user's timeout is changed
*/
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<
'communication_disabled_until',
string
>;
/**
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
*/
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
/**
* Returned when an auto moderation rule's event type is changed
*/
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>;
/**
* Returned when an auto moderation rule's trigger metadata is changed
*/
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<
'trigger_metadata',
APIAutoModerationRuleTriggerMetadata
>;
@@ -847,32 +853,32 @@ export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
/**
* Returned when an auto moderation rule's actions is changed
*/
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>;
/**
* Returned when an auto moderation rule's enabled status is changed
*/
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>;
/**
* Returned when an auto moderation rule's exempt roles is changed
*/
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>;
/**
* Returned when an auto moderation rule's exempt channels is changed
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>;
/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>;
/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;
@@ -880,13 +886,13 @@ export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>;
/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;
@@ -894,29 +900,29 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;
export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>;
/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;
export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>;
/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;
export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>;
/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;
export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>;
/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;
export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>;
interface AuditLogChangeData<K extends string, D> {
export interface APIAuditLogChangeData<K extends string, D> {
key: K;
/**
* The new value

View File

@@ -5,7 +5,7 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure}
*/
export interface APIAutoModerationRule {
/**
@@ -55,7 +55,7 @@ export interface APIAutoModerationRule {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
*/
export enum AutoModerationRuleTriggerType {
/**
@@ -81,14 +81,15 @@ export enum AutoModerationRuleTriggerType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata}
*/
export interface APIAutoModerationRuleTriggerMetadata {
/**
* Substrings which will be searched for in content (Maximum of 1000)
*
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
@@ -103,7 +104,8 @@ export interface APIAutoModerationRuleTriggerMetadata {
* Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
*
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
@@ -131,7 +133,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types}
*/
export enum AutoModerationRuleKeywordPresetType {
/**
@@ -149,7 +151,7 @@ export enum AutoModerationRuleKeywordPresetType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
*/
export enum AutoModerationRuleEventType {
/**
@@ -163,7 +165,7 @@ export enum AutoModerationRuleEventType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure}
*/
export interface APIAutoModerationAction {
/**
@@ -179,7 +181,7 @@ export interface APIAutoModerationAction {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
*/
export enum AutoModerationActionType {
/**
@@ -202,7 +204,7 @@ export enum AutoModerationActionType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata}
*/
export interface APIAutoModerationActionMetadata {
/**

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,7 @@ export interface APIPartialEmoji {
}
/**
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure}
*/
export interface APIEmoji extends APIPartialEmoji {
/**

View File

@@ -10,7 +10,7 @@ import type { APIEmoji } from './emoji.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway}
*/
export interface APIGatewayInfo {
/**
@@ -20,25 +20,25 @@ export interface APIGatewayInfo {
}
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot}
*/
export interface APIGatewayBotInfo extends APIGatewayInfo {
/**
* The recommended number of shards to use when connecting
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
shards: number;
/**
* Information on the current session start limit
*
* See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
*/
session_start_limit: APIGatewaySessionStartLimit;
}
/**
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
*/
export interface APIGatewaySessionStartLimit {
/**
@@ -60,7 +60,7 @@ export interface APIGatewaySessionStartLimit {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
*/
export interface GatewayPresenceUpdate {
/**
@@ -69,7 +69,7 @@ export interface GatewayPresenceUpdate {
* **The user object within this event can be partial, the only field which must be sent is the `id` field,
* everything else is optional.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: Partial<APIUser> & Pick<APIUser, 'id'>;
/**
@@ -83,19 +83,19 @@ export interface GatewayPresenceUpdate {
/**
* User's current activities
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object}
*/
activities?: GatewayActivity[];
/**
* User's platform-dependent status
*
* See https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
client_status?: GatewayPresenceClientStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
*/
export enum PresenceUpdateStatus {
Online = 'online',
@@ -111,7 +111,7 @@ export enum PresenceUpdateStatus {
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
/**
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
export interface GatewayPresenceClientStatus {
/**
@@ -129,7 +129,7 @@ export interface GatewayPresenceClientStatus {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure}
*/
export interface GatewayActivity {
/**
@@ -145,7 +145,7 @@ export interface GatewayActivity {
/**
* Activity type
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
type: ActivityType;
/**
@@ -187,7 +187,7 @@ export interface GatewayActivity {
/**
* The emoji used for a custom status
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
emoji?: GatewayActivityEmoji;
/**
@@ -197,19 +197,19 @@ export interface GatewayActivity {
/**
* Information for the current party of the player
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
party?: GatewayActivityParty;
/**
* Images for the presence and their hover texts
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
assets?: GatewayActivityAssets;
/**
* Secrets for Rich Presence joining and spectating
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
secrets?: GatewayActivitySecrets;
/**
@@ -219,9 +219,8 @@ export interface GatewayActivity {
/**
* Activity flags `OR`d together, describes what the payload includes
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: ActivityFlags;
/**
@@ -246,37 +245,37 @@ export enum ActivityPlatform {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
export enum ActivityType {
/**
* Playing {game}
* Playing \{game\}
*/
Playing,
/**
* Streaming {details}
* Streaming \{details\}
*/
Streaming,
/**
* Listening to {name}
* Listening to \{name\}
*/
Listening,
/**
* Watching {details}
* Watching \{details\}
*/
Watching,
/**
* {emoji} {state}
* \{emoji\} \{state\}
*/
Custom,
/**
* Competing in {name}
* Competing in \{name\}
*/
Competing,
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
export interface GatewayActivityTimestamps {
/**
@@ -290,12 +289,12 @@ export interface GatewayActivityTimestamps {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
export interface GatewayActivityParty {
/**
@@ -309,19 +308,19 @@ export interface GatewayActivityParty {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
*/
export enum ActivityFlags {
Instance = 1 << 0,
@@ -347,7 +346,7 @@ export interface GatewayActivityButton {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields}
*/
export interface GatewayThreadListSync {
/**
@@ -369,7 +368,7 @@ export interface GatewayThreadListSync {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields}
*/
export interface GatewayThreadMembersUpdate {
/**

View File

@@ -12,7 +12,7 @@ import type { APISticker } from './sticker.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
*/
export interface APIUnavailableGuild {
/**
@@ -26,7 +26,7 @@ export interface APIUnavailableGuild {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
/**
@@ -36,19 +36,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
splash: string | null;
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner?: string | null;
/**
@@ -58,13 +58,13 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features?: GuildFeature[];
/**
* Verification level required for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level?: GuildVerificationLevel;
/**
@@ -74,19 +74,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIGuild extends APIPartialGuild {
/**
* Icon hash, returned when in the template object
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon_hash?: string | null;
/**
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
discovery_splash: string | null;
/**
@@ -104,14 +104,13 @@ export interface APIGuild extends APIPartialGuild {
*
* **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
permissions?: Permissions;
/**
* Voice region id for the guild
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
*
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
*/
region: string;
@@ -134,43 +133,43 @@ export interface APIGuild extends APIPartialGuild {
/**
* Verification level required for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level: GuildVerificationLevel;
/**
* Default message notifications level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
default_message_notifications: GuildDefaultMessageNotifications;
/**
* Explicit content filter level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
explicit_content_filter: GuildExplicitContentFilter;
/**
* Roles in the guild
*
* See https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles: APIRole[];
/**
* Custom guild emojis
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
*/
emojis: APIEmoji[];
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features: GuildFeature[];
/**
* Required MFA level for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
mfa_level: GuildMFALevel;
/**
@@ -184,7 +183,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* System channel flags
*
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
system_channel_flags: GuildSystemChannelFlags;
/**
@@ -210,13 +209,13 @@ export interface APIGuild extends APIPartialGuild {
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner: string | null;
/**
* Premium tier (Server Boost level)
*
* See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
premium_tier: GuildPremiumTier;
/**
@@ -226,7 +225,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
*
* @default "en-US"
* @defaultValue `"en-US"`
*/
preferred_locale: Locale;
/**
@@ -260,13 +259,13 @@ export interface APIGuild extends APIPartialGuild {
/**
* The nsfw level of the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
nsfw_level: GuildNSFWLevel;
/**
* Custom guild stickers
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
stickers: APISticker[];
/**
@@ -281,23 +280,27 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @default "en-US"
* @defaultValue `"en-US"`
*/
locale: Locale;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
export enum GuildDefaultMessageNotifications {
AllMessages,
@@ -305,7 +308,7 @@ export enum GuildDefaultMessageNotifications {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
export enum GuildExplicitContentFilter {
Disabled,
@@ -314,7 +317,7 @@ export enum GuildExplicitContentFilter {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
export enum GuildMFALevel {
None,
@@ -322,7 +325,7 @@ export enum GuildMFALevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
export enum GuildNSFWLevel {
Default,
@@ -332,7 +335,7 @@ export enum GuildNSFWLevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
export enum GuildVerificationLevel {
/**
@@ -358,7 +361,7 @@ export enum GuildVerificationLevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
export enum GuildPremiumTier {
None,
@@ -374,7 +377,7 @@ export enum GuildHubType {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
export enum GuildSystemChannelFlags {
/**
@@ -404,7 +407,7 @@ export enum GuildSystemChannelFlags {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
export enum GuildFeature {
/**
@@ -418,7 +421,7 @@ export enum GuildFeature {
/**
* Guild is using the old permissions configuration behavior
*
* See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
* @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes}
*/
ApplicationCommandPermissionsV2 = 'APPLICATION_COMMAND_PERMISSIONS_V2',
/**
@@ -460,8 +463,7 @@ export enum GuildFeature {
/**
* Guild is a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
Hub = 'HUB',
@@ -476,8 +478,7 @@ export enum GuildFeature {
/**
* Guild is in a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
LinkedToHub = 'LINKED_TO_HUB',
@@ -559,7 +560,7 @@ export enum GuildFeature {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-preview-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object}
*/
export interface APIGuildPreview {
/**
@@ -573,31 +574,31 @@ export interface APIGuildPreview {
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
splash: string | null;
/**
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
discovery_splash: string | null;
/**
* Custom guild emojis
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
*/
emojis: APIEmoji[];
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features: GuildFeature[];
/**
@@ -619,7 +620,7 @@ export interface APIGuildPreview {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidgetSettings {
/**
@@ -633,7 +634,7 @@ export interface APIGuildWidgetSettings {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember {
/**
@@ -641,7 +642,7 @@ export interface APIGuildMember {
*
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
/**
@@ -659,7 +660,7 @@ export interface APIGuildMember {
/**
* Array of role object ids
*
* See https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles: Snowflake[];
/**
@@ -669,7 +670,7 @@ export interface APIGuildMember {
/**
* When the user started boosting the guild
*
* See https://support.discord.com/hc/articles/360028038352
* @see {@link https://support.discord.com/hc/articles/360028038352}
*/
premium_since?: string | null;
/**
@@ -697,13 +698,13 @@ export interface APIGuildMember {
/**
* The data for the member's guild avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
export enum GuildMemberFlags {
/**
@@ -740,6 +741,7 @@ export enum GuildMemberFlags {
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113}
*/
AutomodQuarantinedBio = 1 << 8,
/**
@@ -749,7 +751,7 @@ export enum GuildMemberFlags {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
export interface APIGuildIntegration {
/**
@@ -791,7 +793,7 @@ export interface APIGuildIntegration {
*
* **This field is not provided for `discord` bot integrations.**
*
* See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
expire_behavior?: IntegrationExpireBehavior;
/**
@@ -805,13 +807,13 @@ export interface APIGuildIntegration {
*
* **Some older integrations may not have an attached user.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user?: APIUser;
/**
* Integration account information
*
* See https://discord.com/developers/docs/resources/guild#integration-account-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
account: APIIntegrationAccount;
/**
@@ -835,7 +837,7 @@ export interface APIGuildIntegration {
/**
* The bot/OAuth2 application for discord integrations
*
* See https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*
* **This field is not provided for `discord` bot integrations.**
*/
@@ -849,7 +851,7 @@ export interface APIGuildIntegration {
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
export enum IntegrationExpireBehavior {
RemoveRole,
@@ -857,7 +859,7 @@ export enum IntegrationExpireBehavior {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-account-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
export interface APIIntegrationAccount {
/**
@@ -871,7 +873,7 @@ export interface APIIntegrationAccount {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*/
export interface APIGuildIntegrationApplication {
/**
@@ -885,7 +887,7 @@ export interface APIGuildIntegrationApplication {
/**
* The icon hash of the app
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
@@ -895,13 +897,13 @@ export interface APIGuildIntegrationApplication {
/**
* The bot associated with this application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
bot?: APIUser;
}
/**
* https://discord.com/developers/docs/resources/guild#ban-object
* @see {@link https://discord.com/developers/docs/resources/guild#ban-object}
*/
export interface APIBan {
/**
@@ -915,7 +917,7 @@ export interface APIBan {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidget {
id: Snowflake;
@@ -927,7 +929,7 @@ export interface APIGuildWidget {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetChannel {
id: Snowflake;
@@ -936,7 +938,7 @@ export interface APIGuildWidgetChannel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetMember {
id: string;
@@ -949,7 +951,7 @@ export interface APIGuildWidgetMember {
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options}
*/
export enum GuildWidgetStyle {
/**
@@ -1049,7 +1051,7 @@ export enum MembershipScreeningFieldType {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure}
*/
export interface APIGuildOnboarding {
/**
@@ -1075,7 +1077,7 @@ export interface APIGuildOnboarding {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure}
*/
export interface APIGuildOnboardingPrompt {
/**
@@ -1110,7 +1112,7 @@ export interface APIGuildOnboardingPrompt {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure}
*/
export interface APIGuildOnboardingPromptOption {
/**
@@ -1140,7 +1142,7 @@ export interface APIGuildOnboardingPromptOption {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode}
*/
export enum GuildOnboardingMode {
/**
@@ -1154,9 +1156,28 @@ export enum GuildOnboardingMode {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types}
*/
export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}
export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected
*/
dm_spam_detected_at?: string | null;
/**
* When the raid was detected
*/
raid_detected_at?: string | null;
}

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIUser } from './user.ts';
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
export interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
/**
* The id of the guild event
*/
@@ -74,7 +74,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure}
*/
export interface APIGuildScheduledEventRecurrenceRule {
/**
@@ -91,7 +91,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
frequency: GuildScheduledEventRecurrenceRuleFrequency;
/**
* The spacing between the events, defined by `frequency`.
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
* For example, `frequency` of {@link GuildScheduledEventRecurrenceRuleFrequency.Weekly} and an `interval` of `2`
* would be "every-other week"
*/
interval: number;
@@ -102,7 +102,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
/**
* List of specific days within a specific week (1-5) to recur on
*/
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
by_n_weekday: APIGuildScheduledEventRecurrenceRuleNWeekday[] | null;
/**
* Set of specific months to recur on
*/
@@ -122,7 +122,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency}
*/
export enum GuildScheduledEventRecurrenceRuleFrequency {
Yearly,
@@ -132,7 +132,7 @@ export enum GuildScheduledEventRecurrenceRuleFrequency {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday}
*/
export enum GuildScheduledEventRecurrenceRuleWeekday {
Monday,
@@ -145,7 +145,7 @@ export enum GuildScheduledEventRecurrenceRuleWeekday {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month}
*/
export enum GuildScheduledEventRecurrenceRuleMonth {
January = 1,
@@ -163,9 +163,9 @@ export enum GuildScheduledEventRecurrenceRuleMonth {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure}
*/
export interface GuildScheduledEventRecurrenceRuleNWeekday {
export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
/**
* The week to reoccur on.
*/
@@ -176,6 +176,11 @@ export interface GuildScheduledEventRecurrenceRuleNWeekday {
day: GuildScheduledEventRecurrenceRuleWeekday;
}
/**
* @deprecated Use {@link APIGuildScheduledEventRecurrenceRuleNWeekday} instead
*/
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
export interface APIStageInstanceGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
channel_id: Snowflake;
@@ -194,7 +199,7 @@ export interface APIExternalGuildScheduledEvent
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure}
*/
export type APIGuildScheduledEvent =
| APIExternalGuildScheduledEvent
@@ -202,7 +207,7 @@ export type APIGuildScheduledEvent =
| APIVoiceGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata}
*/
export interface APIGuildScheduledEventEntityMetadata {
/**
@@ -212,7 +217,7 @@ export interface APIGuildScheduledEventEntityMetadata {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types}
*/
export enum GuildScheduledEventEntityType {
StageInstance = 1,
@@ -221,7 +226,7 @@ export enum GuildScheduledEventEntityType {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status}
*/
export enum GuildScheduledEventStatus {
Scheduled = 1,
@@ -231,7 +236,7 @@ export enum GuildScheduledEventStatus {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level}
*/
export enum GuildScheduledEventPrivacyLevel {
/**
@@ -241,7 +246,7 @@ export enum GuildScheduledEventPrivacyLevel {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure}
*/
export interface APIGuildScheduledEventUser {
/**

View File

@@ -29,7 +29,7 @@ export * from './_interactions/ping.ts';
export * from './_interactions/responses.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIInteraction =
| APIApplicationCommandAutocompleteInteraction
@@ -39,7 +39,7 @@ export type APIInteraction =
| APIPingInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIDMInteraction =
| APIApplicationCommandAutocompleteDMInteraction
@@ -48,7 +48,7 @@ export type APIDMInteraction =
| APIModalSubmitDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIGuildInteraction =
| APIApplicationCommandAutocompleteGuildInteraction

View File

@@ -25,7 +25,7 @@ export type APIInviteGuild = Pick<
>;
/**
* https://discord.com/developers/docs/resources/invite#invite-object
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object}
*/
export interface APIInvite {
/**
@@ -35,37 +35,37 @@ export interface APIInvite {
/**
* The guild this invite is for
*
* See https://discord.com/developers/docs/resources/guild#guild-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object}
*/
guild?: APIInviteGuild;
/**
* The channel this invite is for
*
* See https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
channel: Required<APIPartialChannel> | null;
/**
* The user who created the invite
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
inviter?: APIUser;
/**
* The type of target for this voice channel invite
*
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
*/
target_type?: InviteTargetType;
/**
* The user whose stream to display for this voice channel stream invite
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
target_user?: APIUser;
/**
* The embedded application to open for this voice channel embedded application invite
*
* See https://discord.com/developers/docs/resources/application#application-object
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
*/
target_application?: Partial<APIApplication>;
/**
@@ -84,6 +84,7 @@ export interface APIInvite {
* The stage instance data if there is a public stage instance in the stage channel this invite is for
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
*/
stage_instance?: APIInviteStageInstance;
/**
@@ -97,7 +98,7 @@ export interface APIInvite {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types}
*/
export enum InviteType {
Guild,
@@ -106,7 +107,7 @@ export enum InviteType {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
*/
export enum InviteTargetType {
Stream = 1,
@@ -114,7 +115,7 @@ export enum InviteTargetType {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
* @see {@link https://discord.com/developers/docs/resources/invite#invite-metadata-object}
*/
export interface APIExtendedInvite extends APIInvite {
/**

View File

@@ -1,7 +1,7 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure}
*/
export interface APIEntitlement {
/**
@@ -47,7 +47,7 @@ export interface APIEntitlement {
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types}
*/
export enum EntitlementType {
/**
@@ -85,7 +85,7 @@ export enum EntitlementType {
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure}
*/
export interface APISKU {
/**
@@ -111,13 +111,13 @@ export interface APISKU {
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags}
*/
export enum SKUFlags {
/**
@@ -136,7 +136,7 @@ export enum SKUFlags {
}
/**
* https://discord.com/developers/docs/resources/sku#sku-object-sku-types
* @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
*/
export enum SKUType {
/**
@@ -158,7 +158,7 @@ export enum SKUType {
}
/**
* https://discord.com/developers/docs/resources/subscription#subscription-object
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-object}
*/
export interface APISubscription {
/**
@@ -204,7 +204,7 @@ export interface APISubscription {
}
/**
* https://discord.com/developers/docs/resources/subscription#subscription-statuses
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses}
*/
export enum SubscriptionStatus {
/**

View File

@@ -8,10 +8,10 @@ export enum OAuth2Scopes {
*/
Bot = 'bot',
/**
* Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
* Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`}
* to return linked third-party accounts
*
* See https://discord.com/developers/docs/resources/user#get-user-connections
* @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}
*/
Connections = 'connections',
/**
@@ -19,41 +19,41 @@ export enum OAuth2Scopes {
*/
DMChannelsRead = 'dm_channels.read',
/**
* Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
* Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email`
*
* See https://discord.com/developers/docs/resources/user#get-current-user
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
*/
Email = 'email',
/**
* Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email`
*
* See https://discord.com/developers/docs/resources/user#get-current-user
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
*/
Identify = 'identify',
/**
* Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`}
* to return basic information about all of a user's guilds
*
* See https://discord.com/developers/docs/resources/user#get-current-user-guilds
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
*/
Guilds = 'guilds',
/**
* Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
* Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`}
* to be used for joining users to a guild
*
* See https://discord.com/developers/docs/resources/guild#add-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
*/
GuildsJoin = 'guilds.join',
/**
* Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
* Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild
*
* See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
*/
GuildsMembersRead = 'guilds.members.read',
/**
* Allows your app to join users to a group dm
*
* See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
*/
GroupDMJoins = 'gdm.join',
/**
@@ -69,6 +69,18 @@ export enum OAuth2Scopes {
* For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
*/
RPC = 'rpc',
/**
* For local rpc server access, this allows you to update a user's activity - requires Discord approval
*/
RPCActivitiesWrite = 'rpc.activities.write',
/**
* For local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
*/
RPCVoiceRead = 'rpc.voice.read',
/**
* For local rpc server access, this allows you to update a user's voice settings - requires Discord approval
*/
RPCVoiceWrite = 'rpc.voice.write',
/**
* For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
*/
@@ -108,25 +120,25 @@ export enum OAuth2Scopes {
/**
* Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
*
* See https://discord.com/developers/docs/game-sdk/activities
* @see {@link https://discord.com/developers/docs/game-sdk/activities}
*/
ActivitiesWrite = 'activities.write',
/**
* Allows your app to use Application Commands in a guild
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationsCommands = 'applications.commands',
/**
* Allows your app to update its Application Commands via this bearer token - client credentials grant only
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationsCommandsUpdate = 'applications.commands.update',
/**
* Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationCommandsPermissionsUpdate = 'applications.commands.permissions.update',
}

View File

@@ -5,7 +5,7 @@
import type { Permissions, Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
export interface APIRole {
/**
@@ -39,7 +39,7 @@ export interface APIRole {
/**
* Permission bit set
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
permissions: Permissions;
/**
@@ -61,7 +61,7 @@ export interface APIRole {
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure}
*/
export interface APIRoleTags {
/**
@@ -91,7 +91,7 @@ export interface APIRoleTags {
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags}
*/
export enum RoleFlags {
/**

View File

@@ -5,7 +5,7 @@
import type { APIPartialEmoji } from './emoji.ts';
/**
* https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
*/
export interface APIPoll {
/**
@@ -23,13 +23,13 @@ export interface APIPoll {
/**
* Whether a user can select multiple answers
*
* @default false
* @defaultValue `false`
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*
* @default PollLayoutType.Default
* @defaultValue `PollLayoutType.Default`
*/
layout_type: PollLayoutType;
/**
@@ -39,7 +39,7 @@ export interface APIPoll {
}
/**
* https://discord.com/developers/docs/resources/poll#layout-type
* @see {@link https://discord.com/developers/docs/resources/poll#layout-type}
*/
export enum PollLayoutType {
/**
@@ -49,7 +49,7 @@ export enum PollLayoutType {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure}
*/
export interface APIPollMedia {
/**
@@ -65,7 +65,7 @@ export interface APIPollMedia {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
*/
export interface APIPollAnswer {
/**
@@ -79,7 +79,7 @@ export interface APIPollAnswer {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure}
*/
export interface APIPollResults {
/**
@@ -93,7 +93,7 @@ export interface APIPollResults {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure}
*/
export interface APIPollAnswerCount {
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object
* @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object}
*/
export interface APISoundboardSound {
/**

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object}
*/
export interface APIStageInstance {
/**
@@ -24,13 +24,14 @@ export interface APIStageInstance {
/**
* The privacy level of the stage instance
*
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
*/
privacy_level: StageInstancePrivacyLevel;
/**
* Whether or not stage discovery is disabled
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
*/
discoverable_disabled: boolean;
/**
@@ -40,13 +41,14 @@ export interface APIStageInstance {
}
/**
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
*/
export enum StageInstancePrivacyLevel {
/**
* The stage instance is visible publicly, such as on stage discovery
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
*/
Public = 1,
/**
@@ -56,7 +58,9 @@ export enum StageInstancePrivacyLevel {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
* @see {@link https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure}
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
*/
export interface APIInviteStageInstance {
/**
@@ -74,7 +78,7 @@ export interface APIInviteStageInstance {
/**
* The members speaking in the stage
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure}
*/
members: APIGuildMember[];
}

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
export interface APISticker {
/**
@@ -32,20 +32,20 @@ export interface APISticker {
/**
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @deprecated This field is no longer documented by Discord and will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**
* Type of sticker
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
*/
type: StickerType;
/**
* Type of sticker format
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
*/
format_type: StickerFormatType;
/**
@@ -67,7 +67,7 @@ export interface APISticker {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
*/
export enum StickerType {
/**
@@ -81,7 +81,7 @@ export enum StickerType {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
*/
export enum StickerFormatType {
PNG = 1,
@@ -91,12 +91,12 @@ export enum StickerFormatType {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object}
*/
export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>;
/**
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-pack-object}
*/
export interface APIStickerPack {
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
*/
export interface APITeam {
/**
@@ -32,19 +32,19 @@ export interface APITeam {
}
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-member-object}
*/
export interface APITeamMember {
/**
* The user's membership state on the team
*
* See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
*/
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
* @deprecated Use {@link APITeamMember.role} instead.
*/
permissions: ['*'];
/**
@@ -54,19 +54,19 @@ export interface APITeamMember {
/**
* The avatar, discriminator, id, and username of the user
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles}
*/
role: TeamMemberRole;
}
/**
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
*/
export enum TeamMemberMembershipState {
Invited = 1,
@@ -74,7 +74,7 @@ export enum TeamMemberMembershipState {
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
*/
export enum TeamMemberRole {
Admin = 'admin',

View File

@@ -8,7 +8,7 @@ import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/mod.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild-template#guild-template-object
* @see {@link https://discord.com/developers/docs/resources/guild-template#guild-template-object}
*/
export interface APITemplate {
/**
@@ -34,7 +34,7 @@ export interface APITemplate {
/**
* The user who created the template
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
creator: APIUser;
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildIntegration } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
export interface APIUser {
/**
@@ -28,7 +28,7 @@ export interface APIUser {
/**
* The user's avatar hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
avatar: string | null;
/**
@@ -46,7 +46,7 @@ export interface APIUser {
/**
* The user's banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner?: string | null;
/**
@@ -68,39 +68,38 @@ export interface APIUser {
/**
* The flags on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
flags?: UserFlags;
/**
* The type of Nitro subscription on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-premium-types
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
*/
premium_type?: UserPremiumType;
/**
* The public flags on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
public_flags?: UserFlags;
/**
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @deprecated Use `avatar_decoration_data` instead
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
* @deprecated Use {@link APIUser.avatar_decoration_data} instead
*/
avatar_decoration?: string | null;
/**
* The data for the user's avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
* https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
export enum UserFlags {
/**
@@ -144,7 +143,7 @@ export enum UserFlags {
*/
PremiumEarlySupporter = 1 << 9,
/**
* User is a [team](https://discord.com/developers/docs/topics/teams)
* User is a {@link https://discord.com/developers/docs/topics/teams | team}
*/
TeamPseudoUser = 1 << 10,
/**
@@ -168,7 +167,7 @@ export enum UserFlags {
*/
CertifiedModerator = 1 << 18,
/**
* Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
* Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list
*/
BotHTTPInteractions = 1 << 19,
/**
@@ -182,36 +181,36 @@ export enum UserFlags {
*/
DisablePremium = 1 << 21,
/**
* User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*/
ActiveDeveloper = 1 << 22,
/**
* User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
* User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | 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.
* @privateRemarks
*
* This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints
*/
Quarantined = 17_592_186_044_416,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints
*/
Collaborator = 1_125_899_906_842_624,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints
*/
RestrictedCollaborator = 2_251_799_813_685_248,
}
/**
* https://discord.com/developers/docs/resources/user#user-object-premium-types
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
*/
export enum UserPremiumType {
None,
@@ -221,7 +220,7 @@ export enum UserPremiumType {
}
/**
* https://discord.com/developers/docs/resources/user#connection-object
* @see {@link https://discord.com/developers/docs/resources/user#connection-object}
*/
export interface APIConnection {
/**
@@ -235,7 +234,7 @@ export interface APIConnection {
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-services}
*/
type: ConnectionService;
/**
@@ -245,7 +244,7 @@ export interface APIConnection {
/**
* An array of partial server integrations
*
* See https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
integrations?: Partial<APIGuildIntegration>[];
/**
@@ -267,7 +266,7 @@ export interface APIConnection {
/**
* Visibility of this connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-visibility-types}
*/
visibility: ConnectionVisibility;
}
@@ -298,7 +297,7 @@ export enum ConnectionService {
Twitch = 'twitch',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
* @deprecated This is the old name for {@link ConnectionService.X}
*/
Twitter = X,
Xbox = 'xbox',
@@ -317,7 +316,7 @@ export enum ConnectionVisibility {
}
/**
* https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure
* @see {@link https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure}
*/
export interface APIApplicationRoleConnection {
/**
@@ -335,13 +334,13 @@ export interface APIApplicationRoleConnection {
}
/**
* https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
export interface APIAvatarDecorationData {
/**
* The avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
asset: string;
/**

View File

@@ -6,14 +6,13 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
* @deprecated This is deprecated, use {@link APIVoiceState}
*/
export type GatewayVoiceState = APIVoiceState;
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
*/
export interface APIVoiceState {
/**
@@ -31,7 +30,7 @@ export interface APIVoiceState {
/**
* The guild member this voice state is for
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
member?: APIGuildMember;
/**
@@ -73,7 +72,7 @@ export interface APIVoiceState {
}
/**
* https://discord.com/developers/docs/resources/voice#voice-region-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
*/
export interface APIVoiceRegion {
/**

View File

@@ -14,7 +14,7 @@ import type {
} from './mod.ts';
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
*/
export interface APIWebhook {
/**
@@ -24,7 +24,7 @@ export interface APIWebhook {
/**
* The type of the webhook
*
* See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
*/
type: WebhookType;
/**
@@ -38,7 +38,7 @@ export interface APIWebhook {
/**
* The user this webhook was created by (not returned when getting a webhook with its token)
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user?: APIUser;
/**
@@ -72,14 +72,14 @@ export interface APIWebhook {
}
/**
* https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads}
*/
export type APIWebhookEvent =
| APIWebhookEventBase<ApplicationWebhookType.Event, APIWebhookEventBody>
| APIWebhookEventBase<ApplicationWebhookType.Ping, never>;
/**
* https://discord.com/developers/docs/events/webhook-events#event-body-object
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-body-object}
*/
export type APIWebhookEventBody =
| APIWebhookEventEventBase<
@@ -112,7 +112,7 @@ export type APIWebhookEventEntitlementCreateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
/**
* Version scheme for the webhook event. Currently always `1`
*/
@@ -132,7 +132,7 @@ interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
}
/**
* https://discord.com/developers/docs/events/webhook-events#webhook-types
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types}
*/
export enum ApplicationWebhookType {
/**
@@ -145,7 +145,7 @@ export enum ApplicationWebhookType {
Event,
}
interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> {
export interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> {
/**
* Event type
*/
@@ -161,7 +161,7 @@ interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Dat
}
/**
* https://discord.com/developers/docs/events/webhook-events#event-types
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-types}
*/
export enum ApplicationWebhookEventType {
/**
@@ -179,7 +179,7 @@ export enum ApplicationWebhookEventType {
}
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
*/
export enum WebhookType {
/**

View File

@@ -219,9 +219,6 @@ export enum OverwriteType {
*/
export interface APIEmbed {
title?: string;
/**
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
*/
type?: EmbedType;
description?: string;
url?: string;
@@ -239,7 +236,6 @@ export interface APIEmbed {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
*
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum EmbedType {

View File

@@ -693,10 +693,6 @@ export interface APIEmbed {
title?: string;
/**
* Type of embed (always "rich" for webhook embeds)
*
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
*
* See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
*/
type?: EmbedType;
/**
@@ -766,7 +762,6 @@ export interface APIEmbed {
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
*
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export enum EmbedType {

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
import type { LocalizationMap } from '../../../../../v9.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
*/
export enum ApplicationCommandOptionType {
Subcommand = 1,
@@ -18,7 +18,7 @@ export enum ApplicationCommandOptionType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
*/
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string;

View File

@@ -5,7 +5,7 @@ import type {
} from './base.ts';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
interface APIApplicationCommandStringOptionBase
export interface APIApplicationCommandStringOptionBase
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).

View File

@@ -1,3 +1,4 @@
import type { InteractionType } from '../../responses.ts';
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
@@ -7,8 +8,8 @@ export interface APIApplicationCommandSubcommandOption
options?: APIApplicationCommandBasicOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandOption {
export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
name: string;
type: ApplicationCommandOptionType.Subcommand;
options?: APIApplicationCommandInteractionDataBasicOption[];
options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
}

View File

@@ -1,3 +1,4 @@
import type { InteractionType } from '../../responses.ts';
import type { APIApplicationCommandOptionBase } from './base.ts';
import type { ApplicationCommandOptionType } from './shared.ts';
import type {
@@ -10,8 +11,10 @@ export interface APIApplicationCommandSubcommandGroupOption
options?: APIApplicationCommandSubcommandOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
Type extends InteractionType = InteractionType,
> {
name: string;
type: ApplicationCommandOptionType.SubcommandGroup;
options: APIApplicationCommandInteractionDataSubcommandOption[];
options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
}

View File

@@ -1,4 +1,4 @@
import type { APIInteractionDataResolved } from '../../mod.ts';
import type { APIInteractionDataResolved, InteractionType } from '../../mod.ts';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
import type {
@@ -62,7 +62,7 @@ export * from './_chatInput/subcommandGroup.ts';
export * from './_chatInput/user.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandBasicOption =
| APIApplicationCommandAttachmentOption
@@ -76,7 +76,7 @@ export type APIApplicationCommandBasicOption =
| APIApplicationCommandUserOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandOption =
| APIApplicationCommandBasicOption
@@ -84,47 +84,56 @@ export type APIApplicationCommandOption =
| APIApplicationCommandSubcommandOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure}
*/
export type APIApplicationCommandInteractionDataOption =
| APIApplicationCommandInteractionDataBasicOption
| APIApplicationCommandInteractionDataSubcommandGroupOption
| APIApplicationCommandInteractionDataSubcommandOption;
export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> =
| APIApplicationCommandInteractionDataBasicOption<Type>
| APIApplicationCommandInteractionDataSubcommandGroupOption<Type>
| APIApplicationCommandInteractionDataSubcommandOption<Type>;
export type APIApplicationCommandInteractionDataBasicOption =
export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> =
| APIApplicationCommandInteractionDataAttachmentOption
| APIApplicationCommandInteractionDataBooleanOption
| APIApplicationCommandInteractionDataChannelOption
| APIApplicationCommandInteractionDataIntegerOption
| APIApplicationCommandInteractionDataIntegerOption<Type>
| APIApplicationCommandInteractionDataMentionableOption
| APIApplicationCommandInteractionDataNumberOption
| APIApplicationCommandInteractionDataNumberOption<Type>
| APIApplicationCommandInteractionDataRoleOption
| APIApplicationCommandInteractionDataStringOption
| APIApplicationCommandInteractionDataUserOption;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption[];
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandDMInteraction =
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;

View File

@@ -5,7 +5,7 @@ import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserIntera
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
@@ -14,7 +14,7 @@ export interface APIUserApplicationCommandInteractionData
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIMessageApplicationCommandInteractionData
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
@@ -23,68 +23,68 @@ export interface APIMessageApplicationCommandInteractionData
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
export interface APIMessageApplicationCommandInteractionDataResolved {
messages: Record<Snowflake, APIMessage>;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIContextMenuInteractionData =
| APIMessageApplicationCommandInteractionData
| APIUserApplicationCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIUserApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandInteraction =
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandDMInteraction =
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIMessageApplicationCommandGuildInteraction =
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuDMInteraction =
| APIMessageApplicationCommandDMInteraction
| APIUserApplicationCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuGuildInteraction =
| APIMessageApplicationCommandGuildInteraction

View File

@@ -3,24 +3,24 @@ import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../bas
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIPrimaryEntryPointCommandInteractionData =
APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandInteraction =
APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIPrimaryEntryPointCommandGuildInteraction =
APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;

View File

@@ -1,7 +1,7 @@
import type { Snowflake } from '../../../../globals.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure}
*/
export interface APIGuildApplicationCommandPermissions {
/**
@@ -23,7 +23,7 @@ export interface APIGuildApplicationCommandPermissions {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
*/
export interface APIApplicationCommandPermission {
/**
@@ -41,7 +41,7 @@ export interface APIApplicationCommandPermission {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
*/
export enum ApplicationCommandPermissionType {
Role = 1,
@@ -50,7 +50,7 @@ export enum ApplicationCommandPermissionType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
*/
export const APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions

View File

@@ -26,9 +26,10 @@ export * from './_applicationCommands/chatInput.ts';
export * from './_applicationCommands/contextMenu.ts';
export * from './_applicationCommands/permissions.ts';
export * from './_applicationCommands/entryPoint.ts';
export * from './_applicationCommands/internals.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
export interface APIApplicationCommand {
/**
@@ -82,7 +83,7 @@ export interface APIApplicationCommand {
/**
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
*
* @deprecated Use `contexts` instead
* @deprecated Use {@link APIApplicationCommand.contexts} instead
*/
dm_permission?: boolean;
/**
@@ -90,7 +91,7 @@ export interface APIApplicationCommand {
*
* If missing, this property should be assumed as `true`
*
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
* @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead
*/
default_permission?: boolean;
/**
@@ -119,7 +120,7 @@ export interface APIApplicationCommand {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
*/
export enum ApplicationCommandType {
/**
@@ -141,7 +142,7 @@ export enum ApplicationCommandType {
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
*/
export enum ApplicationIntegrationType {
/**
@@ -155,7 +156,7 @@ export enum ApplicationIntegrationType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
*/
export enum InteractionContextType {
/**
@@ -173,7 +174,7 @@ export enum InteractionContextType {
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
*/
export enum EntryPointCommandHandlerType {
/**
@@ -188,7 +189,7 @@ export enum EntryPointCommandHandlerType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIApplicationCommandInteractionData =
| APIChatInputApplicationCommandInteractionData
@@ -196,7 +197,7 @@ export type APIApplicationCommandInteractionData =
| APIPrimaryEntryPointCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
@@ -208,7 +209,7 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandInteraction =
| APIChatInputApplicationCommandInteraction
@@ -216,7 +217,7 @@ export type APIApplicationCommandInteraction =
| APIPrimaryEntryPointCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandDMInteraction =
| APIChatInputApplicationCommandDMInteraction
@@ -224,7 +225,7 @@ export type APIApplicationCommandDMInteraction =
| APIPrimaryEntryPointCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandGuildInteraction =
| APIChatInputApplicationCommandGuildInteraction

View File

@@ -1,6 +1,6 @@
import type {
APIBaseInteraction,
APIChatInputApplicationCommandInteractionData,
APIAutocompleteApplicationCommandInteractionData,
APIDMInteractionWrapper,
APIGuildInteractionWrapper,
InteractionType,
@@ -8,26 +8,26 @@ import type {
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
APIChatInputApplicationCommandInteractionData
APIAutocompleteApplicationCommandInteractionData
> &
Required<
Pick<
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandAutocompleteDMInteraction =
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandAutocompleteGuildInteraction =
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;

View File

@@ -15,7 +15,7 @@ import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
/**
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
*/
export type APIMessageInteractionMetadata =
| APIApplicationCommandInteractionMetadata
@@ -23,9 +23,9 @@ export type APIMessageInteractionMetadata =
| APIModalSubmitInteractionMetadata;
/**
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
*/
interface APIBaseInteractionMetadata<Type extends InteractionType> {
export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* ID of the interaction
*/
@@ -49,7 +49,7 @@ interface APIBaseInteractionMetadata<Type extends InteractionType> {
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
@@ -65,7 +65,7 @@ export interface APIApplicationCommandInteractionMetadata
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
@@ -76,7 +76,7 @@ export interface APIMessageComponentInteractionMetadata
}
/**
* https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure}
*/
export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> {
/**
@@ -99,7 +99,7 @@ export type PartialAPIMessageInteractionGuildMember = Pick<
>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object}
*/
export interface APIMessageInteraction {
/**
@@ -125,7 +125,7 @@ export interface APIMessageInteraction {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionGuildMember extends APIGuildMember {
permissions: Permissions;
@@ -135,7 +135,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
// INTERACTIONS RECEIVED
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
@@ -169,7 +169,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* The id of the channel it was sent from
*
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
* @deprecated Use {@link APIBaseInteraction.channel} instead
*/
channel_id?: Snowflake;
/**
@@ -218,6 +218,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* Context where the interaction was triggered from
*/
context?: InteractionContextType;
/**
* Attachment size limit in bytes
*/
attachment_size_limit: number;
}
export type APIAuthorizingIntegrationOwnersMap = {
@@ -242,7 +246,7 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
@@ -250,14 +254,14 @@ export type APIInteractionDataResolvedChannel =
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
export interface APIInteractionDataResolved {
users?: Record<Snowflake, APIUser>;

View File

@@ -1,4 +1,4 @@
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type {
APIBaseInteraction,
APIDMInteractionWrapper,
@@ -14,12 +14,12 @@ export interface ModalSubmitComponent {
}
export interface ModalSubmitActionRowComponent
extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
extends Omit<APIActionRowComponent<APIComponentInModalActionRow>, 'components'> {
components: ModalSubmitComponent[];
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
*/
export interface APIModalSubmission {
/**
@@ -33,17 +33,17 @@ export interface APIModalSubmission {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;

View File

@@ -1,10 +1,9 @@
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
import type { MessageFlags } from '../mod.ts';
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
*/
export enum InteractionType {
Ping = 1,
@@ -15,7 +14,7 @@ export enum InteractionType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object}
*/
export type APIInteractionResponse =
| APIApplicationCommandAutocompleteResponse
@@ -70,7 +69,7 @@ export interface APIInteractionResponseLaunchActivity {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
*/
export enum InteractionResponseType {
/**
@@ -104,7 +103,8 @@ export enum InteractionResponseType {
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated See https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes
* @deprecated Send a button with Premium type instead.
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
*/
PremiumRequired,
@@ -118,19 +118,16 @@ export enum InteractionResponseType {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure}
*/
export type APIInteractionResponseCallbackData = Omit<
RESTPostAPIWebhookWithTokenJSONBody,
'avatar_url' | 'username'
> & { flags?: MessageFlags };
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
export interface APICommandAutocompleteInteractionResponseCallbackData {
choices?: APIApplicationCommandOptionChoice[];
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
*/
export interface APIModalInteractionResponseCallbackData {
/**
@@ -144,5 +141,5 @@ export interface APIModalInteractionResponseCallbackData {
/**
* Between 1 and 5 (inclusive) components that make up the modal
*/
components: APIActionRowComponent<APIModalActionRowComponent>[];
components: APIActionRowComponent<APIComponentInModalActionRow>[];
}

View File

@@ -12,7 +12,7 @@ import type { APIUser } from './user.ts';
import type { ApplicationWebhookEventType } from './webhook.ts';
/**
* https://discord.com/developers/docs/resources/application#application-object
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
*/
export interface APIApplication {
/**
@@ -58,7 +58,7 @@ export interface APIApplication {
/**
* Partial user object containing info on the owner of the application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
owner?: APIUser;
/**
@@ -71,13 +71,13 @@ 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#getticket
* @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket}
*/
verify_key: string;
/**
* The team this application belongs to
*
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
*/
team: APITeam | null;
/**
@@ -103,7 +103,7 @@ export interface APIApplication {
/**
* The application's public flags
*
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
flags: ApplicationFlags;
/**
@@ -171,7 +171,7 @@ export type APIApplicationIntegrationTypesConfigMap = {
};
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
export enum ApplicationFlags {
/**
@@ -208,12 +208,14 @@ export enum ApplicationFlags {
GatewayPresenceLimited = 1 << 13,
/**
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembers = 1 << 14,
/**
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembersLimited = 1 << 15,
/**
@@ -225,11 +227,11 @@ export enum ApplicationFlags {
*/
Embedded = 1 << 17,
/**
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
*/
GatewayMessageContent = 1 << 18,
/**
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
* found in Bot Settings
*/
GatewayMessageContentLimited = 1 << 19,
@@ -238,13 +240,13 @@ export enum ApplicationFlags {
*/
EmbeddedFirstParty = 1 << 20,
/**
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
*/
ApplicationCommandBadge = 1 << 23,
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure}
*/
export interface APIApplicationRoleConnectionMetadata {
/**
@@ -274,7 +276,7 @@ export interface APIApplicationRoleConnectionMetadata {
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
*/
export enum ApplicationRoleConnectionMetadataType {
/**
@@ -312,7 +314,7 @@ export enum ApplicationRoleConnectionMetadataType {
}
/**
* https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
*/
export enum ApplicationWebhookEventStatus {
/**

View File

@@ -35,43 +35,43 @@ import type { APIUser } from './user.ts';
import type { APIWebhook } from './webhook.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure}
*/
export interface APIAuditLog {
/**
* List of application commands found in the audit log
*
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
application_commands: APIApplicationCommand[];
/**
* Webhooks found in the audit log
*
* See https://discord.com/developers/docs/resources/webhook#webhook-object
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
*/
webhooks: APIWebhook[];
/**
* Users found in the audit log
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
users: APIUser[];
/**
* Audit log entries
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object}
*/
audit_log_entries: APIAuditLogEntry[];
/**
* List of auto moderation rules referenced in the audit log
*
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object}
*/
auto_moderation_rules: APIAutoModerationRule[];
/**
* Partial integration objects
*
* See https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
integrations: APIGuildIntegration[];
/**
@@ -79,19 +79,19 @@ export interface APIAuditLog {
*
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
*
* See https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
threads: APIChannel[];
/**
* The guild scheduled events in the audit log
*
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object}
*/
guild_scheduled_events: APIGuildScheduledEvent[];
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure}
*/
export interface APIAuditLogEntry {
/**
@@ -101,7 +101,7 @@ export interface APIAuditLogEntry {
/**
* Changes made to the `target_id`
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object}
*/
changes?: APIAuditLogChange[];
/**
@@ -117,13 +117,13 @@ export interface APIAuditLogEntry {
/**
* Type of action that occurred
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
action_type: AuditLogEvent;
/**
* Additional info for certain action types
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
options?: APIAuditLogOptions;
/**
@@ -133,7 +133,7 @@ export interface APIAuditLogEntry {
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
export enum AuditLogEvent {
GuildUpdate = 1,
@@ -222,7 +222,7 @@ export enum AuditLogEvent {
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
export interface APIAuditLogOptions {
/**
@@ -325,7 +325,7 @@ export interface APIAuditLogOptions {
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
*/
role_name?: string;
@@ -347,7 +347,7 @@ export enum AuditLogOptionsType {
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure}
*/
export type APIAuditLogChange =
| APIAuditLogChangeKey$Add
@@ -442,92 +442,92 @@ export type APIAuditLogChange =
/**
* Returned when an entity's name is changed
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>;
/**
* Returned when a guild's or sticker's or guild scheduled event's description is changed
*/
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>;
/**
* Returned when a guild's icon is changed
*/
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's scheduled event's cover image is changed
*/
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>;
/**
* Returned when a guild's splash is changed
*/
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's discovery splash is changed
*/
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>;
/**
* Returned when a guild's banner hash is changed
*/
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>;
/**
* Returned when a guild's owner_id is changed
*/
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>;
/**
* Returned when a guild's region is changed
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>;
/**
* Returned when a guild's afk_channel_id is changed
*/
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>;
/**
* Returned when a guild's afk_timeout is changed
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's rules_channel_id is changed
*/
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>;
/**
* Returned when a guild's public_updates_channel_id is changed
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>;
/**
* Returned when a guild's safety_alerts_channel_id is changed
*/
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>;
/**
* Returned when a guild's mfa_level is changed
*/
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
*/
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a guild's explicit_content_filter is changed
*/
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<
'explicit_content_filter',
GuildExplicitContentFilter
>;
@@ -535,7 +535,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
/**
* Returned when a guild's default_message_notifications is changed
*/
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<
'default_message_notifications',
GuildDefaultMessageNotifications
>;
@@ -543,42 +543,45 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
/**
* Returned when a guild's vanity_url_code is changed
*/
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when a guild's boost progress bar is enabled
*/
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = AuditLogChangeData<'premium_progress_bar_enabled', boolean>;
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<
'premium_progress_bar_enabled',
boolean
>;
/**
* Returned when new role(s) are added
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when role(s) are removed
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
*/
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
*/
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
*/
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>;
/**
* Returned when a guild's system_channel_flags is changed
*/
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<
'system_channel_flags',
GuildSystemChannelFlags
>;
@@ -586,48 +589,48 @@ export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
/**
* Returned when a guild's system_channel_id is changed
*/
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>;
/**
* Returned when a channel's position is changed
*/
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
*/
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
*/
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
*/
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
*/
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
*/
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>;
/**
* Returned when a channel's amount of seconds a user has to wait before sending another message
* is changed
*/
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a guild scheduled event's recurrence_rule is changed
* Returned when a guild scheduled event's recurrence_rule is changed
*/
export type APIAuditLogChangeKeyRecurrenceRule = AuditLogChangeData<
export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<
'recurrence_rule',
APIGuildScheduledEventRecurrenceRule
>;
@@ -635,173 +638,173 @@ export type APIAuditLogChangeKeyRecurrenceRule = AuditLogChangeData<
/**
* Returned when a permission bitfield is changed
*/
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>;
/**
* Returned when a role's color is changed
*/
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>;
/**
* Represents a change where the key is a snowflake.
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
* Currently, the only known instance of this is returned when permissions for a command were updated
*/
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>;
/**
* Returned when a role's hoist status is changed
*/
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
*/
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*/
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*/
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>;
/**
* Returned when an invite's code is changed
*/
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>;
/**
* Returned when an invite's or guild scheduled event's channel_id is changed
*/
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>;
/**
* Returned when an invite's inviter_id is changed
*/
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>;
/**
* Returned when an invite's max_uses is changed
*/
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
*/
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
*/
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
*/
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
*/
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
*/
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
*/
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>;
/**
* Returned when a user's avatar_hash is changed
*/
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
*/
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>;
/**
* The type of entity created
*/
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>;
/**
* Returned when an integration's enable_emoticons is changed
*/
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
*/
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
*/
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>;
/**
* Returned when a voice channel's user_limit is changed
*/
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>;
/**
* Returned when privacy level of a stage instance or guild scheduled event is changed
*/
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
/**
* Returned when a sticker's related emoji is changed
*/
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>;
/**
* Returned when a sticker's format_type is changed
*/
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>;
/**
* Empty string
*/
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>;
/**
* Returned when a sticker's availability is changed
*/
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>;
/**
* Returned when a sticker's guild_id is changed
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>;
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>;
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>;
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>;
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<
'default_auto_archive_duration',
number
>;
@@ -809,37 +812,40 @@ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
/**
* Returned when entity type of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
/**
* Returned when status of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>;
/**
* Returned when location of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>;
/**
* Returned when a user's timeout is changed
*/
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<
'communication_disabled_until',
string
>;
/**
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
*/
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
/**
* Returned when an auto moderation rule's event type is changed
*/
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>;
/**
* Returned when an auto moderation rule's trigger metadata is changed
*/
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<
'trigger_metadata',
APIAutoModerationRuleTriggerMetadata
>;
@@ -847,32 +853,32 @@ export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
/**
* Returned when an auto moderation rule's actions is changed
*/
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>;
/**
* Returned when an auto moderation rule's enabled status is changed
*/
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>;
/**
* Returned when an auto moderation rule's exempt roles is changed
*/
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>;
/**
* Returned when an auto moderation rule's exempt channels is changed
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>;
/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>;
/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<
'default_reaction_emoji',
APIGuildForumDefaultReactionEmoji
>;
@@ -880,13 +886,13 @@ export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>;
/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<
'default_thread_rate_limit_per_user',
number
>;
@@ -894,29 +900,29 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;
export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>;
/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;
export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>;
/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;
export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>;
/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;
export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>;
/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;
export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>;
interface AuditLogChangeData<K extends string, D> {
export interface APIAuditLogChangeData<K extends string, D> {
key: K;
/**
* The new value

View File

@@ -5,7 +5,7 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure}
*/
export interface APIAutoModerationRule {
/**
@@ -55,7 +55,7 @@ export interface APIAutoModerationRule {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
*/
export enum AutoModerationRuleTriggerType {
/**
@@ -81,14 +81,15 @@ export enum AutoModerationRuleTriggerType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata}
*/
export interface APIAutoModerationRuleTriggerMetadata {
/**
* Substrings which will be searched for in content (Maximum of 1000)
*
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
@@ -103,7 +104,8 @@ export interface APIAutoModerationRuleTriggerMetadata {
* Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
*
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
@@ -131,7 +133,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types}
*/
export enum AutoModerationRuleKeywordPresetType {
/**
@@ -149,7 +151,7 @@ export enum AutoModerationRuleKeywordPresetType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
*/
export enum AutoModerationRuleEventType {
/**
@@ -163,7 +165,7 @@ export enum AutoModerationRuleEventType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure}
*/
export interface APIAutoModerationAction {
/**
@@ -179,7 +181,7 @@ export interface APIAutoModerationAction {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
*/
export enum AutoModerationActionType {
/**
@@ -202,7 +204,7 @@ export enum AutoModerationActionType {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata}
*/
export interface APIAutoModerationActionMetadata {
/**

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,7 @@ export interface APIPartialEmoji {
}
/**
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure}
*/
export interface APIEmoji extends APIPartialEmoji {
/**

View File

@@ -10,7 +10,7 @@ import type { APIEmoji } from './emoji.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway}
*/
export interface APIGatewayInfo {
/**
@@ -20,25 +20,25 @@ export interface APIGatewayInfo {
}
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot}
*/
export interface APIGatewayBotInfo extends APIGatewayInfo {
/**
* The recommended number of shards to use when connecting
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
shards: number;
/**
* Information on the current session start limit
*
* See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
*/
session_start_limit: APIGatewaySessionStartLimit;
}
/**
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
*/
export interface APIGatewaySessionStartLimit {
/**
@@ -60,7 +60,7 @@ export interface APIGatewaySessionStartLimit {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
*/
export interface GatewayPresenceUpdate {
/**
@@ -69,7 +69,7 @@ export interface GatewayPresenceUpdate {
* **The user object within this event can be partial, the only field which must be sent is the `id` field,
* everything else is optional.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: Partial<APIUser> & Pick<APIUser, 'id'>;
/**
@@ -83,19 +83,19 @@ export interface GatewayPresenceUpdate {
/**
* User's current activities
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object}
*/
activities?: GatewayActivity[];
/**
* User's platform-dependent status
*
* See https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
client_status?: GatewayPresenceClientStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
*/
export enum PresenceUpdateStatus {
Online = 'online',
@@ -111,7 +111,7 @@ export enum PresenceUpdateStatus {
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
/**
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
export interface GatewayPresenceClientStatus {
/**
@@ -129,7 +129,7 @@ export interface GatewayPresenceClientStatus {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure}
*/
export interface GatewayActivity {
/**
@@ -143,7 +143,7 @@ export interface GatewayActivity {
/**
* Activity type
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
type: ActivityType;
/**
@@ -178,26 +178,26 @@ export interface GatewayActivity {
/**
* The emoji used for a custom status
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
emoji?: GatewayActivityEmoji;
session_id?: string;
/**
* Information for the current party of the player
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
party?: GatewayActivityParty;
/**
* Images for the presence and their hover texts
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
assets?: GatewayActivityAssets;
/**
* Secrets for Rich Presence joining and spectating
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
secrets?: GatewayActivitySecrets;
/**
@@ -207,9 +207,8 @@ export interface GatewayActivity {
/**
* Activity flags `OR`d together, describes what the payload includes
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: ActivityFlags;
/**
@@ -234,37 +233,37 @@ export enum ActivityPlatform {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
export enum ActivityType {
/**
* Playing {game}
* Playing \{game\}
*/
Playing,
/**
* Streaming {details}
* Streaming \{details\}
*/
Streaming,
/**
* Listening to {name}
* Listening to \{name\}
*/
Listening,
/**
* Watching {details}
* Watching \{details\}
*/
Watching,
/**
* {emoji} {state}
* \{emoji\} \{state\}
*/
Custom,
/**
* Competing in {name}
* Competing in \{name\}
*/
Competing,
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
export interface GatewayActivityTimestamps {
/**
@@ -278,12 +277,12 @@ export interface GatewayActivityTimestamps {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
export interface GatewayActivityParty {
/**
@@ -297,19 +296,19 @@ export interface GatewayActivityParty {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
*/
export enum ActivityFlags {
Instance = 1 << 0,
@@ -335,7 +334,7 @@ export interface GatewayActivityButton {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields}
*/
export interface GatewayThreadListSync {
/**
@@ -357,7 +356,7 @@ export interface GatewayThreadListSync {
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields}
*/
export interface GatewayThreadMembersUpdate {
/**

View File

@@ -12,7 +12,7 @@ import type { APISticker } from './sticker.ts';
import type { APIAvatarDecorationData, APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
*/
export interface APIUnavailableGuild {
/**
@@ -26,7 +26,7 @@ export interface APIUnavailableGuild {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
/**
@@ -36,19 +36,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
splash: string | null;
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner?: string | null;
/**
@@ -58,13 +58,13 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features?: GuildFeature[];
/**
* Verification level required for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level?: GuildVerificationLevel;
/**
@@ -74,19 +74,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIGuild extends APIPartialGuild {
/**
* Icon hash, returned when in the template object
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon_hash?: string | null;
/**
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
discovery_splash: string | null;
/**
@@ -104,14 +104,13 @@ export interface APIGuild extends APIPartialGuild {
*
* **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
permissions?: Permissions;
/**
* Voice region id for the guild
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
*
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
*/
region: string;
@@ -134,43 +133,43 @@ export interface APIGuild extends APIPartialGuild {
/**
* Verification level required for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level: GuildVerificationLevel;
/**
* Default message notifications level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
default_message_notifications: GuildDefaultMessageNotifications;
/**
* Explicit content filter level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
explicit_content_filter: GuildExplicitContentFilter;
/**
* Roles in the guild
*
* See https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles: APIRole[];
/**
* Custom guild emojis
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
*/
emojis: APIEmoji[];
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features: GuildFeature[];
/**
* Required MFA level for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
mfa_level: GuildMFALevel;
/**
@@ -184,7 +183,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* System channel flags
*
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
system_channel_flags: GuildSystemChannelFlags;
/**
@@ -210,13 +209,13 @@ export interface APIGuild extends APIPartialGuild {
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner: string | null;
/**
* Premium tier (Server Boost level)
*
* See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
premium_tier: GuildPremiumTier;
/**
@@ -226,7 +225,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
*
* @default "en-US"
* @defaultValue `"en-US"`
*/
preferred_locale: Locale;
/**
@@ -260,13 +259,13 @@ export interface APIGuild extends APIPartialGuild {
/**
* The nsfw level of the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
nsfw_level: GuildNSFWLevel;
/**
* Custom guild stickers
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
stickers: APISticker[];
/**
@@ -281,23 +280,27 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @default "en-US"
* @defaultValue `"en-US"`
*/
locale: Locale;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
export enum GuildDefaultMessageNotifications {
AllMessages,
@@ -305,7 +308,7 @@ export enum GuildDefaultMessageNotifications {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
export enum GuildExplicitContentFilter {
Disabled,
@@ -314,7 +317,7 @@ export enum GuildExplicitContentFilter {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
export enum GuildMFALevel {
None,
@@ -322,7 +325,7 @@ export enum GuildMFALevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
export enum GuildNSFWLevel {
Default,
@@ -332,7 +335,7 @@ export enum GuildNSFWLevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
export enum GuildVerificationLevel {
/**
@@ -358,7 +361,7 @@ export enum GuildVerificationLevel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
export enum GuildPremiumTier {
None,
@@ -374,7 +377,7 @@ export enum GuildHubType {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
export enum GuildSystemChannelFlags {
/**
@@ -396,7 +399,7 @@ export enum GuildSystemChannelFlags {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
export enum GuildFeature {
/**
@@ -410,7 +413,7 @@ export enum GuildFeature {
/**
* Guild is using the old permissions configuration behavior
*
* See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
* @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes}
*/
ApplicationCommandPermissionsV2 = 'APPLICATION_COMMAND_PERMISSIONS_V2',
/**
@@ -452,8 +455,7 @@ export enum GuildFeature {
/**
* Guild is a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
Hub = 'HUB',
@@ -468,8 +470,7 @@ export enum GuildFeature {
/**
* Guild is in a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
LinkedToHub = 'LINKED_TO_HUB',
@@ -551,7 +552,7 @@ export enum GuildFeature {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-preview-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object}
*/
export interface APIGuildPreview {
/**
@@ -565,31 +566,31 @@ export interface APIGuildPreview {
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
splash: string | null;
/**
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
discovery_splash: string | null;
/**
* Custom guild emojis
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
*/
emojis: APIEmoji[];
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features: GuildFeature[];
/**
@@ -611,7 +612,7 @@ export interface APIGuildPreview {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidgetSettings {
/**
@@ -625,7 +626,7 @@ export interface APIGuildWidgetSettings {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember {
/**
@@ -633,7 +634,7 @@ export interface APIGuildMember {
*
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
/**
@@ -651,7 +652,7 @@ export interface APIGuildMember {
/**
* Array of role object ids
*
* See https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles: Snowflake[];
/**
@@ -661,7 +662,7 @@ export interface APIGuildMember {
/**
* When the user started boosting the guild
*
* See https://support.discord.com/hc/articles/360028038352
* @see {@link https://support.discord.com/hc/articles/360028038352}
*/
premium_since?: string | null;
/**
@@ -689,13 +690,13 @@ export interface APIGuildMember {
/**
* The data for the member's guild avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
export enum GuildMemberFlags {
/**
@@ -732,6 +733,7 @@ export enum GuildMemberFlags {
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113}
*/
AutomodQuarantinedBio = 1 << 8,
/**
@@ -741,7 +743,7 @@ export enum GuildMemberFlags {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
export interface APIGuildIntegration {
/**
@@ -783,7 +785,7 @@ export interface APIGuildIntegration {
*
* **This field is not provided for `discord` bot integrations.**
*
* See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
expire_behavior?: IntegrationExpireBehavior;
/**
@@ -797,13 +799,13 @@ export interface APIGuildIntegration {
*
* **Some older integrations may not have an attached user.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user?: APIUser;
/**
* Integration account information
*
* See https://discord.com/developers/docs/resources/guild#integration-account-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
account: APIIntegrationAccount;
/**
@@ -827,7 +829,7 @@ export interface APIGuildIntegration {
/**
* The bot/OAuth2 application for discord integrations
*
* See https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*
* **This field is not provided for `discord` bot integrations.**
*/
@@ -841,7 +843,7 @@ export interface APIGuildIntegration {
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
export enum IntegrationExpireBehavior {
RemoveRole,
@@ -849,7 +851,7 @@ export enum IntegrationExpireBehavior {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-account-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
export interface APIIntegrationAccount {
/**
@@ -863,7 +865,7 @@ export interface APIIntegrationAccount {
}
/**
* https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*/
export interface APIGuildIntegrationApplication {
/**
@@ -877,7 +879,7 @@ export interface APIGuildIntegrationApplication {
/**
* The icon hash of the app
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
@@ -887,13 +889,13 @@ export interface APIGuildIntegrationApplication {
/**
* The bot associated with this application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
bot?: APIUser;
}
/**
* https://discord.com/developers/docs/resources/guild#ban-object
* @see {@link https://discord.com/developers/docs/resources/guild#ban-object}
*/
export interface APIBan {
/**
@@ -907,7 +909,7 @@ export interface APIBan {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidget {
id: Snowflake;
@@ -919,7 +921,7 @@ export interface APIGuildWidget {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetChannel {
id: Snowflake;
@@ -928,7 +930,7 @@ export interface APIGuildWidgetChannel {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetMember {
id: string;
@@ -941,7 +943,7 @@ export interface APIGuildWidgetMember {
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options}
*/
export enum GuildWidgetStyle {
/**
@@ -1041,7 +1043,7 @@ export enum MembershipScreeningFieldType {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure}
*/
export interface APIGuildOnboarding {
/**
@@ -1067,7 +1069,7 @@ export interface APIGuildOnboarding {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure}
*/
export interface APIGuildOnboardingPrompt {
/**
@@ -1102,7 +1104,7 @@ export interface APIGuildOnboardingPrompt {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure}
*/
export interface APIGuildOnboardingPromptOption {
/**
@@ -1132,7 +1134,7 @@ export interface APIGuildOnboardingPromptOption {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode}
*/
export enum GuildOnboardingMode {
/**
@@ -1146,9 +1148,28 @@ export enum GuildOnboardingMode {
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types}
*/
export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}
export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected
*/
dm_spam_detected_at?: string | null;
/**
* When the raid was detected
*/
raid_detected_at?: string | null;
}

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIUser } from './user.ts';
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
export interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
/**
* The id of the guild event
*/
@@ -74,7 +74,7 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure}
*/
export interface APIGuildScheduledEventRecurrenceRule {
/**
@@ -91,7 +91,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
frequency: GuildScheduledEventRecurrenceRuleFrequency;
/**
* The spacing between the events, defined by `frequency`.
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
* For example, `frequency` of {@link GuildScheduledEventRecurrenceRuleFrequency.Weekly} and an `interval` of `2`
* would be "every-other week"
*/
interval: number;
@@ -102,7 +102,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
/**
* List of specific days within a specific week (1-5) to recur on
*/
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
by_n_weekday: APIGuildScheduledEventRecurrenceRuleNWeekday[] | null;
/**
* Set of specific months to recur on
*/
@@ -122,7 +122,7 @@ export interface APIGuildScheduledEventRecurrenceRule {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency}
*/
export enum GuildScheduledEventRecurrenceRuleFrequency {
Yearly,
@@ -132,7 +132,7 @@ export enum GuildScheduledEventRecurrenceRuleFrequency {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday}
*/
export enum GuildScheduledEventRecurrenceRuleWeekday {
Monday,
@@ -145,7 +145,7 @@ export enum GuildScheduledEventRecurrenceRuleWeekday {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month}
*/
export enum GuildScheduledEventRecurrenceRuleMonth {
January = 1,
@@ -163,9 +163,9 @@ export enum GuildScheduledEventRecurrenceRuleMonth {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure}
*/
export interface GuildScheduledEventRecurrenceRuleNWeekday {
export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
/**
* The week to reoccur on.
*/
@@ -176,6 +176,11 @@ export interface GuildScheduledEventRecurrenceRuleNWeekday {
day: GuildScheduledEventRecurrenceRuleWeekday;
}
/**
* @deprecated Use {@link APIGuildScheduledEventRecurrenceRuleNWeekday} instead
*/
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
export interface APIStageInstanceGuildScheduledEvent
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
channel_id: Snowflake;
@@ -194,7 +199,7 @@ export interface APIExternalGuildScheduledEvent
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure}
*/
export type APIGuildScheduledEvent =
| APIExternalGuildScheduledEvent
@@ -202,7 +207,7 @@ export type APIGuildScheduledEvent =
| APIVoiceGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata}
*/
export interface APIGuildScheduledEventEntityMetadata {
/**
@@ -212,7 +217,7 @@ export interface APIGuildScheduledEventEntityMetadata {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types}
*/
export enum GuildScheduledEventEntityType {
StageInstance = 1,
@@ -221,7 +226,7 @@ export enum GuildScheduledEventEntityType {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status}
*/
export enum GuildScheduledEventStatus {
Scheduled = 1,
@@ -231,7 +236,7 @@ export enum GuildScheduledEventStatus {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level}
*/
export enum GuildScheduledEventPrivacyLevel {
/**
@@ -241,7 +246,7 @@ export enum GuildScheduledEventPrivacyLevel {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure}
*/
export interface APIGuildScheduledEventUser {
/**

View File

@@ -29,7 +29,7 @@ export * from './_interactions/ping.ts';
export * from './_interactions/responses.ts';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIInteraction =
| APIApplicationCommandAutocompleteInteraction
@@ -39,7 +39,7 @@ export type APIInteraction =
| APIPingInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIDMInteraction =
| APIApplicationCommandAutocompleteDMInteraction
@@ -48,7 +48,7 @@ export type APIDMInteraction =
| APIModalSubmitDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIGuildInteraction =
| APIApplicationCommandAutocompleteGuildInteraction

View File

@@ -25,7 +25,7 @@ export type APIInviteGuild = Pick<
>;
/**
* https://discord.com/developers/docs/resources/invite#invite-object
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object}
*/
export interface APIInvite {
/**
@@ -35,37 +35,37 @@ export interface APIInvite {
/**
* The guild this invite is for
*
* See https://discord.com/developers/docs/resources/guild#guild-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object}
*/
guild?: APIInviteGuild;
/**
* The channel this invite is for
*
* See https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
channel: Required<APIPartialChannel> | null;
/**
* The user who created the invite
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
inviter?: APIUser;
/**
* The type of target for this voice channel invite
*
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
*/
target_type?: InviteTargetType;
/**
* The user whose stream to display for this voice channel stream invite
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
target_user?: APIUser;
/**
* The embedded application to open for this voice channel embedded application invite
*
* See https://discord.com/developers/docs/resources/application#application-object
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
*/
target_application?: Partial<APIApplication>;
/**
@@ -84,6 +84,7 @@ export interface APIInvite {
* The stage instance data if there is a public stage instance in the stage channel this invite is for
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
*/
stage_instance?: APIInviteStageInstance;
/**
@@ -97,7 +98,7 @@ export interface APIInvite {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types}
*/
export enum InviteType {
Guild,
@@ -106,7 +107,7 @@ export enum InviteType {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
*/
export enum InviteTargetType {
Stream = 1,
@@ -114,7 +115,7 @@ export enum InviteTargetType {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
* @see {@link https://discord.com/developers/docs/resources/invite#invite-metadata-object}
*/
export interface APIExtendedInvite extends APIInvite {
/**

View File

@@ -1,7 +1,7 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure}
*/
export interface APIEntitlement {
/**
@@ -47,7 +47,7 @@ export interface APIEntitlement {
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types}
*/
export enum EntitlementType {
/**
@@ -85,7 +85,7 @@ export enum EntitlementType {
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure}
*/
export interface APISKU {
/**
@@ -111,13 +111,13 @@ export interface APISKU {
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags}
*/
export enum SKUFlags {
/**
@@ -136,7 +136,7 @@ export enum SKUFlags {
}
/**
* https://discord.com/developers/docs/resources/sku#sku-object-sku-types
* @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
*/
export enum SKUType {
/**
@@ -158,7 +158,7 @@ export enum SKUType {
}
/**
* https://discord.com/developers/docs/resources/subscription#subscription-object
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-object}
*/
export interface APISubscription {
/**
@@ -204,7 +204,7 @@ export interface APISubscription {
}
/**
* https://discord.com/developers/docs/resources/subscription#subscription-statuses
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses}
*/
export enum SubscriptionStatus {
/**

View File

@@ -8,10 +8,10 @@ export enum OAuth2Scopes {
*/
Bot = 'bot',
/**
* Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
* Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`}
* to return linked third-party accounts
*
* See https://discord.com/developers/docs/resources/user#get-user-connections
* @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}
*/
Connections = 'connections',
/**
@@ -19,41 +19,41 @@ export enum OAuth2Scopes {
*/
DMChannelsRead = 'dm_channels.read',
/**
* Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
* Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email`
*
* See https://discord.com/developers/docs/resources/user#get-current-user
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
*/
Email = 'email',
/**
* Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email`
*
* See https://discord.com/developers/docs/resources/user#get-current-user
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
*/
Identify = 'identify',
/**
* Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`}
* to return basic information about all of a user's guilds
*
* See https://discord.com/developers/docs/resources/user#get-current-user-guilds
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
*/
Guilds = 'guilds',
/**
* Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
* Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`}
* to be used for joining users to a guild
*
* See https://discord.com/developers/docs/resources/guild#add-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
*/
GuildsJoin = 'guilds.join',
/**
* Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
* Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild
*
* See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
*/
GuildsMembersRead = 'guilds.members.read',
/**
* Allows your app to join users to a group dm
*
* See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
*/
GroupDMJoins = 'gdm.join',
/**
@@ -108,25 +108,25 @@ export enum OAuth2Scopes {
/**
* Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
*
* See https://discord.com/developers/docs/game-sdk/activities
* @see {@link https://discord.com/developers/docs/game-sdk/activities}
*/
ActivitiesWrite = 'activities.write',
/**
* Allows your app to use Application Commands in a guild
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationsCommands = 'applications.commands',
/**
* Allows your app to update its Application Commands via this bearer token - client credentials grant only
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationsCommandsUpdate = 'applications.commands.update',
/**
* Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
*
* See https://discord.com/developers/docs/interactions/application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
*/
ApplicationCommandsPermissionsUpdate = 'applications.commands.permissions.update',
}

View File

@@ -5,7 +5,7 @@
import type { Permissions, Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
export interface APIRole {
/**
@@ -39,7 +39,7 @@ export interface APIRole {
/**
* Permission bit set
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
permissions: Permissions;
/**
@@ -61,7 +61,7 @@ export interface APIRole {
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure}
*/
export interface APIRoleTags {
/**
@@ -91,7 +91,7 @@ export interface APIRoleTags {
}
/**
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags}
*/
export enum RoleFlags {
/**

View File

@@ -5,7 +5,7 @@
import type { APIPartialEmoji } from './emoji.ts';
/**
* https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
*/
export interface APIPoll {
/**
@@ -23,13 +23,13 @@ export interface APIPoll {
/**
* Whether a user can select multiple answers
*
* @default false
* @defaultValue `false`
*/
allow_multiselect: boolean;
/**
* The layout type of the poll
*
* @default PollLayoutType.Default
* @defaultValue `PollLayoutType.Default`
*/
layout_type: PollLayoutType;
/**
@@ -39,7 +39,7 @@ export interface APIPoll {
}
/**
* https://discord.com/developers/docs/resources/poll#layout-type
* @see {@link https://discord.com/developers/docs/resources/poll#layout-type}
*/
export enum PollLayoutType {
/**
@@ -49,7 +49,7 @@ export enum PollLayoutType {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure}
*/
export interface APIPollMedia {
/**
@@ -65,7 +65,7 @@ export interface APIPollMedia {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
*/
export interface APIPollAnswer {
/**
@@ -79,7 +79,7 @@ export interface APIPollAnswer {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure}
*/
export interface APIPollResults {
/**
@@ -93,7 +93,7 @@ export interface APIPollResults {
}
/**
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure}
*/
export interface APIPollAnswerCount {
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object
* @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object}
*/
export interface APISoundboardSound {
/**

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object}
*/
export interface APIStageInstance {
/**
@@ -24,13 +24,14 @@ export interface APIStageInstance {
/**
* The privacy level of the stage instance
*
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
*/
privacy_level: StageInstancePrivacyLevel;
/**
* Whether or not stage discovery is disabled
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
*/
discoverable_disabled: boolean;
/**
@@ -40,13 +41,14 @@ export interface APIStageInstance {
}
/**
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
*/
export enum StageInstancePrivacyLevel {
/**
* The stage instance is visible publicly, such as on stage discovery
*
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
*/
Public = 1,
/**
@@ -56,9 +58,9 @@ export enum StageInstancePrivacyLevel {
}
/**
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
*
* @see {@link https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure}
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
*/
export interface APIInviteStageInstance {
/**
@@ -76,7 +78,7 @@ export interface APIInviteStageInstance {
/**
* The members speaking in the stage
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure}
*/
members: APIGuildMember[];
}

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
export interface APISticker {
/**
@@ -32,20 +32,20 @@ export interface APISticker {
/**
* Previously the sticker asset hash, now an empty string
*
* @deprecated
* @deprecated This field is no longer documented by Discord and will be removed in v11
* @unstable This field is no longer documented by Discord and will be removed in v11
*/
asset?: '';
/**
* Type of sticker
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
*/
type: StickerType;
/**
* Type of sticker format
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
*/
format_type: StickerFormatType;
/**
@@ -67,7 +67,7 @@ export interface APISticker {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
*/
export enum StickerType {
/**
@@ -81,7 +81,7 @@ export enum StickerType {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
*/
export enum StickerFormatType {
PNG = 1,
@@ -91,12 +91,12 @@ export enum StickerFormatType {
}
/**
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object}
*/
export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>;
/**
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-pack-object}
*/
export interface APIStickerPack {
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
*/
export interface APITeam {
/**
@@ -32,19 +32,19 @@ export interface APITeam {
}
/**
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-member-object}
*/
export interface APITeamMember {
/**
* The user's membership state on the team
*
* See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
*/
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
* @deprecated Use {@link APITeamMember.role} instead.
*/
permissions: ['*'];
/**
@@ -54,19 +54,19 @@ export interface APITeamMember {
/**
* The avatar, discriminator, id, and username of the user
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles}
*/
role: TeamMemberRole;
}
/**
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
*/
export enum TeamMemberMembershipState {
Invited = 1,
@@ -74,7 +74,7 @@ export enum TeamMemberMembershipState {
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
*/
export enum TeamMemberRole {
Admin = 'admin',

View File

@@ -8,7 +8,7 @@ import type { RESTPostAPIGuildsJSONBody } from '../../rest/v9/mod.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/guild-template#template-object
* @see {@link https://discord.com/developers/docs/resources/guild-template#template-object}
*/
export interface APITemplate {
/**
@@ -34,7 +34,7 @@ export interface APITemplate {
/**
* The user who created the template
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
creator: APIUser;
/**

View File

@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildIntegration } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
export interface APIUser {
/**
@@ -28,7 +28,7 @@ export interface APIUser {
/**
* The user's avatar hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
avatar: string | null;
/**
@@ -46,7 +46,7 @@ export interface APIUser {
/**
* The user's banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner?: string | null;
/**
@@ -68,39 +68,38 @@ export interface APIUser {
/**
* The flags on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
flags?: UserFlags;
/**
* The type of Nitro subscription on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-premium-types
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
*/
premium_type?: UserPremiumType;
/**
* The public flags on a user's account
*
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
public_flags?: UserFlags;
/**
* The user's avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
*
* @deprecated Use `avatar_decoration_data` instead
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
* @deprecated Use {@link APIUser.avatar_decoration_data} instead
*/
avatar_decoration?: string | null;
/**
* The data for the user's avatar decoration
*
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
* https://discord.com/developers/docs/resources/user#user-object-user-flags
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
*/
export enum UserFlags {
/**
@@ -144,7 +143,7 @@ export enum UserFlags {
*/
PremiumEarlySupporter = 1 << 9,
/**
* User is a [team](https://discord.com/developers/docs/topics/teams)
* User is a {@link https://discord.com/developers/docs/topics/teams | team}
*/
TeamPseudoUser = 1 << 10,
/**
@@ -168,7 +167,7 @@ export enum UserFlags {
*/
CertifiedModerator = 1 << 18,
/**
* Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
* Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list
*/
BotHTTPInteractions = 1 << 19,
/**
@@ -182,36 +181,36 @@ export enum UserFlags {
*/
DisablePremium = 1 << 21,
/**
* User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
*/
ActiveDeveloper = 1 << 22,
/**
* User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
* User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | 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.
* @privateRemarks
*
* This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints
*/
Quarantined = 17_592_186_044_416,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints
*/
Collaborator = 1_125_899_906_842_624,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @privateRemarks
*
* This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
* This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints
*/
RestrictedCollaborator = 2_251_799_813_685_248,
}
/**
* https://discord.com/developers/docs/resources/user#user-object-premium-types
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
*/
export enum UserPremiumType {
None,
@@ -221,7 +220,7 @@ export enum UserPremiumType {
}
/**
* https://discord.com/developers/docs/resources/user#connection-object
* @see {@link https://discord.com/developers/docs/resources/user#connection-object}
*/
export interface APIConnection {
/**
@@ -235,7 +234,7 @@ export interface APIConnection {
/**
* The service of the connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-services
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-services}
*/
type: ConnectionService;
/**
@@ -245,7 +244,7 @@ export interface APIConnection {
/**
* An array of partial server integrations
*
* See https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
integrations?: Partial<APIGuildIntegration>[];
/**
@@ -267,7 +266,7 @@ export interface APIConnection {
/**
* Visibility of this connection
*
* See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-visibility-types}
*/
visibility: ConnectionVisibility;
}
@@ -298,7 +297,7 @@ export enum ConnectionService {
Twitch = 'twitch',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
* @deprecated This is the old name for {@link ConnectionService.X}
*/
Twitter = X,
Xbox = 'xbox',
@@ -317,7 +316,7 @@ export enum ConnectionVisibility {
}
/**
* https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure
* @see {@link https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure}
*/
export interface APIApplicationRoleConnection {
/**
@@ -335,13 +334,13 @@ export interface APIApplicationRoleConnection {
}
/**
* https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
export interface APIAvatarDecorationData {
/**
* The avatar decoration hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
asset: string;
/**

View File

@@ -6,14 +6,13 @@ import type { Snowflake } from '../../globals.ts';
import type { APIGuildMember } from './guild.ts';
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
* @deprecated This is deprecated, use {@link APIVoiceState}
*/
export type GatewayVoiceState = APIVoiceState;
/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
*/
export interface APIVoiceState {
/**
@@ -31,7 +30,7 @@ export interface APIVoiceState {
/**
* The guild member this voice state is for
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
member?: APIGuildMember;
/**
@@ -73,7 +72,7 @@ export interface APIVoiceState {
}
/**
* https://discord.com/developers/docs/resources/voice#voice-region-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
*/
export interface APIVoiceRegion {
/**

View File

@@ -14,7 +14,7 @@ import type {
} from './mod.ts';
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
*/
export interface APIWebhook {
/**
@@ -24,7 +24,7 @@ export interface APIWebhook {
/**
* The type of the webhook
*
* See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
*/
type: WebhookType;
/**
@@ -38,7 +38,7 @@ export interface APIWebhook {
/**
* The user this webhook was created by (not returned when getting a webhook with its token)
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user?: APIUser;
/**
@@ -72,14 +72,14 @@ export interface APIWebhook {
}
/**
* https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads}
*/
export type APIWebhookEvent =
| APIWebhookEventBase<ApplicationWebhookType.Event, APIWebhookEventBody>
| APIWebhookEventBase<ApplicationWebhookType.Ping, never>;
/**
* https://discord.com/developers/docs/events/webhook-events#event-body-object
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-body-object}
*/
export type APIWebhookEventBody =
| APIWebhookEventEventBase<
@@ -112,7 +112,7 @@ export type APIWebhookEventEntitlementCreateData = APIEntitlement;
export type APIWebhookEventQuestUserEnrollmentData = never;
interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
/**
* Version scheme for the webhook event. Currently always `1`
*/
@@ -132,7 +132,7 @@ interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
}
/**
* https://discord.com/developers/docs/events/webhook-events#webhook-types
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types}
*/
export enum ApplicationWebhookType {
/**
@@ -145,7 +145,7 @@ export enum ApplicationWebhookType {
Event,
}
interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> {
export interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> {
/**
* Event type
*/
@@ -161,7 +161,7 @@ interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Dat
}
/**
* https://discord.com/developers/docs/events/webhook-events#event-types
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-types}
*/
export enum ApplicationWebhookEventType {
/**
@@ -179,7 +179,7 @@ export enum ApplicationWebhookEventType {
}
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
*/
export enum WebhookType {
/**

6
deno/rest/common.ts generated
View File

@@ -1,5 +1,5 @@
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes}
*/
export enum RESTJSONErrorCodes {
GeneralError,
@@ -325,7 +325,7 @@ export enum RESTJSONErrorCodes {
}
/**
* https://discord.com/developers/docs/reference#locales
* @see {@link https://discord.com/developers/docs/reference#locales}
*/
export enum Locale {
Indonesian = 'id',
@@ -363,6 +363,6 @@ export enum Locale {
}
/**
* @deprecated Use {@apilink Locale} instead.
* @deprecated Use {@link Locale} instead.
*/
export type LocaleString = `${Locale}`;

View File

@@ -1,31 +1,31 @@
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
import type { _Nullable, _StrictPartial } from '../../utils/internals.ts';
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}
*/
export type RESTGetAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
*/
export type RESTPutAPIApplicationRoleConnectionMetadataJSONBody = APIApplicationRoleConnectionMetadata[];
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}
*/
export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRoleConnectionMetadata[];
/**
* https://discord.com/developers/docs/resources/application#get-current-application
* @see {@link https://discord.com/developers/docs/resources/application#get-current-application}
*/
export type RESTGetCurrentApplicationResult = APIApplication;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
Pick<
APIApplication,
| 'custom_install_url'
@@ -40,6 +40,6 @@ export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
>;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
*/
export type RESTPatchCurrentApplicationResult = APIApplication;

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIAuditLog, AuditLogEvent } from '../../payloads/v10/auditLog.ts';
/**
* https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
* @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}
*/
export interface RESTGetAPIAuditLogQuery {
/**
@@ -24,7 +24,7 @@ export interface RESTGetAPIAuditLogQuery {
/**
* How many entries are returned (default 50, minimum 1, maximum 100)
*
* @default 50
* @defaultValue `50`
*/
limit?: number;
}

View File

@@ -8,17 +8,17 @@ import type {
} from '../../payloads/v10/mod.ts';
/**
* https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}
*/
export type RESTGetAPIAutoModerationRulesResult = APIAutoModerationRule[];
/**
* https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}
*/
export type RESTGetAPIAutoModerationRuleResult = APIAutoModerationRule;
/**
* https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
*/
export interface RESTPostAPIAutoModerationRuleJSONBody {
/**
@@ -36,7 +36,7 @@ export interface RESTPostAPIAutoModerationRuleJSONBody {
/**
* The rule trigger metadata
*
* Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.HarmfulLink} or {@link AutoModerationRuleTriggerType.Spam}
* Can be omitted if the trigger type is {@link AutoModerationRuleTriggerType.Spam}
*/
trigger_metadata?: APIAutoModerationRuleTriggerMetadata | undefined;
/**
@@ -46,7 +46,7 @@ export interface RESTPostAPIAutoModerationRuleJSONBody {
/**
* Whether this rule is enabled
*
* @default false
* @defaultValue `false`
*/
enabled?: boolean | undefined;
/**
@@ -60,12 +60,12 @@ export interface RESTPostAPIAutoModerationRuleJSONBody {
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}
*/
export type RESTPostAPIAutoModerationRuleResult = APIAutoModerationRule;
/**
* https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
*/
export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<
Partial<RESTPostAPIAutoModerationRuleJSONBody>,
@@ -73,11 +73,11 @@ export type RESTPatchAPIAutoModerationRuleJSONBody = Omit<
>;
/**
* https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}
*/
export type RESTPatchAPIAutoModerationRuleResult = APIAutoModerationRule;
/**
* https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule}
*/
export type RESTDeleteAPIAutoModerationRuleResult = never;

184
deno/rest/v10/channel.ts generated
View File

@@ -1,13 +1,11 @@
import type { Permissions, Snowflake } from '../../globals.ts';
import type {
APIActionRowComponent,
APIAllowedMentions,
APIChannel,
APIEmbed,
APIExtendedInvite,
APIFollowedChannel,
APIMessage,
APIMessageActionRowComponent,
APIMessageReference,
APIThreadList,
APIThreadMember,
@@ -25,8 +23,9 @@ import type {
ForumLayoutType,
ChannelFlags,
APIAttachment,
APIMessageTopLevelComponent,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals.ts';
import type { RESTAPIPoll } from './poll.ts';
export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
@@ -39,12 +38,12 @@ export interface RESTAPIChannelPatchOverwrite extends RESTPutAPIChannelPermissio
export type APIChannelPatchOverwrite = RESTAPIChannelPatchOverwrite;
/**
* https://discord.com/developers/docs/resources/channel#get-channel
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel}
*/
export type RESTGetAPIChannelResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/channel#modify-channel
* @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}
*/
export interface RESTPatchAPIChannelJSONBody {
/**
@@ -114,13 +113,13 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* Voice region id for the voice or stage channel, automatic when set to `null`
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
*/
rtc_region?: string | null | undefined;
/**
* The camera video quality mode of the voice channel
*
* See https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes}
*/
video_quality_mode?: VideoQualityMode | null | undefined;
/**
@@ -197,17 +196,17 @@ export interface RESTPatchAPIChannelJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#modify-channel
* @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}
*/
export type RESTPatchAPIChannelResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/channel#deleteclose-channel
* @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel}
*/
export type RESTDeleteAPIChannelResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/channel#get-channel-messages
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
*/
export interface RESTGetAPIChannelMessagesQuery {
/**
@@ -225,32 +224,32 @@ export interface RESTGetAPIChannelMessagesQuery {
/**
* Max number of messages to return (1-100)
*
* @default 50
* @defaultValue `50`
*/
limit?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#get-channel-messages
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}
*/
export type RESTGetAPIChannelMessagesResult = APIMessage[];
/**
* https://discord.com/developers/docs/resources/channel#get-channel-message
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}
*/
export type RESTGetAPIChannelMessageResult = APIMessage;
/**
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
* @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure}
*/
export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
export type RESTAPIMessageReference = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Required<Pick<APIMessageReference, 'message_id'>>
> &
StrictPartial<APIMessageReference> & {
_StrictPartial<APIMessageReference> & {
/**
* Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
*
* @default true
* @defaultValue `true`
*/
fail_if_not_exists?: boolean | undefined;
};
@@ -261,7 +260,7 @@ export type RESTAPIMessageReference = AddUndefinedToPossiblyUndefinedPropertiesO
export type APIMessageReferenceSend = RESTAPIMessageReference;
/**
* https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*/
export type RESTAPIAttachment = Partial<
Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>
@@ -273,7 +272,7 @@ export type RESTAPIAttachment = Partial<
};
/**
* https://discord.com/developers/docs/resources/channel#create-message
* @see {@link https://discord.com/developers/docs/resources/channel#create-message}
*/
export interface RESTPostAPIChannelMessageJSONBody {
/**
@@ -291,31 +290,31 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* Embedded `rich` content (up to 6000 characters)
*
* See https://discord.com/developers/docs/resources/channel#embed-object
* @see {@link https://discord.com/developers/docs/resources/channel#embed-object}
*/
embeds?: APIEmbed[] | undefined;
/**
* Allowed mentions for a message
*
* See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
* @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object}
*/
allowed_mentions?: APIAllowedMentions | undefined;
/**
* Include to make your message a reply or a forward
*
* See https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
* @see {@link https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure}
*/
message_reference?: RESTAPIMessageReference | undefined;
/**
* The components to include with the message
*
* See https://discord.com/developers/docs/interactions/message-components#component-object
* @see {@link https://discord.com/developers/docs/interactions/message-components#component-object}
*/
components?: APIActionRowComponent<APIMessageActionRowComponent>[] | undefined;
components?: APIMessageTopLevelComponent[] | undefined;
/**
* IDs of up to 3 stickers in the server to send in the message
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
sticker_ids?: [Snowflake, Snowflake, Snowflake] | [Snowflake, Snowflake] | [Snowflake] | undefined;
/**
@@ -338,7 +337,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
* @see {@link https://discord.com/developers/docs/resources/channel#create-message}
*/
export type RESTPostAPIChannelMessageFormDataBody =
| (Record<`files[${bigint}]`, unknown> & {
@@ -350,22 +349,22 @@ export type RESTPostAPIChannelMessageFormDataBody =
| (Record<`files[${bigint}]`, unknown> & RESTPostAPIChannelMessageJSONBody);
/**
* https://discord.com/developers/docs/resources/channel#create-message
* @see {@link https://discord.com/developers/docs/resources/channel#create-message}
*/
export type RESTPostAPIChannelMessageResult = APIMessage;
/**
* https://discord.com/developers/docs/resources/channel#crosspost-message
* @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}
*/
export type RESTPostAPIChannelMessageCrosspostResult = APIMessage;
/**
* https://discord.com/developers/docs/resources/channel#create-reaction
* @see {@link https://discord.com/developers/docs/resources/channel#create-reaction}
*/
export type RESTPutAPIChannelMessageReactionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#delete-own-reaction
* @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction}
*/
export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
@@ -375,12 +374,12 @@ export type RESTDeleteAPIChannelMessageOwnReactionResult = never;
export type RESTDeleteAPIChannelMessageOwnReaction = RESTDeleteAPIChannelMessageOwnReactionResult;
/**
* https://discord.com/developers/docs/resources/channel#delete-user-reaction
* @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction}
*/
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
* @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
/**
@@ -394,13 +393,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
/**
* Max number of users to return (1-100)
*
* @default 25
* @defaultValue `25`
*/
limit?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types
* @see {@link https://discord.com/developers/docs/resources/channel#get-reactions-reaction-types}
*/
export enum ReactionType {
Normal,
@@ -408,22 +407,22 @@ export enum ReactionType {
}
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
* @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}
*/
export type RESTGetAPIChannelMessageReactionUsersResult = APIUser[];
/**
* https://discord.com/developers/docs/resources/channel#delete-all-reactions
* @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions}
*/
export type RESTDeleteAPIChannelAllMessageReactionsResult = never;
/**
* https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
* @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji}
*/
export type RESTDeleteAPIChannelMessageReactionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#edit-message
* @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
*/
export interface RESTPatchAPIChannelMessageJSONBody {
/**
@@ -433,7 +432,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
/**
* Embedded `rich` content (up to 6000 characters)
*
* See https://discord.com/developers/docs/resources/channel#embed-object
* @see {@link https://discord.com/developers/docs/resources/channel#embed-object}
*/
embeds?: APIEmbed[] | null | undefined;
/**
@@ -442,13 +441,13 @@ export interface RESTPatchAPIChannelMessageJSONBody {
* When specifying flags, ensure to include all previously set flags/bits
* in addition to ones that you are modifying
*
* See https://discord.com/developers/docs/resources/channel#message-object-message-flags
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
*/
flags?: MessageFlags | null | undefined;
/**
* Allowed mentions for the message
*
* See https://discord.com/developers/docs/resources/channel#allowed-mentions-object
* @see {@link https://discord.com/developers/docs/resources/channel#allowed-mentions-object}
*/
allowed_mentions?: APIAllowedMentions | null | undefined;
/**
@@ -456,19 +455,19 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
*
* See https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure
* @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure}
*/
attachments?: RESTAPIAttachment[] | undefined;
/**
* The components to include with the message
*
* See https://discord.com/developers/docs/interactions/message-components#component-object
* @see {@link https://discord.com/developers/docs/interactions/message-components#component-object}
*/
components?: APIActionRowComponent<APIMessageActionRowComponent>[] | null | undefined;
components?: APIMessageTopLevelComponent[] | null | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#edit-message
* @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
*/
export type RESTPatchAPIChannelMessageFormDataBody =
| (Record<`files[${bigint}]`, unknown> & {
@@ -480,17 +479,17 @@ export type RESTPatchAPIChannelMessageFormDataBody =
| (Record<`files[${bigint}]`, unknown> & RESTPatchAPIChannelMessageJSONBody);
/**
* https://discord.com/developers/docs/resources/channel#edit-message
* @see {@link https://discord.com/developers/docs/resources/channel#edit-message}
*/
export type RESTPatchAPIChannelMessageResult = APIMessage;
/**
* https://discord.com/developers/docs/resources/channel#delete-message
* @see {@link https://discord.com/developers/docs/resources/channel#delete-message}
*/
export type RESTDeleteAPIChannelMessageResult = never;
/**
* https://discord.com/developers/docs/resources/channel#bulk-delete-messages
* @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}
*/
export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
/**
@@ -500,28 +499,26 @@ export interface RESTPostAPIChannelMessagesBulkDeleteJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#bulk-delete-messages
* @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}
*/
export type RESTPostAPIChannelMessagesBulkDeleteResult = never;
/**
* https://discord.com/developers/docs/resources/channel#edit-channel-permissions
* @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
*/
export interface RESTPutAPIChannelPermissionJSONBody {
/**
* The bitwise value of all allowed permissions
*
* See https://en.wikipedia.org/wiki/Bit_field
*
* @default "0"
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
* @defaultValue `"0"`
*/
allow?: Permissions | null | undefined;
/**
* The bitwise value of all disallowed permissions
*
* See https://en.wikipedia.org/wiki/Bit_field
*
* @default "0"
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
* @defaultValue `"0"`
*/
deny?: Permissions | null | undefined;
/**
@@ -531,48 +528,48 @@ export interface RESTPutAPIChannelPermissionJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#edit-channel-permissions
* @see {@link https://discord.com/developers/docs/resources/channel#edit-channel-permissions}
*/
export type RESTPutAPIChannelPermissionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#get-channel-invites
* @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}
*/
export type RESTGetAPIChannelInvitesResult = APIExtendedInvite[];
/**
* https://discord.com/developers/docs/resources/channel#create-channel-invite
* @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
*/
export interface RESTPostAPIChannelInviteJSONBody {
/**
* Duration of invite in seconds before expiry, or 0 for never
*
* @default 86400 (24 hours)
* @defaultValue `86400` (24 hours)
*/
max_age?: number | undefined;
/**
* Max number of uses or 0 for unlimited
*
* @default 0
* @defaultValue `0`
*/
max_uses?: number | undefined;
/**
* Whether this invite only grants temporary membership
*
* @default false
* @defaultValue `false`
*/
temporary?: boolean | undefined;
/**
* If true, don't try to reuse a similar invite
* (useful for creating many unique one time use invites)
*
* @default false
* @defaultValue `false`
*/
unique?: boolean | undefined;
/**
* The type of target for this voice channel invite
*
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
*/
target_type?: InviteTargetType | undefined;
/**
@@ -590,17 +587,17 @@ export interface RESTPostAPIChannelInviteJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#create-channel-invite
* @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}
*/
export type RESTPostAPIChannelInviteResult = APIExtendedInvite;
/**
* https://discord.com/developers/docs/resources/channel#delete-channel-permission
* @see {@link https://discord.com/developers/docs/resources/channel#delete-channel-permission}
*/
export type RESTDeleteAPIChannelPermissionResult = never;
/**
* https://discord.com/developers/docs/resources/channel#follow-news-channel
* @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel}
*/
export interface RESTPostAPIChannelFollowersJSONBody {
/**
@@ -610,32 +607,32 @@ export interface RESTPostAPIChannelFollowersJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#follow-news-channel
* @see {@link https://discord.com/developers/docs/resources/channel#follow-news-channel}
*/
export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
/**
* https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
* @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
*/
export type RESTPostAPIChannelTypingResult = never;
/**
* https://discord.com/developers/docs/resources/channel#get-pinned-messages
* @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
*/
export type RESTGetAPIChannelPinsResult = APIMessage[];
/**
* https://discord.com/developers/docs/resources/channel#pin-message
* @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
*/
export type RESTPutAPIChannelPinResult = never;
/**
* https://discord.com/developers/docs/resources/channel#unpin-message
* @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
*/
export type RESTDeleteAPIChannelPinResult = never;
/**
* https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
*/
export interface RESTPutAPIChannelRecipientJSONBody {
/**
@@ -649,17 +646,17 @@ export interface RESTPutAPIChannelRecipientJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
*/
export type RESTPutAPIChannelRecipientResult = unknown;
/**
* https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
*/
export type RESTDeleteAPIChannelRecipientResult = unknown;
/**
* https://discord.com/developers/docs/resources/channel#start-thread-from-message
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -677,7 +674,7 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
@@ -691,7 +688,7 @@ export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThr
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel}
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
@@ -701,12 +698,12 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-from-message
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}
*/
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
*/
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
/**
@@ -715,9 +712,8 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
* In API v9 and v10, `type` defaults to `PRIVATE_THREAD`.
* In a future API version this will be changed to be a required field, with no default.
*
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*
* @default ChannelType.PrivateThread
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
* @defaultValue `ChannelType.PrivateThread`
*/
type?: ThreadChannelType | undefined;
/**
@@ -727,22 +723,22 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
*/
export type RESTPostAPIChannelThreadsResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/channel#join-thread
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
*/
export type RESTPutAPIChannelThreadMembersResult = never;
/**
* https://discord.com/developers/docs/resources/channel#leave-thread
* @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}
*/
export type RESTDeleteAPIChannelThreadMembersResult = never;
/**
* https://discord.com/developers/docs/resources/channel#get-thread-member
* @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
*/
export interface RESTGetAPIChannelThreadMemberQuery {
/**
@@ -752,12 +748,12 @@ export interface RESTGetAPIChannelThreadMemberQuery {
}
/**
* https://discord.com/developers/docs/resources/channel#get-thread-member
* @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}
*/
export type RESTGetAPIChannelThreadMemberResult = APIThreadMember;
/**
* https://discord.com/developers/docs/resources/channel#list-thread-members
* @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
*/
export interface RESTGetAPIChannelThreadMembersQuery {
/**
@@ -775,12 +771,12 @@ export interface RESTGetAPIChannelThreadMembersQuery {
}
/**
* https://discord.com/developers/docs/resources/channel#list-thread-members
* @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}
*/
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
* @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
*/
export interface RESTGetAPIChannelThreadsArchivedQuery {
/**
@@ -794,17 +790,17 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
}
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
* @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}
*/
export type RESTGetAPIChannelThreadsArchivedPublicResult = RESTGetAPIChannelUsersThreadsArchivedResult;
/**
* https://discord.com/developers/docs/resources/channel#list-private-archived-threads
* @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}
*/
export type RESTGetAPIChannelThreadsArchivedPrivateResult = RESTGetAPIChannelUsersThreadsArchivedResult;
/**
* https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
* @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}
*/
export interface RESTGetAPIChannelUsersThreadsArchivedResult extends APIThreadList {
/**

30
deno/rest/v10/emoji.ts generated
View File

@@ -2,17 +2,17 @@ import type { Snowflake } from '../../globals.ts';
import type { APIEmoji } from '../../payloads/v10/mod.ts';
/**
* https://discord.com/developers/docs/resources/emoji#list-guild-emojis
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
*/
export type RESTGetAPIGuildEmojisResult = APIEmoji[];
/**
* https://discord.com/developers/docs/resources/emoji#get-guild-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}
*/
export type RESTGetAPIGuildEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params
* @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji-json-params}
*/
export interface RESTPostAPIGuildEmojiJSONBody {
/**
@@ -22,7 +22,7 @@ export interface RESTPostAPIGuildEmojiJSONBody {
/**
* The 128x128 emoji image
*
* https://discord.com/developers/docs/reference#image-data
* @see {@link https://discord.com/developers/docs/reference#image-data}
*/
image: string;
/**
@@ -32,12 +32,12 @@ export interface RESTPostAPIGuildEmojiJSONBody {
}
/**
* https://discord.com/developers/docs/resources/emoji#create-guild-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}
*/
export type RESTPostAPIGuildEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
*/
export interface RESTPatchAPIGuildEmojiJSONBody {
/**
@@ -51,48 +51,48 @@ export interface RESTPatchAPIGuildEmojiJSONBody {
}
/**
* https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}
*/
export type RESTPatchAPIGuildEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}
*/
export type RESTDeleteAPIGuildEmojiResult = never;
/**
* https://discord.com/developers/docs/resources/emoji#list-application-emojis
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
*/
export interface RESTGetAPIApplicationEmojisResult {
items: APIEmoji[];
}
/**
* https://discord.com/developers/docs/resources/emoji#get-application-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
*/
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
*/
export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSONBody, 'image' | 'name'>;
/**
* https://discord.com/developers/docs/resources/emoji#create-application-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
*/
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#modify-application-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
*/
export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJSONBody, 'name'>;
/**
* https://discord.com/developers/docs/resources/emoji#modify-application-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
*/
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
/**
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
*/
export type RESTDeleteAPIApplicationEmojiResult = never;

View File

@@ -1,11 +1,11 @@
import type { APIGatewayBotInfo, APIGatewayInfo } from '../../payloads/v10/mod.ts';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway}
*/
export type RESTGetAPIGatewayResult = APIGatewayInfo;
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot}
*/
export type RESTGetAPIGatewayBotResult = APIGatewayBotInfo;

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

@@ -28,12 +28,12 @@ import type {
APIGuildOnboardingPromptOption,
} from '../../payloads/v10/mod.ts';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
StrictPartial,
StrictRequired,
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
_DistributiveOmit,
_DistributivePick,
_Nullable,
_StrictPartial,
_StrictRequired,
} from '../../utils/internals.ts';
import type { Locale } from '../common.ts';
import type { RESTPutAPIChannelPermissionJSONBody } from './channel.ts';
@@ -54,8 +54,8 @@ export type RESTAPIGuildChannelResolvable = Exclude<APIChannel, APIDMChannel | A
*/
export type APIGuildChannelResolvable = RESTAPIGuildChannelResolvable;
export type RESTAPIGuildCreatePartialChannel = StrictPartial<
DistributivePick<
export type RESTAPIGuildCreatePartialChannel = _StrictPartial<
_DistributivePick<
RESTAPIGuildChannelResolvable,
| 'available_tags'
| 'bitrate'
@@ -96,7 +96,7 @@ export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
/**
* https://discord.com/developers/docs/resources/guild#create-guild
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
*/
export interface RESTPostAPIGuildsJSONBody {
/**
@@ -106,31 +106,31 @@ export interface RESTPostAPIGuildsJSONBody {
/**
* Voice region id
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
*/
region?: string | undefined;
/**
* base64 1024x1024 png/jpeg image for the guild icon
*
* See https://discord.com/developers/docs/reference#image-data
* @see {@link https://discord.com/developers/docs/reference#image-data}
*/
icon?: string | undefined;
/**
* Verification level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level?: GuildVerificationLevel | undefined;
/**
* Default message notification level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
default_message_notifications?: GuildDefaultMessageNotifications | undefined;
/**
* Explicit content filter level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
explicit_content_filter?: GuildExplicitContentFilter | undefined;
/**
@@ -143,8 +143,7 @@ export interface RESTPostAPIGuildsJSONBody {
* Also, the required `id` field within each role object is an integer placeholder,
* and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions
* in a channel when also passing in channels with the channels array.
*
* See https://discord.com/developers/docs/topics/permissions#role-object
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles?: RESTAPIGuildCreateRole[] | undefined;
/**
@@ -157,8 +156,7 @@ export interface RESTPostAPIGuildsJSONBody {
* and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels
* by setting the `parent_id` field on any children to the category's id field.
* Category channels must be listed before any children.
*
* See https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
channels?: RESTAPIGuildCreatePartialChannel[] | undefined;
/**
@@ -176,7 +174,7 @@ export interface RESTPostAPIGuildsJSONBody {
/**
* System channel flags
*
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
system_channel_flags?: GuildSystemChannelFlags | undefined;
/**
@@ -186,51 +184,51 @@ export interface RESTPostAPIGuildsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#create-guild
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
*/
export type RESTPostAPIGuildsResult = APIGuild;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
level: GuildMFALevel;
}
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
*/
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
/**
* https://discord.com/developers/docs/resources/guild#get-guild
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
*/
export interface RESTGetAPIGuildQuery {
/**
* When `true`, will return approximate member and presence counts for the guild
*
* @default false
* @defaultValue `false`
*/
with_counts?: boolean;
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
*/
export type RESTGetAPIGuildResult = APIGuild;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-preview
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}
*/
export type RESTGetAPIGuildPreviewResult = APIGuildPreview;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
*/
export interface RESTPatchAPIGuildJSONBody {
/**
@@ -240,25 +238,25 @@ export interface RESTPatchAPIGuildJSONBody {
/**
* Voice region id
*
* See https://discord.com/developers/docs/resources/voice#voice-region-object
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
*/
region?: string | null | undefined;
/**
* Verification level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
verification_level?: GuildVerificationLevel | null | undefined;
/**
* Default message notification level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
default_message_notifications?: GuildDefaultMessageNotifications | null | undefined;
/**
* Explicit content filter level
*
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
explicit_content_filter?: GuildExplicitContentFilter | null | undefined;
/**
@@ -272,7 +270,7 @@ export interface RESTPatchAPIGuildJSONBody {
/**
* base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the guild has `ANIMATED_ICON` feature)
*
* See https://discord.com/developers/docs/reference#image-data
* @see {@link https://discord.com/developers/docs/reference#image-data}
*/
icon?: string | null | undefined;
/**
@@ -282,7 +280,7 @@ export interface RESTPatchAPIGuildJSONBody {
/**
* base64 16:9 png/jpeg image for the guild splash (when the guild has `INVITE_SPLASH` feature)
*
* See https://discord.com/developers/docs/reference#image-data
* @see {@link https://discord.com/developers/docs/reference#image-data}
*/
splash?: string | null | undefined;
/**
@@ -300,7 +298,7 @@ export interface RESTPatchAPIGuildJSONBody {
/**
* System channel flags
*
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
system_channel_flags?: GuildSystemChannelFlags | undefined;
/**
@@ -314,13 +312,13 @@ export interface RESTPatchAPIGuildJSONBody {
/**
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
*
* @default "en-US" (if the value is set to `null`)
* @defaultValue `"en-US"` (if the value is set to `null`)
*/
preferred_locale?: Locale | null | undefined;
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features?: GuildFeature[] | undefined;
/**
@@ -338,32 +336,32 @@ export interface RESTPatchAPIGuildJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#modify-guild
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}
*/
export type RESTPatchAPIGuildResult = APIGuild;
/**
* https://discord.com/developers/docs/resources/guild#delete-guild
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
*/
export type RESTDeleteAPIGuildResult = never;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-channels
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
*/
export type RESTGetAPIGuildChannelsResult = APIChannel[];
/**
* https://discord.com/developers/docs/resources/guild#create-guild-channel
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
*/
export type RESTPostAPIGuildChannelJSONBody = DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
export type RESTPostAPIGuildChannelJSONBody = _DistributiveOmit<RESTAPIGuildCreatePartialChannel, 'id'>;
/**
* https://discord.com/developers/docs/resources/guild#create-guild-channel
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
*/
export type RESTPostAPIGuildChannelResult = APIChannel;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}
*/
export type RESTPatchAPIGuildChannelPositionsJSONBody = {
/**
@@ -385,45 +383,45 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
}[];
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}
*/
export type RESTPatchAPIGuildChannelPositionsResult = never;
/**
* https://discord.com/developers/docs/resources/guild#list-active-guild-threads
* @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}
*/
export type RESTGetAPIGuildThreadsResult = APIThreadList;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}
*/
export type RESTGetAPIGuildMemberResult = APIGuildMember;
/**
* https://discord.com/developers/docs/resources/guild#list-guild-members
* @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
*/
export interface RESTGetAPIGuildMembersQuery {
/**
* Max number of members to return (1-1000)
*
* @default 1
* @defaultValue `1`
*/
limit?: number;
/**
* The highest user id in the previous page
*
* @default 0
* @defaultValue `0`
*/
after?: Snowflake;
}
/**
* https://discord.com/developers/docs/resources/guild#list-guild-members
* @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}
*/
export type RESTGetAPIGuildMembersResult = APIGuildMember[];
/**
* https://discord.com/developers/docs/resources/guild#search-guild-members
* @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}
*/
export interface RESTGetAPIGuildMembersSearchQuery {
/**
@@ -433,7 +431,7 @@ export interface RESTGetAPIGuildMembersSearchQuery {
/**
* Max number of members to return (1-1000)
*
* @default 1
* @defaultValue `1`
*/
limit?: number;
}
@@ -441,7 +439,7 @@ export interface RESTGetAPIGuildMembersSearchQuery {
export type RESTGetAPIGuildMembersSearchResult = APIGuildMember[];
/**
* https://discord.com/developers/docs/resources/guild#add-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
*/
export interface RESTPutAPIGuildMemberJSONBody {
/**
@@ -477,7 +475,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}
*/
export interface RESTPatchAPIGuildMemberJSONBody {
/**
@@ -517,14 +515,13 @@ export interface RESTPatchAPIGuildMemberJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#add-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
*/
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
/**
* https://discord.com/developers/docs/resources/guild#modify-current-user-nick
*
* @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
*/
export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
/**
@@ -536,7 +533,7 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#modify-current-member
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
*/
export interface RESTPatchAPICurrentGuildMemberJSONBody {
/**
@@ -548,35 +545,34 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#modify-current-user-nick
*
* @deprecated Use [Modify Current Member](https://discord.com/developers/docs/resources/guild#modify-current-member) instead.
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
*/
export type RESTPatchAPICurrentGuildMemberNicknameResult =
StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
/**
* https://discord.com/developers/docs/resources/guild#add-guild-member-role
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
*/
export type RESTPutAPIGuildMemberRoleResult = never;
/**
* https://discord.com/developers/docs/resources/guild#remove-guild-member-role
* @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role}
*/
export type RESTDeleteAPIGuildMemberRoleResult = never;
/**
* https://discord.com/developers/docs/resources/guild#remove-guild-member
* @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member}
*/
export type RESTDeleteAPIGuildMemberResult = never;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-bans
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
*/
export type RESTGetAPIGuildBansResult = APIBan[];
/**
* https://discord.com/developers/docs/resources/guild#get-guild-bans
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
*/
export interface RESTGetAPIGuildBansQuery {
/**
@@ -590,24 +586,24 @@ export interface RESTGetAPIGuildBansQuery {
/**
* Number of users to return (1-1000)
*
* @default 1000
* @defaultValue `1000`
*/
limit?: number;
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
*/
export type RESTGetAPIGuildBanResult = APIBan;
/**
* https://discord.com/developers/docs/resources/guild#create-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
*/
export interface RESTPutAPIGuildBanJSONBody {
/**
* Number of days to delete messages for (0-7)
*
* @deprecated use `delete_message_seconds` instead
* @deprecated Use {@link RESTPutAPIGuildBanJSONBody.delete_message_seconds} instead
*/
delete_message_days?: number | undefined;
/**
@@ -617,17 +613,17 @@ export interface RESTPutAPIGuildBanJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#create-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}
*/
export type RESTPutAPIGuildBanResult = never;
/**
* https://discord.com/developers/docs/resources/guild#remove-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}
*/
export type RESTDeleteAPIGuildBanResult = never;
/**
* https://discord.com/developers/docs/resources/guild#bulk-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban}
*/
export interface RESTPostAPIGuildBulkBanJSONBody {
/**
@@ -641,7 +637,7 @@ export interface RESTPostAPIGuildBulkBanJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#bulk-guild-ban
* @see {@link https://discord.com/developers/docs/resources/guild#bulk-guild-ban}
*/
export interface RESTPostAPIGuildBulkBanResult {
/**
@@ -655,36 +651,37 @@ export interface RESTPostAPIGuildBulkBanResult {
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-roles
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}
*/
export type RESTGetAPIGuildRolesResult = APIRole[];
/**
* https://discord.com/developers/docs/resources/guild#create-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
*/
export interface RESTPostAPIGuildRoleJSONBody {
/**
* Name of the role
*
* @default "new role"
* @defaultValue `"new role"`
*/
name?: string | null | undefined;
/**
* Bitwise value of the enabled/disabled permissions
*
* @default "default role permissions in guild"
* @defaultValue
* Default role permissions in guild
*/
permissions?: Permissions | null | undefined;
/**
* RGB color value
*
* @default 0
* @defaultValue `0`
*/
color?: number | null | undefined;
/**
* Whether the role should be displayed separately in the sidebar
*
* @default false
* @defaultValue `false`
*/
hoist?: boolean | null | undefined;
/**
@@ -698,18 +695,18 @@ export interface RESTPostAPIGuildRoleJSONBody {
/**
* Whether the role should be mentionable
*
* @default false
* @defaultValue `false`
*/
mentionable?: boolean | null | undefined;
}
/**
* https://discord.com/developers/docs/resources/guild#create-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}
*/
export type RESTPostAPIGuildRoleResult = APIRole;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
*/
export type RESTPatchAPIGuildRolePositionsJSONBody = {
/**
@@ -723,12 +720,12 @@ export type RESTPatchAPIGuildRolePositionsJSONBody = {
}[];
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}
*/
export type RESTPatchAPIGuildRolePositionsResult = APIRole[];
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
*/
export interface RESTPatchAPIGuildRoleJSONBody {
/**
@@ -762,28 +759,28 @@ export interface RESTPatchAPIGuildRoleJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
*/
export type RESTGetAPIGuildRoleResult = APIRole;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}
*/
export type RESTPatchAPIGuildRoleResult = APIRole;
/**
* https://discord.com/developers/docs/resources/guild#delete-guild-role
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}
*/
export type RESTDeleteAPIGuildRoleResult = never;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-prune-count
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
*/
export interface RESTGetAPIGuildPruneCountQuery {
/**
* Number of days to count prune for (1 or more)
*
* @default 7
* @defaultValue `7`
*/
days?: number;
/**
@@ -792,32 +789,32 @@ export interface RESTGetAPIGuildPruneCountQuery {
* While this is typed as a string, it represents an array of
* role IDs delimited by commas
*
* See https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count-query-string-params}
*/
include_roles?: string;
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-prune-count
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
*/
export interface RESTGetAPIGuildPruneCountResult {
pruned: number;
}
/**
* https://discord.com/developers/docs/resources/guild#begin-guild-prune
* @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
*/
export interface RESTPostAPIGuildPruneJSONBody {
/**
* Number of days to count prune for (1 or more)
*
* @default 7
* @defaultValue `7`
*/
days?: number | undefined;
/**
* Whether `pruned is returned, discouraged for large guilds
* Whether `pruned` is returned, discouraged for large guilds
*
* @default true
* @defaultValue `true`
*/
compute_prune_count?: boolean | undefined;
/**
@@ -827,54 +824,54 @@ export interface RESTPostAPIGuildPruneJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild#begin-guild-prune
* @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}
*/
export interface RESTPostAPIGuildPruneResult {
pruned: number | null;
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}
*/
export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
/**
* https://discord.com/developers/docs/resources/guild#get-guild-invites
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites}
*/
export type RESTGetAPIGuildInvitesResult = APIExtendedInvite[];
/**
* https://discord.com/developers/docs/resources/guild#get-guild-integrations
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}
*/
export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
/**
* https://discord.com/developers/docs/resources/guild#delete-guild-integration
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}
*/
export type RESTDeleteAPIGuildIntegrationResult = never;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}
*/
export type RESTGetAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
*/
export type RESTPatchAPIGuildWidgetSettingsJSONBody = StrictPartial<APIGuildWidgetSettings>;
export type RESTPatchAPIGuildWidgetSettingsJSONBody = _StrictPartial<APIGuildWidgetSettings>;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}
*/
export type RESTPatchAPIGuildWidgetSettingsResult = APIGuildWidgetSettings;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}
*/
export type RESTGetAPIGuildWidgetJSONResult = APIGuildWidget;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}
*/
export interface RESTGetAPIGuildVanityUrlResult {
code: string | null;
@@ -882,13 +879,13 @@ export interface RESTGetAPIGuildVanityUrlResult {
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image}
*/
export interface RESTGetAPIGuildWidgetImageQuery {
/**
* Style of the widget image returned
*
* @default "shield"
* @defaultValue `"shield"`
*/
style?: GuildWidgetStyle;
}
@@ -919,14 +916,14 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}
*/
export type RESTGetAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
*/
export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIGuildWelcomeScreen>> & {
export type RESTPatchAPIGuildWelcomeScreenJSONBody = _Nullable<_StrictPartial<APIGuildWelcomeScreen>> & {
/**
* Whether the welcome screen is enabled
*/
@@ -934,19 +931,19 @@ export type RESTPatchAPIGuildWelcomeScreenJSONBody = Nullable<StrictPartial<APIG
};
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}
*/
export type RESTPatchAPIGuildWelcomeScreenResult = APIGuildWelcomeScreen;
/**
* https://discord.com/developers/docs/resources/guild#get-guild-onboarding
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-onboarding}
*/
export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding}
*/
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
> & {
/**
@@ -955,7 +952,7 @@ export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedP
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
};
export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
export type RESTAPIGuildOnboardingPrompt = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
> &
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
@@ -970,7 +967,7 @@ export type RESTAPIGuildOnboardingPrompt = AddUndefinedToPossiblyUndefinedProper
*/
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
export type RESTAPIGuildOnboardingPromptOption = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
> &
Pick<APIGuildOnboardingPromptOption, 'title'> & {
@@ -994,6 +991,20 @@ export type RESTAPIGuildOnboardingPromptOption = AddUndefinedToPossiblyUndefined
export type RESTAPIModifyGuildOnboardingPromptOptionData = RESTAPIGuildOnboardingPromptOption;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding}
*/
export type RESTPutAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* @see {@link https://discord.com/developers/docs/resources/guild#modify-incidents-actions}
*/
export interface RESTPutAPIGuildIncidentActionsJSONBody {
/**
* When invites will be enabled again
*/
invites_disabled_until?: string | undefined;
/**
* When direct messages will be enabled again
*/
dms_disabled_until?: string | undefined;
}

View File

@@ -1,5 +1,5 @@
import type { Snowflake } from '../../globals.ts';
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
import type { _Nullable, _StrictPartial } from '../../utils/internals.ts';
import type {
APIGuildScheduledEvent,
APIGuildScheduledEventEntityMetadata,
@@ -11,7 +11,7 @@ import type {
} from '../../v10.ts';
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
*/
export interface RESTGetAPIGuildScheduledEventsQuery {
/**
@@ -21,12 +21,12 @@ export interface RESTGetAPIGuildScheduledEventsQuery {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}
*/
export type RESTGetAPIGuildScheduledEventsResult = APIGuildScheduledEvent[];
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
*/
export interface RESTPostAPIGuildScheduledEventJSONBody {
/**
@@ -72,12 +72,12 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}
*/
export type RESTPostAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
*/
export interface RESTGetAPIGuildScheduledEventQuery {
/**
@@ -87,17 +87,17 @@ export interface RESTGetAPIGuildScheduledEventQuery {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}
*/
export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
*/
export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
export type RESTPatchAPIGuildScheduledEventJSONBody = _Nullable<
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> &
StrictPartial<
_StrictPartial<
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
> & {
/**
@@ -107,23 +107,23 @@ export type RESTPatchAPIGuildScheduledEventJSONBody = Nullable<
};
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
*/
export type RESTPatchAPIGuildScheduledEventResult = APIGuildScheduledEvent;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event}
*/
export type RESTDeleteAPIGuildScheduledEventResult = never;
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
*/
export interface RESTGetAPIGuildScheduledEventUsersQuery {
/**
* Number of users to receive from the event
*
* @default 100
* @defaultValue `100`
*/
limit?: number;
/**
@@ -141,6 +141,6 @@ export interface RESTGetAPIGuildScheduledEventUsersQuery {
}
/**
* https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}
*/
export type RESTGetAPIGuildScheduledEventUsersResult = APIGuildScheduledEventUser[];

View File

@@ -11,9 +11,9 @@ import type {
InteractionType,
} from '../../payloads/v10/mod.ts';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
NonNullableFields,
StrictPartial,
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
_NonNullableFields,
_StrictPartial,
} from '../../utils/internals.ts';
import type {
RESTDeleteAPIWebhookWithTokenMessageResult,
@@ -25,29 +25,29 @@ import type {
} from './webhook.ts';
/**
* https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
*/
export interface RESTGetAPIApplicationCommandsQuery {
/**
* Whether to include full localization dictionaries (name_localizations and description_localizations)
* in the returned objects, instead of the name_localized and description_localized fields.
*
* @default false
* @defaultValue `false`
*/
with_localizations?: boolean;
}
/**
* https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}
*/
export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
/**
* https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}
*/
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
export type RESTPostAPIBaseApplicationCommandsJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Omit<
APIApplicationCommand,
| 'application_id'
@@ -63,13 +63,13 @@ type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefine
| 'version'
> &
Partial<
NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> &
_NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> &
Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>
>
>;
/**
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
type?: ApplicationCommandType.ChatInput | undefined;
@@ -77,14 +77,14 @@ export interface RESTPostAPIChatInputApplicationCommandsJSONBody extends RESTPos
}
/**
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
type: ApplicationCommandType.Message | ApplicationCommandType.User;
}
/**
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
extends RESTPostAPIBaseApplicationCommandsJSONBody {
@@ -92,7 +92,7 @@ export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
}
/**
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export type RESTPostAPIApplicationCommandsJSONBody =
| RESTPostAPIChatInputApplicationCommandsJSONBody
@@ -100,72 +100,72 @@ export type RESTPostAPIApplicationCommandsJSONBody =
| RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody;
/**
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
*/
export type RESTPostAPIApplicationCommandsResult = APIApplicationCommand;
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
*/
export type RESTPatchAPIApplicationCommandJSONBody = StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
export type RESTPatchAPIApplicationCommandJSONBody = _StrictPartial<RESTPostAPIApplicationCommandsJSONBody>;
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}
*/
export type RESTPatchAPIApplicationCommandResult = APIApplicationCommand;
/**
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
*/
export type RESTPutAPIApplicationCommandsJSONBody = RESTPostAPIApplicationCommandsJSONBody[];
/**
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}
*/
export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[];
/**
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
*/
export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery;
/**
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
*/
export type RESTGetAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
/**
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}
*/
export type RESTGetAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
/**
* https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
*/
export type RESTPostAPIApplicationGuildCommandsJSONBody =
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>;
/**
* https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}
*/
export type RESTPostAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>;
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
*/
export type RESTPatchAPIApplicationGuildCommandJSONBody = StrictPartial<
export type RESTPatchAPIApplicationGuildCommandJSONBody = _StrictPartial<
| Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'>
| Omit<RESTPostAPIContextMenuApplicationCommandsJSONBody, 'dm_permission'>
>;
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}
*/
export type RESTPatchAPIApplicationGuildCommandResult = Omit<APIApplicationCommand, 'dm_permission'>;
/**
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
*/
export type RESTPutAPIApplicationGuildCommandsJSONBody = (
| (Omit<RESTPostAPIChatInputApplicationCommandsJSONBody, 'dm_permission'> &
@@ -175,17 +175,17 @@ export type RESTPutAPIApplicationGuildCommandsJSONBody = (
)[];
/**
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
* @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}
*/
export type RESTPutAPIApplicationGuildCommandsResult = Omit<APIApplicationCommand, 'dm_permission'>[];
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
*/
export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
*/
export interface RESTPostAPIInteractionCallbackQuery {
/**
@@ -195,7 +195,7 @@ export interface RESTPostAPIInteractionCallbackQuery {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
*/
export type RESTPostAPIInteractionCallbackFormDataBody =
| (Record<`files[${bigint}]`, unknown> & {
@@ -207,12 +207,12 @@ export type RESTPostAPIInteractionCallbackFormDataBody =
| (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionCallbackJSONBody);
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
*/
export type RESTPostAPIInteractionCallbackResult = never;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object}
*/
export interface RESTPostAPIInteractionCallbackWithResponseResult {
/**
@@ -226,7 +226,7 @@ export interface RESTPostAPIInteractionCallbackWithResponseResult {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object}
*/
export interface RESTAPIInteractionCallbackObject {
/**
@@ -256,7 +256,7 @@ export interface RESTAPIInteractionCallbackObject {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object}
*/
export interface RESTAPIInteractionCallbackResourceObject {
/**
@@ -281,7 +281,7 @@ export interface RESTAPIInteractionCallbackResourceObject {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource}
*/
export interface RESTAPIInteractionCallbackActivityInstanceResource {
/**
@@ -291,37 +291,37 @@ export interface RESTAPIInteractionCallbackActivityInstanceResource {
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}
*/
export type RESTGetAPIInteractionOriginalResponseResult = RESTGetAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
*/
export type RESTPatchAPIInteractionOriginalResponseJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
*/
export type RESTPatchAPIInteractionOriginalResponseFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}
*/
export type RESTPatchAPIInteractionOriginalResponseResult = RESTPatchAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response}
*/
export type RESTDeleteAPIInteractionOriginalResponseResult = RESTDeleteAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
*/
export type RESTPostAPIInteractionFollowupJSONBody = APIInteractionResponseCallbackData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
*/
export type RESTPostAPIInteractionFollowupFormDataBody =
| (Record<`files[${bigint}]`, unknown> & {
@@ -333,59 +333,59 @@ export type RESTPostAPIInteractionFollowupFormDataBody =
| (Record<`files[${bigint}]`, unknown> & RESTPostAPIInteractionFollowupJSONBody);
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}
*/
export type RESTPostAPIInteractionFollowupResult = RESTPostAPIWebhookWithTokenWaitResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message}
*/
export type RESTGetAPIInteractionFollowupResult = RESTGetAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
*/
export type RESTPatchAPIInteractionFollowupJSONBody = RESTPatchAPIWebhookWithTokenMessageJSONBody;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
*/
export type RESTPatchAPIInteractionFollowupFormDataBody = RESTPatchAPIWebhookWithTokenMessageFormDataBody;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}
*/
export type RESTPatchAPIInteractionFollowupResult = RESTPatchAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message}
*/
export type RESTDeleteAPIInteractionFollowupResult = RESTDeleteAPIWebhookWithTokenMessageResult;
/**
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}
*/
export type RESTGetAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];
/**
* https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}
*/
export type RESTGetAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
*/
export interface RESTPutAPIApplicationCommandPermissionsJSONBody {
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}
*/
export type RESTPutAPIApplicationCommandPermissionsResult = APIGuildApplicationCommandPermissions;
/**
* https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions}
*/
export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<
APIGuildApplicationCommandPermissions,
@@ -393,6 +393,6 @@ export type RESTPutAPIGuildApplicationCommandsPermissionsJSONBody = Pick<
>[];
/**
* https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions
* @see {@link https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions}
*/
export type RESTPutAPIGuildApplicationCommandsPermissionsResult = APIGuildApplicationCommandPermissions[];

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIInvite } from '../../payloads/v10/mod.ts';
/**
* https://discord.com/developers/docs/resources/invite#get-invite
* @see {@link https://discord.com/developers/docs/resources/invite#get-invite}
*/
export interface RESTGetAPIInviteQuery {
/**
@@ -22,6 +22,6 @@ export interface RESTGetAPIInviteQuery {
export type RESTGetAPIInviteResult = APIInvite;
/**
* https://discord.com/developers/docs/resources/invite#delete-invite
* @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}
*/
export type RESTDeleteAPIInviteResult = APIInvite;

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

@@ -549,7 +549,7 @@ export const Routes = {
* - GET `/users/{user.id}`
* - PATCH `/users/@me`
*
* @param [userId] The user ID, defaulted to `@me`
* @param [userId] - The user ID, defaulted to `@me`
*/
user(userId: Snowflake | '@me' = '@me') {
return `/users/${userId}` as const;
@@ -933,6 +933,14 @@ export const Routes = {
return `/guilds/${guildId}/onboarding` as const;
},
/**
* Route for:
* - PUT `/guilds/${guild.id}/incident-actions`
*/
guildIncidentActions(guildId: Snowflake) {
return `/guilds/${guildId}/incident-actions` as const;
},
/**
* Route for:
* - GET `/applications/@me`
@@ -1079,6 +1087,8 @@ Object.freeze(Routes);
export const StickerPackApplicationId = '710982414301790216';
export type ImageSize = 1_024 | 2_048 | 4_096 | 16 | 32 | 64 | 128 | 256 | 512 | (number & {});
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
@@ -1164,7 +1174,7 @@ export const CDNRoutes = {
* Route for:
* - GET `/embed/avatars/{index}.png`
*
* The value for `index` parameter depends on whether the user is [migrated to the new username system](https://discord.com/developers/docs/change-log#unique-usernames-on-discord).
* The value for `index` parameter depends on whether the user is {@link https://discord.com/developers/docs/change-log#unique-usernames-on-discord | migrated to the new username system}.
* For users on the new username system, `index` will be `(user.id >> 22) % 6`.
* For users on the legacy username system, `index` will be `user.discriminator % 5`.
*
@@ -1404,7 +1414,7 @@ export type GuildSplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageForm
export type GuildDiscoverySplashFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type UserBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type DefaultUserAvatar = Extract<ImageFormat, ImageFormat.PNG>;
export type DefaultUserAvatarFormat = Extract<ImageFormat, ImageFormat.PNG>;
export type UserAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type GuildMemberAvatarFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export type ApplicationIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
@@ -1419,13 +1429,18 @@ export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.GIF | ImageFormat.Lottie>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
/**
* @deprecated Use {@link DefaultUserAvatarFormat} instead.
*/
export type DefaultUserAvatar = DefaultUserAvatarFormat;
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;
size?: ImageSize;
}
export const RouteBases = {
@@ -1445,7 +1460,7 @@ export const OAuth2Routes = {
authorizationURL: `${RouteBases.api}${Routes.oauth2Authorization()}`,
tokenURL: `${RouteBases.api}${Routes.oauth2TokenExchange()}`,
/**
* See https://tools.ietf.org/html/rfc7009
* @see {@link https://tools.ietf.org/html/rfc7009}
*/
tokenRevocationURL: `${RouteBases.api}${Routes.oauth2TokenRevocation()}`,
} as const;

View File

@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
import type { APIEntitlement, APISKU, APISubscription } from '../../v10.ts';
/**
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
* @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
*/
export interface RESTGetAPIEntitlementsQuery {
/**
@@ -25,7 +25,7 @@ export interface RESTGetAPIEntitlementsQuery {
/**
* Number of entitlements to return (1-100)
*
* @default 100
* @defaultValue `100`
*/
limit?: number | undefined;
/**
@@ -43,17 +43,17 @@ export interface RESTGetAPIEntitlementsQuery {
}
/**
* https://discord.com/developers/docs/resources/entitlement#list-entitlements
* @see {@link https://discord.com/developers/docs/resources/entitlement#list-entitlements}
*/
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
/**
* https://discord.com/developers/docs/resources/entitlement#get-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
*/
export type RESTGetAPIEntitlementResult = APIEntitlement;
/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
*/
export interface RESTPostAPIEntitlementJSONBody {
/**
@@ -76,12 +76,12 @@ export interface RESTPostAPIEntitlementJSONBody {
export type RESTPostAPIEntitlementBody = RESTPostAPIEntitlementJSONBody;
/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
*/
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'ends_at' | 'starts_at'>>;
/**
* https://discord.com/developers/docs/resources/entitlement#create-test-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#create-test-entitlement}
*/
export enum EntitlementOwnerType {
Guild = 1,
@@ -89,22 +89,22 @@ export enum EntitlementOwnerType {
}
/**
* https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#delete-test-entitlement}
*/
export type RESTDeleteAPIEntitlementResult = never;
/**
* https://discord.com/developers/docs/resources/sku#list-skus
* @see {@link https://discord.com/developers/docs/resources/sku#list-skus}
*/
export type RESTGetAPISKUsResult = APISKU[];
/**
* https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement
* @see {@link https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement}
*/
export type RESTPostAPIEntitlementConsumeResult = never;
/**
* https://discord.com/developers/docs/resources/subscription#query-string-params
* @see {@link https://discord.com/developers/docs/resources/subscription#query-string-params}
*/
export interface RESTGetAPISKUSubscriptionsQuery {
/**
@@ -118,7 +118,7 @@ export interface RESTGetAPISKUSubscriptionsQuery {
/**
* Number of subscriptions to return (1-100)
*
* @default 50
* @defaultValue `50`
*/
limit?: number | undefined;
/**
@@ -128,11 +128,11 @@ export interface RESTGetAPISKUSubscriptionsQuery {
}
/**
* https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions
* @see {@link https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions}
*/
export type RESTGetAPISKUSubscriptionsResult = APISubscription[];
/**
* https://discord.com/developers/docs/resources/subscription#get-sku-subscription
* @see {@link https://discord.com/developers/docs/resources/subscription#get-sku-subscription}
*/
export type RESTGetAPISKUSubscriptionResult = APISubscription;

View File

@@ -2,12 +2,12 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../../payloads/v10/mod.ts';
/**
* https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
*/
export type RESTGetAPIOAuth2CurrentApplicationResult = Omit<APIApplication, 'flags'>;
/**
* https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}
*/
export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
/**
@@ -29,7 +29,7 @@ export interface RESTGetAPIOAuth2CurrentAuthorizationResult {
}
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant}
*/
export interface RESTOAuth2AuthorizationQuery {
response_type: 'code';
@@ -41,7 +41,7 @@ export interface RESTOAuth2AuthorizationQuery {
}
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example}
*/
export interface RESTPostOAuth2TokenRevocationQuery {
token: string;
@@ -49,7 +49,7 @@ export interface RESTPostOAuth2TokenRevocationQuery {
}
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example}
*/
export interface RESTPostOAuth2AuthorizationQueryResult {
code: string;
@@ -62,7 +62,7 @@ export interface RESTPostOAuth2AuthorizationQueryResult {
export type RESTOAuth2AuthorizationQueryResult = RESTPostOAuth2AuthorizationQueryResult;
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example}
*/
export interface RESTPostOAuth2AccessTokenURLEncodedData {
client_id: Snowflake;
@@ -73,7 +73,7 @@ export interface RESTPostOAuth2AccessTokenURLEncodedData {
}
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-response}
*/
export interface RESTPostOAuth2AccessTokenResult {
access_token: string;
@@ -84,7 +84,7 @@ export interface RESTPostOAuth2AccessTokenResult {
}
/**
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example}
*/
export interface RESTPostOAuth2RefreshTokenURLEncodedData {
client_id: Snowflake;
@@ -96,7 +96,7 @@ export interface RESTPostOAuth2RefreshTokenURLEncodedData {
export type RESTPostOAuth2RefreshTokenResult = RESTPostOAuth2AccessTokenResult;
/**
* https://discord.com/developers/docs/topics/oauth2#implicit-grant
* @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant}
*/
export interface RESTOAuth2ImplicitAuthorizationQuery {
response_type: 'token';
@@ -108,12 +108,12 @@ export interface RESTOAuth2ImplicitAuthorizationQuery {
}
/**
* https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#implicit-grant-redirect-url-example}
*/
export type RESTOAuth2ImplicitAuthorizationURLFragmentResult = Omit<RESTPostOAuth2AccessTokenResult, 'refresh_token'>;
/**
* https://discord.com/developers/docs/topics/oauth2#client-credentials-grant
* @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant}
*/
export interface RESTPostOAuth2ClientCredentialsURLEncodedData {
grant_type: 'client_credentials';
@@ -123,7 +123,7 @@ export interface RESTPostOAuth2ClientCredentialsURLEncodedData {
export type RESTPostOAuth2ClientCredentialsResult = RESTOAuth2ImplicitAuthorizationURLFragmentResult;
/**
* https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters
* @see {@link https://discord.com/developers/docs/topics/oauth2#bot-authorization-flow-bot-auth-parameters}
*/
export interface RESTOAuth2BotAuthorizationQuery {
/**
@@ -141,7 +141,7 @@ export interface RESTOAuth2BotAuthorizationQuery {
/**
* The permissions you're requesting
*
* See https://discord.com/developers/docs/topics/permissions
* @see {@link https://discord.com/developers/docs/topics/permissions}
*/
permissions?: Permissions;
/**
@@ -155,7 +155,7 @@ export interface RESTOAuth2BotAuthorizationQuery {
}
/**
* https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization
* @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization}
*/
export interface RESTOAuth2AdvancedBotAuthorizationQuery {
client_id: Snowflake;
@@ -185,7 +185,7 @@ export interface RESTOAuth2AdvancedBotAuthorizationQueryResult {
}
/**
* https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#advanced-bot-authorization-extended-bot-authorization-access-token-example}
*/
export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
access_token: string;
@@ -197,7 +197,7 @@ export interface RESTPostOAuth2AccessTokenWithBotAndGuildsScopeResult {
}
/**
* https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example
* @see {@link https://discord.com/developers/docs/topics/oauth2#webhooks-webhook-token-response-example}
*/
export interface RESTPostOAuth2AccessTokenWithBotAndWebhookIncomingScopeResult {
access_token: string;

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