disgroove 2.1.0-dev.118f285 → 2.1.0-dev.8697575
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Client.d.ts +4 -2
- package/dist/lib/Client.js +1 -11
- package/dist/lib/constants.d.ts +0 -6
- package/dist/lib/constants.js +2 -9
- package/dist/lib/types/application-command.d.ts +1 -5
- package/dist/lib/types/application.d.ts +1 -1
- package/dist/lib/types/channel.d.ts +5 -4
- package/dist/lib/types/index.d.ts +0 -1
- package/dist/lib/types/index.js +0 -1
- package/dist/lib/types/interaction.d.ts +4 -3
- package/dist/lib/types/poll.d.ts +0 -14
- package/dist/lib/types/webhook.d.ts +3 -2
- package/dist/package.json +2 -1
- package/package.json +2 -1
package/dist/lib/Client.d.ts
CHANGED
@@ -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
|
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";
|
6
6
|
import EventEmitter from "node:events";
|
7
7
|
import { ShardManager } from "./gateway";
|
8
8
|
export interface ClientOptions {
|
@@ -44,7 +44,9 @@ 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?:
|
47
|
+
bulkDeleteMessages(channelId: string, options?: {
|
48
|
+
messagesIds?: Array<string>;
|
49
|
+
}, reason?: string): void;
|
48
50
|
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
49
51
|
bulkEditGlobalApplicationCommands(applicationId: string, commands: BulkEditGlobalApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
|
50
52
|
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
package/dist/lib/Client.js
CHANGED
@@ -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?.
|
103
|
+
messages: options?.messagesIds,
|
104
104
|
},
|
105
105
|
reason,
|
106
106
|
});
|
@@ -436,9 +436,6 @@ 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,
|
442
439
|
},
|
443
440
|
},
|
444
441
|
files: options.data?.files,
|
@@ -520,9 +517,6 @@ class Client extends node_events_1.default {
|
|
520
517
|
attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
|
521
518
|
flags: options.flags,
|
522
519
|
enforce_nonce: options.enforceNonce,
|
523
|
-
poll: options.poll !== undefined
|
524
|
-
? this.util.toSnakeCase(options.poll)
|
525
|
-
: undefined,
|
526
520
|
},
|
527
521
|
files: options.files,
|
528
522
|
})
|
@@ -1271,10 +1265,6 @@ class Client extends node_events_1.default {
|
|
1271
1265
|
attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
|
1272
1266
|
flags: options.flags,
|
1273
1267
|
thread_name: options.threadName,
|
1274
|
-
applied_tags: options.appliedTags,
|
1275
|
-
poll: options.poll !== undefined
|
1276
|
-
? this.util.toSnakeCase(options.poll)
|
1277
|
-
: undefined,
|
1278
1268
|
},
|
1279
1269
|
files: options.files,
|
1280
1270
|
query: {
|
package/dist/lib/constants.d.ts
CHANGED
@@ -76,12 +76,6 @@ 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
|
-
}
|
85
79
|
/** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
|
86
80
|
export declare enum ComponentTypes {
|
87
81
|
ActionRow = 1,
|
package/dist/lib/constants.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
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.
|
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 =
|
3
|
+
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.ApplicationIntegrationTypes = 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 = exports.UserFlags = void 0;
|
5
5
|
/** https://discord.com/developers/docs/reference#image-formatting-image-formats */
|
6
6
|
var ImageFormats;
|
7
7
|
(function (ImageFormats) {
|
@@ -86,13 +86,6 @@ 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 = {}));
|
96
89
|
/** https://discord.com/developers/docs/interactions/message-components#component-object-component-types */
|
97
90
|
var ComponentTypes;
|
98
91
|
(function (ComponentTypes) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { LocaleMap } from ".";
|
2
|
-
import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType
|
2
|
+
import type { ApplicationCommandTypes, ApplicationCommandOptionType, ChannelTypes, ApplicationCommandPermissionType } 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,8 +14,6 @@ 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>;
|
19
17
|
nsfw?: boolean;
|
20
18
|
version: string;
|
21
19
|
}
|
@@ -68,8 +66,6 @@ export interface ApplicationCommand {
|
|
68
66
|
defaultMemberPermissions: string | null;
|
69
67
|
dmPermission?: boolean;
|
70
68
|
defaultPermission?: boolean | null;
|
71
|
-
integrationTypes?: Array<ApplicationIntegrationTypes>;
|
72
|
-
contexts?: Array<InterationContextTypes>;
|
73
69
|
nsfw?: boolean;
|
74
70
|
version: string;
|
75
71
|
}
|
@@ -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<
|
29
|
+
integration_types_config?: Record<string, 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,6 +1,7 @@
|
|
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
|
2
|
+
import type { RawApplication, RawGuildMember, RawUser, RawEmoji, RawSticker, RawStickerItem, RawMessageInteraction, MessageInteraction, StickerItem, Sticker, Emoji, User, Application, GuildMember, RawActionRow, ActionRow, RawResolvedData, ResolvedData } from ".";
|
3
3
|
import type { File } from "../rest";
|
4
|
+
import type { Poll, RawPoll } from "./poll";
|
4
5
|
/** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
|
5
6
|
export interface RawChannel {
|
6
7
|
id: string;
|
@@ -73,7 +74,7 @@ export interface RawMessage {
|
|
73
74
|
position?: number;
|
74
75
|
role_subscription_data?: RawRoleSubscriptionData;
|
75
76
|
resolved?: RawResolvedData;
|
76
|
-
poll?:
|
77
|
+
poll?: RawPoll;
|
77
78
|
}
|
78
79
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure */
|
79
80
|
export interface RawMessageActivity {
|
@@ -311,7 +312,7 @@ export interface Message {
|
|
311
312
|
position?: number;
|
312
313
|
roleSubscriptionData?: RoleSubscriptionData;
|
313
314
|
resolved?: ResolvedData;
|
314
|
-
poll?:
|
315
|
+
poll?: Poll;
|
315
316
|
}
|
316
317
|
export interface MessageActivity {
|
317
318
|
type: MessageActivityTypes;
|
@@ -497,7 +498,7 @@ export interface CreateMessageParams {
|
|
497
498
|
attachments?: Array<Attachment>;
|
498
499
|
flags?: MessageFlags;
|
499
500
|
enforceNonce?: boolean;
|
500
|
-
poll?:
|
501
|
+
poll?: Poll;
|
501
502
|
}
|
502
503
|
export interface EditMessageParams {
|
503
504
|
content?: string | null;
|
package/dist/lib/types/index.js
CHANGED
@@ -29,7 +29,6 @@ __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);
|
33
32
|
__exportStar(require("./role"), exports);
|
34
33
|
__exportStar(require("./sku"), exports);
|
35
34
|
__exportStar(require("./stage-instance"), exports);
|
@@ -1,6 +1,7 @@
|
|
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
|
1
|
+
import type { RawAttachment, RawChannel, RawGuildMember, RawMessage, RawUser, RawRole, Attachment, User, GuildMember, Message, Role, Channel, Entitlement, RawEntitlement, RawEmbed, RawAllowedMentions, RawActionRow, RawApplicationCommandOptionChoice, Embed, AllowedMentions, ActionRow, ApplicationCommandOptionChoice, RawTextInput, TextInput, ExecuteWebhookParams } from ".";
|
2
2
|
import type { ApplicationCommandOptionType, ApplicationCommandTypes, ComponentTypes, InteractionCallbackType, InteractionType, MessageFlags } from "../constants";
|
3
3
|
import type { File } from "../rest";
|
4
|
+
import type { Poll, RawPoll } from "./poll";
|
4
5
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
|
5
6
|
export interface RawInteraction {
|
6
7
|
id: string;
|
@@ -84,7 +85,7 @@ export interface RawInteractionCallbackData {
|
|
84
85
|
flags?: MessageFlags;
|
85
86
|
components?: Array<RawActionRow>;
|
86
87
|
attachments?: Array<RawAttachment>;
|
87
|
-
poll?:
|
88
|
+
poll?: RawPoll;
|
88
89
|
files?: Array<File>;
|
89
90
|
choices?: Array<RawApplicationCommandOptionChoice>;
|
90
91
|
custom_id?: string;
|
@@ -164,7 +165,7 @@ export interface InteractionCallbackData {
|
|
164
165
|
flags?: MessageFlags;
|
165
166
|
components?: Array<ActionRow>;
|
166
167
|
attachments?: Array<Attachment>;
|
167
|
-
poll?:
|
168
|
+
poll?: Poll;
|
168
169
|
files?: Array<File>;
|
169
170
|
choices?: Array<ApplicationCommandOptionChoice>;
|
170
171
|
customId?: string;
|
package/dist/lib/types/poll.d.ts
CHANGED
@@ -25,13 +25,6 @@ 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
|
-
}
|
35
28
|
export interface Poll {
|
36
29
|
question: PollMedia;
|
37
30
|
answers: Array<PollAnswer>;
|
@@ -57,10 +50,3 @@ export interface PollAnswerCount {
|
|
57
50
|
count: number;
|
58
51
|
meVoted: boolean;
|
59
52
|
}
|
60
|
-
export interface PollCreateParams {
|
61
|
-
question: PollMedia;
|
62
|
-
answers: Array<PollAnswer>;
|
63
|
-
duration: number;
|
64
|
-
allowMultiselect: boolean;
|
65
|
-
layoutType?: LayoutType;
|
66
|
-
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { MessageFlags, WebhookTypes } from "../constants";
|
2
|
-
import type { ActionRow, AllowedMentions, Attachment, Channel, Embed, Guild, User, RawChannel, RawGuild, RawUser
|
2
|
+
import type { ActionRow, AllowedMentions, Attachment, Channel, Embed, Guild, User, RawChannel, RawGuild, RawUser } from ".";
|
3
3
|
import type { File } from "../rest";
|
4
|
+
import type { Poll } from "./poll";
|
4
5
|
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
5
6
|
export interface RawWebhook {
|
6
7
|
id: string;
|
@@ -52,7 +53,7 @@ export interface ExecuteWebhookParams {
|
|
52
53
|
flags?: MessageFlags | null;
|
53
54
|
threadName?: string;
|
54
55
|
appliedTags?: Array<string>;
|
55
|
-
poll?:
|
56
|
+
poll?: Poll;
|
56
57
|
}
|
57
58
|
export interface EditWebhookMessageParams {
|
58
59
|
content?: string | null;
|
package/dist/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "disgroove",
|
3
|
-
"version": "2.1.0-dev.
|
3
|
+
"version": "2.1.0-dev.8697575",
|
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,6 +24,7 @@
|
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/node": "^20.11.25",
|
26
26
|
"@types/ws": "^8.5.10",
|
27
|
+
"node": "^21.7.1",
|
27
28
|
"typescript": "^5.4.2"
|
28
29
|
},
|
29
30
|
"dependencies": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "disgroove",
|
3
|
-
"version": "2.1.0-dev.
|
3
|
+
"version": "2.1.0-dev.8697575",
|
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,6 +24,7 @@
|
|
24
24
|
"devDependencies": {
|
25
25
|
"@types/node": "^20.11.25",
|
26
26
|
"@types/ws": "^8.5.10",
|
27
|
+
"node": "^21.7.1",
|
27
28
|
"typescript": "^5.4.2"
|
28
29
|
},
|
29
30
|
"dependencies": {
|