disgroove 2.2.0-dev.15819eb → 2.2.0-dev.301452e

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.
@@ -1,31 +1,33 @@
1
1
  /// <reference types="node" />
2
- import { GatewayIntents, type OAuth2Scopes, type StatusTypes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel, type ReactionTypes } from "./constants";
2
+ import { GatewayIntents, type OAuth2Scopes, type StatusTypes, type ActionTypes, type ImageWidgetStyleOptions, InteractionCallbackType, type MFALevel, type ReactionTypes, ApplicationCommandTypes, EventTypes, TriggerTypes, ChannelTypes, VideoQualityModes, SortOrderTypes, ForumLayoutTypes, InviteTargetTypes, VerificationLevel, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, SystemChannelFlags, ApplicationFlags, ApplicationIntegrationTypes, ChannelFlags, GuildFeatures, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, MessageFlags, OnboardingMode, PrivacyLevel, GuildMemberFlags } from "./constants";
3
3
  import { Util } from "./utils";
4
- import { RequestManager } from "./rest";
4
+ import { RequestManager, File } from "./rest";
5
5
  import EventEmitter from "node:events";
6
6
  import { ShardManager } from "./gateway";
7
- import type { Application, EditCurrentApplicationParams } from "./types/application";
8
- import type { BulkEditGlobalApplicationCommandsParams, ApplicationCommand, BulkEditGuildApplicationCommandsParams, CreateGlobalApplicationCommandParams, CreateGuildApplicationCommandParams, GuildApplicationCommandPermissions, EditGlobalApplicationCommandParams, EditGuildApplicationCommandParams } from "./types/application-command";
7
+ import type { Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
8
+ import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption } from "./types/application-command";
9
9
  import type { ApplicationRoleConnectionMetadata } from "./types/application-role-connection-metadata";
10
10
  import type { AuditLog, AuditLogEntry } from "./types/audit-log";
11
- import type { CreateAutoModerationRuleParams, AutoModerationRule, EditAutoModerationRuleParams } from "./types/auto-moderation";
12
- import type { BulkDeleteMessagesParams, Channel, CreateChannelInviteParams, Message, CreateMessageParams, CreateThreadParams, CreateThreadFromMessageParams, CreateThreadWithoutMessageParams, EditChannelParams, EditMessageParams, FollowedChannel, ThreadMember } from "./types/channel";
13
- import type { snowflake, timestamp } from "./types/common";
14
- import type { CreateGuildEmojiParams, Emoji, EditGuildEmojiParams } from "./types/emoji";
15
- import type { CreateTestEntitlementParams, Entitlement } from "./types/entitlements";
11
+ import type { AutoModerationRule, TriggerMetadata, AutoModerationAction } from "./types/auto-moderation";
12
+ import type { Channel, Message, FollowedChannel, ThreadMember, Overwrite, DefaultReaction, ForumTag, AllowedMentions, Attachment, Embed, MessageReference } from "./types/channel";
13
+ import type { LocaleMap, snowflake, timestamp } from "./types/common";
14
+ import type { Emoji } from "./types/emoji";
15
+ import type { Entitlement } from "./types/entitlements";
16
16
  import type { Activity, AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields } from "./types/gateway-events";
17
- import type { Guild, AddGuildMemberParams, GuildMember, BeginGuildPruneParams, BulkGuildBanParams, CreateGuildChannelParams, CreateGuildParams, CreateGuildBanParams, CreateGuildRoleParams, EditGuildChannelPositionsParams, EditCurrentGuildMemberParams, EditCurrentUserVoiceStateParams, EditGuildParams, EditGuildMemberParams, EditGuildMFALevelParams, EditGuildOnboardingParams, EditGuildRolePositionsParams, EditGuildWelcomeScreenParams, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild } from "./types/guild";
18
- import type { CreateGuildScheduledEventParams, GuildScheduledEvent, EditGuildScheduledEventParams, GuildScheduledEventUser } from "./types/guild-scheduled-event";
19
- import type { CreateGuildFromGuildTemplateParams, CreateGuildTemplateParams, GuildTemplate, EditGuildTemplateParams } from "./types/guild-template";
20
- import type { CreateInteractionFollowupMessageParams, InteractionResponse, Interaction } from "./types/interaction";
17
+ import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
18
+ import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata } from "./types/guild-scheduled-event";
19
+ import type { GuildTemplate } from "./types/guild-template";
20
+ import type { Interaction, InteractionCallbackData } from "./types/interaction";
21
21
  import type { Invite } from "./types/invite";
22
+ import type { ActionRow } from "./types/message-components";
23
+ import type { PollCreateParams } from "./types/poll";
22
24
  import type { Role } from "./types/role";
23
25
  import type { Sku } from "./types/sku";
24
- import type { CreateStageInstanceParams, StageInstance, EditStageInstanceParams } from "./types/stage-instance";
25
- import type { CreateGuildStickerParams, Sticker, EditGuildStickerParams, StickerPack } from "./types/sticker";
26
- import type { User, CreateDMParams, EditCurrentUserParams, ApplicationRoleConnection, Connection, UpdateCurrentUserApplicationRoleConnection } from "./types/user";
26
+ import type { StageInstance } from "./types/stage-instance";
27
+ import type { Sticker, StickerPack } from "./types/sticker";
28
+ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
27
29
  import type { VoiceRegion, VoiceState } from "./types/voice";
