disgroove 2.1.0-dev.c430b6f → 2.1.0-dev.cce0fd7

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.
@@ -2,7 +2,7 @@
2
2
  import { GatewayIntents, type OAuth2Scopes, type StatusTypes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel } from "./constants";
3
3
  import { Util } from "./utils";
4
4
  import { RequestManager } from "./rest";
5
- import type { Activity, AuditLogEntry, AutoModerationActionExecutionEventFields, AutoModerationRule, Channel, ChannelPinsUpdateEventFields, GuildApplicationCommandPermissions, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, GuildScheduledEvent, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageDeleteBulkEventFields, MessageDeleteEventFields, MessageReactionAddEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, MessageReactionRemoveEventFields, PresenceUpdateEventFields, StageInstance, StickerPack, ThreadListSyncEventFields, ThreadMember, ThreadMembersUpdateEventFields, TypingStartEventFields, VoiceRegion, VoiceServerUpdateEventFields, Entitlement, UnavailableGuild, CreateGlobalApplicationCommandParams, ApplicationCommand, CreateGuildApplicationCommandParams, CreateTestEntitlementParams, EditCurrentApplicationParams, Application, EditGlobalApplicationCommandParams, EditGuildApplicationCommandParams, ApplicationRoleConnectionMetadata, Sku, BulkEditGlobalApplicationCommandsParams, BulkEditGuildApplicationCommandsParams, CreateGuildParams, CreateGuildFromGuildTemplateParams, CreateStageInstanceParams, EditAutoModerationRuleParams, CreateChannelInviteParams, Invite, CreateMessageParams, Message, CreateThreadFromMessageParams, CreateThreadParams, CreateThreadWithoutMessageParams, Webhook, EditChannelParams, EditMessageParams, FollowedChannel, User, Emoji, EditGuildEmojiParams, AddGuildMemberParams, BeginGuildPruneParams, GuildMember, CreateAutoModerationRuleParams, CreateGuildBanParams, CreateGuildChannelParams, CreateGuildEmojiParams, CreateGuildRoleParams, Role, CreateGuildScheduledEventParams, CreateGuildStickerParams, CreateGuildTemplateParams, GuildTemplate, Sticker, EditGuildParams, Guild, EditGuildChannelPositionsParams, EditGuildMemberParams, EditCurrentUserVoiceStateParams, EditCurrentGuildMemberParams, EditGuildMFALevelParams, EditGuildOnboardingParams, EditGuildRolePositionsParams, EditGuildScheduledEventParams, EditGuildStickerParams, EditGuildTemplateParams, EditGuildWelcomeScreenParams, WelcomeScreen, GuildWidgetSettings, AuditLog, Ban, Integration, GuildOnboarding, GuildPreview, GuildScheduledEventUser, GuildWidget, ExecuteWebhookParams, CreateInteractionFollowupMessageParams, InteractionResponse, EditWebhookMessageParams, EditStageInstanceParams, CreateDMParams, EditCurrentUserParams, ApplicationRoleConnection, Connection, UpdateCurrentUserApplicationRoleConnection, EditWebhookParams, Interaction, VoiceState, GuildCreateEventExtraFields, GuildMemberAddEventExtraFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, MessageCreateEventExtraFields, ThreadMemberUpdateEventExtraFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields } from "./types";
5
+ import type { Activity, AuditLogEntry, AutoModerationActionExecutionEventFields, AutoModerationRule, Channel, ChannelPinsUpdateEventFields, GuildApplicationCommandPermissions, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, GuildScheduledEvent, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageDeleteBulkEventFields, MessageDeleteEventFields, MessageReactionAddEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, MessageReactionRemoveEventFields, PresenceUpdateEventFields, StageInstance, StickerPack, ThreadListSyncEventFields, ThreadMember, ThreadMembersUpdateEventFields, TypingStartEventFields, VoiceRegion, VoiceServerUpdateEventFields, Entitlement, UnavailableGuild, CreateGlobalApplicationCommandParams, ApplicationCommand, CreateGuildApplicationCommandParams, CreateTestEntitlementParams, EditCurrentApplicationParams, Application, EditGlobalApplicationCommandParams, EditGuildApplicationCommandParams, ApplicationRoleConnectionMetadata, Sku, BulkEditGlobalApplicationCommandsParams, BulkEditGuildApplicationCommandsParams, CreateGuildParams, CreateGuildFromGuildTemplateParams, CreateStageInstanceParams, EditAutoModerationRuleParams, CreateChannelInviteParams, Invite, CreateMessageParams, Message, CreateThreadFromMessageParams, CreateThreadParams, CreateThreadWithoutMessageParams, Webhook, EditChannelParams, EditMessageParams, FollowedChannel, User, Emoji, EditGuildEmojiParams, AddGuildMemberParams, BeginGuildPruneParams, GuildMember, CreateAutoModerationRuleParams, CreateGuildBanParams, CreateGuildChannelParams, CreateGuildEmojiParams, CreateGuildRoleParams, Role, CreateGuildScheduledEventParams, CreateGuildStickerParams, CreateGuildTemplateParams, GuildTemplate, Sticker, EditGuildParams, Guild, EditGuildChannelPositionsParams, EditGuildMemberParams, EditCurrentUserVoiceStateParams, EditCurrentGuildMemberParams, EditGuildMFALevelParams, EditGuildOnboardingParams, EditGuildRolePositionsParams, EditGuildScheduledEventParams, EditGuildStickerParams, EditGuildTemplateParams, EditGuildWelcomeScreenParams, WelcomeScreen, GuildWidgetSettings, AuditLog, Ban, Integration, GuildOnboarding, GuildPreview, GuildScheduledEventUser, GuildWidget, ExecuteWebhookParams, CreateInteractionFollowupMessageParams, InteractionResponse, EditWebhookMessageParams, EditStageInstanceParams, CreateDMParams, EditCurrentUserParams, ApplicationRoleConnection, Connection, UpdateCurrentUserApplicationRoleConnection, EditWebhookParams, Interaction, VoiceState, GuildCreateEventExtraFields, GuildMemberAddEventExtraFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, MessageCreateEventExtraFields, ThreadMemberUpdateEventExtraFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, BulkGuildBanParams, BulkDeleteMessagesParams } from "./types";
6
6
  import EventEmitter from "node:events";
