disgroove 2.0.0-dev.3a6f4ba → 2.0.0-dev.825fc77
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/lib/Client.d.ts +560 -142
- package/dist/lib/Client.js +1794 -124
- package/dist/lib/Client.js.map +1 -1
- package/dist/lib/constants.d.ts +7 -7
- package/dist/lib/constants.js +218 -218
- package/dist/lib/gateway/Shard.d.ts +0 -1
- package/dist/lib/gateway/Shard.js +65 -261
- package/dist/lib/gateway/Shard.js.map +1 -1
- package/dist/lib/gateway/ShardManager.d.ts +1 -2
- package/dist/lib/gateway/ShardManager.js +1 -2
- package/dist/lib/gateway/ShardManager.js.map +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/rest/Endpoints.d.ts +3 -3
- package/dist/lib/rest/Endpoints.js +8 -8
- package/dist/lib/rest/Endpoints.js.map +1 -1
- package/dist/lib/rest/RequestManager.d.ts +8 -2
- package/dist/lib/rest/RequestManager.js +17 -10
- package/dist/lib/rest/RequestManager.js.map +1 -1
- package/dist/lib/rest/index.d.ts +0 -1
- package/dist/lib/rest/index.js +0 -1
- package/dist/lib/rest/index.js.map +1 -1
- package/dist/lib/structures/Application.d.ts +93 -11
- package/dist/lib/structures/Application.js.map +1 -1
- package/dist/lib/structures/ApplicationCommand.d.ts +18 -6
- package/dist/lib/structures/ApplicationCommand.js.map +1 -1
- package/dist/lib/structures/AutoModerationRule.d.ts +11 -2
- package/dist/lib/structures/AutoModerationRule.js.map +1 -1
- package/dist/lib/structures/Channel.d.ts +108 -14
- package/dist/lib/structures/Channel.js +1 -1
- package/dist/lib/structures/Channel.js.map +1 -1
- package/dist/lib/structures/ClientApplication.d.ts +93 -11
- package/dist/lib/structures/ClientApplication.js.map +1 -1
- package/dist/lib/structures/Emoji.d.ts +5 -2
- package/dist/lib/structures/Emoji.js.map +1 -1
- package/dist/lib/structures/Guild.d.ts +234 -31
- package/dist/lib/structures/Guild.js.map +1 -1
- package/dist/lib/structures/GuildMember.d.ts +14 -3
- package/dist/lib/structures/GuildMember.js.map +1 -1
- package/dist/lib/structures/GuildScheduledEvent.d.ts +13 -2
- package/dist/lib/structures/GuildScheduledEvent.js.map +1 -1
- package/dist/lib/structures/GuildTemplate.d.ts +5 -2
- package/dist/lib/structures/GuildTemplate.js.map +1 -1
- package/dist/lib/structures/Interaction.d.ts +32 -7
- package/dist/lib/structures/Interaction.js.map +1 -1
- package/dist/lib/structures/Message.d.ts +16 -3
- package/dist/lib/structures/Message.js.map +1 -1
- package/dist/lib/structures/Role.d.ts +10 -2
- package/dist/lib/structures/Role.js.map +1 -1
- package/dist/lib/structures/StageInstance.d.ts +5 -2
- package/dist/lib/structures/StageInstance.js.map +1 -1
- package/dist/lib/structures/Sticker.d.ts +6 -2
- package/dist/lib/structures/Sticker.js.map +1 -1
- package/dist/lib/structures/User.d.ts +28 -9
- package/dist/lib/structures/User.js +3 -3
- package/dist/lib/structures/User.js.map +1 -1
- package/dist/lib/structures/Webhook.d.ts +35 -9
- package/dist/lib/structures/Webhook.js +14 -3
- package/dist/lib/structures/Webhook.js.map +1 -1
- package/dist/lib/types/application-command.d.ts +21 -21
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -1
- package/dist/lib/types/application.d.ts +17 -17
- package/dist/lib/types/audit-log.d.ts +15 -16
- package/dist/lib/types/auto-moderation.d.ts +11 -11
- package/dist/lib/types/channel.d.ts +83 -83
- package/dist/lib/types/emoji.d.ts +3 -3
- package/dist/lib/types/entitlements.d.ts +1 -1
- package/dist/lib/types/gateway-events.d.ts +11 -336
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -10
- package/dist/lib/types/guild-template.d.ts +4 -4
- package/dist/lib/types/guild.d.ts +44 -45
- package/dist/lib/types/interaction.d.ts +37 -37
- package/dist/lib/types/invite.d.ts +12 -12
- package/dist/lib/types/message-components.d.ts +12 -12
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +8 -8
- package/dist/lib/types/stage-instance.d.ts +1 -1
- package/dist/lib/types/sticker.d.ts +6 -6
- package/dist/lib/types/team.d.ts +5 -5
- package/dist/lib/types/user.d.ts +6 -6
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +14 -14
- package/dist/lib/utils/Util.d.ts +0 -13
- package/dist/lib/utils/Util.js +0 -536
- package/dist/lib/utils/Util.js.map +1 -1
- package/dist/lib/utils/errors.d.ts +1 -1
- package/dist/lib/utils/errors.js +4 -4
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, MFALevel, PremiumTier, GuildNSFWLevel, GuildMemberFlags, IntegrationExpireBehaviors, OAuth2Scopes, SystemChannelFlags, OnboardingMode, PromptTypes, ChannelTypes, VideoQualityModes, SortOrderTypes, ForumLayoutTypes } from "../constants";
|
2
|
-
import type { RawChannel, RawEmoji, RawSticker, RawUser, RawRole,
|
3
|
-
import { Collection } from "../utils";
|
2
|
+
import type { RawChannel, RawEmoji, RawSticker, RawUser, RawRole, Emoji, Sticker, User, Role, Channel, Overwrite, DefaultReaction, ForumTag } from ".";
|
4
3
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
5
4
|
export interface RawGuild {
|
6
5
|
id: string;
|
@@ -174,7 +173,7 @@ export interface RawPromptOption {
|
|
174
173
|
title: string;
|
175
174
|
description: string | null;
|
176
175
|
}
|
177
|
-
export interface
|
176
|
+
export interface Guild {
|
178
177
|
id: string;
|
179
178
|
name: string;
|
180
179
|
icon: string | null;
|
@@ -192,8 +191,8 @@ export interface JSONGuild {
|
|
192
191
|
verificationLevel: VerificationLevel;
|
193
192
|
defaultMessageNotifications: DefaultMessageNotificationLevel;
|
194
193
|
explicitContentFilter: ExplicitContentFilterLevel;
|
195
|
-
roles:
|
196
|
-
emojis:
|
194
|
+
roles: Array<Role>;
|
195
|
+
emojis: Array<Emoji>;
|
197
196
|
features: Array<GuildFeatures>;
|
198
197
|
mfaLevel: MFALevel;
|
199
198
|
applicationId: string | null;
|
@@ -202,7 +201,7 @@ export interface JSONGuild {
|
|
202
201
|
rulesChannelId: string | null;
|
203
202
|
maxPresences?: number | null;
|
204
203
|
maxMembers?: number;
|
205
|
-
|
204
|
+
vanityUrlCode: string | null;
|
206
205
|
description: string | null;
|
207
206
|
banner: string | null;
|
208
207
|
premiumTier: PremiumTier;
|
@@ -213,43 +212,43 @@ export interface JSONGuild {
|
|
213
212
|
maxStageVideoChannelUsers?: number;
|
214
213
|
approximateMemberCount?: number;
|
215
214
|
approximatePresenceCount?: number;
|
216
|
-
welcomeScreen?:
|
215
|
+
welcomeScreen?: WelcomeScreen;
|
217
216
|
nsfwLevel: GuildNSFWLevel;
|
218
|
-
stickers?: Array<
|
217
|
+
stickers?: Array<Sticker>;
|
219
218
|
premiumProgressBarEnabled: boolean;
|
220
219
|
safetyAlertsChannelId: string | null;
|
221
220
|
}
|
222
|
-
export interface
|
221
|
+
export interface UnavailableGuild {
|
223
222
|
id: string;
|
224
223
|
unavailable: boolean;
|
225
224
|
}
|
226
|
-
export interface
|
225
|
+
export interface GuildPreview {
|
227
226
|
id: string;
|
228
227
|
name: string;
|
229
228
|
icon: string | null;
|
230
229
|
splash: string | null;
|
231
230
|
discoverySplash: string | null;
|
232
|
-
emojis: Array<
|
231
|
+
emojis: Array<Emoji>;
|
233
232
|
features: Array<GuildFeatures>;
|
234
233
|
approximateMemberCount?: number;
|
235
234
|
approximatePresenceCount?: number;
|
236
235
|
description: string | null;
|
237
|
-
stickers?: Array<
|
236
|
+
stickers?: Array<Sticker>;
|
238
237
|
}
|
239
|
-
export interface
|
238
|
+
export interface GuildWidgetSettings {
|
240
239
|
enabled: boolean;
|
241
240
|
channelId: string | null;
|
242
241
|
}
|
243
|
-
export interface
|
242
|
+
export interface GuildWidget {
|
244
243
|
id: string;
|
245
244
|
name: string;
|
246
245
|
instantInvite: string | null;
|
247
|
-
channels: Array<
|
248
|
-
members: Array<
|
246
|
+
channels: Array<Channel>;
|
247
|
+
members: Array<User>;
|
249
248
|
presenceCount: number;
|
250
249
|
}
|
251
|
-
export interface
|
252
|
-
user?:
|
250
|
+
export interface GuildMember {
|
251
|
+
user?: User;
|
253
252
|
nick?: string | null;
|
254
253
|
avatar?: string | null;
|
255
254
|
roles: Array<string>;
|
@@ -262,7 +261,7 @@ export interface JSONGuildMember {
|
|
262
261
|
permissions?: string;
|
263
262
|
communicationDisabledUntil?: number | null;
|
264
263
|
}
|
265
|
-
export interface
|
264
|
+
export interface Integration {
|
266
265
|
id: string;
|
267
266
|
name: string;
|
268
267
|
type: string;
|
@@ -272,60 +271,60 @@ export interface JSONIntegration {
|
|
272
271
|
enableEmoticons?: boolean;
|
273
272
|
expireBehavior?: IntegrationExpireBehaviors;
|
274
273
|
expireGracePeriod?: number;
|
275
|
-
user?:
|
276
|
-
account:
|
274
|
+
user?: User;
|
275
|
+
account: IntegrationAccount;
|
277
276
|
syncedAt?: string;
|
278
277
|
subscriberCount?: number;
|
279
278
|
revoked?: boolean;
|
280
|
-
application?:
|
279
|
+
application?: IntegrationApplication;
|
281
280
|
scopes?: Array<OAuth2Scopes>;
|
282
281
|
}
|
283
|
-
export interface
|
282
|
+
export interface IntegrationAccount {
|
284
283
|
id: string;
|
285
284
|
name: string;
|
286
285
|
}
|
287
|
-
export interface
|
286
|
+
export interface IntegrationApplication {
|
288
287
|
id: string;
|
289
288
|
name: string;
|
290
289
|
icon: string | null;
|
291
290
|
description: string;
|
292
|
-
bot?:
|
291
|
+
bot?: User;
|
293
292
|
}
|
294
|
-
export interface
|
293
|
+
export interface Ban {
|
295
294
|
reason: string | null;
|
296
|
-
user:
|
295
|
+
user: User;
|
297
296
|
}
|
298
|
-
export interface
|
297
|
+
export interface WelcomeScreen {
|
299
298
|
description: string | null;
|
300
|
-
welcomeChannels: Array<
|
299
|
+
welcomeChannels: Array<WelcomeScreenChannel>;
|
301
300
|
}
|
302
|
-
export interface
|
301
|
+
export interface WelcomeScreenChannel {
|
303
302
|
channelId: string;
|
304
303
|
description: string;
|
305
304
|
emojiId: string | null;
|
306
305
|
emojiName: string | null;
|
307
306
|
}
|
308
|
-
export interface
|
307
|
+
export interface GuildOnboarding {
|
309
308
|
guildId: string;
|
310
|
-
prompts: Array<
|
309
|
+
prompts: Array<OnboardingPrompt>;
|
311
310
|
defaultChannelIds: Array<string>;
|
312
311
|
enabled: boolean;
|
313
312
|
mode: OnboardingMode;
|
314
313
|
}
|
315
|
-
export interface
|
314
|
+
export interface OnboardingPrompt {
|
316
315
|
id: string;
|
317
316
|
type: PromptTypes;
|
318
|
-
options: Array<
|
317
|
+
options: Array<PromptOption>;
|
319
318
|
title: string;
|
320
319
|
singleSelect: boolean;
|
321
320
|
required: boolean;
|
322
321
|
inOnboarding: boolean;
|
323
322
|
}
|
324
|
-
export interface
|
323
|
+
export interface PromptOption {
|
325
324
|
id: string;
|
326
325
|
channelIds: Array<string>;
|
327
326
|
roleIds: Array<string>;
|
328
|
-
emoji?:
|
327
|
+
emoji?: Emoji;
|
329
328
|
emojiId?: string;
|
330
329
|
emojiName?: string;
|
331
330
|
emojiAnimated?: boolean;
|
@@ -390,24 +389,24 @@ export interface CreateGuildChannelParams {
|
|
390
389
|
userLimit?: number;
|
391
390
|
rateLimitPerUser?: number;
|
392
391
|
position?: number;
|
393
|
-
permissionOverwrites?: Array<
|
392
|
+
permissionOverwrites?: Array<Overwrite>;
|
394
393
|
parentId?: string | null;
|
395
394
|
nsfw?: boolean;
|
396
395
|
rtcRegion?: string | null;
|
397
396
|
videoQualityMode?: VideoQualityModes;
|
398
397
|
defaultAutoArchiveDuration?: number;
|
399
|
-
defaultReactionEmoji?:
|
400
|
-
availableTags?: Array<
|
398
|
+
defaultReactionEmoji?: DefaultReaction | null;
|
399
|
+
availableTags?: Array<ForumTag>;
|
401
400
|
defaultSortOrder?: SortOrderTypes | null;
|
402
401
|
defaultForumLayout?: ForumLayoutTypes;
|
403
402
|
defaultThreadRateLimitPerUser?: number;
|
404
403
|
}
|
405
|
-
export
|
404
|
+
export interface EditGuildChannelPositionsParams {
|
406
405
|
id: string;
|
407
406
|
position?: number | null;
|
408
407
|
lockPermissions?: boolean | null;
|
409
408
|
parentId?: string | null;
|
410
|
-
}
|
409
|
+
}
|
411
410
|
export interface AddGuildMemberParams {
|
412
411
|
accessToken: string;
|
413
412
|
nick?: string;
|
@@ -443,10 +442,10 @@ export interface CreateGuildRoleParams {
|
|
443
442
|
unicodeEmoji?: string | null;
|
444
443
|
mentionable?: boolean;
|
445
444
|
}
|
446
|
-
export
|
445
|
+
export interface EditGuildRolePositionsParams {
|
447
446
|
id: string;
|
448
447
|
position?: number | null;
|
449
|
-
}
|
448
|
+
}
|
450
449
|
export interface EditGuildRoleParams {
|
451
450
|
name?: string | null;
|
452
451
|
permissions?: string | null;
|
@@ -467,11 +466,11 @@ export interface BeginGuildPruneParams {
|
|
467
466
|
}
|
468
467
|
export interface EditGuildWelcomeScreenParams {
|
469
468
|
enabled?: boolean | null;
|
470
|
-
welcomeChannels?: Array<
|
469
|
+
welcomeChannels?: Array<WelcomeScreenChannel> | null;
|
471
470
|
description?: string | null;
|
472
471
|
}
|
473
472
|
export interface EditGuildOnboardingParams {
|
474
|
-
prompts: Array<
|
473
|
+
prompts: Array<OnboardingPrompt>;
|
475
474
|
defaultChannelIds: Array<string>;
|
476
475
|
enabled: boolean;
|
477
476
|
mode: OnboardingMode;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole,
|
1
|
+
import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole, Attachment, User, GuildMember, Message, Role, Channel, Entitlement, RawEntitlement, RawEmbed, RawAllowedMentions, RawActionRow, RawApplicationCommandOptionChoice, Embed, AllowedMentions, ActionRow, ApplicationCommandOptionChoice, RawTextInput, TextInput, ExecuteWebhookParams } from ".";
|
2
2
|
import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
|
3
3
|
import type { File } from "../rest";
|
4
|
-
import { Collection } from "../utils";
|
5
4
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
|
6
5
|
export interface RawInteraction {
|
7
6
|
id: string;
|
@@ -90,83 +89,84 @@ export interface RawInteractionCallbackData {
|
|
90
89
|
custom_id?: string;
|
91
90
|
title?: string;
|
92
91
|
}
|
93
|
-
export interface
|
92
|
+
export interface Interaction {
|
94
93
|
id: string;
|
95
94
|
applicationId: string;
|
96
95
|
type: InteractionType;
|
97
|
-
data?:
|
96
|
+
data?: ApplicationCommandData & MessageComponentData & ModalSubmitData;
|
98
97
|
guildId?: string;
|
99
|
-
channel?:
|
98
|
+
channel?: Channel;
|
100
99
|
channelId?: string;
|
101
|
-
member?:
|
102
|
-
user?:
|
100
|
+
member?: GuildMember;
|
101
|
+
user?: User;
|
103
102
|
token: string;
|
104
103
|
version: number;
|
105
|
-
message?:
|
104
|
+
message?: Message;
|
106
105
|
appPermissions?: string;
|
107
106
|
locale?: string;
|
108
107
|
guildLocale?: string;
|
109
|
-
entitlements: Array<
|
108
|
+
entitlements: Array<Entitlement>;
|
110
109
|
}
|
111
|
-
export interface
|
110
|
+
export interface ApplicationCommandData {
|
112
111
|
id: string;
|
113
112
|
name: string;
|
114
113
|
type: ApplicationCommandTypes;
|
115
|
-
resolved?:
|
116
|
-
options?: Array<
|
114
|
+
resolved?: ResolvedData;
|
115
|
+
options?: Array<ApplicationCommandInteractionDataOption>;
|
117
116
|
guildId?: string;
|
118
117
|
targetId?: string;
|
119
118
|
}
|
120
|
-
export interface
|
119
|
+
export interface MessageComponentData {
|
121
120
|
customId: string;
|
122
121
|
componentType: ComponentTypes;
|
123
122
|
values?: Array<string>;
|
124
|
-
resolved?:
|
123
|
+
resolved?: ResolvedData;
|
125
124
|
}
|
126
|
-
export interface
|
125
|
+
export interface ModalSubmitData {
|
127
126
|
customId: string;
|
128
127
|
components: Array<{
|
129
128
|
type: ComponentTypes.ActionRow;
|
130
|
-
components: Array<
|
129
|
+
components: Array<TextInput>;
|
131
130
|
}>;
|
132
131
|
}
|
133
|
-
export interface
|
134
|
-
users?:
|
135
|
-
members?:
|
136
|
-
roles?:
|
137
|
-
channels?:
|
138
|
-
messages?:
|
139
|
-
attachments?:
|
132
|
+
export interface ResolvedData {
|
133
|
+
users?: Array<User>;
|
134
|
+
members?: Array<GuildMember>;
|
135
|
+
roles?: Array<Role>;
|
136
|
+
channels?: Array<Channel>;
|
137
|
+
messages?: Array<Message>;
|
138
|
+
attachments?: Array<Attachment>;
|
140
139
|
}
|
141
|
-
export interface
|
140
|
+
export interface ApplicationCommandInteractionDataOption {
|
142
141
|
name: string;
|
143
142
|
type: ApplicationCommandOptionType;
|
144
143
|
value?: string | number | boolean;
|
145
|
-
options?: Array<
|
144
|
+
options?: Array<ApplicationCommandInteractionDataOption>;
|
146
145
|
focused?: boolean;
|
147
146
|
}
|
148
|
-
export interface
|
147
|
+
export interface MessageInteraction {
|
149
148
|
id: string;
|
150
149
|
type: InteractionType;
|
151
150
|
name: string;
|
152
|
-
user:
|
153
|
-
member?:
|
151
|
+
user: User;
|
152
|
+
member?: GuildMember;
|
154
153
|
}
|
155
|
-
export interface
|
154
|
+
export interface InteractionResponse {
|
156
155
|
type: InteractionCallbackType;
|
157
|
-
data?:
|
156
|
+
data?: InteractionCallbackData;
|
158
157
|
}
|
159
|
-
export interface
|
158
|
+
export interface InteractionCallbackData {
|
160
159
|
tts?: boolean;
|
161
160
|
content?: string;
|
162
|
-
embeds?: Array<
|
163
|
-
allowedMentions?:
|
161
|
+
embeds?: Array<Embed>;
|
162
|
+
allowedMentions?: AllowedMentions;
|
164
163
|
flags?: MessageFlags;
|
165
|
-
components?: Array<
|
166
|
-
attachments?: Array<
|
164
|
+
components?: Array<ActionRow>;
|
165
|
+
attachments?: Array<Attachment>;
|
167
166
|
files?: Array<File>;
|
168
|
-
choices?: Array<
|
167
|
+
choices?: Array<ApplicationCommandOptionChoice>;
|
169
168
|
customId?: string;
|
170
169
|
title?: string;
|
171
170
|
}
|
172
|
-
export
|
171
|
+
export interface CreateInteractionFollowupMessageParams extends Omit<ExecuteWebhookParams, "threadId" | "avatarUrl" | "username"> {
|
172
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Application, Channel, Guild, GuildMember, GuildScheduledEvent, User, RawApplication, RawChannel, RawGuild, RawGuildMember, RawGuildScheduledEvent, RawUser } from ".";
|
2
2
|
import type { InviteTargetTypes } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-structure */
|
4
4
|
export interface RawInvite {
|
@@ -30,29 +30,29 @@ export interface RawInviteStageInstance {
|
|
30
30
|
speaker_count: number;
|
31
31
|
topic: string;
|
32
32
|
}
|
33
|
-
export interface
|
33
|
+
export interface Invite {
|
34
34
|
code: string;
|
35
|
-
guild?:
|
36
|
-
channel:
|
37
|
-
inviter?:
|
35
|
+
guild?: Guild;
|
36
|
+
channel: Channel;
|
37
|
+
inviter?: User;
|
38
38
|
targetType?: InviteTargetTypes;
|
39
|
-
targetUser?:
|
40
|
-
targetApplication?:
|
39
|
+
targetUser?: User;
|
40
|
+
targetApplication?: Application;
|
41
41
|
approximatePresenceCount?: number;
|
42
42
|
approximateMemberCount?: number;
|
43
43
|
expiresAt?: string | null;
|
44
|
-
stageInstance?:
|
45
|
-
guildScheduledEvent?:
|
44
|
+
stageInstance?: InviteStageInstance;
|
45
|
+
guildScheduledEvent?: GuildScheduledEvent;
|
46
46
|
}
|
47
|
-
export interface
|
47
|
+
export interface InviteMetadata {
|
48
48
|
uses: number;
|
49
49
|
maxUses: number;
|
50
50
|
maxAge: number;
|
51
51
|
temporary: boolean;
|
52
52
|
createdAt: string;
|
53
53
|
}
|
54
|
-
export interface
|
55
|
-
members: Array<
|
54
|
+
export interface InviteStageInstance {
|
55
|
+
members: Array<GuildMember>;
|
56
56
|
participantCount: number;
|
57
57
|
speakerCount: number;
|
58
58
|
topic: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Emoji, RawEmoji } from ".";
|
2
2
|
import type { ButtonStyles, ChannelTypes, ComponentTypes, TextInputStyles } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/interactions/message-components#button-object-button-structure */
|
4
4
|
export interface RawButton {
|
@@ -52,38 +52,38 @@ export interface RawActionRow {
|
|
52
52
|
type: ComponentTypes.ActionRow;
|
53
53
|
components: Array<RawButton | RawSelectMenu | RawTextInput>;
|
54
54
|
}
|
55
|
-
export interface
|
55
|
+
export interface Button {
|
56
56
|
type: ComponentTypes.Button;
|
57
57
|
style: ButtonStyles;
|
58
58
|
label?: string;
|
59
|
-
emoji?: Pick<
|
59
|
+
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
60
60
|
customId?: string;
|
61
61
|
url?: string;
|
62
62
|
disabled?: boolean;
|
63
63
|
}
|
64
|
-
export interface
|
64
|
+
export interface SelectMenu {
|
65
65
|
type: ComponentTypes.ChannelSelect | ComponentTypes.MentionableSelect | ComponentTypes.RoleSelect | ComponentTypes.StringSelect | ComponentTypes.UserSelect;
|
66
66
|
customId: string;
|
67
|
-
options?: Array<
|
67
|
+
options?: Array<SelectOption>;
|
68
68
|
channelTypes?: Array<ChannelTypes>;
|
69
69
|
placeholder?: string;
|
70
|
-
defaultValues?: Array<
|
70
|
+
defaultValues?: Array<DefaultValue>;
|
71
71
|
minValues?: number;
|
72
72
|
maxValues?: number;
|
73
73
|
disabled?: boolean;
|
74
74
|
}
|
75
|
-
export interface
|
75
|
+
export interface SelectOption {
|
76
76
|
label: string;
|
77
77
|
value: string;
|
78
78
|
description?: string;
|
79
|
-
emoji?: Pick<
|
79
|
+
emoji?: Pick<Emoji, "name" | "id" | "animated">;
|
80
80
|
default?: boolean;
|
81
81
|
}
|
82
|
-
export interface
|
82
|
+
export interface DefaultValue {
|
83
83
|
id: string;
|
84
84
|
type: string;
|
85
85
|
}
|
86
|
-
export interface
|
86
|
+
export interface TextInput {
|
87
87
|
type: ComponentTypes.TextInput;
|
88
88
|
customId: string;
|
89
89
|
style: TextInputStyles;
|
@@ -94,7 +94,7 @@ export interface JSONTextInput {
|
|
94
94
|
value?: string;
|
95
95
|
placeholder?: string;
|
96
96
|
}
|
97
|
-
export interface
|
97
|
+
export interface ActionRow {
|
98
98
|
type: ComponentTypes.ActionRow;
|
99
|
-
components: Array<
|
99
|
+
components: Array<Button | SelectMenu | TextInput>;
|
100
100
|
}
|
package/dist/lib/types/role.d.ts
CHANGED
@@ -23,7 +23,7 @@ export interface RawRoleTags {
|
|
23
23
|
available_for_purchase?: null;
|
24
24
|
guild_connections?: null;
|
25
25
|
}
|
26
|
-
export interface
|
26
|
+
export interface Role {
|
27
27
|
id: string;
|
28
28
|
name: string;
|
29
29
|
color: number;
|
@@ -34,10 +34,10 @@ export interface JSONRole {
|
|
34
34
|
permissions: string;
|
35
35
|
managed: boolean;
|
36
36
|
mentionable: boolean;
|
37
|
-
tags?:
|
37
|
+
tags?: RoleTags;
|
38
38
|
flags: RoleFlags;
|
39
39
|
}
|
40
|
-
export interface
|
40
|
+
export interface RoleTags {
|
41
41
|
botId?: string;
|
42
42
|
integrationId?: string;
|
43
43
|
premiumSubscriber?: null;
|
package/dist/lib/types/sku.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkuFlags, SkuTypes } from "../constants";
|
2
2
|
/** https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure */
|
3
|
-
export interface
|
3
|
+
export interface RawSku {
|
4
4
|
id: string;
|
5
|
-
type:
|
5
|
+
type: SkuTypes;
|
6
6
|
dependent_sku_id?: string | null;
|
7
7
|
application_id: string;
|
8
8
|
manifest_labels?: null;
|
@@ -11,13 +11,13 @@ export interface RawSKU {
|
|
11
11
|
features?: [];
|
12
12
|
release_date?: null;
|
13
13
|
slug: string;
|
14
|
-
flags:
|
14
|
+
flags: SkuFlags;
|
15
15
|
show_age_gate?: boolean;
|
16
16
|
}
|
17
|
-
export interface
|
17
|
+
export interface Sku {
|
18
18
|
id: string;
|
19
|
-
type:
|
20
|
-
|
19
|
+
type: SkuTypes;
|
20
|
+
dependentSkuId?: string | null;
|
21
21
|
applicationId: string;
|
22
22
|
manifestLabels?: null;
|
23
23
|
accessType?: number;
|
@@ -25,6 +25,6 @@ export interface JSONSKU {
|
|
25
25
|
features?: [];
|
26
26
|
releaseDate?: null;
|
27
27
|
slug: string;
|
28
|
-
flags:
|
28
|
+
flags: SkuFlags;
|
29
29
|
showAgeGate?: boolean;
|
30
30
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { StickerTypes, StickerFormatTypes } from "../constants";
|
2
|
-
import type {
|
2
|
+
import type { User, RawUser } from ".";
|
3
3
|
import type { File } from "../rest";
|
4
4
|
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
|
5
5
|
export interface RawSticker {
|
@@ -32,7 +32,7 @@ export interface RawStickerPack {
|
|
32
32
|
description: string;
|
33
33
|
banner_asset_id?: string;
|
34
34
|
}
|
35
|
-
export interface
|
35
|
+
export interface Sticker {
|
36
36
|
id: string;
|
37
37
|
packId?: string;
|
38
38
|
name: string;
|
@@ -43,17 +43,17 @@ export interface JSONSticker {
|
|
43
43
|
formatType: StickerFormatTypes;
|
44
44
|
available?: boolean;
|
45
45
|
guildId?: string;
|
46
|
-
user?:
|
46
|
+
user?: User;
|
47
47
|
sortValue?: number;
|
48
48
|
}
|
49
|
-
export interface
|
49
|
+
export interface StickerItem {
|
50
50
|
id: string;
|
51
51
|
name: string;
|
52
52
|
formatType: StickerFormatTypes;
|
53
53
|
}
|
54
|
-
export interface
|
54
|
+
export interface StickerPack {
|
55
55
|
id: string;
|
56
|
-
stickers: Array<
|
56
|
+
stickers: Array<Sticker>;
|
57
57
|
name: string;
|
58
58
|
skuId: string;
|
59
59
|
coverStickerId?: string;
|
package/dist/lib/types/team.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { User, RawUser } from ".";
|
2
2
|
import type { TeamMemberRoleTypes } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/topics/teams#data-models-team-object */
|
4
4
|
export interface RawTeam {
|
@@ -15,16 +15,16 @@ export interface RawTeamMember {
|
|
15
15
|
user: RawUser;
|
16
16
|
role: TeamMemberRoleTypes;
|
17
17
|
}
|
18
|
-
export interface
|
18
|
+
export interface Team {
|
19
19
|
icon: string | null;
|
20
20
|
id: string;
|
21
|
-
members: Array<
|
21
|
+
members: Array<TeamMember>;
|
22
22
|
name: string;
|
23
23
|
ownerUserId: string;
|
24
24
|
}
|
25
|
-
export interface
|
25
|
+
export interface TeamMember {
|
26
26
|
membershipState: number;
|
27
27
|
teamId: string;
|
28
|
-
user:
|
28
|
+
user: User;
|
29
29
|
role: TeamMemberRoleTypes;
|
30
30
|
}
|
package/dist/lib/types/user.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { UserFlags, Services, VisibilityTypes, PremiumTypes, ApplicationRoleConnectionMetadataType } from "../constants";
|
2
|
-
import type {
|
2
|
+
import type { ApplicationRoleConnectionMetadata, Integration, LocaleMap, RawApplicationRoleConnectionMetadata, RawIntegration } from ".";
|
3
3
|
/** https://discord.com/developers/docs/resources/user#user-object-user-structure */
|
4
4
|
export interface RawUser {
|
5
5
|
id: string;
|
@@ -39,7 +39,7 @@ export interface RawApplicationRoleConnection {
|
|
39
39
|
platform_username: string | null;
|
40
40
|
metadata: RawApplicationRoleConnectionMetadata;
|
41
41
|
}
|
42
|
-
export interface
|
42
|
+
export interface User {
|
43
43
|
id: string;
|
44
44
|
username: string;
|
45
45
|
discriminator: string;
|
@@ -58,22 +58,22 @@ export interface JSONUser {
|
|
58
58
|
publicFlags?: UserFlags;
|
59
59
|
avatarDecoration?: string | null;
|
60
60
|
}
|
61
|
-
export interface
|
61
|
+
export interface Connection {
|
62
62
|
id: string;
|
63
63
|
name: string;
|
64
64
|
type: Services;
|
65
65
|
revoked?: boolean;
|
66
|
-
integrations?: Array<
|
66
|
+
integrations?: Array<Integration>;
|
67
67
|
verified: boolean;
|
68
68
|
friendSync: boolean;
|
69
69
|
showActivity: boolean;
|
70
70
|
twoWayLink: boolean;
|
71
71
|
visibility: VisibilityTypes;
|
72
72
|
}
|
73
|
-
export interface
|
73
|
+
export interface ApplicationRoleConnection {
|
74
74
|
platformName: string | null;
|
75
75
|
platformUsername: string | null;
|
76
|
-
metadata:
|
76
|
+
metadata: ApplicationRoleConnectionMetadata;
|
77
77
|
}
|
78
78
|
export interface EditCurrentUserParams {
|
79
79
|
username?: string;
|