dfx 0.9.8 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DiscordConfig/index.d.ts +39 -0
- package/DiscordConfig/index.js +29 -0
- package/DiscordConfig/index.js.map +1 -0
- package/DiscordGateway/DiscordWS/index.d.ts +23 -0
- package/DiscordGateway/DiscordWS/index.js +26 -0
- package/DiscordGateway/DiscordWS/index.js.map +1 -0
- package/DiscordGateway/Shard/heartbeats.d.ts +3 -0
- package/DiscordGateway/Shard/heartbeats.js +24 -0
- package/DiscordGateway/Shard/heartbeats.js.map +1 -0
- package/DiscordGateway/Shard/identify.d.ts +12 -0
- package/DiscordGateway/Shard/identify.js +30 -0
- package/DiscordGateway/Shard/identify.js.map +1 -0
- package/DiscordGateway/Shard/index.d.ts +9 -0
- package/DiscordGateway/Shard/index.js +52 -0
- package/DiscordGateway/Shard/index.js.map +1 -0
- package/DiscordGateway/Shard/invalidSession.d.ts +3 -0
- package/DiscordGateway/Shard/invalidSession.js +10 -0
- package/DiscordGateway/Shard/invalidSession.js.map +1 -0
- package/DiscordGateway/Shard/sendEvents.d.ts +7 -0
- package/DiscordGateway/Shard/sendEvents.js +26 -0
- package/DiscordGateway/Shard/sendEvents.js.map +1 -0
- package/DiscordGateway/Shard/utils.d.ts +3 -0
- package/DiscordGateway/Shard/utils.js +9 -0
- package/DiscordGateway/Shard/utils.js.map +1 -0
- package/DiscordGateway/ShardStore/index.d.ts +12 -0
- package/DiscordGateway/ShardStore/index.js +22 -0
- package/DiscordGateway/ShardStore/index.js.map +1 -0
- package/DiscordGateway/Sharder/index.d.ts +9 -0
- package/DiscordGateway/Sharder/index.js +61 -0
- package/DiscordGateway/Sharder/index.js.map +1 -0
- package/DiscordGateway/WS/index.d.ts +27 -0
- package/DiscordGateway/WS/index.js +82 -0
- package/DiscordGateway/WS/index.js.map +1 -0
- package/DiscordGateway/index.d.ts +20 -0
- package/DiscordGateway/index.js +27 -0
- package/DiscordGateway/index.js.map +1 -0
- package/DiscordREST/index.d.ts +12 -0
- package/DiscordREST/index.js +85 -0
- package/DiscordREST/index.js.map +1 -0
- package/DiscordREST/types.d.ts +9 -0
- package/DiscordREST/types.js +2 -0
- package/DiscordREST/types.js.map +1 -0
- package/DiscordREST/utils.d.ts +10 -0
- package/DiscordREST/utils.js +22 -0
- package/DiscordREST/utils.js.map +1 -0
- package/Helpers/flags.d.ts +27 -0
- package/Helpers/flags.js +36 -0
- package/Helpers/flags.js.map +1 -0
- package/Helpers/intents.d.ts +24 -0
- package/Helpers/intents.js +28 -0
- package/Helpers/intents.js.map +1 -0
- package/Helpers/interactions.d.ts +73 -0
- package/Helpers/interactions.js +93 -0
- package/Helpers/interactions.js.map +1 -0
- package/Helpers/members.d.ts +9 -0
- package/Helpers/members.js +10 -0
- package/Helpers/members.js.map +1 -0
- package/Helpers/permissions.d.ts +34 -0
- package/Helpers/permissions.js +69 -0
- package/Helpers/permissions.js.map +1 -0
- package/Helpers/ui.d.ts +47 -0
- package/Helpers/ui.js +67 -0
- package/Helpers/ui.js.map +1 -0
- package/Http/index.d.ts +30 -0
- package/Http/index.js +53 -0
- package/Http/index.js.map +1 -0
- package/Interactions/context.d.ts +36 -0
- package/Interactions/context.js +34 -0
- package/Interactions/context.js.map +1 -0
- package/Interactions/definitions.d.ts +60 -0
- package/Interactions/definitions.js +52 -0
- package/Interactions/definitions.js.map +1 -0
- package/Interactions/gateway.d.ts +6 -0
- package/Interactions/gateway.js +21 -0
- package/Interactions/gateway.js.map +1 -0
- package/Interactions/handlers.d.ts +8 -0
- package/Interactions/handlers.js +49 -0
- package/Interactions/handlers.js.map +1 -0
- package/Interactions/index.d.ts +17 -0
- package/Interactions/index.js +39 -0
- package/Interactions/index.js.map +1 -0
- package/Interactions/utils.d.ts +10 -0
- package/Interactions/utils.js +61 -0
- package/Interactions/utils.js.map +1 -0
- package/Interactions/webhook.d.ts +32 -0
- package/Interactions/webhook.js +42 -0
- package/Interactions/webhook.js.map +1 -0
- package/Log/index.d.ts +12 -0
- package/Log/index.js +19 -0
- package/Log/index.js.map +1 -0
- package/RateLimitStore/index.d.ts +24 -0
- package/RateLimitStore/index.js +24 -0
- package/RateLimitStore/index.js.map +1 -0
- package/RateLimitStore/memory.d.ts +2 -0
- package/RateLimitStore/memory.js +31 -0
- package/RateLimitStore/memory.js.map +1 -0
- package/RateLimitStore/utils.d.ts +2 -0
- package/RateLimitStore/utils.js +18 -0
- package/RateLimitStore/utils.js.map +1 -0
- package/common-gateway.d.ts +5 -0
- package/common-gateway.js +6 -0
- package/common-gateway.js.map +1 -0
- package/common.d.ts +28 -0
- package/common.js +16 -0
- package/common.js.map +1 -0
- package/global.d.ts +17 -0
- package/global.js +2 -0
- package/global.js.map +1 -0
- package/index.d.ts +21 -0
- package/index.js +29 -0
- package/index.js.map +1 -0
- package/package.json +2 -6
- package/types.d.ts +4228 -0
- package/types.js +1796 -0
- package/types.js.map +1 -0
- package/utils/effect.d.ts +2 -0
- package/utils/effect.js +2 -0
- package/utils/effect.js.map +1 -0
- package/utils/tsplus.d.ts +13 -0
- package/utils/tsplus.js +2 -0
- package/utils/tsplus.js.map +1 -0
- package/webhooks.d.ts +15 -0
- package/webhooks.js +23 -0
- package/webhooks.js.map +1 -0
package/types.d.ts
ADDED
|
@@ -0,0 +1,4228 @@
|
|
|
1
|
+
import { RestResponse } from "dfx/DiscordREST/types";
|
|
2
|
+
export interface ActionMetadatum {
|
|
3
|
+
/** SEND_ALERT_MESSAGE */
|
|
4
|
+
channel_id: Snowflake;
|
|
5
|
+
/** TIMEOUT */
|
|
6
|
+
duration_seconds: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ActionRow {
|
|
9
|
+
/** component type */
|
|
10
|
+
type: ComponentType;
|
|
11
|
+
/** a list of child components */
|
|
12
|
+
components: Component[];
|
|
13
|
+
}
|
|
14
|
+
export declare enum ActionType {
|
|
15
|
+
/** blocks the content of a message according to the rule */
|
|
16
|
+
BLOCK_MESSAGE = 1,
|
|
17
|
+
/** logs user content to a specified channel */
|
|
18
|
+
SEND_ALERT_MESSAGE = 2,
|
|
19
|
+
/** timeout user for a specified duration * */
|
|
20
|
+
TIMEOUT = 3
|
|
21
|
+
}
|
|
22
|
+
export interface Activity {
|
|
23
|
+
/** Activity's name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Activity type */
|
|
26
|
+
type: ActivityType;
|
|
27
|
+
/** Stream URL, is validated when type is 1 */
|
|
28
|
+
url?: string | null;
|
|
29
|
+
/** Unix timestamp (in milliseconds) of when the activity was added to the user's session */
|
|
30
|
+
created_at: number;
|
|
31
|
+
/** Unix timestamps for start and/or end of the game */
|
|
32
|
+
timestamps?: ActivityTimestamp;
|
|
33
|
+
/** Application ID for the game */
|
|
34
|
+
application_id?: Snowflake;
|
|
35
|
+
/** What the player is currently doing */
|
|
36
|
+
details?: string | null;
|
|
37
|
+
/** User's current party status */
|
|
38
|
+
state?: string | null;
|
|
39
|
+
/** Emoji used for a custom status */
|
|
40
|
+
emoji?: ActivityEmoji | null;
|
|
41
|
+
/** Information for the current party of the player */
|
|
42
|
+
party?: ActivityParty;
|
|
43
|
+
/** Images for the presence and their hover texts */
|
|
44
|
+
assets?: ActivityAsset;
|
|
45
|
+
/** Secrets for Rich Presence joining and spectating */
|
|
46
|
+
secrets?: ActivitySecret;
|
|
47
|
+
/** Whether or not the activity is an instanced game session */
|
|
48
|
+
instance?: boolean;
|
|
49
|
+
/** Activity flags ORd together, describes what the payload includes */
|
|
50
|
+
flags?: number;
|
|
51
|
+
/** Custom buttons shown in the Rich Presence (max 2) */
|
|
52
|
+
buttons?: ActivityButton[];
|
|
53
|
+
}
|
|
54
|
+
export interface ActivityAsset {
|
|
55
|
+
/** See Activity Asset Image */
|
|
56
|
+
large_image?: string;
|
|
57
|
+
/** Text displayed when hovering over the large image of the activity */
|
|
58
|
+
large_text?: string;
|
|
59
|
+
/** See Activity Asset Image */
|
|
60
|
+
small_image?: string;
|
|
61
|
+
/** Text displayed when hovering over the small image of the activity */
|
|
62
|
+
small_text?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ActivityButton {
|
|
65
|
+
/** Text shown on the button (1-32 characters) */
|
|
66
|
+
label: string;
|
|
67
|
+
/** URL opened when clicking the button (1-512 characters) */
|
|
68
|
+
url: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ActivityEmoji {
|
|
71
|
+
/** Name of the emoji */
|
|
72
|
+
name: string;
|
|
73
|
+
/** ID of the emoji */
|
|
74
|
+
id?: Snowflake;
|
|
75
|
+
/** Whether the emoji is animated */
|
|
76
|
+
animated?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare const ActivityFlag: {
|
|
79
|
+
readonly INSTANCE: number;
|
|
80
|
+
readonly JOIN: number;
|
|
81
|
+
readonly SPECTATE: number;
|
|
82
|
+
readonly JOIN_REQUEST: number;
|
|
83
|
+
readonly SYNC: number;
|
|
84
|
+
readonly PLAY: number;
|
|
85
|
+
readonly PARTY_PRIVACY_FRIENDS: number;
|
|
86
|
+
readonly PARTY_PRIVACY_VOICE_CHANNEL: number;
|
|
87
|
+
readonly EMBEDDED: number;
|
|
88
|
+
};
|
|
89
|
+
export interface ActivityParty {
|
|
90
|
+
/** ID of the party */
|
|
91
|
+
id?: string;
|
|
92
|
+
/** Used to show the party's current and maximum size */
|
|
93
|
+
size?: number[];
|
|
94
|
+
}
|
|
95
|
+
export interface ActivitySecret {
|
|
96
|
+
/** Secret for joining a party */
|
|
97
|
+
join?: string;
|
|
98
|
+
/** Secret for spectating a game */
|
|
99
|
+
spectate?: string;
|
|
100
|
+
/** Secret for a specific instanced match */
|
|
101
|
+
match?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ActivityTimestamp {
|
|
104
|
+
/** Unix time (in milliseconds) of when the activity started */
|
|
105
|
+
start?: number;
|
|
106
|
+
/** Unix time (in milliseconds) of when the activity ends */
|
|
107
|
+
end?: number;
|
|
108
|
+
}
|
|
109
|
+
export declare enum ActivityType {
|
|
110
|
+
GAME = 0,
|
|
111
|
+
STREAMING = 1,
|
|
112
|
+
LISTENING = 2,
|
|
113
|
+
WATCHING = 3,
|
|
114
|
+
CUSTOM = 4,
|
|
115
|
+
COMPETING = 5
|
|
116
|
+
}
|
|
117
|
+
export interface AddGuildMemberParams {
|
|
118
|
+
/** an oauth2 access token granted with the guilds.join to the bot's application for the user you want to add to the guild */
|
|
119
|
+
access_token: string;
|
|
120
|
+
/** value to set user's nickname to */
|
|
121
|
+
nick: string;
|
|
122
|
+
/** array of role ids the member is assigned */
|
|
123
|
+
roles: Snowflake[];
|
|
124
|
+
/** whether the user is muted in voice channels */
|
|
125
|
+
mute: boolean;
|
|
126
|
+
/** whether the user is deafened in voice channels */
|
|
127
|
+
deaf: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface AllowedMention {
|
|
130
|
+
/** An array of allowed mention types to parse from the content. */
|
|
131
|
+
parse: AllowedMentionType[];
|
|
132
|
+
/** Array of role_ids to mention (Max size of 100) */
|
|
133
|
+
roles: Snowflake[];
|
|
134
|
+
/** Array of user_ids to mention (Max size of 100) */
|
|
135
|
+
users: Snowflake[];
|
|
136
|
+
/** For replies, whether to mention the author of the message being replied to (default false) */
|
|
137
|
+
replied_user: boolean;
|
|
138
|
+
}
|
|
139
|
+
export declare enum AllowedMentionType {
|
|
140
|
+
/** Controls role mentions */
|
|
141
|
+
ROLE_MENTIONS = "roles",
|
|
142
|
+
/** Controls user mentions */
|
|
143
|
+
USER_MENTIONS = "users",
|
|
144
|
+
/** Controls @everyone and @here mentions */
|
|
145
|
+
EVERYONE_MENTIONS = "everyone"
|
|
146
|
+
}
|
|
147
|
+
export interface Application {
|
|
148
|
+
/** the id of the app */
|
|
149
|
+
id: Snowflake;
|
|
150
|
+
/** the name of the app */
|
|
151
|
+
name: string;
|
|
152
|
+
/** the icon hash of the app */
|
|
153
|
+
icon?: string | null;
|
|
154
|
+
/** the description of the app */
|
|
155
|
+
description: string;
|
|
156
|
+
/** an array of rpc origin urls, if rpc is enabled */
|
|
157
|
+
rpc_origins?: string[];
|
|
158
|
+
/** when false only app owner can join the app's bot to guilds */
|
|
159
|
+
bot_public: boolean;
|
|
160
|
+
/** when true the app's bot will only join upon completion of the full oauth2 code grant flow */
|
|
161
|
+
bot_require_code_grant: boolean;
|
|
162
|
+
/** the url of the app's terms of service */
|
|
163
|
+
terms_of_service_url?: string;
|
|
164
|
+
/** the url of the app's privacy policy */
|
|
165
|
+
privacy_policy_url?: string;
|
|
166
|
+
/** partial user object containing info on the owner of the application */
|
|
167
|
+
owner?: User;
|
|
168
|
+
/** deprecated and will be removed in v11. An empty string. */
|
|
169
|
+
summary: string;
|
|
170
|
+
/** the hex encoded key for verification in interactions and the GameSDK's GetTicket */
|
|
171
|
+
verify_key: string;
|
|
172
|
+
/** if the application belongs to a team, this will be a list of the members of that team */
|
|
173
|
+
team?: Team | null;
|
|
174
|
+
/** if this application is a game sold on Discord, this field will be the guild to which it has been linked */
|
|
175
|
+
guild_id?: Snowflake;
|
|
176
|
+
/** if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */
|
|
177
|
+
primary_sku_id?: Snowflake;
|
|
178
|
+
/** if this application is a game sold on Discord, this field will be the URL slug that links to the store page */
|
|
179
|
+
slug?: string;
|
|
180
|
+
/** the application's default rich presence invite cover image hash */
|
|
181
|
+
cover_image?: string;
|
|
182
|
+
/** the application's public flags */
|
|
183
|
+
flags?: number;
|
|
184
|
+
/** up to 5 tags describing the content and functionality of the application */
|
|
185
|
+
tags?: string[];
|
|
186
|
+
/** settings for the application's default in-app authorization link, if enabled */
|
|
187
|
+
install_params?: InstallParam;
|
|
188
|
+
/** the application's default custom authorization link, if enabled */
|
|
189
|
+
custom_install_url?: string;
|
|
190
|
+
}
|
|
191
|
+
export interface ApplicationCommand {
|
|
192
|
+
/** Unique ID of command */
|
|
193
|
+
id: Snowflake;
|
|
194
|
+
/** Type of command, defaults to 1 */
|
|
195
|
+
type?: ApplicationCommandType;
|
|
196
|
+
/** ID of the parent application */
|
|
197
|
+
application_id: Snowflake;
|
|
198
|
+
/** guild id of the command, if not global */
|
|
199
|
+
guild_id?: Snowflake;
|
|
200
|
+
/** Name of command, 1-32 characters */
|
|
201
|
+
name: string;
|
|
202
|
+
/** Localization dictionary for name field. Values follow the same restrictions as name */
|
|
203
|
+
name_localizations?: Locale | null;
|
|
204
|
+
/** Description for CHAT_INPUT commands, 1-100 characters. Empty string for USER and MESSAGE commands */
|
|
205
|
+
description: string;
|
|
206
|
+
/** Localization dictionary for description field. Values follow the same restrictions as description */
|
|
207
|
+
description_localizations?: Locale | null;
|
|
208
|
+
/** Parameters for the command, max of 25 */
|
|
209
|
+
options?: ApplicationCommandOption[];
|
|
210
|
+
/** Set of permissions represented as a bit set */
|
|
211
|
+
default_member_permissions?: string | null;
|
|
212
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
213
|
+
dm_permission?: boolean;
|
|
214
|
+
/** Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to true */
|
|
215
|
+
default_permission?: boolean | null;
|
|
216
|
+
/** Autoincrementing version identifier updated during substantial record changes */
|
|
217
|
+
version: Snowflake;
|
|
218
|
+
}
|
|
219
|
+
export interface ApplicationCommandDatum {
|
|
220
|
+
/** the ID of the invoked command */
|
|
221
|
+
id: Snowflake;
|
|
222
|
+
/** the name of the invoked command */
|
|
223
|
+
name: string;
|
|
224
|
+
/** the type of the invoked command */
|
|
225
|
+
type: number;
|
|
226
|
+
/** converted users + roles + channels + attachments */
|
|
227
|
+
resolved?: ResolvedDatum;
|
|
228
|
+
/** the params + values from the user */
|
|
229
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
230
|
+
/** the id of the guild the command is registered to */
|
|
231
|
+
guild_id?: Snowflake;
|
|
232
|
+
/** id of the user or message targeted by a user or message command */
|
|
233
|
+
target_id?: Snowflake;
|
|
234
|
+
}
|
|
235
|
+
export interface ApplicationCommandInteractionDataOption {
|
|
236
|
+
/** Name of the parameter */
|
|
237
|
+
name: string;
|
|
238
|
+
/** Value of application command option type */
|
|
239
|
+
type: ApplicationCommandOptionType;
|
|
240
|
+
/** Value of the option resulting from user input */
|
|
241
|
+
value?: string;
|
|
242
|
+
/** Present if this option is a group or subcommand */
|
|
243
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
244
|
+
/** true if this option is the currently focused option for autocomplete */
|
|
245
|
+
focused?: boolean;
|
|
246
|
+
}
|
|
247
|
+
export interface ApplicationCommandOption {
|
|
248
|
+
/** Type of option */
|
|
249
|
+
type: any;
|
|
250
|
+
/** 1-32 character name */
|
|
251
|
+
name: string;
|
|
252
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
253
|
+
name_localizations?: Locale | null;
|
|
254
|
+
/** 1-100 character description */
|
|
255
|
+
description: string;
|
|
256
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
257
|
+
description_localizations?: Locale | null;
|
|
258
|
+
/** If the parameter is required or optional--default false */
|
|
259
|
+
required?: boolean;
|
|
260
|
+
/** Choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25 */
|
|
261
|
+
choices?: ApplicationCommandOptionChoice[];
|
|
262
|
+
/** If the option is a subcommand or subcommand group type, these nested options will be the parameters */
|
|
263
|
+
options?: ApplicationCommandOption[];
|
|
264
|
+
/** If the option is a channel type, the channels shown will be restricted to these types */
|
|
265
|
+
channel_types?: ChannelType[];
|
|
266
|
+
/** If the option is an INTEGER or NUMBER type, the minimum value permitted */
|
|
267
|
+
min_value?: number;
|
|
268
|
+
/** If the option is an INTEGER or NUMBER type, the maximum value permitted */
|
|
269
|
+
max_value?: number;
|
|
270
|
+
/** For option type STRING, the minimum allowed length (minimum of 0, maximum of 6000) */
|
|
271
|
+
min_length?: number;
|
|
272
|
+
/** For option type STRING, the maximum allowed length (minimum of 1, maximum of 6000) */
|
|
273
|
+
max_length?: number;
|
|
274
|
+
/** If autocomplete interactions are enabled for this STRING, INTEGER, or NUMBER type option */
|
|
275
|
+
autocomplete?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface ApplicationCommandOptionChoice {
|
|
278
|
+
/** 1-100 character choice name */
|
|
279
|
+
name: string;
|
|
280
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
281
|
+
name_localizations?: Locale | null;
|
|
282
|
+
/** Value for the choice, up to 100 characters if string */
|
|
283
|
+
value: string;
|
|
284
|
+
}
|
|
285
|
+
export declare enum ApplicationCommandOptionType {
|
|
286
|
+
SUB_COMMAND = 1,
|
|
287
|
+
SUB_COMMAND_GROUP = 2,
|
|
288
|
+
STRING = 3,
|
|
289
|
+
INTEGER = 4,
|
|
290
|
+
BOOLEAN = 5,
|
|
291
|
+
USER = 6,
|
|
292
|
+
CHANNEL = 7,
|
|
293
|
+
ROLE = 8,
|
|
294
|
+
MENTIONABLE = 9,
|
|
295
|
+
NUMBER = 10,
|
|
296
|
+
ATTACHMENT = 11
|
|
297
|
+
}
|
|
298
|
+
export interface ApplicationCommandPermission {
|
|
299
|
+
/** ID of the role, user, or channel. It can also be a permission constant */
|
|
300
|
+
id: Snowflake;
|
|
301
|
+
/** role (1), user (2), or channel (3) */
|
|
302
|
+
type: ApplicationCommandPermissionType;
|
|
303
|
+
/** true to allow, false, to disallow */
|
|
304
|
+
permission: boolean;
|
|
305
|
+
}
|
|
306
|
+
export type ApplicationCommandPermissionsUpdateEvent = GuildApplicationCommandPermission;
|
|
307
|
+
export declare enum ApplicationCommandPermissionType {
|
|
308
|
+
ROLE = 1,
|
|
309
|
+
USER = 2,
|
|
310
|
+
CHANNEL = 3
|
|
311
|
+
}
|
|
312
|
+
export declare enum ApplicationCommandType {
|
|
313
|
+
/** Slash commands; a text-based command that shows up when a user types / */
|
|
314
|
+
CHAT_INPUT = 1,
|
|
315
|
+
/** A UI-based command that shows up when you right click or tap on a user */
|
|
316
|
+
USER = 2,
|
|
317
|
+
/** A UI-based command that shows up when you right click or tap on a message */
|
|
318
|
+
MESSAGE = 3
|
|
319
|
+
}
|
|
320
|
+
export declare const ApplicationFlag: {
|
|
321
|
+
/** Intent required for bots in 100 or more servers to receive presence_update events */
|
|
322
|
+
readonly GATEWAY_PRESENCE: number;
|
|
323
|
+
/** Intent required for bots in under 100 servers to receive presence_update events, found in Bot Settings */
|
|
324
|
+
readonly GATEWAY_PRESENCE_LIMITED: number;
|
|
325
|
+
/** Intent required for bots in 100 or more servers to receive member-related events like guild_member_add. See list of member-related events under GUILD_MEMBERS */
|
|
326
|
+
readonly GATEWAY_GUILD_MEMBERS: number;
|
|
327
|
+
/** Intent required for bots in under 100 servers to receive member-related events like guild_member_add, found in Bot Settings. See list of member-related events under GUILD_MEMBERS */
|
|
328
|
+
readonly GATEWAY_GUILD_MEMBERS_LIMITED: number;
|
|
329
|
+
/** Indicates unusual growth of an app that prevents verification */
|
|
330
|
+
readonly VERIFICATION_PENDING_GUILD_LIMIT: number;
|
|
331
|
+
/** Indicates if an app is embedded within the Discord client (currently unavailable publicly) */
|
|
332
|
+
readonly EMBEDDED: number;
|
|
333
|
+
/** Intent required for bots in 100 or more servers to receive message content */
|
|
334
|
+
readonly GATEWAY_MESSAGE_CONTENT: number;
|
|
335
|
+
/** Intent required for bots in under 100 servers to receive message content, found in Bot Settings */
|
|
336
|
+
readonly GATEWAY_MESSAGE_CONTENT_LIMITED: number;
|
|
337
|
+
/** Indicates if an app has registered global application commands */
|
|
338
|
+
readonly APPLICATION_COMMAND_BADGE: number;
|
|
339
|
+
};
|
|
340
|
+
export interface Attachment {
|
|
341
|
+
/** attachment id */
|
|
342
|
+
id: Snowflake;
|
|
343
|
+
/** name of file attached */
|
|
344
|
+
filename: string;
|
|
345
|
+
/** description for the file (max 1024 characters) */
|
|
346
|
+
description?: string;
|
|
347
|
+
/** the attachment's media type */
|
|
348
|
+
content_type?: string;
|
|
349
|
+
/** size of file in bytes */
|
|
350
|
+
size: number;
|
|
351
|
+
/** source url of file */
|
|
352
|
+
url: string;
|
|
353
|
+
/** a proxied url of file */
|
|
354
|
+
proxy_url: string;
|
|
355
|
+
/** height of file (if image) */
|
|
356
|
+
height?: number | null;
|
|
357
|
+
/** width of file (if image) */
|
|
358
|
+
width?: number | null;
|
|
359
|
+
/** whether this attachment is ephemeral */
|
|
360
|
+
ephemeral?: boolean;
|
|
361
|
+
}
|
|
362
|
+
export interface AuditEntryInfo {
|
|
363
|
+
/** ID of the app whose permissions were targeted */
|
|
364
|
+
application_id: Snowflake;
|
|
365
|
+
/** Name of the Auto Moderation rule that was triggered */
|
|
366
|
+
auto_moderation_rule_name: string;
|
|
367
|
+
/** Trigger type of the Auto Moderation rule that was triggered */
|
|
368
|
+
auto_moderation_rule_trigger_type: string;
|
|
369
|
+
/** Channel in which the entities were targeted */
|
|
370
|
+
channel_id: Snowflake;
|
|
371
|
+
/** Number of entities that were targeted */
|
|
372
|
+
count: string;
|
|
373
|
+
/** Number of days after which inactive members were kicked */
|
|
374
|
+
delete_member_days: string;
|
|
375
|
+
/** ID of the overwritten entity */
|
|
376
|
+
id: Snowflake;
|
|
377
|
+
/** Number of members removed by the prune */
|
|
378
|
+
members_removed: string;
|
|
379
|
+
/** ID of the message that was targeted */
|
|
380
|
+
message_id: Snowflake;
|
|
381
|
+
/** Name of the role if type is "0" (not present if type is "1") */
|
|
382
|
+
role_name: string;
|
|
383
|
+
/** Type of overwritten entity - role ("0") or member ("1") */
|
|
384
|
+
type: string;
|
|
385
|
+
}
|
|
386
|
+
export interface AuditLog {
|
|
387
|
+
/** List of application commands referenced in the audit log */
|
|
388
|
+
application_commands: ApplicationCommand[];
|
|
389
|
+
/** List of audit log entries, sorted from most to least recent */
|
|
390
|
+
audit_log_entries: AuditLogEntry[];
|
|
391
|
+
/** List of auto moderation rules referenced in the audit log */
|
|
392
|
+
auto_moderation_rules: AutoModerationRule[];
|
|
393
|
+
/** List of guild scheduled events referenced in the audit log */
|
|
394
|
+
guild_scheduled_events: GuildScheduledEvent[];
|
|
395
|
+
/** List of partial integration objects */
|
|
396
|
+
integrations: Integration[];
|
|
397
|
+
/** List of threads referenced in the audit log* */
|
|
398
|
+
threads: Channel[];
|
|
399
|
+
/** List of users referenced in the audit log */
|
|
400
|
+
users: User[];
|
|
401
|
+
/** List of webhooks referenced in the audit log */
|
|
402
|
+
webhooks: Webhook[];
|
|
403
|
+
}
|
|
404
|
+
export interface AuditLogChange {
|
|
405
|
+
/** New value of the key */
|
|
406
|
+
new_value?: any;
|
|
407
|
+
/** Old value of the key */
|
|
408
|
+
old_value?: any;
|
|
409
|
+
/** Name of the changed entity, with a few exceptions */
|
|
410
|
+
key: string;
|
|
411
|
+
}
|
|
412
|
+
export interface AuditLogEntry {
|
|
413
|
+
/** ID of the affected entity (webhook, user, role, etc.) */
|
|
414
|
+
target_id?: string | null;
|
|
415
|
+
/** Changes made to the target_id */
|
|
416
|
+
changes?: AuditLogChange[];
|
|
417
|
+
/** User or app that made the changes */
|
|
418
|
+
user_id?: Snowflake | null;
|
|
419
|
+
/** ID of the entry */
|
|
420
|
+
id: Snowflake;
|
|
421
|
+
/** Type of action that occurred */
|
|
422
|
+
action_type: AuditLogEvent;
|
|
423
|
+
/** Additional info for certain event types */
|
|
424
|
+
options?: AuditEntryInfo;
|
|
425
|
+
/** Reason for the change (1-512 characters) */
|
|
426
|
+
reason?: string;
|
|
427
|
+
}
|
|
428
|
+
export declare enum AuditLogEvent {
|
|
429
|
+
/** Server settings were updated */
|
|
430
|
+
GUILD_UPDATE = 1,
|
|
431
|
+
/** Channel was created */
|
|
432
|
+
CHANNEL_CREATE = 10,
|
|
433
|
+
/** Channel settings were updated */
|
|
434
|
+
CHANNEL_UPDATE = 11,
|
|
435
|
+
/** Channel was deleted */
|
|
436
|
+
CHANNEL_DELETE = 12,
|
|
437
|
+
/** Permission overwrite was added to a channel */
|
|
438
|
+
CHANNEL_OVERWRITE_CREATE = 13,
|
|
439
|
+
/** Permission overwrite was updated for a channel */
|
|
440
|
+
CHANNEL_OVERWRITE_UPDATE = 14,
|
|
441
|
+
/** Permission overwrite was deleted from a channel */
|
|
442
|
+
CHANNEL_OVERWRITE_DELETE = 15,
|
|
443
|
+
/** Member was removed from server */
|
|
444
|
+
MEMBER_KICK = 20,
|
|
445
|
+
/** Members were pruned from server */
|
|
446
|
+
MEMBER_PRUNE = 21,
|
|
447
|
+
/** Member was banned from server */
|
|
448
|
+
MEMBER_BAN_ADD = 22,
|
|
449
|
+
/** Server ban was lifted for a member */
|
|
450
|
+
MEMBER_BAN_REMOVE = 23,
|
|
451
|
+
/** Member was updated in server */
|
|
452
|
+
MEMBER_UPDATE = 24,
|
|
453
|
+
/** Member was added or removed from a role */
|
|
454
|
+
MEMBER_ROLE_UPDATE = 25,
|
|
455
|
+
/** Member was moved to a different voice channel */
|
|
456
|
+
MEMBER_MOVE = 26,
|
|
457
|
+
/** Member was disconnected from a voice channel */
|
|
458
|
+
MEMBER_DISCONNECT = 27,
|
|
459
|
+
/** Bot user was added to server */
|
|
460
|
+
BOT_ADD = 28,
|
|
461
|
+
/** Role was created */
|
|
462
|
+
ROLE_CREATE = 30,
|
|
463
|
+
/** Role was edited */
|
|
464
|
+
ROLE_UPDATE = 31,
|
|
465
|
+
/** Role was deleted */
|
|
466
|
+
ROLE_DELETE = 32,
|
|
467
|
+
/** Server invite was created */
|
|
468
|
+
INVITE_CREATE = 40,
|
|
469
|
+
/** Server invite was updated */
|
|
470
|
+
INVITE_UPDATE = 41,
|
|
471
|
+
/** Server invite was deleted */
|
|
472
|
+
INVITE_DELETE = 42,
|
|
473
|
+
/** Webhook was created */
|
|
474
|
+
WEBHOOK_CREATE = 50,
|
|
475
|
+
/** Webhook properties or channel were updated */
|
|
476
|
+
WEBHOOK_UPDATE = 51,
|
|
477
|
+
/** Webhook was deleted */
|
|
478
|
+
WEBHOOK_DELETE = 52,
|
|
479
|
+
/** Emoji was created */
|
|
480
|
+
EMOJI_CREATE = 60,
|
|
481
|
+
/** Emoji name was updated */
|
|
482
|
+
EMOJI_UPDATE = 61,
|
|
483
|
+
/** Emoji was deleted */
|
|
484
|
+
EMOJI_DELETE = 62,
|
|
485
|
+
/** Single message was deleted */
|
|
486
|
+
MESSAGE_DELETE = 72,
|
|
487
|
+
/** Multiple messages were deleted */
|
|
488
|
+
MESSAGE_BULK_DELETE = 73,
|
|
489
|
+
/** Message was pinned to a channel */
|
|
490
|
+
MESSAGE_PIN = 74,
|
|
491
|
+
/** Message was unpinned from a channel */
|
|
492
|
+
MESSAGE_UNPIN = 75,
|
|
493
|
+
/** App was added to server */
|
|
494
|
+
INTEGRATION_CREATE = 80,
|
|
495
|
+
/** App was updated (as an example, its scopes were updated) */
|
|
496
|
+
INTEGRATION_UPDATE = 81,
|
|
497
|
+
/** App was removed from server */
|
|
498
|
+
INTEGRATION_DELETE = 82,
|
|
499
|
+
/** Stage instance was created (stage channel becomes live) */
|
|
500
|
+
STAGE_INSTANCE_CREATE = 83,
|
|
501
|
+
/** Stage instance details were updated */
|
|
502
|
+
STAGE_INSTANCE_UPDATE = 84,
|
|
503
|
+
/** Stage instance was deleted (stage channel no longer live) */
|
|
504
|
+
STAGE_INSTANCE_DELETE = 85,
|
|
505
|
+
/** Sticker was created */
|
|
506
|
+
STICKER_CREATE = 90,
|
|
507
|
+
/** Sticker details were updated */
|
|
508
|
+
STICKER_UPDATE = 91,
|
|
509
|
+
/** Sticker was deleted */
|
|
510
|
+
STICKER_DELETE = 92,
|
|
511
|
+
/** Event was created */
|
|
512
|
+
GUILD_SCHEDULED_EVENT_CREATE = 100,
|
|
513
|
+
/** Event was updated */
|
|
514
|
+
GUILD_SCHEDULED_EVENT_UPDATE = 101,
|
|
515
|
+
/** Event was cancelled */
|
|
516
|
+
GUILD_SCHEDULED_EVENT_DELETE = 102,
|
|
517
|
+
/** Thread was created in a channel */
|
|
518
|
+
THREAD_CREATE = 110,
|
|
519
|
+
/** Thread was updated */
|
|
520
|
+
THREAD_UPDATE = 111,
|
|
521
|
+
/** Thread was deleted */
|
|
522
|
+
THREAD_DELETE = 112,
|
|
523
|
+
/** Permissions were updated for a command */
|
|
524
|
+
APPLICATION_COMMAND_PERMISSION_UPDATE = 121,
|
|
525
|
+
/** Auto Moderation rule was created */
|
|
526
|
+
AUTO_MODERATION_RULE_CREATE = 140,
|
|
527
|
+
/** Auto Moderation rule was updated */
|
|
528
|
+
AUTO_MODERATION_RULE_UPDATE = 141,
|
|
529
|
+
/** Auto Moderation rule was deleted */
|
|
530
|
+
AUTO_MODERATION_RULE_DELETE = 142,
|
|
531
|
+
/** Message was blocked by Auto Moderation */
|
|
532
|
+
AUTO_MODERATION_BLOCK_MESSAGE = 143,
|
|
533
|
+
/** Message was flagged by Auto Moderation */
|
|
534
|
+
AUTO_MODERATION_FLAG_TO_CHANNEL = 144,
|
|
535
|
+
/** Member was timed out by Auto Moderation */
|
|
536
|
+
AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145
|
|
537
|
+
}
|
|
538
|
+
export interface AutoModerationAction {
|
|
539
|
+
/** the type of action */
|
|
540
|
+
type: ActionType;
|
|
541
|
+
/** additional metadata needed during execution for this specific action type */
|
|
542
|
+
metadata?: ActionMetadatum;
|
|
543
|
+
}
|
|
544
|
+
export interface AutoModerationActionExecutionEvent {
|
|
545
|
+
/** ID of the guild in which action was executed */
|
|
546
|
+
guild_id: Snowflake;
|
|
547
|
+
/** Action which was executed */
|
|
548
|
+
action: AutoModerationAction;
|
|
549
|
+
/** ID of the rule which action belongs to */
|
|
550
|
+
rule_id: Snowflake;
|
|
551
|
+
/** Trigger type of rule which was triggered */
|
|
552
|
+
rule_trigger_type: TriggerType;
|
|
553
|
+
/** ID of the user which generated the content which triggered the rule */
|
|
554
|
+
user_id: Snowflake;
|
|
555
|
+
/** ID of the channel in which user content was posted */
|
|
556
|
+
channel_id?: Snowflake;
|
|
557
|
+
/** ID of any user message which content belongs to * */
|
|
558
|
+
message_id?: Snowflake;
|
|
559
|
+
/** ID of any system auto moderation messages posted as a result of this action ** */
|
|
560
|
+
alert_system_message_id?: Snowflake;
|
|
561
|
+
/** User-generated text content */
|
|
562
|
+
content: string;
|
|
563
|
+
/** Word or phrase configured in the rule that triggered the rule */
|
|
564
|
+
matched_keyword?: string | null;
|
|
565
|
+
/** Substring in content that triggered the rule */
|
|
566
|
+
matched_content?: string | null;
|
|
567
|
+
}
|
|
568
|
+
export interface AutoModerationRule {
|
|
569
|
+
/** the id of this rule */
|
|
570
|
+
id: Snowflake;
|
|
571
|
+
/** the id of the guild which this rule belongs to */
|
|
572
|
+
guild_id: Snowflake;
|
|
573
|
+
/** the rule name */
|
|
574
|
+
name: string;
|
|
575
|
+
/** the user which first created this rule */
|
|
576
|
+
creator_id: Snowflake;
|
|
577
|
+
/** the rule event type */
|
|
578
|
+
event_type: EventType;
|
|
579
|
+
/** the rule trigger type */
|
|
580
|
+
trigger_type: TriggerType;
|
|
581
|
+
/** the rule trigger metadata */
|
|
582
|
+
trigger_metadata: TriggerMetadatum;
|
|
583
|
+
/** the actions which will execute when the rule is triggered */
|
|
584
|
+
actions: AutoModerationAction[];
|
|
585
|
+
/** whether the rule is enabled */
|
|
586
|
+
enabled: boolean;
|
|
587
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
588
|
+
exempt_roles: Snowflake[];
|
|
589
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
590
|
+
exempt_channels: Snowflake[];
|
|
591
|
+
}
|
|
592
|
+
export type AutoModerationRuleCreateEvent = AutoModerationRule;
|
|
593
|
+
export type AutoModerationRuleDeleteEvent = AutoModerationRule;
|
|
594
|
+
export type AutoModerationRuleUpdateEvent = AutoModerationRule;
|
|
595
|
+
export interface Ban {
|
|
596
|
+
/** the reason for the ban */
|
|
597
|
+
reason?: string | null;
|
|
598
|
+
/** the banned user */
|
|
599
|
+
user: User;
|
|
600
|
+
}
|
|
601
|
+
export interface BeginGuildPruneParams {
|
|
602
|
+
/** number of days to prune (1-30) */
|
|
603
|
+
days: number;
|
|
604
|
+
/** whether pruned is returned, discouraged for large guilds */
|
|
605
|
+
compute_prune_count: boolean;
|
|
606
|
+
/** role(s) to include */
|
|
607
|
+
include_roles: Snowflake[];
|
|
608
|
+
/** reason for the prune (deprecated) */
|
|
609
|
+
reason?: string;
|
|
610
|
+
}
|
|
611
|
+
export interface BulkDeleteMessageParams {
|
|
612
|
+
/** an array of message ids to delete (2-100) */
|
|
613
|
+
messages: Snowflake[];
|
|
614
|
+
}
|
|
615
|
+
export interface BulkOverwriteGuildApplicationCommandParams {
|
|
616
|
+
/** ID of the command, if known */
|
|
617
|
+
id?: Snowflake;
|
|
618
|
+
/** Name of command, 1-32 characters */
|
|
619
|
+
name: string;
|
|
620
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
621
|
+
name_localizations?: Locale | null;
|
|
622
|
+
/** 1-100 character description */
|
|
623
|
+
description: string;
|
|
624
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
625
|
+
description_localizations?: Locale | null;
|
|
626
|
+
/** Parameters for the command */
|
|
627
|
+
options?: ApplicationCommandOption[];
|
|
628
|
+
/** Set of permissions represented as a bit set */
|
|
629
|
+
default_member_permissions?: string | null;
|
|
630
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
631
|
+
dm_permission?: boolean | null;
|
|
632
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
633
|
+
default_permission?: boolean;
|
|
634
|
+
/** Type of command, defaults 1 if not set */
|
|
635
|
+
type?: ApplicationCommandType;
|
|
636
|
+
}
|
|
637
|
+
export interface Button {
|
|
638
|
+
/** 2 for a button */
|
|
639
|
+
type: number;
|
|
640
|
+
/** A button style */
|
|
641
|
+
style: ButtonStyle;
|
|
642
|
+
/** Text that appears on the button; max 80 characters */
|
|
643
|
+
label?: string;
|
|
644
|
+
/** name, id, and animated */
|
|
645
|
+
emoji?: Emoji;
|
|
646
|
+
/** Developer-defined identifier for the button; max 100 characters */
|
|
647
|
+
custom_id?: string;
|
|
648
|
+
/** URL for link-style buttons */
|
|
649
|
+
url?: string;
|
|
650
|
+
/** Whether the button is disabled (defaults to false) */
|
|
651
|
+
disabled?: boolean;
|
|
652
|
+
}
|
|
653
|
+
export declare enum ButtonStyle {
|
|
654
|
+
PRIMARY = 1,
|
|
655
|
+
SECONDARY = 2,
|
|
656
|
+
SUCCESS = 3,
|
|
657
|
+
DANGER = 4,
|
|
658
|
+
LINK = 5
|
|
659
|
+
}
|
|
660
|
+
export interface Channel {
|
|
661
|
+
/** the id of this channel */
|
|
662
|
+
id: Snowflake;
|
|
663
|
+
/** the type of channel */
|
|
664
|
+
type: ChannelType;
|
|
665
|
+
/** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
|
|
666
|
+
guild_id?: Snowflake;
|
|
667
|
+
/** sorting position of the channel */
|
|
668
|
+
position?: number;
|
|
669
|
+
/** explicit permission overwrites for members and roles */
|
|
670
|
+
permission_overwrites?: Overwrite[];
|
|
671
|
+
/** the name of the channel (1-100 characters) */
|
|
672
|
+
name?: string | null;
|
|
673
|
+
/** the channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */
|
|
674
|
+
topic?: string | null;
|
|
675
|
+
/** whether the channel is nsfw */
|
|
676
|
+
nsfw?: boolean;
|
|
677
|
+
/** the id of the last message sent in this channel (or thread for GUILD_FORUM channels) (may not point to an existing or valid message or thread) */
|
|
678
|
+
last_message_id?: Snowflake | null;
|
|
679
|
+
/** the bitrate (in bits) of the voice channel */
|
|
680
|
+
bitrate?: number;
|
|
681
|
+
/** the user limit of the voice channel */
|
|
682
|
+
user_limit?: number;
|
|
683
|
+
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
684
|
+
rate_limit_per_user?: number;
|
|
685
|
+
/** the recipients of the DM */
|
|
686
|
+
recipients?: User[];
|
|
687
|
+
/** icon hash of the group DM */
|
|
688
|
+
icon?: string | null;
|
|
689
|
+
/** id of the creator of the group DM or thread */
|
|
690
|
+
owner_id?: Snowflake;
|
|
691
|
+
/** application id of the group DM creator if it is bot-created */
|
|
692
|
+
application_id?: Snowflake;
|
|
693
|
+
/** for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */
|
|
694
|
+
parent_id?: Snowflake | null;
|
|
695
|
+
/** when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
|
|
696
|
+
last_pin_timestamp?: string | null;
|
|
697
|
+
/** voice region id for the voice channel, automatic when set to null */
|
|
698
|
+
rtc_region?: string | null;
|
|
699
|
+
/** the camera video quality mode of the voice channel, 1 when not present */
|
|
700
|
+
video_quality_mode?: VideoQualityMode;
|
|
701
|
+
/** number of messages (not including the initial message or deleted messages) in a thread. */
|
|
702
|
+
message_count?: number;
|
|
703
|
+
/** an approximate count of users in a thread, stops counting at 50 */
|
|
704
|
+
member_count?: number;
|
|
705
|
+
/** thread-specific fields not needed by other channels */
|
|
706
|
+
thread_metadata?: ThreadMetadatum;
|
|
707
|
+
/** thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
|
|
708
|
+
member?: ThreadMember;
|
|
709
|
+
/** default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
710
|
+
default_auto_archive_duration?: number;
|
|
711
|
+
/** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction */
|
|
712
|
+
permissions?: string;
|
|
713
|
+
/** channel flags combined as a bitfield */
|
|
714
|
+
flags?: number;
|
|
715
|
+
/** number of messages ever sent in a thread, it's similar to message_count on message creation, but will not decrement the number when a message is deleted */
|
|
716
|
+
total_message_sent?: number;
|
|
717
|
+
/** the set of tags that can be used in a GUILD_FORUM channel */
|
|
718
|
+
available_tags?: ForumTag[];
|
|
719
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
720
|
+
applied_tags?: Snowflake[];
|
|
721
|
+
/** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
722
|
+
default_reaction_emoji?: DefaultReaction | null;
|
|
723
|
+
/** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
|
|
724
|
+
default_thread_rate_limit_per_user?: number;
|
|
725
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
|
|
726
|
+
default_sort_order?: SortOrderType | null;
|
|
727
|
+
}
|
|
728
|
+
export type ChannelCreateEvent = Channel;
|
|
729
|
+
export type ChannelDeleteEvent = Channel;
|
|
730
|
+
export declare const ChannelFlag: {
|
|
731
|
+
/** this thread is pinned to the top of its parent GUILD_FORUM channel */
|
|
732
|
+
readonly PINNED: number;
|
|
733
|
+
/** whether a tag is required to be specified when creating a thread in a GUILD_FORUM channel. Tags are specified in the applied_tags field. */
|
|
734
|
+
readonly REQUIRE_TAG: number;
|
|
735
|
+
};
|
|
736
|
+
export interface ChannelMention {
|
|
737
|
+
/** id of the channel */
|
|
738
|
+
id: Snowflake;
|
|
739
|
+
/** id of the guild containing the channel */
|
|
740
|
+
guild_id: Snowflake;
|
|
741
|
+
/** the type of channel */
|
|
742
|
+
type: ChannelType;
|
|
743
|
+
/** the name of the channel */
|
|
744
|
+
name: string;
|
|
745
|
+
}
|
|
746
|
+
export interface ChannelPinsUpdateEvent {
|
|
747
|
+
/** ID of the guild */
|
|
748
|
+
guild_id?: Snowflake;
|
|
749
|
+
/** ID of the channel */
|
|
750
|
+
channel_id: Snowflake;
|
|
751
|
+
/** Time at which the most recent pinned message was pinned */
|
|
752
|
+
last_pin_timestamp?: string | null;
|
|
753
|
+
}
|
|
754
|
+
export declare enum ChannelType {
|
|
755
|
+
/** a text channel within a server */
|
|
756
|
+
GUILD_TEXT = 0,
|
|
757
|
+
/** a direct message between users */
|
|
758
|
+
DM = 1,
|
|
759
|
+
/** a voice channel within a server */
|
|
760
|
+
GUILD_VOICE = 2,
|
|
761
|
+
/** a direct message between multiple users */
|
|
762
|
+
GROUP_DM = 3,
|
|
763
|
+
/** an organizational category that contains up to 50 channels */
|
|
764
|
+
GUILD_CATEGORY = 4,
|
|
765
|
+
/** a channel that users can follow and crosspost into their own server (formerly news channels) */
|
|
766
|
+
GUILD_ANNOUNCEMENT = 5,
|
|
767
|
+
/** a temporary sub-channel within a GUILD_ANNOUNCEMENT channel */
|
|
768
|
+
ANNOUNCEMENT_THREAD = 10,
|
|
769
|
+
/** a temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel */
|
|
770
|
+
PUBLIC_THREAD = 11,
|
|
771
|
+
/** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
|
|
772
|
+
PRIVATE_THREAD = 12,
|
|
773
|
+
/** a voice channel for hosting events with an audience */
|
|
774
|
+
GUILD_STAGE_VOICE = 13,
|
|
775
|
+
/** the channel in a hub containing the listed servers */
|
|
776
|
+
GUILD_DIRECTORY = 14,
|
|
777
|
+
/** Channel that can only contain threads */
|
|
778
|
+
GUILD_FORUM = 15
|
|
779
|
+
}
|
|
780
|
+
export type ChannelUpdateEvent = Channel;
|
|
781
|
+
export interface ClientStatus {
|
|
782
|
+
/** User's status set for an active desktop (Windows, Linux, Mac) application session */
|
|
783
|
+
desktop?: string;
|
|
784
|
+
/** User's status set for an active mobile (iOS, Android) application session */
|
|
785
|
+
mobile?: string;
|
|
786
|
+
/** User's status set for an active web (browser, bot account) application session */
|
|
787
|
+
web?: string;
|
|
788
|
+
}
|
|
789
|
+
export type Component = ActionRow | Button | TextInput | SelectMenu;
|
|
790
|
+
export declare enum ComponentType {
|
|
791
|
+
/** Container for other components */
|
|
792
|
+
ACTION_ROW = 1,
|
|
793
|
+
/** Button object */
|
|
794
|
+
BUTTON = 2,
|
|
795
|
+
/** Select menu for picking from defined text options */
|
|
796
|
+
STRING_SELECT = 3,
|
|
797
|
+
/** Text input object */
|
|
798
|
+
TEXT_INPUT = 4,
|
|
799
|
+
/** Select menu for users */
|
|
800
|
+
USER_SELECT = 5,
|
|
801
|
+
/** Select menu for roles */
|
|
802
|
+
ROLE_SELECT = 6,
|
|
803
|
+
/** Select menu for mentionables (users and roles) */
|
|
804
|
+
MENTIONABLE_SELECT = 7,
|
|
805
|
+
/** Select menu for channels */
|
|
806
|
+
CHANNEL_SELECT = 8
|
|
807
|
+
}
|
|
808
|
+
export interface Connection {
|
|
809
|
+
/** id of the connection account */
|
|
810
|
+
id: string;
|
|
811
|
+
/** the username of the connection account */
|
|
812
|
+
name: string;
|
|
813
|
+
/** the service of this connection */
|
|
814
|
+
type: string;
|
|
815
|
+
/** whether the connection is revoked */
|
|
816
|
+
revoked?: boolean;
|
|
817
|
+
/** an array of partial server integrations */
|
|
818
|
+
integrations?: Integration[];
|
|
819
|
+
/** whether the connection is verified */
|
|
820
|
+
verified: boolean;
|
|
821
|
+
/** whether friend sync is enabled for this connection */
|
|
822
|
+
friend_sync: boolean;
|
|
823
|
+
/** whether activities related to this connection will be shown in presence updates */
|
|
824
|
+
show_activity: boolean;
|
|
825
|
+
/** whether this connection has a corresponding third party OAuth2 token */
|
|
826
|
+
two_way_link: boolean;
|
|
827
|
+
/** visibility of this connection */
|
|
828
|
+
visibility: VisibilityType;
|
|
829
|
+
}
|
|
830
|
+
export interface CreateAutoModerationRuleParams {
|
|
831
|
+
/** the rule name */
|
|
832
|
+
name: string;
|
|
833
|
+
/** the event type */
|
|
834
|
+
event_type: EventType;
|
|
835
|
+
/** the trigger type */
|
|
836
|
+
trigger_type: TriggerType;
|
|
837
|
+
/** the trigger metadata */
|
|
838
|
+
trigger_metadata?: TriggerMetadatum;
|
|
839
|
+
/** the actions which will execute when the rule is triggered */
|
|
840
|
+
actions: AutoModerationAction[];
|
|
841
|
+
/** whether the rule is enabled (False by default) */
|
|
842
|
+
enabled?: boolean;
|
|
843
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
844
|
+
exempt_roles?: Snowflake[];
|
|
845
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
846
|
+
exempt_channels?: Snowflake[];
|
|
847
|
+
}
|
|
848
|
+
export interface CreateChannelInviteParams {
|
|
849
|
+
/** duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) */
|
|
850
|
+
max_age: number;
|
|
851
|
+
/** max number of uses or 0 for unlimited. between 0 and 100 */
|
|
852
|
+
max_uses: number;
|
|
853
|
+
/** whether this invite only grants temporary membership */
|
|
854
|
+
temporary: boolean;
|
|
855
|
+
/** if true, don't try to reuse a similar invite (useful for creating many unique one time use invites) */
|
|
856
|
+
unique: boolean;
|
|
857
|
+
/** the type of target for this voice channel invite */
|
|
858
|
+
target_type: InviteTargetType;
|
|
859
|
+
/** the id of the user whose stream to display for this invite, required if target_type is 1, the user must be streaming in the channel */
|
|
860
|
+
target_user_id: Snowflake;
|
|
861
|
+
/** the id of the embedded application to open for this invite, required if target_type is 2, the application must have the EMBEDDED flag */
|
|
862
|
+
target_application_id: Snowflake;
|
|
863
|
+
}
|
|
864
|
+
export interface CreateDmParams {
|
|
865
|
+
/** the recipient to open a DM channel with */
|
|
866
|
+
recipient_id: Snowflake;
|
|
867
|
+
}
|
|
868
|
+
export interface CreateGlobalApplicationCommandParams {
|
|
869
|
+
/** Name of command, 1-32 characters */
|
|
870
|
+
name: string;
|
|
871
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
872
|
+
name_localizations?: Locale | null;
|
|
873
|
+
/** 1-100 character description for CHAT_INPUT commands */
|
|
874
|
+
description?: string;
|
|
875
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
876
|
+
description_localizations?: Locale | null;
|
|
877
|
+
/** the parameters for the command */
|
|
878
|
+
options?: ApplicationCommandOption[];
|
|
879
|
+
/** Set of permissions represented as a bit set */
|
|
880
|
+
default_member_permissions?: string | null;
|
|
881
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
882
|
+
dm_permission?: boolean | null;
|
|
883
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
884
|
+
default_permission?: boolean;
|
|
885
|
+
/** Type of command, defaults 1 if not set */
|
|
886
|
+
type?: ApplicationCommandType;
|
|
887
|
+
}
|
|
888
|
+
export interface CreateGroupDmParams {
|
|
889
|
+
/** access tokens of users that have granted your app the gdm.join scope */
|
|
890
|
+
access_tokens: string[];
|
|
891
|
+
/** a dictionary of user ids to their respective nicknames */
|
|
892
|
+
nicks: Record<string, string>;
|
|
893
|
+
}
|
|
894
|
+
export interface CreateGuildApplicationCommandParams {
|
|
895
|
+
/** Name of command, 1-32 characters */
|
|
896
|
+
name: string;
|
|
897
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
898
|
+
name_localizations?: Locale | null;
|
|
899
|
+
/** 1-100 character description for CHAT_INPUT commands */
|
|
900
|
+
description?: string;
|
|
901
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
902
|
+
description_localizations?: Locale | null;
|
|
903
|
+
/** Parameters for the command */
|
|
904
|
+
options?: ApplicationCommandOption[];
|
|
905
|
+
/** Set of permissions represented as a bit set */
|
|
906
|
+
default_member_permissions?: string | null;
|
|
907
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
908
|
+
default_permission?: boolean;
|
|
909
|
+
/** Type of command, defaults 1 if not set */
|
|
910
|
+
type?: ApplicationCommandType;
|
|
911
|
+
}
|
|
912
|
+
export interface CreateGuildBanParams {
|
|
913
|
+
/** number of days to delete messages for (0-7) (deprecated) */
|
|
914
|
+
delete_message_days?: number;
|
|
915
|
+
/** number of seconds to delete messages for, between 0 and 604800 (7 days) */
|
|
916
|
+
delete_message_seconds?: number;
|
|
917
|
+
}
|
|
918
|
+
export interface CreateGuildChannelParams {
|
|
919
|
+
/** channel name (1-100 characters) */
|
|
920
|
+
name: string;
|
|
921
|
+
/** the type of channel */
|
|
922
|
+
type: ChannelType;
|
|
923
|
+
/** channel topic (0-1024 characters) */
|
|
924
|
+
topic: string;
|
|
925
|
+
/** the bitrate (in bits) of the voice or stage channel; min 8000 */
|
|
926
|
+
bitrate: number;
|
|
927
|
+
/** the user limit of the voice channel */
|
|
928
|
+
user_limit: number;
|
|
929
|
+
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
930
|
+
rate_limit_per_user: number;
|
|
931
|
+
/** sorting position of the channel */
|
|
932
|
+
position: number;
|
|
933
|
+
/** the channel's permission overwrites */
|
|
934
|
+
permission_overwrites: Overwrite[];
|
|
935
|
+
/** id of the parent category for a channel */
|
|
936
|
+
parent_id: Snowflake;
|
|
937
|
+
/** whether the channel is nsfw */
|
|
938
|
+
nsfw: boolean;
|
|
939
|
+
/** channel voice region id of the voice or stage channel, automatic when set to null */
|
|
940
|
+
rtc_region: string;
|
|
941
|
+
/** the camera video quality mode of the voice channel */
|
|
942
|
+
video_quality_mode: VideoQualityMode;
|
|
943
|
+
/** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
|
|
944
|
+
default_auto_archive_duration: number;
|
|
945
|
+
/** emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
946
|
+
default_reaction_emoji: DefaultReaction;
|
|
947
|
+
/** set of tags that can be used in a GUILD_FORUM channel */
|
|
948
|
+
available_tags: ForumTag[];
|
|
949
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels */
|
|
950
|
+
default_sort_order: SortOrderType;
|
|
951
|
+
}
|
|
952
|
+
export interface CreateGuildEmojiParams {
|
|
953
|
+
/** name of the emoji */
|
|
954
|
+
name: string;
|
|
955
|
+
/** the 128x128 emoji image */
|
|
956
|
+
image: string;
|
|
957
|
+
/** roles allowed to use this emoji */
|
|
958
|
+
roles: Snowflake[];
|
|
959
|
+
}
|
|
960
|
+
export interface CreateGuildFromGuildTemplateParams {
|
|
961
|
+
/** name of the guild (2-100 characters) */
|
|
962
|
+
name: string;
|
|
963
|
+
/** base64 128x128 image for the guild icon */
|
|
964
|
+
icon?: string;
|
|
965
|
+
}
|
|
966
|
+
export interface CreateGuildParams {
|
|
967
|
+
/** name of the guild (2-100 characters) */
|
|
968
|
+
name: string;
|
|
969
|
+
/** voice region id (deprecated) */
|
|
970
|
+
region?: string | null;
|
|
971
|
+
/** base64 128x128 image for the guild icon */
|
|
972
|
+
icon?: string;
|
|
973
|
+
/** verification level */
|
|
974
|
+
verification_level?: VerificationLevel;
|
|
975
|
+
/** default message notification level */
|
|
976
|
+
default_message_notifications?: DefaultMessageNotificationLevel;
|
|
977
|
+
/** explicit content filter level */
|
|
978
|
+
explicit_content_filter?: ExplicitContentFilterLevel;
|
|
979
|
+
/** new guild roles */
|
|
980
|
+
roles?: Role[];
|
|
981
|
+
/** new guild's channels */
|
|
982
|
+
channels?: Channel[];
|
|
983
|
+
/** id for afk channel */
|
|
984
|
+
afk_channel_id?: Snowflake;
|
|
985
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
986
|
+
afk_timeout?: number;
|
|
987
|
+
/** the id of the channel where guild notices such as welcome messages and boost events are posted */
|
|
988
|
+
system_channel_id?: Snowflake;
|
|
989
|
+
/** system channel flags */
|
|
990
|
+
system_channel_flags?: number;
|
|
991
|
+
}
|
|
992
|
+
export interface CreateGuildRoleParams {
|
|
993
|
+
/** name of the role, max 100 characters */
|
|
994
|
+
name: string;
|
|
995
|
+
/** bitwise value of the enabled/disabled permissions */
|
|
996
|
+
permissions: string;
|
|
997
|
+
/** RGB color value */
|
|
998
|
+
color: number;
|
|
999
|
+
/** whether the role should be displayed separately in the sidebar */
|
|
1000
|
+
hoist: boolean;
|
|
1001
|
+
/** the role's icon image (if the guild has the ROLE_ICONS feature) */
|
|
1002
|
+
icon?: string | null;
|
|
1003
|
+
/** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
|
|
1004
|
+
unicode_emoji?: string | null;
|
|
1005
|
+
/** whether the role should be mentionable */
|
|
1006
|
+
mentionable: boolean;
|
|
1007
|
+
}
|
|
1008
|
+
export interface CreateGuildScheduledEventParams {
|
|
1009
|
+
/** the channel id of the scheduled event. */
|
|
1010
|
+
channel_id?: Snowflake;
|
|
1011
|
+
/** the entity metadata of the scheduled event */
|
|
1012
|
+
entity_metadata?: GuildScheduledEventEntityMetadatum;
|
|
1013
|
+
/** the name of the scheduled event */
|
|
1014
|
+
name: string;
|
|
1015
|
+
/** the privacy level of the scheduled event */
|
|
1016
|
+
privacy_level: GuildScheduledEventPrivacyLevel;
|
|
1017
|
+
/** the time to schedule the scheduled event */
|
|
1018
|
+
scheduled_start_time: string;
|
|
1019
|
+
/** the time when the scheduled event is scheduled to end */
|
|
1020
|
+
scheduled_end_time?: string;
|
|
1021
|
+
/** the description of the scheduled event */
|
|
1022
|
+
description?: string;
|
|
1023
|
+
/** the entity type of the scheduled event */
|
|
1024
|
+
entity_type: GuildScheduledEventEntityType;
|
|
1025
|
+
/** the cover image of the scheduled event */
|
|
1026
|
+
image?: string;
|
|
1027
|
+
}
|
|
1028
|
+
export interface CreateGuildStickerParams {
|
|
1029
|
+
/** name of the sticker (2-30 characters) */
|
|
1030
|
+
name: string;
|
|
1031
|
+
/** description of the sticker (empty or 2-100 characters) */
|
|
1032
|
+
description: string;
|
|
1033
|
+
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
1034
|
+
tags: string;
|
|
1035
|
+
/** the sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB */
|
|
1036
|
+
file: string;
|
|
1037
|
+
}
|
|
1038
|
+
export interface CreateGuildTemplateParams {
|
|
1039
|
+
/** name of the template (1-100 characters) */
|
|
1040
|
+
name: string;
|
|
1041
|
+
/** description for the template (0-120 characters) */
|
|
1042
|
+
description?: string | null;
|
|
1043
|
+
}
|
|
1044
|
+
export interface CreateMessageParams {
|
|
1045
|
+
/** Message contents (up to 2000 characters) */
|
|
1046
|
+
content?: string;
|
|
1047
|
+
/** Can be used to verify a message was sent (up to 25 characters). Value will appear in the Message Create event. */
|
|
1048
|
+
nonce?: string;
|
|
1049
|
+
/** true if this is a TTS message */
|
|
1050
|
+
tts?: boolean;
|
|
1051
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
1052
|
+
embeds?: Embed[];
|
|
1053
|
+
/** Allowed mentions for the message */
|
|
1054
|
+
allowed_mentions?: AllowedMention;
|
|
1055
|
+
/** Include to make your message a reply */
|
|
1056
|
+
message_reference?: MessageReference;
|
|
1057
|
+
/** Components to include with the message */
|
|
1058
|
+
components?: Component[];
|
|
1059
|
+
/** IDs of up to 3 stickers in the server to send in the message */
|
|
1060
|
+
sticker_ids?: Snowflake[];
|
|
1061
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
1062
|
+
files?: string;
|
|
1063
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
1064
|
+
payload_json?: string;
|
|
1065
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
1066
|
+
attachments?: Attachment[];
|
|
1067
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1068
|
+
flags?: number;
|
|
1069
|
+
}
|
|
1070
|
+
export declare function createRoutes<O = any>(fetch: <R, P>(route: Route<P, O>) => RestResponse<R>): Endpoints<O>;
|
|
1071
|
+
export interface CreateStageInstanceParams {
|
|
1072
|
+
/** The id of the Stage channel */
|
|
1073
|
+
channel_id: Snowflake;
|
|
1074
|
+
/** The topic of the Stage instance (1-120 characters) */
|
|
1075
|
+
topic: string;
|
|
1076
|
+
/** The privacy level of the Stage instance (default GUILD_ONLY) */
|
|
1077
|
+
privacy_level?: PrivacyLevel;
|
|
1078
|
+
/** Notify @everyone that a Stage instance has started */
|
|
1079
|
+
send_start_notification?: boolean;
|
|
1080
|
+
}
|
|
1081
|
+
export interface CreateWebhookParams {
|
|
1082
|
+
/** name of the webhook (1-80 characters) */
|
|
1083
|
+
name: string;
|
|
1084
|
+
/** image for the default webhook avatar */
|
|
1085
|
+
avatar?: string | null;
|
|
1086
|
+
}
|
|
1087
|
+
export declare enum DefaultMessageNotificationLevel {
|
|
1088
|
+
/** members will receive notifications for all messages by default */
|
|
1089
|
+
ALL_MESSAGES = 0,
|
|
1090
|
+
/** members will receive notifications only for messages that @mention them by default */
|
|
1091
|
+
ONLY_MENTIONS = 1
|
|
1092
|
+
}
|
|
1093
|
+
export interface DefaultReaction {
|
|
1094
|
+
/** the id of a guild's custom emoji */
|
|
1095
|
+
emoji_id?: Snowflake | null;
|
|
1096
|
+
/** the unicode character of the emoji */
|
|
1097
|
+
emoji_name?: string | null;
|
|
1098
|
+
}
|
|
1099
|
+
export interface DeleteWebhookMessageParams {
|
|
1100
|
+
/** id of the thread the message is in */
|
|
1101
|
+
thread_id: Snowflake;
|
|
1102
|
+
}
|
|
1103
|
+
export interface EditApplicationCommandPermissionParams {
|
|
1104
|
+
/** Permissions for the command in the guild */
|
|
1105
|
+
permissions: ApplicationCommandPermission[];
|
|
1106
|
+
}
|
|
1107
|
+
export interface EditChannelPermissionParams {
|
|
1108
|
+
/** the bitwise value of all allowed permissions (default "0") */
|
|
1109
|
+
allow?: string;
|
|
1110
|
+
/** the bitwise value of all disallowed permissions (default "0") */
|
|
1111
|
+
deny?: string;
|
|
1112
|
+
/** 0 for a role or 1 for a member */
|
|
1113
|
+
type: number;
|
|
1114
|
+
}
|
|
1115
|
+
export interface EditGlobalApplicationCommandParams {
|
|
1116
|
+
/** Name of command, 1-32 characters */
|
|
1117
|
+
name?: string;
|
|
1118
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
1119
|
+
name_localizations?: Locale | null;
|
|
1120
|
+
/** 1-100 character description */
|
|
1121
|
+
description?: string;
|
|
1122
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
1123
|
+
description_localizations?: Locale | null;
|
|
1124
|
+
/** the parameters for the command */
|
|
1125
|
+
options?: ApplicationCommandOption[];
|
|
1126
|
+
/** Set of permissions represented as a bit set */
|
|
1127
|
+
default_member_permissions?: string | null;
|
|
1128
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
1129
|
+
dm_permission?: boolean | null;
|
|
1130
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1131
|
+
default_permission?: boolean;
|
|
1132
|
+
}
|
|
1133
|
+
export interface EditGuildApplicationCommandParams {
|
|
1134
|
+
/** Name of command, 1-32 characters */
|
|
1135
|
+
name?: string;
|
|
1136
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
1137
|
+
name_localizations?: Locale | null;
|
|
1138
|
+
/** 1-100 character description */
|
|
1139
|
+
description?: string;
|
|
1140
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
1141
|
+
description_localizations?: Locale | null;
|
|
1142
|
+
/** Parameters for the command */
|
|
1143
|
+
options?: ApplicationCommandOption[];
|
|
1144
|
+
/** Set of permissions represented as a bit set */
|
|
1145
|
+
default_member_permissions?: string | null;
|
|
1146
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1147
|
+
default_permission?: boolean;
|
|
1148
|
+
}
|
|
1149
|
+
export interface EditMessageParams {
|
|
1150
|
+
/** Message contents (up to 2000 characters) */
|
|
1151
|
+
content: string;
|
|
1152
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
1153
|
+
embeds: Embed[];
|
|
1154
|
+
/** Edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset) */
|
|
1155
|
+
flags: number;
|
|
1156
|
+
/** Allowed mentions for the message */
|
|
1157
|
+
allowed_mentions: AllowedMention;
|
|
1158
|
+
/** Components to include with the message */
|
|
1159
|
+
components: Component[];
|
|
1160
|
+
/** Contents of the file being sent/edited. See Uploading Files */
|
|
1161
|
+
files: string;
|
|
1162
|
+
/** JSON-encoded body of non-file params (multipart/form-data only). See Uploading Files */
|
|
1163
|
+
payload_json: string;
|
|
1164
|
+
/** Attached files to keep and possible descriptions for new files. See Uploading Files */
|
|
1165
|
+
attachments: Attachment[];
|
|
1166
|
+
}
|
|
1167
|
+
export interface EditWebhookMessageParams {
|
|
1168
|
+
/** the message contents (up to 2000 characters) */
|
|
1169
|
+
content: string;
|
|
1170
|
+
/** embedded rich content */
|
|
1171
|
+
embeds: Embed[];
|
|
1172
|
+
/** allowed mentions for the message */
|
|
1173
|
+
allowed_mentions: AllowedMention;
|
|
1174
|
+
/** the components to include with the message */
|
|
1175
|
+
components: Component[];
|
|
1176
|
+
/** the contents of the file being sent/edited */
|
|
1177
|
+
files: string;
|
|
1178
|
+
/** JSON encoded body of non-file params (multipart/form-data only) */
|
|
1179
|
+
payload_json: string;
|
|
1180
|
+
/** attached files to keep and possible descriptions for new files */
|
|
1181
|
+
attachments: Attachment[];
|
|
1182
|
+
}
|
|
1183
|
+
export interface Embed {
|
|
1184
|
+
/** title of embed */
|
|
1185
|
+
title?: string;
|
|
1186
|
+
/** type of embed (always "rich" for webhook embeds) */
|
|
1187
|
+
type?: EmbedType;
|
|
1188
|
+
/** description of embed */
|
|
1189
|
+
description?: string;
|
|
1190
|
+
/** url of embed */
|
|
1191
|
+
url?: string;
|
|
1192
|
+
/** timestamp of embed content */
|
|
1193
|
+
timestamp?: string;
|
|
1194
|
+
/** color code of the embed */
|
|
1195
|
+
color?: number;
|
|
1196
|
+
/** footer information */
|
|
1197
|
+
footer?: EmbedFooter;
|
|
1198
|
+
/** image information */
|
|
1199
|
+
image?: EmbedImage;
|
|
1200
|
+
/** thumbnail information */
|
|
1201
|
+
thumbnail?: EmbedThumbnail;
|
|
1202
|
+
/** video information */
|
|
1203
|
+
video?: EmbedVideo;
|
|
1204
|
+
/** provider information */
|
|
1205
|
+
provider?: EmbedProvider;
|
|
1206
|
+
/** author information */
|
|
1207
|
+
author?: EmbedAuthor;
|
|
1208
|
+
/** fields information */
|
|
1209
|
+
fields?: EmbedField[];
|
|
1210
|
+
}
|
|
1211
|
+
export interface EmbedAuthor {
|
|
1212
|
+
/** name of author */
|
|
1213
|
+
name: string;
|
|
1214
|
+
/** url of author */
|
|
1215
|
+
url?: string;
|
|
1216
|
+
/** url of author icon (only supports http(s) and attachments) */
|
|
1217
|
+
icon_url?: string;
|
|
1218
|
+
/** a proxied url of author icon */
|
|
1219
|
+
proxy_icon_url?: string;
|
|
1220
|
+
}
|
|
1221
|
+
export interface EmbedField {
|
|
1222
|
+
/** name of the field */
|
|
1223
|
+
name: string;
|
|
1224
|
+
/** value of the field */
|
|
1225
|
+
value: string;
|
|
1226
|
+
/** whether or not this field should display inline */
|
|
1227
|
+
inline?: boolean;
|
|
1228
|
+
}
|
|
1229
|
+
export interface EmbedFooter {
|
|
1230
|
+
/** footer text */
|
|
1231
|
+
text: string;
|
|
1232
|
+
/** url of footer icon (only supports http(s) and attachments) */
|
|
1233
|
+
icon_url?: string;
|
|
1234
|
+
/** a proxied url of footer icon */
|
|
1235
|
+
proxy_icon_url?: string;
|
|
1236
|
+
}
|
|
1237
|
+
export interface EmbedImage {
|
|
1238
|
+
/** source url of image (only supports http(s) and attachments) */
|
|
1239
|
+
url: string;
|
|
1240
|
+
/** a proxied url of the image */
|
|
1241
|
+
proxy_url?: string;
|
|
1242
|
+
/** height of image */
|
|
1243
|
+
height?: number;
|
|
1244
|
+
/** width of image */
|
|
1245
|
+
width?: number;
|
|
1246
|
+
}
|
|
1247
|
+
export interface EmbedProvider {
|
|
1248
|
+
/** name of provider */
|
|
1249
|
+
name?: string;
|
|
1250
|
+
/** url of provider */
|
|
1251
|
+
url?: string;
|
|
1252
|
+
}
|
|
1253
|
+
export interface EmbedThumbnail {
|
|
1254
|
+
/** source url of thumbnail (only supports http(s) and attachments) */
|
|
1255
|
+
url: string;
|
|
1256
|
+
/** a proxied url of the thumbnail */
|
|
1257
|
+
proxy_url?: string;
|
|
1258
|
+
/** height of thumbnail */
|
|
1259
|
+
height?: number;
|
|
1260
|
+
/** width of thumbnail */
|
|
1261
|
+
width?: number;
|
|
1262
|
+
}
|
|
1263
|
+
export declare enum EmbedType {
|
|
1264
|
+
/** generic embed rendered from embed attributes */
|
|
1265
|
+
RICH = "rich",
|
|
1266
|
+
/** image embed */
|
|
1267
|
+
IMAGE = "image",
|
|
1268
|
+
/** video embed */
|
|
1269
|
+
VIDEO = "video",
|
|
1270
|
+
/** animated gif image embed rendered as a video embed */
|
|
1271
|
+
GIFV = "gifv",
|
|
1272
|
+
/** article embed */
|
|
1273
|
+
ARTICLE = "article",
|
|
1274
|
+
/** link embed */
|
|
1275
|
+
LINK = "link"
|
|
1276
|
+
}
|
|
1277
|
+
export interface EmbedVideo {
|
|
1278
|
+
/** source url of video */
|
|
1279
|
+
url?: string;
|
|
1280
|
+
/** a proxied url of the video */
|
|
1281
|
+
proxy_url?: string;
|
|
1282
|
+
/** height of video */
|
|
1283
|
+
height?: number;
|
|
1284
|
+
/** width of video */
|
|
1285
|
+
width?: number;
|
|
1286
|
+
}
|
|
1287
|
+
export interface Emoji {
|
|
1288
|
+
/** emoji id */
|
|
1289
|
+
id?: Snowflake | null;
|
|
1290
|
+
/** emoji name */
|
|
1291
|
+
name?: string | null;
|
|
1292
|
+
/** roles allowed to use this emoji */
|
|
1293
|
+
roles?: Snowflake[];
|
|
1294
|
+
/** user that created this emoji */
|
|
1295
|
+
user?: User;
|
|
1296
|
+
/** whether this emoji must be wrapped in colons */
|
|
1297
|
+
require_colons?: boolean;
|
|
1298
|
+
/** whether this emoji is managed */
|
|
1299
|
+
managed?: boolean;
|
|
1300
|
+
/** whether this emoji is animated */
|
|
1301
|
+
animated?: boolean;
|
|
1302
|
+
/** whether this emoji can be used, may be false due to loss of Server Boosts */
|
|
1303
|
+
available?: boolean;
|
|
1304
|
+
}
|
|
1305
|
+
export interface Endpoints<O> {
|
|
1306
|
+
/** Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event. */
|
|
1307
|
+
addGuildMember: (guildId: string, userId: string, params?: Partial<AddGuildMemberParams>, options?: O) => RestResponse<GuildMember>;
|
|
1308
|
+
/** Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
|
|
1309
|
+
addGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: O) => RestResponse<any>;
|
|
1310
|
+
/** Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event. */
|
|
1311
|
+
addThreadMember: (channelId: string, userId: string, options?: O) => RestResponse<any>;
|
|
1312
|
+
batchEditApplicationCommandPermissions: (applicationId: string, guildId: string, options?: O) => RestResponse<any>;
|
|
1313
|
+
/** Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one pruned key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the compute_prune_count option to false, forcing pruned to null. Fires multiple Guild Member Remove Gateway events. */
|
|
1314
|
+
beginGuildPrune: (guildId: string, params?: Partial<BeginGuildPruneParams>, options?: O) => RestResponse<any>;
|
|
1315
|
+
/** Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event. */
|
|
1316
|
+
bulkDeleteMessages: (channelId: string, params?: Partial<BulkDeleteMessageParams>, options?: O) => RestResponse<any>;
|
|
1317
|
+
/** Takes a list of application commands, overwriting the existing global command list for this application. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits. */
|
|
1318
|
+
bulkOverwriteGlobalApplicationCommands: (applicationId: string, options?: O) => RestResponse<ApplicationCommand[]>;
|
|
1319
|
+
/** Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns 200 and a list of application command objects. */
|
|
1320
|
+
bulkOverwriteGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<BulkOverwriteGuildApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand[]>;
|
|
1321
|
+
/** Create a new rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Create Gateway event. */
|
|
1322
|
+
createAutoModerationRule: (guildId: string, params?: Partial<CreateAutoModerationRuleParams>, options?: O) => RestResponse<AutoModerationRule>;
|
|
1323
|
+
/** Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event. */
|
|
1324
|
+
createChannelInvite: (channelId: string, params?: Partial<CreateChannelInviteParams>, options?: O) => RestResponse<Invite>;
|
|
1325
|
+
/** Create a new DM channel with a user. Returns a DM channel object. */
|
|
1326
|
+
createDm: (params?: Partial<CreateDmParams>, options?: O) => RestResponse<Channel>;
|
|
1327
|
+
/** Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups. */
|
|
1328
|
+
createFollowupMessage: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1329
|
+
createGlobalApplicationCommand: (applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1330
|
+
/** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client */
|
|
1331
|
+
createGroupDm: (params?: Partial<CreateGroupDmParams>, options?: O) => RestResponse<Channel>;
|
|
1332
|
+
/** Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
1333
|
+
createGuild: (params?: Partial<CreateGuildParams>, options?: O) => RestResponse<Guild>;
|
|
1334
|
+
createGuildApplicationCommand: (applicationId: string, guildId: string, params?: Partial<CreateGuildApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1335
|
+
/** Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event. */
|
|
1336
|
+
createGuildBan: (guildId: string, userId: string, params?: Partial<CreateGuildBanParams>, options?: O) => RestResponse<any>;
|
|
1337
|
+
/** Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event. */
|
|
1338
|
+
createGuildChannel: (guildId: string, params?: Partial<CreateGuildChannelParams>, options?: O) => RestResponse<Channel>;
|
|
1339
|
+
/** Create a new emoji for the guild. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
1340
|
+
createGuildEmoji: (guildId: string, params?: Partial<CreateGuildEmojiParams>, options?: O) => RestResponse<Emoji>;
|
|
1341
|
+
/** Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
1342
|
+
createGuildFromGuildTemplate: (templateCode: string, params?: Partial<CreateGuildFromGuildTemplateParams>, options?: O) => RestResponse<Guild>;
|
|
1343
|
+
/** Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional. */
|
|
1344
|
+
createGuildRole: (guildId: string, params?: Partial<CreateGuildRoleParams>, options?: O) => RestResponse<Role>;
|
|
1345
|
+
/** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event. */
|
|
1346
|
+
createGuildScheduledEvent: (guildId: string, params?: Partial<CreateGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1347
|
+
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
1348
|
+
createGuildSticker: (guildId: string, params?: Partial<CreateGuildStickerParams>, options?: O) => RestResponse<Sticker>;
|
|
1349
|
+
/** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
|
|
1350
|
+
createGuildTemplate: (guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
|
|
1351
|
+
/** Create a response to an Interaction from the gateway. Body is an interaction response. Returns 204 No Content. */
|
|
1352
|
+
createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<InteractionResponse>, options?: O) => RestResponse<InteractionResponse>;
|
|
1353
|
+
createMessage: (channelId: string, params?: Partial<CreateMessageParams>, options?: O) => RestResponse<Message>;
|
|
1354
|
+
/** Create a reaction for the message. This endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Add Gateway event.
|
|
1355
|
+
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1356
|
+
createReaction: (channelId: string, messageId: string, emoji: string, options?: O) => RestResponse<any>;
|
|
1357
|
+
/** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. Fires a Stage Instance Create Gateway event. */
|
|
1358
|
+
createStageInstance: (params?: Partial<CreateStageInstanceParams>, options?: O) => RestResponse<StageInstance>;
|
|
1359
|
+
/** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. Fires a Webhooks Update Gateway event. */
|
|
1360
|
+
createWebhook: (channelId: string, params?: Partial<CreateWebhookParams>, options?: O) => RestResponse<Webhook>;
|
|
1361
|
+
/** Crosspost a message in an Announcement Channel to following channels. This endpoint requires the SEND_MESSAGES permission, if the current user sent the message, or additionally the MANAGE_MESSAGES permission, for all other messages, to be present for the current user. */
|
|
1362
|
+
crosspostMessage: (channelId: string, messageId: string, options?: O) => RestResponse<Message>;
|
|
1363
|
+
/** Deletes all reactions on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove All Gateway event. */
|
|
1364
|
+
deleteAllReactions: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1365
|
+
/** Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
|
|
1366
|
+
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1367
|
+
deleteAllReactionsForEmoji: (channelId: string, messageId: string, emoji: string, options?: O) => RestResponse<any>;
|
|
1368
|
+
/** Delete a rule. Returns a 204 on success. Fires an Auto Moderation Rule Delete Gateway event. */
|
|
1369
|
+
deleteAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: O) => RestResponse<any>;
|
|
1370
|
+
/** Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions */
|
|
1371
|
+
deleteChannelPermission: (channelId: string, overwriteId: string, options?: O) => RestResponse<any>;
|
|
1372
|
+
/** Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread). */
|
|
1373
|
+
deletecloseChannel: (channelId: string, options?: O) => RestResponse<Channel>;
|
|
1374
|
+
/** Deletes a followup message for an Interaction. Returns 204 No Content on success. */
|
|
1375
|
+
deleteFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1376
|
+
/** Deletes a global command. Returns 204 No Content on success. */
|
|
1377
|
+
deleteGlobalApplicationCommand: (applicationId: string, commandId: string, options?: O) => RestResponse<any>;
|
|
1378
|
+
/** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */
|
|
1379
|
+
deleteGuild: (guildId: string, options?: O) => RestResponse<any>;
|
|
1380
|
+
/** Delete a guild command. Returns 204 No Content on success. */
|
|
1381
|
+
deleteGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: O) => RestResponse<any>;
|
|
1382
|
+
/** Delete the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
|
|
1383
|
+
deleteGuildEmoji: (guildId: string, emojiId: string, options?: O) => RestResponse<any>;
|
|
1384
|
+
/** Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events. */
|
|
1385
|
+
deleteGuildIntegration: (guildId: string, integrationId: string, options?: O) => RestResponse<any>;
|
|
1386
|
+
/** Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event. */
|
|
1387
|
+
deleteGuildRole: (guildId: string, roleId: string, options?: O) => RestResponse<any>;
|
|
1388
|
+
/** Delete a guild scheduled event. Returns a 204 on success. Fires a Guild Scheduled Event Delete Gateway event. */
|
|
1389
|
+
deleteGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, options?: O) => RestResponse<any>;
|
|
1390
|
+
/** Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event. */
|
|
1391
|
+
deleteGuildSticker: (guildId: string, stickerId: string, options?: O) => RestResponse<any>;
|
|
1392
|
+
/** Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success. */
|
|
1393
|
+
deleteGuildTemplate: (guildId: string, templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
1394
|
+
/** Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete Gateway event. */
|
|
1395
|
+
deleteInvite: (inviteCode: string, options?: O) => RestResponse<Invite>;
|
|
1396
|
+
/** Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event. */
|
|
1397
|
+
deleteMessage: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1398
|
+
/** Deletes the initial Interaction response. Returns 204 No Content on success. */
|
|
1399
|
+
deleteOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1400
|
+
/** Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
1401
|
+
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1402
|
+
deleteOwnReaction: (channelId: string, messageId: string, emoji: string, options?: O) => RestResponse<any>;
|
|
1403
|
+
/** Deletes the Stage instance. Returns 204 No Content. Fires a Stage Instance Delete Gateway event. */
|
|
1404
|
+
deleteStageInstance: (channelId: string, options?: O) => RestResponse<any>;
|
|
1405
|
+
/** Deletes another user's reaction. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
1406
|
+
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1407
|
+
deleteUserReaction: (channelId: string, messageId: string, emoji: string, userId: string, options?: O) => RestResponse<any>;
|
|
1408
|
+
/** Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. Fires a Webhooks Update Gateway event. */
|
|
1409
|
+
deleteWebhook: (webhookId: string, options?: O) => RestResponse<any>;
|
|
1410
|
+
/** Deletes a message that was created by the webhook. Returns a 204 No Content response on success. */
|
|
1411
|
+
deleteWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<DeleteWebhookMessageParams>, options?: O) => RestResponse<any>;
|
|
1412
|
+
/** Same as above, except this call does not require authentication. */
|
|
1413
|
+
deleteWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => RestResponse<any>;
|
|
1414
|
+
editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditApplicationCommandPermissionParams>, options?: O) => RestResponse<GuildApplicationCommandPermission>;
|
|
1415
|
+
/** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions. */
|
|
1416
|
+
editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: O) => RestResponse<any>;
|
|
1417
|
+
/** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
|
|
1418
|
+
editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1419
|
+
editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<EditGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1420
|
+
editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditGuildApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1421
|
+
/** Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). */
|
|
1422
|
+
editMessage: (channelId: string, messageId: string, params?: Partial<EditMessageParams>, options?: O) => RestResponse<Message>;
|
|
1423
|
+
/** Edits the initial Interaction response. Functions the same as Edit Webhook Message. */
|
|
1424
|
+
editOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1425
|
+
/** Edits a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
1426
|
+
editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1427
|
+
/** Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. */
|
|
1428
|
+
executeGitHubCompatibleWebhook: (webhookId: string, webhookToken: string, options?: O) => RestResponse<any>;
|
|
1429
|
+
/** Refer to Slack's documentation for more information. We do not support Slack's channel, icon_emoji, mrkdwn, or mrkdwn_in properties. */
|
|
1430
|
+
executeSlackCompatibleWebhook: (webhookId: string, webhookToken: string, options?: O) => RestResponse<any>;
|
|
1431
|
+
/** Refer to Uploading Files for details on attachments and multipart/form-data requests. Returns a message or 204 No Content depending on the wait query parameter. */
|
|
1432
|
+
executeWebhook: (webhookId: string, webhookToken: string, params?: Partial<ExecuteWebhookParams>, options?: O) => RestResponse<any>;
|
|
1433
|
+
/** Follow an Announcement Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. Fires a Webhooks Update Gateway event for the target channel. */
|
|
1434
|
+
followAnnouncementChannel: (channelId: string, params?: Partial<FollowAnnouncementChannelParams>, options?: O) => RestResponse<FollowedChannel>;
|
|
1435
|
+
/** Fetches permissions for a specific command for your application in a guild. Returns a guild application command permissions object. */
|
|
1436
|
+
getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: O) => RestResponse<GuildApplicationCommandPermission>;
|
|
1437
|
+
/** Get a single rule. Returns an auto moderation rule object. */
|
|
1438
|
+
getAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: O) => RestResponse<AutoModerationRule>;
|
|
1439
|
+
/** Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result. */
|
|
1440
|
+
getChannel: (channelId: string, options?: O) => RestResponse<Channel>;
|
|
1441
|
+
/** Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the MANAGE_CHANNELS permission. */
|
|
1442
|
+
getChannelInvites: (channelId: string, options?: O) => RestResponse<Invite[]>;
|
|
1443
|
+
/** Returns a specific message in the channel. If operating on a guild channel, this endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Returns a message object on success. */
|
|
1444
|
+
getChannelMessage: (channelId: string, messageId: string, options?: O) => RestResponse<Message>;
|
|
1445
|
+
/** Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user. If the current user is missing the READ_MESSAGE_HISTORY permission in the channel then this will return no messages (since they cannot read the message history). Returns an array of message objects on success. */
|
|
1446
|
+
getChannelMessages: (channelId: string, params?: Partial<GetChannelMessageParams>, options?: O) => RestResponse<Message[]>;
|
|
1447
|
+
/** Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission. */
|
|
1448
|
+
getChannelWebhooks: (channelId: string, options?: O) => RestResponse<Webhook[]>;
|
|
1449
|
+
/** Returns info about the current authorization. Requires authentication with a bearer token. */
|
|
1450
|
+
getCurrentAuthorizationInformation: (options?: O) => RestResponse<GetCurrentAuthorizationInformationResponse>;
|
|
1451
|
+
/** Returns the bot's application object. */
|
|
1452
|
+
getCurrentBotApplicationInformation: (options?: O) => RestResponse<Application>;
|
|
1453
|
+
/** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email. */
|
|
1454
|
+
getCurrentUser: (options?: O) => RestResponse<User>;
|
|
1455
|
+
/** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
|
|
1456
|
+
getCurrentUserGuildMember: (guildId: string, options?: O) => RestResponse<GuildMember>;
|
|
1457
|
+
/** Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope. */
|
|
1458
|
+
getCurrentUserGuilds: (params?: Partial<GetCurrentUserGuildParams>, options?: O) => RestResponse<Guild[]>;
|
|
1459
|
+
/** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
|
|
1460
|
+
getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1461
|
+
getGateway: (options?: O) => RestResponse<any>;
|
|
1462
|
+
getGatewayBot: (options?: O) => RestResponse<GetGatewayBotResponse>;
|
|
1463
|
+
/** Fetch a global command for your application. Returns an application command object. */
|
|
1464
|
+
getGlobalApplicationCommand: (applicationId: string, commandId: string, options?: O) => RestResponse<ApplicationCommand>;
|
|
1465
|
+
getGlobalApplicationCommands: (applicationId: string, params?: Partial<GetGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand[]>;
|
|
1466
|
+
/** Returns the guild object for the given id. If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild. */
|
|
1467
|
+
getGuild: (guildId: string, params?: Partial<GetGuildParams>, options?: O) => RestResponse<Guild>;
|
|
1468
|
+
/** Fetch a guild command for your application. Returns an application command object. */
|
|
1469
|
+
getGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, options?: O) => RestResponse<ApplicationCommand>;
|
|
1470
|
+
/** Fetches permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects. */
|
|
1471
|
+
getGuildApplicationCommandPermissions: (applicationId: string, guildId: string, options?: O) => RestResponse<GuildApplicationCommandPermission[]>;
|
|
1472
|
+
getGuildApplicationCommands: (applicationId: string, guildId: string, params?: Partial<GetGuildApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand[]>;
|
|
1473
|
+
/** Returns an audit log object for the guild. Requires the VIEW_AUDIT_LOG permission. */
|
|
1474
|
+
getGuildAuditLog: (guildId: string, params?: Partial<GetGuildAuditLogParams>, options?: O) => RestResponse<AuditLog>;
|
|
1475
|
+
/** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */
|
|
1476
|
+
getGuildBan: (guildId: string, userId: string, options?: O) => RestResponse<Ban>;
|
|
1477
|
+
/** Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission. */
|
|
1478
|
+
getGuildBans: (guildId: string, params?: Partial<GetGuildBanParams>, options?: O) => RestResponse<Ban[]>;
|
|
1479
|
+
/** Returns a list of guild channel objects. Does not include threads. */
|
|
1480
|
+
getGuildChannels: (guildId: string, options?: O) => RestResponse<Channel[]>;
|
|
1481
|
+
/** Returns an emoji object for the given guild and emoji IDs. */
|
|
1482
|
+
getGuildEmoji: (guildId: string, emojiId: string, options?: O) => RestResponse<Emoji>;
|
|
1483
|
+
/** Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission. */
|
|
1484
|
+
getGuildIntegrations: (guildId: string, options?: O) => RestResponse<Integration[]>;
|
|
1485
|
+
/** Returns a list of invite objects (with invite metadata) for the guild. Requires the MANAGE_GUILD permission. */
|
|
1486
|
+
getGuildInvites: (guildId: string, options?: O) => RestResponse<Invite[]>;
|
|
1487
|
+
/** Returns a guild member object for the specified user. */
|
|
1488
|
+
getGuildMember: (guildId: string, userId: string, options?: O) => RestResponse<GuildMember>;
|
|
1489
|
+
/** Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable. */
|
|
1490
|
+
getGuildPreview: (guildId: string, options?: O) => RestResponse<GuildPreview>;
|
|
1491
|
+
/** Returns an object with one pruned key indicating the number of members that would be removed in a prune operation. Requires the KICK_MEMBERS permission. */
|
|
1492
|
+
getGuildPruneCount: (guildId: string, params?: Partial<GetGuildPruneCountParams>, options?: O) => RestResponse<any>;
|
|
1493
|
+
/** Returns a list of role objects for the guild. */
|
|
1494
|
+
getGuildRoles: (guildId: string, options?: O) => RestResponse<Role[]>;
|
|
1495
|
+
/** Get a guild scheduled event. Returns a guild scheduled event object on success. */
|
|
1496
|
+
getGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1497
|
+
/** Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set. */
|
|
1498
|
+
getGuildScheduledEventUsers: (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventUserParams>, options?: O) => RestResponse<GuildScheduledEventUser[]>;
|
|
1499
|
+
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
|
|
1500
|
+
getGuildSticker: (guildId: string, stickerId: string, options?: O) => RestResponse<Sticker>;
|
|
1501
|
+
/** Returns a guild template object for the given code. */
|
|
1502
|
+
getGuildTemplate: (templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
1503
|
+
/** Returns an array of guild template objects. Requires the MANAGE_GUILD permission. */
|
|
1504
|
+
getGuildTemplates: (guildId: string, options?: O) => RestResponse<GuildTemplate[]>;
|
|
1505
|
+
/** Returns a partial invite object for guilds with that feature enabled. Requires the MANAGE_GUILD permission. code will be null if a vanity url for the guild is not set. */
|
|
1506
|
+
getGuildVanityUrl: (guildId: string, options?: O) => RestResponse<Invite>;
|
|
1507
|
+
/** Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled. */
|
|
1508
|
+
getGuildVoiceRegions: (guildId: string, options?: O) => RestResponse<VoiceRegion[]>;
|
|
1509
|
+
/** Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS permission. */
|
|
1510
|
+
getGuildWebhooks: (guildId: string, options?: O) => RestResponse<Webhook[]>;
|
|
1511
|
+
/** Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required. */
|
|
1512
|
+
getGuildWelcomeScreen: (guildId: string, options?: O) => RestResponse<WelcomeScreen>;
|
|
1513
|
+
/** Returns the widget for the guild. */
|
|
1514
|
+
getGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidget>;
|
|
1515
|
+
/** Returns a PNG image widget for the guild. Requires no permissions or authentication. */
|
|
1516
|
+
getGuildWidgetImage: (guildId: string, params?: Partial<GetGuildWidgetImageParams>, options?: O) => RestResponse<any>;
|
|
1517
|
+
/** Returns a guild widget settings object. Requires the MANAGE_GUILD permission. */
|
|
1518
|
+
getGuildWidgetSettings: (guildId: string, options?: O) => RestResponse<GuildWidgetSetting>;
|
|
1519
|
+
/** Returns an invite object for the given code. */
|
|
1520
|
+
getInvite: (inviteCode: string, params?: Partial<GetInviteParams>, options?: O) => RestResponse<Invite>;
|
|
1521
|
+
/** Returns the initial Interaction response. Functions the same as Get Webhook Message. */
|
|
1522
|
+
getOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1523
|
+
/** Returns all pinned messages in the channel as an array of message objects. */
|
|
1524
|
+
getPinnedMessages: (channelId: string, options?: O) => RestResponse<Message[]>;
|
|
1525
|
+
/** Get a list of users that reacted with this emoji. Returns an array of user objects on success.
|
|
1526
|
+
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1527
|
+
getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<GetReactionParams>, options?: O) => RestResponse<User[]>;
|
|
1528
|
+
/** Gets the stage instance associated with the Stage channel, if it exists. */
|
|
1529
|
+
getStageInstance: (channelId: string, options?: O) => RestResponse<any>;
|
|
1530
|
+
/** Returns a sticker object for the given sticker ID. */
|
|
1531
|
+
getSticker: (stickerId: string, options?: O) => RestResponse<Sticker>;
|
|
1532
|
+
/** Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise. */
|
|
1533
|
+
getThreadMember: (channelId: string, userId: string, options?: O) => RestResponse<ThreadMember>;
|
|
1534
|
+
/** Returns a user object for a given user ID. */
|
|
1535
|
+
getUser: (userId: string, options?: O) => RestResponse<User>;
|
|
1536
|
+
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
1537
|
+
getUserConnections: (options?: O) => RestResponse<Connection[]>;
|
|
1538
|
+
/** Returns the new webhook object for the given id. */
|
|
1539
|
+
getWebhook: (webhookId: string, options?: O) => RestResponse<Webhook>;
|
|
1540
|
+
/** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
1541
|
+
getWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1542
|
+
/** Same as above, except this call does not require authentication and returns no user in the webhook object. */
|
|
1543
|
+
getWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => RestResponse<any>;
|
|
1544
|
+
/** Adds a recipient to a Group DM using their access token. */
|
|
1545
|
+
groupDmAddRecipient: (channelId: string, userId: string, params?: Partial<GroupDmAddRecipientParams>, options?: O) => RestResponse<any>;
|
|
1546
|
+
/** Removes a recipient from a Group DM. */
|
|
1547
|
+
groupDmRemoveRecipient: (channelId: string, userId: string, options?: O) => RestResponse<any>;
|
|
1548
|
+
/** Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
1549
|
+
joinThread: (channelId: string, options?: O) => RestResponse<any>;
|
|
1550
|
+
/** Leave a guild. Returns a 204 empty response on success. */
|
|
1551
|
+
leaveGuild: (guildId: string, options?: O) => RestResponse<any>;
|
|
1552
|
+
/** Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
1553
|
+
leaveThread: (channelId: string, options?: O) => RestResponse<any>;
|
|
1554
|
+
/** Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order. */
|
|
1555
|
+
listActiveGuildThreads: (guildId: string, options?: O) => RestResponse<ListActiveGuildThreadResponse>;
|
|
1556
|
+
/** Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild. */
|
|
1557
|
+
listAutoModerationRulesForGuild: (guildId: string, options?: O) => RestResponse<AutoModerationRule[]>;
|
|
1558
|
+
/** Returns a list of emoji objects for the given guild. */
|
|
1559
|
+
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Emoji[]>;
|
|
1560
|
+
/** Returns a list of guild member objects that are members of the guild. */
|
|
1561
|
+
listGuildMembers: (guildId: string, params?: Partial<ListGuildMemberParams>, options?: O) => RestResponse<GuildMember[]>;
|
|
1562
|
+
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
|
|
1563
|
+
listGuildStickers: (guildId: string, options?: O) => RestResponse<Sticker[]>;
|
|
1564
|
+
/** Returns archived threads in the channel that are of type PRIVATE_THREAD, and the user has joined. Threads are ordered by their id, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
|
|
1565
|
+
listJoinedPrivateArchivedThreads: (channelId: string, params?: Partial<ListJoinedPrivateArchivedThreadParams>, options?: O) => RestResponse<ListJoinedPrivateArchivedThreadResponse>;
|
|
1566
|
+
/** Returns the list of sticker packs available to Nitro subscribers. */
|
|
1567
|
+
listNitroStickerPacks: (options?: O) => RestResponse<any>;
|
|
1568
|
+
/** Returns archived threads in the channel that are of type PRIVATE_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions. */
|
|
1569
|
+
listPrivateArchivedThreads: (channelId: string, params?: Partial<ListPrivateArchivedThreadParams>, options?: O) => RestResponse<ListPrivateArchivedThreadResponse>;
|
|
1570
|
+
/** Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type PUBLIC_THREAD. When called on a GUILD_ANNOUNCEMENT channel returns threads of type ANNOUNCEMENT_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
|
|
1571
|
+
listPublicArchivedThreads: (channelId: string, params?: Partial<ListPublicArchivedThreadParams>, options?: O) => RestResponse<ListPublicArchivedThreadResponse>;
|
|
1572
|
+
/** Returns a list of guild scheduled event objects for the given guild. */
|
|
1573
|
+
listScheduledEventsForGuild: (guildId: string, params?: Partial<ListScheduledEventsForGuildParams>, options?: O) => RestResponse<GuildScheduledEvent[]>;
|
|
1574
|
+
/** Returns array of thread members objects that are members of the thread. */
|
|
1575
|
+
listThreadMembers: (channelId: string, options?: O) => RestResponse<ThreadMember[]>;
|
|
1576
|
+
/** Returns an array of voice region objects that can be used when setting a voice or stage channel's rtc_region. */
|
|
1577
|
+
listVoiceRegions: (options?: O) => RestResponse<VoiceRegion[]>;
|
|
1578
|
+
/** Modify an existing rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Update Gateway event. */
|
|
1579
|
+
modifyAutoModerationRule: (guildId: string, autoModerationRuleId: string, params?: Partial<ModifyAutoModerationRuleParams>, options?: O) => RestResponse<AutoModerationRule>;
|
|
1580
|
+
/** Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. All JSON parameters are optional. */
|
|
1581
|
+
modifyChannel: (channelId: string, params?: Partial<ModifyChannelParams>, options?: O) => RestResponse<Channel>;
|
|
1582
|
+
/** Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event. */
|
|
1583
|
+
modifyCurrentMember: (guildId: string, params?: Partial<ModifyCurrentMemberParams>, options?: O) => RestResponse<any>;
|
|
1584
|
+
/** Modify the requester's user account settings. Returns a user object on success. Fires a User Update Gateway event. */
|
|
1585
|
+
modifyCurrentUser: (params?: Partial<ModifyCurrentUserParams>, options?: O) => RestResponse<User>;
|
|
1586
|
+
modifyCurrentUserNick: (guildId: string, params?: Partial<ModifyCurrentUserNickParams>, options?: O) => RestResponse<any>;
|
|
1587
|
+
/** Updates the current user's voice state. Returns 204 No Content on success. Fires a Voice State Update Gateway event. */
|
|
1588
|
+
modifyCurrentUserVoiceState: (guildId: string, params?: Partial<ModifyCurrentUserVoiceStateParams>, options?: O) => RestResponse<any>;
|
|
1589
|
+
/** Modify a guild's settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event. */
|
|
1590
|
+
modifyGuild: (guildId: string, params?: Partial<ModifyGuildParams>, options?: O) => RestResponse<Guild>;
|
|
1591
|
+
/** Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events. */
|
|
1592
|
+
modifyGuildChannelPositions: (guildId: string, params?: Partial<ModifyGuildChannelPositionParams>, options?: O) => RestResponse<any>;
|
|
1593
|
+
/** Modify the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
1594
|
+
modifyGuildEmoji: (guildId: string, emojiId: string, params?: Partial<ModifyGuildEmojiParams>, options?: O) => RestResponse<Emoji>;
|
|
1595
|
+
/** Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice. */
|
|
1596
|
+
modifyGuildMember: (guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: O) => RestResponse<GuildMember>;
|
|
1597
|
+
/** Modify a guild's MFA level. Requires guild ownership. Returns the updated level on success. Fires a Guild Update Gateway event. */
|
|
1598
|
+
modifyGuildMfaLevel: (guildId: string, params?: Partial<ModifyGuildMfaLevelParams>, options?: O) => RestResponse<MfaLevel>;
|
|
1599
|
+
/** Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event. */
|
|
1600
|
+
modifyGuildRole: (guildId: string, roleId: string, params?: Partial<ModifyGuildRoleParams>, options?: O) => RestResponse<Role>;
|
|
1601
|
+
/** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events. */
|
|
1602
|
+
modifyGuildRolePositions: (guildId: string, params?: Partial<ModifyGuildRolePositionParams>, options?: O) => RestResponse<Role[]>;
|
|
1603
|
+
/** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event. */
|
|
1604
|
+
modifyGuildScheduledEvent: (guildId: string, guildScheduledEventId: string, params?: Partial<ModifyGuildScheduledEventParams>, options?: O) => RestResponse<GuildScheduledEvent>;
|
|
1605
|
+
/** Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
1606
|
+
modifyGuildSticker: (guildId: string, stickerId: string, params?: Partial<ModifyGuildStickerParams>, options?: O) => RestResponse<Sticker>;
|
|
1607
|
+
/** Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
1608
|
+
modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
|
|
1609
|
+
/** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. */
|
|
1610
|
+
modifyGuildWelcomeScreen: (guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: O) => RestResponse<WelcomeScreen>;
|
|
1611
|
+
/** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object. */
|
|
1612
|
+
modifyGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidgetSetting>;
|
|
1613
|
+
/** Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event. */
|
|
1614
|
+
modifyStageInstance: (channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: O) => RestResponse<StageInstance>;
|
|
1615
|
+
/** Updates another user's voice state. Fires a Voice State Update Gateway event. */
|
|
1616
|
+
modifyUserVoiceState: (guildId: string, userId: string, params?: Partial<ModifyUserVoiceStateParams>, options?: O) => RestResponse<any>;
|
|
1617
|
+
/** Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. Fires a Webhooks Update Gateway event. */
|
|
1618
|
+
modifyWebhook: (webhookId: string, params?: Partial<ModifyWebhookParams>, options?: O) => RestResponse<Webhook>;
|
|
1619
|
+
/** Same as above, except this call does not require authentication, does not accept a channel_id parameter in the body, and does not return a user in the webhook object. */
|
|
1620
|
+
modifyWebhookWithToken: (webhookId: string, webhookToken: string, options?: O) => RestResponse<any>;
|
|
1621
|
+
/** Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
1622
|
+
pinMessage: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1623
|
+
/** Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event. */
|
|
1624
|
+
removeGuildBan: (guildId: string, userId: string, options?: O) => RestResponse<any>;
|
|
1625
|
+
/** Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event. */
|
|
1626
|
+
removeGuildMember: (guildId: string, userId: string, options?: O) => RestResponse<any>;
|
|
1627
|
+
/** Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
|
|
1628
|
+
removeGuildMemberRole: (guildId: string, userId: string, roleId: string, options?: O) => RestResponse<any>;
|
|
1629
|
+
/** Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
1630
|
+
removeThreadMember: (channelId: string, userId: string, options?: O) => RestResponse<any>;
|
|
1631
|
+
/** Returns a list of guild member objects whose username or nickname starts with a provided string. */
|
|
1632
|
+
searchGuildMembers: (guildId: string, params?: Partial<SearchGuildMemberParams>, options?: O) => RestResponse<GuildMember[]>;
|
|
1633
|
+
/** Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
|
|
1634
|
+
startThreadFromMessage: (channelId: string, messageId: string, params?: Partial<StartThreadFromMessageParams>, options?: O) => RestResponse<Channel>;
|
|
1635
|
+
/** Creates a new thread in a forum channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event. */
|
|
1636
|
+
startThreadInForumChannel: (channelId: string, params?: Partial<StartThreadInForumChannelParams>, options?: O) => RestResponse<Channel>;
|
|
1637
|
+
/** Creates a new thread that is not connected to an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
|
|
1638
|
+
startThreadWithoutMessage: (channelId: string, params?: Partial<StartThreadWithoutMessageParams>, options?: O) => RestResponse<Channel>;
|
|
1639
|
+
/** Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
1640
|
+
syncGuildTemplate: (guildId: string, templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
1641
|
+
/** Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event. */
|
|
1642
|
+
triggerTypingIndicator: (channelId: string, options?: O) => RestResponse<any>;
|
|
1643
|
+
/** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
1644
|
+
unpinMessage: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1645
|
+
}
|
|
1646
|
+
export declare enum EventType {
|
|
1647
|
+
/** when a member sends or edits a message in the guild */
|
|
1648
|
+
MESSAGE_SEND = 1
|
|
1649
|
+
}
|
|
1650
|
+
export interface ExecuteWebhookParams {
|
|
1651
|
+
/** the message contents (up to 2000 characters) */
|
|
1652
|
+
content: string;
|
|
1653
|
+
/** override the default username of the webhook */
|
|
1654
|
+
username: string;
|
|
1655
|
+
/** override the default avatar of the webhook */
|
|
1656
|
+
avatar_url: string;
|
|
1657
|
+
/** true if this is a TTS message */
|
|
1658
|
+
tts: boolean;
|
|
1659
|
+
/** embedded rich content */
|
|
1660
|
+
embeds: Embed[];
|
|
1661
|
+
/** allowed mentions for the message */
|
|
1662
|
+
allowed_mentions: AllowedMention;
|
|
1663
|
+
/** the components to include with the message */
|
|
1664
|
+
components: Component[];
|
|
1665
|
+
/** the contents of the file being sent */
|
|
1666
|
+
files: string;
|
|
1667
|
+
/** JSON encoded body of non-file params */
|
|
1668
|
+
payload_json: string;
|
|
1669
|
+
/** attachment objects with filename and description */
|
|
1670
|
+
attachments: Attachment[];
|
|
1671
|
+
/** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1672
|
+
flags: number;
|
|
1673
|
+
/** name of thread to create (requires the webhook channel to be a forum channel) */
|
|
1674
|
+
thread_name: string;
|
|
1675
|
+
}
|
|
1676
|
+
export declare enum ExplicitContentFilterLevel {
|
|
1677
|
+
/** media content will not be scanned */
|
|
1678
|
+
DISABLED = 0,
|
|
1679
|
+
/** media content sent by members without roles will be scanned */
|
|
1680
|
+
MEMBERS_WITHOUT_ROLES = 1,
|
|
1681
|
+
/** media content sent by all members will be scanned */
|
|
1682
|
+
ALL_MEMBERS = 2
|
|
1683
|
+
}
|
|
1684
|
+
export interface FollowAnnouncementChannelParams {
|
|
1685
|
+
/** id of target channel */
|
|
1686
|
+
webhook_channel_id: Snowflake;
|
|
1687
|
+
}
|
|
1688
|
+
export interface FollowedChannel {
|
|
1689
|
+
/** source channel id */
|
|
1690
|
+
channel_id: Snowflake;
|
|
1691
|
+
/** created target webhook id */
|
|
1692
|
+
webhook_id: Snowflake;
|
|
1693
|
+
}
|
|
1694
|
+
export interface ForumTag {
|
|
1695
|
+
/** the id of the tag */
|
|
1696
|
+
id: Snowflake;
|
|
1697
|
+
/** the name of the tag (0-20 characters) */
|
|
1698
|
+
name: string;
|
|
1699
|
+
/** whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
|
|
1700
|
+
moderated: boolean;
|
|
1701
|
+
/** the id of a guild's custom emoji * */
|
|
1702
|
+
emoji_id: Snowflake;
|
|
1703
|
+
/** the unicode character of the emoji * */
|
|
1704
|
+
emoji_name?: string | null;
|
|
1705
|
+
}
|
|
1706
|
+
export interface ForumThreadMessageParam {
|
|
1707
|
+
/** Message contents (up to 2000 characters) */
|
|
1708
|
+
content?: string;
|
|
1709
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
1710
|
+
embeds?: Embed[];
|
|
1711
|
+
/** Allowed mentions for the message */
|
|
1712
|
+
allowed_mentions?: AllowedMention;
|
|
1713
|
+
/** Components to include with the message */
|
|
1714
|
+
components?: Component[];
|
|
1715
|
+
/** IDs of up to 3 stickers in the server to send in the message */
|
|
1716
|
+
sticker_ids?: Snowflake[];
|
|
1717
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
1718
|
+
files: string;
|
|
1719
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
1720
|
+
payload_json?: string;
|
|
1721
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
1722
|
+
attachments?: Attachment[];
|
|
1723
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1724
|
+
flags?: number;
|
|
1725
|
+
}
|
|
1726
|
+
export declare const GatewayIntents: {
|
|
1727
|
+
readonly GUILDS: number;
|
|
1728
|
+
readonly GUILD_MEMBERS: number;
|
|
1729
|
+
readonly GUILD_BANS: number;
|
|
1730
|
+
readonly GUILD_EMOJIS_AND_STICKERS: number;
|
|
1731
|
+
readonly GUILD_INTEGRATIONS: number;
|
|
1732
|
+
readonly GUILD_WEBHOOKS: number;
|
|
1733
|
+
readonly GUILD_INVITES: number;
|
|
1734
|
+
readonly GUILD_VOICE_STATES: number;
|
|
1735
|
+
readonly GUILD_PRESENCES: number;
|
|
1736
|
+
readonly GUILD_MESSAGES: number;
|
|
1737
|
+
readonly GUILD_MESSAGE_REACTIONS: number;
|
|
1738
|
+
readonly GUILD_MESSAGE_TYPING: number;
|
|
1739
|
+
readonly DIRECT_MESSAGES: number;
|
|
1740
|
+
readonly DIRECT_MESSAGE_REACTIONS: number;
|
|
1741
|
+
readonly DIRECT_MESSAGE_TYPING: number;
|
|
1742
|
+
readonly MESSAGE_CONTENT: number;
|
|
1743
|
+
readonly GUILD_SCHEDULED_EVENTS: number;
|
|
1744
|
+
readonly AUTO_MODERATION_CONFIGURATION: number;
|
|
1745
|
+
readonly AUTO_MODERATION_EXECUTION: number;
|
|
1746
|
+
};
|
|
1747
|
+
export declare enum GatewayOpcode {
|
|
1748
|
+
/** An event was dispatched. */
|
|
1749
|
+
DISPATCH = 0,
|
|
1750
|
+
/** Fired periodically by the client to keep the connection alive. */
|
|
1751
|
+
HEARTBEAT = 1,
|
|
1752
|
+
/** Starts a new session during the initial handshake. */
|
|
1753
|
+
IDENTIFY = 2,
|
|
1754
|
+
/** Update the client's presence. */
|
|
1755
|
+
PRESENCE_UPDATE = 3,
|
|
1756
|
+
/** Used to join/leave or move between voice channels. */
|
|
1757
|
+
VOICE_STATE_UPDATE = 4,
|
|
1758
|
+
/** Resume a previous session that was disconnected. */
|
|
1759
|
+
RESUME = 6,
|
|
1760
|
+
/** You should attempt to reconnect and resume immediately. */
|
|
1761
|
+
RECONNECT = 7,
|
|
1762
|
+
/** Request information about offline guild members in a large guild. */
|
|
1763
|
+
REQUEST_GUILD_MEMBERS = 8,
|
|
1764
|
+
/** The session has been invalidated. You should reconnect and identify/resume accordingly. */
|
|
1765
|
+
INVALID_SESSION = 9,
|
|
1766
|
+
/** Sent immediately after connecting, contains the heartbeat_interval to use. */
|
|
1767
|
+
HELLO = 10,
|
|
1768
|
+
/** Sent in response to receiving a heartbeat to acknowledge that it has been received. */
|
|
1769
|
+
HEARTBEAT_ACK = 11
|
|
1770
|
+
}
|
|
1771
|
+
export interface GatewayPayload<T = any | null> {
|
|
1772
|
+
/** opcode for the payload */
|
|
1773
|
+
op: GatewayOpcode;
|
|
1774
|
+
/** event data */
|
|
1775
|
+
d?: T;
|
|
1776
|
+
/** sequence number, used for resuming sessions and heartbeats */
|
|
1777
|
+
s?: number | null;
|
|
1778
|
+
/** the event name for this payload */
|
|
1779
|
+
t?: string | null;
|
|
1780
|
+
}
|
|
1781
|
+
export interface GatewayUrlQueryStringParam {
|
|
1782
|
+
/** API Version to use */
|
|
1783
|
+
v: number;
|
|
1784
|
+
/** The encoding of received gateway packets */
|
|
1785
|
+
encoding: string;
|
|
1786
|
+
/** The optional transport compression of gateway packets */
|
|
1787
|
+
compress?: string;
|
|
1788
|
+
}
|
|
1789
|
+
export interface GetChannelMessageParams {
|
|
1790
|
+
/** Get messages around this message ID */
|
|
1791
|
+
around?: Snowflake;
|
|
1792
|
+
/** Get messages before this message ID */
|
|
1793
|
+
before?: Snowflake;
|
|
1794
|
+
/** Get messages after this message ID */
|
|
1795
|
+
after?: Snowflake;
|
|
1796
|
+
/** Max number of messages to return (1-100) */
|
|
1797
|
+
limit?: number;
|
|
1798
|
+
}
|
|
1799
|
+
export interface GetCurrentAuthorizationInformationResponse {
|
|
1800
|
+
/** the current application */
|
|
1801
|
+
application: Application;
|
|
1802
|
+
/** the scopes the user has authorized the application for */
|
|
1803
|
+
scopes: string[];
|
|
1804
|
+
/** when the access token expires */
|
|
1805
|
+
expires: string;
|
|
1806
|
+
/** the user who has authorized, if the user has authorized with the identify scope */
|
|
1807
|
+
user?: User;
|
|
1808
|
+
}
|
|
1809
|
+
export interface GetCurrentUserGuildParams {
|
|
1810
|
+
/** get guilds before this guild ID */
|
|
1811
|
+
before: Snowflake;
|
|
1812
|
+
/** get guilds after this guild ID */
|
|
1813
|
+
after: Snowflake;
|
|
1814
|
+
/** max number of guilds to return (1-200) */
|
|
1815
|
+
limit: number;
|
|
1816
|
+
}
|
|
1817
|
+
export interface GetGatewayBotResponse {
|
|
1818
|
+
/** WSS URL that can be used for connecting to the Gateway */
|
|
1819
|
+
url: string;
|
|
1820
|
+
/** Recommended number of shards to use when connecting */
|
|
1821
|
+
shards: number;
|
|
1822
|
+
/** Information on the current session start limit */
|
|
1823
|
+
session_start_limit: SessionStartLimit;
|
|
1824
|
+
}
|
|
1825
|
+
export interface GetGlobalApplicationCommandParams {
|
|
1826
|
+
/** Whether to include full localization dictionaries (name_localizations and description_localizations) in the returned objects, instead of the name_localized and description_localized fields. Default false. */
|
|
1827
|
+
with_localizations?: boolean;
|
|
1828
|
+
}
|
|
1829
|
+
export interface GetGuildApplicationCommandParams {
|
|
1830
|
+
/** Whether to include full localization dictionaries (name_localizations and description_localizations) in the returned objects, instead of the name_localized and description_localized fields. Default false. */
|
|
1831
|
+
with_localizations?: boolean;
|
|
1832
|
+
}
|
|
1833
|
+
export interface GetGuildAuditLogParams {
|
|
1834
|
+
/** Entries from a specific user ID */
|
|
1835
|
+
user_id?: Snowflake;
|
|
1836
|
+
/** Entries for a specific audit log event */
|
|
1837
|
+
action_type?: AuditLogEvent;
|
|
1838
|
+
/** Entries that preceded a specific audit log entry ID */
|
|
1839
|
+
before?: Snowflake;
|
|
1840
|
+
/** Maximum number of entries (between 1-100) to return, defaults to 50 */
|
|
1841
|
+
limit?: number;
|
|
1842
|
+
}
|
|
1843
|
+
export interface GetGuildBanParams {
|
|
1844
|
+
/** number of users to return (up to maximum 1000) */
|
|
1845
|
+
limit?: Number;
|
|
1846
|
+
/** consider only users before given user id */
|
|
1847
|
+
before?: Snowflake;
|
|
1848
|
+
/** consider only users after given user id */
|
|
1849
|
+
after?: Snowflake;
|
|
1850
|
+
}
|
|
1851
|
+
export interface GetGuildParams {
|
|
1852
|
+
/** when true, will return approximate member and presence counts for the guild */
|
|
1853
|
+
with_counts?: boolean;
|
|
1854
|
+
}
|
|
1855
|
+
export interface GetGuildPruneCountParams {
|
|
1856
|
+
/** number of days to count prune for (1-30) */
|
|
1857
|
+
days: number;
|
|
1858
|
+
/** role(s) to include */
|
|
1859
|
+
include_roles: Snowflake[];
|
|
1860
|
+
}
|
|
1861
|
+
export interface GetGuildScheduledEventParams {
|
|
1862
|
+
/** include number of users subscribed to this event */
|
|
1863
|
+
with_user_count?: boolean;
|
|
1864
|
+
}
|
|
1865
|
+
export interface GetGuildScheduledEventUserParams {
|
|
1866
|
+
/** number of users to return (up to maximum 100) */
|
|
1867
|
+
limit?: Number;
|
|
1868
|
+
/** include guild member data if it exists */
|
|
1869
|
+
with_member?: boolean;
|
|
1870
|
+
/** consider only users before given user id */
|
|
1871
|
+
before?: Snowflake;
|
|
1872
|
+
/** consider only users after given user id */
|
|
1873
|
+
after?: Snowflake;
|
|
1874
|
+
}
|
|
1875
|
+
export interface GetGuildWidgetImageParams {
|
|
1876
|
+
/** style of the widget image returned (see below) */
|
|
1877
|
+
style: string;
|
|
1878
|
+
}
|
|
1879
|
+
export interface GetInviteParams {
|
|
1880
|
+
/** whether the invite should contain approximate member counts */
|
|
1881
|
+
with_counts?: boolean;
|
|
1882
|
+
/** whether the invite should contain the expiration date */
|
|
1883
|
+
with_expiration?: boolean;
|
|
1884
|
+
/** the guild scheduled event to include with the invite */
|
|
1885
|
+
guild_scheduled_event_id?: Snowflake;
|
|
1886
|
+
}
|
|
1887
|
+
export interface GetReactionParams {
|
|
1888
|
+
/** Get users after this user ID */
|
|
1889
|
+
after?: Snowflake;
|
|
1890
|
+
/** Max number of users to return (1-100) */
|
|
1891
|
+
limit?: number;
|
|
1892
|
+
}
|
|
1893
|
+
export interface GetWebhookMessageParams {
|
|
1894
|
+
/** id of the thread the message is in */
|
|
1895
|
+
thread_id: Snowflake;
|
|
1896
|
+
}
|
|
1897
|
+
export interface GroupDmAddRecipientParams {
|
|
1898
|
+
/** access token of a user that has granted your app the gdm.join scope */
|
|
1899
|
+
access_token: string;
|
|
1900
|
+
/** nickname of the user being added */
|
|
1901
|
+
nick: string;
|
|
1902
|
+
}
|
|
1903
|
+
export interface Guild {
|
|
1904
|
+
/** guild id */
|
|
1905
|
+
id: Snowflake;
|
|
1906
|
+
/** guild name (2-100 characters, excluding trailing and leading whitespace) */
|
|
1907
|
+
name: string;
|
|
1908
|
+
/** icon hash */
|
|
1909
|
+
icon?: string | null;
|
|
1910
|
+
/** icon hash, returned when in the template object */
|
|
1911
|
+
icon_hash?: string | null;
|
|
1912
|
+
/** splash hash */
|
|
1913
|
+
splash?: string | null;
|
|
1914
|
+
/** discovery splash hash; only present for guilds with the "DISCOVERABLE" feature */
|
|
1915
|
+
discovery_splash?: string | null;
|
|
1916
|
+
/** true if the user is the owner of the guild */
|
|
1917
|
+
owner?: boolean;
|
|
1918
|
+
/** id of owner */
|
|
1919
|
+
owner_id: Snowflake;
|
|
1920
|
+
/** total permissions for the user in the guild (excludes overwrites) */
|
|
1921
|
+
permissions?: string;
|
|
1922
|
+
/** voice region id for the guild (deprecated) */
|
|
1923
|
+
region?: string | null;
|
|
1924
|
+
/** id of afk channel */
|
|
1925
|
+
afk_channel_id?: Snowflake | null;
|
|
1926
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
1927
|
+
afk_timeout: number;
|
|
1928
|
+
/** true if the server widget is enabled */
|
|
1929
|
+
widget_enabled?: boolean;
|
|
1930
|
+
/** the channel id that the widget will generate an invite to, or null if set to no invite */
|
|
1931
|
+
widget_channel_id?: Snowflake | null;
|
|
1932
|
+
/** verification level required for the guild */
|
|
1933
|
+
verification_level: VerificationLevel;
|
|
1934
|
+
/** default message notifications level */
|
|
1935
|
+
default_message_notifications: DefaultMessageNotificationLevel;
|
|
1936
|
+
/** explicit content filter level */
|
|
1937
|
+
explicit_content_filter: ExplicitContentFilterLevel;
|
|
1938
|
+
/** roles in the guild */
|
|
1939
|
+
roles: Role[];
|
|
1940
|
+
/** custom guild emojis */
|
|
1941
|
+
emojis: Emoji[];
|
|
1942
|
+
/** enabled guild features */
|
|
1943
|
+
features: GuildFeature[];
|
|
1944
|
+
/** required MFA level for the guild */
|
|
1945
|
+
mfa_level: MfaLevel;
|
|
1946
|
+
/** application id of the guild creator if it is bot-created */
|
|
1947
|
+
application_id?: Snowflake | null;
|
|
1948
|
+
/** the id of the channel where guild notices such as welcome messages and boost events are posted */
|
|
1949
|
+
system_channel_id?: Snowflake | null;
|
|
1950
|
+
/** system channel flags */
|
|
1951
|
+
system_channel_flags: number;
|
|
1952
|
+
/** the id of the channel where Community guilds can display rules and/or guidelines */
|
|
1953
|
+
rules_channel_id?: Snowflake | null;
|
|
1954
|
+
/** the maximum number of presences for the guild (null is always returned, apart from the largest of guilds) */
|
|
1955
|
+
max_presences?: number | null;
|
|
1956
|
+
/** the maximum number of members for the guild */
|
|
1957
|
+
max_members?: number;
|
|
1958
|
+
/** the vanity url code for the guild */
|
|
1959
|
+
vanity_url_code?: string | null;
|
|
1960
|
+
/** the description of a guild */
|
|
1961
|
+
description?: string | null;
|
|
1962
|
+
/** banner hash */
|
|
1963
|
+
banner?: string | null;
|
|
1964
|
+
/** premium tier (Server Boost level) */
|
|
1965
|
+
premium_tier: PremiumTier;
|
|
1966
|
+
/** the number of boosts this guild currently has */
|
|
1967
|
+
premium_subscription_count?: number;
|
|
1968
|
+
/** the preferred locale of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" */
|
|
1969
|
+
preferred_locale: string;
|
|
1970
|
+
/** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
|
|
1971
|
+
public_updates_channel_id?: Snowflake | null;
|
|
1972
|
+
/** the maximum amount of users in a video channel */
|
|
1973
|
+
max_video_channel_users?: number;
|
|
1974
|
+
/** approximate number of members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
|
|
1975
|
+
approximate_member_count?: number;
|
|
1976
|
+
/** approximate number of non-offline members in this guild, returned from the GET /guilds/<id> endpoint when with_counts is true */
|
|
1977
|
+
approximate_presence_count?: number;
|
|
1978
|
+
/** the welcome screen of a Community guild, shown to new members, returned in an Invite's guild object */
|
|
1979
|
+
welcome_screen?: WelcomeScreen;
|
|
1980
|
+
/** guild NSFW level */
|
|
1981
|
+
nsfw_level: GuildNsfwLevel;
|
|
1982
|
+
/** custom guild stickers */
|
|
1983
|
+
stickers?: Sticker[];
|
|
1984
|
+
/** whether the guild has the boost progress bar enabled */
|
|
1985
|
+
premium_progress_bar_enabled: boolean;
|
|
1986
|
+
}
|
|
1987
|
+
export interface GuildApplicationCommandPermission {
|
|
1988
|
+
/** ID of the command or the application ID */
|
|
1989
|
+
id: Snowflake;
|
|
1990
|
+
/** ID of the application the command belongs to */
|
|
1991
|
+
application_id: Snowflake;
|
|
1992
|
+
/** ID of the guild */
|
|
1993
|
+
guild_id: Snowflake;
|
|
1994
|
+
/** Permissions for the command in the guild, max of 100 */
|
|
1995
|
+
permissions: ApplicationCommandPermission[];
|
|
1996
|
+
}
|
|
1997
|
+
export interface GuildBanAddEvent {
|
|
1998
|
+
/** ID of the guild */
|
|
1999
|
+
guild_id: Snowflake;
|
|
2000
|
+
/** User who was banned */
|
|
2001
|
+
user: User;
|
|
2002
|
+
}
|
|
2003
|
+
export interface GuildBanRemoveEvent {
|
|
2004
|
+
/** ID of the guild */
|
|
2005
|
+
guild_id: Snowflake;
|
|
2006
|
+
/** User who was unbanned */
|
|
2007
|
+
user: User;
|
|
2008
|
+
}
|
|
2009
|
+
export type GuildCreateEvent = Guild & GuildCreateExtra;
|
|
2010
|
+
export interface GuildCreateExtra {
|
|
2011
|
+
/** When this guild was joined at */
|
|
2012
|
+
joined_at: string;
|
|
2013
|
+
/** true if this is considered a large guild */
|
|
2014
|
+
large: boolean;
|
|
2015
|
+
/** true if this guild is unavailable due to an outage */
|
|
2016
|
+
unavailable?: boolean;
|
|
2017
|
+
/** Total number of members in this guild */
|
|
2018
|
+
member_count: number;
|
|
2019
|
+
/** States of members currently in voice channels; lacks the guild_id key */
|
|
2020
|
+
voice_states: VoiceState[];
|
|
2021
|
+
/** Users in the guild */
|
|
2022
|
+
members: GuildMember[];
|
|
2023
|
+
/** Channels in the guild */
|
|
2024
|
+
channels: Channel[];
|
|
2025
|
+
/** All active threads in the guild that current user has permission to view */
|
|
2026
|
+
threads: Channel[];
|
|
2027
|
+
/** Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
2028
|
+
presences: PresenceUpdateEvent[];
|
|
2029
|
+
/** Stage instances in the guild */
|
|
2030
|
+
stage_instances: StageInstance[];
|
|
2031
|
+
/** Scheduled events in the guild */
|
|
2032
|
+
guild_scheduled_events: GuildScheduledEvent[];
|
|
2033
|
+
}
|
|
2034
|
+
export type GuildDeleteEvent = UnavailableGuild;
|
|
2035
|
+
export interface GuildEmojisUpdateEvent {
|
|
2036
|
+
/** ID of the guild */
|
|
2037
|
+
guild_id: Snowflake;
|
|
2038
|
+
/** Array of emojis */
|
|
2039
|
+
emojis: Emoji[];
|
|
2040
|
+
}
|
|
2041
|
+
export declare enum GuildFeature {
|
|
2042
|
+
/** guild has access to set an animated guild banner image */
|
|
2043
|
+
ANIMATED_BANNER = "ANIMATED_BANNER",
|
|
2044
|
+
/** guild has access to set an animated guild icon */
|
|
2045
|
+
ANIMATED_ICON = "ANIMATED_ICON",
|
|
2046
|
+
/** guild is using the old permissions configuration behavior */
|
|
2047
|
+
APPLICATION_COMMAND_PERMISSIONS_V2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
|
|
2048
|
+
/** guild has set up auto moderation rules */
|
|
2049
|
+
AUTO_MODERATION = "AUTO_MODERATION",
|
|
2050
|
+
/** guild has access to set a guild banner image */
|
|
2051
|
+
BANNER = "BANNER",
|
|
2052
|
+
/** guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates */
|
|
2053
|
+
COMMUNITY = "COMMUNITY",
|
|
2054
|
+
/** guild has been set as a support server on the App Directory */
|
|
2055
|
+
DEVELOPER_SUPPORT_SERVER = "DEVELOPER_SUPPORT_SERVER",
|
|
2056
|
+
/** guild is able to be discovered in the directory */
|
|
2057
|
+
DISCOVERABLE = "DISCOVERABLE",
|
|
2058
|
+
/** guild is able to be featured in the directory */
|
|
2059
|
+
FEATURABLE = "FEATURABLE",
|
|
2060
|
+
/** guild has paused invites, preventing new users from joining */
|
|
2061
|
+
INVITES_DISABLED = "INVITES_DISABLED",
|
|
2062
|
+
/** guild has access to set an invite splash background */
|
|
2063
|
+
INVITE_SPLASH = "INVITE_SPLASH",
|
|
2064
|
+
/** guild has enabled Membership Screening */
|
|
2065
|
+
MEMBER_VERIFICATION_GATE_ENABLED = "MEMBER_VERIFICATION_GATE_ENABLED",
|
|
2066
|
+
/** guild has enabled monetization */
|
|
2067
|
+
MONETIZATION_ENABLED = "MONETIZATION_ENABLED",
|
|
2068
|
+
/** guild has increased custom sticker slots */
|
|
2069
|
+
MORE_STICKERS = "MORE_STICKERS",
|
|
2070
|
+
/** guild has access to create announcement channels */
|
|
2071
|
+
NEWS = "NEWS",
|
|
2072
|
+
/** guild is partnered */
|
|
2073
|
+
PARTNERED = "PARTNERED",
|
|
2074
|
+
/** guild can be previewed before joining via Membership Screening or the directory */
|
|
2075
|
+
PREVIEW_ENABLED = "PREVIEW_ENABLED",
|
|
2076
|
+
/** guild is able to set role icons */
|
|
2077
|
+
ROLE_ICONS = "ROLE_ICONS",
|
|
2078
|
+
/** guild has enabled ticketed events */
|
|
2079
|
+
TICKETED_EVENTS_ENABLED = "TICKETED_EVENTS_ENABLED",
|
|
2080
|
+
/** guild has access to set a vanity URL */
|
|
2081
|
+
VANITY_URL = "VANITY_URL",
|
|
2082
|
+
/** guild is verified */
|
|
2083
|
+
VERIFIED = "VERIFIED",
|
|
2084
|
+
/** guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */
|
|
2085
|
+
VIP_REGIONS = "VIP_REGIONS",
|
|
2086
|
+
/** guild has enabled the welcome screen */
|
|
2087
|
+
WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED"
|
|
2088
|
+
}
|
|
2089
|
+
export interface GuildIntegrationsUpdateEvent {
|
|
2090
|
+
/** ID of the guild whose integrations were updated */
|
|
2091
|
+
guild_id: Snowflake;
|
|
2092
|
+
}
|
|
2093
|
+
export interface GuildMember {
|
|
2094
|
+
/** the user this guild member represents */
|
|
2095
|
+
user?: User;
|
|
2096
|
+
/** this user's guild nickname */
|
|
2097
|
+
nick?: string | null;
|
|
2098
|
+
/** the member's guild avatar hash */
|
|
2099
|
+
avatar?: string | null;
|
|
2100
|
+
/** array of role object ids */
|
|
2101
|
+
roles: Snowflake[];
|
|
2102
|
+
/** when the user joined the guild */
|
|
2103
|
+
joined_at: string;
|
|
2104
|
+
/** when the user started boosting the guild */
|
|
2105
|
+
premium_since?: string | null;
|
|
2106
|
+
/** whether the user is deafened in voice channels */
|
|
2107
|
+
deaf: boolean;
|
|
2108
|
+
/** whether the user is muted in voice channels */
|
|
2109
|
+
mute: boolean;
|
|
2110
|
+
/** whether the user has not yet passed the guild's Membership Screening requirements */
|
|
2111
|
+
pending?: boolean;
|
|
2112
|
+
/** total permissions of the member in the channel, including overwrites, returned when in the interaction object */
|
|
2113
|
+
permissions?: string;
|
|
2114
|
+
/** when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
|
2115
|
+
communication_disabled_until?: string | null;
|
|
2116
|
+
}
|
|
2117
|
+
export type GuildMemberAddEvent = GuildMember & GuildMemberAddExtra;
|
|
2118
|
+
export interface GuildMemberAddExtra {
|
|
2119
|
+
/** ID of the guild */
|
|
2120
|
+
guild_id: Snowflake;
|
|
2121
|
+
}
|
|
2122
|
+
export interface GuildMemberRemoveEvent {
|
|
2123
|
+
/** ID of the guild */
|
|
2124
|
+
guild_id: Snowflake;
|
|
2125
|
+
/** User who was removed */
|
|
2126
|
+
user: User;
|
|
2127
|
+
}
|
|
2128
|
+
export interface GuildMembersChunkEvent {
|
|
2129
|
+
/** ID of the guild */
|
|
2130
|
+
guild_id: Snowflake;
|
|
2131
|
+
/** Set of guild members */
|
|
2132
|
+
members: GuildMember[];
|
|
2133
|
+
/** Chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count) */
|
|
2134
|
+
chunk_index: number;
|
|
2135
|
+
/** Total number of expected chunks for this response */
|
|
2136
|
+
chunk_count: number;
|
|
2137
|
+
/** When passing an invalid ID to REQUEST_GUILD_MEMBERS, it will be returned here */
|
|
2138
|
+
not_found?: any[];
|
|
2139
|
+
/** When passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here */
|
|
2140
|
+
presences?: PresenceUpdateEvent[];
|
|
2141
|
+
/** Nonce used in the Guild Members Request */
|
|
2142
|
+
nonce?: string;
|
|
2143
|
+
}
|
|
2144
|
+
export interface GuildMemberUpdateEvent {
|
|
2145
|
+
/** ID of the guild */
|
|
2146
|
+
guild_id: Snowflake;
|
|
2147
|
+
/** User role ids */
|
|
2148
|
+
roles: Snowflake[];
|
|
2149
|
+
/** User */
|
|
2150
|
+
user: User;
|
|
2151
|
+
/** Nickname of the user in the guild */
|
|
2152
|
+
nick?: string | null;
|
|
2153
|
+
/** Member's guild avatar hash */
|
|
2154
|
+
avatar?: string | null;
|
|
2155
|
+
/** When the user joined the guild */
|
|
2156
|
+
joined_at?: string | null;
|
|
2157
|
+
/** When the user starting boosting the guild */
|
|
2158
|
+
premium_since?: string | null;
|
|
2159
|
+
/** Whether the user is deafened in voice channels */
|
|
2160
|
+
deaf?: boolean;
|
|
2161
|
+
/** Whether the user is muted in voice channels */
|
|
2162
|
+
mute?: boolean;
|
|
2163
|
+
/** Whether the user has not yet passed the guild's Membership Screening requirements */
|
|
2164
|
+
pending?: boolean;
|
|
2165
|
+
/** When the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
|
2166
|
+
communication_disabled_until?: string | null;
|
|
2167
|
+
}
|
|
2168
|
+
export declare enum GuildNsfwLevel {
|
|
2169
|
+
DEFAULT = 0,
|
|
2170
|
+
EXPLICIT = 1,
|
|
2171
|
+
SAFE = 2,
|
|
2172
|
+
AGE_RESTRICTED = 3
|
|
2173
|
+
}
|
|
2174
|
+
export interface GuildPreview {
|
|
2175
|
+
/** guild id */
|
|
2176
|
+
id: Snowflake;
|
|
2177
|
+
/** guild name (2-100 characters) */
|
|
2178
|
+
name: string;
|
|
2179
|
+
/** icon hash */
|
|
2180
|
+
icon?: string | null;
|
|
2181
|
+
/** splash hash */
|
|
2182
|
+
splash?: string | null;
|
|
2183
|
+
/** discovery splash hash */
|
|
2184
|
+
discovery_splash?: string | null;
|
|
2185
|
+
/** custom guild emojis */
|
|
2186
|
+
emojis: Emoji[];
|
|
2187
|
+
/** enabled guild features */
|
|
2188
|
+
features: GuildFeature[];
|
|
2189
|
+
/** approximate number of members in this guild */
|
|
2190
|
+
approximate_member_count: number;
|
|
2191
|
+
/** approximate number of online members in this guild */
|
|
2192
|
+
approximate_presence_count: number;
|
|
2193
|
+
/** the description for the guild */
|
|
2194
|
+
description?: string | null;
|
|
2195
|
+
/** custom guild stickers */
|
|
2196
|
+
stickers: Sticker[];
|
|
2197
|
+
}
|
|
2198
|
+
export interface GuildRoleCreateEvent {
|
|
2199
|
+
/** ID of the guild */
|
|
2200
|
+
guild_id: Snowflake;
|
|
2201
|
+
/** Role that was created */
|
|
2202
|
+
role: Role;
|
|
2203
|
+
}
|
|
2204
|
+
export interface GuildRoleDeleteEvent {
|
|
2205
|
+
/** ID of the guild */
|
|
2206
|
+
guild_id: Snowflake;
|
|
2207
|
+
/** ID of the role */
|
|
2208
|
+
role_id: Snowflake;
|
|
2209
|
+
}
|
|
2210
|
+
export interface GuildRoleUpdateEvent {
|
|
2211
|
+
/** ID of the guild */
|
|
2212
|
+
guild_id: Snowflake;
|
|
2213
|
+
/** Role that was updated */
|
|
2214
|
+
role: Role;
|
|
2215
|
+
}
|
|
2216
|
+
export interface GuildScheduledEvent {
|
|
2217
|
+
/** the id of the scheduled event */
|
|
2218
|
+
id: Snowflake;
|
|
2219
|
+
/** the guild id which the scheduled event belongs to */
|
|
2220
|
+
guild_id: Snowflake;
|
|
2221
|
+
/** the channel id in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL */
|
|
2222
|
+
channel_id?: Snowflake | null;
|
|
2223
|
+
/** the id of the user that created the scheduled event * */
|
|
2224
|
+
creator_id?: Snowflake | null;
|
|
2225
|
+
/** the name of the scheduled event (1-100 characters) */
|
|
2226
|
+
name: string;
|
|
2227
|
+
/** the description of the scheduled event (1-1000 characters) */
|
|
2228
|
+
description?: string | null;
|
|
2229
|
+
/** the time the scheduled event will start */
|
|
2230
|
+
scheduled_start_time: string;
|
|
2231
|
+
/** the time the scheduled event will end, required if entity_type is EXTERNAL */
|
|
2232
|
+
scheduled_end_time?: string | null;
|
|
2233
|
+
/** the privacy level of the scheduled event */
|
|
2234
|
+
privacy_level: GuildScheduledEventPrivacyLevel;
|
|
2235
|
+
/** the status of the scheduled event */
|
|
2236
|
+
status: GuildScheduledEventStatus;
|
|
2237
|
+
/** the type of the scheduled event */
|
|
2238
|
+
entity_type: GuildScheduledEventEntityType;
|
|
2239
|
+
/** the id of an entity associated with a guild scheduled event */
|
|
2240
|
+
entity_id?: Snowflake | null;
|
|
2241
|
+
/** additional metadata for the guild scheduled event */
|
|
2242
|
+
entity_metadata?: GuildScheduledEventEntityMetadatum | null;
|
|
2243
|
+
/** the user that created the scheduled event */
|
|
2244
|
+
creator?: User;
|
|
2245
|
+
/** the number of users subscribed to the scheduled event */
|
|
2246
|
+
user_count?: number;
|
|
2247
|
+
/** the cover image hash of the scheduled event */
|
|
2248
|
+
image?: string | null;
|
|
2249
|
+
}
|
|
2250
|
+
export type GuildScheduledEventCreateEvent = GuildScheduledEvent;
|
|
2251
|
+
export type GuildScheduledEventDeleteEvent = GuildScheduledEvent;
|
|
2252
|
+
export interface GuildScheduledEventEntityMetadatum {
|
|
2253
|
+
/** location of the event (1-100 characters) */
|
|
2254
|
+
location?: string;
|
|
2255
|
+
}
|
|
2256
|
+
export declare enum GuildScheduledEventEntityType {
|
|
2257
|
+
STAGE_INSTANCE = 1,
|
|
2258
|
+
VOICE = 2,
|
|
2259
|
+
EXTERNAL = 3
|
|
2260
|
+
}
|
|
2261
|
+
export declare enum GuildScheduledEventPrivacyLevel {
|
|
2262
|
+
/** the scheduled event is only accessible to guild members */
|
|
2263
|
+
GUILD_ONLY = 2
|
|
2264
|
+
}
|
|
2265
|
+
export declare enum GuildScheduledEventStatus {
|
|
2266
|
+
SCHEDULED = 1,
|
|
2267
|
+
ACTIVE = 2,
|
|
2268
|
+
COMPLETED = 3,
|
|
2269
|
+
CANCELED = 4
|
|
2270
|
+
}
|
|
2271
|
+
export type GuildScheduledEventUpdateEvent = GuildScheduledEvent;
|
|
2272
|
+
export interface GuildScheduledEventUser {
|
|
2273
|
+
/** the scheduled event id which the user subscribed to */
|
|
2274
|
+
guild_scheduled_event_id: Snowflake;
|
|
2275
|
+
/** user which subscribed to an event */
|
|
2276
|
+
user: User;
|
|
2277
|
+
/** guild member data for this user for the guild which this event belongs to, if any */
|
|
2278
|
+
member?: GuildMember;
|
|
2279
|
+
}
|
|
2280
|
+
export interface GuildScheduledEventUserAddEvent {
|
|
2281
|
+
/** ID of the guild scheduled event */
|
|
2282
|
+
guild_scheduled_event_id: Snowflake;
|
|
2283
|
+
/** ID of the user */
|
|
2284
|
+
user_id: Snowflake;
|
|
2285
|
+
/** ID of the guild */
|
|
2286
|
+
guild_id: Snowflake;
|
|
2287
|
+
}
|
|
2288
|
+
export interface GuildScheduledEventUserRemoveEvent {
|
|
2289
|
+
/** ID of the guild scheduled event */
|
|
2290
|
+
guild_scheduled_event_id: Snowflake;
|
|
2291
|
+
/** ID of the user */
|
|
2292
|
+
user_id: Snowflake;
|
|
2293
|
+
/** ID of the guild */
|
|
2294
|
+
guild_id: Snowflake;
|
|
2295
|
+
}
|
|
2296
|
+
export interface GuildStickersUpdateEvent {
|
|
2297
|
+
/** ID of the guild */
|
|
2298
|
+
guild_id: Snowflake;
|
|
2299
|
+
/** Array of stickers */
|
|
2300
|
+
stickers: Sticker[];
|
|
2301
|
+
}
|
|
2302
|
+
export interface GuildTemplate {
|
|
2303
|
+
/** the template code (unique ID) */
|
|
2304
|
+
code: string;
|
|
2305
|
+
/** template name */
|
|
2306
|
+
name: string;
|
|
2307
|
+
/** the description for the template */
|
|
2308
|
+
description?: string | null;
|
|
2309
|
+
/** number of times this template has been used */
|
|
2310
|
+
usage_count: number;
|
|
2311
|
+
/** the ID of the user who created the template */
|
|
2312
|
+
creator_id: Snowflake;
|
|
2313
|
+
/** the user who created the template */
|
|
2314
|
+
creator: User;
|
|
2315
|
+
/** when this template was created */
|
|
2316
|
+
created_at: string;
|
|
2317
|
+
/** when this template was last synced to the source guild */
|
|
2318
|
+
updated_at: string;
|
|
2319
|
+
/** the ID of the guild this template is based on */
|
|
2320
|
+
source_guild_id: Snowflake;
|
|
2321
|
+
/** the guild snapshot this template contains */
|
|
2322
|
+
serialized_source_guild: Guild;
|
|
2323
|
+
/** whether the template has unsynced changes */
|
|
2324
|
+
is_dirty?: boolean | null;
|
|
2325
|
+
}
|
|
2326
|
+
export type GuildUpdateEvent = Guild;
|
|
2327
|
+
export interface GuildWidget {
|
|
2328
|
+
/** guild id */
|
|
2329
|
+
id: Snowflake;
|
|
2330
|
+
/** guild name (2-100 characters) */
|
|
2331
|
+
name: string;
|
|
2332
|
+
/** instant invite for the guilds specified widget invite channel */
|
|
2333
|
+
instant_invite?: string | null;
|
|
2334
|
+
/** voice and stage channels which are accessible by @everyone */
|
|
2335
|
+
channels: Channel[];
|
|
2336
|
+
/** special widget user objects that includes users presence (Limit 100) */
|
|
2337
|
+
members: User[];
|
|
2338
|
+
/** number of online members in this guild */
|
|
2339
|
+
presence_count: number;
|
|
2340
|
+
}
|
|
2341
|
+
export interface GuildWidgetSetting {
|
|
2342
|
+
/** whether the widget is enabled */
|
|
2343
|
+
enabled: boolean;
|
|
2344
|
+
/** the widget channel id */
|
|
2345
|
+
channel_id?: Snowflake | null;
|
|
2346
|
+
}
|
|
2347
|
+
export type Heartbeat = number | null;
|
|
2348
|
+
export interface HelloEvent {
|
|
2349
|
+
/** Interval (in milliseconds) an app should heartbeat with */
|
|
2350
|
+
heartbeat_interval: number;
|
|
2351
|
+
}
|
|
2352
|
+
export interface Identify {
|
|
2353
|
+
/** Authentication token */
|
|
2354
|
+
token: string;
|
|
2355
|
+
/** Connection properties */
|
|
2356
|
+
properties: IdentifyConnectionProperty;
|
|
2357
|
+
/** Whether this connection supports compression of packets */
|
|
2358
|
+
compress?: boolean;
|
|
2359
|
+
/** Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list */
|
|
2360
|
+
large_threshold?: number;
|
|
2361
|
+
/** Used for Guild Sharding */
|
|
2362
|
+
shard?: number[];
|
|
2363
|
+
/** Presence structure for initial presence information */
|
|
2364
|
+
presence?: UpdatePresence;
|
|
2365
|
+
/** Gateway Intents you wish to receive */
|
|
2366
|
+
intents: number;
|
|
2367
|
+
}
|
|
2368
|
+
export interface IdentifyConnectionProperty {
|
|
2369
|
+
/** Your operating system */
|
|
2370
|
+
os: string;
|
|
2371
|
+
/** Your library name */
|
|
2372
|
+
browser: string;
|
|
2373
|
+
/** Your library name */
|
|
2374
|
+
device: string;
|
|
2375
|
+
}
|
|
2376
|
+
export interface InstallParam {
|
|
2377
|
+
/** the scopes to add the application to the server with */
|
|
2378
|
+
scopes: OAuth2Scope[];
|
|
2379
|
+
/** the permissions to request for the bot role */
|
|
2380
|
+
permissions: string;
|
|
2381
|
+
}
|
|
2382
|
+
export interface Integration {
|
|
2383
|
+
/** integration id */
|
|
2384
|
+
id: Snowflake;
|
|
2385
|
+
/** integration name */
|
|
2386
|
+
name: string;
|
|
2387
|
+
/** integration type (twitch, youtube, or discord) */
|
|
2388
|
+
type: string;
|
|
2389
|
+
/** is this integration enabled */
|
|
2390
|
+
enabled?: boolean;
|
|
2391
|
+
/** is this integration syncing */
|
|
2392
|
+
syncing?: boolean;
|
|
2393
|
+
/** id that this integration uses for "subscribers" */
|
|
2394
|
+
role_id?: Snowflake;
|
|
2395
|
+
/** whether emoticons should be synced for this integration (twitch only currently) */
|
|
2396
|
+
enable_emoticons?: boolean;
|
|
2397
|
+
/** the behavior of expiring subscribers */
|
|
2398
|
+
expire_behavior?: IntegrationExpireBehavior;
|
|
2399
|
+
/** the grace period (in days) before expiring subscribers */
|
|
2400
|
+
expire_grace_period?: number;
|
|
2401
|
+
/** user for this integration */
|
|
2402
|
+
user?: User;
|
|
2403
|
+
/** integration account information */
|
|
2404
|
+
account: IntegrationAccount;
|
|
2405
|
+
/** when this integration was last synced */
|
|
2406
|
+
synced_at?: string;
|
|
2407
|
+
/** how many subscribers this integration has */
|
|
2408
|
+
subscriber_count?: number;
|
|
2409
|
+
/** has this integration been revoked */
|
|
2410
|
+
revoked?: boolean;
|
|
2411
|
+
/** The bot/OAuth2 application for discord integrations */
|
|
2412
|
+
application?: IntegrationApplication;
|
|
2413
|
+
/** the scopes the application has been authorized for */
|
|
2414
|
+
scopes?: OAuth2Scope[];
|
|
2415
|
+
}
|
|
2416
|
+
export interface IntegrationAccount {
|
|
2417
|
+
/** id of the account */
|
|
2418
|
+
id: string;
|
|
2419
|
+
/** name of the account */
|
|
2420
|
+
name: string;
|
|
2421
|
+
}
|
|
2422
|
+
export interface IntegrationApplication {
|
|
2423
|
+
/** the id of the app */
|
|
2424
|
+
id: Snowflake;
|
|
2425
|
+
/** the name of the app */
|
|
2426
|
+
name: string;
|
|
2427
|
+
/** the icon hash of the app */
|
|
2428
|
+
icon?: string | null;
|
|
2429
|
+
/** the description of the app */
|
|
2430
|
+
description: string;
|
|
2431
|
+
/** the bot associated with this application */
|
|
2432
|
+
bot?: User;
|
|
2433
|
+
}
|
|
2434
|
+
export type IntegrationCreateEvent = Integration & IntegrationCreateEventAdditional;
|
|
2435
|
+
export interface IntegrationCreateEventAdditional {
|
|
2436
|
+
/** ID of the guild */
|
|
2437
|
+
guild_id: Snowflake;
|
|
2438
|
+
}
|
|
2439
|
+
export interface IntegrationDeleteEvent {
|
|
2440
|
+
/** Integration ID */
|
|
2441
|
+
id: Snowflake;
|
|
2442
|
+
/** ID of the guild */
|
|
2443
|
+
guild_id: Snowflake;
|
|
2444
|
+
/** ID of the bot/OAuth2 application for this discord integration */
|
|
2445
|
+
application_id?: Snowflake;
|
|
2446
|
+
}
|
|
2447
|
+
export declare enum IntegrationExpireBehavior {
|
|
2448
|
+
REMOVE_ROLE = 0,
|
|
2449
|
+
KICK = 1
|
|
2450
|
+
}
|
|
2451
|
+
export type IntegrationUpdateEvent = Integration & IntegrationUpdateEventAdditional;
|
|
2452
|
+
export interface IntegrationUpdateEventAdditional {
|
|
2453
|
+
/** ID of the guild */
|
|
2454
|
+
guild_id: Snowflake;
|
|
2455
|
+
}
|
|
2456
|
+
export interface Interaction {
|
|
2457
|
+
/** ID of the interaction */
|
|
2458
|
+
id: Snowflake;
|
|
2459
|
+
/** ID of the application this interaction is for */
|
|
2460
|
+
application_id: Snowflake;
|
|
2461
|
+
/** Type of interaction */
|
|
2462
|
+
type: InteractionType;
|
|
2463
|
+
/** Interaction data payload */
|
|
2464
|
+
data?: InteractionDatum;
|
|
2465
|
+
/** Guild that the interaction was sent from */
|
|
2466
|
+
guild_id?: Snowflake;
|
|
2467
|
+
/** Channel that the interaction was sent from */
|
|
2468
|
+
channel_id?: Snowflake;
|
|
2469
|
+
/** Guild member data for the invoking user, including permissions */
|
|
2470
|
+
member?: GuildMember;
|
|
2471
|
+
/** User object for the invoking user, if invoked in a DM */
|
|
2472
|
+
user?: User;
|
|
2473
|
+
/** Continuation token for responding to the interaction */
|
|
2474
|
+
token: string;
|
|
2475
|
+
/** Read-only property, always 1 */
|
|
2476
|
+
version: number;
|
|
2477
|
+
/** For components, the message they were attached to */
|
|
2478
|
+
message?: Message;
|
|
2479
|
+
/** Bitwise set of permissions the app or bot has within the channel the interaction was sent from */
|
|
2480
|
+
app_permissions?: string;
|
|
2481
|
+
/** Selected language of the invoking user */
|
|
2482
|
+
locale?: string;
|
|
2483
|
+
/** Guild's preferred locale, if invoked in a guild */
|
|
2484
|
+
guild_locale?: string;
|
|
2485
|
+
}
|
|
2486
|
+
export interface InteractionCallbackAutocomplete {
|
|
2487
|
+
/** autocomplete choices (max of 25 choices) */
|
|
2488
|
+
choices: ApplicationCommandOptionChoice[];
|
|
2489
|
+
}
|
|
2490
|
+
export type InteractionCallbackDatum = InteractionCallbackAutocomplete | InteractionCallbackMessage | InteractionCallbackModal;
|
|
2491
|
+
export interface InteractionCallbackMessage {
|
|
2492
|
+
/** is the response TTS */
|
|
2493
|
+
tts?: boolean;
|
|
2494
|
+
/** message content */
|
|
2495
|
+
content?: string;
|
|
2496
|
+
/** supports up to 10 embeds */
|
|
2497
|
+
embeds?: Embed[];
|
|
2498
|
+
/** allowed mentions object */
|
|
2499
|
+
allowed_mentions?: AllowedMention;
|
|
2500
|
+
/** message flags combined as a bitfield (only SUPPRESS_EMBEDS and EPHEMERAL can be set) */
|
|
2501
|
+
flags?: number;
|
|
2502
|
+
/** message components */
|
|
2503
|
+
components?: Component[];
|
|
2504
|
+
/** attachment objects with filename and description */
|
|
2505
|
+
attachments?: Attachment[];
|
|
2506
|
+
}
|
|
2507
|
+
export interface InteractionCallbackModal {
|
|
2508
|
+
/** a developer-defined identifier for the component, max 100 characters */
|
|
2509
|
+
custom_id: string;
|
|
2510
|
+
/** the title of the popup modal, max 45 characters */
|
|
2511
|
+
title: string;
|
|
2512
|
+
/** between 1 and 5 (inclusive) components that make up the modal */
|
|
2513
|
+
components: Component[];
|
|
2514
|
+
}
|
|
2515
|
+
export declare enum InteractionCallbackType {
|
|
2516
|
+
/** ACK a Ping */
|
|
2517
|
+
PONG = 1,
|
|
2518
|
+
/** respond to an interaction with a message */
|
|
2519
|
+
CHANNEL_MESSAGE_WITH_SOURCE = 4,
|
|
2520
|
+
/** ACK an interaction and edit a response later, the user sees a loading state */
|
|
2521
|
+
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5,
|
|
2522
|
+
/** for components, ACK an interaction and edit the original message later; the user does not see a loading state */
|
|
2523
|
+
DEFERRED_UPDATE_MESSAGE = 6,
|
|
2524
|
+
/** for components, edit the message the component was attached to */
|
|
2525
|
+
UPDATE_MESSAGE = 7,
|
|
2526
|
+
/** respond to an autocomplete interaction with suggested choices */
|
|
2527
|
+
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
2528
|
+
/** respond to an interaction with a popup modal */
|
|
2529
|
+
MODAL = 9
|
|
2530
|
+
}
|
|
2531
|
+
export type InteractionCreateEvent = Interaction;
|
|
2532
|
+
export type InteractionDatum = ApplicationCommandDatum | MessageComponentDatum | ModalSubmitDatum;
|
|
2533
|
+
export interface InteractionResponse {
|
|
2534
|
+
/** the type of response */
|
|
2535
|
+
type: InteractionCallbackType;
|
|
2536
|
+
/** an optional response message */
|
|
2537
|
+
data?: InteractionCallbackDatum;
|
|
2538
|
+
}
|
|
2539
|
+
export declare enum InteractionType {
|
|
2540
|
+
PING = 1,
|
|
2541
|
+
APPLICATION_COMMAND = 2,
|
|
2542
|
+
MESSAGE_COMPONENT = 3,
|
|
2543
|
+
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
|
|
2544
|
+
MODAL_SUBMIT = 5
|
|
2545
|
+
}
|
|
2546
|
+
export type InvalidSessionEvent = boolean;
|
|
2547
|
+
export interface Invite {
|
|
2548
|
+
/** the invite code (unique ID) */
|
|
2549
|
+
code: string;
|
|
2550
|
+
/** the guild this invite is for */
|
|
2551
|
+
guild?: Guild;
|
|
2552
|
+
/** the channel this invite is for */
|
|
2553
|
+
channel?: Channel | null;
|
|
2554
|
+
/** the user who created the invite */
|
|
2555
|
+
inviter?: User;
|
|
2556
|
+
/** the type of target for this voice channel invite */
|
|
2557
|
+
target_type?: InviteTargetType;
|
|
2558
|
+
/** the user whose stream to display for this voice channel stream invite */
|
|
2559
|
+
target_user?: User;
|
|
2560
|
+
/** the embedded application to open for this voice channel embedded application invite */
|
|
2561
|
+
target_application?: Application;
|
|
2562
|
+
/** approximate count of online members, returned from the GET /invites/<code> endpoint when with_counts is true */
|
|
2563
|
+
approximate_presence_count?: number;
|
|
2564
|
+
/** approximate count of total members, returned from the GET /invites/<code> endpoint when with_counts is true */
|
|
2565
|
+
approximate_member_count?: number;
|
|
2566
|
+
/** the expiration date of this invite, returned from the GET /invites/<code> endpoint when with_expiration is true */
|
|
2567
|
+
expires_at?: string | null;
|
|
2568
|
+
/** stage instance data if there is a public Stage instance in the Stage channel this invite is for (deprecated) */
|
|
2569
|
+
stage_instance?: InviteStageInstance;
|
|
2570
|
+
/** guild scheduled event data, only included if guild_scheduled_event_id contains a valid guild scheduled event id */
|
|
2571
|
+
guild_scheduled_event?: GuildScheduledEvent;
|
|
2572
|
+
}
|
|
2573
|
+
export interface InviteCreateEvent {
|
|
2574
|
+
/** Channel the invite is for */
|
|
2575
|
+
channel_id: Snowflake;
|
|
2576
|
+
/** Unique invite code */
|
|
2577
|
+
code: string;
|
|
2578
|
+
/** Time at which the invite was created */
|
|
2579
|
+
created_at: string;
|
|
2580
|
+
/** Guild of the invite */
|
|
2581
|
+
guild_id?: Snowflake;
|
|
2582
|
+
/** User that created the invite */
|
|
2583
|
+
inviter?: User;
|
|
2584
|
+
/** How long the invite is valid for (in seconds) */
|
|
2585
|
+
max_age: number;
|
|
2586
|
+
/** Maximum number of times the invite can be used */
|
|
2587
|
+
max_uses: number;
|
|
2588
|
+
/** Type of target for this voice channel invite */
|
|
2589
|
+
target_type?: InviteTargetType;
|
|
2590
|
+
/** User whose stream to display for this voice channel stream invite */
|
|
2591
|
+
target_user?: User;
|
|
2592
|
+
/** Embedded application to open for this voice channel embedded application invite */
|
|
2593
|
+
target_application?: Application;
|
|
2594
|
+
/** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
|
|
2595
|
+
temporary: boolean;
|
|
2596
|
+
/** How many times the invite has been used (always will be 0) */
|
|
2597
|
+
uses: number;
|
|
2598
|
+
}
|
|
2599
|
+
export interface InviteDeleteEvent {
|
|
2600
|
+
/** Channel of the invite */
|
|
2601
|
+
channel_id: Snowflake;
|
|
2602
|
+
/** Guild of the invite */
|
|
2603
|
+
guild_id?: Snowflake;
|
|
2604
|
+
/** Unique invite code */
|
|
2605
|
+
code: string;
|
|
2606
|
+
}
|
|
2607
|
+
export interface InviteMetadatum {
|
|
2608
|
+
/** number of times this invite has been used */
|
|
2609
|
+
uses: number;
|
|
2610
|
+
/** max number of times this invite can be used */
|
|
2611
|
+
max_uses: number;
|
|
2612
|
+
/** duration (in seconds) after which the invite expires */
|
|
2613
|
+
max_age: number;
|
|
2614
|
+
/** whether this invite only grants temporary membership */
|
|
2615
|
+
temporary: boolean;
|
|
2616
|
+
/** when this invite was created */
|
|
2617
|
+
created_at: string;
|
|
2618
|
+
}
|
|
2619
|
+
export interface InviteStageInstance {
|
|
2620
|
+
/** the members speaking in the Stage */
|
|
2621
|
+
members: GuildMember[];
|
|
2622
|
+
/** the number of users in the Stage */
|
|
2623
|
+
participant_count: number;
|
|
2624
|
+
/** the number of users speaking in the Stage */
|
|
2625
|
+
speaker_count: number;
|
|
2626
|
+
/** the topic of the Stage instance (1-120 characters) */
|
|
2627
|
+
topic: string;
|
|
2628
|
+
}
|
|
2629
|
+
export declare enum InviteTargetType {
|
|
2630
|
+
STREAM = 1,
|
|
2631
|
+
EMBEDDED_APPLICATION = 2
|
|
2632
|
+
}
|
|
2633
|
+
export declare enum KeywordPresetType {
|
|
2634
|
+
/** Words that may be considered forms of swearing or cursing */
|
|
2635
|
+
PROFANITY = 1,
|
|
2636
|
+
/** Words that refer to sexually explicit behavior or activity */
|
|
2637
|
+
SEXUAL_CONTENT = 2,
|
|
2638
|
+
/** Personal insults or words that may be considered hate speech */
|
|
2639
|
+
SLURS = 3
|
|
2640
|
+
}
|
|
2641
|
+
export interface ListActiveGuildThreadResponse {
|
|
2642
|
+
/** the active threads */
|
|
2643
|
+
threads: Channel[];
|
|
2644
|
+
/** a thread member object for each returned thread the current user has joined */
|
|
2645
|
+
members: ThreadMember[];
|
|
2646
|
+
}
|
|
2647
|
+
export interface ListGuildMemberParams {
|
|
2648
|
+
/** max number of members to return (1-1000) */
|
|
2649
|
+
limit: number;
|
|
2650
|
+
/** the highest user id in the previous page */
|
|
2651
|
+
after: Snowflake;
|
|
2652
|
+
}
|
|
2653
|
+
export interface ListJoinedPrivateArchivedThreadParams {
|
|
2654
|
+
/** returns threads before this id */
|
|
2655
|
+
before?: Snowflake;
|
|
2656
|
+
/** optional maximum number of threads to return */
|
|
2657
|
+
limit?: number;
|
|
2658
|
+
}
|
|
2659
|
+
export interface ListJoinedPrivateArchivedThreadResponse {
|
|
2660
|
+
/** the private, archived threads the current user has joined */
|
|
2661
|
+
threads: Channel[];
|
|
2662
|
+
/** a thread member object for each returned thread the current user has joined */
|
|
2663
|
+
members: ThreadMember[];
|
|
2664
|
+
/** whether there are potentially additional threads that could be returned on a subsequent call */
|
|
2665
|
+
has_more: boolean;
|
|
2666
|
+
}
|
|
2667
|
+
export interface ListPrivateArchivedThreadParams {
|
|
2668
|
+
/** returns threads before this timestamp */
|
|
2669
|
+
before?: string;
|
|
2670
|
+
/** optional maximum number of threads to return */
|
|
2671
|
+
limit?: number;
|
|
2672
|
+
}
|
|
2673
|
+
export interface ListPrivateArchivedThreadResponse {
|
|
2674
|
+
/** the private, archived threads */
|
|
2675
|
+
threads: Channel[];
|
|
2676
|
+
/** a thread member object for each returned thread the current user has joined */
|
|
2677
|
+
members: ThreadMember[];
|
|
2678
|
+
/** whether there are potentially additional threads that could be returned on a subsequent call */
|
|
2679
|
+
has_more: boolean;
|
|
2680
|
+
}
|
|
2681
|
+
export interface ListPublicArchivedThreadParams {
|
|
2682
|
+
/** returns threads before this timestamp */
|
|
2683
|
+
before?: string;
|
|
2684
|
+
/** optional maximum number of threads to return */
|
|
2685
|
+
limit?: number;
|
|
2686
|
+
}
|
|
2687
|
+
export interface ListPublicArchivedThreadResponse {
|
|
2688
|
+
/** the public, archived threads */
|
|
2689
|
+
threads: Channel[];
|
|
2690
|
+
/** a thread member object for each returned thread the current user has joined */
|
|
2691
|
+
members: ThreadMember[];
|
|
2692
|
+
/** whether there are potentially additional threads that could be returned on a subsequent call */
|
|
2693
|
+
has_more: boolean;
|
|
2694
|
+
}
|
|
2695
|
+
export interface ListScheduledEventsForGuildParams {
|
|
2696
|
+
/** include number of users subscribed to each event */
|
|
2697
|
+
with_user_count?: boolean;
|
|
2698
|
+
}
|
|
2699
|
+
export interface Locale {
|
|
2700
|
+
/** Danish */
|
|
2701
|
+
da?: string;
|
|
2702
|
+
/** German */
|
|
2703
|
+
de?: string;
|
|
2704
|
+
/** English, */
|
|
2705
|
+
"en-GB"?: string;
|
|
2706
|
+
/** English, */
|
|
2707
|
+
"en-US"?: string;
|
|
2708
|
+
/** Spanish */
|
|
2709
|
+
"es-ES"?: string;
|
|
2710
|
+
/** French */
|
|
2711
|
+
fr?: string;
|
|
2712
|
+
/** Croatian */
|
|
2713
|
+
hr?: string;
|
|
2714
|
+
/** Italian */
|
|
2715
|
+
it?: string;
|
|
2716
|
+
/** Lithuanian */
|
|
2717
|
+
lt?: string;
|
|
2718
|
+
/** Hungarian */
|
|
2719
|
+
hu?: string;
|
|
2720
|
+
/** Dutch */
|
|
2721
|
+
nl?: string;
|
|
2722
|
+
/** Norwegian */
|
|
2723
|
+
no?: string;
|
|
2724
|
+
/** Polish */
|
|
2725
|
+
pl?: string;
|
|
2726
|
+
/** Portuguese, Brazilian */
|
|
2727
|
+
"pt-BR"?: string;
|
|
2728
|
+
/** Romanian, Romania */
|
|
2729
|
+
ro?: string;
|
|
2730
|
+
/** Finnish */
|
|
2731
|
+
fi?: string;
|
|
2732
|
+
/** Swedish */
|
|
2733
|
+
"sv-SE"?: string;
|
|
2734
|
+
/** Vietnamese */
|
|
2735
|
+
vi?: string;
|
|
2736
|
+
/** Turkish */
|
|
2737
|
+
tr?: string;
|
|
2738
|
+
/** Czech */
|
|
2739
|
+
cs?: string;
|
|
2740
|
+
/** Greek */
|
|
2741
|
+
el?: string;
|
|
2742
|
+
/** Bulgarian */
|
|
2743
|
+
bg?: string;
|
|
2744
|
+
/** Russian */
|
|
2745
|
+
ru?: string;
|
|
2746
|
+
/** Ukrainian */
|
|
2747
|
+
uk?: string;
|
|
2748
|
+
/** Hindi */
|
|
2749
|
+
hi?: string;
|
|
2750
|
+
/** Thai */
|
|
2751
|
+
th?: string;
|
|
2752
|
+
/** Chinese, China */
|
|
2753
|
+
"zh-CN"?: string;
|
|
2754
|
+
/** Japanese */
|
|
2755
|
+
ja?: string;
|
|
2756
|
+
/** Chinese, Taiwan */
|
|
2757
|
+
"zh-TW"?: string;
|
|
2758
|
+
/** Korean */
|
|
2759
|
+
ko?: string;
|
|
2760
|
+
}
|
|
2761
|
+
export declare enum MembershipState {
|
|
2762
|
+
INVITED = 1,
|
|
2763
|
+
ACCEPTED = 2
|
|
2764
|
+
}
|
|
2765
|
+
export interface Message {
|
|
2766
|
+
/** id of the message */
|
|
2767
|
+
id: Snowflake;
|
|
2768
|
+
/** id of the channel the message was sent in */
|
|
2769
|
+
channel_id: Snowflake;
|
|
2770
|
+
/** the author of this message (not guaranteed to be a valid user, see below) */
|
|
2771
|
+
author: User;
|
|
2772
|
+
/** contents of the message */
|
|
2773
|
+
content: string;
|
|
2774
|
+
/** when this message was sent */
|
|
2775
|
+
timestamp: string;
|
|
2776
|
+
/** when this message was edited (or null if never) */
|
|
2777
|
+
edited_timestamp?: string | null;
|
|
2778
|
+
/** whether this was a TTS message */
|
|
2779
|
+
tts: boolean;
|
|
2780
|
+
/** whether this message mentions everyone */
|
|
2781
|
+
mention_everyone: boolean;
|
|
2782
|
+
/** users specifically mentioned in the message */
|
|
2783
|
+
mentions: User[];
|
|
2784
|
+
/** roles specifically mentioned in this message */
|
|
2785
|
+
mention_roles: Snowflake[];
|
|
2786
|
+
/** channels specifically mentioned in this message */
|
|
2787
|
+
mention_channels?: ChannelMention[];
|
|
2788
|
+
/** any attached files */
|
|
2789
|
+
attachments: Attachment[];
|
|
2790
|
+
/** any embedded content */
|
|
2791
|
+
embeds: Embed[];
|
|
2792
|
+
/** reactions to the message */
|
|
2793
|
+
reactions?: Reaction[];
|
|
2794
|
+
/** used for validating a message was sent */
|
|
2795
|
+
nonce?: string;
|
|
2796
|
+
/** whether this message is pinned */
|
|
2797
|
+
pinned: boolean;
|
|
2798
|
+
/** if the message is generated by a webhook, this is the webhook's id */
|
|
2799
|
+
webhook_id?: Snowflake;
|
|
2800
|
+
/** type of message */
|
|
2801
|
+
type: MessageType;
|
|
2802
|
+
/** sent with Rich Presence-related chat embeds */
|
|
2803
|
+
activity?: MessageActivity;
|
|
2804
|
+
/** sent with Rich Presence-related chat embeds */
|
|
2805
|
+
application?: Application;
|
|
2806
|
+
/** if the message is an Interaction or application-owned webhook, this is the id of the application */
|
|
2807
|
+
application_id?: Snowflake;
|
|
2808
|
+
/** data showing the source of a crosspost, channel follow add, pin, or reply message */
|
|
2809
|
+
message_reference?: MessageReference;
|
|
2810
|
+
/** message flags combined as a bitfield */
|
|
2811
|
+
flags?: number;
|
|
2812
|
+
/** the message associated with the message_reference */
|
|
2813
|
+
referenced_message?: Message | null;
|
|
2814
|
+
/** sent if the message is a response to an Interaction */
|
|
2815
|
+
interaction?: MessageInteraction;
|
|
2816
|
+
/** the thread that was started from this message, includes thread member object */
|
|
2817
|
+
thread?: Channel;
|
|
2818
|
+
/** sent if the message contains components like buttons, action rows, or other interactive components */
|
|
2819
|
+
components?: Component[];
|
|
2820
|
+
/** sent if the message contains stickers */
|
|
2821
|
+
sticker_items?: StickerItem[];
|
|
2822
|
+
/** Deprecated the stickers sent with the message */
|
|
2823
|
+
stickers?: Sticker[];
|
|
2824
|
+
/** A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with total_message_sent on parent thread */
|
|
2825
|
+
position?: number;
|
|
2826
|
+
}
|
|
2827
|
+
export interface MessageActivity {
|
|
2828
|
+
/** type of message activity */
|
|
2829
|
+
type: MessageActivityType;
|
|
2830
|
+
/** party_id from a Rich Presence event */
|
|
2831
|
+
party_id?: string;
|
|
2832
|
+
}
|
|
2833
|
+
export declare enum MessageActivityType {
|
|
2834
|
+
JOIN = 1,
|
|
2835
|
+
SPECTATE = 2,
|
|
2836
|
+
LISTEN = 3,
|
|
2837
|
+
JOIN_REQUEST = 5
|
|
2838
|
+
}
|
|
2839
|
+
export interface MessageComponentDatum {
|
|
2840
|
+
/** the custom_id of the component */
|
|
2841
|
+
custom_id: string;
|
|
2842
|
+
/** the type of the component */
|
|
2843
|
+
component_type: ComponentType;
|
|
2844
|
+
/** values the user selected in a select menu component */
|
|
2845
|
+
values?: SelectOption[];
|
|
2846
|
+
}
|
|
2847
|
+
export type MessageCreateEvent = Message & MessageCreateExtra;
|
|
2848
|
+
export interface MessageCreateExtra {
|
|
2849
|
+
/** ID of the guild the message was sent in - unless it is an ephemeral message */
|
|
2850
|
+
guild_id?: Snowflake;
|
|
2851
|
+
/** Member properties for this message's author. Missing for ephemeral messages and messages from webhooks */
|
|
2852
|
+
member?: GuildMember;
|
|
2853
|
+
/** Users specifically mentioned in the message */
|
|
2854
|
+
mentions: User[];
|
|
2855
|
+
}
|
|
2856
|
+
export interface MessageDeleteBulkEvent {
|
|
2857
|
+
/** IDs of the messages */
|
|
2858
|
+
ids: Snowflake[];
|
|
2859
|
+
/** ID of the channel */
|
|
2860
|
+
channel_id: Snowflake;
|
|
2861
|
+
/** ID of the guild */
|
|
2862
|
+
guild_id?: Snowflake;
|
|
2863
|
+
}
|
|
2864
|
+
export interface MessageDeleteEvent {
|
|
2865
|
+
/** ID of the message */
|
|
2866
|
+
id: Snowflake;
|
|
2867
|
+
/** ID of the channel */
|
|
2868
|
+
channel_id: Snowflake;
|
|
2869
|
+
/** ID of the guild */
|
|
2870
|
+
guild_id?: Snowflake;
|
|
2871
|
+
}
|
|
2872
|
+
export declare const MessageFlag: {
|
|
2873
|
+
/** this message has been published to subscribed channels (via Channel Following) */
|
|
2874
|
+
readonly CROSSPOSTED: number;
|
|
2875
|
+
/** this message originated from a message in another channel (via Channel Following) */
|
|
2876
|
+
readonly IS_CROSSPOST: number;
|
|
2877
|
+
/** do not include any embeds when serializing this message */
|
|
2878
|
+
readonly SUPPRESS_EMBEDS: number;
|
|
2879
|
+
/** the source message for this crosspost has been deleted (via Channel Following) */
|
|
2880
|
+
readonly SOURCE_MESSAGE_DELETED: number;
|
|
2881
|
+
/** this message came from the urgent message system */
|
|
2882
|
+
readonly URGENT: number;
|
|
2883
|
+
/** this message has an associated thread, with the same id as the message */
|
|
2884
|
+
readonly HAS_THREAD: number;
|
|
2885
|
+
/** this message is only visible to the user who invoked the Interaction */
|
|
2886
|
+
readonly EPHEMERAL: number;
|
|
2887
|
+
/** this message is an Interaction Response and the bot is "thinking" */
|
|
2888
|
+
readonly LOADING: number;
|
|
2889
|
+
/** this message failed to mention some roles and add their members to the thread */
|
|
2890
|
+
readonly FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: number;
|
|
2891
|
+
};
|
|
2892
|
+
export interface MessageInteraction {
|
|
2893
|
+
/** ID of the interaction */
|
|
2894
|
+
id: Snowflake;
|
|
2895
|
+
/** Type of interaction */
|
|
2896
|
+
type: InteractionType;
|
|
2897
|
+
/** Name of the application command, including subcommands and subcommand groups */
|
|
2898
|
+
name: string;
|
|
2899
|
+
/** User who invoked the interaction */
|
|
2900
|
+
user: User;
|
|
2901
|
+
/** Member who invoked the interaction in the guild */
|
|
2902
|
+
member?: GuildMember;
|
|
2903
|
+
}
|
|
2904
|
+
export interface MessageReactionAddEvent {
|
|
2905
|
+
/** ID of the user */
|
|
2906
|
+
user_id: Snowflake;
|
|
2907
|
+
/** ID of the channel */
|
|
2908
|
+
channel_id: Snowflake;
|
|
2909
|
+
/** ID of the message */
|
|
2910
|
+
message_id: Snowflake;
|
|
2911
|
+
/** ID of the guild */
|
|
2912
|
+
guild_id?: Snowflake;
|
|
2913
|
+
/** Member who reacted if this happened in a guild */
|
|
2914
|
+
member?: GuildMember;
|
|
2915
|
+
/** Emoji used to react - example */
|
|
2916
|
+
emoji: Emoji;
|
|
2917
|
+
}
|
|
2918
|
+
export interface MessageReactionRemoveAllEvent {
|
|
2919
|
+
/** ID of the channel */
|
|
2920
|
+
channel_id: Snowflake;
|
|
2921
|
+
/** ID of the message */
|
|
2922
|
+
message_id: Snowflake;
|
|
2923
|
+
/** ID of the guild */
|
|
2924
|
+
guild_id?: Snowflake;
|
|
2925
|
+
}
|
|
2926
|
+
export interface MessageReactionRemoveEmojiEvent {
|
|
2927
|
+
/** ID of the channel */
|
|
2928
|
+
channel_id: Snowflake;
|
|
2929
|
+
/** ID of the guild */
|
|
2930
|
+
guild_id?: Snowflake;
|
|
2931
|
+
/** ID of the message */
|
|
2932
|
+
message_id: Snowflake;
|
|
2933
|
+
/** Emoji that was removed */
|
|
2934
|
+
emoji: Emoji;
|
|
2935
|
+
}
|
|
2936
|
+
export interface MessageReactionRemoveEvent {
|
|
2937
|
+
/** ID of the user */
|
|
2938
|
+
user_id: Snowflake;
|
|
2939
|
+
/** ID of the channel */
|
|
2940
|
+
channel_id: Snowflake;
|
|
2941
|
+
/** ID of the message */
|
|
2942
|
+
message_id: Snowflake;
|
|
2943
|
+
/** ID of the guild */
|
|
2944
|
+
guild_id?: Snowflake;
|
|
2945
|
+
/** Emoji used to react - example */
|
|
2946
|
+
emoji: Emoji;
|
|
2947
|
+
}
|
|
2948
|
+
export interface MessageReference {
|
|
2949
|
+
/** id of the originating message */
|
|
2950
|
+
message_id?: Snowflake;
|
|
2951
|
+
/** id of the originating message's channel */
|
|
2952
|
+
channel_id?: Snowflake;
|
|
2953
|
+
/** id of the originating message's guild */
|
|
2954
|
+
guild_id?: Snowflake;
|
|
2955
|
+
/** when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
|
|
2956
|
+
fail_if_not_exists?: boolean;
|
|
2957
|
+
}
|
|
2958
|
+
export declare enum MessageType {
|
|
2959
|
+
DEFAULT = 0,
|
|
2960
|
+
RECIPIENT_ADD = 1,
|
|
2961
|
+
RECIPIENT_REMOVE = 2,
|
|
2962
|
+
CALL = 3,
|
|
2963
|
+
CHANNEL_NAME_CHANGE = 4,
|
|
2964
|
+
CHANNEL_ICON_CHANGE = 5,
|
|
2965
|
+
CHANNEL_PINNED_MESSAGE = 6,
|
|
2966
|
+
USER_JOIN = 7,
|
|
2967
|
+
GUILD_BOOST = 8,
|
|
2968
|
+
GUILD_BOOST_TIER_1 = 9,
|
|
2969
|
+
GUILD_BOOST_TIER_2 = 10,
|
|
2970
|
+
GUILD_BOOST_TIER_3 = 11,
|
|
2971
|
+
CHANNEL_FOLLOW_ADD = 12,
|
|
2972
|
+
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
|
2973
|
+
GUILD_DISCOVERY_REQUALIFIED = 15,
|
|
2974
|
+
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
|
|
2975
|
+
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17,
|
|
2976
|
+
THREAD_CREATED = 18,
|
|
2977
|
+
REPLY = 19,
|
|
2978
|
+
CHAT_INPUT_COMMAND = 20,
|
|
2979
|
+
THREAD_STARTER_MESSAGE = 21,
|
|
2980
|
+
GUILD_INVITE_REMINDER = 22,
|
|
2981
|
+
CONTEXT_MENU_COMMAND = 23,
|
|
2982
|
+
AUTO_MODERATION_ACTION = 24
|
|
2983
|
+
}
|
|
2984
|
+
export type MessageUpdateEvent = MessageCreateEvent;
|
|
2985
|
+
export declare enum MfaLevel {
|
|
2986
|
+
/** guild has no MFA/2FA requirement for moderation actions */
|
|
2987
|
+
NONE = 0,
|
|
2988
|
+
/** guild has a 2FA requirement for moderation actions */
|
|
2989
|
+
ELEVATED = 1
|
|
2990
|
+
}
|
|
2991
|
+
export interface ModalSubmitDatum {
|
|
2992
|
+
/** the custom_id of the modal */
|
|
2993
|
+
custom_id: string;
|
|
2994
|
+
/** the values submitted by the user */
|
|
2995
|
+
components: Component[];
|
|
2996
|
+
}
|
|
2997
|
+
export interface ModifyAutoModerationRuleParams {
|
|
2998
|
+
/** the rule name */
|
|
2999
|
+
name: string;
|
|
3000
|
+
/** the event type */
|
|
3001
|
+
event_type: EventType;
|
|
3002
|
+
/** the trigger metadata */
|
|
3003
|
+
trigger_metadata?: TriggerMetadatum;
|
|
3004
|
+
/** the actions which will execute when the rule is triggered */
|
|
3005
|
+
actions: AutoModerationAction[];
|
|
3006
|
+
/** whether the rule is enabled */
|
|
3007
|
+
enabled: boolean;
|
|
3008
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
3009
|
+
exempt_roles: Snowflake[];
|
|
3010
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
3011
|
+
exempt_channels: Snowflake[];
|
|
3012
|
+
}
|
|
3013
|
+
export interface ModifyChannelGroupDmParams {
|
|
3014
|
+
/** 1-100 character channel name */
|
|
3015
|
+
name: string;
|
|
3016
|
+
/** base64 encoded icon */
|
|
3017
|
+
icon: string;
|
|
3018
|
+
}
|
|
3019
|
+
export interface ModifyChannelGuildChannelParams {
|
|
3020
|
+
/** 1-100 character channel name */
|
|
3021
|
+
name: string;
|
|
3022
|
+
/** the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature */
|
|
3023
|
+
type: ChannelType;
|
|
3024
|
+
/** the position of the channel in the left-hand listing */
|
|
3025
|
+
position?: number | null;
|
|
3026
|
+
/** 0-1024 character channel topic (0-4096 characters for GUILD_FORUM channels) */
|
|
3027
|
+
topic?: string | null;
|
|
3028
|
+
/** whether the channel is nsfw */
|
|
3029
|
+
nsfw?: boolean | null;
|
|
3030
|
+
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
3031
|
+
rate_limit_per_user?: number | null;
|
|
3032
|
+
/** the bitrate (in bits) of the voice or stage channel; min 8000 */
|
|
3033
|
+
bitrate?: number | null;
|
|
3034
|
+
/** the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
|
|
3035
|
+
user_limit?: number | null;
|
|
3036
|
+
/** channel or category-specific permissions */
|
|
3037
|
+
permission_overwrites?: Overwrite[] | null;
|
|
3038
|
+
/** id of the new parent category for a channel */
|
|
3039
|
+
parent_id?: Snowflake | null;
|
|
3040
|
+
/** channel voice region id, automatic when set to null */
|
|
3041
|
+
rtc_region?: string | null;
|
|
3042
|
+
/** the camera video quality mode of the voice channel */
|
|
3043
|
+
video_quality_mode?: VideoQualityMode | null;
|
|
3044
|
+
/** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
|
|
3045
|
+
default_auto_archive_duration?: number | null;
|
|
3046
|
+
/** channel flags combined as a bitfield. Currently only REQUIRE_TAG (1 << 4) is supported. */
|
|
3047
|
+
flags?: number;
|
|
3048
|
+
/** the set of tags that can be used in a GUILD_FORUM channel; limited to 20 */
|
|
3049
|
+
available_tags?: ForumTag[];
|
|
3050
|
+
/** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
3051
|
+
default_reaction_emoji?: DefaultReaction | null;
|
|
3052
|
+
/** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
|
|
3053
|
+
default_thread_rate_limit_per_user?: number;
|
|
3054
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels */
|
|
3055
|
+
default_sort_order?: SortOrderType | null;
|
|
3056
|
+
}
|
|
3057
|
+
export type ModifyChannelParams = ModifyChannelGroupDmParams | ModifyChannelGuildChannelParams | ModifyChannelThreadParams;
|
|
3058
|
+
export interface ModifyChannelThreadParams {
|
|
3059
|
+
/** 1-100 character channel name */
|
|
3060
|
+
name: string;
|
|
3061
|
+
/** whether the thread is archived */
|
|
3062
|
+
archived: boolean;
|
|
3063
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
3064
|
+
auto_archive_duration: number;
|
|
3065
|
+
/** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
|
|
3066
|
+
locked: boolean;
|
|
3067
|
+
/** whether non-moderators can add other non-moderators to a thread; only available on private threads */
|
|
3068
|
+
invitable: boolean;
|
|
3069
|
+
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected */
|
|
3070
|
+
rate_limit_per_user?: number | null;
|
|
3071
|
+
/** channel flags combined as a bitfield; PINNED can only be set for threads in forum channels */
|
|
3072
|
+
flags?: number;
|
|
3073
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel; limited to 5 */
|
|
3074
|
+
applied_tags?: Snowflake[];
|
|
3075
|
+
}
|
|
3076
|
+
export interface ModifyCurrentMemberParams {
|
|
3077
|
+
/** value to set user's nickname to */
|
|
3078
|
+
nick?: string | null;
|
|
3079
|
+
}
|
|
3080
|
+
export interface ModifyCurrentUserNickParams {
|
|
3081
|
+
/** value to set user's nickname to */
|
|
3082
|
+
nick?: string | null;
|
|
3083
|
+
}
|
|
3084
|
+
export interface ModifyCurrentUserParams {
|
|
3085
|
+
/** user's username, if changed may cause the user's discriminator to be randomized. */
|
|
3086
|
+
username: string;
|
|
3087
|
+
/** if passed, modifies the user's avatar */
|
|
3088
|
+
avatar?: string | null;
|
|
3089
|
+
}
|
|
3090
|
+
export interface ModifyCurrentUserVoiceStateParams {
|
|
3091
|
+
/** the id of the channel the user is currently in */
|
|
3092
|
+
channel_id?: Snowflake;
|
|
3093
|
+
/** toggles the user's suppress state */
|
|
3094
|
+
suppress?: boolean;
|
|
3095
|
+
/** sets the user's request to speak */
|
|
3096
|
+
request_to_speak_timestamp?: string | null;
|
|
3097
|
+
}
|
|
3098
|
+
export interface ModifyGuildChannelPositionParams {
|
|
3099
|
+
/** channel id */
|
|
3100
|
+
id: Snowflake;
|
|
3101
|
+
/** sorting position of the channel */
|
|
3102
|
+
position?: number | null;
|
|
3103
|
+
/** syncs the permission overwrites with the new parent, if moving to a new category */
|
|
3104
|
+
lock_permissions?: boolean | null;
|
|
3105
|
+
/** the new parent ID for the channel that is moved */
|
|
3106
|
+
parent_id?: Snowflake | null;
|
|
3107
|
+
}
|
|
3108
|
+
export interface ModifyGuildEmojiParams {
|
|
3109
|
+
/** name of the emoji */
|
|
3110
|
+
name: string;
|
|
3111
|
+
/** roles allowed to use this emoji */
|
|
3112
|
+
roles?: Snowflake[] | null;
|
|
3113
|
+
}
|
|
3114
|
+
export interface ModifyGuildMemberParams {
|
|
3115
|
+
/** value to set user's nickname to */
|
|
3116
|
+
nick: string;
|
|
3117
|
+
/** array of role ids the member is assigned */
|
|
3118
|
+
roles: Snowflake[];
|
|
3119
|
+
/** whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel */
|
|
3120
|
+
mute: boolean;
|
|
3121
|
+
/** whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel */
|
|
3122
|
+
deaf: boolean;
|
|
3123
|
+
/** id of channel to move user to (if they are connected to voice) */
|
|
3124
|
+
channel_id: Snowflake;
|
|
3125
|
+
/** when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild */
|
|
3126
|
+
communication_disabled_until: string;
|
|
3127
|
+
}
|
|
3128
|
+
export interface ModifyGuildMfaLevelParams {
|
|
3129
|
+
/** MFA level */
|
|
3130
|
+
level: MfaLevel;
|
|
3131
|
+
}
|
|
3132
|
+
export interface ModifyGuildParams {
|
|
3133
|
+
/** guild name */
|
|
3134
|
+
name: string;
|
|
3135
|
+
/** guild voice region id (deprecated) */
|
|
3136
|
+
region?: string | null;
|
|
3137
|
+
/** verification level */
|
|
3138
|
+
verification_level?: VerificationLevel | null;
|
|
3139
|
+
/** default message notification level */
|
|
3140
|
+
default_message_notifications?: DefaultMessageNotificationLevel | null;
|
|
3141
|
+
/** explicit content filter level */
|
|
3142
|
+
explicit_content_filter?: ExplicitContentFilterLevel | null;
|
|
3143
|
+
/** id for afk channel */
|
|
3144
|
+
afk_channel_id?: Snowflake | null;
|
|
3145
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
3146
|
+
afk_timeout: number;
|
|
3147
|
+
/** base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature) */
|
|
3148
|
+
icon?: string | null;
|
|
3149
|
+
/** user id to transfer guild ownership to (must be owner) */
|
|
3150
|
+
owner_id: Snowflake;
|
|
3151
|
+
/** base64 16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature) */
|
|
3152
|
+
splash?: string | null;
|
|
3153
|
+
/** base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature) */
|
|
3154
|
+
discovery_splash?: string | null;
|
|
3155
|
+
/** base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated gif when the server has the ANIMATED_BANNER feature) */
|
|
3156
|
+
banner?: string | null;
|
|
3157
|
+
/** the id of the channel where guild notices such as welcome messages and boost events are posted */
|
|
3158
|
+
system_channel_id?: Snowflake | null;
|
|
3159
|
+
/** system channel flags */
|
|
3160
|
+
system_channel_flags: number;
|
|
3161
|
+
/** the id of the channel where Community guilds display rules and/or guidelines */
|
|
3162
|
+
rules_channel_id?: Snowflake | null;
|
|
3163
|
+
/** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
|
|
3164
|
+
public_updates_channel_id?: Snowflake | null;
|
|
3165
|
+
/** the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" */
|
|
3166
|
+
preferred_locale?: string | null;
|
|
3167
|
+
/** enabled guild features */
|
|
3168
|
+
features: GuildFeature[];
|
|
3169
|
+
/** the description for the guild */
|
|
3170
|
+
description?: string | null;
|
|
3171
|
+
/** whether the guild's boost progress bar should be enabled */
|
|
3172
|
+
premium_progress_bar_enabled: boolean;
|
|
3173
|
+
}
|
|
3174
|
+
export interface ModifyGuildRoleParams {
|
|
3175
|
+
/** name of the role, max 100 characters */
|
|
3176
|
+
name: string;
|
|
3177
|
+
/** bitwise value of the enabled/disabled permissions */
|
|
3178
|
+
permissions: string;
|
|
3179
|
+
/** RGB color value */
|
|
3180
|
+
color: number;
|
|
3181
|
+
/** whether the role should be displayed separately in the sidebar */
|
|
3182
|
+
hoist: boolean;
|
|
3183
|
+
/** the role's icon image (if the guild has the ROLE_ICONS feature) */
|
|
3184
|
+
icon: string;
|
|
3185
|
+
/** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
|
|
3186
|
+
unicode_emoji: string;
|
|
3187
|
+
/** whether the role should be mentionable */
|
|
3188
|
+
mentionable: boolean;
|
|
3189
|
+
}
|
|
3190
|
+
export interface ModifyGuildRolePositionParams {
|
|
3191
|
+
/** role */
|
|
3192
|
+
id: Snowflake;
|
|
3193
|
+
/** sorting position of the role */
|
|
3194
|
+
position?: number | null;
|
|
3195
|
+
}
|
|
3196
|
+
export interface ModifyGuildScheduledEventParams {
|
|
3197
|
+
/** the channel id of the scheduled event, set to null if changing entity type to EXTERNAL */
|
|
3198
|
+
channel_id?: Snowflake | null;
|
|
3199
|
+
/** the entity metadata of the scheduled event */
|
|
3200
|
+
entity_metadata?: GuildScheduledEventEntityMetadatum | null;
|
|
3201
|
+
/** the name of the scheduled event */
|
|
3202
|
+
name?: string;
|
|
3203
|
+
/** the privacy level of the scheduled event */
|
|
3204
|
+
privacy_level?: GuildScheduledEventPrivacyLevel;
|
|
3205
|
+
/** the time to schedule the scheduled event */
|
|
3206
|
+
scheduled_start_time?: string;
|
|
3207
|
+
/** the time when the scheduled event is scheduled to end */
|
|
3208
|
+
scheduled_end_time?: string;
|
|
3209
|
+
/** the description of the scheduled event */
|
|
3210
|
+
description?: string | null;
|
|
3211
|
+
/** the entity type of the scheduled event */
|
|
3212
|
+
entity_type?: GuildScheduledEventEntityType;
|
|
3213
|
+
/** the status of the scheduled event */
|
|
3214
|
+
status?: GuildScheduledEventStatus;
|
|
3215
|
+
/** the cover image of the scheduled event */
|
|
3216
|
+
image?: string;
|
|
3217
|
+
}
|
|
3218
|
+
export interface ModifyGuildStickerParams {
|
|
3219
|
+
/** name of the sticker (2-30 characters) */
|
|
3220
|
+
name: string;
|
|
3221
|
+
/** description of the sticker (2-100 characters) */
|
|
3222
|
+
description?: string | null;
|
|
3223
|
+
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
3224
|
+
tags: string;
|
|
3225
|
+
}
|
|
3226
|
+
export interface ModifyGuildTemplateParams {
|
|
3227
|
+
/** name of the template (1-100 characters) */
|
|
3228
|
+
name?: string;
|
|
3229
|
+
/** description for the template (0-120 characters) */
|
|
3230
|
+
description?: string | null;
|
|
3231
|
+
}
|
|
3232
|
+
export interface ModifyGuildWelcomeScreenParams {
|
|
3233
|
+
/** whether the welcome screen is enabled */
|
|
3234
|
+
enabled: boolean;
|
|
3235
|
+
/** channels linked in the welcome screen and their display options */
|
|
3236
|
+
welcome_channels: WelcomeScreenChannel[];
|
|
3237
|
+
/** the server description to show in the welcome screen */
|
|
3238
|
+
description: string;
|
|
3239
|
+
}
|
|
3240
|
+
export interface ModifyStageInstanceParams {
|
|
3241
|
+
/** The topic of the Stage instance (1-120 characters) */
|
|
3242
|
+
topic?: string;
|
|
3243
|
+
/** The privacy level of the Stage instance */
|
|
3244
|
+
privacy_level?: PrivacyLevel;
|
|
3245
|
+
}
|
|
3246
|
+
export interface ModifyUserVoiceStateParams {
|
|
3247
|
+
/** the id of the channel the user is currently in */
|
|
3248
|
+
channel_id: Snowflake;
|
|
3249
|
+
/** toggles the user's suppress state */
|
|
3250
|
+
suppress?: boolean;
|
|
3251
|
+
}
|
|
3252
|
+
export interface ModifyWebhookParams {
|
|
3253
|
+
/** the default name of the webhook */
|
|
3254
|
+
name: string;
|
|
3255
|
+
/** image for the default webhook avatar */
|
|
3256
|
+
avatar?: string | null;
|
|
3257
|
+
/** the new channel id this webhook should be moved to */
|
|
3258
|
+
channel_id: Snowflake;
|
|
3259
|
+
}
|
|
3260
|
+
export declare enum MutableGuildFeature {
|
|
3261
|
+
COMMUNITY = "COMMUNITY",
|
|
3262
|
+
INVITES_DISABLED = "INVITES_DISABLED",
|
|
3263
|
+
DISCOVERABLE = "DISCOVERABLE"
|
|
3264
|
+
}
|
|
3265
|
+
export declare enum OAuth2Scope {
|
|
3266
|
+
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */
|
|
3267
|
+
ACTIVITIES_READ = "activities.read",
|
|
3268
|
+
/** allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
|
|
3269
|
+
ACTIVITIES_WRITE = "activities.write",
|
|
3270
|
+
/** allows your app to read build data for a user's applications */
|
|
3271
|
+
APPLICATIONS_BUILDS_READ = "applications.builds.read",
|
|
3272
|
+
/** allows your app to upload/update builds for a user's applications - requires Discord approval */
|
|
3273
|
+
APPLICATIONS_BUILDS_UPLOAD = "applications.builds.upload",
|
|
3274
|
+
/** allows your app to use commands in a guild */
|
|
3275
|
+
APPLICATIONS_COMMANDS = "applications.commands",
|
|
3276
|
+
/** allows your app to update its commands using a Bearer token - client credentials grant only */
|
|
3277
|
+
APPLICATIONS_COMMANDS_UPDATE = "applications.commands.update",
|
|
3278
|
+
/** allows your app to update permissions for its commands in a guild a user has permissions to */
|
|
3279
|
+
APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE = "applications.commands.permissions.update",
|
|
3280
|
+
/** allows your app to read entitlements for a user's applications */
|
|
3281
|
+
APPLICATIONS_ENTITLEMENTS = "applications.entitlements",
|
|
3282
|
+
/** allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */
|
|
3283
|
+
APPLICATIONS_STORE_UPDATE = "applications.store.update",
|
|
3284
|
+
/** for oauth2 bots, this puts the bot in the user's selected guild by default */
|
|
3285
|
+
BOT = "bot",
|
|
3286
|
+
/** allows /users/@me/connections to return linked third-party accounts */
|
|
3287
|
+
CONNECTIONS = "connections",
|
|
3288
|
+
/** allows your app to see information about the user's DMs and group DMs - requires Discord approval */
|
|
3289
|
+
DM_CHANNELS_READ = "dm_channels.read",
|
|
3290
|
+
/** enables /users/@me to return an email */
|
|
3291
|
+
EMAIL = "email",
|
|
3292
|
+
/** allows your app to join users to a group dm */
|
|
3293
|
+
GDM_JOIN = "gdm.join",
|
|
3294
|
+
/** allows /users/@me/guilds to return basic information about all of a user's guilds */
|
|
3295
|
+
GUILDS = "guilds",
|
|
3296
|
+
/** allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild */
|
|
3297
|
+
GUILDS_JOIN = "guilds.join",
|
|
3298
|
+
/** allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild */
|
|
3299
|
+
GUILDS_MEMBERS_READ = "guilds.members.read",
|
|
3300
|
+
/** allows /users/@me without email */
|
|
3301
|
+
IDENTIFY = "identify",
|
|
3302
|
+
/** for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) */
|
|
3303
|
+
MESSAGES_READ = "messages.read",
|
|
3304
|
+
/** allows your app to know a user's friends and implicit relationships - requires Discord approval */
|
|
3305
|
+
RELATIONSHIPS_READ = "relationships.read",
|
|
3306
|
+
/** for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */
|
|
3307
|
+
RPC = "rpc",
|
|
3308
|
+
/** for local rpc server access, this allows you to update a user's activity - requires Discord approval */
|
|
3309
|
+
RPC_ACTIVITIES_WRITE = "rpc.activities.write",
|
|
3310
|
+
/** for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval */
|
|
3311
|
+
RPC_NOTIFICATIONS_READ = "rpc.notifications.read",
|
|
3312
|
+
/** for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */
|
|
3313
|
+
RPC_VOICE_READ = "rpc.voice.read",
|
|
3314
|
+
/** for local rpc server access, this allows you to update a user's voice settings - requires Discord approval */
|
|
3315
|
+
RPC_VOICE_WRITE = "rpc.voice.write",
|
|
3316
|
+
/** allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */
|
|
3317
|
+
VOICE = "voice",
|
|
3318
|
+
/** this generates a webhook that is returned in the oauth token response for authorization code grants */
|
|
3319
|
+
WEBHOOK_INCOMING = "webhook.incoming"
|
|
3320
|
+
}
|
|
3321
|
+
export interface Overwrite {
|
|
3322
|
+
/** role or user id */
|
|
3323
|
+
id: Snowflake;
|
|
3324
|
+
/** either 0 (role) or 1 (member) */
|
|
3325
|
+
type: number;
|
|
3326
|
+
/** permission bit set */
|
|
3327
|
+
allow: string;
|
|
3328
|
+
/** permission bit set */
|
|
3329
|
+
deny: string;
|
|
3330
|
+
}
|
|
3331
|
+
export declare const PermissionFlag: {
|
|
3332
|
+
/** Allows creation of instant invites */
|
|
3333
|
+
readonly CREATE_INSTANT_INVITE: bigint;
|
|
3334
|
+
/** Allows kicking members */
|
|
3335
|
+
readonly KICK_MEMBERS: bigint;
|
|
3336
|
+
/** Allows banning members */
|
|
3337
|
+
readonly BAN_MEMBERS: bigint;
|
|
3338
|
+
/** Allows all permissions and bypasses channel permission overwrites */
|
|
3339
|
+
readonly ADMINISTRATOR: bigint;
|
|
3340
|
+
/** Allows management and editing of channels */
|
|
3341
|
+
readonly MANAGE_CHANNELS: bigint;
|
|
3342
|
+
/** Allows management and editing of the guild */
|
|
3343
|
+
readonly MANAGE_GUILD: bigint;
|
|
3344
|
+
/** Allows for the addition of reactions to messages */
|
|
3345
|
+
readonly ADD_REACTIONS: bigint;
|
|
3346
|
+
/** Allows for viewing of audit logs */
|
|
3347
|
+
readonly VIEW_AUDIT_LOG: bigint;
|
|
3348
|
+
/** Allows for using priority speaker in a voice channel */
|
|
3349
|
+
readonly PRIORITY_SPEAKER: bigint;
|
|
3350
|
+
/** Allows the user to go live */
|
|
3351
|
+
readonly STREAM: bigint;
|
|
3352
|
+
/** Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels */
|
|
3353
|
+
readonly VIEW_CHANNEL: bigint;
|
|
3354
|
+
/** Allows for sending messages in a channel and creating threads in a forum (does not allow sending messages in threads) */
|
|
3355
|
+
readonly SEND_MESSAGES: bigint;
|
|
3356
|
+
/** Allows for sending of /tts messages */
|
|
3357
|
+
readonly SEND_TTS_MESSAGES: bigint;
|
|
3358
|
+
/** Allows for deletion of other users messages */
|
|
3359
|
+
readonly MANAGE_MESSAGES: bigint;
|
|
3360
|
+
/** Links sent by users with this permission will be auto-embedded */
|
|
3361
|
+
readonly EMBED_LINKS: bigint;
|
|
3362
|
+
/** Allows for uploading images and files */
|
|
3363
|
+
readonly ATTACH_FILES: bigint;
|
|
3364
|
+
/** Allows for reading of message history */
|
|
3365
|
+
readonly READ_MESSAGE_HISTORY: bigint;
|
|
3366
|
+
/** Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel */
|
|
3367
|
+
readonly MENTION_EVERYONE: bigint;
|
|
3368
|
+
/** Allows the usage of custom emojis from other servers */
|
|
3369
|
+
readonly USE_EXTERNAL_EMOJIS: bigint;
|
|
3370
|
+
/** Allows for viewing guild insights */
|
|
3371
|
+
readonly VIEW_GUILD_INSIGHTS: bigint;
|
|
3372
|
+
/** Allows for joining of a voice channel */
|
|
3373
|
+
readonly CONNECT: bigint;
|
|
3374
|
+
/** Allows for speaking in a voice channel */
|
|
3375
|
+
readonly SPEAK: bigint;
|
|
3376
|
+
/** Allows for muting members in a voice channel */
|
|
3377
|
+
readonly MUTE_MEMBERS: bigint;
|
|
3378
|
+
/** Allows for deafening of members in a voice channel */
|
|
3379
|
+
readonly DEAFEN_MEMBERS: bigint;
|
|
3380
|
+
/** Allows for moving of members between voice channels */
|
|
3381
|
+
readonly MOVE_MEMBERS: bigint;
|
|
3382
|
+
/** Allows for using voice-activity-detection in a voice channel */
|
|
3383
|
+
readonly USE_VAD: bigint;
|
|
3384
|
+
/** Allows for modification of own nickname */
|
|
3385
|
+
readonly CHANGE_NICKNAME: bigint;
|
|
3386
|
+
/** Allows for modification of other users nicknames */
|
|
3387
|
+
readonly MANAGE_NICKNAMES: bigint;
|
|
3388
|
+
/** Allows management and editing of roles */
|
|
3389
|
+
readonly MANAGE_ROLES: bigint;
|
|
3390
|
+
/** Allows management and editing of webhooks */
|
|
3391
|
+
readonly MANAGE_WEBHOOKS: bigint;
|
|
3392
|
+
/** Allows management and editing of emojis and stickers */
|
|
3393
|
+
readonly MANAGE_EMOJIS_AND_STICKERS: bigint;
|
|
3394
|
+
/** Allows members to use application commands, including slash commands and context menu commands. */
|
|
3395
|
+
readonly USE_APPLICATION_COMMANDS: bigint;
|
|
3396
|
+
/** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
|
|
3397
|
+
readonly REQUEST_TO_SPEAK: bigint;
|
|
3398
|
+
/** Allows for creating, editing, and deleting scheduled events */
|
|
3399
|
+
readonly MANAGE_EVENTS: bigint;
|
|
3400
|
+
/** Allows for deleting and archiving threads, and viewing all private threads */
|
|
3401
|
+
readonly MANAGE_THREADS: bigint;
|
|
3402
|
+
/** Allows for creating public and announcement threads */
|
|
3403
|
+
readonly CREATE_PUBLIC_THREADS: bigint;
|
|
3404
|
+
/** Allows for creating private threads */
|
|
3405
|
+
readonly CREATE_PRIVATE_THREADS: bigint;
|
|
3406
|
+
/** Allows the usage of custom stickers from other servers */
|
|
3407
|
+
readonly USE_EXTERNAL_STICKERS: bigint;
|
|
3408
|
+
/** Allows for sending messages in threads */
|
|
3409
|
+
readonly SEND_MESSAGES_IN_THREADS: bigint;
|
|
3410
|
+
/** Allows for using Activities (applications with the EMBEDDED flag) in a voice channel */
|
|
3411
|
+
readonly USE_EMBEDDED_ACTIVITIES: bigint;
|
|
3412
|
+
/** Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels */
|
|
3413
|
+
readonly MODERATE_MEMBERS: bigint;
|
|
3414
|
+
};
|
|
3415
|
+
export declare enum PremiumTier {
|
|
3416
|
+
/** guild has not unlocked any Server Boost perks */
|
|
3417
|
+
NONE = 0,
|
|
3418
|
+
/** guild has unlocked Server Boost level 1 perks */
|
|
3419
|
+
TIER_1 = 1,
|
|
3420
|
+
/** guild has unlocked Server Boost level 2 perks */
|
|
3421
|
+
TIER_2 = 2,
|
|
3422
|
+
/** guild has unlocked Server Boost level 3 perks */
|
|
3423
|
+
TIER_3 = 3
|
|
3424
|
+
}
|
|
3425
|
+
export declare enum PremiumType {
|
|
3426
|
+
NONE = 0,
|
|
3427
|
+
NITRO_CLASSIC = 1,
|
|
3428
|
+
NITRO = 2,
|
|
3429
|
+
NITRO_BASIC = 3
|
|
3430
|
+
}
|
|
3431
|
+
export interface PresenceUpdateEvent {
|
|
3432
|
+
/** User whose presence is being updated */
|
|
3433
|
+
user: User;
|
|
3434
|
+
/** ID of the guild */
|
|
3435
|
+
guild_id: Snowflake;
|
|
3436
|
+
/** Either "idle", "dnd", "online", or "offline" */
|
|
3437
|
+
status: string;
|
|
3438
|
+
/** User's current activities */
|
|
3439
|
+
activities: Activity[];
|
|
3440
|
+
/** User's platform-dependent status */
|
|
3441
|
+
client_status: ClientStatus;
|
|
3442
|
+
}
|
|
3443
|
+
export declare enum PrivacyLevel {
|
|
3444
|
+
/** The Stage instance is visible publicly. (deprecated) */
|
|
3445
|
+
PUBLIC = 1,
|
|
3446
|
+
/** The Stage instance is visible to only guild members. */
|
|
3447
|
+
GUILD_ONLY = 2
|
|
3448
|
+
}
|
|
3449
|
+
export interface Reaction {
|
|
3450
|
+
/** times this emoji has been used to react */
|
|
3451
|
+
count: number;
|
|
3452
|
+
/** whether the current user reacted using this emoji */
|
|
3453
|
+
me: boolean;
|
|
3454
|
+
/** emoji information */
|
|
3455
|
+
emoji: Emoji;
|
|
3456
|
+
}
|
|
3457
|
+
export interface ReadyEvent {
|
|
3458
|
+
/** API version */
|
|
3459
|
+
v: number;
|
|
3460
|
+
/** Information about the user including email */
|
|
3461
|
+
user: User;
|
|
3462
|
+
/** Guilds the user is in */
|
|
3463
|
+
guilds: UnavailableGuild[];
|
|
3464
|
+
/** Used for resuming connections */
|
|
3465
|
+
session_id: string;
|
|
3466
|
+
/** Gateway URL for resuming connections */
|
|
3467
|
+
resume_gateway_url: string;
|
|
3468
|
+
/** Shard information associated with this session, if sent when identifying */
|
|
3469
|
+
shard?: number[];
|
|
3470
|
+
/** Contains id and flags */
|
|
3471
|
+
application: Application;
|
|
3472
|
+
}
|
|
3473
|
+
export type ReceiveEvent = HelloEvent | ReadyEvent | ResumedEvent | ReconnectEvent | InvalidSessionEvent | ApplicationCommandPermissionsUpdateEvent | AutoModerationRuleCreateEvent | AutoModerationRuleUpdateEvent | AutoModerationRuleDeleteEvent | AutoModerationActionExecutionEvent | ChannelCreateEvent | ChannelUpdateEvent | ChannelDeleteEvent | ChannelPinsUpdateEvent | ThreadCreateEvent | ThreadUpdateEvent | ThreadDeleteEvent | ThreadListSyncEvent | ThreadMemberUpdateEvent | ThreadMembersUpdateEvent | GuildCreateEvent | GuildUpdateEvent | GuildDeleteEvent | GuildBanAddEvent | GuildBanRemoveEvent | GuildEmojisUpdateEvent | GuildStickersUpdateEvent | GuildIntegrationsUpdateEvent | GuildMemberAddEvent | GuildMemberRemoveEvent | GuildMemberUpdateEvent | GuildMembersChunkEvent | GuildRoleCreateEvent | GuildRoleUpdateEvent | GuildRoleDeleteEvent | GuildScheduledEventCreateEvent | GuildScheduledEventUpdateEvent | GuildScheduledEventDeleteEvent | GuildScheduledEventUserAddEvent | GuildScheduledEventUserRemoveEvent | IntegrationCreateEvent | IntegrationUpdateEvent | IntegrationDeleteEvent | InteractionCreateEvent | InviteCreateEvent | InviteDeleteEvent | MessageCreateEvent | MessageUpdateEvent | MessageDeleteEvent | MessageDeleteBulkEvent | MessageReactionAddEvent | MessageReactionRemoveEvent | MessageReactionRemoveAllEvent | MessageReactionRemoveEmojiEvent | PresenceUpdateEvent | StageInstanceCreateEvent | StageInstanceUpdateEvent | StageInstanceDeleteEvent | TypingStartEvent | UserUpdateEvent | VoiceStateUpdateEvent | VoiceServerUpdateEvent | WebhooksUpdateEvent;
|
|
3474
|
+
export interface ReceiveEvents {
|
|
3475
|
+
HELLO: HelloEvent;
|
|
3476
|
+
READY: ReadyEvent;
|
|
3477
|
+
RESUMED: ResumedEvent;
|
|
3478
|
+
RECONNECT: ReconnectEvent;
|
|
3479
|
+
INVALID_SESSION: InvalidSessionEvent;
|
|
3480
|
+
APPLICATION_COMMAND_PERMISSIONS_UPDATE: ApplicationCommandPermissionsUpdateEvent;
|
|
3481
|
+
AUTO_MODERATION_RULE_CREATE: AutoModerationRuleCreateEvent;
|
|
3482
|
+
AUTO_MODERATION_RULE_UPDATE: AutoModerationRuleUpdateEvent;
|
|
3483
|
+
AUTO_MODERATION_RULE_DELETE: AutoModerationRuleDeleteEvent;
|
|
3484
|
+
AUTO_MODERATION_ACTION_EXECUTION: AutoModerationActionExecutionEvent;
|
|
3485
|
+
CHANNEL_CREATE: ChannelCreateEvent;
|
|
3486
|
+
CHANNEL_UPDATE: ChannelUpdateEvent;
|
|
3487
|
+
CHANNEL_DELETE: ChannelDeleteEvent;
|
|
3488
|
+
CHANNEL_PINS_UPDATE: ChannelPinsUpdateEvent;
|
|
3489
|
+
THREAD_CREATE: ThreadCreateEvent;
|
|
3490
|
+
THREAD_UPDATE: ThreadUpdateEvent;
|
|
3491
|
+
THREAD_DELETE: ThreadDeleteEvent;
|
|
3492
|
+
THREAD_LIST_SYNC: ThreadListSyncEvent;
|
|
3493
|
+
THREAD_MEMBER_UPDATE: ThreadMemberUpdateEvent;
|
|
3494
|
+
THREAD_MEMBERS_UPDATE: ThreadMembersUpdateEvent;
|
|
3495
|
+
GUILD_CREATE: GuildCreateEvent;
|
|
3496
|
+
GUILD_UPDATE: GuildUpdateEvent;
|
|
3497
|
+
GUILD_DELETE: GuildDeleteEvent;
|
|
3498
|
+
GUILD_BAN_ADD: GuildBanAddEvent;
|
|
3499
|
+
GUILD_BAN_REMOVE: GuildBanRemoveEvent;
|
|
3500
|
+
GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent;
|
|
3501
|
+
GUILD_STICKERS_UPDATE: GuildStickersUpdateEvent;
|
|
3502
|
+
GUILD_INTEGRATIONS_UPDATE: GuildIntegrationsUpdateEvent;
|
|
3503
|
+
GUILD_MEMBER_ADD: GuildMemberAddEvent;
|
|
3504
|
+
GUILD_MEMBER_REMOVE: GuildMemberRemoveEvent;
|
|
3505
|
+
GUILD_MEMBER_UPDATE: GuildMemberUpdateEvent;
|
|
3506
|
+
GUILD_MEMBERS_CHUNK: GuildMembersChunkEvent;
|
|
3507
|
+
GUILD_ROLE_CREATE: GuildRoleCreateEvent;
|
|
3508
|
+
GUILD_ROLE_UPDATE: GuildRoleUpdateEvent;
|
|
3509
|
+
GUILD_ROLE_DELETE: GuildRoleDeleteEvent;
|
|
3510
|
+
GUILD_SCHEDULED_EVENT_CREATE: GuildScheduledEventCreateEvent;
|
|
3511
|
+
GUILD_SCHEDULED_EVENT_UPDATE: GuildScheduledEventUpdateEvent;
|
|
3512
|
+
GUILD_SCHEDULED_EVENT_DELETE: GuildScheduledEventDeleteEvent;
|
|
3513
|
+
GUILD_SCHEDULED_EVENT_USER_ADD: GuildScheduledEventUserAddEvent;
|
|
3514
|
+
GUILD_SCHEDULED_EVENT_USER_REMOVE: GuildScheduledEventUserRemoveEvent;
|
|
3515
|
+
INTEGRATION_CREATE: IntegrationCreateEvent;
|
|
3516
|
+
INTEGRATION_UPDATE: IntegrationUpdateEvent;
|
|
3517
|
+
INTEGRATION_DELETE: IntegrationDeleteEvent;
|
|
3518
|
+
INTERACTION_CREATE: InteractionCreateEvent;
|
|
3519
|
+
INVITE_CREATE: InviteCreateEvent;
|
|
3520
|
+
INVITE_DELETE: InviteDeleteEvent;
|
|
3521
|
+
MESSAGE_CREATE: MessageCreateEvent;
|
|
3522
|
+
MESSAGE_UPDATE: MessageUpdateEvent;
|
|
3523
|
+
MESSAGE_DELETE: MessageDeleteEvent;
|
|
3524
|
+
MESSAGE_DELETE_BULK: MessageDeleteBulkEvent;
|
|
3525
|
+
MESSAGE_REACTION_ADD: MessageReactionAddEvent;
|
|
3526
|
+
MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent;
|
|
3527
|
+
MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent;
|
|
3528
|
+
MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent;
|
|
3529
|
+
PRESENCE_UPDATE: PresenceUpdateEvent;
|
|
3530
|
+
STAGE_INSTANCE_CREATE: StageInstanceCreateEvent;
|
|
3531
|
+
STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent;
|
|
3532
|
+
STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent;
|
|
3533
|
+
TYPING_START: TypingStartEvent;
|
|
3534
|
+
USER_UPDATE: UserUpdateEvent;
|
|
3535
|
+
VOICE_STATE_UPDATE: VoiceStateUpdateEvent;
|
|
3536
|
+
VOICE_SERVER_UPDATE: VoiceServerUpdateEvent;
|
|
3537
|
+
WEBHOOKS_UPDATE: WebhooksUpdateEvent;
|
|
3538
|
+
}
|
|
3539
|
+
export type ReconnectEvent = null;
|
|
3540
|
+
export interface RequestGuildMember {
|
|
3541
|
+
/** ID of the guild to get members for */
|
|
3542
|
+
guild_id: Snowflake;
|
|
3543
|
+
/** string that username starts with, or an empty string to return all members */
|
|
3544
|
+
query?: string;
|
|
3545
|
+
/** maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return all members */
|
|
3546
|
+
limit: number;
|
|
3547
|
+
/** used to specify if we want the presences of the matched members */
|
|
3548
|
+
presences?: boolean;
|
|
3549
|
+
/** used to specify which users you wish to fetch */
|
|
3550
|
+
user_ids?: Snowflake[];
|
|
3551
|
+
/** nonce to identify the Guild Members Chunk response */
|
|
3552
|
+
nonce?: string;
|
|
3553
|
+
}
|
|
3554
|
+
export interface ResolvedDatum {
|
|
3555
|
+
/** the ids and User objects */
|
|
3556
|
+
users?: Record<Snowflake, User>;
|
|
3557
|
+
/** the ids and partial Member objects */
|
|
3558
|
+
members?: Record<Snowflake, GuildMember>;
|
|
3559
|
+
/** the ids and Role objects */
|
|
3560
|
+
roles?: Record<Snowflake, Role>;
|
|
3561
|
+
/** the ids and partial Channel objects */
|
|
3562
|
+
channels?: Record<Snowflake, Channel>;
|
|
3563
|
+
/** the ids and partial Message objects */
|
|
3564
|
+
messages?: Record<Snowflake, Message>;
|
|
3565
|
+
/** the ids and attachment objects */
|
|
3566
|
+
attachments?: Record<Snowflake, Attachment>;
|
|
3567
|
+
}
|
|
3568
|
+
export interface Response {
|
|
3569
|
+
/** the current application */
|
|
3570
|
+
application: Application;
|
|
3571
|
+
/** the scopes the user has authorized the application for */
|
|
3572
|
+
scopes: string[];
|
|
3573
|
+
/** when the access token expires */
|
|
3574
|
+
expires: string;
|
|
3575
|
+
/** the user who has authorized, if the user has authorized with the identify scope */
|
|
3576
|
+
user?: User;
|
|
3577
|
+
}
|
|
3578
|
+
export interface ResponseBody {
|
|
3579
|
+
/** the public, archived threads */
|
|
3580
|
+
threads: Channel[];
|
|
3581
|
+
/** a thread member object for each returned thread the current user has joined */
|
|
3582
|
+
members: ThreadMember[];
|
|
3583
|
+
/** whether there are potentially additional threads that could be returned on a subsequent call */
|
|
3584
|
+
has_more: boolean;
|
|
3585
|
+
}
|
|
3586
|
+
export interface Resume {
|
|
3587
|
+
/** Session token */
|
|
3588
|
+
token: string;
|
|
3589
|
+
/** Session ID */
|
|
3590
|
+
session_id: string;
|
|
3591
|
+
/** Last sequence number received */
|
|
3592
|
+
seq: number;
|
|
3593
|
+
}
|
|
3594
|
+
export type ResumedEvent = null;
|
|
3595
|
+
export interface Role {
|
|
3596
|
+
/** role id */
|
|
3597
|
+
id: Snowflake;
|
|
3598
|
+
/** role name */
|
|
3599
|
+
name: string;
|
|
3600
|
+
/** integer representation of hexadecimal color code */
|
|
3601
|
+
color: number;
|
|
3602
|
+
/** if this role is pinned in the user listing */
|
|
3603
|
+
hoist: boolean;
|
|
3604
|
+
/** role icon hash */
|
|
3605
|
+
icon?: string | null;
|
|
3606
|
+
/** role unicode emoji */
|
|
3607
|
+
unicode_emoji?: string | null;
|
|
3608
|
+
/** position of this role */
|
|
3609
|
+
position: number;
|
|
3610
|
+
/** permission bit set */
|
|
3611
|
+
permissions: string;
|
|
3612
|
+
/** whether this role is managed by an integration */
|
|
3613
|
+
managed: boolean;
|
|
3614
|
+
/** whether this role is mentionable */
|
|
3615
|
+
mentionable: boolean;
|
|
3616
|
+
/** the tags this role has */
|
|
3617
|
+
tags?: RoleTag;
|
|
3618
|
+
}
|
|
3619
|
+
export interface RoleTag {
|
|
3620
|
+
/** the id of the bot this role belongs to */
|
|
3621
|
+
bot_id?: Snowflake;
|
|
3622
|
+
/** the id of the integration this role belongs to */
|
|
3623
|
+
integration_id?: Snowflake;
|
|
3624
|
+
/** whether this is the guild's premium subscriber role */
|
|
3625
|
+
premium_subscriber?: null;
|
|
3626
|
+
}
|
|
3627
|
+
export type Route<P, O> = {
|
|
3628
|
+
method: string;
|
|
3629
|
+
url: string;
|
|
3630
|
+
params?: P;
|
|
3631
|
+
options?: O;
|
|
3632
|
+
};
|
|
3633
|
+
export interface SearchGuildMemberParams {
|
|
3634
|
+
/** Query string to match username(s) and nickname(s) against. */
|
|
3635
|
+
query: string;
|
|
3636
|
+
/** max number of members to return (1-1000) */
|
|
3637
|
+
limit: number;
|
|
3638
|
+
}
|
|
3639
|
+
export interface SelectMenu {
|
|
3640
|
+
/** Type of select menu component (text: 3, user: 5, role: 6, mentionable: 7, channels: 8) */
|
|
3641
|
+
type: ComponentType;
|
|
3642
|
+
/** ID for the select menu; max 100 characters */
|
|
3643
|
+
custom_id: string;
|
|
3644
|
+
/** Specified choices in a select menu (only required and available for string selects (type 3); max 25 */
|
|
3645
|
+
options?: SelectOption[];
|
|
3646
|
+
/** List of channel types to include in the channel select component (type 8) */
|
|
3647
|
+
channel_types?: ChannelType[];
|
|
3648
|
+
/** Placeholder text if nothing is selected; max 150 characters */
|
|
3649
|
+
placeholder?: string;
|
|
3650
|
+
/** Minimum number of items that must be chosen (defaults to 1); min 0, max 25 */
|
|
3651
|
+
min_values?: number;
|
|
3652
|
+
/** Maximum number of items that can be chosen (defaults to 1); max 25 */
|
|
3653
|
+
max_values?: number;
|
|
3654
|
+
/** Whether select menu is disabled (defaults to false) */
|
|
3655
|
+
disabled?: boolean;
|
|
3656
|
+
}
|
|
3657
|
+
export interface SelectOption {
|
|
3658
|
+
/** User-facing name of the option; max 100 characters */
|
|
3659
|
+
label: string;
|
|
3660
|
+
/** Dev-defined value of the option; max 100 characters */
|
|
3661
|
+
value: string;
|
|
3662
|
+
/** Additional description of the option; max 100 characters */
|
|
3663
|
+
description?: string;
|
|
3664
|
+
/** id, name, and animated */
|
|
3665
|
+
emoji?: Emoji;
|
|
3666
|
+
/** Will show this option as selected by default */
|
|
3667
|
+
default?: boolean;
|
|
3668
|
+
}
|
|
3669
|
+
export type SendEvent = Identify | Resume | Heartbeat | RequestGuildMember | UpdateVoiceState | UpdatePresence;
|
|
3670
|
+
export interface SendEvents {
|
|
3671
|
+
IDENTIFY: Identify;
|
|
3672
|
+
RESUME: Resume;
|
|
3673
|
+
HEARTBEAT: Heartbeat;
|
|
3674
|
+
REQUEST_GUILD_MEMBERS: RequestGuildMember;
|
|
3675
|
+
UPDATE_VOICE_STATE: UpdateVoiceState;
|
|
3676
|
+
UPDATE_PRESENCE: UpdatePresence;
|
|
3677
|
+
}
|
|
3678
|
+
export interface SessionStartLimit {
|
|
3679
|
+
/** Total number of session starts the current user is allowed */
|
|
3680
|
+
total: number;
|
|
3681
|
+
/** Remaining number of session starts the current user is allowed */
|
|
3682
|
+
remaining: number;
|
|
3683
|
+
/** Number of milliseconds after which the limit resets */
|
|
3684
|
+
reset_after: number;
|
|
3685
|
+
/** Number of identify requests allowed per 5 seconds */
|
|
3686
|
+
max_concurrency: number;
|
|
3687
|
+
}
|
|
3688
|
+
export type Snowflake = `${bigint}`;
|
|
3689
|
+
export declare enum SortOrderType {
|
|
3690
|
+
/** Sort forum posts by activity */
|
|
3691
|
+
LATEST_ACTIVITY = 0,
|
|
3692
|
+
/** Sort forum posts by creation time (from most recent to oldest) */
|
|
3693
|
+
CREATION_DATE = 1
|
|
3694
|
+
}
|
|
3695
|
+
export interface StageInstance {
|
|
3696
|
+
/** The id of this Stage instance */
|
|
3697
|
+
id: Snowflake;
|
|
3698
|
+
/** The guild id of the associated Stage channel */
|
|
3699
|
+
guild_id: Snowflake;
|
|
3700
|
+
/** The id of the associated Stage channel */
|
|
3701
|
+
channel_id: Snowflake;
|
|
3702
|
+
/** The topic of the Stage instance (1-120 characters) */
|
|
3703
|
+
topic: string;
|
|
3704
|
+
/** The privacy level of the Stage instance */
|
|
3705
|
+
privacy_level: PrivacyLevel;
|
|
3706
|
+
/** Whether or not Stage Discovery is disabled (deprecated) */
|
|
3707
|
+
discoverable_disabled: boolean;
|
|
3708
|
+
/** The id of the scheduled event for this Stage instance */
|
|
3709
|
+
guild_scheduled_event_id?: Snowflake | null;
|
|
3710
|
+
}
|
|
3711
|
+
export type StageInstanceCreateEvent = StageInstance;
|
|
3712
|
+
export type StageInstanceDeleteEvent = StageInstance;
|
|
3713
|
+
export type StageInstanceUpdateEvent = StageInstance;
|
|
3714
|
+
export interface StartThreadFromMessageParams {
|
|
3715
|
+
/** 1-100 character channel name */
|
|
3716
|
+
name: string;
|
|
3717
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
3718
|
+
auto_archive_duration?: number;
|
|
3719
|
+
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
3720
|
+
rate_limit_per_user?: number | null;
|
|
3721
|
+
}
|
|
3722
|
+
export interface StartThreadInForumChannelForumThreadMessageParams {
|
|
3723
|
+
/** Message contents (up to 2000 characters) */
|
|
3724
|
+
content?: string;
|
|
3725
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
3726
|
+
embeds?: Embed[];
|
|
3727
|
+
/** Allowed mentions for the message */
|
|
3728
|
+
allowed_mentions?: AllowedMention;
|
|
3729
|
+
/** Components to include with the message */
|
|
3730
|
+
components?: Component[];
|
|
3731
|
+
/** IDs of up to 3 stickers in the server to send in the message */
|
|
3732
|
+
sticker_ids?: Snowflake[];
|
|
3733
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
3734
|
+
files: string;
|
|
3735
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
3736
|
+
payload_json?: string;
|
|
3737
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
3738
|
+
attachments?: Attachment[];
|
|
3739
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
3740
|
+
flags?: number;
|
|
3741
|
+
}
|
|
3742
|
+
export interface StartThreadInForumChannelParams {
|
|
3743
|
+
/** 1-100 character channel name */
|
|
3744
|
+
name: string;
|
|
3745
|
+
/** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
|
|
3746
|
+
auto_archive_duration?: number;
|
|
3747
|
+
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
3748
|
+
rate_limit_per_user?: number | null;
|
|
3749
|
+
/** contents of the first message in the forum thread */
|
|
3750
|
+
message: StartThreadInForumChannelForumThreadMessageParams;
|
|
3751
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
3752
|
+
applied_tags?: Snowflake[];
|
|
3753
|
+
}
|
|
3754
|
+
export interface StartThreadWithoutMessageParams {
|
|
3755
|
+
/** 1-100 character channel name */
|
|
3756
|
+
name: string;
|
|
3757
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
3758
|
+
auto_archive_duration?: number;
|
|
3759
|
+
/** the type of thread to create */
|
|
3760
|
+
type?: ChannelType;
|
|
3761
|
+
/** whether non-moderators can add other non-moderators to a thread; only available when creating a private thread */
|
|
3762
|
+
invitable?: boolean;
|
|
3763
|
+
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
3764
|
+
rate_limit_per_user?: number | null;
|
|
3765
|
+
}
|
|
3766
|
+
export declare enum StatusType {
|
|
3767
|
+
/** Online */
|
|
3768
|
+
ONLINE = "online",
|
|
3769
|
+
/** Do Not Disturb */
|
|
3770
|
+
DND = "dnd",
|
|
3771
|
+
/** AFK */
|
|
3772
|
+
IDLE = "idle",
|
|
3773
|
+
/** Invisible and shown as offline */
|
|
3774
|
+
INVISIBLE = "invisible",
|
|
3775
|
+
/** Offline */
|
|
3776
|
+
OFFLINE = "offline"
|
|
3777
|
+
}
|
|
3778
|
+
export interface Sticker {
|
|
3779
|
+
/** id of the sticker */
|
|
3780
|
+
id: Snowflake;
|
|
3781
|
+
/** for standard stickers, id of the pack the sticker is from */
|
|
3782
|
+
pack_id?: Snowflake;
|
|
3783
|
+
/** name of the sticker */
|
|
3784
|
+
name: string;
|
|
3785
|
+
/** description of the sticker */
|
|
3786
|
+
description?: string | null;
|
|
3787
|
+
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
3788
|
+
tags: string;
|
|
3789
|
+
/** Deprecated previously the sticker asset hash, now an empty string */
|
|
3790
|
+
asset?: string;
|
|
3791
|
+
/** type of sticker */
|
|
3792
|
+
type: StickerType;
|
|
3793
|
+
/** type of sticker format */
|
|
3794
|
+
format_type: StickerFormatType;
|
|
3795
|
+
/** whether this guild sticker can be used, may be false due to loss of Server Boosts */
|
|
3796
|
+
available?: boolean;
|
|
3797
|
+
/** id of the guild that owns this sticker */
|
|
3798
|
+
guild_id?: Snowflake;
|
|
3799
|
+
/** the user that uploaded the guild sticker */
|
|
3800
|
+
user?: User;
|
|
3801
|
+
/** the standard sticker's sort order within its pack */
|
|
3802
|
+
sort_value?: number;
|
|
3803
|
+
}
|
|
3804
|
+
export declare enum StickerFormatType {
|
|
3805
|
+
PNG = 1,
|
|
3806
|
+
APNG = 2,
|
|
3807
|
+
LOTTIE = 3
|
|
3808
|
+
}
|
|
3809
|
+
export interface StickerItem {
|
|
3810
|
+
/** id of the sticker */
|
|
3811
|
+
id: Snowflake;
|
|
3812
|
+
/** name of the sticker */
|
|
3813
|
+
name: string;
|
|
3814
|
+
/** type of sticker format */
|
|
3815
|
+
format_type: StickerFormatType;
|
|
3816
|
+
}
|
|
3817
|
+
export interface StickerPack {
|
|
3818
|
+
/** id of the sticker pack */
|
|
3819
|
+
id: Snowflake;
|
|
3820
|
+
/** the stickers in the pack */
|
|
3821
|
+
stickers: Sticker[];
|
|
3822
|
+
/** name of the sticker pack */
|
|
3823
|
+
name: string;
|
|
3824
|
+
/** id of the pack's SKU */
|
|
3825
|
+
sku_id: Snowflake;
|
|
3826
|
+
/** id of a sticker in the pack which is shown as the pack's icon */
|
|
3827
|
+
cover_sticker_id?: Snowflake;
|
|
3828
|
+
/** description of the sticker pack */
|
|
3829
|
+
description: string;
|
|
3830
|
+
/** id of the sticker pack's banner image */
|
|
3831
|
+
banner_asset_id?: Snowflake;
|
|
3832
|
+
}
|
|
3833
|
+
export declare enum StickerType {
|
|
3834
|
+
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
|
|
3835
|
+
STANDARD = 1,
|
|
3836
|
+
/** a sticker uploaded to a guild for the guild's members */
|
|
3837
|
+
GUILD = 2
|
|
3838
|
+
}
|
|
3839
|
+
export declare const SystemChannelFlag: {
|
|
3840
|
+
/** Suppress member join notifications */
|
|
3841
|
+
readonly SUPPRESS_JOIN_NOTIFICATIONS: number;
|
|
3842
|
+
/** Suppress server boost notifications */
|
|
3843
|
+
readonly SUPPRESS_PREMIUM_SUBSCRIPTIONS: number;
|
|
3844
|
+
/** Suppress server setup tips */
|
|
3845
|
+
readonly SUPPRESS_GUILD_REMINDER_NOTIFICATIONS: number;
|
|
3846
|
+
/** Hide member join sticker reply buttons */
|
|
3847
|
+
readonly SUPPRESS_JOIN_NOTIFICATION_REPLIES: number;
|
|
3848
|
+
};
|
|
3849
|
+
export interface Team {
|
|
3850
|
+
/** a hash of the image of the team's icon */
|
|
3851
|
+
icon?: string | null;
|
|
3852
|
+
/** the unique id of the team */
|
|
3853
|
+
id: Snowflake;
|
|
3854
|
+
/** the members of the team */
|
|
3855
|
+
members: TeamMember[];
|
|
3856
|
+
/** the name of the team */
|
|
3857
|
+
name: string;
|
|
3858
|
+
/** the user id of the current team owner */
|
|
3859
|
+
owner_user_id: Snowflake;
|
|
3860
|
+
}
|
|
3861
|
+
export interface TeamMember {
|
|
3862
|
+
/** the user's membership state on the team */
|
|
3863
|
+
membership_state: MembershipState;
|
|
3864
|
+
/** will always be ["*"] */
|
|
3865
|
+
permissions: string[];
|
|
3866
|
+
/** the id of the parent team of which they are a member */
|
|
3867
|
+
team_id: Snowflake;
|
|
3868
|
+
/** the avatar, discriminator, id, and username of the user */
|
|
3869
|
+
user: User;
|
|
3870
|
+
}
|
|
3871
|
+
export interface TextInput {
|
|
3872
|
+
/** 4 for a text input */
|
|
3873
|
+
type: number;
|
|
3874
|
+
/** Developer-defined identifier for the input; max 100 characters */
|
|
3875
|
+
custom_id: string;
|
|
3876
|
+
/** The Text Input Style */
|
|
3877
|
+
style: TextInputStyle;
|
|
3878
|
+
/** Label for this component; max 45 characters */
|
|
3879
|
+
label: string;
|
|
3880
|
+
/** Minimum input length for a text input; min 0, max 4000 */
|
|
3881
|
+
min_length?: number;
|
|
3882
|
+
/** Maximum input length for a text input; min 1, max 4000 */
|
|
3883
|
+
max_length?: number;
|
|
3884
|
+
/** Whether this component is required to be filled (defaults to true) */
|
|
3885
|
+
required?: boolean;
|
|
3886
|
+
/** Pre-filled value for this component; max 4000 characters */
|
|
3887
|
+
value?: string;
|
|
3888
|
+
/** Custom placeholder text if the input is empty; max 100 characters */
|
|
3889
|
+
placeholder?: string;
|
|
3890
|
+
}
|
|
3891
|
+
export declare enum TextInputStyle {
|
|
3892
|
+
/** Single-line input */
|
|
3893
|
+
SHORT = 1,
|
|
3894
|
+
/** Multi-line input */
|
|
3895
|
+
PARAGRAPH = 2
|
|
3896
|
+
}
|
|
3897
|
+
export type ThreadCreateEvent = Channel;
|
|
3898
|
+
export type ThreadDeleteEvent = Channel;
|
|
3899
|
+
export interface ThreadListSyncEvent {
|
|
3900
|
+
/** ID of the guild */
|
|
3901
|
+
guild_id: Snowflake;
|
|
3902
|
+
/** Parent channel IDs whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data. */
|
|
3903
|
+
channel_ids?: Snowflake[];
|
|
3904
|
+
/** All active threads in the given channels that the current user can access */
|
|
3905
|
+
threads: Channel[];
|
|
3906
|
+
/** All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to */
|
|
3907
|
+
members: ThreadMember[];
|
|
3908
|
+
}
|
|
3909
|
+
export interface ThreadMember {
|
|
3910
|
+
/** the id of the thread */
|
|
3911
|
+
id?: Snowflake;
|
|
3912
|
+
/** the id of the user */
|
|
3913
|
+
user_id?: Snowflake;
|
|
3914
|
+
/** the time the current user last joined the thread */
|
|
3915
|
+
join_timestamp: string;
|
|
3916
|
+
/** any user-thread settings, currently only used for notifications */
|
|
3917
|
+
flags: number;
|
|
3918
|
+
}
|
|
3919
|
+
export interface ThreadMembersUpdateEvent {
|
|
3920
|
+
/** ID of the thread */
|
|
3921
|
+
id: Snowflake;
|
|
3922
|
+
/** ID of the guild */
|
|
3923
|
+
guild_id: Snowflake;
|
|
3924
|
+
/** Approximate number of members in the thread, capped at 50 */
|
|
3925
|
+
member_count: number;
|
|
3926
|
+
/** Users who were added to the thread */
|
|
3927
|
+
added_members?: ThreadMember[];
|
|
3928
|
+
/** ID of the users who were removed from the thread */
|
|
3929
|
+
removed_member_ids?: Snowflake[];
|
|
3930
|
+
}
|
|
3931
|
+
export type ThreadMemberUpdateEvent = ThreadMember;
|
|
3932
|
+
export interface ThreadMemberUpdateEventExtra {
|
|
3933
|
+
/** ID of the guild */
|
|
3934
|
+
guild_id: Snowflake;
|
|
3935
|
+
}
|
|
3936
|
+
export interface ThreadMetadatum {
|
|
3937
|
+
/** whether the thread is archived */
|
|
3938
|
+
archived: boolean;
|
|
3939
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
3940
|
+
auto_archive_duration: number;
|
|
3941
|
+
/** timestamp when the thread's archive status was last changed, used for calculating recent activity */
|
|
3942
|
+
archive_timestamp: string;
|
|
3943
|
+
/** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
|
|
3944
|
+
locked: boolean;
|
|
3945
|
+
/** whether non-moderators can add other non-moderators to a thread; only available on private threads */
|
|
3946
|
+
invitable?: boolean;
|
|
3947
|
+
/** timestamp when the thread was created; only populated for threads created after 2022-01-09 */
|
|
3948
|
+
create_timestamp?: string | null;
|
|
3949
|
+
}
|
|
3950
|
+
export type ThreadUpdateEvent = Channel;
|
|
3951
|
+
export interface TriggerMetadatum {
|
|
3952
|
+
/** KEYWORD */
|
|
3953
|
+
keyword_filter: string[];
|
|
3954
|
+
/** KEYWORD */
|
|
3955
|
+
regex_patterns: string[];
|
|
3956
|
+
/** KEYWORD_PRESET */
|
|
3957
|
+
presets: KeywordPresetType[];
|
|
3958
|
+
/** KEYWORD, KEYWORD_PRESET */
|
|
3959
|
+
allow_list: string[];
|
|
3960
|
+
/** MENTION_SPAM */
|
|
3961
|
+
mention_total_limit: number;
|
|
3962
|
+
}
|
|
3963
|
+
export declare enum TriggerType {
|
|
3964
|
+
/** check if content contains words from a user defined list of keywords */
|
|
3965
|
+
KEYWORD = 1,
|
|
3966
|
+
/** check if content represents generic spam */
|
|
3967
|
+
SPAM = 3,
|
|
3968
|
+
/** check if content contains words from internal pre-defined wordsets */
|
|
3969
|
+
KEYWORD_PRESET = 4,
|
|
3970
|
+
/** check if content contains more unique mentions than allowed */
|
|
3971
|
+
MENTION_SPAM = 5
|
|
3972
|
+
}
|
|
3973
|
+
export interface TypingStartEvent {
|
|
3974
|
+
/** ID of the channel */
|
|
3975
|
+
channel_id: Snowflake;
|
|
3976
|
+
/** ID of the guild */
|
|
3977
|
+
guild_id?: Snowflake;
|
|
3978
|
+
/** ID of the user */
|
|
3979
|
+
user_id: Snowflake;
|
|
3980
|
+
/** Unix time (in seconds) of when the user started typing */
|
|
3981
|
+
timestamp: number;
|
|
3982
|
+
/** Member who started typing if this happened in a guild */
|
|
3983
|
+
member?: GuildMember;
|
|
3984
|
+
}
|
|
3985
|
+
export interface UnavailableGuild {
|
|
3986
|
+
/** */
|
|
3987
|
+
id: Snowflake;
|
|
3988
|
+
/** */
|
|
3989
|
+
unavailable: boolean;
|
|
3990
|
+
}
|
|
3991
|
+
export interface UpdatePresence {
|
|
3992
|
+
/** Unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
|
|
3993
|
+
since?: number | null;
|
|
3994
|
+
/** User's activities */
|
|
3995
|
+
activities: Activity[];
|
|
3996
|
+
/** User's new status */
|
|
3997
|
+
status: StatusType;
|
|
3998
|
+
/** Whether or not the client is afk */
|
|
3999
|
+
afk: boolean;
|
|
4000
|
+
}
|
|
4001
|
+
export interface UpdateVoiceState {
|
|
4002
|
+
/** ID of the guild */
|
|
4003
|
+
guild_id: Snowflake;
|
|
4004
|
+
/** ID of the voice channel client wants to join (null if disconnecting) */
|
|
4005
|
+
channel_id?: Snowflake | null;
|
|
4006
|
+
/** Whether the client is muted */
|
|
4007
|
+
self_mute: boolean;
|
|
4008
|
+
/** Whether the client deafened */
|
|
4009
|
+
self_deaf: boolean;
|
|
4010
|
+
}
|
|
4011
|
+
export interface User {
|
|
4012
|
+
/** the user's id */
|
|
4013
|
+
id: Snowflake;
|
|
4014
|
+
/** the user's username, not unique across the platform */
|
|
4015
|
+
username: string;
|
|
4016
|
+
/** the user's 4-digit discord-tag */
|
|
4017
|
+
discriminator: string;
|
|
4018
|
+
/** the user's avatar hash */
|
|
4019
|
+
avatar?: string | null;
|
|
4020
|
+
/** whether the user belongs to an OAuth2 application */
|
|
4021
|
+
bot?: boolean;
|
|
4022
|
+
/** whether the user is an Official Discord System user (part of the urgent message system) */
|
|
4023
|
+
system?: boolean;
|
|
4024
|
+
/** whether the user has two factor enabled on their account */
|
|
4025
|
+
mfa_enabled?: boolean;
|
|
4026
|
+
/** the user's banner hash */
|
|
4027
|
+
banner?: string | null;
|
|
4028
|
+
/** the user's banner color encoded as an integer representation of hexadecimal color code */
|
|
4029
|
+
accent_color?: number | null;
|
|
4030
|
+
/** the user's chosen language option */
|
|
4031
|
+
locale?: string;
|
|
4032
|
+
/** whether the email on this account has been verified */
|
|
4033
|
+
verified?: boolean;
|
|
4034
|
+
/** the user's email */
|
|
4035
|
+
email?: string | null;
|
|
4036
|
+
/** the flags on a user's account */
|
|
4037
|
+
flags?: number;
|
|
4038
|
+
/** the type of Nitro subscription on a user's account */
|
|
4039
|
+
premium_type?: PremiumType;
|
|
4040
|
+
/** the public flags on a user's account */
|
|
4041
|
+
public_flags?: number;
|
|
4042
|
+
}
|
|
4043
|
+
export declare const UserFlag: {
|
|
4044
|
+
/** Discord Employee */
|
|
4045
|
+
readonly STAFF: number;
|
|
4046
|
+
/** Partnered Server Owner */
|
|
4047
|
+
readonly PARTNER: number;
|
|
4048
|
+
/** HypeSquad Events Member */
|
|
4049
|
+
readonly HYPESQUAD: number;
|
|
4050
|
+
/** Bug Hunter Level 1 */
|
|
4051
|
+
readonly BUG_HUNTER_LEVEL_1: number;
|
|
4052
|
+
/** House Bravery Member */
|
|
4053
|
+
readonly HYPESQUAD_ONLINE_HOUSE_1: number;
|
|
4054
|
+
/** House Brilliance Member */
|
|
4055
|
+
readonly HYPESQUAD_ONLINE_HOUSE_2: number;
|
|
4056
|
+
/** House Balance Member */
|
|
4057
|
+
readonly HYPESQUAD_ONLINE_HOUSE_3: number;
|
|
4058
|
+
/** Early Nitro Supporter */
|
|
4059
|
+
readonly PREMIUM_EARLY_SUPPORTER: number;
|
|
4060
|
+
/** User is a team */
|
|
4061
|
+
readonly TEAM_PSEUDO_USER: number;
|
|
4062
|
+
/** Bug Hunter Level 2 */
|
|
4063
|
+
readonly BUG_HUNTER_LEVEL_2: number;
|
|
4064
|
+
/** Verified Bot */
|
|
4065
|
+
readonly VERIFIED_BOT: number;
|
|
4066
|
+
/** Early Verified Bot Developer */
|
|
4067
|
+
readonly VERIFIED_DEVELOPER: number;
|
|
4068
|
+
/** Discord Certified Moderator */
|
|
4069
|
+
readonly CERTIFIED_MODERATOR: number;
|
|
4070
|
+
/** Bot uses only HTTP interactions and is shown in the online member list */
|
|
4071
|
+
readonly BOT_HTTP_INTERACTIONS: number;
|
|
4072
|
+
/** User is an Active Developer */
|
|
4073
|
+
readonly ACTIVE_DEVELOPER: number;
|
|
4074
|
+
};
|
|
4075
|
+
export type UserUpdateEvent = User;
|
|
4076
|
+
export declare enum VerificationLevel {
|
|
4077
|
+
/** unrestricted */
|
|
4078
|
+
NONE = 0,
|
|
4079
|
+
/** must have verified email on account */
|
|
4080
|
+
LOW = 1,
|
|
4081
|
+
/** must be registered on Discord for longer than 5 minutes */
|
|
4082
|
+
MEDIUM = 2,
|
|
4083
|
+
/** must be a member of the server for longer than 10 minutes */
|
|
4084
|
+
HIGH = 3,
|
|
4085
|
+
/** must have a verified phone number */
|
|
4086
|
+
VERY_HIGH = 4
|
|
4087
|
+
}
|
|
4088
|
+
export declare enum VideoQualityMode {
|
|
4089
|
+
/** Discord chooses the quality for optimal performance */
|
|
4090
|
+
AUTO = 1,
|
|
4091
|
+
/** 720p */
|
|
4092
|
+
FULL = 2
|
|
4093
|
+
}
|
|
4094
|
+
export declare enum VisibilityType {
|
|
4095
|
+
/** invisible to everyone except the user themselves */
|
|
4096
|
+
NONE = 0,
|
|
4097
|
+
/** visible to everyone */
|
|
4098
|
+
EVERYONE = 1
|
|
4099
|
+
}
|
|
4100
|
+
export declare enum VoiceOpcode {
|
|
4101
|
+
/** Begin a voice websocket connection. */
|
|
4102
|
+
IDENTIFY = 0,
|
|
4103
|
+
/** Select the voice protocol. */
|
|
4104
|
+
SELECT_PROTOCOL = 1,
|
|
4105
|
+
/** Complete the websocket handshake. */
|
|
4106
|
+
READY = 2,
|
|
4107
|
+
/** Keep the websocket connection alive. */
|
|
4108
|
+
HEARTBEAT = 3,
|
|
4109
|
+
/** Describe the session. */
|
|
4110
|
+
SESSION_DESCRIPTION = 4,
|
|
4111
|
+
/** Indicate which users are speaking. */
|
|
4112
|
+
SPEAKING = 5,
|
|
4113
|
+
/** Sent to acknowledge a received client heartbeat. */
|
|
4114
|
+
HEARTBEAT_ACK = 6,
|
|
4115
|
+
/** Resume a connection. */
|
|
4116
|
+
RESUME = 7,
|
|
4117
|
+
/** Time to wait between sending heartbeats in milliseconds. */
|
|
4118
|
+
HELLO = 8,
|
|
4119
|
+
/** Acknowledge a successful session resume. */
|
|
4120
|
+
RESUMED = 9,
|
|
4121
|
+
/** A client has disconnected from the voice channel */
|
|
4122
|
+
CLIENT_DISCONNECT = 13
|
|
4123
|
+
}
|
|
4124
|
+
export interface VoiceRegion {
|
|
4125
|
+
/** unique ID for the region */
|
|
4126
|
+
id: string;
|
|
4127
|
+
/** name of the region */
|
|
4128
|
+
name: string;
|
|
4129
|
+
/** true for a single server that is closest to the current user's client */
|
|
4130
|
+
optimal: boolean;
|
|
4131
|
+
/** whether this is a deprecated voice region (avoid switching to these) */
|
|
4132
|
+
deprecated: boolean;
|
|
4133
|
+
/** whether this is a custom voice region (used for events/etc) */
|
|
4134
|
+
custom: boolean;
|
|
4135
|
+
}
|
|
4136
|
+
export interface VoiceServerUpdateEvent {
|
|
4137
|
+
/** Voice connection token */
|
|
4138
|
+
token: string;
|
|
4139
|
+
/** Guild this voice server update is for */
|
|
4140
|
+
guild_id: Snowflake;
|
|
4141
|
+
/** Voice server host */
|
|
4142
|
+
endpoint?: string | null;
|
|
4143
|
+
}
|
|
4144
|
+
export interface VoiceState {
|
|
4145
|
+
/** the guild id this voice state is for */
|
|
4146
|
+
guild_id?: Snowflake;
|
|
4147
|
+
/** the channel id this user is connected to */
|
|
4148
|
+
channel_id?: Snowflake | null;
|
|
4149
|
+
/** the user id this voice state is for */
|
|
4150
|
+
user_id: Snowflake;
|
|
4151
|
+
/** the guild member this voice state is for */
|
|
4152
|
+
member?: GuildMember;
|
|
4153
|
+
/** the session id for this voice state */
|
|
4154
|
+
session_id: string;
|
|
4155
|
+
/** whether this user is deafened by the server */
|
|
4156
|
+
deaf: boolean;
|
|
4157
|
+
/** whether this user is muted by the server */
|
|
4158
|
+
mute: boolean;
|
|
4159
|
+
/** whether this user is locally deafened */
|
|
4160
|
+
self_deaf: boolean;
|
|
4161
|
+
/** whether this user is locally muted */
|
|
4162
|
+
self_mute: boolean;
|
|
4163
|
+
/** whether this user is streaming using "Go Live" */
|
|
4164
|
+
self_stream?: boolean;
|
|
4165
|
+
/** whether this user's camera is enabled */
|
|
4166
|
+
self_video: boolean;
|
|
4167
|
+
/** whether this user's permission to speak is denied */
|
|
4168
|
+
suppress: boolean;
|
|
4169
|
+
/** the time at which the user requested to speak */
|
|
4170
|
+
request_to_speak_timestamp?: string | null;
|
|
4171
|
+
}
|
|
4172
|
+
export type VoiceStateUpdateEvent = VoiceState;
|
|
4173
|
+
export interface Webhook {
|
|
4174
|
+
/** the id of the webhook */
|
|
4175
|
+
id: Snowflake;
|
|
4176
|
+
/** the type of the webhook */
|
|
4177
|
+
type: WebhookType;
|
|
4178
|
+
/** the guild id this webhook is for, if any */
|
|
4179
|
+
guild_id?: Snowflake | null;
|
|
4180
|
+
/** the channel id this webhook is for, if any */
|
|
4181
|
+
channel_id?: Snowflake | null;
|
|
4182
|
+
/** the user this webhook was created by (not returned when getting a webhook with its token) */
|
|
4183
|
+
user?: User;
|
|
4184
|
+
/** the default name of the webhook */
|
|
4185
|
+
name?: string | null;
|
|
4186
|
+
/** the default user avatar hash of the webhook */
|
|
4187
|
+
avatar?: string | null;
|
|
4188
|
+
/** the secure token of the webhook (returned for Incoming Webhooks) */
|
|
4189
|
+
token?: string;
|
|
4190
|
+
/** the bot/OAuth2 application that created this webhook */
|
|
4191
|
+
application_id?: Snowflake | null;
|
|
4192
|
+
/** the guild of the channel that this webhook is following (returned for Channel Follower Webhooks) */
|
|
4193
|
+
source_guild?: Guild;
|
|
4194
|
+
/** the channel that this webhook is following (returned for Channel Follower Webhooks) */
|
|
4195
|
+
source_channel?: Channel;
|
|
4196
|
+
/** the url used for executing the webhook (returned by the webhooks OAuth2 flow) */
|
|
4197
|
+
url?: string;
|
|
4198
|
+
}
|
|
4199
|
+
export interface WebhooksUpdateEvent {
|
|
4200
|
+
/** ID of the guild */
|
|
4201
|
+
guild_id: Snowflake;
|
|
4202
|
+
/** ID of the channel */
|
|
4203
|
+
channel_id: Snowflake;
|
|
4204
|
+
}
|
|
4205
|
+
export declare enum WebhookType {
|
|
4206
|
+
/** Incoming Webhooks can post messages to channels with a generated token */
|
|
4207
|
+
INCOMING = 1,
|
|
4208
|
+
/** Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */
|
|
4209
|
+
CHANNEL_FOLLOWER = 2,
|
|
4210
|
+
/** Application webhooks are webhooks used with Interactions */
|
|
4211
|
+
APPLICATION = 3
|
|
4212
|
+
}
|
|
4213
|
+
export interface WelcomeScreen {
|
|
4214
|
+
/** the server description shown in the welcome screen */
|
|
4215
|
+
description?: string | null;
|
|
4216
|
+
/** the channels shown in the welcome screen, up to 5 */
|
|
4217
|
+
welcome_channels: WelcomeScreenChannel[];
|
|
4218
|
+
}
|
|
4219
|
+
export interface WelcomeScreenChannel {
|
|
4220
|
+
/** the channel's id */
|
|
4221
|
+
channel_id: Snowflake;
|
|
4222
|
+
/** the description shown for the channel */
|
|
4223
|
+
description: string;
|
|
4224
|
+
/** the emoji id, if the emoji is custom */
|
|
4225
|
+
emoji_id?: Snowflake | null;
|
|
4226
|
+
/** the emoji name if custom, the unicode character if standard, or null if no emoji is set */
|
|
4227
|
+
emoji_name?: string | null;
|
|
4228
|
+
}
|