mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 11:20:10 +00:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31b3766b19 | ||
|
|
1b1a865efe | ||
|
|
a85521aa8b | ||
|
|
8b00031c51 | ||
|
|
147e459a16 | ||
|
|
fbfbc6b23f | ||
|
|
906dd8e241 | ||
|
|
25efb9c403 | ||
|
|
822956fe78 | ||
|
|
d5047639e6 | ||
|
|
cbd8d108ee | ||
|
|
d816bf31ab | ||
|
|
71602b5c49 | ||
|
|
6ead98b782 | ||
|
|
ea1a6c3c86 | ||
|
|
a59f9f002f | ||
|
|
ace41f38e4 | ||
|
|
25a6f5330f | ||
|
|
4409fc24c1 | ||
|
|
1178c23389 | ||
|
|
34b0ddd105 | ||
|
|
9c1fc9bdee | ||
|
|
472fe5f837 | ||
|
|
588140c0a9 | ||
|
|
799044d3f0 | ||
|
|
eb7b3d90dd | ||
|
|
2c1ff0ea34 | ||
|
|
5f22a6baca | ||
|
|
cbcd51d093 | ||
|
|
4f66b4dd04 | ||
|
|
da9496f291 | ||
|
|
b1e1c60a07 | ||
|
|
4fdc6db296 | ||
|
|
608f0fa8cd | ||
|
|
0e8b624c3e | ||
|
|
1301b3417c | ||
|
|
e098870a08 | ||
|
|
2049dde09a | ||
|
|
ea7cafaafa | ||
|
|
c05998de27 | ||
|
|
f50ae60ea9 | ||
|
|
0ebf2afb58 | ||
|
|
ee09eafb76 | ||
|
|
a7fac3dc04 | ||
|
|
1fd407f481 |
@@ -1 +1,12 @@
|
||||
deno/
|
||||
|
||||
gateway/v6/*
|
||||
payloads/v6/*
|
||||
rest/v6/*
|
||||
v6.ts
|
||||
|
||||
gateway/v8/*
|
||||
payloads/v8/*
|
||||
rest/v8/*
|
||||
utils/v8.ts
|
||||
v8.ts
|
||||
|
||||
@@ -24,3 +24,15 @@ CHANGELOG.md
|
||||
# Format all of scripts
|
||||
!scripts/**/*
|
||||
!.prettierrc.mjs
|
||||
|
||||
# Deprecated versions
|
||||
gateway/v6/*
|
||||
payloads/v6/*
|
||||
rest/v6/*
|
||||
v6.ts
|
||||
|
||||
gateway/v8/*
|
||||
payloads/v8/*
|
||||
rest/v8/*
|
||||
utils/v8.ts
|
||||
v8.ts
|
||||
|
||||
54
CHANGELOG.md
54
CHANGELOG.md
@@ -1,3 +1,57 @@
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
|
||||
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
|
||||
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
|
||||
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
|
||||
|
||||
|
||||
|
||||
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
|
||||
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
|
||||
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
|
||||
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
|
||||
|
||||
|
||||
|
||||
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
|
||||
|
||||
|
||||
|
||||
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,57 @@
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
|
||||
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
|
||||
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
|
||||
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
|
||||
|
||||
|
||||
|
||||
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
|
||||
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
|
||||
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
|
||||
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
|
||||
|
||||
|
||||
|
||||
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
|
||||
|
||||
|
||||
|
||||
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -785,7 +785,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1748,7 +1748,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -784,7 +784,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1747,7 +1747,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -108,6 +108,10 @@ export interface APIApplication {
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
|
||||
@@ -735,6 +735,10 @@ export interface APIMessage {
|
||||
* See https://support-dev.discord.com/hc/articles/4404772028055
|
||||
*/
|
||||
poll?: APIPoll;
|
||||
/**
|
||||
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
|
||||
*/
|
||||
message_snapshots?: APIMessageSnapshot[];
|
||||
/**
|
||||
* The call associated with the message
|
||||
*/
|
||||
@@ -810,6 +814,10 @@ export interface APIMessageActivity {
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
/**
|
||||
* Type of reference
|
||||
*/
|
||||
type?: MessageReferenceType;
|
||||
/**
|
||||
* ID of the originating message
|
||||
*/
|
||||
@@ -834,6 +842,20 @@ export enum MessageActivityType {
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-types
|
||||
*/
|
||||
export enum MessageReferenceType {
|
||||
/**
|
||||
* A standard reference used by replies
|
||||
*/
|
||||
Default = 0,
|
||||
/**
|
||||
* Reference used to point to a message at a point in time
|
||||
*/
|
||||
Forward = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||
*/
|
||||
@@ -1884,6 +1906,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
|
||||
*/
|
||||
export interface APIMessageSnapshot {
|
||||
/**
|
||||
* Subset of the message object fields
|
||||
*/
|
||||
message: APIMessageSnapshotFields;
|
||||
/**
|
||||
* Id of the origin message's guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
|
||||
*/
|
||||
@@ -1942,3 +1978,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
|
||||
|
||||
// Modal components
|
||||
export type APIModalActionRowComponent = APITextInputComponent;
|
||||
|
||||
export type APIMessageSnapshotFields = Pick<
|
||||
APIMessage,
|
||||
| 'attachments'
|
||||
| 'content'
|
||||
| 'edited_timestamp'
|
||||
| 'embeds'
|
||||
| 'flags'
|
||||
| 'mention_roles'
|
||||
| 'mentions'
|
||||
| 'timestamp'
|
||||
| 'type'
|
||||
>;
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -22,10 +22,14 @@ export interface APIPoll {
|
||||
expiry: string;
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*
|
||||
* @default PollLayoutType.Default
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
/**
|
||||
|
||||
@@ -286,6 +286,7 @@ export enum ConnectionService {
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
RiotGames = 'riotgames',
|
||||
Roblox = 'roblox',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -108,6 +108,10 @@ export interface APIApplication {
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
|
||||
@@ -720,6 +720,10 @@ export interface APIMessage {
|
||||
* See https://support-dev.discord.com/hc/articles/4404772028055
|
||||
*/
|
||||
poll?: APIPoll;
|
||||
/**
|
||||
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
|
||||
*/
|
||||
message_snapshots?: APIMessageSnapshot[];
|
||||
/**
|
||||
* The call associated with the message
|
||||
*/
|
||||
@@ -795,6 +799,10 @@ export interface APIMessageActivity {
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
/**
|
||||
* Type of reference
|
||||
*/
|
||||
type?: MessageReferenceType;
|
||||
/**
|
||||
* ID of the originating message
|
||||
*/
|
||||
@@ -819,6 +827,20 @@ export enum MessageActivityType {
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-types
|
||||
*/
|
||||
export enum MessageReferenceType {
|
||||
/**
|
||||
* A standard reference used by replies
|
||||
*/
|
||||
Default = 0,
|
||||
/**
|
||||
* Reference used to point to a message at a point in time
|
||||
*/
|
||||
Forward = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||
*/
|
||||
@@ -1851,6 +1873,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
|
||||
*/
|
||||
export interface APIMessageSnapshot {
|
||||
/**
|
||||
* Subset of the message object fields
|
||||
*/
|
||||
message: APIMessageSnapshotFields;
|
||||
/**
|
||||
* Id of the origin message's guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
|
||||
*/
|
||||
@@ -1909,3 +1945,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
|
||||
|
||||
// Modal components
|
||||
export type APIModalActionRowComponent = APITextInputComponent;
|
||||
|
||||
export type APIMessageSnapshotFields = Pick<
|
||||
APIMessage,
|
||||
| 'attachments'
|
||||
| 'content'
|
||||
| 'edited_timestamp'
|
||||
| 'embeds'
|
||||
| 'flags'
|
||||
| 'mention_roles'
|
||||
| 'mentions'
|
||||
| 'timestamp'
|
||||
| 'type'
|
||||
>;
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -22,10 +22,14 @@ export interface APIPoll {
|
||||
expiry: string;
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*
|
||||
* @default PollLayoutType.Default
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
/**
|
||||
|
||||
@@ -285,6 +285,7 @@ export enum ConnectionService {
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
RiotGames = 'riotgames',
|
||||
Roblox = 'roblox',
|
||||
PayPal = 'paypal',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnknownDiscoverableServerCategory = 10_059,
|
||||
UnknownSticker,
|
||||
|
||||
UnknownInteraction = 10_062,
|
||||
UnknownStickerPack,
|
||||
UnknownInteraction,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownVoiceState = 10_065,
|
||||
|
||||
@@ -59,3 +59,40 @@ export type RESTPatchAPIGuildEmojiResult = APIEmoji;
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIApplicationEmojiResult = never;
|
||||
|
||||
@@ -739,6 +739,11 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
mentionable?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-role
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleResult = APIRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-role
|
||||
*/
|
||||
@@ -891,48 +896,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { StrictPartial } from '../../utils/internals.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ export const Routes = {
|
||||
applicationRoleConnectionMetadata(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/role-connections/metadata` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/auto-moderation/rules`
|
||||
@@ -344,6 +345,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - PATCH `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - DELETE `/guilds/{guild.id}/roles/{role.id}`
|
||||
*/
|
||||
@@ -786,6 +788,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
@@ -854,6 +858,14 @@ export const Routes = {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs/{pack.id}`
|
||||
*/
|
||||
stickerPack(packId: Snowflake) {
|
||||
return `/sticker-packs/${packId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
@@ -912,8 +924,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
* - GET `/guilds/{guild.id}/onboarding`
|
||||
* - PUT `/guilds/{guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
@@ -963,11 +975,30 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/applications/${application.id}/entitlements/${entitlement.id}/consume`
|
||||
* - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume`
|
||||
*/
|
||||
consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}/consume` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis`
|
||||
* - POST `/applications/{application.id}/emojis`
|
||||
*/
|
||||
applicationEmojis(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - PATCH `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - DELETE `/applications/{application.id}/emojis/{emoji.id}`
|
||||
*/
|
||||
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis/${emojiId}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
@@ -995,14 +1026,14 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
return `/icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1081,7 +1112,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
@@ -1201,7 +1232,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
|
||||
prompt?: 'consent' | 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
|
||||
*/
|
||||
export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
token: string;
|
||||
token_type_hint?: 'access_token' | 'refresh_token';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate extends Omit<APIPoll, 'answers' | 'expiry' | 'results'> {
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 7 days
|
||||
*/
|
||||
duration: number;
|
||||
export interface RESTAPIPollCreate
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: Omit<APIPollAnswer, 'answer_id'>[];
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 32 days
|
||||
*
|
||||
* @default 24
|
||||
*/
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,11 @@ export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
|
||||
@@ -76,6 +76,7 @@ export interface RESTAPIPartialCurrentUserGuild {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
icon: string | null;
|
||||
banner: string | null;
|
||||
owner: boolean;
|
||||
features: GuildFeature[];
|
||||
permissions: Permissions;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v10/mod.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v10/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -59,3 +59,40 @@ export type RESTPatchAPIGuildEmojiResult = APIEmoji;
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIApplicationEmojiResult = never;
|
||||
|
||||
@@ -745,6 +745,11 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
mentionable?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-role
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleResult = APIRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-role
|
||||
*/
|
||||
@@ -897,48 +902,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
|
||||
@@ -2,11 +2,12 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { StrictPartial } from '../../utils/internals.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
GuildScheduledEventStatus,
|
||||
APIGuildScheduledEventUser,
|
||||
} from '../../v9.ts';
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ export const Routes = {
|
||||
applicationRoleConnectionMetadata(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/role-connections/metadata` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/auto-moderation/rules`
|
||||
@@ -344,6 +345,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - PATCH `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - DELETE `/guilds/{guild.id}/roles/{role.id}`
|
||||
*/
|
||||
@@ -795,6 +797,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
@@ -863,6 +867,14 @@ export const Routes = {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs/{pack.id}`
|
||||
*/
|
||||
stickerPack(packId: Snowflake) {
|
||||
return `/sticker-packs/${packId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
@@ -921,8 +933,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
* - GET `/guilds/{guild.id}/onboarding`
|
||||
* - PUT `/guilds/{guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
@@ -972,11 +984,30 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/applications/${application.id}/entitlements/${entitlement.id}/consume`
|
||||
* - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume`
|
||||
*/
|
||||
consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}/consume` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis`
|
||||
* - POST `/applications/{application.id}/emojis`
|
||||
*/
|
||||
applicationEmojis(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - PATCH `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - DELETE `/applications/{application.id}/emojis/{emoji.id}`
|
||||
*/
|
||||
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis/${emojiId}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
@@ -1004,14 +1035,14 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
return `/icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1090,7 +1121,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
@@ -1210,7 +1241,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
|
||||
prompt?: 'consent' | 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
|
||||
*/
|
||||
export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
token: string;
|
||||
token_type_hint?: 'access_token' | 'refresh_token';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate extends Omit<APIPoll, 'answers' | 'expiry' | 'results'> {
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 7 days
|
||||
*/
|
||||
duration: number;
|
||||
export interface RESTAPIPollCreate
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: Omit<APIPollAnswer, 'answer_id'>[];
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 32 days
|
||||
*
|
||||
* @default 24
|
||||
*/
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,11 @@ export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
|
||||
@@ -76,6 +76,7 @@ export interface RESTAPIPartialCurrentUserGuild {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
icon: string | null;
|
||||
banner: string | null;
|
||||
owner: boolean;
|
||||
features: GuildFeature[];
|
||||
permissions: Permissions;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v9/mod.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v9/mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -785,7 +785,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1748,7 +1748,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
@@ -28,7 +28,7 @@ import type {
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
GatewayVoiceState,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -784,7 +784,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -1747,7 +1747,7 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-state-update
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
export type GatewayVoiceStateUpdateDispatchData = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#voice-server-update
|
||||
|
||||
1565
package-lock.json
generated
1565
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.37.91",
|
||||
"version": "0.37.95",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"exports": {
|
||||
@@ -113,7 +113,7 @@
|
||||
"prepublishOnly": "run-s clean test:lint build:node",
|
||||
"test:lint": "prettier --check . && eslint --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
|
||||
"pretest:types": "tsc",
|
||||
"test:types": "tsd -t ./v10.d.ts",
|
||||
"test:types": "tsd -t ./v10.d.ts && tsd -t ./v9.d.ts",
|
||||
"posttest:types": "npm run clean:node"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -137,13 +137,13 @@
|
||||
"@sapphire/prettier-config": "^2.0.0",
|
||||
"@types/conventional-recommended-bump": "^9.0.3",
|
||||
"@types/node": "^20.11.24",
|
||||
"@typescript-eslint/utils": "^7.1.1",
|
||||
"@typescript-eslint/utils": "^8.0.0",
|
||||
"conventional-changelog-cli": "^4.1.0",
|
||||
"conventional-recommended-bump": "^9.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-neon": "^0.1.59",
|
||||
"eslint-import-resolver-typescript": "^3.6.1",
|
||||
"eslint-plugin-local": "^4.2.1",
|
||||
"eslint-plugin-local": "^6.0.0",
|
||||
"gen-esm-wrapper": "^1.1.3",
|
||||
"husky": "^9.0.11",
|
||||
"is-ci": "^3.0.1",
|
||||
@@ -151,7 +151,7 @@
|
||||
"npm-run-all2": "^6.0.0",
|
||||
"prettier": "^3.2.5",
|
||||
"pretty-quick": "^4.0.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"rimraf": "^6.0.0",
|
||||
"tsd": "^0.31.0",
|
||||
"tsutils": "^3.21.0",
|
||||
"typescript": "^5.3.3"
|
||||
|
||||
@@ -108,6 +108,10 @@ export interface APIApplication {
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
|
||||
@@ -735,6 +735,10 @@ export interface APIMessage {
|
||||
* See https://support-dev.discord.com/hc/articles/4404772028055
|
||||
*/
|
||||
poll?: APIPoll;
|
||||
/**
|
||||
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
|
||||
*/
|
||||
message_snapshots?: APIMessageSnapshot[];
|
||||
/**
|
||||
* The call associated with the message
|
||||
*/
|
||||
@@ -810,6 +814,10 @@ export interface APIMessageActivity {
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
/**
|
||||
* Type of reference
|
||||
*/
|
||||
type?: MessageReferenceType;
|
||||
/**
|
||||
* ID of the originating message
|
||||
*/
|
||||
@@ -834,6 +842,20 @@ export enum MessageActivityType {
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-types
|
||||
*/
|
||||
export enum MessageReferenceType {
|
||||
/**
|
||||
* A standard reference used by replies
|
||||
*/
|
||||
Default = 0,
|
||||
/**
|
||||
* Reference used to point to a message at a point in time
|
||||
*/
|
||||
Forward = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||
*/
|
||||
@@ -1884,6 +1906,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
|
||||
*/
|
||||
export interface APIMessageSnapshot {
|
||||
/**
|
||||
* Subset of the message object fields
|
||||
*/
|
||||
message: APIMessageSnapshotFields;
|
||||
/**
|
||||
* Id of the origin message's guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
|
||||
*/
|
||||
@@ -1942,3 +1978,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
|
||||
|
||||
// Modal components
|
||||
export type APIModalActionRowComponent = APITextInputComponent;
|
||||
|
||||
export type APIMessageSnapshotFields = Pick<
|
||||
APIMessage,
|
||||
| 'attachments'
|
||||
| 'content'
|
||||
| 'edited_timestamp'
|
||||
| 'embeds'
|
||||
| 'flags'
|
||||
| 'mention_roles'
|
||||
| 'mentions'
|
||||
| 'timestamp'
|
||||
| 'type'
|
||||
>;
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -22,10 +22,14 @@ export interface APIPoll {
|
||||
expiry: string;
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*
|
||||
* @default PollLayoutType.Default
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
/**
|
||||
|
||||
@@ -286,6 +286,7 @@ export enum ConnectionService {
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
RiotGames = 'riotgames',
|
||||
Roblox = 'roblox',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -108,6 +108,10 @@ export interface APIApplication {
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
|
||||
@@ -720,6 +720,10 @@ export interface APIMessage {
|
||||
* See https://support-dev.discord.com/hc/articles/4404772028055
|
||||
*/
|
||||
poll?: APIPoll;
|
||||
/**
|
||||
* The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
|
||||
*/
|
||||
message_snapshots?: APIMessageSnapshot[];
|
||||
/**
|
||||
* The call associated with the message
|
||||
*/
|
||||
@@ -795,6 +799,10 @@ export interface APIMessageActivity {
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
/**
|
||||
* Type of reference
|
||||
*/
|
||||
type?: MessageReferenceType;
|
||||
/**
|
||||
* ID of the originating message
|
||||
*/
|
||||
@@ -819,6 +827,20 @@ export enum MessageActivityType {
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-reference-types
|
||||
*/
|
||||
export enum MessageReferenceType {
|
||||
/**
|
||||
* A standard reference used by replies
|
||||
*/
|
||||
Default = 0,
|
||||
/**
|
||||
* Reference used to point to a message at a point in time
|
||||
*/
|
||||
Forward = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||
*/
|
||||
@@ -1851,6 +1873,20 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-snapshot-object
|
||||
*/
|
||||
export interface APIMessageSnapshot {
|
||||
/**
|
||||
* Subset of the message object fields
|
||||
*/
|
||||
message: APIMessageSnapshotFields;
|
||||
/**
|
||||
* Id of the origin message's guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
|
||||
*/
|
||||
@@ -1909,3 +1945,16 @@ export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuCom
|
||||
|
||||
// Modal components
|
||||
export type APIModalActionRowComponent = APITextInputComponent;
|
||||
|
||||
export type APIMessageSnapshotFields = Pick<
|
||||
APIMessage,
|
||||
| 'attachments'
|
||||
| 'content'
|
||||
| 'edited_timestamp'
|
||||
| 'embeds'
|
||||
| 'flags'
|
||||
| 'mention_roles'
|
||||
| 'mentions'
|
||||
| 'timestamp'
|
||||
| 'type'
|
||||
>;
|
||||
|
||||
@@ -67,6 +67,113 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@apilink GuildScheduledEventRecurrenceRuleFrequency#Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: GuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
|
||||
@@ -22,10 +22,14 @@ export interface APIPoll {
|
||||
expiry: string;
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*
|
||||
* @default PollLayoutType.Default
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
/**
|
||||
|
||||
@@ -285,6 +285,7 @@ export enum ConnectionService {
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
RiotGames = 'riotgames',
|
||||
Roblox = 'roblox',
|
||||
PayPal = 'paypal',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
|
||||
@@ -7,8 +7,15 @@ import type { APIGuildMember } from './guild';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*
|
||||
* @deprecated This is deprecated, use {@apilink APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnknownDiscoverableServerCategory = 10_059,
|
||||
UnknownSticker,
|
||||
|
||||
UnknownInteraction = 10_062,
|
||||
UnknownStickerPack,
|
||||
UnknownInteraction,
|
||||
UnknownApplicationCommand,
|
||||
|
||||
UnknownVoiceState = 10_065,
|
||||
|
||||
@@ -59,3 +59,40 @@ export type RESTPatchAPIGuildEmojiResult = APIEmoji;
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIApplicationEmojiResult = never;
|
||||
|
||||
@@ -739,6 +739,11 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
mentionable?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-role
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleResult = APIRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-role
|
||||
*/
|
||||
@@ -891,48 +896,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { StrictPartial } from '../../utils/internals';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ export const Routes = {
|
||||
applicationRoleConnectionMetadata(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/role-connections/metadata` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/auto-moderation/rules`
|
||||
@@ -344,6 +345,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - PATCH `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - DELETE `/guilds/{guild.id}/roles/{role.id}`
|
||||
*/
|
||||
@@ -786,6 +788,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
@@ -854,6 +858,14 @@ export const Routes = {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs/{pack.id}`
|
||||
*/
|
||||
stickerPack(packId: Snowflake) {
|
||||
return `/sticker-packs/${packId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
@@ -912,8 +924,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
* - GET `/guilds/{guild.id}/onboarding`
|
||||
* - PUT `/guilds/{guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
@@ -963,11 +975,30 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/applications/${application.id}/entitlements/${entitlement.id}/consume`
|
||||
* - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume`
|
||||
*/
|
||||
consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}/consume` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis`
|
||||
* - POST `/applications/{application.id}/emojis`
|
||||
*/
|
||||
applicationEmojis(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - PATCH `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - DELETE `/applications/{application.id}/emojis/{emoji.id}`
|
||||
*/
|
||||
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis/${emojiId}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
@@ -995,14 +1026,14 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
return `/icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1081,7 +1112,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
@@ -1201,7 +1232,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
|
||||
prompt?: 'consent' | 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
|
||||
*/
|
||||
export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
token: string;
|
||||
token_type_hint?: 'access_token' | 'refresh_token';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate extends Omit<APIPoll, 'answers' | 'expiry' | 'results'> {
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 7 days
|
||||
*/
|
||||
duration: number;
|
||||
export interface RESTAPIPollCreate
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: Omit<APIPollAnswer, 'answer_id'>[];
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 32 days
|
||||
*
|
||||
* @default 24
|
||||
*/
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,11 @@ export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
|
||||
@@ -76,6 +76,7 @@ export interface RESTAPIPartialCurrentUserGuild {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
icon: string | null;
|
||||
banner: string | null;
|
||||
owner: boolean;
|
||||
features: GuildFeature[];
|
||||
permissions: Permissions;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v10/index';
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v10/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -59,3 +59,40 @@ export type RESTPatchAPIGuildEmojiResult = APIEmoji;
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#delete-application-emoji
|
||||
*/
|
||||
export type RESTDeleteAPIApplicationEmojiResult = never;
|
||||
|
||||
@@ -745,6 +745,11 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
mentionable?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-role
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleResult = APIRole;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-guild-role
|
||||
*/
|
||||
@@ -897,48 +902,6 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
|
||||
*/
|
||||
|
||||
@@ -2,11 +2,12 @@ import type { Snowflake } from '../../globals';
|
||||
import type { StrictPartial } from '../../utils/internals';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
APIGuildScheduledEventUser,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventPrivacyLevel,
|
||||
APIGuildScheduledEventEntityMetadata,
|
||||
GuildScheduledEventStatus,
|
||||
APIGuildScheduledEventUser,
|
||||
} from '../../v9';
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,10 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null | undefined;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule?: APIGuildScheduledEventRecurrenceRule | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ export const Routes = {
|
||||
applicationRoleConnectionMetadata(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/role-connections/metadata` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/auto-moderation/rules`
|
||||
@@ -344,6 +345,7 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - PATCH `/guilds/{guild.id}/roles/{role.id}`
|
||||
* - DELETE `/guilds/{guild.id}/roles/{role.id}`
|
||||
*/
|
||||
@@ -795,6 +797,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/voice-states/@me`
|
||||
* - GET `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/@me`
|
||||
* - PATCH `/guilds/{guild.id}/voice-states/{user.id}`
|
||||
*/
|
||||
@@ -863,6 +867,14 @@ export const Routes = {
|
||||
return '/sticker-packs' as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs/{pack.id}`
|
||||
*/
|
||||
stickerPack(packId: Snowflake) {
|
||||
return `/sticker-packs/${packId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/sticker-packs`
|
||||
@@ -921,8 +933,8 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/${guild.id}/onboarding`
|
||||
* - PUT `/guilds/${guild.id}/onboarding`
|
||||
* - GET `/guilds/{guild.id}/onboarding`
|
||||
* - PUT `/guilds/{guild.id}/onboarding`
|
||||
*/
|
||||
guildOnboarding(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/onboarding` as const;
|
||||
@@ -972,11 +984,30 @@ export const Routes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - POST `/applications/${application.id}/entitlements/${entitlement.id}/consume`
|
||||
* - POST `/applications/{application.id}/entitlements/{entitlement.id}/consume`
|
||||
*/
|
||||
consumeEntitlement(applicationId: Snowflake, entitlementId: Snowflake) {
|
||||
return `/applications/${applicationId}/entitlements/${entitlementId}/consume` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis`
|
||||
* - POST `/applications/{application.id}/emojis`
|
||||
*/
|
||||
applicationEmojis(applicationId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - PATCH `/applications/{application.id}/emojis/{emoji.id}`
|
||||
* - DELETE `/applications/{application.id}/emojis/{emoji.id}`
|
||||
*/
|
||||
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
|
||||
return `/applications/${applicationId}/emojis/${emojiId}` as const;
|
||||
},
|
||||
};
|
||||
|
||||
export const StickerPackApplicationId = '710982414301790216';
|
||||
@@ -1004,14 +1035,14 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/icons/{guild.id}.{png|jpeg|webp|gif}`
|
||||
* - GET `/icons/{guild.id}/{guild.icon}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP, GIF
|
||||
*/
|
||||
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
|
||||
return `icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
return `/icons/${guildId}/${guildIcon}.${format}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -1090,7 +1121,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
* - GET `/guilds/{guild.id}/users/{user.id}/avatars/{guild_member.avatar}.{png|jpeg|webp|gif}`
|
||||
*
|
||||
* As this route supports GIFs, the hash will begin with `a_` if it is available in GIF format
|
||||
*
|
||||
@@ -1210,7 +1241,7 @@ export const CDNRoutes = {
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
* - GET `/team-icons/{team.id}/{team.icon}.{png|jpeg|webp}`
|
||||
*
|
||||
* This route supports the extensions: PNG, JPEG, WebP
|
||||
*/
|
||||
|
||||
@@ -40,6 +40,14 @@ export interface RESTOAuth2AuthorizationQuery {
|
||||
prompt?: 'consent' | 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-token-revocation-example
|
||||
*/
|
||||
export interface RESTPostOAuth2TokenRevocationQuery {
|
||||
token: string;
|
||||
token_type_hint?: 'access_token' | 'refresh_token';
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-redirect-url-example
|
||||
*/
|
||||
|
||||
@@ -20,15 +20,19 @@ export interface RESTGetAPIPollAnswerVotersQuery {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure
|
||||
*/
|
||||
export interface RESTAPIPollCreate extends Omit<APIPoll, 'answers' | 'expiry' | 'results'> {
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 7 days
|
||||
*/
|
||||
duration: number;
|
||||
export interface RESTAPIPollCreate
|
||||
extends Omit<APIPoll, 'allow_multiselect' | 'answers' | 'expiry' | 'layout_type' | 'results'>,
|
||||
Partial<Pick<APIPoll, 'allow_multiselect' | 'layout_type'>> {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: Omit<APIPollAnswer, 'answer_id'>[];
|
||||
/**
|
||||
* Number of hours the poll should be open for, up to 32 days
|
||||
*
|
||||
* @default 24
|
||||
*/
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,11 @@ export interface RESTGetStickerPacksResult {
|
||||
sticker_packs: APIStickerPack[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#get-sticker-pack
|
||||
*/
|
||||
export type RESTGetAPIStickerPack = APIStickerPack;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
|
||||
*
|
||||
|
||||
@@ -76,6 +76,7 @@ export interface RESTAPIPartialCurrentUserGuild {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
icon: string | null;
|
||||
banner: string | null;
|
||||
owner: boolean;
|
||||
features: GuildFeature[];
|
||||
permissions: Permissions;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { APIVoiceRegion } from '../../payloads/v9/index';
|
||||
import type { Snowflake } from '../../globals';
|
||||
import type { APIVoiceRegion, APIVoiceState } from '../../payloads/v9/index';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#list-voice-regions
|
||||
@@ -9,3 +10,55 @@ export type RESTGetAPIVoiceRegionsResult = APIVoiceRegion[];
|
||||
* @deprecated This was exported with the wrong name, use `RESTGetAPIVoiceRegionsResult` instead
|
||||
*/
|
||||
export type GetAPIVoiceRegionsResult = RESTGetAPIVoiceRegionsResult;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateCurrentMemberResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#get-user-voice-state
|
||||
*/
|
||||
export type RESTGetAPIGuildVoiceStateUserResult = APIVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id?: Snowflake | undefined;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
/**
|
||||
* Sets the user's request to speak
|
||||
*/
|
||||
request_to_speak_timestamp?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateCurrentMemberResult = never;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export interface RESTPatchAPIGuildVoiceStateUserJSONBody {
|
||||
/**
|
||||
* The id of the channel the user is currently in
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* Toggles the user's suppress state
|
||||
*/
|
||||
suppress?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#modify-user-voice-state
|
||||
*/
|
||||
export type RESTPatchAPIGuildVoiceStateUserResult = never;
|
||||
|
||||
@@ -18,6 +18,7 @@ await mkdir(denoPath);
|
||||
*/
|
||||
function convertImports(source) {
|
||||
return source.replaceAll(
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
/from '(.*)'/g,
|
||||
/**
|
||||
* @param _ Something
|
||||
|
||||
5
tests/v10/routes.test-d.ts
Normal file
5
tests/v10/routes.test-d.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { expectAssignable } from 'tsd';
|
||||
import { CDNRoutes, Routes } from '../../rest/v10/index';
|
||||
|
||||
expectAssignable<Record<string, (...args: any[]) => `/${string}`>>(Routes);
|
||||
expectAssignable<Record<string, (...args: any[]) => `/${string}`>>(CDNRoutes);
|
||||
5
tests/v9/routes.test-d.ts
Normal file
5
tests/v9/routes.test-d.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { expectAssignable } from 'tsd';
|
||||
import { CDNRoutes, Routes } from '../../rest/v9/index';
|
||||
|
||||
expectAssignable<Record<string, (...args: any[]) => `/${string}`>>(Routes);
|
||||
expectAssignable<Record<string, (...args: any[]) => `/${string}`>>(CDNRoutes);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.90"}]
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.94"}]
|
||||
1
website/versioned_docs/version-0.37.94/api-typedoc.json
Normal file
1
website/versioned_docs/version-0.37.94/api-typedoc.json
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1 +1 @@
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.91"}]
|
||||
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.95"}]
|
||||
1
website/versioned_docs/version-0.37.95/api-typedoc.json
Normal file
1
website/versioned_docs/version-0.37.95/api-typedoc.json
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
@@ -1,4 +1,4 @@
|
||||
[
|
||||
"0.37.91",
|
||||
"0.37.90"
|
||||
"0.37.95",
|
||||
"0.37.94"
|
||||
]
|
||||
Reference in New Issue
Block a user