28
- import type { Webhook, EditWebhookMessageParams, EditWebhookParams, ExecuteWebhookParams } from "./types/webhook";
30
+ import type { Webhook } from "./types/webhook";
29
31
  export interface ClientOptions {
30
32
  intents?: number | Array<number>;
31
33
  shardsCount?: number | "auto";
@@ -50,86 +52,310 @@ export declare class Client extends EventEmitter {
50
52
  nick: string;
51
53
  }): void;
52
54
  /** https://discord.com/developers/docs/resources/guild#add-guild-member */
53
- addGuildMember(guildId: snowflake, userId: snowflake, options: AddGuildMemberParams): Promise<GuildMember | null>;
55
+ addGuildMember(guildId: snowflake, userId: snowflake, options: {
56
+ accessToken: string;
57
+ nick?: string;
58
+ roles?: Array<snowflake>;
59
+ mute?: boolean;
60
+ deaf?: boolean;
61
+ }): Promise<GuildMember | null>;
54
62
  /** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
55
63
  addGuildMemberRole(guildId: snowflake, userId: snowflake, roleId: snowflake, reason?: string): void;
56
64
  /** https://discord.com/developers/docs/resources/channel#add-thread-member */
57
65
  addThreadMember(channelId: snowflake, userId: snowflake): void;
58
66
  /** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
59
- beginGuildPrune(guildId: snowflake, options: BeginGuildPruneParams, reason?: string): Promise<{
67
+ beginGuildPrune(guildId: snowflake, options: {
68
+ days: number;
69
+ computePruneCount: boolean;
70
+ includeRoles: Array<snowflake>;
71
+ reason?: string;
72
+ }, reason?: string): Promise<{
60
73
  pruned: number;
61
74
  }>;
62
75
  /** https://discord.com/developers/docs/resources/guild#bulk-guild-ban */
