disgroove 2.1.0-dev.8697575 → 2.1.0-dev.968f27e

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, BulkGuildBanParams } 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 {
@@ -44,9 +44,7 @@ export declare class Client extends EventEmitter {
44
44
  failedUsers: Array<string>;
45
45
  }>;
46
46
  /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
47
- bulkDeleteMessages(channelId: string, options?: {
48
- messagesIds?: Array<string>;
49
- }, reason?: string): void;
47
+ bulkDeleteMessages(channelId: string, options?: BulkDeleteMessagesParams, reason?: string): void;
50
48
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
51
49
  bulkEditGlobalApplicationCommands(applicationId: string, commands: BulkEditGlobalApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
52
50
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
@@ -100,7 +100,7 @@ class Client extends node_events_1.default {
100
100
  bulkDeleteMessages(channelId, options, reason) {
101
101
  this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelBulkDelete(channelId), {
102
102
  json: {
103
- messages: options?.messagesIds,
103
+ messages: options?.messages,
104
104
  },
105
105
  reason,
106
106
  });
@@ -436,6 +436,9 @@ class Client extends node_events_1.default {
436
436
  ? this.util.toSnakeCase(options.data.components)
437
437
  : undefined,
438
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,
439
442
  },
440
443
  },
441
444
  files: options.data?.files,
@@ -517,6 +520,9 @@ class Client extends node_events_1.default {
517
520
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
518
521
  flags: options.flags,
519
522
  enforce_nonce: options.enforceNonce,
523
+ poll: options.poll !== undefined
524
+ ? this.util.toSnakeCase(options.poll)
525
+ : undefined,
520
526
  },
521
527
  files: options.files,
522
528
  })
@@ -1265,6 +1271,10 @@ class Client extends node_events_1.default {
1265
1271
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
1266
1272
  flags: options.flags,
1267
1273
  thread_name: options.threadName,
1274
+ applied_tags: options.appliedTags,
1275
+ poll: options.poll !== undefined
1276
+ ? this.util.toSnakeCase(options.poll)
1277
+ : undefined,
1268
1278
  },
1269
1279
  files: options.files,
1270
1280
  query: {
@@ -26,7 +26,7 @@ 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<string, RawApplicationIntegrationTypeConfiguration>;
29
+ integration_types_config?: Record<ApplicationIntegrationTypes, RawApplicationIntegrationTypeConfiguration>;
30
30
  custom_install_url?: string;
31
31
  }
32
32
  /** https://discord.com/developers/docs/resources/application#application-object-application-integration-type-configuration-object */
@@ -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;
@@ -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.8697575",
3
+ "version": "2.1.0-dev.968f27e",
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.8697575",
3
+ "version": "2.1.0-dev.968f27e",
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": {