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