disgroove 2.2.4-dev.1f3985e → 2.2.4-dev.4cdebd6
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 +5 -2
- package/dist/lib/Client.js +8 -1
- package/dist/lib/constants.d.ts +19 -1
- package/dist/lib/constants.js +21 -1
- package/dist/lib/gateway/Shard.js +14 -0
- package/dist/lib/types/gateway-events.d.ts +22 -1
- package/dist/lib/types/message.d.ts +24 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/Client.d.ts
CHANGED
@@ -12,7 +12,7 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
|
|
12
12
|
import type { LocaleMap, snowflake, timestamp } from "./types/common";
|
13
13
|
import type { Emoji } from "./types/emoji";
|
14
14
|
import type { Entitlement } from "./types/entitlements";
|
15
|
-
import type { 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, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties } from "./types/gateway-events";
|
15
|
+
import type { 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, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields } from "./types/gateway-events";
|
16
16
|
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
|
17
17
|
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
18
18
|
import type { GuildTemplate } from "./types/guild-template";
|
@@ -608,7 +608,7 @@ export declare class Client extends EventEmitter {
|
|
608
608
|
entityType?: GuildScheduledEventEntityTypes;
|
609
609
|
status?: GuildScheduledEventStatus;
|
610
610
|
image?: string;
|
611
|
-
recurrenceRule?: GuildScheduledEventRecurrenceRule;
|
611
|
+
recurrenceRule?: GuildScheduledEventRecurrenceRule | null;
|
612
612
|
}, reason?: string): Promise<GuildScheduledEvent>;
|
613
613
|
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
|
614
614
|
editGuildSticker(guildID: snowflake, stickerID: snowflake, options: {
|
@@ -861,6 +861,8 @@ export declare class Client extends EventEmitter {
|
|
861
861
|
}): Promise<{
|
862
862
|
pruned: number;
|
863
863
|
}>;
|
864
|
+
/** https://discord.com/developers/docs/resources/guild#get-guild-role */
|
865
|
+
getGuildRole(guildID: snowflake, roleID: snowflake): Promise<Role>;
|
864
866
|
/** https://discord.com/developers/docs/resources/guild#get-guild-roles */
|
865
867
|
getGuildRoles(guildID: snowflake): Promise<Array<Role>>;
|
866
868
|
/** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
|
@@ -1137,6 +1139,7 @@ export interface ClientEvents {
|
|
1137
1139
|
stageInstanceDelete: [stageInstance: StageInstance];
|
1138
1140
|
typingStart: [typing: TypingStartEventFields];
|
1139
1141
|
userUpdate: [user: User];
|
1142
|
+
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEventFields];
|
1140
1143
|
voiceStateUpdate: [voiceState: VoiceState];
|
1141
1144
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEventFields];
|
1142
1145
|
webhooksUpdate: [channelID: snowflake, guildID: snowflake];
|
package/dist/lib/Client.js
CHANGED
@@ -1159,7 +1159,9 @@ class Client extends node_events_1.default {
|
|
1159
1159
|
status: options.status,
|
1160
1160
|
image: options.image,
|
1161
1161
|
recurrence_rule: options.recurrenceRule !== undefined
|
1162
|
-
?
|
1162
|
+
? options.recurrenceRule !== null
|
1163
|
+
? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
|
1164
|
+
: null
|
1163
1165
|
: undefined,
|
1164
1166
|
},
|
1165
1167
|
reason,
|
@@ -1853,6 +1855,11 @@ class Client extends node_events_1.default {
|
|
1853
1855
|
},
|
1854
1856
|
});
|
1855
1857
|
}
|
1858
|
+
/** https://discord.com/developers/docs/resources/guild#get-guild-role */
|
1859
|
+
async getGuildRole(guildID, roleID) {
|
1860
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildID, roleID));
|
1861
|
+
return transformers_1.Roles.roleFromRaw(response);
|
1862
|
+
}
|
1856
1863
|
/** https://discord.com/developers/docs/resources/guild#get-guild-roles */
|
1857
1864
|
async getGuildRoles(guildID) {
|
1858
1865
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
|
package/dist/lib/constants.d.ts
CHANGED
@@ -504,7 +504,8 @@ export declare enum MessageTypes {
|
|
504
504
|
GuildIncidentAlertModeDisabled = 37,
|
505
505
|
GuildIncidentReportRaid = 38,
|
506
506
|
GuildIncidentReportFalseAlarm = 39,
|
507
|
-
PurchaseNotification = 44
|
507
|
+
PurchaseNotification = 44,
|
508
|
+
PollResult = 46
|
508
509
|
}
|
509
510
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
|
510
511
|
export declare enum MessageActivityTypes {
|
@@ -532,6 +533,16 @@ export declare enum MessageReferenceTypes {
|
|
532
533
|
Default = 0,
|
533
534
|
Forward = 1
|
534
535
|
}
|
536
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-types */
|
537
|
+
export declare enum EmbedTypes {
|
538
|
+
Rich = "rich",
|
539
|
+
Image = "image",
|
540
|
+
Video = "video",
|
541
|
+
Gifv = "gifv",
|
542
|
+
Article = "article",
|
543
|
+
Link = "link",
|
544
|
+
PollResult = "poll_result"
|
545
|
+
}
|
535
546
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
536
547
|
export declare enum AttachmentFlags {
|
537
548
|
IsRemix = 4
|
@@ -731,6 +742,7 @@ export declare enum GatewayEvents {
|
|
731
742
|
StageInstanceDelete = "STAGE_INSTANCE_DELETE",
|
732
743
|
TypingStart = "TYPING_START",
|
733
744
|
UserUpdate = "USER_UPDATE",
|
745
|
+
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
734
746
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
735
747
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
736
748
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
@@ -758,6 +770,11 @@ export declare enum ActivityFlags {
|
|
758
770
|
PartyPrivacyVoiceChannel = 128,
|
759
771
|
Embedded = 256
|
760
772
|
}
|
773
|
+
/** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types */
|
774
|
+
export declare enum AnimationTypes {
|
775
|
+
Premium = 0,
|
776
|
+
Basic = 1
|
777
|
+
}
|
761
778
|
/** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
|
762
779
|
export declare enum OAuth2Scopes {
|
763
780
|
ActivitiesRead = "activities.read",
|
@@ -898,6 +915,7 @@ export declare enum JSONErrorCodes {
|
|
898
915
|
UnknownGuildTemplate = 10057,
|
899
916
|
UnknownDiscoverableServerCategory = 10059,
|
900
917
|
UnknownSticker = 10060,
|
918
|
+
UnknownStickerPack = 10061,
|
901
919
|
UnknownInteraction = 10062,
|
902
920
|
UnknownApplicationCommand = 10063,
|
903
921
|
UnknownVoiceState = 10065,
|
package/dist/lib/constants.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.MessageActivityTypes = exports.MessageTypes = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = 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.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.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = 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 = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageReferenceTypes = exports.MessageFlags = 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.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = void 0;
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
6
6
|
var TimestampStyles;
|
7
7
|
(function (TimestampStyles) {
|
@@ -558,6 +558,7 @@ var MessageTypes;
|
|
558
558
|
MessageTypes[MessageTypes["GuildIncidentReportRaid"] = 38] = "GuildIncidentReportRaid";
|
559
559
|
MessageTypes[MessageTypes["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm";
|
560
560
|
MessageTypes[MessageTypes["PurchaseNotification"] = 44] = "PurchaseNotification";
|
561
|
+
MessageTypes[MessageTypes["PollResult"] = 46] = "PollResult";
|
561
562
|
})(MessageTypes || (exports.MessageTypes = MessageTypes = {}));
|
562
563
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
|
563
564
|
var MessageActivityTypes;
|
@@ -588,6 +589,17 @@ var MessageReferenceTypes;
|
|
588
589
|
MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
|
589
590
|
MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
|
590
591
|
})(MessageReferenceTypes || (exports.MessageReferenceTypes = MessageReferenceTypes = {}));
|
592
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-types */
|
593
|
+
var EmbedTypes;
|
594
|
+
(function (EmbedTypes) {
|
595
|
+
EmbedTypes["Rich"] = "rich";
|
596
|
+
EmbedTypes["Image"] = "image";
|
597
|
+
EmbedTypes["Video"] = "video";
|
598
|
+
EmbedTypes["Gifv"] = "gifv";
|
599
|
+
EmbedTypes["Article"] = "article";
|
600
|
+
EmbedTypes["Link"] = "link";
|
601
|
+
EmbedTypes["PollResult"] = "poll_result";
|
602
|
+
})(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
|
591
603
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
592
604
|
var AttachmentFlags;
|
593
605
|
(function (AttachmentFlags) {
|
@@ -803,6 +815,7 @@ var GatewayEvents;
|
|
803
815
|
GatewayEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
|
804
816
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
805
817
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
818
|
+
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
806
819
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
807
820
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
808
821
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
@@ -832,6 +845,12 @@ var ActivityFlags;
|
|
832
845
|
ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
|
833
846
|
ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
|
834
847
|
})(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {}));
|
848
|
+
/** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types */
|
849
|
+
var AnimationTypes;
|
850
|
+
(function (AnimationTypes) {
|
851
|
+
AnimationTypes[AnimationTypes["Premium"] = 0] = "Premium";
|
852
|
+
AnimationTypes[AnimationTypes["Basic"] = 1] = "Basic";
|
853
|
+
})(AnimationTypes || (exports.AnimationTypes = AnimationTypes = {}));
|
835
854
|
/** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
|
836
855
|
var OAuth2Scopes;
|
837
856
|
(function (OAuth2Scopes) {
|
@@ -979,6 +998,7 @@ var JSONErrorCodes;
|
|
979
998
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildTemplate"] = 10057] = "UnknownGuildTemplate";
|
980
999
|
JSONErrorCodes[JSONErrorCodes["UnknownDiscoverableServerCategory"] = 10059] = "UnknownDiscoverableServerCategory";
|
981
1000
|
JSONErrorCodes[JSONErrorCodes["UnknownSticker"] = 10060] = "UnknownSticker";
|
1001
|
+
JSONErrorCodes[JSONErrorCodes["UnknownStickerPack"] = 10061] = "UnknownStickerPack";
|
982
1002
|
JSONErrorCodes[JSONErrorCodes["UnknownInteraction"] = 10062] = "UnknownInteraction";
|
983
1003
|
JSONErrorCodes[JSONErrorCodes["UnknownApplicationCommand"] = 10063] = "UnknownApplicationCommand";
|
984
1004
|
JSONErrorCodes[JSONErrorCodes["UnknownVoiceState"] = 10065] = "UnknownVoiceState";
|
@@ -464,6 +464,20 @@ class Shard {
|
|
464
464
|
case constants_1.GatewayEvents.UserUpdate:
|
465
465
|
this.client.emit("userUpdate", transformers_1.Users.userFromRaw(packet.d));
|
466
466
|
break;
|
467
|
+
case constants_1.GatewayEvents.VoiceChannelEffectSend:
|
468
|
+
this.client.emit("voiceChannelEffectSend", {
|
469
|
+
channelID: packet.d.channel_id,
|
470
|
+
guildID: packet.d.guild_id,
|
471
|
+
userID: packet.d.user_id,
|
472
|
+
emoji: packet.d.emoji !== null
|
473
|
+
? transformers_1.Emojis.emojiFromRaw(packet.d.emoji)
|
474
|
+
: null,
|
475
|
+
animationType: packet.d.animation_type,
|
476
|
+
animationID: packet.d.animation_id,
|
477
|
+
soundID: packet.d.sound_id,
|
478
|
+
soundVolume: packet.d.sound_volume,
|
479
|
+
});
|
480
|
+
break;
|
467
481
|
case constants_1.GatewayEvents.VoiceStateUpdate:
|
468
482
|
this.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(packet.d));
|
469
483
|
break;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ActivityFlags, ActivityType, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
1
|
+
import type { ActivityFlags, ActivityType, AnimationTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
|
2
2
|
import type { RawApplication, Application } from "./application";
|
3
3
|
import type { RawAutoModerationAction, AutoModerationAction } from "./auto-moderation";
|
4
4
|
import type { RawChannel, RawThreadMember, Channel, ThreadMember } from "./channel";
|
@@ -330,6 +330,17 @@ export interface RawTypingStartEventFields {
|
|
330
330
|
timestamp: timestamp;
|
331
331
|
member?: RawGuildMember;
|
332
332
|
}
|
333
|
+
/** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effetc-send-event-fields */
|
334
|
+
export interface RawVoiceChannelEffectSendEventFields {
|
335
|
+
channel_id: snowflake;
|
336
|
+
guild_id: snowflake;
|
337
|
+
user_id: snowflake;
|
338
|
+
emoji?: RawEmoji | null;
|
339
|
+
animation_type?: AnimationTypes | null;
|
340
|
+
animation_id?: number;
|
341
|
+
sound_id?: snowflake | number;
|
342
|
+
sound_volume?: number;
|
343
|
+
}
|
333
344
|
/** https://discord.com/developers/docs/topics/gateway-events#voice-server-update-voice-server-update-event-fields */
|
334
345
|
export interface RawVoiceServerUpdateEventFields {
|
335
346
|
token: string;
|
@@ -630,6 +641,16 @@ export interface TypingStartEventFields {
|
|
630
641
|
timestamp: timestamp;
|
631
642
|
member?: GuildMember;
|
632
643
|
}
|
644
|
+
export interface VoiceChannelEffectSendEventFields {
|
645
|
+
channelID: snowflake;
|
646
|
+
guildID: snowflake;
|
647
|
+
userID: snowflake;
|
648
|
+
emoji?: Emoji | null;
|
649
|
+
animationType?: AnimationTypes | null;
|
650
|
+
animationID?: number;
|
651
|
+
soundID?: snowflake | number;
|
652
|
+
soundVolume?: number;
|
653
|
+
}
|
633
654
|
export interface VoiceServerUpdateEventFields {
|
634
655
|
token: string;
|
635
656
|
guildID: snowflake;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes } from "../constants";
|
1
|
+
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
|
2
2
|
import type { Application, RawApplication } from "./application";
|
3
3
|
import type { Channel, RawChannel, RawRoleSubscriptionData, RoleSubscriptionData } from "./channel";
|
4
4
|
import type { snowflake, timestamp } from "./common";
|
@@ -96,7 +96,7 @@ export interface RawReactionCountDetails {
|
|
96
96
|
/** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
|
97
97
|
export interface RawEmbed {
|
98
98
|
title?: string;
|
99
|
-
type?:
|
99
|
+
type?: EmbedTypes;
|
100
100
|
description?: string;
|
101
101
|
url?: string;
|
102
102
|
timestamp?: timestamp;
|
@@ -154,6 +154,17 @@ export interface RawEmbedField {
|
|
154
154
|
value: string;
|
155
155
|
inline?: boolean;
|
156
156
|
}
|
157
|
+
/** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
|
158
|
+
export interface RawPollResultEmbedFields {
|
159
|
+
poll_question_text: string;
|
160
|
+
victor_answer_votes: Array<number>;
|
161
|
+
total_votes: number;
|
162
|
+
victor_answer_id?: snowflake;
|
163
|
+
victor_answer_text?: string;
|
164
|
+
victor_answer_emoji_id?: snowflake;
|
165
|
+
victor_answer_emoji_name?: string;
|
166
|
+
victor_answer_emoji_animated?: boolean;
|
167
|
+
}
|
157
168
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
|
158
169
|
export interface RawAttachment {
|
159
170
|
id: snowflake;
|
@@ -264,7 +275,7 @@ export interface ReactionCountDetails {
|
|
264
275
|
}
|
265
276
|
export interface Embed {
|
266
277
|
title?: string;
|
267
|
-
type?:
|
278
|
+
type?: EmbedTypes;
|
268
279
|
description?: string;
|
269
280
|
url?: string;
|
270
281
|
timestamp?: timestamp;
|
@@ -315,6 +326,16 @@ export interface EmbedField {
|
|
315
326
|
value: string;
|
316
327
|
inline?: boolean;
|
317
328
|
}
|
329
|
+
export interface PollResultEmbedFields {
|
330
|
+
pollQuestionText: string;
|
331
|
+
victorAnswerVotes: Array<number>;
|
332
|
+
totalVotes: number;
|
333
|
+
victorAnswerID?: snowflake;
|
334
|
+
victorAnswerText?: string;
|
335
|
+
victorAnswerEmojiID?: snowflake;
|
336
|
+
victorAnswerEmojiName?: string;
|
337
|
+
victorAnswerEmojiAnimated?: boolean;
|
338
|
+
}
|
318
339
|
export interface Attachment {
|
319
340
|
id: snowflake;
|
320
341
|
filename: string;
|
package/dist/package.json
CHANGED