63
- bulkGuildBan(guildId: snowflake, options: BulkGuildBanParams, reason?: string): Promise<{
76
+ bulkGuildBan(guildId: snowflake, options: {
77
+ userIds: Array<snowflake>;
78
+ deleteMessageSeconds?: number;
79
+ }, reason?: string): Promise<{
64
80
  bannedUsers: Array<string>;
65
81
  failedUsers: Array<string>;
66
82
  }>;
67
83
  /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
68
- bulkDeleteMessages(channelId: snowflake, options?: BulkDeleteMessagesParams, reason?: string): void;
84
+ bulkDeleteMessages(channelId: snowflake, options?: {
85
+ messages: Array<snowflake>;
86
+ }, reason?: string): void;
69
87
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
70
- bulkEditGlobalApplicationCommands(applicationId: snowflake, commands: BulkEditGlobalApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
88
+ bulkEditGlobalApplicationCommands(applicationId: snowflake, commands: Array<{
89
+ id?: snowflake;
90
+ name: string;
91
+ nameLocalizations?: LocaleMap | null;
92
+ description?: string;
93
+ descriptionLocalizations?: LocaleMap | null;
94
+ options?: Array<ApplicationCommandOption>;
95
+ defaultMemberPermissions?: string | null;
96
+ dmPermission?: boolean;
97
+ defaultPermission?: boolean | null;
98
+ type?: ApplicationCommandTypes;
99
+ nsfw?: boolean;
100
+ }>): Promise<Array<ApplicationCommand>>;
71
101
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
72
- bulkEditGuildApplicationCommands(applicationId: snowflake, guildId: snowflake, commands: BulkEditGuildApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
102
+ bulkEditGuildApplicationCommands(applicationId: snowflake, guildId: snowflake, commands: Array<{
103
+ id?: snowflake;
104
+ name: string;
105
+ nameLocalizations?: LocaleMap | null;
106
+ description?: string;
107
+ descriptionLocalizations?: LocaleMap | null;
108
+ options?: Array<ApplicationCommandOption>;
109
+ defaultMemberPermissions?: string | null;
110
+ dmPermission?: boolean;
111
+ defaultPermission?: boolean | null;
112
+ type: ApplicationCommandTypes;
113
+ nsfw?: boolean;
114
+ }>): Promise<Array<ApplicationCommand>>;
73
115
  /** https://discord.com/developers/docs/topics/gateway#connections */
74
116
  connect(): Promise<void>;
75
117
  /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
76
118
  consumeEntitlement(applicationId: snowflake, entitlementId: snowflake): void;
77
119
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
78
- createAutoModerationRule(guildId: snowflake, options: CreateAutoModerationRuleParams, reason?: string): Promise<AutoModerationRule>;
120
+ createAutoModerationRule(guildId: snowflake, options: {
121
+ name: string;
122
+ eventType: EventTypes;
123
+ triggerType: TriggerTypes;
124
+ triggerMetadata?: TriggerMetadata;
125
+ actions: Array<AutoModerationAction>;
126
+ enabled?: boolean;
127
+ exemptRoles?: Array<string>;
128
+ exemptChannels?: Array<string>;
129
+ }, reason?: string): Promise<AutoModerationRule>;
79
130
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
80
- createChannel(guildId: snowflake, options: CreateGuildChannelParams, reason?: string): Promise<Channel>;
131
+ createChannel(guildId: snowflake, options: {
132
+ name: string | null;
133
+ type?: ChannelTypes;
134
+ topic?: string | null;
135
+ bitrate?: number;
136
+ userLimit?: number;
137
+ rateLimitPerUser?: number;
138
+ position?: number;
139
+ permissionOverwrites?: Array<Overwrite>;
140
+ parentId?: snowflake | null;
141
+ nsfw?: boolean;
142
+ rtcRegion?: string | null;
143
+ videoQualityMode?: VideoQualityModes;
144
+ defaultAutoArchiveDuration?: number;
145
+ defaultReactionEmoji?: DefaultReaction | null;
146
+ availableTags?: Array<ForumTag>;
147
+ defaultSortOrder?: SortOrderTypes | null;
148
+ defaultForumLayout?: ForumLayoutTypes;
149
+ defaultThreadRateLimitPerUser?: number;
150
+ }, reason?: string): Promise<Channel>;
81
151
  /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
82
- createChannelInvite(channelId: snowflake, options: CreateChannelInviteParams, reason?: string): Promise<Invite>;
152
+ createChannelInvite(channelId: snowflake, options: {
153
+ maxAge?: number;
154
+ maxUses?: number;
155
+ temporary?: boolean;
156
+ unique?: boolean;
157
+ targetType?: InviteTargetTypes;
158
+ targetUserId?: snowflake;
159
+ targetApplicationId?: snowflake;
160
+ }, reason?: string): Promise<Invite>;
83
161
  /** https://discord.com/developers/docs/resources/webhook#create-webhook */
84
162
  createChannelWebhook(channelId: snowflake, options: {
85
163
  name: string;
86
164
  avatar?: string | null;
87
165
  }, reason?: string): Promise<Webhook>;
88
166
  /** https://discord.com/developers/docs/resources/user#create-dm */
89
- createDM(options: CreateDMParams): Promise<Channel>;
167
+ createDM(options: {
168
+ recipientId: snowflake;
169
+ }): Promise<Channel>;
90
170
  /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
91
- createGlobalApplicationCommand(applicationId: snowflake, options: CreateGlobalApplicationCommandParams): Promise<ApplicationCommand>;
171
+ createGlobalApplicationCommand(applicationId: snowflake, options: {
172
+ name: string;
173
+ nameLocalizations?: LocaleMap | null;
174
+ description?: string;
175
+ descriptionLocalizations?: LocaleMap | null;
176
+ options?: Array<ApplicationCommandOption>;
177
+ defaultMemberPermissions?: string | null;
178
+ dmPermission?: boolean;
179
+ defaultPermission?: boolean | null;
180
+ type?: ApplicationCommandTypes;
181
+ nsfw?: boolean;
182
+ }): Promise<ApplicationCommand>;
92
183
  /** https://discord.com/developers/docs/resources/user#create-group-dm */
93
184
  createGroupDM(options: {
94
185
  accessTokens: Array<string>;
95
186
  nicks: Array<string>;
96
187
  }): Promise<Channel>;
97
188
  /** https://discord.com/developers/docs/resources/guild#create-guild */
98
- createGuild(options: CreateGuildParams): Promise<Guild>;
189
+ createGuild(options: {
190
+ name: string;
191
+ region?: string | null;
192
+ icon?: string;
193
+ verificationLevel?: VerificationLevel;
194
+ defaultMessageNotifications?: DefaultMessageNotificationLevel;
195
+ explicitContentFilter?: ExplicitContentFilterLevel;
196
+ roles?: Array<{
197
+ name?: string;
198
+ permissions?: string;
199
+ color?: number;
200
+ hoist?: boolean;
201
+ icon?: string | null;
202
+ unicodeEmoji?: string | null;
203
+ mentionable?: boolean;
204
+ }>;
205
+ channels?: Array<{
206
+ name: string;
207
+ type: ChannelTypes;
208
+ id?: number;
209
+ parentId?: number;
210
+ }>;
211
+ afkChannelId?: snowflake;
212
+ afkTimeout?: number;
213
+ systemChannelId?: snowflake;
214
+ systemChannelFlags?: SystemChannelFlags;
215
+ }): Promise<Guild>;
99
216
  /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
100
- createGuildApplicationCommand(applicationId: snowflake, guildId: snowflake, options: CreateGuildApplicationCommandParams): Promise<ApplicationCommand>;
217
+ createGuildApplicationCommand(applicationId: snowflake, guildId: snowflake, options: {
218
+ name: string;
219
+ nameLocalizations?: LocaleMap | null;
220
+ description?: string;
221
+ descriptionLocalizations?: LocaleMap | null;
222
+ options?: Array<ApplicationCommandOption>;
223
+ defaultMemberPermissions?: string | null;
224
+ defaultPermission?: boolean | null;
225
+ type?: ApplicationCommandTypes;
226
+ nsfw?: boolean;
227
+ }): Promise<ApplicationCommand>;
101
228
  /** https://discord.com/developers/docs/resources/guild#create-guild-ban */
102
- createGuildBan(guildId: snowflake, userId: snowflake, options?: CreateGuildBanParams, reason?: string): void;
229
+ createGuildBan(guildId: snowflake, userId: snowflake, options?: {
230
+ deleteMessageDays?: number;
231
+ deleteMessageSeconds?: number;
232
+ }, reason?: string): void;
103
233
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
104
- createGuildEmoji(guildId: snowflake, options: CreateGuildEmojiParams, reason?: string): Promise<Emoji>;
234
+ createGuildEmoji(guildId: snowflake, options: {
235
+ name: string;
236
+ image: string;
237
+ roles: Array<snowflake>;
238
+ }, reason?: string): Promise<Emoji>;
105
239
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template */
106
- createGuildFromTemplate(code: string, options: CreateGuildFromGuildTemplateParams): Promise<Guild>;
240
+ createGuildFromTemplate(code: string, options: {
241
+ name: string;
242
+ icon?: string;
243
+ }): Promise<Guild>;
107
244
  /** https://discord.com/developers/docs/resources/guild#create-guild-role */
108
- createGuildRole(guildId: snowflake, options: CreateGuildRoleParams, reason?: string): Promise<Role>;
245
+ createGuildRole(guildId: snowflake, options: {
246
+ name?: string;
247
+ permissions?: string;
248
+ color?: number;
249
+ hoist?: boolean;
250
+ icon?: string | null;
251
+ unicodeEmoji?: string | null;
252
+ mentionable?: boolean;
253
+ }, reason?: string): Promise<Role>;
109
254
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
110
- createGuildScheduledEvent(guildId: snowflake, options: CreateGuildScheduledEventParams, reason?: string): Promise<GuildScheduledEvent>;
255
+ createGuildScheduledEvent(guildId: snowflake, options: {
256
+ channelId?: snowflake | null;
257
+ entityMetadata?: GuildScheduledEventEntityMetadata | null;
258
+ name: string;
259
+ privacyLevel: GuildScheduledEventPrivacyLevel;
260
+ scheduledStartTime: string;
261
+ scheduledEndTime?: string | null;
262
+ description?: string | null;
263
+ entityType: GuildScheduledEventEntityTypes;
264
+ image?: string;
265
+ }, reason?: string): Promise<GuildScheduledEvent>;
111
266
  /** https://discord.com/developers/docs/resources/sticker#create-guild-sticker */
112
- createGuildSticker(guildId: snowflake, options: CreateGuildStickerParams, reason?: string): Promise<Sticker>;
267
+ createGuildSticker(guildId: snowflake, options: {
268
+ name: string;
269
+ description: string;
270
+ tags: string;
271
+ file: File;
272
+ }, reason?: string): Promise<Sticker>;
113
273
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
114
- createGuildTemplate(guildId: snowflake, options: CreateGuildTemplateParams): Promise<GuildTemplate>;
274
+ createGuildTemplate(guildId: snowflake, options: {
275
+ name: string;
276
+ description?: string | null;
277
+ }): Promise<GuildTemplate>;
115
278
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message */
116
- createInteractionFollowupMessage(applicationId: snowflake, interactionToken: string, options: CreateInteractionFollowupMessageParams): Promise<Message>;
279
+ createInteractionFollowupMessage(applicationId: snowflake, interactionToken: string, options: {
280
+ content?: string | null;
281
+ tts?: boolean;
282
+ embeds?: Array<Embed> | null;
283
+ allowedMentions?: AllowedMentions | null;
284
+ components?: Array<ActionRow> | null;
285
+ files?: Array<File> | null;
286
+ attachments?: Array<Attachment> | null;
287
+ flags?: MessageFlags | null;
288
+ threadName?: string;
289
+ appliedTags?: Array<string>;
290
+ poll?: PollCreateParams;
291
+ }): Promise<Message>;
117
292
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
118
- createInteractionResponse(interactionId: snowflake, interactionToken: string, options: InteractionResponse): void;
293
+ createInteractionResponse(interactionId: snowflake, interactionToken: string, options: {
294
+ type: InteractionCallbackType;
295
+ data?: InteractionCallbackData;
296
+ }): void;
119
297
  /** https://discord.com/developers/docs/resources/channel#create-message */
120
- createMessage(channelId: snowflake, options: CreateMessageParams): Promise<Message>;
298
+ createMessage(channelId: snowflake, options: {
299
+ content?: string;
300
+ nonce?: string | number;
301
+ tts?: boolean;
302
+ embeds?: Array<Embed>;
303
+ allowedMentions?: AllowedMentions;
304
+ messageReference?: MessageReference;
305
+ components?: Array<ActionRow>;
306
+ stickersIds?: Array<snowflake>;
307
+ files?: Array<File>;
308
+ attachments?: Array<Attachment>;
309
+ flags?: MessageFlags;
310
+ enforceNonce?: boolean;
311
+ poll?: PollCreateParams;
312
+ }): Promise<Message>;
121
313
  /** https://discord.com/developers/docs/resources/channel#create-reaction */
122
314
  createMessageReaction(channelId: snowflake, messageId: snowflake, emoji: string): void;
123
315
  /** https://discord.com/developers/docs/resources/stage-instance#create-stage-instance */
124
- createStageInstance(options: CreateStageInstanceParams, reason?: string): Promise<StageInstance>;
316
+ createStageInstance(options: {
317
+ channelId: snowflake;
318
+ topic: string;
319
+ privacyLevel?: PrivacyLevel;
320
+ sendStartNotifications?: boolean;
321
+ guildScheduledEventId?: snowflake;
322
+ }, reason?: string): Promise<StageInstance>;
125
323
  /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
126
- createTestEntitlement(applicationId: snowflake, options: CreateTestEntitlementParams): Promise<Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionId">>;
324
+ createTestEntitlement(applicationId: snowflake, options: {
325
+ skuId: snowflake;
326
+ ownerId: snowflake;
327
+ ownerType: number;
328
+ }): Promise<Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionId">>;
127
329
  /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */
128
- createThread(channelId: snowflake, options: CreateThreadParams, reason?: string): Promise<Channel>;
330
+ createThread(channelId: snowflake, options: {
331
+ name: string;
332
+ autoArchiveDuration?: number;
333
+ rateLimitPerUser?: number | null;
334
+ message: {
335
+ content?: string | null;
336
+ embeds?: Array<Embed> | null;
337
+ allowedMentions?: AllowedMentions | null;
338
+ components?: Array<ActionRow> | null;
339
+ attachments?: Array<Attachment> | null;
340
+ flags?: MessageFlags | null;
341
+ };
342
+ appliedTags?: Array<string>;
343
+ files?: Array<File> | null;
344
+ }, reason?: string): Promise<Channel>;
129
345
  /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
130
- createThreadFromMessage(channelId: snowflake, messageId: snowflake, options: CreateThreadFromMessageParams, reason?: string): Promise<Channel>;
346
+ createThreadFromMessage(channelId: snowflake, messageId: snowflake, options: {
347
+ name: string;
348
+ autoArchiveDuration?: number;
349
+ rateLimitPerUser?: number | null;
350
+ }, reason?: string): Promise<Channel>;
131
351
  /** https://discord.com/developers/docs/resources/channel#start-thread-without-message */
132
- createThreadWithoutMessage(channelId: snowflake, options: CreateThreadWithoutMessageParams, reason?: string): Promise<Channel>;
352
+ createThreadWithoutMessage(channelId: snowflake, options: {
353
+ name: string;
354
+ autoArchiveDuration?: number;
355
+ type?: ChannelTypes;
356
+ invitable?: boolean;
357
+ rateLimitPerUser?: number | null;
358
+ }, reason?: string): Promise<Channel>;
133
359
  /** https://discord.com/developers/docs/resources/channel#crosspost-message */
134
360
  crosspostMessage(channelId: snowflake, messageId: snowflake): Promise<Message>;
135
361
  /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
@@ -182,13 +408,48 @@ export declare class Client extends EventEmitter {
182
408
  deleteWebhookWithToken(webhookId: snowflake, webhookToken: string, reason?: string): void;
183
409
  disconnect(): void;
184
410
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
185
- editAutoModerationRule(guildId: snowflake, autoModerationRuleId: snowflake, options: EditAutoModerationRuleParams, reason?: string): Promise<AutoModerationRule>;
411
+ editAutoModerationRule(guildId: snowflake, autoModerationRuleId: snowflake, options: {
412
+ name?: string;
413
+ eventType?: EventTypes;
414
+ triggerType?: TriggerTypes;
415
+ triggerMetadata?: TriggerMetadata;
416
+ actions?: Array<AutoModerationAction>;
417
+ enabled?: boolean;
418
+ exemptRoles?: Array<string>;
419
+ exemptChannels?: Array<string>;
420
+ }, reason?: string): Promise<AutoModerationRule>;
186
421
  /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
187
422
  editApplicationCommandPermissions(applicationId: snowflake, guildId: snowflake, commandId: snowflake, options: {
188
423
  permissions: Array<GuildApplicationCommandPermissions>;
189
424
  }): Promise<GuildApplicationCommandPermissions>;
190
425
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
191
- editChannel(channelId: snowflake, options: EditChannelParams, reason?: string): Promise<Channel>;
426
+ editChannel(channelId: snowflake, options: {
427
+ name?: string;
428
+ icon?: string;
429
+ type?: ChannelTypes;
430
+ position?: number | null;
431
+ topic?: string | null;
432
+ nsfw?: boolean | null;
433
+ rateLimitPerUser?: number | null;
434
+ bitrate?: number | null;
435
+ userLimit?: number | null;
436
+ permissionOverwrites?: Array<Overwrite> | null;
437
+ parentId?: snowflake | null;
438
+ rtcRegion?: string | null;
439
+ videoQualityMode?: VideoQualityModes | null;
440
+ defaultAutoArchiveDuration?: number | null;
441
+ flags?: ChannelFlags;
442
+ availableTags?: Array<ForumTag>;
443
+ defaultReactionEmoji?: DefaultReaction | null;
444
+ defaultThreadRateLimitPerUser?: number;
445
+ defaultSortOrder?: SortOrderTypes | null;
446
+ defaultForumLayout?: ForumLayoutTypes;
447
+ archived?: boolean;
448
+ autoArchiveDuration?: number;
449
+ locked?: boolean;
450
+ invitable?: boolean;
451
+ appliedTags?: Array<string>;
452
+ }, reason?: string): Promise<Channel>;
192
453
  /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions */
193
454
  editChannelPermissions(channelId: snowflake, overwriteId: snowflake, options: {
194
455
  allow?: string | null;
@@ -196,29 +457,114 @@ export declare class Client extends EventEmitter {
196
457
  type: number;
197
458
  }, reason?: string): void;
198
459
  /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
199
- editChannelPositions(guildId: snowflake, options: EditGuildChannelPositionsParams): void;
460
+ editChannelPositions(guildId: snowflake, options: Array<{
461
+ id: snowflake;
462
+ position?: number | null;
463
+ lockPermissions?: boolean | null;
464
+ parentId?: snowflake | null;
465
+ }>): void;
200
466
  /** https://discord.com/developers/docs/resources/user#modify-current-user */
201
- editCurrentUser(options: EditCurrentUserParams): Promise<User>;
467
+ editCurrentUser(options: {
468
+ username?: string;
469
+ avatar?: string | null;
470
+ banner?: string | null;
471
+ }): Promise<User>;
202
472
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
203
- editCurrentGuildMember(guildId: snowflake, options: EditCurrentGuildMemberParams, reason?: string): Promise<GuildMember>;
473
+ editCurrentGuildMember(guildId: snowflake, options: {
474
+ nick?: string;
475
+ }, reason?: string): Promise<GuildMember>;
204
476
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
205
- editCurrentUserVoiceState(guildId: snowflake, options: EditCurrentUserVoiceStateParams): void;
477
+ editCurrentUserVoiceState(guildId: snowflake, options: {
478
+ channelId?: snowflake;
479
+ suppress?: boolean;
480
+ requestToSpeakTimestamp?: timestamp | null;
481
+ }): void;
206
482
  /** https://discord.com/developers/docs/resources/application#edit-current-application */
207
- editCurrentApplication(options: EditCurrentApplicationParams): Promise<Application>;
483
+ editCurrentApplication(options: {
484
+ customInstallUrl?: string;
485
+ description?: string;
486
+ roleConnectionsVerificationUrl?: string;
487
+ installParams?: InstallParams;
488
+ integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
489
+ flags?: ApplicationFlags;
490
+ icon?: string;
491
+ coverImage?: string;
492
+ interactionsEndpointUrl?: string;
493
+ tags?: Array<string>;
494
+ }): Promise<Application>;
208
495
  /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
209
- editGlobalApplicationCommand(applicationId: snowflake, commandId: snowflake, options: EditGlobalApplicationCommandParams): Promise<ApplicationCommand>;
496
+ editGlobalApplicationCommand(applicationId: snowflake, commandId: snowflake, options: {
497
+ name?: string;
498
+ nameLocalizations?: LocaleMap | null;
499
+ description?: string;
500
+ descriptionLocalizations?: LocaleMap | null;
501
+ options?: Array<ApplicationCommandOption>;
502
+ defaultMemberPermissions?: string | null;
503
+ defaultPermission?: boolean | null;
504
+ dmPermission?: boolean;
505
+ nsfw?: boolean;
506
+ }): Promise<ApplicationCommand>;
210
507
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
211
- editGuild(guildId: snowflake, options: EditGuildParams, reason?: string): Promise<Guild>;
508
+ editGuild(guildId: snowflake, options: {
509
+ name?: string;
510
+ region?: string | null;
511
+ verificationLevel?: VerificationLevel;
512
+ defaultMessageNotifications?: DefaultMessageNotificationLevel;
513
+ explicitContentFilter?: ExplicitContentFilterLevel;
514
+ afkChannelId?: snowflake | null;
515
+ afkTimeout?: number;
516
+ icon?: string | null;
517
+ ownerId?: snowflake;
518
+ splash?: string | null;
519
+ discoverySplash?: string | null;
520
+ banner?: string | null;
521
+ systemChannelId?: snowflake | null;
522
+ systemChannelFlags?: SystemChannelFlags;
523
+ rulesChannelId?: snowflake | null;
524
+ publicUpdatesChannelId?: snowflake | null;
525
+ preferredLocale?: string;
526
+ features?: Array<GuildFeatures>;
527
+ description?: string | null;
528
+ premiumProgressBarEnabled?: boolean;
529
+ safetyAlertsChannelId?: snowflake | null;
530
+ }, reason?: string): Promise<Guild>;
212
531
  /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
213
- editGuildApplicationCommand(applicationId: snowflake, guildId: snowflake, commandId: snowflake, options: EditGuildApplicationCommandParams): Promise<ApplicationCommand>;
532
+ editGuildApplicationCommand(applicationId: snowflake, guildId: snowflake, commandId: snowflake, options: {
533
+ name?: string;
534
+ nameLocalizations?: LocaleMap | null;
535
+ description?: string;
536
+ descriptionLocalizations?: LocaleMap | null;
537
+ options?: Array<ApplicationCommandOption>;
538
+ defaultMemberPermissions?: string | null;
539
+ defaultPermission?: boolean | null;
540
+ nsfw?: boolean;
541
+ }): Promise<ApplicationCommand>;
214
542
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
215
- editGuildEmoji(guildId: snowflake, emojiId: snowflake, options: EditGuildEmojiParams, reason?: string): Promise<Emoji>;
543
+ editGuildEmoji(guildId: snowflake, emojiId: snowflake, options: {
544
+ name?: string;
545
+ roles?: Array<snowflake> | null;
546
+ }, reason?: string): Promise<Emoji>;
216
547
  /** https://discord.com/developers/docs/resources/guild#modify-guild-member */
217
- editGuildMember(guildId: snowflake, userId: snowflake, options: EditGuildMemberParams, reason?: string): Promise<GuildMember>;
548
+ editGuildMember(guildId: snowflake, userId: snowflake, options: {
549
+ nick?: string | null;
550
+ roles?: Array<snowflake> | null;
551
+ mute?: boolean | null;
552
+ deaf?: boolean | null;
553
+ channelId?: snowflake | null;
554
+ communicationDisabledUntil?: number | null;
555
+ flags?: GuildMemberFlags;
556
+ }, reason?: string): Promise<GuildMember>;
218
557
  /** https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level */
219
- editGuildMFALevel(guildId: snowflake, options: EditGuildMFALevelParams, reason?: string): Promise<MFALevel>;
558
+ editGuildMFALevel(guildId: snowflake, options: {
559
+ level: MFALevel;
560
+ }, reason?: string): Promise<MFALevel>;
220
561
  /** https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */
221
- editGuildOnboarding(guildId: snowflake, options: EditGuildOnboardingParams, reason?: string): void;
562
+ editGuildOnboarding(guildId: snowflake, options: {
563
+ prompts: Array<OnboardingPrompt>;
564
+ defaultChannelIds: Array<snowflake>;
565
+ enabled: boolean;
566
+ mode: OnboardingMode;
567
+ }, reason?: string): void;
222
568
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role */
223
569
  editGuildRole(guildId: snowflake, roleId: snowflake, options?: {
224
570
  name?: string | null;
@@ -230,30 +576,80 @@ export declare class Client extends EventEmitter {
230
576
  mentionable?: boolean | null;
231
577
  }, reason?: string): Promise<Role>;
232
578
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role-positions */
233
- editGuildRolePositions(guildId: snowflake, options: EditGuildRolePositionsParams): Promise<Array<Role>>;
579
+ editGuildRolePositions(guildId: snowflake, options: Array<{
580
+ id: snowflake;
581
+ position?: number | null;
582
+ }>): Promise<Array<Role>>;
234
583
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */
235
- editGuildScheduledEvent(guildId: snowflake, guildScheduledEventId: snowflake, options: EditGuildScheduledEventParams, reason?: string): Promise<GuildScheduledEvent>;
584
+ editGuildScheduledEvent(guildId: snowflake, guildScheduledEventId: snowflake, options: {
585
+ channelId?: snowflake | null;
586
+ entityMetadata?: GuildScheduledEventEntityMetadata | null;
587
+ name?: string;
588
+ privacyLevel?: GuildScheduledEventPrivacyLevel;
589
+ scheduledStartTime?: string;
590
+ scheduledEndTime?: string;
591
+ description?: string | null;
592
+ entityType?: GuildScheduledEventEntityTypes;
593
+ status?: GuildScheduledEventStatus;
594
+ image?: string;
595
+ }, reason?: string): Promise<GuildScheduledEvent>;
236
596
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
237
- editGuildSticker(guildId: snowflake, stickerId: snowflake, options: EditGuildStickerParams, reason?: string): Promise<Sticker>;
597
+ editGuildSticker(guildId: snowflake, stickerId: snowflake, options: {
598
+ name?: string;
599
+ description?: string | null;
600
+ tags?: string;
601
+ }, reason?: string): Promise<Sticker>;
238
602
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
239
- editGuildTemplate(guildId: snowflake, code: string, options: EditGuildTemplateParams): Promise<GuildTemplate>;
603
+ editGuildTemplate(guildId: snowflake, code: string, options: {
604
+ name?: string;
605
+ description?: string | null;
606
+ }): Promise<GuildTemplate>;
240
607
  /** https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen */
241
- editGuildWelcomeScreen(guildId: snowflake, options: EditGuildWelcomeScreenParams, reason?: string): Promise<WelcomeScreen>;
608
+ editGuildWelcomeScreen(guildId: snowflake, options: {
609
+ enabled?: boolean | null;
610
+ welcomeChannels?: Array<WelcomeScreenChannel> | null;
611
+ description?: string | null;
612
+ }, reason?: string): Promise<WelcomeScreen>;
242
613
  /** https://discord.com/developers/docs/resources/guild#modify-guild-widget */
243
614
  editGuildWidget(guildId: snowflake, options: {
244
615
  enabled?: boolean;
245
616
  channelId?: boolean;
246
617
  }, reason?: string): Promise<GuildWidgetSettings>;
247
618
  /** https://discord.com/developers/docs/resources/channel#edit-message */
248
- editMessage(channelId: snowflake, messageId: snowflake, options: EditMessageParams): Promise<Message>;
619
+ editMessage(channelId: snowflake, messageId: snowflake, options: {
620
+ content?: string | null;
621
+ embeds?: Array<Embed> | null;
622
+ flags?: MessageFlags | null;
623
+ allowedMentions?: AllowedMentions | null;
624
+ components?: Array<ActionRow> | null;
625
+ files?: Array<File> | null;
626
+ attachments?: Array<Attachment> | null;
627
+ }): Promise<Message>;
249
628
  /** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */
250
- editStageInstance(channelId: snowflake, options: EditStageInstanceParams, reason?: string): Promise<StageInstance>;
629
+ editStageInstance(channelId: snowflake, options: {
630
+ topic?: string;
631
+ privacyLevel?: PrivacyLevel;
632
+ }, reason?: string): Promise<StageInstance>;
251
633
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message */
252
- editInteractionFollowupMessage(applicationId: snowflake, interactionToken: string, messageId: snowflake, options: EditWebhookMessageParams & {
634
+ editInteractionFollowupMessage(applicationId: snowflake, interactionToken: string, messageId: snowflake, options: {
635
+ content?: string | null;
636
+ embeds?: Array<Embed> | null;
637
+ flags?: MessageFlags | null;
638
+ allowedMentions?: AllowedMentions | null;
639
+ components?: Array<ActionRow> | null;
640
+ files?: Array<File> | null;
641
+ attachments?: Array<Attachment> | null;
253
642
  threadId: snowflake;
254
643
  }): Promise<Message>;
255
644
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
256
- editInteractionResponse(applicationId: snowflake, interactionToken: string, options: EditWebhookMessageParams & {
645
+ editInteractionResponse(applicationId: snowflake, interactionToken: string, options: {
646
+ content?: string | null;
647
+ embeds?: Array<Embed> | null;
648
+ flags?: MessageFlags | null;
649
+ allowedMentions?: AllowedMentions | null;
650
+ components?: Array<ActionRow> | null;
651
+ files?: Array<File> | null;
652
+ attachments?: Array<Attachment> | null;
257
653
  threadId: snowflake;
258
654
  }): Promise<Message>;
259
655
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
@@ -263,17 +659,44 @@ export declare class Client extends EventEmitter {
263
659
  requestToSpeakTimestamp?: timestamp | null;
264
660
  }): void;
265
661
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook */
266
- editWebhook(webhookId: snowflake, options: EditWebhookParams, reason?: string): Promise<Webhook>;
662
+ editWebhook(webhookId: snowflake, options: {
663
+ name?: string;
664
+ avatar?: string | null;
665
+ channelId?: snowflake;
666
+ }, reason?: string): Promise<Webhook>;
267
667
  /** https://discord.com/developers/docs/resources/webhook#edit-webhook-message */
268
- editWebhookMessage(webhookId: snowflake, webhookToken: string, messageId: snowflake, options: EditWebhookMessageParams & {
668
+ editWebhookMessage(webhookId: snowflake, webhookToken: string, messageId: snowflake, options: {
669
+ content?: string | null;
670
+ embeds?: Array<Embed> | null;
671
+ flags?: MessageFlags | null;
672
+ allowedMentions?: AllowedMentions | null;
673
+ components?: Array<ActionRow> | null;
674
+ files?: Array<File> | null;
675
+ attachments?: Array<Attachment> | null;
269
676
  threadId: snowflake;
270
677
  }): Promise<Message>;
271
678
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
272
- editWebhookWithToken(webhookId: snowflake, webhookToken: string, options: Omit<EditWebhookParams, "channelId">, reason?: string): Promise<Webhook>;
679
+ editWebhookWithToken(webhookId: snowflake, webhookToken: string, options: {
680
+ name?: string;
681
+ avatar?: string | null;
682
+ }, reason?: string): Promise<Webhook>;
273
683
  /** https://discord.com/developers/docs/resources/poll#end-poll */
274
684
  endPoll(channelId: snowflake, messageId: snowflake): Promise<Message>;
275
685
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
276
- executeWebhook(webhookId: snowflake, webhookToken: string, options: ExecuteWebhookParams & {
686
+ executeWebhook(webhookId: snowflake, webhookToken: string, options: {
687
+ content?: string | null;
688
+ username?: string;
689
+ avatarUrl?: string;
690
+ tts?: boolean;
691
+ embeds?: Array<Embed> | null;
692
+ allowedMentions?: AllowedMentions | null;
693
+ components?: Array<ActionRow> | null;
694
+ files?: Array<File> | null;
695
+ attachments?: Array<Attachment> | null;
696
+ flags?: MessageFlags | null;
697
+ threadName?: string;
698
+ appliedTags?: Array<string>;
699
+ poll?: PollCreateParams;
277
700
  wait: boolean;
278
701
  threadId: snowflake;
279
702
  }): Promise<Message | null>;
@@ -582,7 +1005,11 @@ export declare class Client extends EventEmitter {
582
1005
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
583
1006
  updateApplicationRoleConnectionMetadataRecords(applicationId: snowflake): Promise<Array<ApplicationRoleConnectionMetadata>>;
584
1007
  /** https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection */
585
- updateCurrentApplicationRoleConnection(options: UpdateCurrentUserApplicationRoleConnection): Promise<ApplicationRoleConnection>;
1008
+ updateCurrentApplicationRoleConnection(options: {
1009
+ platformName?: string;
1010
+ platformUsername?: string;
1011
+ metadata?: ApplicationRoleConnectionMetadata;
1012
+ }): Promise<ApplicationRoleConnection>;
586
1013
  /** https://discord.com/developers/docs/resources/channel#unpin-message */
587
1014
  unpinMessage(channelId: snowflake, messageId: snowflake, reason?: string): void;
588
1015
  }