dfx 0.21.3 → 0.21.4
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/DiscordGateway/Shard/heartbeats.js +3 -3
- package/DiscordGateway/Shard/heartbeats.js.map +1 -1
- package/DiscordGateway/Shard/identify.js +1 -2
- package/DiscordGateway/Shard/identify.js.map +1 -1
- package/DiscordGateway/Shard/index.js +4 -4
- package/DiscordGateway/Shard/index.js.map +1 -1
- package/DiscordGateway/Shard/invalidSession.js +2 -2
- package/DiscordGateway/Shard/invalidSession.js.map +1 -1
- package/DiscordGateway/Shard/sendEvents.js +6 -7
- package/DiscordGateway/Shard/sendEvents.js.map +1 -1
- package/DiscordREST/index.d.ts +4 -0
- package/Helpers/interactions.js +3 -3
- package/Helpers/interactions.js.map +1 -1
- package/Helpers/ui.js +11 -12
- package/Helpers/ui.js.map +1 -1
- package/Interactions/definitions.js +1 -1
- package/Interactions/definitions.js.map +1 -1
- package/Interactions/handlers.js +7 -7
- package/Interactions/handlers.js.map +1 -1
- package/package.json +3 -3
- package/types.d.ts +139 -55
- package/types.js +22 -647
- package/types.js.map +1 -1
package/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface ActionRow {
|
|
|
11
11
|
/** a list of child components */
|
|
12
12
|
components: Component[];
|
|
13
13
|
}
|
|
14
|
-
export declare enum ActionType {
|
|
14
|
+
export declare const enum ActionType {
|
|
15
15
|
/** blocks the content of a message according to the rule */
|
|
16
16
|
BLOCK_MESSAGE = 1,
|
|
17
17
|
/** logs user content to a specified channel */
|
|
@@ -106,7 +106,7 @@ export interface ActivityTimestamp {
|
|
|
106
106
|
/** Unix time (in milliseconds) of when the activity ends */
|
|
107
107
|
end?: number;
|
|
108
108
|
}
|
|
109
|
-
export declare enum ActivityType {
|
|
109
|
+
export declare const enum ActivityType {
|
|
110
110
|
GAME = 0,
|
|
111
111
|
STREAMING = 1,
|
|
112
112
|
LISTENING = 2,
|
|
@@ -136,7 +136,7 @@ export interface AllowedMention {
|
|
|
136
136
|
/** For replies, whether to mention the author of the message being replied to (default false) */
|
|
137
137
|
replied_user: boolean;
|
|
138
138
|
}
|
|
139
|
-
export declare enum AllowedMentionType {
|
|
139
|
+
export declare const enum AllowedMentionType {
|
|
140
140
|
/** Controls role mentions */
|
|
141
141
|
ROLE_MENTIONS = "roles",
|
|
142
142
|
/** Controls user mentions */
|
|
@@ -187,6 +187,8 @@ export interface Application {
|
|
|
187
187
|
install_params?: InstallParam;
|
|
188
188
|
/** the application's default custom authorization link, if enabled */
|
|
189
189
|
custom_install_url?: string;
|
|
190
|
+
/** 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 */
|
|
191
|
+
role_connections_verification_url?: string;
|
|
190
192
|
}
|
|
191
193
|
export interface ApplicationCommand {
|
|
192
194
|
/** Unique ID of command */
|
|
@@ -195,7 +197,7 @@ export interface ApplicationCommand {
|
|
|
195
197
|
type?: ApplicationCommandType;
|
|
196
198
|
/** ID of the parent application */
|
|
197
199
|
application_id: Snowflake;
|
|
198
|
-
/**
|
|
200
|
+
/** Guild ID of the command, if not global */
|
|
199
201
|
guild_id?: Snowflake;
|
|
200
202
|
/** Name of command, 1-32 characters */
|
|
201
203
|
name: string;
|
|
@@ -213,6 +215,8 @@ export interface ApplicationCommand {
|
|
|
213
215
|
dm_permission?: boolean;
|
|
214
216
|
/** Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to true */
|
|
215
217
|
default_permission?: boolean | null;
|
|
218
|
+
/** Indicates whether the command is age-restricted, defaults to false */
|
|
219
|
+
nsfw?: boolean;
|
|
216
220
|
/** Autoincrementing version identifier updated during substantial record changes */
|
|
217
221
|
version: Snowflake;
|
|
218
222
|
}
|
|
@@ -282,7 +286,7 @@ export interface ApplicationCommandOptionChoice {
|
|
|
282
286
|
/** Value for the choice, up to 100 characters if string */
|
|
283
287
|
value: string;
|
|
284
288
|
}
|
|
285
|
-
export declare enum ApplicationCommandOptionType {
|
|
289
|
+
export declare const enum ApplicationCommandOptionType {
|
|
286
290
|
SUB_COMMAND = 1,
|
|
287
291
|
SUB_COMMAND_GROUP = 2,
|
|
288
292
|
STRING = 3,
|
|
@@ -304,12 +308,12 @@ export interface ApplicationCommandPermission {
|
|
|
304
308
|
permission: boolean;
|
|
305
309
|
}
|
|
306
310
|
export type ApplicationCommandPermissionsUpdateEvent = GuildApplicationCommandPermission;
|
|
307
|
-
export declare enum ApplicationCommandPermissionType {
|
|
311
|
+
export declare const enum ApplicationCommandPermissionType {
|
|
308
312
|
ROLE = 1,
|
|
309
313
|
USER = 2,
|
|
310
314
|
CHANNEL = 3
|
|
311
315
|
}
|
|
312
|
-
export declare enum ApplicationCommandType {
|
|
316
|
+
export declare const enum ApplicationCommandType {
|
|
313
317
|
/** Slash commands; a text-based command that shows up when a user types / */
|
|
314
318
|
CHAT_INPUT = 1,
|
|
315
319
|
/** A UI-based command that shows up when you right click or tap on a user */
|
|
@@ -337,6 +341,46 @@ export declare const ApplicationFlag: {
|
|
|
337
341
|
/** Indicates if an app has registered global application commands */
|
|
338
342
|
readonly APPLICATION_COMMAND_BADGE: number;
|
|
339
343
|
};
|
|
344
|
+
export interface ApplicationRoleConnection {
|
|
345
|
+
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
346
|
+
platform_name?: string | null;
|
|
347
|
+
/** the username on the platform a bot has connected (max 100 characters) */
|
|
348
|
+
platform_username?: string | null;
|
|
349
|
+
/** 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 */
|
|
350
|
+
metadata: ApplicationRoleConnectionMetadatum;
|
|
351
|
+
}
|
|
352
|
+
export declare const enum ApplicationRoleConnectionMetadataType {
|
|
353
|
+
/** the metadata value (integer) is less than or equal to the guild's configured value (integer) */
|
|
354
|
+
INTEGER_LESS_THAN_OR_EQUAL = 1,
|
|
355
|
+
/** the metadata value (integer) is greater than or equal to the guild's configured value (integer) */
|
|
356
|
+
INTEGER_GREATER_THAN_OR_EQUAL = 2,
|
|
357
|
+
/** the metadata value (integer) is equal to the guild's configured value (integer) */
|
|
358
|
+
INTEGER_EQUAL = 3,
|
|
359
|
+
/** the metadata value (integer) is not equal to the guild's configured value (integer) */
|
|
360
|
+
INTEGER_NOT_EQUAL = 4,
|
|
361
|
+
/** the metadata value (ISO8601 string) is less than or equal to the guild's configured value (integer; days before current date) */
|
|
362
|
+
DATETIME_LESS_THAN_OR_EQUAL = 5,
|
|
363
|
+
/** the metadata value (ISO8601 string) is greater than or equal to the guild's configured value (integer; days before current date) */
|
|
364
|
+
DATETIME_GREATER_THAN_OR_EQUAL = 6,
|
|
365
|
+
/** the metadata value (integer) is equal to the guild's configured value (integer; 1) */
|
|
366
|
+
BOOLEAN_EQUAL = 7,
|
|
367
|
+
/** the metadata value (integer) is not equal to the guild's configured value (integer; 1) */
|
|
368
|
+
BOOLEAN_NOT_EQUAL = 8
|
|
369
|
+
}
|
|
370
|
+
export interface ApplicationRoleConnectionMetadatum {
|
|
371
|
+
/** type of metadata value */
|
|
372
|
+
type: ApplicationRoleConnectionMetadataType;
|
|
373
|
+
/** dictionary key for the metadata field (must be a-z, 0-9, or _ characters; max 50 characters) */
|
|
374
|
+
key: string;
|
|
375
|
+
/** name of the metadata field (max 100 characters) */
|
|
376
|
+
name: string;
|
|
377
|
+
/** translations of the name */
|
|
378
|
+
name_localizations?: Locale;
|
|
379
|
+
/** description of the metadata field (max 200 characters) */
|
|
380
|
+
description: string;
|
|
381
|
+
/** translations of the description */
|
|
382
|
+
description_localizations?: Locale;
|
|
383
|
+
}
|
|
340
384
|
export interface Attachment {
|
|
341
385
|
/** attachment id */
|
|
342
386
|
id: Snowflake;
|
|
@@ -425,7 +469,7 @@ export interface AuditLogEntry {
|
|
|
425
469
|
/** Reason for the change (1-512 characters) */
|
|
426
470
|
reason?: string;
|
|
427
471
|
}
|
|
428
|
-
export declare enum AuditLogEvent {
|
|
472
|
+
export declare const enum AuditLogEvent {
|
|
429
473
|
/** Server settings were updated */
|
|
430
474
|
GUILD_UPDATE = 1,
|
|
431
475
|
/** Channel was created */
|
|
@@ -629,10 +673,12 @@ export interface BulkOverwriteGuildApplicationCommandParams {
|
|
|
629
673
|
default_member_permissions?: string | null;
|
|
630
674
|
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
631
675
|
dm_permission?: boolean | null;
|
|
632
|
-
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
676
|
+
/** 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 */
|
|
633
677
|
default_permission?: boolean;
|
|
634
678
|
/** Type of command, defaults 1 if not set */
|
|
635
679
|
type?: ApplicationCommandType;
|
|
680
|
+
/** Indicates whether the command is age-restricted */
|
|
681
|
+
nsfw?: boolean;
|
|
636
682
|
}
|
|
637
683
|
export interface Button {
|
|
638
684
|
/** 2 for a button */
|
|
@@ -650,7 +696,7 @@ export interface Button {
|
|
|
650
696
|
/** Whether the button is disabled (defaults to false) */
|
|
651
697
|
disabled?: boolean;
|
|
652
698
|
}
|
|
653
|
-
export declare enum ButtonStyle {
|
|
699
|
+
export declare const enum ButtonStyle {
|
|
654
700
|
PRIMARY = 1,
|
|
655
701
|
SECONDARY = 2,
|
|
656
702
|
SUCCESS = 3,
|
|
@@ -724,6 +770,8 @@ export interface Channel {
|
|
|
724
770
|
default_thread_rate_limit_per_user?: number;
|
|
725
771
|
/** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
|
|
726
772
|
default_sort_order?: SortOrderType | null;
|
|
773
|
+
/** 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 */
|
|
774
|
+
default_forum_layout?: ForumLayoutType;
|
|
727
775
|
}
|
|
728
776
|
export type ChannelCreateEvent = Channel;
|
|
729
777
|
export type ChannelDeleteEvent = Channel;
|
|
@@ -751,7 +799,7 @@ export interface ChannelPinsUpdateEvent {
|
|
|
751
799
|
/** Time at which the most recent pinned message was pinned */
|
|
752
800
|
last_pin_timestamp?: string | null;
|
|
753
801
|
}
|
|
754
|
-
export declare enum ChannelType {
|
|
802
|
+
export declare const enum ChannelType {
|
|
755
803
|
/** a text channel within a server */
|
|
756
804
|
GUILD_TEXT = 0,
|
|
757
805
|
/** a direct message between users */
|
|
@@ -787,7 +835,7 @@ export interface ClientStatus {
|
|
|
787
835
|
web?: string;
|
|
788
836
|
}
|
|
789
837
|
export type Component = ActionRow | Button | TextInput | SelectMenu;
|
|
790
|
-
export declare enum ComponentType {
|
|
838
|
+
export declare const enum ComponentType {
|
|
791
839
|
/** Container for other components */
|
|
792
840
|
ACTION_ROW = 1,
|
|
793
841
|
/** Button object */
|
|
@@ -880,10 +928,12 @@ export interface CreateGlobalApplicationCommandParams {
|
|
|
880
928
|
default_member_permissions?: string | null;
|
|
881
929
|
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
882
930
|
dm_permission?: boolean | null;
|
|
883
|
-
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
931
|
+
/** 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 */
|
|
884
932
|
default_permission?: boolean;
|
|
885
933
|
/** Type of command, defaults 1 if not set */
|
|
886
934
|
type?: ApplicationCommandType;
|
|
935
|
+
/** Indicates whether the command is age-restricted */
|
|
936
|
+
nsfw?: boolean;
|
|
887
937
|
}
|
|
888
938
|
export interface CreateGroupDmParams {
|
|
889
939
|
/** access tokens of users that have granted your app the gdm.join scope */
|
|
@@ -904,10 +954,12 @@ export interface CreateGuildApplicationCommandParams {
|
|
|
904
954
|
options?: ApplicationCommandOption[];
|
|
905
955
|
/** Set of permissions represented as a bit set */
|
|
906
956
|
default_member_permissions?: string | null;
|
|
907
|
-
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
957
|
+
/** 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 */
|
|
908
958
|
default_permission?: boolean;
|
|
909
959
|
/** Type of command, defaults 1 if not set */
|
|
910
960
|
type?: ApplicationCommandType;
|
|
961
|
+
/** Indicates whether the command is age-restricted */
|
|
962
|
+
nsfw?: boolean;
|
|
911
963
|
}
|
|
912
964
|
export interface CreateGuildBanParams {
|
|
913
965
|
/** number of days to delete messages for (0-7) (deprecated) */
|
|
@@ -1084,7 +1136,7 @@ export interface CreateWebhookParams {
|
|
|
1084
1136
|
/** image for the default webhook avatar */
|
|
1085
1137
|
avatar?: string | null;
|
|
1086
1138
|
}
|
|
1087
|
-
export declare enum DefaultMessageNotificationLevel {
|
|
1139
|
+
export declare const enum DefaultMessageNotificationLevel {
|
|
1088
1140
|
/** members will receive notifications for all messages by default */
|
|
1089
1141
|
ALL_MESSAGES = 0,
|
|
1090
1142
|
/** members will receive notifications only for messages that @mention them by default */
|
|
@@ -1127,8 +1179,10 @@ export interface EditGlobalApplicationCommandParams {
|
|
|
1127
1179
|
default_member_permissions?: string | null;
|
|
1128
1180
|
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
1129
1181
|
dm_permission?: boolean | null;
|
|
1130
|
-
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1182
|
+
/** 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 */
|
|
1131
1183
|
default_permission?: boolean;
|
|
1184
|
+
/** Indicates whether the command is age-restricted */
|
|
1185
|
+
nsfw?: boolean;
|
|
1132
1186
|
}
|
|
1133
1187
|
export interface EditGuildApplicationCommandParams {
|
|
1134
1188
|
/** Name of command, 1-32 characters */
|
|
@@ -1143,8 +1197,10 @@ export interface EditGuildApplicationCommandParams {
|
|
|
1143
1197
|
options?: ApplicationCommandOption[];
|
|
1144
1198
|
/** Set of permissions represented as a bit set */
|
|
1145
1199
|
default_member_permissions?: string | null;
|
|
1146
|
-
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1200
|
+
/** 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 */
|
|
1147
1201
|
default_permission?: boolean;
|
|
1202
|
+
/** Indicates whether the command is age-restricted */
|
|
1203
|
+
nsfw?: boolean;
|
|
1148
1204
|
}
|
|
1149
1205
|
export interface EditMessageParams {
|
|
1150
1206
|
/** Message contents (up to 2000 characters) */
|
|
@@ -1260,7 +1316,7 @@ export interface EmbedThumbnail {
|
|
|
1260
1316
|
/** width of thumbnail */
|
|
1261
1317
|
width?: number;
|
|
1262
1318
|
}
|
|
1263
|
-
export declare enum EmbedType {
|
|
1319
|
+
export declare const enum EmbedType {
|
|
1264
1320
|
/** generic embed rendered from embed attributes */
|
|
1265
1321
|
RICH = "rich",
|
|
1266
1322
|
/** image embed */
|
|
@@ -1322,12 +1378,12 @@ export interface Endpoints<O> {
|
|
|
1322
1378
|
createAutoModerationRule: (guildId: string, params?: Partial<CreateAutoModerationRuleParams>, options?: O) => RestResponse<AutoModerationRule>;
|
|
1323
1379
|
/** Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event. */
|
|
1324
1380
|
createChannelInvite: (channelId: string, params?: Partial<CreateChannelInviteParams>, options?: O) => RestResponse<Invite>;
|
|
1325
|
-
/** Create a new DM channel with a user. Returns a DM channel object. */
|
|
1381
|
+
/** Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead). */
|
|
1326
1382
|
createDm: (params?: Partial<CreateDmParams>, options?: O) => RestResponse<Channel>;
|
|
1327
1383
|
/** Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups. */
|
|
1328
1384
|
createFollowupMessage: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1329
1385
|
createGlobalApplicationCommand: (applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1330
|
-
/** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client */
|
|
1386
|
+
/** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client. */
|
|
1331
1387
|
createGroupDm: (params?: Partial<CreateGroupDmParams>, options?: O) => RestResponse<Channel>;
|
|
1332
1388
|
/** Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
1333
1389
|
createGuild: (params?: Partial<CreateGuildParams>, options?: O) => RestResponse<Guild>;
|
|
@@ -1434,6 +1490,8 @@ export interface Endpoints<O> {
|
|
|
1434
1490
|
followAnnouncementChannel: (channelId: string, params?: Partial<FollowAnnouncementChannelParams>, options?: O) => RestResponse<FollowedChannel>;
|
|
1435
1491
|
/** Fetches permissions for a specific command for your application in a guild. Returns a guild application command permissions object. */
|
|
1436
1492
|
getApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, options?: O) => RestResponse<GuildApplicationCommandPermission>;
|
|
1493
|
+
/** Returns a list of application role connection metadata objects for the given application. */
|
|
1494
|
+
getApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnectionMetadatum[]>;
|
|
1437
1495
|
/** Get a single rule. Returns an auto moderation rule object. */
|
|
1438
1496
|
getAutoModerationRule: (guildId: string, autoModerationRuleId: string, options?: O) => RestResponse<AutoModerationRule>;
|
|
1439
1497
|
/** 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. */
|
|
@@ -1533,6 +1591,8 @@ export interface Endpoints<O> {
|
|
|
1533
1591
|
getThreadMember: (channelId: string, userId: string, options?: O) => RestResponse<ThreadMember>;
|
|
1534
1592
|
/** Returns a user object for a given user ID. */
|
|
1535
1593
|
getUser: (userId: string, options?: O) => RestResponse<User>;
|
|
1594
|
+
/** 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. */
|
|
1595
|
+
getUserApplicationRoleConnection: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
1536
1596
|
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
1537
1597
|
getUserConnections: (options?: O) => RestResponse<Connection[]>;
|
|
1538
1598
|
/** Returns the new webhook object for the given id. */
|
|
@@ -1642,8 +1702,12 @@ export interface Endpoints<O> {
|
|
|
1642
1702
|
triggerTypingIndicator: (channelId: string, options?: O) => RestResponse<any>;
|
|
1643
1703
|
/** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
1644
1704
|
unpinMessage: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1705
|
+
/** Updates and returns a list of application role connection metadata objects for the given application. */
|
|
1706
|
+
updateApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnectionMetadatum[]>;
|
|
1707
|
+
/** 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. */
|
|
1708
|
+
updateUserApplicationRoleConnection: (applicationId: string, params?: Partial<UpdateUserApplicationRoleConnectionParams>, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
1645
1709
|
}
|
|
1646
|
-
export declare enum EventType {
|
|
1710
|
+
export declare const enum EventType {
|
|
1647
1711
|
/** when a member sends or edits a message in the guild */
|
|
1648
1712
|
MESSAGE_SEND = 1
|
|
1649
1713
|
}
|
|
@@ -1673,7 +1737,7 @@ export interface ExecuteWebhookParams {
|
|
|
1673
1737
|
/** name of thread to create (requires the webhook channel to be a forum channel) */
|
|
1674
1738
|
thread_name: string;
|
|
1675
1739
|
}
|
|
1676
|
-
export declare enum ExplicitContentFilterLevel {
|
|
1740
|
+
export declare const enum ExplicitContentFilterLevel {
|
|
1677
1741
|
/** media content will not be scanned */
|
|
1678
1742
|
DISABLED = 0,
|
|
1679
1743
|
/** media content sent by members without roles will be scanned */
|
|
@@ -1691,6 +1755,14 @@ export interface FollowedChannel {
|
|
|
1691
1755
|
/** created target webhook id */
|
|
1692
1756
|
webhook_id: Snowflake;
|
|
1693
1757
|
}
|
|
1758
|
+
export declare const enum ForumLayoutType {
|
|
1759
|
+
/** No default has been set for forum channel */
|
|
1760
|
+
NOT_SET = 0,
|
|
1761
|
+
/** Display posts as a list */
|
|
1762
|
+
LIST_VIEW = 1,
|
|
1763
|
+
/** Display posts as a collection of tiles */
|
|
1764
|
+
GALLERY_VIEW = 2
|
|
1765
|
+
}
|
|
1694
1766
|
export interface ForumTag {
|
|
1695
1767
|
/** the id of the tag */
|
|
1696
1768
|
id: Snowflake;
|
|
@@ -1744,7 +1816,7 @@ export declare const GatewayIntents: {
|
|
|
1744
1816
|
readonly AUTO_MODERATION_CONFIGURATION: number;
|
|
1745
1817
|
readonly AUTO_MODERATION_EXECUTION: number;
|
|
1746
1818
|
};
|
|
1747
|
-
export declare enum GatewayOpcode {
|
|
1819
|
+
export declare const enum GatewayOpcode {
|
|
1748
1820
|
/** An event was dispatched. */
|
|
1749
1821
|
DISPATCH = 0,
|
|
1750
1822
|
/** Fired periodically by the client to keep the connection alive. */
|
|
@@ -2038,7 +2110,7 @@ export interface GuildEmojisUpdateEvent {
|
|
|
2038
2110
|
/** Array of emojis */
|
|
2039
2111
|
emojis: Emoji[];
|
|
2040
2112
|
}
|
|
2041
|
-
export declare enum GuildFeature {
|
|
2113
|
+
export declare const enum GuildFeature {
|
|
2042
2114
|
/** guild has access to set an animated guild banner image */
|
|
2043
2115
|
ANIMATED_BANNER = "ANIMATED_BANNER",
|
|
2044
2116
|
/** guild has access to set an animated guild icon */
|
|
@@ -2165,7 +2237,7 @@ export interface GuildMemberUpdateEvent {
|
|
|
2165
2237
|
/** When the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
|
2166
2238
|
communication_disabled_until?: string | null;
|
|
2167
2239
|
}
|
|
2168
|
-
export declare enum GuildNsfwLevel {
|
|
2240
|
+
export declare const enum GuildNsfwLevel {
|
|
2169
2241
|
DEFAULT = 0,
|
|
2170
2242
|
EXPLICIT = 1,
|
|
2171
2243
|
SAFE = 2,
|
|
@@ -2253,16 +2325,16 @@ export interface GuildScheduledEventEntityMetadatum {
|
|
|
2253
2325
|
/** location of the event (1-100 characters) */
|
|
2254
2326
|
location?: string;
|
|
2255
2327
|
}
|
|
2256
|
-
export declare enum GuildScheduledEventEntityType {
|
|
2328
|
+
export declare const enum GuildScheduledEventEntityType {
|
|
2257
2329
|
STAGE_INSTANCE = 1,
|
|
2258
2330
|
VOICE = 2,
|
|
2259
2331
|
EXTERNAL = 3
|
|
2260
2332
|
}
|
|
2261
|
-
export declare enum GuildScheduledEventPrivacyLevel {
|
|
2333
|
+
export declare const enum GuildScheduledEventPrivacyLevel {
|
|
2262
2334
|
/** the scheduled event is only accessible to guild members */
|
|
2263
2335
|
GUILD_ONLY = 2
|
|
2264
2336
|
}
|
|
2265
|
-
export declare enum GuildScheduledEventStatus {
|
|
2337
|
+
export declare const enum GuildScheduledEventStatus {
|
|
2266
2338
|
SCHEDULED = 1,
|
|
2267
2339
|
ACTIVE = 2,
|
|
2268
2340
|
COMPLETED = 3,
|
|
@@ -2444,7 +2516,7 @@ export interface IntegrationDeleteEvent {
|
|
|
2444
2516
|
/** ID of the bot/OAuth2 application for this discord integration */
|
|
2445
2517
|
application_id?: Snowflake;
|
|
2446
2518
|
}
|
|
2447
|
-
export declare enum IntegrationExpireBehavior {
|
|
2519
|
+
export declare const enum IntegrationExpireBehavior {
|
|
2448
2520
|
REMOVE_ROLE = 0,
|
|
2449
2521
|
KICK = 1
|
|
2450
2522
|
}
|
|
@@ -2505,14 +2577,14 @@ export interface InteractionCallbackMessage {
|
|
|
2505
2577
|
attachments?: Attachment[];
|
|
2506
2578
|
}
|
|
2507
2579
|
export interface InteractionCallbackModal {
|
|
2508
|
-
/** a developer-defined identifier for the
|
|
2580
|
+
/** a developer-defined identifier for the modal, max 100 characters */
|
|
2509
2581
|
custom_id: string;
|
|
2510
2582
|
/** the title of the popup modal, max 45 characters */
|
|
2511
2583
|
title: string;
|
|
2512
2584
|
/** between 1 and 5 (inclusive) components that make up the modal */
|
|
2513
2585
|
components: Component[];
|
|
2514
2586
|
}
|
|
2515
|
-
export declare enum InteractionCallbackType {
|
|
2587
|
+
export declare const enum InteractionCallbackType {
|
|
2516
2588
|
/** ACK a Ping */
|
|
2517
2589
|
PONG = 1,
|
|
2518
2590
|
/** respond to an interaction with a message */
|
|
@@ -2536,7 +2608,7 @@ export interface InteractionResponse {
|
|
|
2536
2608
|
/** an optional response message */
|
|
2537
2609
|
data?: InteractionCallbackDatum;
|
|
2538
2610
|
}
|
|
2539
|
-
export declare enum InteractionType {
|
|
2611
|
+
export declare const enum InteractionType {
|
|
2540
2612
|
PING = 1,
|
|
2541
2613
|
APPLICATION_COMMAND = 2,
|
|
2542
2614
|
MESSAGE_COMPONENT = 3,
|
|
@@ -2626,11 +2698,11 @@ export interface InviteStageInstance {
|
|
|
2626
2698
|
/** the topic of the Stage instance (1-120 characters) */
|
|
2627
2699
|
topic: string;
|
|
2628
2700
|
}
|
|
2629
|
-
export declare enum InviteTargetType {
|
|
2701
|
+
export declare const enum InviteTargetType {
|
|
2630
2702
|
STREAM = 1,
|
|
2631
2703
|
EMBEDDED_APPLICATION = 2
|
|
2632
2704
|
}
|
|
2633
|
-
export declare enum KeywordPresetType {
|
|
2705
|
+
export declare const enum KeywordPresetType {
|
|
2634
2706
|
/** Words that may be considered forms of swearing or cursing */
|
|
2635
2707
|
PROFANITY = 1,
|
|
2636
2708
|
/** Words that refer to sexually explicit behavior or activity */
|
|
@@ -2758,7 +2830,7 @@ export interface Locale {
|
|
|
2758
2830
|
/** Korean */
|
|
2759
2831
|
ko?: string;
|
|
2760
2832
|
}
|
|
2761
|
-
export declare enum MembershipState {
|
|
2833
|
+
export declare const enum MembershipState {
|
|
2762
2834
|
INVITED = 1,
|
|
2763
2835
|
ACCEPTED = 2
|
|
2764
2836
|
}
|
|
@@ -2830,7 +2902,7 @@ export interface MessageActivity {
|
|
|
2830
2902
|
/** party_id from a Rich Presence event */
|
|
2831
2903
|
party_id?: string;
|
|
2832
2904
|
}
|
|
2833
|
-
export declare enum MessageActivityType {
|
|
2905
|
+
export declare const enum MessageActivityType {
|
|
2834
2906
|
JOIN = 1,
|
|
2835
2907
|
SPECTATE = 2,
|
|
2836
2908
|
LISTEN = 3,
|
|
@@ -2955,7 +3027,7 @@ export interface MessageReference {
|
|
|
2955
3027
|
/** when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
|
|
2956
3028
|
fail_if_not_exists?: boolean;
|
|
2957
3029
|
}
|
|
2958
|
-
export declare enum MessageType {
|
|
3030
|
+
export declare const enum MessageType {
|
|
2959
3031
|
DEFAULT = 0,
|
|
2960
3032
|
RECIPIENT_ADD = 1,
|
|
2961
3033
|
RECIPIENT_REMOVE = 2,
|
|
@@ -2982,7 +3054,7 @@ export declare enum MessageType {
|
|
|
2982
3054
|
AUTO_MODERATION_ACTION = 24
|
|
2983
3055
|
}
|
|
2984
3056
|
export type MessageUpdateEvent = MessageCreateEvent;
|
|
2985
|
-
export declare enum MfaLevel {
|
|
3057
|
+
export declare const enum MfaLevel {
|
|
2986
3058
|
/** guild has no MFA/2FA requirement for moderation actions */
|
|
2987
3059
|
NONE = 0,
|
|
2988
3060
|
/** guild has a 2FA requirement for moderation actions */
|
|
@@ -3053,6 +3125,8 @@ export interface ModifyChannelGuildChannelParams {
|
|
|
3053
3125
|
default_thread_rate_limit_per_user?: number;
|
|
3054
3126
|
/** the default sort order type used to order posts in GUILD_FORUM channels */
|
|
3055
3127
|
default_sort_order?: SortOrderType | null;
|
|
3128
|
+
/** the default forum layout type used to display posts in GUILD_FORUM channels */
|
|
3129
|
+
default_forum_layout?: ForumLayoutType;
|
|
3056
3130
|
}
|
|
3057
3131
|
export type ModifyChannelParams = ModifyChannelGroupDmParams | ModifyChannelGuildChannelParams | ModifyChannelThreadParams;
|
|
3058
3132
|
export interface ModifyChannelThreadParams {
|
|
@@ -3257,12 +3331,12 @@ export interface ModifyWebhookParams {
|
|
|
3257
3331
|
/** the new channel id this webhook should be moved to */
|
|
3258
3332
|
channel_id: Snowflake;
|
|
3259
3333
|
}
|
|
3260
|
-
export declare enum MutableGuildFeature {
|
|
3334
|
+
export declare const enum MutableGuildFeature {
|
|
3261
3335
|
COMMUNITY = "COMMUNITY",
|
|
3262
3336
|
INVITES_DISABLED = "INVITES_DISABLED",
|
|
3263
3337
|
DISCOVERABLE = "DISCOVERABLE"
|
|
3264
3338
|
}
|
|
3265
|
-
export declare enum OAuth2Scope {
|
|
3339
|
+
export declare const enum OAuth2Scope {
|
|
3266
3340
|
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */
|
|
3267
3341
|
ACTIVITIES_READ = "activities.read",
|
|
3268
3342
|
/** allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
|
|
@@ -3303,6 +3377,8 @@ export declare enum OAuth2Scope {
|
|
|
3303
3377
|
MESSAGES_READ = "messages.read",
|
|
3304
3378
|
/** allows your app to know a user's friends and implicit relationships - requires Discord approval */
|
|
3305
3379
|
RELATIONSHIPS_READ = "relationships.read",
|
|
3380
|
+
/** allows your app to update a user's connection and metadata for the app */
|
|
3381
|
+
ROLE_CONNECTIONS_WRITE = "role_connections.write",
|
|
3306
3382
|
/** for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */
|
|
3307
3383
|
RPC = "rpc",
|
|
3308
3384
|
/** for local rpc server access, this allows you to update a user's activity - requires Discord approval */
|
|
@@ -3412,7 +3488,7 @@ export declare const PermissionFlag: {
|
|
|
3412
3488
|
/** Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels */
|
|
3413
3489
|
readonly MODERATE_MEMBERS: bigint;
|
|
3414
3490
|
};
|
|
3415
|
-
export declare enum PremiumTier {
|
|
3491
|
+
export declare const enum PremiumTier {
|
|
3416
3492
|
/** guild has not unlocked any Server Boost perks */
|
|
3417
3493
|
NONE = 0,
|
|
3418
3494
|
/** guild has unlocked Server Boost level 1 perks */
|
|
@@ -3422,7 +3498,7 @@ export declare enum PremiumTier {
|
|
|
3422
3498
|
/** guild has unlocked Server Boost level 3 perks */
|
|
3423
3499
|
TIER_3 = 3
|
|
3424
3500
|
}
|
|
3425
|
-
export declare enum PremiumType {
|
|
3501
|
+
export declare const enum PremiumType {
|
|
3426
3502
|
NONE = 0,
|
|
3427
3503
|
NITRO_CLASSIC = 1,
|
|
3428
3504
|
NITRO = 2,
|
|
@@ -3440,7 +3516,7 @@ export interface PresenceUpdateEvent {
|
|
|
3440
3516
|
/** User's platform-dependent status */
|
|
3441
3517
|
client_status: ClientStatus;
|
|
3442
3518
|
}
|
|
3443
|
-
export declare enum PrivacyLevel {
|
|
3519
|
+
export declare const enum PrivacyLevel {
|
|
3444
3520
|
/** The Stage instance is visible publicly. (deprecated) */
|
|
3445
3521
|
PUBLIC = 1,
|
|
3446
3522
|
/** The Stage instance is visible to only guild members. */
|
|
@@ -3686,7 +3762,7 @@ export interface SessionStartLimit {
|
|
|
3686
3762
|
max_concurrency: number;
|
|
3687
3763
|
}
|
|
3688
3764
|
export type Snowflake = `${bigint}`;
|
|
3689
|
-
export declare enum SortOrderType {
|
|
3765
|
+
export declare const enum SortOrderType {
|
|
3690
3766
|
/** Sort forum posts by activity */
|
|
3691
3767
|
LATEST_ACTIVITY = 0,
|
|
3692
3768
|
/** Sort forum posts by creation time (from most recent to oldest) */
|
|
@@ -3763,7 +3839,7 @@ export interface StartThreadWithoutMessageParams {
|
|
|
3763
3839
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
3764
3840
|
rate_limit_per_user?: number | null;
|
|
3765
3841
|
}
|
|
3766
|
-
export declare enum StatusType {
|
|
3842
|
+
export declare const enum StatusType {
|
|
3767
3843
|
/** Online */
|
|
3768
3844
|
ONLINE = "online",
|
|
3769
3845
|
/** Do Not Disturb */
|
|
@@ -3801,7 +3877,7 @@ export interface Sticker {
|
|
|
3801
3877
|
/** the standard sticker's sort order within its pack */
|
|
3802
3878
|
sort_value?: number;
|
|
3803
3879
|
}
|
|
3804
|
-
export declare enum StickerFormatType {
|
|
3880
|
+
export declare const enum StickerFormatType {
|
|
3805
3881
|
PNG = 1,
|
|
3806
3882
|
APNG = 2,
|
|
3807
3883
|
LOTTIE = 3
|
|
@@ -3830,7 +3906,7 @@ export interface StickerPack {
|
|
|
3830
3906
|
/** id of the sticker pack's banner image */
|
|
3831
3907
|
banner_asset_id?: Snowflake;
|
|
3832
3908
|
}
|
|
3833
|
-
export declare enum StickerType {
|
|
3909
|
+
export declare const enum StickerType {
|
|
3834
3910
|
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
|
|
3835
3911
|
STANDARD = 1,
|
|
3836
3912
|
/** a sticker uploaded to a guild for the guild's members */
|
|
@@ -3888,7 +3964,7 @@ export interface TextInput {
|
|
|
3888
3964
|
/** Custom placeholder text if the input is empty; max 100 characters */
|
|
3889
3965
|
placeholder?: string;
|
|
3890
3966
|
}
|
|
3891
|
-
export declare enum TextInputStyle {
|
|
3967
|
+
export declare const enum TextInputStyle {
|
|
3892
3968
|
/** Single-line input */
|
|
3893
3969
|
SHORT = 1,
|
|
3894
3970
|
/** Multi-line input */
|
|
@@ -3960,7 +4036,7 @@ export interface TriggerMetadatum {
|
|
|
3960
4036
|
/** MENTION_SPAM */
|
|
3961
4037
|
mention_total_limit: number;
|
|
3962
4038
|
}
|
|
3963
|
-
export declare enum TriggerType {
|
|
4039
|
+
export declare const enum TriggerType {
|
|
3964
4040
|
/** check if content contains words from a user defined list of keywords */
|
|
3965
4041
|
KEYWORD = 1,
|
|
3966
4042
|
/** check if content represents generic spam */
|
|
@@ -3998,6 +4074,14 @@ export interface UpdatePresence {
|
|
|
3998
4074
|
/** Whether or not the client is afk */
|
|
3999
4075
|
afk: boolean;
|
|
4000
4076
|
}
|
|
4077
|
+
export interface UpdateUserApplicationRoleConnectionParams {
|
|
4078
|
+
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
4079
|
+
platform_name?: string;
|
|
4080
|
+
/** the username on the platform a bot has connected (max 100 characters) */
|
|
4081
|
+
platform_username?: string;
|
|
4082
|
+
/** 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 */
|
|
4083
|
+
metadata?: ApplicationRoleConnectionMetadatum;
|
|
4084
|
+
}
|
|
4001
4085
|
export interface UpdateVoiceState {
|
|
4002
4086
|
/** ID of the guild */
|
|
4003
4087
|
guild_id: Snowflake;
|
|
@@ -4065,7 +4149,7 @@ export declare const UserFlag: {
|
|
|
4065
4149
|
readonly VERIFIED_BOT: number;
|
|
4066
4150
|
/** Early Verified Bot Developer */
|
|
4067
4151
|
readonly VERIFIED_DEVELOPER: number;
|
|
4068
|
-
/**
|
|
4152
|
+
/** Moderator Programs Alumni */
|
|
4069
4153
|
readonly CERTIFIED_MODERATOR: number;
|
|
4070
4154
|
/** Bot uses only HTTP interactions and is shown in the online member list */
|
|
4071
4155
|
readonly BOT_HTTP_INTERACTIONS: number;
|
|
@@ -4073,7 +4157,7 @@ export declare const UserFlag: {
|
|
|
4073
4157
|
readonly ACTIVE_DEVELOPER: number;
|
|
4074
4158
|
};
|
|
4075
4159
|
export type UserUpdateEvent = User;
|
|
4076
|
-
export declare enum VerificationLevel {
|
|
4160
|
+
export declare const enum VerificationLevel {
|
|
4077
4161
|
/** unrestricted */
|
|
4078
4162
|
NONE = 0,
|
|
4079
4163
|
/** must have verified email on account */
|
|
@@ -4085,19 +4169,19 @@ export declare enum VerificationLevel {
|
|
|
4085
4169
|
/** must have a verified phone number */
|
|
4086
4170
|
VERY_HIGH = 4
|
|
4087
4171
|
}
|
|
4088
|
-
export declare enum VideoQualityMode {
|
|
4172
|
+
export declare const enum VideoQualityMode {
|
|
4089
4173
|
/** Discord chooses the quality for optimal performance */
|
|
4090
4174
|
AUTO = 1,
|
|
4091
4175
|
/** 720p */
|
|
4092
4176
|
FULL = 2
|
|
4093
4177
|
}
|
|
4094
|
-
export declare enum VisibilityType {
|
|
4178
|
+
export declare const enum VisibilityType {
|
|
4095
4179
|
/** invisible to everyone except the user themselves */
|
|
4096
4180
|
NONE = 0,
|
|
4097
4181
|
/** visible to everyone */
|
|
4098
4182
|
EVERYONE = 1
|
|
4099
4183
|
}
|
|
4100
|
-
export declare enum VoiceOpcode {
|
|
4184
|
+
export declare const enum VoiceOpcode {
|
|
4101
4185
|
/** Begin a voice websocket connection. */
|
|
4102
4186
|
IDENTIFY = 0,
|
|
4103
4187
|
/** Select the voice protocol. */
|
|
@@ -4202,7 +4286,7 @@ export interface WebhooksUpdateEvent {
|
|
|
4202
4286
|
/** ID of the channel */
|
|
4203
4287
|
channel_id: Snowflake;
|
|
4204
4288
|
}
|
|
4205
|
-
export declare enum WebhookType {
|
|
4289
|
+
export declare const enum WebhookType {
|
|
4206
4290
|
/** Incoming Webhooks can post messages to channels with a generated token */
|
|
4207
4291
|
INCOMING = 1,
|
|
4208
4292
|
/** Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */
|