@discordjs/structures 0.2.0-pr-11006.1765450794-e636950b2 → 0.2.0-pr-11005.1765454364-f3f6d34e7
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/dist/index.d.mts +117 -1664
- package/dist/index.d.ts +117 -1664
- package/dist/index.js +184 -2283
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +169 -2210
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AttachmentFlags, ChannelFlags, MessageFlags, PermissionFlagsBits, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIInteractionDataResolved, APIInvite, APIExtendedInvite, APIMessageComponent, APIModalComponent, ComponentType, APIBaseComponent, APIComponentInActionRow, APIActionRowComponent, ButtonStyle, APIButtonComponentWithCustomId, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, APIContainerComponent, APIFileComponent, APIFileUploadComponent, APIButtonComponentWithURL, APIMediaGalleryComponent, APIMentionableSelectComponent, APIButtonComponentWithSKUId, APIRoleSelectComponent, APISectionComponent, APISeparatorComponent, APIStringSelectComponent, APITextDisplayComponent, APITextInputComponent, APIThumbnailComponent, APIUserSelectComponent, APIMessageComponentEmoji, APIMediaGalleryItem, SelectMenuDefaultValueType, APISelectMenuDefaultValue, APISelectMenuOption, APIUnfurledMediaItem, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, InteractionType, APIMessageInteractionMetadata, APIApplicationCommandInteractionMetadata, APIAttachment, APIChannelMention, APIMessage, APIMessageActivity, APIMessageCall, APIMessageComponentInteractionMetadata, APIMessageReference, MessageReferenceType, APIModalSubmitInteractionMetadata, APIReaction, APIReactionCountDetails, APIMessageRoleSubscriptionData, APIPoll, APIPollAnswer, APIPollAnswerCount, APIPollMedia, APIPollResults, APISticker, APIAvatarDecorationData, APIUser, APIConnection } from 'discord-api-types/v10';
|
|
1
|
+
import { ChannelFlags, PermissionFlagsBits, GuildChannelType, ChannelType, ThreadChannelType, GuildTextChannelType, TextChannelType, APIChannel, APIPartialChannel, APIGuildForumTag, APIOverwrite, APIThreadMetadata, APINewsChannel, APIAnnouncementThreadChannel, APIGuildCategoryChannel, APIDMChannel, APIGuildForumChannel, APIGroupDMChannel, APIGuildMediaChannel, APIPrivateThreadChannel, APIPublicThreadChannel, APIGuildStageVoiceChannel, APITextChannel, APIGuildVoiceChannel, APIInvite, APIExtendedInvite, APIAvatarDecorationData, APIUser, APIConnection } from 'discord-api-types/v10';
|
|
3
2
|
|
|
4
3
|
type ReplaceOmittedWithUnknown<Omitted extends keyof Data | '', Data> = {
|
|
5
4
|
[Key in keyof Data]: Key extends Omitted ? unknown : Data[Key];
|
|
@@ -126,17 +125,6 @@ declare abstract class BitField<Flags extends string> {
|
|
|
126
125
|
static resolve<Flags extends string = string>(bit: BitFieldResolvable<Flags>): bigint;
|
|
127
126
|
}
|
|
128
127
|
|
|
129
|
-
/**
|
|
130
|
-
* Data structure that makes it easy to interact with a {@link Attachment#flags} bitfield.
|
|
131
|
-
*/
|
|
132
|
-
declare class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {
|
|
133
|
-
/**
|
|
134
|
-
* Numeric attachment flags.
|
|
135
|
-
*/
|
|
136
|
-
static readonly Flags: typeof AttachmentFlags;
|
|
137
|
-
toJSON(): string | number;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
128
|
/**
|
|
141
129
|
* Data structure that makes it easy to interact with a {@link (Channel:class).flags} bitfield.
|
|
142
130
|
*/
|
|
@@ -148,17 +136,6 @@ declare class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {
|
|
|
148
136
|
toJSON(): string | number;
|
|
149
137
|
}
|
|
150
138
|
|
|
151
|
-
/**
|
|
152
|
-
* Data structure that makes it easy to interact with a {@link Message#flags} bitfield.
|
|
153
|
-
*/
|
|
154
|
-
declare class MessageFlagsBitField extends BitField<keyof MessageFlags> {
|
|
155
|
-
/**
|
|
156
|
-
* Numeric message flags.
|
|
157
|
-
*/
|
|
158
|
-
static readonly Flags: typeof MessageFlags;
|
|
159
|
-
toJSON(): string | number;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
139
|
/**
|
|
163
140
|
* Data structure that makes it easy to interact with a permission bit field. All {@link GuildMember}s have a set of
|
|
164
141
|
* permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrite}s for the member
|
|
@@ -222,7 +199,6 @@ declare class PermissionsBitField extends BitField<keyof typeof PermissionFlagsB
|
|
|
222
199
|
readonly SendPolls: bigint;
|
|
223
200
|
readonly UseExternalApps: bigint;
|
|
224
201
|
readonly PinMessages: bigint;
|
|
225
|
-
readonly BypassSlowmode: bigint;
|
|
226
202
|
};
|
|
227
203
|
/**
|
|
228
204
|
* Bit field representing every permission combined
|
|
@@ -243,7 +219,7 @@ declare class PermissionsBitField extends BitField<keyof typeof PermissionFlagsB
|
|
|
243
219
|
* @param checkAdmin - Whether to allow the administrator permission to override
|
|
244
220
|
* @returns A bit field containing the missing permissions
|
|
245
221
|
*/
|
|
246
|
-
missing(bits: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin?: boolean): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages"
|
|
222
|
+
missing(bits: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin?: boolean): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages")[];
|
|
247
223
|
/**
|
|
248
224
|
* Checks whether the bit field has a permission, or any of multiple permissions.
|
|
249
225
|
*
|
|
@@ -265,20 +241,17 @@ declare class PermissionsBitField extends BitField<keyof typeof PermissionFlagsB
|
|
|
265
241
|
*
|
|
266
242
|
* @returns An Array of permission names
|
|
267
243
|
*/
|
|
268
|
-
toArray(): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages"
|
|
244
|
+
toArray(): ("CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SendPolls" | "UseExternalApps" | "PinMessages")[];
|
|
269
245
|
}
|
|
270
246
|
|
|
271
247
|
declare const kData: unique symbol;
|
|
272
248
|
declare const kClone: unique symbol;
|
|
273
249
|
declare const kPatch: unique symbol;
|
|
274
250
|
declare const kExpiresTimestamp: unique symbol;
|
|
275
|
-
declare const kEndedTimestamp: unique symbol;
|
|
276
251
|
declare const kCreatedTimestamp: unique symbol;
|
|
277
|
-
declare const kEditedTimestamp: unique symbol;
|
|
278
252
|
declare const kArchiveTimestamp: unique symbol;
|
|
279
253
|
declare const kAllow: unique symbol;
|
|
280
254
|
declare const kDeny: unique symbol;
|
|
281
|
-
declare const kBurstColors: unique symbol;
|
|
282
255
|
declare const kLastPinTimestamp: unique symbol;
|
|
283
256
|
declare const kMixinConstruct: unique symbol;
|
|
284
257
|
declare const kMixinToJSON: unique symbol;
|
|
@@ -565,6 +538,12 @@ declare class Channel<Type extends ChannelType | 'unknown' = ChannelType, Omitte
|
|
|
565
538
|
* @param data - The raw data received from the API for the channel
|
|
566
539
|
*/
|
|
567
540
|
constructor(data: Partialize<ChannelDataType<Type>, Omitted>);
|
|
541
|
+
/**
|
|
542
|
+
* {@inheritDoc Structure.[kPatch]}
|
|
543
|
+
*
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
[kPatch](data: Partial<ChannelDataType<Type>>): this;
|
|
568
547
|
/**
|
|
569
548
|
* The id of the channel
|
|
570
549
|
*/
|
|
@@ -1104,19 +1083,6 @@ declare class VoiceChannel<Omitted extends keyof APIGuildVoiceChannel | '' = ''>
|
|
|
1104
1083
|
constructor(data: Partialize<APIGuildVoiceChannel, Omitted>);
|
|
1105
1084
|
}
|
|
1106
1085
|
|
|
1107
|
-
/**
|
|
1108
|
-
* Represents data for users, members, channels, and roles in the message's auto-populated select menus.
|
|
1109
|
-
*
|
|
1110
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1111
|
-
* @remarks has substructures `User`, `Channel`, `Role`, `Message`, `GuildMember`, `Attachment`, which need to be instantiated and stored by an extending class using it
|
|
1112
|
-
*/
|
|
1113
|
-
declare abstract class ResolvedInteractionData<Omitted extends keyof APIInteractionDataResolved | '' = ''> extends Structure<APIInteractionDataResolved, Omitted> {
|
|
1114
|
-
/**
|
|
1115
|
-
* @param data - The raw data received from the API for the connection
|
|
1116
|
-
*/
|
|
1117
|
-
constructor(data: Partialize<APIInteractionDataResolved, Omitted>);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
1086
|
interface APIActualInvite extends APIInvite, Partial<Omit<APIExtendedInvite, keyof APIInvite>> {
|
|
1121
1087
|
}
|
|
1122
1088
|
/**
|
|
@@ -1148,6 +1114,12 @@ declare class Invite<Omitted extends keyof APIActualInvite | '' = 'created_at' |
|
|
|
1148
1114
|
* @param data - The raw data received from the API for the invite
|
|
1149
1115
|
*/
|
|
1150
1116
|
constructor(data: Partialize<APIActualInvite, Omitted>);
|
|
1117
|
+
/**
|
|
1118
|
+
* {@inheritDoc Structure.[kPatch]}
|
|
1119
|
+
*
|
|
1120
|
+
* @internal
|
|
1121
|
+
*/
|
|
1122
|
+
[kPatch](data: Partial<APIActualInvite>): this;
|
|
1151
1123
|
/**
|
|
1152
1124
|
* {@inheritDoc Structure.optimizeData}
|
|
1153
1125
|
*
|
|
@@ -1231,1717 +1203,198 @@ declare class Invite<Omitted extends keyof APIActualInvite | '' = 'created_at' |
|
|
|
1231
1203
|
}
|
|
1232
1204
|
|
|
1233
1205
|
/**
|
|
1234
|
-
*
|
|
1235
|
-
*/
|
|
1236
|
-
type ComponentDataType<Type extends ComponentType | 'unknown'> = Type extends ComponentType ? Extract<APIMessageComponent | APIModalComponent, {
|
|
1237
|
-
type: Type;
|
|
1238
|
-
}> : APIBaseComponent<ComponentType>;
|
|
1239
|
-
declare abstract class Component<Type extends APIMessageComponent | APIModalComponent, Omitted extends keyof Type | '' = ''> extends Structure<Type, Omitted> {
|
|
1240
|
-
/**
|
|
1241
|
-
* @param data - The raw data received from the API for the component
|
|
1242
|
-
*/
|
|
1243
|
-
constructor(data: Partialize<Type, Omitted>);
|
|
1244
|
-
/**
|
|
1245
|
-
* 32 bit integer used as an optional identifier for component
|
|
1246
|
-
*/
|
|
1247
|
-
get id(): ReplaceOmittedWithUnknown<Omitted, Type>["id"] | undefined;
|
|
1248
|
-
/**
|
|
1249
|
-
* The type of the component
|
|
1250
|
-
*/
|
|
1251
|
-
get type(): ReplaceOmittedWithUnknown<Omitted, Type>["type"];
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
/**
|
|
1255
|
-
* Represents an action row component on a message or modal.
|
|
1256
|
-
*
|
|
1257
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1258
|
-
* @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1259
|
-
*/
|
|
1260
|
-
declare class ActionRowComponent<Type extends APIComponentInActionRow, Omitted extends keyof APIActionRowComponent<Type> | '' = ''> extends Component<ComponentDataType<ComponentType.ActionRow>, Omitted> {
|
|
1261
|
-
/**
|
|
1262
|
-
* The template used for removing data from the raw data stored for each ActionRowComponent.
|
|
1263
|
-
*/
|
|
1264
|
-
static readonly DataTemplate: Partial<ComponentDataType<ComponentType.ActionRow>>;
|
|
1265
|
-
/**
|
|
1266
|
-
* @param data - The raw data received from the API for the action row
|
|
1267
|
-
*/
|
|
1268
|
-
constructor(data: Partialize<ComponentDataType<ComponentType.ActionRow>, Omitted>);
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
/**
|
|
1272
|
-
* The data stored by a {@link ButtonComponent} structure based on its {@link (ButtonComponent:class)."style"} property.
|
|
1273
|
-
*/
|
|
1274
|
-
type ButtonDataType<Style extends ButtonStyle> = Style extends ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success ? APIButtonComponentWithCustomId : Extract<APIButtonComponent, {
|
|
1275
|
-
style: Style;
|
|
1276
|
-
}>;
|
|
1277
|
-
declare abstract class ButtonComponent<Style extends ButtonStyle, Omitted extends keyof ButtonDataType<Style> | '' = ''> extends Component<ButtonDataType<Style>, Omitted> {
|
|
1278
|
-
/**
|
|
1279
|
-
* @param data - The raw data received from the API for the button
|
|
1280
|
-
*/
|
|
1281
|
-
constructor(data: Partialize<ButtonDataType<Style>, Omitted>);
|
|
1282
|
-
/**
|
|
1283
|
-
* The style of the button
|
|
1284
|
-
*/
|
|
1285
|
-
get style(): ReplaceOmittedWithUnknown<Omitted, ButtonDataType<Style>>["style"];
|
|
1286
|
-
/**
|
|
1287
|
-
* The status of the button
|
|
1288
|
-
*/
|
|
1289
|
-
get disabled(): (ReplaceOmittedWithUnknown<Omitted, ButtonDataType<Style>>["disabled"] & boolean) | null;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
declare abstract class SelectMenuComponent<Type extends APISelectMenuComponent, Omitted extends keyof Type | '' = ''> extends Component<Type, Omitted> {
|
|
1293
|
-
/**
|
|
1294
|
-
* @param data - The raw data received from the API for the select menu
|
|
1295
|
-
*/
|
|
1296
|
-
constructor(data: Partialize<Type, Omitted>);
|
|
1297
|
-
/**
|
|
1298
|
-
* The customId to be sent in the interaction when a selection is made
|
|
1299
|
-
*/
|
|
1300
|
-
get customId(): ReplaceOmittedWithUnknown<Omitted, Type>["custom_id"];
|
|
1301
|
-
/**
|
|
1302
|
-
* Whether the select menu is disabled
|
|
1303
|
-
*/
|
|
1304
|
-
get disabled(): ReplaceOmittedWithUnknown<Omitted, Type>["disabled"] | undefined;
|
|
1305
|
-
/**
|
|
1306
|
-
* The maximum number of items that can be chosen
|
|
1307
|
-
*/
|
|
1308
|
-
get maxValues(): ReplaceOmittedWithUnknown<Omitted, Type>["max_values"] | undefined;
|
|
1309
|
-
/**
|
|
1310
|
-
* The minimum number of items that must be chosen
|
|
1311
|
-
*/
|
|
1312
|
-
get minValues(): ReplaceOmittedWithUnknown<Omitted, Type>["min_values"] | undefined;
|
|
1313
|
-
/**
|
|
1314
|
-
* Custom placeholder text if nothing is selected
|
|
1315
|
-
*/
|
|
1316
|
-
get placeholder(): ReplaceOmittedWithUnknown<Omitted, Type>["placeholder"] | undefined;
|
|
1317
|
-
/**
|
|
1318
|
-
* Whether a selection is required
|
|
1319
|
-
*/
|
|
1320
|
-
get required(): ReplaceOmittedWithUnknown<Omitted, Type>["required"] | undefined;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* Represents a channel select menu component.
|
|
1325
|
-
*
|
|
1326
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1327
|
-
* @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1328
|
-
*/
|
|
1329
|
-
declare class ChannelSelectMenuComponent<Omitted extends keyof APIChannelSelectComponent | '' = ''> extends SelectMenuComponent<APIChannelSelectComponent, Omitted> {
|
|
1330
|
-
/**
|
|
1331
|
-
* The template used for removing data from the raw data stored for each ChannelSelectMenuComponent.
|
|
1332
|
-
*/
|
|
1333
|
-
static readonly DataTemplate: Partial<APIChannelSelectComponent>;
|
|
1334
|
-
/**
|
|
1335
|
-
* @param data - The raw data received from the API for the channel select menu
|
|
1336
|
-
*/
|
|
1337
|
-
constructor(data: Partialize<APIChannelSelectComponent, Omitted>);
|
|
1338
|
-
/**
|
|
1339
|
-
* The list of channel types to include in the channel select component
|
|
1340
|
-
*/
|
|
1341
|
-
get channelTypes(): readonly ChannelType[] | null;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
/**
|
|
1345
|
-
* Represents a container component on a message.
|
|
1206
|
+
* Represents metadata of an avatar decoration of a User.
|
|
1346
1207
|
*
|
|
1347
1208
|
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1348
|
-
* @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1349
1209
|
*/
|
|
1350
|
-
declare class
|
|
1351
|
-
/**
|
|
1352
|
-
* The template used for removing data from the raw data stored for each ContainerComponent.
|
|
1353
|
-
*/
|
|
1354
|
-
static readonly DataTemplate: Partial<APIContainerComponent>;
|
|
1210
|
+
declare class AvatarDecorationData<Omitted extends keyof APIAvatarDecorationData | '' = ''> extends Structure<APIAvatarDecorationData, Omitted> {
|
|
1355
1211
|
/**
|
|
1356
|
-
*
|
|
1212
|
+
* The template used for removing data from the raw data stored for each Connection
|
|
1357
1213
|
*/
|
|
1358
|
-
|
|
1214
|
+
static readonly DataTemplate: Partial<APIAvatarDecorationData>;
|
|
1359
1215
|
/**
|
|
1360
|
-
*
|
|
1216
|
+
* @param data - The raw data received from the API for the connection
|
|
1361
1217
|
*/
|
|
1362
|
-
|
|
1218
|
+
constructor(data: Partialize<APIAvatarDecorationData, Omitted>);
|
|
1363
1219
|
/**
|
|
1364
|
-
* The
|
|
1220
|
+
* The id of the SKU this avatar decoration is part of.
|
|
1365
1221
|
*/
|
|
1366
|
-
get
|
|
1222
|
+
get skuId(): "sku_id" extends infer T ? T extends "sku_id" ? T extends Omitted ? unknown : APIAvatarDecorationData[T] : never : never;
|
|
1367
1223
|
/**
|
|
1368
|
-
*
|
|
1224
|
+
* The asset of this avatar decoration.
|
|
1369
1225
|
*/
|
|
1370
|
-
get
|
|
1226
|
+
get asset(): "asset" extends infer T ? T extends "asset" ? T extends Omitted ? unknown : APIAvatarDecorationData[T] : never : never;
|
|
1371
1227
|
}
|
|
1372
1228
|
|
|
1373
1229
|
/**
|
|
1374
|
-
* Represents
|
|
1230
|
+
* Represents any user on Discord.
|
|
1375
1231
|
*
|
|
1376
1232
|
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1377
|
-
* @remarks has a substructure `
|
|
1233
|
+
* @remarks has a substructure `AvatarDecorationData`, which needs to be instantiated and stored by an extending class using it
|
|
1378
1234
|
*/
|
|
1379
|
-
declare class
|
|
1380
|
-
/**
|
|
1381
|
-
* The template used for removing data from the raw data stored for each FileComponent.
|
|
1382
|
-
*/
|
|
1383
|
-
static readonly DataTemplate: Partial<APIFileComponent>;
|
|
1384
|
-
/**
|
|
1385
|
-
* @param data - The raw data received from the API for the file component
|
|
1386
|
-
*/
|
|
1387
|
-
constructor(data: Partialize<APIFileComponent, Omitted>);
|
|
1235
|
+
declare class User<Omitted extends keyof APIUser | '' = ''> extends Structure<APIUser, Omitted> {
|
|
1388
1236
|
/**
|
|
1389
|
-
*
|
|
1237
|
+
* The template used for removing data from the raw data stored for each User
|
|
1390
1238
|
*/
|
|
1391
|
-
|
|
1239
|
+
static readonly DataTemplate: Partial<APIUser>;
|
|
1392
1240
|
/**
|
|
1393
|
-
* The
|
|
1241
|
+
* @param data - The raw data received from the API for the user
|
|
1394
1242
|
*/
|
|
1395
|
-
|
|
1243
|
+
constructor(data: Partialize<APIUser, Omitted>);
|
|
1396
1244
|
/**
|
|
1397
|
-
*
|
|
1245
|
+
* {@inheritDoc Structure.[kPatch]}
|
|
1246
|
+
*
|
|
1247
|
+
* @internal
|
|
1398
1248
|
*/
|
|
1399
|
-
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Represents a file upload component on a modal.
|
|
1404
|
-
*
|
|
1405
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1406
|
-
*/
|
|
1407
|
-
declare class FileUploadComponent<Omitted extends keyof APIFileUploadComponent | '' = ''> extends Component<APIFileUploadComponent, Omitted> {
|
|
1249
|
+
[kPatch](data: Partial<APIUser>): this;
|
|
1408
1250
|
/**
|
|
1409
|
-
* The
|
|
1251
|
+
* The user's id
|
|
1410
1252
|
*/
|
|
1411
|
-
|
|
1253
|
+
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
1412
1254
|
/**
|
|
1413
|
-
*
|
|
1255
|
+
* The username of the user
|
|
1414
1256
|
*/
|
|
1415
|
-
|
|
1257
|
+
get username(): "username" extends infer T ? T extends "username" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
1416
1258
|
/**
|
|
1417
|
-
* The
|
|
1259
|
+
* The user's 4 digit tag, if a bot
|
|
1418
1260
|
*/
|
|
1419
|
-
get
|
|
1261
|
+
get discriminator(): "discriminator" extends infer T ? T extends "discriminator" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
1420
1262
|
/**
|
|
1421
|
-
* The
|
|
1263
|
+
* The user's display name, the application name for bots
|
|
1422
1264
|
*/
|
|
1423
|
-
get
|
|
1265
|
+
get globalName(): "global_name" extends infer T ? T extends "global_name" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
1424
1266
|
/**
|
|
1425
|
-
* The
|
|
1267
|
+
* The name displayed in the client for this user when no nickname is set
|
|
1426
1268
|
*/
|
|
1427
|
-
get
|
|
1269
|
+
get displayName(): ("username" extends infer T ? T extends "username" ? T extends Omitted ? unknown : APIUser[T] : never : never) | NonNullable<"global_name" extends infer T_1 ? T_1 extends "global_name" ? T_1 extends Omitted ? unknown : APIUser[T_1] : never : never>;
|
|
1428
1270
|
/**
|
|
1429
|
-
*
|
|
1271
|
+
* The user avatar's hash
|
|
1430
1272
|
*/
|
|
1431
|
-
get
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
/**
|
|
1435
|
-
* Base class for all buttons that can have a label on a message.
|
|
1436
|
-
*
|
|
1437
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1438
|
-
* @remarks has a substructure `ComponentEmoji` which needs to be instantiated and stored by an extending class using it
|
|
1439
|
-
*/
|
|
1440
|
-
declare abstract class LabeledButtonComponent<Style extends Exclude<ButtonStyle, ButtonStyle.Premium>, Omitted extends keyof ButtonDataType<Style> | '' = ''> extends ButtonComponent<Style, Omitted> {
|
|
1273
|
+
get avatar(): "avatar" extends infer T ? T extends "avatar" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
1441
1274
|
/**
|
|
1442
|
-
*
|
|
1275
|
+
* Whether the user is a bot
|
|
1443
1276
|
*/
|
|
1444
|
-
|
|
1277
|
+
get bot(): false | NonNullable<"bot" extends infer T ? T extends "bot" ? T extends Omitted ? unknown : APIUser[T] : never : never>;
|
|
1445
1278
|
/**
|
|
1446
|
-
*
|
|
1279
|
+
* Whether the user is an Official Discord System user
|
|
1447
1280
|
*/
|
|
1448
|
-
get
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
/**
|
|
1452
|
-
* Represents a button causing a message component interaction on a message.
|
|
1453
|
-
*
|
|
1454
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1455
|
-
*/
|
|
1456
|
-
declare class InteractiveButtonComponent<Style extends ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success, Omitted extends keyof APIButtonComponentWithCustomId | '' = ''> extends LabeledButtonComponent<Style, Omitted> {
|
|
1281
|
+
get system(): false | NonNullable<"system" extends infer T ? T extends "system" ? T extends Omitted ? unknown : APIUser[T] : never : never>;
|
|
1457
1282
|
/**
|
|
1458
|
-
*
|
|
1283
|
+
* Whether the user has mfa enabled
|
|
1284
|
+
*
|
|
1285
|
+
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope
|
|
1459
1286
|
*/
|
|
1460
|
-
|
|
1287
|
+
get mfaEnabled(): ("mfa_enabled" extends infer T ? T extends "mfa_enabled" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1461
1288
|
/**
|
|
1462
|
-
*
|
|
1289
|
+
* The user's banner hash
|
|
1290
|
+
*
|
|
1291
|
+
* @remarks This property is only set when the user was manually fetched
|
|
1463
1292
|
*/
|
|
1464
|
-
|
|
1293
|
+
get banner(): ("banner" extends infer T ? T extends "banner" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1465
1294
|
/**
|
|
1466
|
-
* The
|
|
1295
|
+
* The base 10 accent color of the user's banner
|
|
1296
|
+
*
|
|
1297
|
+
* @remarks This property is only set when the user was manually fetched
|
|
1467
1298
|
*/
|
|
1468
|
-
get
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
/**
|
|
1472
|
-
* Represents a button linking to an URL on a message.
|
|
1473
|
-
*
|
|
1474
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1475
|
-
*/
|
|
1476
|
-
declare class LinkButtonComponent<Omitted extends keyof APIButtonComponentWithURL | '' = ''> extends LabeledButtonComponent<ButtonStyle.Link, Omitted> {
|
|
1299
|
+
get accentColor(): ("accent_color" extends infer T ? T extends "accent_color" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1477
1300
|
/**
|
|
1478
|
-
* The
|
|
1301
|
+
* The user's primary Discord language
|
|
1302
|
+
*
|
|
1303
|
+
* @remarks This property is only set when the user was fetched with an Oauth2 token and the `identify` scope
|
|
1479
1304
|
*/
|
|
1480
|
-
|
|
1305
|
+
get locale(): ("locale" extends infer T ? T extends "locale" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1481
1306
|
/**
|
|
1482
|
-
*
|
|
1307
|
+
* Whether the email on the user's account has been verified
|
|
1308
|
+
*
|
|
1309
|
+
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope
|
|
1483
1310
|
*/
|
|
1484
|
-
|
|
1311
|
+
get verified(): ("verified" extends infer T ? T extends "verified" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1485
1312
|
/**
|
|
1486
|
-
* The
|
|
1313
|
+
* The user's email
|
|
1314
|
+
*
|
|
1315
|
+
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope
|
|
1487
1316
|
*/
|
|
1488
|
-
get
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
* Represents a media gallery component on a message.
|
|
1493
|
-
*
|
|
1494
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1495
|
-
* @remarks has `MediaGalleryItem`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1496
|
-
*/
|
|
1497
|
-
declare class MediaGalleryComponent<Omitted extends keyof APIMediaGalleryComponent | '' = ''> extends Component<APIMediaGalleryComponent, Omitted> {
|
|
1317
|
+
get email(): ("email" extends infer T ? T extends "email" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1498
1318
|
/**
|
|
1499
|
-
* The
|
|
1319
|
+
* The type of nitro subscription on the user's account
|
|
1320
|
+
*
|
|
1321
|
+
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope
|
|
1500
1322
|
*/
|
|
1501
|
-
|
|
1323
|
+
get premiumType(): ("premium_type" extends infer T ? T extends "premium_type" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1502
1324
|
/**
|
|
1503
|
-
*
|
|
1325
|
+
* The timestamp the user was created at
|
|
1504
1326
|
*/
|
|
1505
|
-
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* Represents a mentionable select menu component.
|
|
1510
|
-
*
|
|
1511
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1512
|
-
* @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1513
|
-
*/
|
|
1514
|
-
declare class MentionableSelectMenuComponent<Omitted extends keyof APIMentionableSelectComponent | '' = ''> extends SelectMenuComponent<APIMentionableSelectComponent, Omitted> {
|
|
1327
|
+
get createdTimestamp(): number | null;
|
|
1515
1328
|
/**
|
|
1516
|
-
* The
|
|
1329
|
+
* The time the user was created at
|
|
1517
1330
|
*/
|
|
1518
|
-
|
|
1331
|
+
get createdAt(): Date | null;
|
|
1519
1332
|
/**
|
|
1520
|
-
*
|
|
1333
|
+
* The hexadecimal version of the user accent color, with a leading hash
|
|
1334
|
+
*
|
|
1335
|
+
* @remarks This property is only set when the user was manually fetched
|
|
1521
1336
|
*/
|
|
1522
|
-
|
|
1337
|
+
get hexAccentColor(): string | ("accent_color" extends infer T ? T extends "accent_color" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
1523
1338
|
}
|
|
1524
1339
|
|
|
1525
1340
|
/**
|
|
1526
|
-
* Represents a
|
|
1341
|
+
* Represents a user's connection on Discord.
|
|
1527
1342
|
*
|
|
1528
1343
|
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1529
1344
|
*/
|
|
1530
|
-
declare class
|
|
1531
|
-
/**
|
|
1532
|
-
* The template used for removing data from the raw data stored for each PremiumButtonComponent.
|
|
1533
|
-
*/
|
|
1534
|
-
static readonly DataTemplate: Partial<APIButtonComponentWithSKUId>;
|
|
1345
|
+
declare class Connection<Omitted extends keyof APIConnection | '' = ''> extends Structure<APIConnection, Omitted> {
|
|
1535
1346
|
/**
|
|
1536
|
-
*
|
|
1347
|
+
* The template used for removing data from the raw data stored for each Connection
|
|
1537
1348
|
*/
|
|
1538
|
-
|
|
1349
|
+
static readonly DataTemplate: Partial<APIConnection>;
|
|
1539
1350
|
/**
|
|
1540
|
-
* The
|
|
1351
|
+
* @param data - The raw data received from the API for the connection
|
|
1541
1352
|
*/
|
|
1542
|
-
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
/**
|
|
1546
|
-
* Represents a role select menu component.
|
|
1547
|
-
*
|
|
1548
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1549
|
-
* @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1550
|
-
*/
|
|
1551
|
-
declare class RoleSelectMenuComponent<Omitted extends keyof APIRoleSelectComponent | '' = ''> extends SelectMenuComponent<APIRoleSelectComponent, Omitted> {
|
|
1353
|
+
constructor(data: Partialize<APIConnection, Omitted>);
|
|
1552
1354
|
/**
|
|
1553
|
-
*
|
|
1355
|
+
* {@inheritDoc Structure.[kPatch]}
|
|
1356
|
+
*
|
|
1357
|
+
* @internal
|
|
1554
1358
|
*/
|
|
1555
|
-
|
|
1359
|
+
[kPatch](data: Partial<APIConnection>): this;
|
|
1556
1360
|
/**
|
|
1557
|
-
*
|
|
1361
|
+
* The id of the connection account
|
|
1558
1362
|
*/
|
|
1559
|
-
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
/**
|
|
1563
|
-
* Represents a section component on a message.
|
|
1564
|
-
*
|
|
1565
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1566
|
-
* @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1567
|
-
*/
|
|
1568
|
-
declare class SectionComponent<Omitted extends keyof APISectionComponent | '' = ''> extends Component<APISectionComponent, Omitted> {
|
|
1363
|
+
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1569
1364
|
/**
|
|
1570
|
-
* The
|
|
1365
|
+
* The username of the connection account
|
|
1571
1366
|
*/
|
|
1572
|
-
|
|
1367
|
+
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1573
1368
|
/**
|
|
1574
|
-
*
|
|
1369
|
+
* The type of service this connection is for
|
|
1575
1370
|
*/
|
|
1576
|
-
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* Represents a separator component on a message.
|
|
1581
|
-
*
|
|
1582
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1583
|
-
*/
|
|
1584
|
-
declare class SeparatorComponent<Omitted extends keyof APISeparatorComponent | '' = ''> extends Component<APISeparatorComponent, Omitted> {
|
|
1371
|
+
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1585
1372
|
/**
|
|
1586
|
-
*
|
|
1373
|
+
* Whether the connection is revoked
|
|
1587
1374
|
*/
|
|
1588
|
-
|
|
1375
|
+
get revoked(): false | NonNullable<"revoked" extends infer T ? T extends "revoked" ? T extends Omitted ? unknown : APIConnection[T] : never : never>;
|
|
1589
1376
|
/**
|
|
1590
|
-
*
|
|
1377
|
+
* Whether the connection is verified
|
|
1591
1378
|
*/
|
|
1592
|
-
|
|
1379
|
+
get verified(): "verified" extends infer T ? T extends "verified" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1593
1380
|
/**
|
|
1594
|
-
* Whether
|
|
1381
|
+
* Whether friend sync is enabled for this connection
|
|
1595
1382
|
*/
|
|
1596
|
-
get
|
|
1383
|
+
get friendSync(): "friend_sync" extends infer T ? T extends "friend_sync" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1597
1384
|
/**
|
|
1598
|
-
*
|
|
1385
|
+
* Whether activities related to this connection are shown in the users presence
|
|
1599
1386
|
*/
|
|
1600
|
-
get
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Represents a string select menu component.
|
|
1605
|
-
*
|
|
1606
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1607
|
-
* @remarks has `StringSelectMenuOption`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1608
|
-
*/
|
|
1609
|
-
declare class StringSelectMenuComponent<Omitted extends keyof APIStringSelectComponent | '' = ''> extends SelectMenuComponent<APIStringSelectComponent, Omitted> {
|
|
1387
|
+
get showActivity(): "show_activity" extends infer T ? T extends "show_activity" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1610
1388
|
/**
|
|
1611
|
-
*
|
|
1389
|
+
* Whether this connection has an Oauth2 token for console voice transfer
|
|
1612
1390
|
*/
|
|
1613
|
-
|
|
1391
|
+
get twoWayLink(): "two_way_link" extends infer T ? T extends "two_way_link" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1614
1392
|
/**
|
|
1615
|
-
*
|
|
1393
|
+
* The visibility state for this connection
|
|
1616
1394
|
*/
|
|
1617
|
-
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
/**
|
|
1621
|
-
* Represents a text display component on a message.
|
|
1622
|
-
*
|
|
1623
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1624
|
-
*/
|
|
1625
|
-
declare class TextDisplayComponent<Omitted extends keyof APITextDisplayComponent | '' = ''> extends Component<APITextDisplayComponent, Omitted> {
|
|
1626
|
-
/**
|
|
1627
|
-
* The template used for removing data from the raw data stored for each TextDisplayComponent.
|
|
1628
|
-
*/
|
|
1629
|
-
static readonly DataTemplate: Partial<APITextDisplayComponent>;
|
|
1630
|
-
/**
|
|
1631
|
-
* @param data - The raw data received from the API for the text display
|
|
1632
|
-
*/
|
|
1633
|
-
constructor(data: Partialize<APITextDisplayComponent, Omitted>);
|
|
1634
|
-
/**
|
|
1635
|
-
* Text that will be displayed similar to a message
|
|
1636
|
-
*/
|
|
1637
|
-
get content(): "content" extends infer T ? T extends "content" ? T extends Omitted ? unknown : APITextDisplayComponent[T] : never : never;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* Represents a text input component on a message.
|
|
1642
|
-
*
|
|
1643
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1644
|
-
*/
|
|
1645
|
-
declare class TextInputComponent<Omitted extends keyof APITextInputComponent | '' = ''> extends Component<APITextInputComponent, Omitted> {
|
|
1646
|
-
/**
|
|
1647
|
-
* The template used for removing data from the raw data stored for each TextInputComponent.
|
|
1648
|
-
*/
|
|
1649
|
-
static readonly DataTemplate: Partial<APITextInputComponent>;
|
|
1650
|
-
/**
|
|
1651
|
-
* @param data - The raw data received from the API for the text input
|
|
1652
|
-
*/
|
|
1653
|
-
constructor(data: Partialize<APITextInputComponent, Omitted>);
|
|
1654
|
-
/**
|
|
1655
|
-
* The custom id for the text input
|
|
1656
|
-
*/
|
|
1657
|
-
get customId(): "custom_id" extends infer T ? T extends "custom_id" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never;
|
|
1658
|
-
/**
|
|
1659
|
-
* Text that appears on top of the text input field
|
|
1660
|
-
*/
|
|
1661
|
-
get label(): ("label" extends infer T ? T extends "label" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1662
|
-
/**
|
|
1663
|
-
* The maximal length of text input
|
|
1664
|
-
*/
|
|
1665
|
-
get maxLength(): ("max_length" extends infer T ? T extends "max_length" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1666
|
-
/**
|
|
1667
|
-
* The minimal length of text input
|
|
1668
|
-
*/
|
|
1669
|
-
get minLength(): ("min_length" extends infer T ? T extends "min_length" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1670
|
-
/**
|
|
1671
|
-
* The placeholder for the text input
|
|
1672
|
-
*/
|
|
1673
|
-
get placeholder(): ("placeholder" extends infer T ? T extends "placeholder" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1674
|
-
/**
|
|
1675
|
-
* Whether this text input is required
|
|
1676
|
-
*/
|
|
1677
|
-
get required(): ("required" extends infer T ? T extends "required" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1678
|
-
/**
|
|
1679
|
-
* One of text input styles
|
|
1680
|
-
*/
|
|
1681
|
-
get style(): "style" extends infer T ? T extends "style" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never;
|
|
1682
|
-
/**
|
|
1683
|
-
* The pre-filled text in the text input
|
|
1684
|
-
*/
|
|
1685
|
-
get value(): ("value" extends infer T ? T extends "value" ? T extends Omitted ? unknown : APITextInputComponent[T] : never : never) | undefined;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
/**
|
|
1689
|
-
* Represents a thumbnail component on a message.
|
|
1690
|
-
*
|
|
1691
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1692
|
-
* @remarks has a substructure `UnfurledMediaItem` which needs to be instantiated and stored by an extending class using it
|
|
1693
|
-
*/
|
|
1694
|
-
declare class ThumbnailComponent<Omitted extends keyof APIThumbnailComponent | '' = ''> extends Component<APIThumbnailComponent, Omitted> {
|
|
1695
|
-
/**
|
|
1696
|
-
* The template used for removing data from the raw data stored for each ThumbnailComponent.
|
|
1697
|
-
*/
|
|
1698
|
-
static readonly DataTemplate: Partial<APIThumbnailComponent>;
|
|
1699
|
-
/**
|
|
1700
|
-
* @param data - The raw data received from the API for the thumbnail
|
|
1701
|
-
*/
|
|
1702
|
-
constructor(data: Partialize<APIThumbnailComponent, Omitted>);
|
|
1703
|
-
/**
|
|
1704
|
-
* Alt text for the media
|
|
1705
|
-
*/
|
|
1706
|
-
get description(): ("description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APIThumbnailComponent[T] : never : never) | undefined;
|
|
1707
|
-
/**
|
|
1708
|
-
* Whether the thumbnail should be a spoiler (or blurred out)
|
|
1709
|
-
*/
|
|
1710
|
-
get spoiler(): ("spoiler" extends infer T ? T extends "spoiler" ? T extends Omitted ? unknown : APIThumbnailComponent[T] : never : never) | undefined;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
|
-
/**
|
|
1714
|
-
* Represents a user select menu component.
|
|
1715
|
-
*
|
|
1716
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1717
|
-
* @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it
|
|
1718
|
-
*/
|
|
1719
|
-
declare class UserSelectMenuComponent<Omitted extends keyof APIUserSelectComponent | '' = ''> extends SelectMenuComponent<APIUserSelectComponent, Omitted> {
|
|
1720
|
-
/**
|
|
1721
|
-
* The template used for removing data from the raw data stored for each UserSelectMenuComponent.
|
|
1722
|
-
*/
|
|
1723
|
-
static readonly DataTemplate: Partial<APIUserSelectComponent>;
|
|
1724
|
-
/**
|
|
1725
|
-
* @param data - The raw data received from the API for the user select menu
|
|
1726
|
-
*/
|
|
1727
|
-
constructor(data: Partialize<APIUserSelectComponent, Omitted>);
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
declare class ComponentEmoji<Omitted extends keyof APIMessageComponentEmoji | '' = ''> extends Structure<APIMessageComponentEmoji, Omitted> {
|
|
1731
|
-
/**
|
|
1732
|
-
* The template used for removing data from the raw data stored for each ComponentEmoji.
|
|
1733
|
-
*/
|
|
1734
|
-
static readonly DataTemplate: Partial<APIMessageComponentEmoji>;
|
|
1735
|
-
/**
|
|
1736
|
-
* @param data - The raw data received from the API for the component emoji
|
|
1737
|
-
*/
|
|
1738
|
-
constructor(data: Partialize<APIMessageComponentEmoji, Omitted>);
|
|
1739
|
-
/**
|
|
1740
|
-
* The id of the emoji
|
|
1741
|
-
*/
|
|
1742
|
-
get id(): ("id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIMessageComponentEmoji[T] : never : never) | undefined;
|
|
1743
|
-
/**
|
|
1744
|
-
* The name of the emoji
|
|
1745
|
-
*/
|
|
1746
|
-
get name(): ("name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIMessageComponentEmoji[T] : never : never) | undefined;
|
|
1747
|
-
/**
|
|
1748
|
-
* Whether this emoji is animated
|
|
1749
|
-
*/
|
|
1750
|
-
get animated(): ("animated" extends infer T ? T extends "animated" ? T extends Omitted ? unknown : APIMessageComponentEmoji[T] : never : never) | undefined;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
/**
|
|
1754
|
-
* Represents an item in a media gallery on a message.
|
|
1755
|
-
*
|
|
1756
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1757
|
-
* @remarks has a substructure `UnfurledMediaItem` which needs to be instantiated and stored by an extending class using it
|
|
1758
|
-
*/
|
|
1759
|
-
declare class MediaGalleryItem<Omitted extends keyof APIMediaGalleryItem | '' = ''> extends Structure<APIMediaGalleryItem, Omitted> {
|
|
1760
|
-
/**
|
|
1761
|
-
* The template used for removing data from the raw data stored for each MediaGalleryItem.
|
|
1762
|
-
*/
|
|
1763
|
-
static readonly DataTemplate: Partial<APIMediaGalleryItem>;
|
|
1764
|
-
/**
|
|
1765
|
-
* @param data - The raw data received from the API for the media gallery item
|
|
1766
|
-
*/
|
|
1767
|
-
constructor(data: Partialize<APIMediaGalleryItem, Omitted>);
|
|
1768
|
-
/**
|
|
1769
|
-
* Alt text for the media
|
|
1770
|
-
*/
|
|
1771
|
-
get description(): ("description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APIMediaGalleryItem[T] : never : never) | undefined;
|
|
1772
|
-
/**
|
|
1773
|
-
* Whether the media should be a spoiler (or blurred out)
|
|
1774
|
-
*/
|
|
1775
|
-
get spoiler(): ("spoiler" extends infer T ? T extends "spoiler" ? T extends Omitted ? unknown : APIMediaGalleryItem[T] : never : never) | undefined;
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
declare class SelectMenuDefaultValue<Type extends SelectMenuDefaultValueType, Omitted extends keyof APISelectMenuDefaultValue<Type> | '' = ''> extends Structure<APISelectMenuDefaultValue<Type>, Omitted> {
|
|
1779
|
-
/**
|
|
1780
|
-
* The template used for removing data from the raw data stored for each SelectMenuDefaultValue.
|
|
1781
|
-
*/
|
|
1782
|
-
static readonly DataTemplate: Partial<APISelectMenuDefaultValue<SelectMenuDefaultValueType>>;
|
|
1783
|
-
/**
|
|
1784
|
-
* @param data - The raw data received from the API for the select menu default value
|
|
1785
|
-
*/
|
|
1786
|
-
constructor(data: Partialize<APISelectMenuDefaultValue<Type>, Omitted>);
|
|
1787
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APISelectMenuDefaultValue<Type>[T] : never : never;
|
|
1788
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APISelectMenuDefaultValue<Type>[T] : never : never;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
/**
|
|
1792
|
-
* Represents an option in a string select menu component.
|
|
1793
|
-
*
|
|
1794
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1795
|
-
* @remarks has a substructure `ComponentEmoji` which needs to be instantiated and stored by an extending class using it
|
|
1796
|
-
*/
|
|
1797
|
-
declare class StringSelectMenuOption<Omitted extends keyof APISelectMenuOption | '' = ''> extends Structure<APISelectMenuOption, Omitted> {
|
|
1798
|
-
/**
|
|
1799
|
-
* The template used for removing data from the raw data stored for each StringSelectMenuOption.
|
|
1800
|
-
*/
|
|
1801
|
-
static readonly DataTemplate: Partial<APISelectMenuOption>;
|
|
1802
|
-
/**
|
|
1803
|
-
* @param data - The raw data received from the API for the string select menu option
|
|
1804
|
-
*/
|
|
1805
|
-
constructor(data: Partialize<APISelectMenuOption, Omitted>);
|
|
1806
|
-
/**
|
|
1807
|
-
* Whether this option should be already-selected by default
|
|
1808
|
-
*/
|
|
1809
|
-
get default(): ("default" extends infer T ? T extends "default" ? T extends Omitted ? unknown : APISelectMenuOption[T] : never : never) | undefined;
|
|
1810
|
-
/**
|
|
1811
|
-
* An additional description of the option
|
|
1812
|
-
*/
|
|
1813
|
-
get description(): ("description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APISelectMenuOption[T] : never : never) | undefined;
|
|
1814
|
-
/**
|
|
1815
|
-
* The user-facing name of the option
|
|
1816
|
-
*/
|
|
1817
|
-
get label(): "label" extends infer T ? T extends "label" ? T extends Omitted ? unknown : APISelectMenuOption[T] : never : never;
|
|
1818
|
-
/**
|
|
1819
|
-
* The dev-defined value of the option
|
|
1820
|
-
*/
|
|
1821
|
-
get value(): "value" extends infer T ? T extends "value" ? T extends Omitted ? unknown : APISelectMenuOption[T] : never : never;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
/**
|
|
1825
|
-
* Represents a media item in a component on a message.
|
|
1826
|
-
*
|
|
1827
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1828
|
-
*/
|
|
1829
|
-
declare class UnfurledMediaItem<Omitted extends keyof APIUnfurledMediaItem | '' = ''> extends Structure<APIUnfurledMediaItem, Omitted> {
|
|
1830
|
-
/**
|
|
1831
|
-
* The template used for removing data from the raw data stored for each UnfurledMediaItem.
|
|
1832
|
-
*/
|
|
1833
|
-
static readonly DataTemplate: Partial<APIUnfurledMediaItem>;
|
|
1834
|
-
/**
|
|
1835
|
-
* @param data - The raw data received from the API for the unfurled media item
|
|
1836
|
-
*/
|
|
1837
|
-
constructor(data: Partialize<APIUnfurledMediaItem, Omitted>);
|
|
1838
|
-
/**
|
|
1839
|
-
* The id of the uploaded attachment
|
|
1840
|
-
*/
|
|
1841
|
-
get attachmentId(): ("attachment_id" extends infer T ? T extends "attachment_id" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never) | undefined;
|
|
1842
|
-
/**
|
|
1843
|
-
* The media type of the content
|
|
1844
|
-
*/
|
|
1845
|
-
get contentType(): ("content_type" extends infer T ? T extends "content_type" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never) | undefined;
|
|
1846
|
-
/**
|
|
1847
|
-
* The height of the media item (if image)
|
|
1848
|
-
*/
|
|
1849
|
-
get height(): ("height" extends infer T ? T extends "height" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never) | undefined;
|
|
1850
|
-
/**
|
|
1851
|
-
* The proxied URL of the media item
|
|
1852
|
-
*/
|
|
1853
|
-
get proxyURL(): ("proxy_url" extends infer T ? T extends "proxy_url" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never) | undefined;
|
|
1854
|
-
/**
|
|
1855
|
-
* Supports arbitrary URLs and attachment:// references
|
|
1856
|
-
*/
|
|
1857
|
-
get url(): "url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never;
|
|
1858
|
-
/**
|
|
1859
|
-
* The width of the media item (if image)
|
|
1860
|
-
*/
|
|
1861
|
-
get width(): ("width" extends infer T ? T extends "width" ? T extends Omitted ? unknown : APIUnfurledMediaItem[T] : never : never) | undefined;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
/**
|
|
1865
|
-
* Represents an embed on a message.
|
|
1866
|
-
*
|
|
1867
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1868
|
-
* @remarks has substructures `EmbedAuthor`, `EmbedFooter`, `EmbedField`, `EmbedImage`, `EmbedThumbnail`, `EmbedProvider`, `EmbedVideo` which need to be instantiated and stored by an extending class using it
|
|
1869
|
-
*/
|
|
1870
|
-
declare class Embed<Omitted extends keyof APIEmbed | '' = ''> extends Structure<APIEmbed, Omitted> {
|
|
1871
|
-
/**
|
|
1872
|
-
* The template used for removing data from the raw data stored for each Embed.
|
|
1873
|
-
*/
|
|
1874
|
-
static readonly DataTemplate: Partial<APIEmbed>;
|
|
1875
|
-
protected [kCreatedTimestamp]: number | null;
|
|
1876
|
-
/**
|
|
1877
|
-
* @param data - The raw data received from the API for the connection
|
|
1878
|
-
*/
|
|
1879
|
-
constructor(data: Partialize<APIEmbed, Omitted>);
|
|
1880
|
-
/**
|
|
1881
|
-
* {@inheritDoc Structure.optimizeData}
|
|
1882
|
-
*
|
|
1883
|
-
* @internal
|
|
1884
|
-
*/
|
|
1885
|
-
protected optimizeData(data: Partial<APIEmbed>): void;
|
|
1886
|
-
/**
|
|
1887
|
-
* The color code of the embed
|
|
1888
|
-
*/
|
|
1889
|
-
get color(): ("color" extends infer T ? T extends "color" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1890
|
-
/**
|
|
1891
|
-
* The hexadecimal version of the embed color, with a leading hash
|
|
1892
|
-
*/
|
|
1893
|
-
get hexColor(): string | ("color" extends infer T ? T extends "color" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1894
|
-
/**
|
|
1895
|
-
* The description of the embed
|
|
1896
|
-
*/
|
|
1897
|
-
get description(): ("description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1898
|
-
/**
|
|
1899
|
-
* THe title of the embed
|
|
1900
|
-
*/
|
|
1901
|
-
get title(): ("title" extends infer T ? T extends "title" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1902
|
-
/**
|
|
1903
|
-
* The timestamp of the embed content
|
|
1904
|
-
*/
|
|
1905
|
-
get timestamp(): number | null;
|
|
1906
|
-
/**
|
|
1907
|
-
* The type of embed (always "rich" for webhook embeds)
|
|
1908
|
-
*/
|
|
1909
|
-
get type(): ("type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1910
|
-
/**
|
|
1911
|
-
* The URL of the embed
|
|
1912
|
-
*/
|
|
1913
|
-
get url(): ("url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbed[T] : never : never) | undefined;
|
|
1914
|
-
/**
|
|
1915
|
-
* {@inheritDoc Structure.toJSON}
|
|
1916
|
-
*/
|
|
1917
|
-
toJSON(): APIEmbed;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
/**
|
|
1921
|
-
* Represents author data in an embed on a message.
|
|
1922
|
-
*
|
|
1923
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1924
|
-
*/
|
|
1925
|
-
declare class EmbedAuthor<Omitted extends keyof APIEmbedAuthor | '' = ''> extends Structure<APIEmbedAuthor, Omitted> {
|
|
1926
|
-
/**
|
|
1927
|
-
* @param data - The raw data received from the API for the connection
|
|
1928
|
-
*/
|
|
1929
|
-
constructor(data: Partialize<APIEmbedAuthor, Omitted>);
|
|
1930
|
-
/**
|
|
1931
|
-
* The name of the author
|
|
1932
|
-
*/
|
|
1933
|
-
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIEmbedAuthor[T] : never : never;
|
|
1934
|
-
/**
|
|
1935
|
-
* The URL of author icon
|
|
1936
|
-
*/
|
|
1937
|
-
get iconURL(): ("icon_url" extends infer T ? T extends "icon_url" ? T extends Omitted ? unknown : APIEmbedAuthor[T] : never : never) | undefined;
|
|
1938
|
-
/**
|
|
1939
|
-
* A proxied URL of author icon
|
|
1940
|
-
*/
|
|
1941
|
-
get proxyIconURL(): ("proxy_icon_url" extends infer T ? T extends "proxy_icon_url" ? T extends Omitted ? unknown : APIEmbedAuthor[T] : never : never) | undefined;
|
|
1942
|
-
/**
|
|
1943
|
-
* The URL of the author
|
|
1944
|
-
*/
|
|
1945
|
-
get url(): ("url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbedAuthor[T] : never : never) | undefined;
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
/**
|
|
1949
|
-
* Represents a field's data in an embed on a message.
|
|
1950
|
-
*
|
|
1951
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1952
|
-
*/
|
|
1953
|
-
declare class EmbedField<Omitted extends keyof APIEmbedField | '' = ''> extends Structure<APIEmbedField, Omitted> {
|
|
1954
|
-
/**
|
|
1955
|
-
* @param data - The raw data received from the API for the connection
|
|
1956
|
-
*/
|
|
1957
|
-
constructor(data: Partialize<APIEmbedField, Omitted>);
|
|
1958
|
-
/**
|
|
1959
|
-
* The name of the field
|
|
1960
|
-
*/
|
|
1961
|
-
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIEmbedField[T] : never : never;
|
|
1962
|
-
/**
|
|
1963
|
-
* The value of the field
|
|
1964
|
-
*/
|
|
1965
|
-
get value(): "value" extends infer T ? T extends "value" ? T extends Omitted ? unknown : APIEmbedField[T] : never : never;
|
|
1966
|
-
/**
|
|
1967
|
-
* Whether this field should display inline
|
|
1968
|
-
*/
|
|
1969
|
-
get inline(): ("inline" extends infer T ? T extends "inline" ? T extends Omitted ? unknown : APIEmbedField[T] : never : never) | undefined;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
/**
|
|
1973
|
-
* Represents footer data in an embed on a message.
|
|
1974
|
-
*
|
|
1975
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
1976
|
-
*/
|
|
1977
|
-
declare class EmbedFooter<Omitted extends keyof APIEmbedFooter | '' = ''> extends Structure<APIEmbedFooter, Omitted> {
|
|
1978
|
-
/**
|
|
1979
|
-
* @param data - The raw data received from the API for the connection
|
|
1980
|
-
*/
|
|
1981
|
-
constructor(data: Partialize<APIEmbedFooter, Omitted>);
|
|
1982
|
-
/**
|
|
1983
|
-
* The footer text
|
|
1984
|
-
*/
|
|
1985
|
-
get text(): "text" extends infer T ? T extends "text" ? T extends Omitted ? unknown : APIEmbedFooter[T] : never : never;
|
|
1986
|
-
/**
|
|
1987
|
-
* The URL of the footer icon
|
|
1988
|
-
*/
|
|
1989
|
-
get iconURL(): ("icon_url" extends infer T ? T extends "icon_url" ? T extends Omitted ? unknown : APIEmbedFooter[T] : never : never) | undefined;
|
|
1990
|
-
/**
|
|
1991
|
-
* A proxied URL of the footer icon
|
|
1992
|
-
*/
|
|
1993
|
-
get proxyIconURL(): ("proxy_icon_url" extends infer T ? T extends "proxy_icon_url" ? T extends Omitted ? unknown : APIEmbedFooter[T] : never : never) | undefined;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
/**
|
|
1997
|
-
* Represents image data in an embed on a message.
|
|
1998
|
-
*
|
|
1999
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2000
|
-
*/
|
|
2001
|
-
declare class EmbedImage<Omitted extends keyof APIEmbedImage | '' = ''> extends Structure<APIEmbedImage, Omitted> {
|
|
2002
|
-
/**
|
|
2003
|
-
* @param data - The raw data received from the API for the connection
|
|
2004
|
-
*/
|
|
2005
|
-
constructor(data: Partialize<APIEmbedImage, Omitted>);
|
|
2006
|
-
/**
|
|
2007
|
-
* The height of the image
|
|
2008
|
-
*/
|
|
2009
|
-
get height(): ("height" extends infer T ? T extends "height" ? T extends Omitted ? unknown : APIEmbedImage[T] : never : never) | undefined;
|
|
2010
|
-
/**
|
|
2011
|
-
* The width of the image
|
|
2012
|
-
*/
|
|
2013
|
-
get width(): ("width" extends infer T ? T extends "width" ? T extends Omitted ? unknown : APIEmbedImage[T] : never : never) | undefined;
|
|
2014
|
-
/**
|
|
2015
|
-
* A proxied URL of the image
|
|
2016
|
-
*/
|
|
2017
|
-
get proxyURL(): ("proxy_url" extends infer T ? T extends "proxy_url" ? T extends Omitted ? unknown : APIEmbedImage[T] : never : never) | undefined;
|
|
2018
|
-
/**
|
|
2019
|
-
* Source URL of the image
|
|
2020
|
-
*/
|
|
2021
|
-
get url(): "url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbedImage[T] : never : never;
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
/**
|
|
2025
|
-
* Represents provider data in an embed on a message.
|
|
2026
|
-
*
|
|
2027
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2028
|
-
*/
|
|
2029
|
-
declare class EmbedProvider<Omitted extends keyof APIEmbedProvider | '' = ''> extends Structure<APIEmbedProvider, Omitted> {
|
|
2030
|
-
/**
|
|
2031
|
-
* @param data - The raw data received from the API for the connection
|
|
2032
|
-
*/
|
|
2033
|
-
constructor(data: Partialize<APIEmbedProvider, Omitted>);
|
|
2034
|
-
/**
|
|
2035
|
-
* The name of the provider
|
|
2036
|
-
*/
|
|
2037
|
-
get name(): ("name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIEmbedProvider[T] : never : never) | undefined;
|
|
2038
|
-
/**
|
|
2039
|
-
* The URL of the provider
|
|
2040
|
-
*/
|
|
2041
|
-
get url(): ("url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbedProvider[T] : never : never) | undefined;
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
/**
|
|
2045
|
-
* Represents thumbnail data in an embed on a message.
|
|
2046
|
-
*
|
|
2047
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2048
|
-
*/
|
|
2049
|
-
declare class EmbedThumbnail<Omitted extends keyof APIEmbedThumbnail | '' = ''> extends Structure<APIEmbedThumbnail, Omitted> {
|
|
2050
|
-
/**
|
|
2051
|
-
* @param data - The raw data received from the API for the connection
|
|
2052
|
-
*/
|
|
2053
|
-
constructor(data: Partialize<APIEmbedThumbnail, Omitted>);
|
|
2054
|
-
/**
|
|
2055
|
-
* The height of the thumbnail
|
|
2056
|
-
*/
|
|
2057
|
-
get height(): ("height" extends infer T ? T extends "height" ? T extends Omitted ? unknown : APIEmbedThumbnail[T] : never : never) | undefined;
|
|
2058
|
-
/**
|
|
2059
|
-
* The width of the thumbnail
|
|
2060
|
-
*/
|
|
2061
|
-
get width(): ("width" extends infer T ? T extends "width" ? T extends Omitted ? unknown : APIEmbedThumbnail[T] : never : never) | undefined;
|
|
2062
|
-
/**
|
|
2063
|
-
* A proxied URL of the thumbnail
|
|
2064
|
-
*/
|
|
2065
|
-
get proxyURL(): ("proxy_url" extends infer T ? T extends "proxy_url" ? T extends Omitted ? unknown : APIEmbedThumbnail[T] : never : never) | undefined;
|
|
2066
|
-
/**
|
|
2067
|
-
* The source URL of the thumbnail
|
|
2068
|
-
*/
|
|
2069
|
-
get url(): "url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbedThumbnail[T] : never : never;
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
* Represents video data in an embed on a message.
|
|
2074
|
-
*
|
|
2075
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2076
|
-
*/
|
|
2077
|
-
declare class EmbedVideo<Omitted extends keyof APIEmbedVideo | '' = ''> extends Structure<APIEmbedVideo, Omitted> {
|
|
2078
|
-
/**
|
|
2079
|
-
* @param data - The raw data received from the API for the connection
|
|
2080
|
-
*/
|
|
2081
|
-
constructor(data: Partialize<APIEmbedVideo, Omitted>);
|
|
2082
|
-
/**
|
|
2083
|
-
* The height of the video
|
|
2084
|
-
*/
|
|
2085
|
-
get height(): ("height" extends infer T ? T extends "height" ? T extends Omitted ? unknown : APIEmbedVideo[T] : never : never) | undefined;
|
|
2086
|
-
/**
|
|
2087
|
-
* The width of the video
|
|
2088
|
-
*/
|
|
2089
|
-
get width(): ("width" extends infer T ? T extends "width" ? T extends Omitted ? unknown : APIEmbedVideo[T] : never : never) | undefined;
|
|
2090
|
-
/**
|
|
2091
|
-
* A proxied URL of the video
|
|
2092
|
-
*/
|
|
2093
|
-
get proxyURL(): ("proxy_url" extends infer T ? T extends "proxy_url" ? T extends Omitted ? unknown : APIEmbedVideo[T] : never : never) | undefined;
|
|
2094
|
-
/**
|
|
2095
|
-
* The source URL of the video
|
|
2096
|
-
*/
|
|
2097
|
-
get url(): ("url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIEmbedVideo[T] : never : never) | undefined;
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
type InteractionMetadataType<Type extends InteractionType> = Extract<APIMessageInteractionMetadata, {
|
|
2101
|
-
type: Type;
|
|
2102
|
-
}>;
|
|
2103
|
-
/**
|
|
2104
|
-
* Represents metadata about the interaction causing a message.
|
|
2105
|
-
*
|
|
2106
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2107
|
-
* @remarks has a substructure `User` which needs to be instantiated and stored by an extending class using it
|
|
2108
|
-
*/
|
|
2109
|
-
declare abstract class InteractionMetadata<Type extends InteractionType, Omitted extends keyof InteractionMetadataType<Type> | '' = ''> extends Structure<InteractionMetadataType<Type>, Omitted> {
|
|
2110
|
-
/**
|
|
2111
|
-
* @param data - The raw data received from the API for the connection
|
|
2112
|
-
*/
|
|
2113
|
-
constructor(data: Partialize<InteractionMetadataType<Type>, Omitted>);
|
|
2114
|
-
/**
|
|
2115
|
-
* The id of the interaction
|
|
2116
|
-
*/
|
|
2117
|
-
get id(): ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIApplicationCommandInteractionMetadata, {
|
|
2118
|
-
type: Type;
|
|
2119
|
-
}>>["id"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIMessageComponentInteractionMetadata, {
|
|
2120
|
-
type: Type;
|
|
2121
|
-
}>>["id"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIModalSubmitInteractionMetadata, {
|
|
2122
|
-
type: Type;
|
|
2123
|
-
}>>["id"];
|
|
2124
|
-
/**
|
|
2125
|
-
* The id of the original response message, present only on follow-up messages
|
|
2126
|
-
*/
|
|
2127
|
-
get originalResponseMessageId(): ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIApplicationCommandInteractionMetadata, {
|
|
2128
|
-
type: Type;
|
|
2129
|
-
}>>["original_response_message_id"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIMessageComponentInteractionMetadata, {
|
|
2130
|
-
type: Type;
|
|
2131
|
-
}>>["original_response_message_id"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIModalSubmitInteractionMetadata, {
|
|
2132
|
-
type: Type;
|
|
2133
|
-
}>>["original_response_message_id"] | undefined;
|
|
2134
|
-
/**
|
|
2135
|
-
* The type of interaction
|
|
2136
|
-
*/
|
|
2137
|
-
get type(): ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIApplicationCommandInteractionMetadata, {
|
|
2138
|
-
type: Type;
|
|
2139
|
-
}>>["type"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIMessageComponentInteractionMetadata, {
|
|
2140
|
-
type: Type;
|
|
2141
|
-
}>>["type"] | ReplaceOmittedWithUnknown<Omitted, Extract<discord_api_types_v10.APIModalSubmitInteractionMetadata, {
|
|
2142
|
-
type: Type;
|
|
2143
|
-
}>>["type"];
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
/**
|
|
2147
|
-
* Represents metadata about the application command interaction causing a message.
|
|
2148
|
-
*
|
|
2149
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2150
|
-
* @remarks has a substructure `User` which needs to be instantiated and stored by an extending class using it
|
|
2151
|
-
*/
|
|
2152
|
-
declare class ApplicationCommandInteractionMetadata<Omitted extends keyof APIApplicationCommandInteractionMetadata | '' = ''> extends InteractionMetadata<InteractionType.ApplicationCommand, Omitted> {
|
|
2153
|
-
/**
|
|
2154
|
-
* The template used for removing data from the raw data stored for each ApplicationCommandInteractionMetadata.
|
|
2155
|
-
*/
|
|
2156
|
-
static readonly DataTemplate: Partial<APIApplicationCommandInteractionMetadata>;
|
|
2157
|
-
/**
|
|
2158
|
-
* @param data - The raw data received from the API for the connection
|
|
2159
|
-
*/
|
|
2160
|
-
constructor(data: Partialize<APIApplicationCommandInteractionMetadata, Omitted>);
|
|
2161
|
-
/**
|
|
2162
|
-
* The id of the message the command was run on
|
|
2163
|
-
*/
|
|
2164
|
-
get targetMessageId(): ("target_message_id" extends infer T ? T extends "target_message_id" ? T extends Omitted ? unknown : APIApplicationCommandInteractionMetadata[T] : never : never) | undefined;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
declare class Attachment<Omitted extends keyof APIAttachment | '' = ''> extends Structure<APIAttachment, Omitted> {
|
|
2168
|
-
/**
|
|
2169
|
-
* The template used for removing data from the raw data stored for each Attachment.
|
|
2170
|
-
*/
|
|
2171
|
-
static readonly DataTemplate: Partial<APIAttachment>;
|
|
2172
|
-
/**
|
|
2173
|
-
* @param data - The raw data received from the API for the connection
|
|
2174
|
-
*/
|
|
2175
|
-
constructor(data: Partialize<APIAttachment, Omitted>);
|
|
2176
|
-
/**
|
|
2177
|
-
* The id of the attachment
|
|
2178
|
-
*/
|
|
2179
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIAttachment[T] : never : never;
|
|
2180
|
-
/**
|
|
2181
|
-
* The name of the attached file
|
|
2182
|
-
*/
|
|
2183
|
-
get filename(): "filename" extends infer T ? T extends "filename" ? T extends Omitted ? unknown : APIAttachment[T] : never : never;
|
|
2184
|
-
/**
|
|
2185
|
-
* The title of the file
|
|
2186
|
-
*/
|
|
2187
|
-
get title(): ("title" extends infer T ? T extends "title" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2188
|
-
/**
|
|
2189
|
-
* The description for the file
|
|
2190
|
-
*/
|
|
2191
|
-
get description(): ("description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2192
|
-
/**
|
|
2193
|
-
* The attachment's media type
|
|
2194
|
-
*/
|
|
2195
|
-
get contentType(): ("content_type" extends infer T ? T extends "content_type" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2196
|
-
/**
|
|
2197
|
-
* The size of the file in bytes
|
|
2198
|
-
*/
|
|
2199
|
-
get size(): "size" extends infer T ? T extends "size" ? T extends Omitted ? unknown : APIAttachment[T] : never : never;
|
|
2200
|
-
/**
|
|
2201
|
-
* The source URL of the file
|
|
2202
|
-
*/
|
|
2203
|
-
get url(): "url" extends infer T ? T extends "url" ? T extends Omitted ? unknown : APIAttachment[T] : never : never;
|
|
2204
|
-
/**
|
|
2205
|
-
* A proxied URL of the file
|
|
2206
|
-
*/
|
|
2207
|
-
get proxyURL(): "proxy_url" extends infer T ? T extends "proxy_url" ? T extends Omitted ? unknown : APIAttachment[T] : never : never;
|
|
2208
|
-
/**
|
|
2209
|
-
* The height of the file (if image)
|
|
2210
|
-
*/
|
|
2211
|
-
get height(): ("height" extends infer T ? T extends "height" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2212
|
-
/**
|
|
2213
|
-
* The width of the file (if image)
|
|
2214
|
-
*/
|
|
2215
|
-
get width(): ("width" extends infer T ? T extends "width" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2216
|
-
/**
|
|
2217
|
-
* Whether this attachment is ephemeral
|
|
2218
|
-
*/
|
|
2219
|
-
get ephemeral(): ("ephemeral" extends infer T ? T extends "ephemeral" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2220
|
-
/**
|
|
2221
|
-
* The duration of the audio file
|
|
2222
|
-
*/
|
|
2223
|
-
get durationSecs(): ("duration_secs" extends infer T ? T extends "duration_secs" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2224
|
-
/**
|
|
2225
|
-
* Base64 encoded bytearray representing a sampled waveform
|
|
2226
|
-
*/
|
|
2227
|
-
get waveform(): ("waveform" extends infer T ? T extends "waveform" ? T extends Omitted ? unknown : APIAttachment[T] : never : never) | undefined;
|
|
2228
|
-
/**
|
|
2229
|
-
* Attachment flags combined as a bitfield
|
|
2230
|
-
*/
|
|
2231
|
-
get flags(): AttachmentFlagsBitField | null;
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
/**
|
|
2235
|
-
* Represents the mention of a channel on a message on Discord.
|
|
2236
|
-
*
|
|
2237
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2238
|
-
*/
|
|
2239
|
-
declare class ChannelMention<Omitted extends keyof APIChannelMention | '' = ''> extends Structure<APIChannelMention, Omitted> {
|
|
2240
|
-
/**
|
|
2241
|
-
* The template used for removing data from the raw data stored for each ChannelMention.
|
|
2242
|
-
*/
|
|
2243
|
-
static DataTemplate: Partial<APIChannelMention>;
|
|
2244
|
-
/**
|
|
2245
|
-
* @param data - The raw data received from the API for the channel mention
|
|
2246
|
-
*/
|
|
2247
|
-
constructor(data: Partialize<APIChannelMention, Omitted>);
|
|
2248
|
-
/**
|
|
2249
|
-
* The type of the mentioned channel
|
|
2250
|
-
*/
|
|
2251
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIChannelMention[T] : never : never;
|
|
2252
|
-
/**
|
|
2253
|
-
* The name of the mentioned channel
|
|
2254
|
-
*/
|
|
2255
|
-
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIChannelMention[T] : never : never;
|
|
2256
|
-
/**
|
|
2257
|
-
* The id of the mentioned channel
|
|
2258
|
-
*/
|
|
2259
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIChannelMention[T] : never : never;
|
|
2260
|
-
/**
|
|
2261
|
-
* The id of the guild the mentioned channel is in
|
|
2262
|
-
*/
|
|
2263
|
-
get guildId(): "guild_id" extends infer T ? T extends "guild_id" ? T extends Omitted ? unknown : APIChannelMention[T] : never : never;
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
/**
|
|
2267
|
-
* Represents a message on Discord.
|
|
2268
|
-
*
|
|
2269
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2270
|
-
* @remarks has substructures `Message`, `Channel`, `MessageActivity`, `MessageCall`, `MessageReference`, `Attachment`, `Application`, `ChannelMention`, `Reaction`, `Poll`, `ResolvedInteractionData`, `RoleSubscriptionData`, `Sticker`, all the different `Component`s, ... which need to be instantiated and stored by an extending class using it
|
|
2271
|
-
*/
|
|
2272
|
-
declare class Message<Omitted extends keyof APIMessage | '' = 'edited_timestamp' | 'timestamp'> extends Structure<APIMessage, Omitted> {
|
|
2273
|
-
/**
|
|
2274
|
-
* The template used for removing data from the raw data stored for each Message
|
|
2275
|
-
*/
|
|
2276
|
-
static DataTemplate: Partial<APIMessage>;
|
|
2277
|
-
protected [kEditedTimestamp]: number | null;
|
|
2278
|
-
/**
|
|
2279
|
-
* @param data - The raw data received from the API for the message
|
|
2280
|
-
*/
|
|
2281
|
-
constructor(data: Partialize<APIMessage, Omitted>);
|
|
2282
|
-
/**
|
|
2283
|
-
* {@inheritDoc Structure.optimizeData}
|
|
2284
|
-
*
|
|
2285
|
-
* @internal
|
|
2286
|
-
*/
|
|
2287
|
-
protected optimizeData(data: Partial<APIMessage>): void;
|
|
2288
|
-
/**
|
|
2289
|
-
* The message's id
|
|
2290
|
-
*/
|
|
2291
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2292
|
-
/**
|
|
2293
|
-
* The id of the interaction's application, if this message is a reply to an interaction
|
|
2294
|
-
*/
|
|
2295
|
-
get applicationId(): ("application_id" extends infer T ? T extends "application_id" ? T extends Omitted ? unknown : APIMessage[T] : never : never) | undefined;
|
|
2296
|
-
/**
|
|
2297
|
-
* The channel's id this message was sent in
|
|
2298
|
-
*/
|
|
2299
|
-
get channelId(): "channel_id" extends infer T ? T extends "channel_id" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2300
|
-
/**
|
|
2301
|
-
* The timestamp this message was created at
|
|
2302
|
-
*/
|
|
2303
|
-
get createdTimestamp(): number | null;
|
|
2304
|
-
/**
|
|
2305
|
-
* The time the message was created at
|
|
2306
|
-
*/
|
|
2307
|
-
get createdAt(): Date | null;
|
|
2308
|
-
/**
|
|
2309
|
-
* The content of the message
|
|
2310
|
-
*/
|
|
2311
|
-
get content(): "content" extends infer T ? T extends "content" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2312
|
-
/**
|
|
2313
|
-
* The timestamp this message was last edited at, or `null` if it never was edited
|
|
2314
|
-
*/
|
|
2315
|
-
get editedTimestamp(): number | null;
|
|
2316
|
-
/**
|
|
2317
|
-
* The time the message was last edited at, or `null` if it never was edited
|
|
2318
|
-
*/
|
|
2319
|
-
get editedAt(): Date | null;
|
|
2320
|
-
/**
|
|
2321
|
-
* The flags of this message as a bit field
|
|
2322
|
-
*/
|
|
2323
|
-
get flags(): MessageFlagsBitField | null;
|
|
2324
|
-
/**
|
|
2325
|
-
* The nonce used when sending this message.
|
|
2326
|
-
*
|
|
2327
|
-
* @remarks This is only present in MESSAGE_CREATE event, if a nonce was provided when sending
|
|
2328
|
-
*/
|
|
2329
|
-
get nonce(): ("nonce" extends infer T ? T extends "nonce" ? T extends Omitted ? unknown : APIMessage[T] : never : never) | undefined;
|
|
2330
|
-
/**
|
|
2331
|
-
* Whether this message is pinned in its channel
|
|
2332
|
-
*/
|
|
2333
|
-
get pinned(): "pinned" extends infer T ? T extends "pinned" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2334
|
-
/**
|
|
2335
|
-
* A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread
|
|
2336
|
-
* It can be used to estimate the relative position of the message in a thread in company with `totalMessageSent` on parent thread
|
|
2337
|
-
*/
|
|
2338
|
-
get position(): ("position" extends infer T ? T extends "position" ? T extends Omitted ? unknown : APIMessage[T] : never : never) | undefined;
|
|
2339
|
-
/**
|
|
2340
|
-
* Whether this message was a TTS message
|
|
2341
|
-
*/
|
|
2342
|
-
get tts(): "tts" extends infer T ? T extends "tts" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2343
|
-
/**
|
|
2344
|
-
* The type of message
|
|
2345
|
-
*/
|
|
2346
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIMessage[T] : never : never;
|
|
2347
|
-
/**
|
|
2348
|
-
* If the message is generated by a webhook, this is the webhook's id
|
|
2349
|
-
*/
|
|
2350
|
-
get webhookId(): ("webhook_id" extends infer T ? T extends "webhook_id" ? T extends Omitted ? unknown : APIMessage[T] : never : never) | undefined;
|
|
2351
|
-
/**
|
|
2352
|
-
* {@inheritDoc Structure.toJSON}
|
|
2353
|
-
*/
|
|
2354
|
-
toJSON(): APIMessage;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
declare class MessageActivity<Omitted extends keyof APIMessageActivity | '' = ''> extends Structure<APIMessageActivity, Omitted> {
|
|
2358
|
-
/**
|
|
2359
|
-
* The template used for removing data from the raw data stored for each MessageActivity.
|
|
2360
|
-
*/
|
|
2361
|
-
static readonly DataTemplate: Partial<APIMessageActivity>;
|
|
2362
|
-
/**
|
|
2363
|
-
* @param data - The raw data received from the API for the connection
|
|
2364
|
-
*/
|
|
2365
|
-
constructor(data: Partialize<APIMessageActivity, Omitted>);
|
|
2366
|
-
/**
|
|
2367
|
-
* The party id from a Rich Presence event
|
|
2368
|
-
*/
|
|
2369
|
-
get partyId(): ("party_id" extends infer T ? T extends "party_id" ? T extends Omitted ? unknown : APIMessageActivity[T] : never : never) | undefined;
|
|
2370
|
-
/**
|
|
2371
|
-
* The type of message activity
|
|
2372
|
-
*/
|
|
2373
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIMessageActivity[T] : never : never;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
declare class MessageCall<Omitted extends keyof APIMessageCall | '' = 'ended_timestamp'> extends Structure<APIMessageCall, Omitted> {
|
|
2377
|
-
/**
|
|
2378
|
-
* The template used for removing data from the raw data stored for each MessageCall
|
|
2379
|
-
*/
|
|
2380
|
-
static DataTemplate: Partial<APIMessageCall>;
|
|
2381
|
-
protected [kEndedTimestamp]: number | null;
|
|
2382
|
-
/**
|
|
2383
|
-
* @param data - The raw data received from the API for the message call
|
|
2384
|
-
*/
|
|
2385
|
-
constructor(data: Partialize<APIMessageCall, Omitted>);
|
|
2386
|
-
/**
|
|
2387
|
-
* {@inheritDoc Structure.optimizeData}
|
|
2388
|
-
*
|
|
2389
|
-
* @internal
|
|
2390
|
-
*/
|
|
2391
|
-
protected optimizeData(data: Partial<APIMessageCall>): void;
|
|
2392
|
-
/**
|
|
2393
|
-
* The timestamp this call ended at, or `null` if it didn't end yet
|
|
2394
|
-
*/
|
|
2395
|
-
get endedTimestamp(): number | null;
|
|
2396
|
-
/**
|
|
2397
|
-
* The time the call ended at, or `null` if it didn't end yet
|
|
2398
|
-
*/
|
|
2399
|
-
get endedAt(): Date | null;
|
|
2400
|
-
/**
|
|
2401
|
-
* {@inheritDoc Structure.toJSON}
|
|
2402
|
-
*/
|
|
2403
|
-
toJSON(): APIMessageCall;
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
/**
|
|
2407
|
-
* Represents metadata about the message component interaction causing a message.
|
|
2408
|
-
*
|
|
2409
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2410
|
-
*/
|
|
2411
|
-
declare class MessageComponentInteractionMetadata<Omitted extends keyof APIMessageComponentInteractionMetadata | '' = ''> extends InteractionMetadata<InteractionType.MessageComponent, Omitted> {
|
|
2412
|
-
/**
|
|
2413
|
-
* The template used for removing data from the raw data stored for each MessageComponentInteractionMetadata.
|
|
2414
|
-
*/
|
|
2415
|
-
static readonly DataTemplate: Partial<APIMessageComponentInteractionMetadata>;
|
|
2416
|
-
/**
|
|
2417
|
-
* @param data - The raw data received from the API for the connection
|
|
2418
|
-
*/
|
|
2419
|
-
constructor(data: Partialize<APIMessageComponentInteractionMetadata, Omitted>);
|
|
2420
|
-
/**
|
|
2421
|
-
* The id of the message that contained the interactive component
|
|
2422
|
-
*/
|
|
2423
|
-
get interactedMessageId(): "interacted_message_id" extends infer T ? T extends "interacted_message_id" ? T extends Omitted ? unknown : APIMessageComponentInteractionMetadata[T] : never : never;
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
/**
|
|
2427
|
-
* Represents the reference to another message on a message on Discord.
|
|
2428
|
-
*
|
|
2429
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2430
|
-
*/
|
|
2431
|
-
declare class MessageReference<Omitted extends keyof APIMessageReference | '' = ''> extends Structure<APIMessageReference, Omitted> {
|
|
2432
|
-
/**
|
|
2433
|
-
* The template used for removing data from the raw data stored for each MessageReference.
|
|
2434
|
-
*/
|
|
2435
|
-
static DataTemplate: Partial<APIMessageReference>;
|
|
2436
|
-
/**
|
|
2437
|
-
* @param data - The raw data received from the API for the message reference
|
|
2438
|
-
*/
|
|
2439
|
-
constructor(data: Partialize<APIMessageReference, Omitted>);
|
|
2440
|
-
/**
|
|
2441
|
-
* The type of this reference
|
|
2442
|
-
*/
|
|
2443
|
-
get type(): MessageReferenceType;
|
|
2444
|
-
/**
|
|
2445
|
-
* The id of the referenced message
|
|
2446
|
-
*/
|
|
2447
|
-
get messageId(): ("message_id" extends infer T ? T extends "message_id" ? T extends Omitted ? unknown : APIMessageReference[T] : never : never) | undefined;
|
|
2448
|
-
/**
|
|
2449
|
-
* The id of the channel the referenced message was sent in
|
|
2450
|
-
*/
|
|
2451
|
-
get channelId(): "channel_id" extends infer T ? T extends "channel_id" ? T extends Omitted ? unknown : APIMessageReference[T] : never : never;
|
|
2452
|
-
/**
|
|
2453
|
-
* The id of the guild the referenced message was sent in
|
|
2454
|
-
*/
|
|
2455
|
-
get guildId(): ("guild_id" extends infer T ? T extends "guild_id" ? T extends Omitted ? unknown : APIMessageReference[T] : never : never) | undefined;
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
/**
|
|
2459
|
-
* Represents metadata about the modal submit interaction causing a message.
|
|
2460
|
-
*
|
|
2461
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2462
|
-
* @remarks has a substructure `InteractionMetadata` which needs to be instantiated and stored by an extending class using it
|
|
2463
|
-
*/
|
|
2464
|
-
declare class ModalSubmitInteractionMetadata<Omitted extends keyof APIModalSubmitInteractionMetadata | '' = ''> extends InteractionMetadata<InteractionType.ModalSubmit, Omitted> {
|
|
2465
|
-
/**
|
|
2466
|
-
* The template used for removing data from the raw data stored for each ModalSubmitInteractionMetadata.
|
|
2467
|
-
*/
|
|
2468
|
-
static readonly DataTemplate: Partial<APIModalSubmitInteractionMetadata>;
|
|
2469
|
-
/**
|
|
2470
|
-
* @param data - The raw data received from the API for the connection
|
|
2471
|
-
*/
|
|
2472
|
-
constructor(data: Partialize<APIModalSubmitInteractionMetadata, Omitted>);
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
/**
|
|
2476
|
-
* Represents a reaction on a message on Discord.
|
|
2477
|
-
*
|
|
2478
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2479
|
-
* @remarks has substructures `Emoji`, `ReactionCountDetails` which need to be instantiated and stored by an extending class using it
|
|
2480
|
-
*/
|
|
2481
|
-
declare class Reaction<Omitted extends keyof APIReaction | '' = ''> extends Structure<APIReaction, Omitted> {
|
|
2482
|
-
/**
|
|
2483
|
-
* The template used for removing data from the raw data stored for each Reaction.
|
|
2484
|
-
*/
|
|
2485
|
-
static DataTemplate: Partial<APIReaction>;
|
|
2486
|
-
protected [kBurstColors]: number[] | null;
|
|
2487
|
-
/**
|
|
2488
|
-
* @param data - The raw data received from the API for the reaction
|
|
2489
|
-
*/
|
|
2490
|
-
constructor(data: Partialize<APIReaction, Omitted>);
|
|
2491
|
-
/**
|
|
2492
|
-
* {@inheritDoc Structure.optimizeData}
|
|
2493
|
-
*
|
|
2494
|
-
* @internal
|
|
2495
|
-
*/
|
|
2496
|
-
protected optimizeData(data: Partial<APIReaction>): void;
|
|
2497
|
-
/**
|
|
2498
|
-
* The amount how often this emoji has been used to react (including super reacts)
|
|
2499
|
-
*/
|
|
2500
|
-
get count(): "count" extends infer T ? T extends "count" ? T extends Omitted ? unknown : APIReaction[T] : never : never;
|
|
2501
|
-
/**
|
|
2502
|
-
* Whether the current user has reacted using this emoji
|
|
2503
|
-
*/
|
|
2504
|
-
get me(): "me" extends infer T ? T extends "me" ? T extends Omitted ? unknown : APIReaction[T] : never : never;
|
|
2505
|
-
/**
|
|
2506
|
-
* Whether the current user has super-reacted using this emoji
|
|
2507
|
-
*/
|
|
2508
|
-
get meBurst(): "me_burst" extends infer T ? T extends "me_burst" ? T extends Omitted ? unknown : APIReaction[T] : never : never;
|
|
2509
|
-
/**
|
|
2510
|
-
* The colors used for super reaction
|
|
2511
|
-
*/
|
|
2512
|
-
get burstColors(): number[] | null;
|
|
2513
|
-
/**
|
|
2514
|
-
* {@inheritDoc Structure.toJSON}
|
|
2515
|
-
*/
|
|
2516
|
-
toJSON(): APIReaction;
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
/**
|
|
2520
|
-
* Represents the usage count of a reaction on a message on Discord.
|
|
2521
|
-
*
|
|
2522
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2523
|
-
*/
|
|
2524
|
-
declare class ReactionCountDetails<Omitted extends keyof APIReactionCountDetails | '' = ''> extends Structure<APIReactionCountDetails, Omitted> {
|
|
2525
|
-
/**
|
|
2526
|
-
* The template used for removing data from the raw data stored for each ReactionCountDetails.
|
|
2527
|
-
*/
|
|
2528
|
-
static DataTemplate: Partial<APIReactionCountDetails>;
|
|
2529
|
-
/**
|
|
2530
|
-
* @param data - The raw data received from the API for the reaction count details
|
|
2531
|
-
*/
|
|
2532
|
-
constructor(data: Partialize<APIReactionCountDetails, Omitted>);
|
|
2533
|
-
/**
|
|
2534
|
-
* The amount how often this emoji has been used to react (excluding super reacts)
|
|
2535
|
-
*/
|
|
2536
|
-
get normal(): "normal" extends infer T ? T extends "normal" ? T extends Omitted ? unknown : APIReactionCountDetails[T] : never : never;
|
|
2537
|
-
/**
|
|
2538
|
-
* The amount how often this emoji has been used to super-react
|
|
2539
|
-
*/
|
|
2540
|
-
get burst(): "burst" extends infer T ? T extends "burst" ? T extends Omitted ? unknown : APIReactionCountDetails[T] : never : never;
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
/**
|
|
2544
|
-
* Represents metadata about the role subscription causing a message.
|
|
2545
|
-
*
|
|
2546
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2547
|
-
*/
|
|
2548
|
-
declare abstract class RoleSubscriptionData<Omitted extends keyof APIMessageRoleSubscriptionData | '' = ''> extends Structure<APIMessageRoleSubscriptionData, Omitted> {
|
|
2549
|
-
/**
|
|
2550
|
-
* @param data - The raw data received from the API for the connection
|
|
2551
|
-
*/
|
|
2552
|
-
constructor(data: Partialize<APIMessageRoleSubscriptionData, Omitted>);
|
|
2553
|
-
/**
|
|
2554
|
-
* The id of the SKU and listing the user is subscribed to
|
|
2555
|
-
*/
|
|
2556
|
-
get roleSubscriptionListingId(): "role_subscription_listing_id" extends infer T ? T extends "role_subscription_listing_id" ? T extends Omitted ? unknown : APIMessageRoleSubscriptionData[T] : never : never;
|
|
2557
|
-
/**
|
|
2558
|
-
* The name of the tier the user is subscribed to
|
|
2559
|
-
*/
|
|
2560
|
-
get tierName(): "tier_name" extends infer T ? T extends "tier_name" ? T extends Omitted ? unknown : APIMessageRoleSubscriptionData[T] : never : never;
|
|
2561
|
-
/**
|
|
2562
|
-
* The number of months the user has been subscribed for
|
|
2563
|
-
*/
|
|
2564
|
-
get totalMonthsSubscribed(): "total_months_subscribed" extends infer T ? T extends "total_months_subscribed" ? T extends Omitted ? unknown : APIMessageRoleSubscriptionData[T] : never : never;
|
|
2565
|
-
/**
|
|
2566
|
-
* Whether this notification is for a renewal
|
|
2567
|
-
*/
|
|
2568
|
-
get isRenewal(): "is_renewal" extends infer T ? T extends "is_renewal" ? T extends Omitted ? unknown : APIMessageRoleSubscriptionData[T] : never : never;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
/**
|
|
2572
|
-
* Represents a poll on a message on Discord.
|
|
2573
|
-
*
|
|
2574
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2575
|
-
* @remarks has substructures `PollMedia`, `PollAnswer`, `PollResults` which need to be instantiated and stored by an extending class using it
|
|
2576
|
-
*/
|
|
2577
|
-
declare class Poll<Omitted extends keyof APIPoll | '' = ''> extends Structure<APIPoll, Omitted> {
|
|
2578
|
-
/**
|
|
2579
|
-
* The template used for removing data from the raw data stored for each Poll.
|
|
2580
|
-
*/
|
|
2581
|
-
static DataTemplate: Partial<APIPoll>;
|
|
2582
|
-
/**
|
|
2583
|
-
* Optimized storage of {@link discord-api-types/v10#(APIPoll:interface).expiry}
|
|
2584
|
-
*
|
|
2585
|
-
* @internal
|
|
2586
|
-
*/
|
|
2587
|
-
protected [kExpiresTimestamp]: number | null;
|
|
2588
|
-
/**
|
|
2589
|
-
* @param data - The raw data received from the API for the poll
|
|
2590
|
-
*/
|
|
2591
|
-
constructor(data: Partialize<APIPoll, Omitted>);
|
|
2592
|
-
/**
|
|
2593
|
-
* {@inheritDoc Structure.optimizeData}
|
|
2594
|
-
*
|
|
2595
|
-
* @internal
|
|
2596
|
-
*/
|
|
2597
|
-
protected optimizeData(data: Partial<APIPoll>): void;
|
|
2598
|
-
/**
|
|
2599
|
-
* Whether a user can select multiple answers
|
|
2600
|
-
*/
|
|
2601
|
-
get allowMultiselect(): "allow_multiselect" extends infer T ? T extends "allow_multiselect" ? T extends Omitted ? unknown : APIPoll[T] : never : never;
|
|
2602
|
-
/**
|
|
2603
|
-
* The layout type of the poll
|
|
2604
|
-
*/
|
|
2605
|
-
get layoutType(): "layout_type" extends infer T ? T extends "layout_type" ? T extends Omitted ? unknown : APIPoll[T] : never : never;
|
|
2606
|
-
/**
|
|
2607
|
-
* The timestamp this poll will expire at
|
|
2608
|
-
*/
|
|
2609
|
-
get expiresTimestamp(): number | null;
|
|
2610
|
-
/**
|
|
2611
|
-
* The time the poll will expire at
|
|
2612
|
-
*/
|
|
2613
|
-
get expiresAt(): Date | null;
|
|
2614
|
-
/**
|
|
2615
|
-
* {@inheritDoc Structure.toJSON}
|
|
2616
|
-
*/
|
|
2617
|
-
toJSON(): APIPoll;
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
/**
|
|
2621
|
-
* Represents an answer to a poll on a message on Discord.
|
|
2622
|
-
*
|
|
2623
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2624
|
-
* @remarks has a substructure `PollMedia` which need to be instantiated and stored by an extending class using it
|
|
2625
|
-
*/
|
|
2626
|
-
declare class PollAnswer<Omitted extends keyof APIPollAnswer | '' = ''> extends Structure<APIPollAnswer, Omitted> {
|
|
2627
|
-
/**
|
|
2628
|
-
* The template used for removing data from the raw data stored for each PollAnswer.
|
|
2629
|
-
*/
|
|
2630
|
-
static DataTemplate: Partial<APIPollAnswer>;
|
|
2631
|
-
/**
|
|
2632
|
-
* @param data - The raw data received from the API for the poll answer
|
|
2633
|
-
*/
|
|
2634
|
-
constructor(data: Partialize<APIPollAnswer, Omitted>);
|
|
2635
|
-
/**
|
|
2636
|
-
* The id of the poll answer
|
|
2637
|
-
*/
|
|
2638
|
-
get answerId(): "answer_id" extends infer T ? T extends "answer_id" ? T extends Omitted ? unknown : APIPollAnswer[T] : never : never;
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
/**
|
|
2642
|
-
* Represents the counts of answers to a poll on a message on Discord.
|
|
2643
|
-
*
|
|
2644
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2645
|
-
*/
|
|
2646
|
-
declare class PollAnswerCount<Omitted extends keyof APIPollAnswerCount | '' = ''> extends Structure<APIPollAnswerCount, Omitted> {
|
|
2647
|
-
/**
|
|
2648
|
-
* The template used for removing data from the raw data stored for each PollAnswerCount.
|
|
2649
|
-
*/
|
|
2650
|
-
static DataTemplate: Partial<APIPollAnswerCount>;
|
|
2651
|
-
/**
|
|
2652
|
-
* @param data - The raw data received from the API for the poll answer count
|
|
2653
|
-
*/
|
|
2654
|
-
constructor(data: Partialize<APIPollAnswerCount, Omitted>);
|
|
2655
|
-
/**
|
|
2656
|
-
* The id of the poll answer
|
|
2657
|
-
*/
|
|
2658
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIPollAnswerCount[T] : never : never;
|
|
2659
|
-
/**
|
|
2660
|
-
* The number of votes for this answer
|
|
2661
|
-
*/
|
|
2662
|
-
get count(): "count" extends infer T ? T extends "count" ? T extends Omitted ? unknown : APIPollAnswerCount[T] : never : never;
|
|
2663
|
-
/**
|
|
2664
|
-
* Whether the current user voted for this answer
|
|
2665
|
-
*/
|
|
2666
|
-
get meVoted(): "me_voted" extends infer T ? T extends "me_voted" ? T extends Omitted ? unknown : APIPollAnswerCount[T] : never : never;
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
/**
|
|
2670
|
-
* Represents a field of a poll on a message on Discord.
|
|
2671
|
-
*
|
|
2672
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2673
|
-
* @remarks has a substructure `Emoji` which need to be instantiated and stored by an extending class using it
|
|
2674
|
-
*/
|
|
2675
|
-
declare class PollMedia<Omitted extends keyof APIPollMedia | '' = ''> extends Structure<APIPollMedia, Omitted> {
|
|
2676
|
-
/**
|
|
2677
|
-
* The template used for removing data from the raw data stored for each PollMedia.
|
|
2678
|
-
*/
|
|
2679
|
-
static DataTemplate: Partial<APIPollMedia>;
|
|
2680
|
-
/**
|
|
2681
|
-
* @param data - The raw data received from the API for the poll media
|
|
2682
|
-
*/
|
|
2683
|
-
constructor(data: Partialize<APIPollMedia, Omitted>);
|
|
2684
|
-
/**
|
|
2685
|
-
* The text of the poll field
|
|
2686
|
-
*/
|
|
2687
|
-
get text(): ("text" extends infer T ? T extends "text" ? T extends Omitted ? unknown : APIPollMedia[T] : never : never) | undefined;
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
/**
|
|
2691
|
-
* Represents the results of a poll on a message on Discord.
|
|
2692
|
-
*
|
|
2693
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2694
|
-
* @remarks has a substructure `PollAnswerCount` which need to be instantiated and stored by an extending class using it
|
|
2695
|
-
*/
|
|
2696
|
-
declare class PollResults<Omitted extends keyof APIPollResults | '' = ''> extends Structure<APIPollResults, Omitted> {
|
|
2697
|
-
/**
|
|
2698
|
-
* The template used for removing data from the raw data stored for each PollResults.
|
|
2699
|
-
*/
|
|
2700
|
-
static DataTemplate: Partial<APIPollResults>;
|
|
2701
|
-
/**
|
|
2702
|
-
* @param data - The raw data received from the API for the poll results
|
|
2703
|
-
*/
|
|
2704
|
-
constructor(data: Partialize<APIPollResults, Omitted>);
|
|
2705
|
-
/**
|
|
2706
|
-
* Whether the votes have been precisely counted
|
|
2707
|
-
*/
|
|
2708
|
-
get isFinalized(): "is_finalized" extends infer T ? T extends "is_finalized" ? T extends Omitted ? unknown : APIPollResults[T] : never : never;
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
/**
|
|
2712
|
-
* Represents a sticker on Discord.
|
|
2713
|
-
*
|
|
2714
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2715
|
-
*/
|
|
2716
|
-
declare class Sticker<Omitted extends keyof APISticker | '' = ''> extends Structure<APISticker, Omitted> {
|
|
2717
|
-
/**
|
|
2718
|
-
* The template used for removing data from the raw data stored for each SitckerItem.
|
|
2719
|
-
*/
|
|
2720
|
-
static DataTemplate: Partial<APISticker>;
|
|
2721
|
-
/**
|
|
2722
|
-
* @param data - The raw data received from the API for the sticker item
|
|
2723
|
-
*/
|
|
2724
|
-
constructor(data: Partialize<APISticker, Omitted>);
|
|
2725
|
-
/**
|
|
2726
|
-
* The id of the sticker
|
|
2727
|
-
*/
|
|
2728
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2729
|
-
/**
|
|
2730
|
-
* The name of the sticker
|
|
2731
|
-
*/
|
|
2732
|
-
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2733
|
-
/**
|
|
2734
|
-
* The format type of the sticker
|
|
2735
|
-
*/
|
|
2736
|
-
get formatType(): "format_type" extends infer T ? T extends "format_type" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2737
|
-
/**
|
|
2738
|
-
* Whether this guild sticker can be used, may be false due to loss of Server Boosts
|
|
2739
|
-
*/
|
|
2740
|
-
get available(): ("available" extends infer T ? T extends "available" ? T extends Omitted ? unknown : APISticker[T] : never : never) | undefined;
|
|
2741
|
-
/**
|
|
2742
|
-
* The description of the sticker
|
|
2743
|
-
*/
|
|
2744
|
-
get description(): "description" extends infer T ? T extends "description" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2745
|
-
/**
|
|
2746
|
-
* The autocomplete/suggestion tags for the sticker
|
|
2747
|
-
*/
|
|
2748
|
-
get tags(): "tags" extends infer T ? T extends "tags" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2749
|
-
/**
|
|
2750
|
-
* The type of this sticker
|
|
2751
|
-
*/
|
|
2752
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APISticker[T] : never : never;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
/**
|
|
2756
|
-
* Represents metadata of an avatar decoration of a User.
|
|
2757
|
-
*
|
|
2758
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2759
|
-
*/
|
|
2760
|
-
declare class AvatarDecorationData<Omitted extends keyof APIAvatarDecorationData | '' = ''> extends Structure<APIAvatarDecorationData, Omitted> {
|
|
2761
|
-
/**
|
|
2762
|
-
* The template used for removing data from the raw data stored for each Connection
|
|
2763
|
-
*/
|
|
2764
|
-
static readonly DataTemplate: Partial<APIAvatarDecorationData>;
|
|
2765
|
-
/**
|
|
2766
|
-
* @param data - The raw data received from the API for the connection
|
|
2767
|
-
*/
|
|
2768
|
-
constructor(data: Partialize<APIAvatarDecorationData, Omitted>);
|
|
2769
|
-
/**
|
|
2770
|
-
* The id of the SKU this avatar decoration is part of.
|
|
2771
|
-
*/
|
|
2772
|
-
get skuId(): "sku_id" extends infer T ? T extends "sku_id" ? T extends Omitted ? unknown : APIAvatarDecorationData[T] : never : never;
|
|
2773
|
-
/**
|
|
2774
|
-
* The asset of this avatar decoration.
|
|
2775
|
-
*/
|
|
2776
|
-
get asset(): "asset" extends infer T ? T extends "asset" ? T extends Omitted ? unknown : APIAvatarDecorationData[T] : never : never;
|
|
2777
|
-
}
|
|
2778
|
-
|
|
2779
|
-
/**
|
|
2780
|
-
* Represents any user on Discord.
|
|
2781
|
-
*
|
|
2782
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2783
|
-
* @remarks has a substructure `AvatarDecorationData`, which needs to be instantiated and stored by an extending class using it
|
|
2784
|
-
*/
|
|
2785
|
-
declare class User<Omitted extends keyof APIUser | '' = ''> extends Structure<APIUser, Omitted> {
|
|
2786
|
-
/**
|
|
2787
|
-
* The template used for removing data from the raw data stored for each User
|
|
2788
|
-
*/
|
|
2789
|
-
static readonly DataTemplate: Partial<APIUser>;
|
|
2790
|
-
/**
|
|
2791
|
-
* @param data - The raw data received from the API for the user
|
|
2792
|
-
*/
|
|
2793
|
-
constructor(data: Partialize<APIUser, Omitted>);
|
|
2794
|
-
/**
|
|
2795
|
-
* The user's id
|
|
2796
|
-
*/
|
|
2797
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
2798
|
-
/**
|
|
2799
|
-
* The username of the user
|
|
2800
|
-
*/
|
|
2801
|
-
get username(): "username" extends infer T ? T extends "username" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
2802
|
-
/**
|
|
2803
|
-
* The user's 4 digit tag, if a bot
|
|
2804
|
-
*/
|
|
2805
|
-
get discriminator(): "discriminator" extends infer T ? T extends "discriminator" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
2806
|
-
/**
|
|
2807
|
-
* The user's display name, the application name for bots
|
|
2808
|
-
*/
|
|
2809
|
-
get globalName(): "global_name" extends infer T ? T extends "global_name" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
2810
|
-
/**
|
|
2811
|
-
* The name displayed in the client for this user when no nickname is set
|
|
2812
|
-
*/
|
|
2813
|
-
get displayName(): ("username" extends infer T ? T extends "username" ? T extends Omitted ? unknown : APIUser[T] : never : never) | NonNullable<"global_name" extends infer T_1 ? T_1 extends "global_name" ? T_1 extends Omitted ? unknown : APIUser[T_1] : never : never>;
|
|
2814
|
-
/**
|
|
2815
|
-
* The user avatar's hash
|
|
2816
|
-
*/
|
|
2817
|
-
get avatar(): "avatar" extends infer T ? T extends "avatar" ? T extends Omitted ? unknown : APIUser[T] : never : never;
|
|
2818
|
-
/**
|
|
2819
|
-
* Whether the user is a bot
|
|
2820
|
-
*/
|
|
2821
|
-
get bot(): false | NonNullable<"bot" extends infer T ? T extends "bot" ? T extends Omitted ? unknown : APIUser[T] : never : never>;
|
|
2822
|
-
/**
|
|
2823
|
-
* Whether the user is an Official Discord System user
|
|
2824
|
-
*/
|
|
2825
|
-
get system(): false | NonNullable<"system" extends infer T ? T extends "system" ? T extends Omitted ? unknown : APIUser[T] : never : never>;
|
|
2826
|
-
/**
|
|
2827
|
-
* Whether the user has mfa enabled
|
|
2828
|
-
*
|
|
2829
|
-
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope
|
|
2830
|
-
*/
|
|
2831
|
-
get mfaEnabled(): ("mfa_enabled" extends infer T ? T extends "mfa_enabled" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2832
|
-
/**
|
|
2833
|
-
* The user's banner hash
|
|
2834
|
-
*
|
|
2835
|
-
* @remarks This property is only set when the user was manually fetched
|
|
2836
|
-
*/
|
|
2837
|
-
get banner(): ("banner" extends infer T ? T extends "banner" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2838
|
-
/**
|
|
2839
|
-
* The base 10 accent color of the user's banner
|
|
2840
|
-
*
|
|
2841
|
-
* @remarks This property is only set when the user was manually fetched
|
|
2842
|
-
*/
|
|
2843
|
-
get accentColor(): ("accent_color" extends infer T ? T extends "accent_color" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2844
|
-
/**
|
|
2845
|
-
* The user's primary Discord language
|
|
2846
|
-
*
|
|
2847
|
-
* @remarks This property is only set when the user was fetched with an Oauth2 token and the `identify` scope
|
|
2848
|
-
*/
|
|
2849
|
-
get locale(): ("locale" extends infer T ? T extends "locale" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2850
|
-
/**
|
|
2851
|
-
* Whether the email on the user's account has been verified
|
|
2852
|
-
*
|
|
2853
|
-
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope
|
|
2854
|
-
*/
|
|
2855
|
-
get verified(): ("verified" extends infer T ? T extends "verified" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2856
|
-
/**
|
|
2857
|
-
* The user's email
|
|
2858
|
-
*
|
|
2859
|
-
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope
|
|
2860
|
-
*/
|
|
2861
|
-
get email(): ("email" extends infer T ? T extends "email" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2862
|
-
/**
|
|
2863
|
-
* The type of nitro subscription on the user's account
|
|
2864
|
-
*
|
|
2865
|
-
* @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope
|
|
2866
|
-
*/
|
|
2867
|
-
get premiumType(): ("premium_type" extends infer T ? T extends "premium_type" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2868
|
-
/**
|
|
2869
|
-
* The timestamp the user was created at
|
|
2870
|
-
*/
|
|
2871
|
-
get createdTimestamp(): number | null;
|
|
2872
|
-
/**
|
|
2873
|
-
* The time the user was created at
|
|
2874
|
-
*/
|
|
2875
|
-
get createdAt(): Date | null;
|
|
2876
|
-
/**
|
|
2877
|
-
* The hexadecimal version of the user accent color, with a leading hash
|
|
2878
|
-
*
|
|
2879
|
-
* @remarks This property is only set when the user was manually fetched
|
|
2880
|
-
*/
|
|
2881
|
-
get hexAccentColor(): string | ("accent_color" extends infer T ? T extends "accent_color" ? T extends Omitted ? unknown : APIUser[T] : never : never) | undefined;
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
/**
|
|
2885
|
-
* Represents a user's connection on Discord.
|
|
2886
|
-
*
|
|
2887
|
-
* @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`
|
|
2888
|
-
*/
|
|
2889
|
-
declare class Connection<Omitted extends keyof APIConnection | '' = ''> extends Structure<APIConnection, Omitted> {
|
|
2890
|
-
/**
|
|
2891
|
-
* The template used for removing data from the raw data stored for each Connection
|
|
2892
|
-
*/
|
|
2893
|
-
static readonly DataTemplate: Partial<APIConnection>;
|
|
2894
|
-
/**
|
|
2895
|
-
* @param data - The raw data received from the API for the connection
|
|
2896
|
-
*/
|
|
2897
|
-
constructor(data: Partialize<APIConnection, Omitted>);
|
|
2898
|
-
/**
|
|
2899
|
-
* The id of the connection account
|
|
2900
|
-
*/
|
|
2901
|
-
get id(): "id" extends infer T ? T extends "id" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2902
|
-
/**
|
|
2903
|
-
* The username of the connection account
|
|
2904
|
-
*/
|
|
2905
|
-
get name(): "name" extends infer T ? T extends "name" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2906
|
-
/**
|
|
2907
|
-
* The type of service this connection is for
|
|
2908
|
-
*/
|
|
2909
|
-
get type(): "type" extends infer T ? T extends "type" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2910
|
-
/**
|
|
2911
|
-
* Whether the connection is revoked
|
|
2912
|
-
*/
|
|
2913
|
-
get revoked(): false | NonNullable<"revoked" extends infer T ? T extends "revoked" ? T extends Omitted ? unknown : APIConnection[T] : never : never>;
|
|
2914
|
-
/**
|
|
2915
|
-
* Whether the connection is verified
|
|
2916
|
-
*/
|
|
2917
|
-
get verified(): "verified" extends infer T ? T extends "verified" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2918
|
-
/**
|
|
2919
|
-
* Whether friend sync is enabled for this connection
|
|
2920
|
-
*/
|
|
2921
|
-
get friendSync(): "friend_sync" extends infer T ? T extends "friend_sync" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2922
|
-
/**
|
|
2923
|
-
* Whether activities related to this connection are shown in the users presence
|
|
2924
|
-
*/
|
|
2925
|
-
get showActivity(): "show_activity" extends infer T ? T extends "show_activity" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2926
|
-
/**
|
|
2927
|
-
* Whether this connection has an Oauth2 token for console voice transfer
|
|
2928
|
-
*/
|
|
2929
|
-
get twoWayLink(): "two_way_link" extends infer T ? T extends "two_way_link" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2930
|
-
/**
|
|
2931
|
-
* The visibility state for this connection
|
|
2932
|
-
*/
|
|
2933
|
-
get visibility(): "visibility" extends infer T ? T extends "visibility" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
1395
|
+
get visibility(): "visibility" extends infer T ? T extends "visibility" ? T extends Omitted ? unknown : APIConnection[T] : never : never;
|
|
2934
1396
|
}
|
|
2935
1397
|
|
|
2936
1398
|
declare function extendTemplate<SuperTemplate extends Record<string, unknown>>(superTemplate: SuperTemplate, additions: Record<string, unknown>): Record<string, unknown> & SuperTemplate;
|
|
2937
|
-
/**
|
|
2938
|
-
* Turns a JavaScript Date object into the timestamp format used by Discord in payloads.
|
|
2939
|
-
* E.g. `2025-11-16T14:09:25.239000+00:00`
|
|
2940
|
-
*
|
|
2941
|
-
* @private
|
|
2942
|
-
* @param date a Date instance
|
|
2943
|
-
* @returns an ISO8601 timestamp with microseconds precision and explicit +00:00 timezone
|
|
2944
|
-
*/
|
|
2945
|
-
declare function dateToDiscordISOTimestamp(date: Date): string;
|
|
2946
1399
|
|
|
2947
|
-
export { type APIActualInvite,
|
|
1400
|
+
export { type APIActualInvite, AnnouncementChannel, AnnouncementThreadChannel, AppliedTagsMixin, AvatarDecorationData, BitField, type BitFieldResolvable, CategoryChannel, Channel, type ChannelDataType, ChannelFlagsBitField, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelPinMixin, ChannelSlowmodeMixin, ChannelTopicMixin, ChannelWebhookMixin, type CollapseUnion, Connection, DMChannel, DMChannelMixin, DataTemplatePropertyName, type EnumLike, ForumChannel, ForumTag, GroupDMChannel, GroupDMMixin, GuildChannelMixin, type If, Invite, MediaChannel, type MergePrototype, type MergePrototypes, Mixin, type MixinBase, type MixinTypes, type Mixinable, type NonAbstract, OptimizeDataPropertyName, type OptionalPropertyNames, type PartialChannel, type Partialize, PermissionOverwrite, PermissionsBitField, PrivateThreadChannel, PublicThreadChannel, type RecursiveReadonlyArray, type ReplaceOmittedWithUnknown, StageChannel, Structure, TextChannel, TextChannelMixin, ThreadChannelMixin, ThreadMetadata, ThreadOnlyChannelMixin, User, VoiceChannel, VoiceChannelMixin, extendTemplate };
|