7
7
  import { ShardManager } from "./gateway";
8
8
  export interface ClientOptions {
@@ -38,10 +38,13 @@ export declare class Client extends EventEmitter {
38
38
  beginGuildPrune(guildId: string, options: BeginGuildPruneParams, reason?: string): Promise<{
39
39
  pruned: number;
40
40
  }>;
41
+ /** https://discord.com/developers/docs/resources/guild#bulk-guild-ban */
42
+ bulkGuildBan(guildId: string, options: BulkGuildBanParams, reason?: string): Promise<{
43
+ bannedUsers: Array<string>;
44
+ failedUsers: Array<string>;
45
+ }>;
41
46
  /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
42
- bulkDeleteMessages(channelId: string, options?: {
43
- messagesIds?: Array<string>;
44
- }, reason?: string): void;
47
+ bulkDeleteMessages(channelId: string, options?: BulkDeleteMessagesParams, reason?: string): void;
45
48
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
46
49
  bulkEditGlobalApplicationCommands(applicationId: string, commands: BulkEditGlobalApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
47
50
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
@@ -244,6 +247,7 @@ export declare class Client extends EventEmitter {
244
247
  }): Promise<Message>;
245
248
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
246
249
  editWebhookWithToken(webhookId: string, webhookToken: string, options: Omit<EditWebhookParams, "channelId">, reason?: string): Promise<Webhook>;
250
+ endPoll(channelId: string, messageId: string): Promise<Message>;
247
251
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
248
252
  executeWebhook(webhookId: string, webhookToken: string, options: ExecuteWebhookParams & {
249
253
  wait: boolean;
@@ -258,7 +262,6 @@ export declare class Client extends EventEmitter {
258
262
  threadId?: string;
259
263
  wait?: boolean;
260
264
  }): Promise<Message | null>;
261
- expirePoll(channelId: string, messageId: string): Promise<Message>;
262
265
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
263
266
  followChannel(channelId: string, options: {
264
267
  webhookChannelId: string;
@@ -84,11 +84,23 @@ class Client extends node_events_1.default {
84
84
  })
85
85
  .then((response) => this.util.toCamelCase(response));
86
86
  }
87
+ /** https://discord.com/developers/docs/resources/guild#bulk-guild-ban */
88
+ bulkGuildBan(guildId, options, reason) {
89
+ return this.rest
90
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.bulkGuildBan(guildId), {
91
+ json: {
92
+ user_ids: options.userIds,
93
+ delete_message_seconds: options.deleteMessageSeconds,
94
+ },
95
+ reason,
96
+ })
97
+ .then((response) => this.util.toCamelCase(response));
98
+ }
87
99
  /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
88
100
  bulkDeleteMessages(channelId, options, reason) {
89
101
  this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelBulkDelete(channelId), {
90
102
  json: {
91
- messages: options?.messagesIds,
103
+ messages: options?.messages,
92
104
  },
93
105
  reason,
94
106
  });
@@ -424,6 +436,9 @@ class Client extends node_events_1.default {
424
436
  ? this.util.toSnakeCase(options.data.components)
425
437
  : undefined,
426
438
  attachments: options.data?.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
439
+ poll: options.data?.poll !== undefined
440
+ ? this.util.toSnakeCase(options.data?.poll)
441
+ : undefined,
427
442
  },
428
443
  },
429
444
  files: options.data?.files,
@@ -505,6 +520,9 @@ class Client extends node_events_1.default {
505
520
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
506
521
  flags: options.flags,
507
522
  enforce_nonce: options.enforceNonce,
523
+ poll: options.poll !== undefined
524
+ ? this.util.toSnakeCase(options.poll)
525
+ : undefined,
508
526
  },
509
527
  files: options.files,
510
528
  })
@@ -1226,6 +1244,11 @@ class Client extends node_events_1.default {
1226
1244
  })
1227
1245
  .then((response) => this.util.toCamelCase(response));
1228
1246
  }
1247
+ endPoll(channelId, messageId) {
1248
+ return this.rest
1249
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId))
1250
+ .then((response) => this.util.toCamelCase(response));
1251
+ }
1229
1252
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
1230
1253
  executeWebhook(webhookId, webhookToken, options) {
1231
1254
  return this.rest
@@ -1253,6 +1276,10 @@ class Client extends node_events_1.default {
1253
1276
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
1254
1277
  flags: options.flags,
1255
1278
  thread_name: options.threadName,
1279
+ applied_tags: options.appliedTags,
1280
+ poll: options.poll !== undefined
1281
+ ? this.util.toSnakeCase(options.poll)
1282
+ : undefined,
1256
1283
  },
1257
1284
  files: options.files,
1258
1285
  query: {
@@ -1278,11 +1305,6 @@ class Client extends node_events_1.default {
1278
1305
  })
1279
1306
  .then((response) => response !== null ? this.util.toCamelCase(response) : null);
1280
1307
  }
1281
- expirePoll(channelId, messageId) {
1282
- return this.rest
1283
- .request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId))
1284
- .then((response) => this.util.toCamelCase(response));
1285
- }
1286
1308
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
1287
1309
  followChannel(channelId, options) {
1288
1310
  return this.rest
@@ -76,6 +76,12 @@ export declare enum InteractionType {
76
76
  ApplicationCommandAutocomplete = 4,
77
77
  ModalSubmit = 5
78
78
  }
79
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types */
80
+ export declare enum InterationContextTypes {
81
+ Guild = 0,
82
+ BotDM = 1,
83
+ PrivateChannel = 2
84
+ }
79
85
  /** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
80
86
  export declare enum ComponentTypes {
81
87
  ActionRow = 1,
@@ -111,6 +117,11 @@ export declare enum TextInputStyles {
111
117
  Short = 1,
112
118
  Paragraph = 2
113
119
  }
120
+ /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
121
+ export declare enum ApplicationIntegrationTypes {
122
+ GuildInstall = 0,
123
+ UserInstall = 1
124
+ }
114
125
  /** https://discord.com/developers/docs/resources/application#application-object-application-flags */
115
126
  export declare enum ApplicationFlags {
116
127
  ApplicationAutoModerationRuleCreateBadge = 64,
@@ -561,9 +572,11 @@ export declare enum GatewayIntents {
561
572
  GuildScheduledEvents = 65536,
562
573
  AutoModerationConfiguration = 1048576,
563
574
  AutoModerationActionExecution = 2097152,
564
- AllNonPrivileged = 3243773,
575
+ GuildMessagePolls = 16777216,
576
+ DirectMessagePolls = 33554432,
577
+ AllNonPrivileged = 53575421,
565
578
  AllPrivileged = 33026,
566
- All = 3276799
579
+ All = 53608447
567
580
  }
568
581
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types */
569
582
  export declare enum StatusTypes {
@@ -977,6 +990,7 @@ export declare enum JSONErrorCodes {
977
990
  MessageBlockedByHarmfulLinksFilter = 240000,
978
991
  CannotEnableOnboardingRequirementsAreNotMet = 350000,
979
992
  CannotUpdateOnboardingWhileBelowRequirements = 350001,
993
+ FailedToBanUsers = 500000,
980
994
  PollVotingBlocked = 520000,
981
995
  PollExpired = 520001,
982
996
  InvalidChannelTypeForPollCreation = 520002,
@@ -1062,6 +1076,7 @@ export declare const BitwisePermissionFlags: {
1062
1076
  readonly CreateEvents: bigint;
1063
1077
  readonly UseExternalSounds: bigint;
1064
1078
  readonly SendVoiceMessages: bigint;
1079
+ readonly SendPolls: bigint;
1065
1080
  };
1066
1081
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1067
1082
  export declare enum RoleFlags {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = void 0;
4
- exports.EntitlementTypes = exports.SkuFlags = exports.SkuTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = void 0;
3
+ exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InterationContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = void 0;
4
+ exports.EntitlementTypes = exports.SkuFlags = exports.SkuTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = void 0;
5
5
  /** https://discord.com/developers/docs/reference#image-formatting-image-formats */
6
6
  var ImageFormats;
7
7
  (function (ImageFormats) {
@@ -86,6 +86,13 @@ var InteractionType;
86
86
  InteractionType[InteractionType["ApplicationCommandAutocomplete"] = 4] = "ApplicationCommandAutocomplete";
87
87
  InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
88
88
  })(InteractionType || (exports.InteractionType = InteractionType = {}));
89
+ /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types */
90
+ var InterationContextTypes;
91
+ (function (InterationContextTypes) {
92
+ InterationContextTypes[InterationContextTypes["Guild"] = 0] = "Guild";
93
+ InterationContextTypes[InterationContextTypes["BotDM"] = 1] = "BotDM";
94
+ InterationContextTypes[InterationContextTypes["PrivateChannel"] = 2] = "PrivateChannel";
95
+ })(InterationContextTypes || (exports.InterationContextTypes = InterationContextTypes = {}));
89
96
  /** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
90
97
  var ComponentTypes;
91
98
  (function (ComponentTypes) {
@@ -125,6 +132,12 @@ var TextInputStyles;
125
132
  TextInputStyles[TextInputStyles["Short"] = 1] = "Short";
126
133
  TextInputStyles[TextInputStyles["Paragraph"] = 2] = "Paragraph";
127
134
  })(TextInputStyles || (exports.TextInputStyles = TextInputStyles = {}));
135
+ /** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
136
+ var ApplicationIntegrationTypes;
137
+ (function (ApplicationIntegrationTypes) {
138
+ ApplicationIntegrationTypes[ApplicationIntegrationTypes["GuildInstall"] = 0] = "GuildInstall";
139
+ ApplicationIntegrationTypes[ApplicationIntegrationTypes["UserInstall"] = 1] = "UserInstall";
140
+ })(ApplicationIntegrationTypes || (exports.ApplicationIntegrationTypes = ApplicationIntegrationTypes = {}));
128
141
  /** https://discord.com/developers/docs/resources/application#application-object-application-flags */
129
142
  var ApplicationFlags;
130
143
  (function (ApplicationFlags) {
@@ -621,9 +634,11 @@ var GatewayIntents;
621
634
  GatewayIntents[GatewayIntents["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
622
635
  GatewayIntents[GatewayIntents["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration";
623
636
  GatewayIntents[GatewayIntents["AutoModerationActionExecution"] = 2097152] = "AutoModerationActionExecution";
624
- GatewayIntents[GatewayIntents["AllNonPrivileged"] = 3243773] = "AllNonPrivileged";
637
+ GatewayIntents[GatewayIntents["GuildMessagePolls"] = 16777216] = "GuildMessagePolls";
638
+ GatewayIntents[GatewayIntents["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
639
+ GatewayIntents[GatewayIntents["AllNonPrivileged"] = 53575421] = "AllNonPrivileged";
625
640
  GatewayIntents[GatewayIntents["AllPrivileged"] = 33026] = "AllPrivileged";
626
- GatewayIntents[GatewayIntents["All"] = 3276799] = "All";
641
+ GatewayIntents[GatewayIntents["All"] = 53608447] = "All";
627
642
  })(GatewayIntents || (exports.GatewayIntents = GatewayIntents = {}));
628
643
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types */
629
644
  var StatusTypes;
@@ -1048,6 +1063,7 @@ var JSONErrorCodes;
1048
1063
  JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
1049
1064
  JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
1050
1065
  JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
1066
+ JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
1051
1067
  JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
1052
1068
  JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
1053
1069
  JSONErrorCodes[JSONErrorCodes["InvalidChannelTypeForPollCreation"] = 520002] = "InvalidChannelTypeForPollCreation";
@@ -1135,6 +1151,7 @@ exports.BitwisePermissionFlags = {
1135
1151
  CreateEvents: 1n << 44n,
1136
1152
  UseExternalSounds: 1n << 45n,
1137
1153
  SendVoiceMessages: 1n << 46n,
1154
+ SendPolls: 1n << 49n,
1138
1155
  };
1139
1156
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1140
1157
  var RoleFlags;
@@ -1,3 +1,4 @@
1
+ export declare const bulkGuildBan: (guildId: string) => `guilds/${string}/bulk-ban`;
1
2
  export declare const guild: (guildId: string) => `guilds/${string}`;
2
3
  export declare const guilds: () => "guilds";
3
4
  export declare const guildActiveThreads: (guildId: string) => `guilds/${string}/threads/active`;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityUrl = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildCurrentMemberNickname = exports.guildChannels = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
4
- exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2CurrentAuthorization = exports.oauth2CurrentApplication = exports.oauth2Authorization = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSkus = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlement = exports.applicationCurrentUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = void 0;
3
+ exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityUrl = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildCurrentMemberNickname = exports.guildChannels = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = exports.bulkGuildBan = void 0;
4
+ exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2CurrentAuthorization = exports.oauth2CurrentApplication = exports.oauth2Authorization = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSkus = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlement = exports.applicationCurrentUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
5
5
  // Guilds
6
+ const bulkGuildBan = (guildId) => `guilds/${guildId}/bulk-ban`;
7
+ exports.bulkGuildBan = bulkGuildBan;
6
8
  const guild = (guildId) => `guilds/${guildId}`;
7
9
  exports.guild = guild;
8
10
  const guilds = () => "guilds";
@@ -1,5 +1,5 @@
1
1
  import type { LocaleMap } from ".";
2
- import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType } from "../constants";
2
+ import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType, ApplicationIntegrationTypes, InterationContextTypes } from "../constants";
3
3
  /** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-structure */
4
4
  export interface RawApplicationCommand {
5
5
  id: string;
@@ -14,6 +14,8 @@ export interface RawApplicationCommand {
14
14
  default_member_permissions: string | null;
15
15
  dm_permission?: boolean;
16
16
  default_permission?: boolean | null;
17
+ integration_types?: Array<ApplicationIntegrationTypes>;
18
+ contexts?: Array<InterationContextTypes>;
17
19
  nsfw?: boolean;
18
20
  version: string;
19
21
  }
@@ -66,6 +68,8 @@ export interface ApplicationCommand {
66
68
  defaultMemberPermissions: string | null;
67
69
  dmPermission?: boolean;
68
70
  defaultPermission?: boolean | null;
71
+ integrationTypes?: Array<ApplicationIntegrationTypes>;
72
+ contexts?: Array<InterationContextTypes>;
69
73
  nsfw?: boolean;
70
74
  version: string;
71
75
  }
@@ -1,5 +1,5 @@
1
1
  import type { RawUser, RawTeam, Team, User, RawGuild, Guild } from ".";
2
- import type { ApplicationFlags, OAuth2Scopes } from "../constants";
2
+ import type { ApplicationFlags, ApplicationIntegrationTypes, OAuth2Scopes } from "../constants";
3
3
  /** https://discord.com/developers/docs/resources/application#application-object-application-structure */
4
4
  export interface RawApplication {
5
5
  id: string;
@@ -26,8 +26,13 @@ export interface RawApplication {
26
26
  role_connections_verification_url?: string;
27
27
  tags?: Array<string>;
28
28
  install_params?: RawInstallParams;
29
+ integration_types_config?: Record<ApplicationIntegrationTypes, RawApplicationIntegrationTypeConfiguration>;
29
30
  custom_install_url?: string;
30
31
  }
32
+ /** https://discord.com/developers/docs/resources/application#application-object-application-integration-type-configuration-object */
33
+ export interface RawApplicationIntegrationTypeConfiguration {
34
+ oauth2_install_params: RawInstallParams;
35
+ }
31
36
  /** https://discord.com/developers/docs/resources/application#install-params-object-install-params-structure */
32
37
  export interface RawInstallParams {
33
38
  scopes: Array<OAuth2Scopes>;
@@ -58,8 +63,12 @@ export interface Application {
58
63
  roleConnectionsVerificationUrl?: string;
59
64
  tags?: Array<string>;
60
65
  installParams?: InstallParams;
66
+ integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
61
67
  customInstallUrl?: string;
62
68
  }
69
+ export interface ApplicationIntegrationTypeConfiguration {
70
+ oauth2InstallParams: InstallParams;
71
+ }
63
72
  export interface InstallParams {
64
73
  scopes: Array<OAuth2Scopes>;
65
74
  permissions: string;
@@ -69,6 +78,7 @@ export interface EditCurrentApplicationParams {
69
78
  description?: string;
70
79
  roleConnectionsVerificationUrl?: string;
71
80
  installParams?: InstallParams;
81
+ integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
72
82
  flags?: ApplicationFlags;
73
83
  icon?: string;
74
84
  coverImage?: string;
@@ -1,7 +1,6 @@
1
1
  import type { AllowedMentionTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InviteTargetTypes, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
2
- import type { RawApplication, RawGuildMember, RawUser, RawEmoji, RawSticker, RawStickerItem, RawMessageInteraction, MessageInteraction, StickerItem, Sticker, Emoji, User, Application, GuildMember, RawActionRow, ActionRow, RawResolvedData, ResolvedData } from ".";
2
+ import type { RawApplication, RawGuildMember, RawUser, RawEmoji, RawSticker, RawStickerItem, RawMessageInteraction, MessageInteraction, StickerItem, Sticker, Emoji, User, Application, GuildMember, RawActionRow, ActionRow, RawResolvedData, ResolvedData, RawPollCreateParams, PollCreateParams } from ".";
3
3
  import type { File } from "../rest";
4
- import type { Poll, RawPoll } from "./poll";
5
4
  /** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
6
5
  export interface RawChannel {
7
6
  id: string;
@@ -74,7 +73,7 @@ export interface RawMessage {
74
73
  position?: number;
75
74
  role_subscription_data?: RawRoleSubscriptionData;
76
75
  resolved?: RawResolvedData;
77
- poll?: RawPoll;
76
+ poll?: RawPollCreateParams;
78
77
  }
79
78
  /** https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure */
80
79
  export interface RawMessageActivity {
@@ -312,7 +311,7 @@ export interface Message {
312
311
  position?: number;
313
312
  roleSubscriptionData?: RoleSubscriptionData;
314
313
  resolved?: ResolvedData;
315
- poll?: Poll;
314
+ poll?: PollCreateParams;
316
315
  }
317
316
  export interface MessageActivity {
318
317
  type: MessageActivityTypes;
@@ -498,7 +497,7 @@ export interface CreateMessageParams {
498
497
  attachments?: Array<Attachment>;
499
498
  flags?: MessageFlags;
500
499
  enforceNonce?: boolean;
501
- poll?: Poll;
500
+ poll?: PollCreateParams;
502
501
  }
503
502
  export interface EditMessageParams {
504
503
  content?: string | null;
@@ -433,6 +433,10 @@ export interface CreateGuildBanParams {
433
433
  deleteMessageDays?: number;
434
434
  deleteMessageSeconds?: number;
435
435
  }
436
+ export interface BulkGuildBanParams {
437
+ userIds: Array<string>;
438
+ deleteMessageSeconds?: number;
439
+ }
436
440
  export interface CreateGuildRoleParams {
437
441
  name?: string;
438
442
  permissions?: string;
@@ -14,6 +14,7 @@ export * from "./guild";
14
14
  export * from "./interaction";
15
15
  export * from "./invite";
16
16
  export * from "./message-components";
17
+ export * from "./poll";
17
18
  export * from "./role";
18
19
  export * from "./sku";
19
20
  export * from "./stage-instance";
@@ -29,6 +29,7 @@ __exportStar(require("./guild"), exports);
29
29
  __exportStar(require("./interaction"), exports);
30
30
  __exportStar(require("./invite"), exports);
31
31
  __exportStar(require("./message-components"), exports);
32
+ __exportStar(require("./poll"), exports);
32
33
  __exportStar(require("./role"), exports);
33
34
  __exportStar(require("./sku"), exports);
34
35
  __exportStar(require("./stage-instance"), exports);
@@ -1,7 +1,6 @@
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 ".";
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, RawPollCreateParams, PollCreateParams } from ".";
2
2
  import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
3
3
  import type { File } from "../rest";
4
- import type { Poll, RawPoll } from "./poll";
5
4
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
6
5
  export interface RawInteraction {
7
6
  id: string;
@@ -85,7 +84,7 @@ export interface RawInteractionCallbackData {
85
84
  flags?: MessageFlags;
86
85
  components?: Array<RawActionRow>;
87
86
  attachments?: Array<RawAttachment>;
88
- poll?: RawPoll;
87
+ poll?: RawPollCreateParams;
89
88
  files?: Array<File>;
90
89
  choices?: Array<RawApplicationCommandOptionChoice>;
91
90
  custom_id?: string;
@@ -165,7 +164,7 @@ export interface InteractionCallbackData {
165
164
  flags?: MessageFlags;
166
165
  components?: Array<ActionRow>;
167
166
  attachments?: Array<Attachment>;
168
- poll?: Poll;
167
+ poll?: PollCreateParams;
169
168
  files?: Array<File>;
170
169
  choices?: Array<ApplicationCommandOptionChoice>;
171
170
  customId?: string;
@@ -25,6 +25,13 @@ export interface RawPollAnswerCount {
25
25
  count: number;
26
26
  me_voted: boolean;
27
27
  }
28
+ export interface RawPollCreateParams {
29
+ question: RawPollMedia;
30
+ answers: Array<RawPollAnswer>;
31
+ duration: number;
32
+ allow_multiselect: boolean;
33
+ layout_type?: LayoutType;
34
+ }
28
35
  export interface Poll {
29
36
  question: PollMedia;
30
37
  answers: Array<PollAnswer>;
@@ -50,3 +57,10 @@ export interface PollAnswerCount {
50
57
  count: number;
51
58
  meVoted: boolean;
52
59
  }
60
+ export interface PollCreateParams {
61
+ question: PollMedia;
62
+ answers: Array<PollAnswer>;
63
+ duration: number;
64
+ allowMultiselect: boolean;
65
+ layoutType?: LayoutType;
66
+ }
@@ -1,7 +1,6 @@
1
1
  import type { MessageFlags, WebhookTypes } from "../constants";
2
- import type { ActionRow, AllowedMentions, Attachment, Channel, Embed, Guild, User, RawChannel, RawGuild, RawUser } from ".";
2
+ import type { ActionRow, AllowedMentions, Attachment, Channel, Embed, Guild, User, RawChannel, RawGuild, RawUser, PollCreateParams } from ".";
3
3
  import type { File } from "../rest";
4
- import type { Poll } from "./poll";
5
4
  /** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
6
5
  export interface RawWebhook {
7
6
  id: string;
@@ -53,7 +52,7 @@ export interface ExecuteWebhookParams {
53
52
  flags?: MessageFlags | null;
54
53
  threadName?: string;
55
54
  appliedTags?: Array<string>;
56
- poll?: Poll;
55
+ poll?: PollCreateParams;
57
56
  }
58
57
  export interface EditWebhookMessageParams {
59
58
  content?: string | null;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.1.0-dev.c430b6f",
3
+ "version": "2.1.0-dev.cce0fd7",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -24,7 +24,6 @@
24
24
  "devDependencies": {
25
25
  "@types/node": "^20.11.25",
26
26
  "@types/ws": "^8.5.10",
27
- "node": "^21.7.1",
28
27
  "typescript": "^5.4.2"
29
28
  },
30
29
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.1.0-dev.c430b6f",
3
+ "version": "2.1.0-dev.cce0fd7",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -24,7 +24,6 @@
24
24
  "devDependencies": {
25
25
  "@types/node": "^20.11.25",
26
26
  "@types/ws": "^8.5.10",
27
- "node": "^21.7.1",
28
27
  "typescript": "^5.4.2"
29
28
  },
30
29
  "dependencies": {