disgroove 3.0.1-dev.6e60c8d → 3.0.1-dev.b082a0c
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 +2 -1
- package/dist/lib/Client.js +8 -0
- package/dist/lib/constants.d.ts +11 -1
- package/dist/lib/constants.js +12 -1
- package/dist/lib/gateway/Dispatcher.js +6 -1
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Messages.js +16 -0
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +16 -10
- package/dist/lib/types/gateway-events.d.ts +3 -1
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/message.d.ts +38 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/Client.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
|
|
|
26
26
|
import type { VoiceRegion, VoiceState } from "./types/voice";
|
|
27
27
|
import type { Webhook } from "./types/webhook";
|
|
28
28
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
|
29
|
-
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin } from "./types/message";
|
|
29
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme } from "./types/message";
|
|
30
30
|
import type { Subscription } from "./types/subscription";
|
|
31
31
|
import type { SoundboardSound } from "./types/soundboard";
|
|
32
32
|
import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/components";
|
|
@@ -316,6 +316,7 @@ export declare class Client extends EventEmitter {
|
|
|
316
316
|
flags?: MessageFlags;
|
|
317
317
|
enforceNonce?: boolean;
|
|
318
318
|
poll?: PollCreateParams;
|
|
319
|
+
sharedClientTheme?: SharedClientTheme;
|
|
319
320
|
}): Promise<Message>;
|
|
320
321
|
/** https://discord.com/developers/docs/resources/message#create-reaction */
|
|
321
322
|
createMessageReaction(channelId: snowflake, messageId: snowflake, emoji: string): void;
|
package/dist/lib/Client.js
CHANGED
|
@@ -652,6 +652,14 @@ class Client extends node_events_1.default {
|
|
|
652
652
|
layout_type: options.poll.layoutType,
|
|
653
653
|
}
|
|
654
654
|
: undefined,
|
|
655
|
+
shared_client_theme: options.sharedClientTheme !== undefined
|
|
656
|
+
? {
|
|
657
|
+
colors: options.sharedClientTheme.colors,
|
|
658
|
+
gradient_angle: options.sharedClientTheme.gradientAngle,
|
|
659
|
+
base_mix: options.sharedClientTheme.baseMix,
|
|
660
|
+
base_theme: options.sharedClientTheme.baseTheme,
|
|
661
|
+
}
|
|
662
|
+
: undefined,
|
|
655
663
|
},
|
|
656
664
|
files: options.files,
|
|
657
665
|
});
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -624,6 +624,13 @@ export declare enum AllowedMentionTypes {
|
|
|
624
624
|
UserMentions = "users",
|
|
625
625
|
EveryoneMentions = "everyone"
|
|
626
626
|
}
|
|
627
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
628
|
+
export declare enum BaseThemeTypes {
|
|
629
|
+
Dark = 1,
|
|
630
|
+
Light = 2,
|
|
631
|
+
Darker = 3,
|
|
632
|
+
Midnight = 4
|
|
633
|
+
}
|
|
627
634
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
628
635
|
export declare enum ReactionTypes {
|
|
629
636
|
Normal = 0,
|
|
@@ -958,7 +965,10 @@ export declare enum VoiceCloseEventCodes {
|
|
|
958
965
|
Disconnect = 4014,
|
|
959
966
|
VoiceServerCrashed = 4015,
|
|
960
967
|
UnknownEncryptionMode = 4016,
|
|
961
|
-
|
|
968
|
+
ProtocolRequired = 4017,
|
|
969
|
+
BadRequest = 4020,
|
|
970
|
+
RateLimited = 4021,
|
|
971
|
+
CallTerminated = 4022
|
|
962
972
|
}
|
|
963
973
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
964
974
|
export declare enum HTTPResponseCodes {
|
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.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.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = 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.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = 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 = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = 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.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
6
|
var TimestampStyles;
|
|
7
7
|
(function (TimestampStyles) {
|
|
@@ -690,6 +690,14 @@ var AllowedMentionTypes;
|
|
|
690
690
|
AllowedMentionTypes["UserMentions"] = "users";
|
|
691
691
|
AllowedMentionTypes["EveryoneMentions"] = "everyone";
|
|
692
692
|
})(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
|
|
693
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
694
|
+
var BaseThemeTypes;
|
|
695
|
+
(function (BaseThemeTypes) {
|
|
696
|
+
BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
|
|
697
|
+
BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
|
|
698
|
+
BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
|
|
699
|
+
BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
|
|
700
|
+
})(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
|
|
693
701
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
694
702
|
var ReactionTypes;
|
|
695
703
|
(function (ReactionTypes) {
|
|
@@ -1047,7 +1055,10 @@ var VoiceCloseEventCodes;
|
|
|
1047
1055
|
VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
|
|
1048
1056
|
VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
|
|
1049
1057
|
VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
|
|
1058
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
|
|
1050
1059
|
VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
|
|
1060
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
|
|
1061
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
|
|
1051
1062
|
})(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
|
|
1052
1063
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
1053
1064
|
var HTTPResponseCodes;
|
|
@@ -208,6 +208,11 @@ exports.Handlers = {
|
|
|
208
208
|
}
|
|
209
209
|
: null
|
|
210
210
|
: undefined,
|
|
211
|
+
collectibles: data.collectibles !== undefined
|
|
212
|
+
? data.collectibles !== null
|
|
213
|
+
? transformers_1.Users.collectiblesFromRaw(data.collectibles)
|
|
214
|
+
: null
|
|
215
|
+
: undefined,
|
|
211
216
|
});
|
|
212
217
|
},
|
|
213
218
|
[constants_1.GatewayEvents.GuildMembersChunk]: (shard, data) => {
|
|
@@ -306,7 +311,7 @@ exports.Handlers = {
|
|
|
306
311
|
temporary: data.temporary,
|
|
307
312
|
uses: data.uses,
|
|
308
313
|
expiresAt: data.expires_at,
|
|
309
|
-
roleIds: data.roles_ids
|
|
314
|
+
roleIds: data.roles_ids,
|
|
310
315
|
});
|
|
311
316
|
},
|
|
312
317
|
[constants_1.GatewayEvents.InviteDelete]: (shard, data) => {
|
|
@@ -119,6 +119,11 @@ class Guilds {
|
|
|
119
119
|
}
|
|
120
120
|
: null
|
|
121
121
|
: undefined,
|
|
122
|
+
collectibles: guildMember.collectibles !== undefined
|
|
123
|
+
? guildMember.collectibles !== null
|
|
124
|
+
? Users_1.Users.collectiblesFromRaw(guildMember.collectibles)
|
|
125
|
+
: null
|
|
126
|
+
: undefined,
|
|
122
127
|
};
|
|
123
128
|
}
|
|
124
129
|
static guildMemberToRaw(guildMember) {
|
|
@@ -145,6 +150,11 @@ class Guilds {
|
|
|
145
150
|
}
|
|
146
151
|
: null
|
|
147
152
|
: undefined,
|
|
153
|
+
collectibles: guildMember.collectibles !== undefined
|
|
154
|
+
? guildMember.collectibles !== null
|
|
155
|
+
? Users_1.Users.collectiblesToRaw(guildMember.collectibles)
|
|
156
|
+
: null
|
|
157
|
+
: undefined,
|
|
148
158
|
};
|
|
149
159
|
}
|
|
150
160
|
static guildToRaw(guild) {
|
|
@@ -298,6 +298,14 @@ class Messages {
|
|
|
298
298
|
? Polls_1.Polls.pollFromRaw(message.poll)
|
|
299
299
|
: undefined,
|
|
300
300
|
call: message.call,
|
|
301
|
+
sharedClientTheme: message.shared_client_theme !== undefined
|
|
302
|
+
? {
|
|
303
|
+
colors: message.shared_client_theme.colors,
|
|
304
|
+
gradientAngle: message.shared_client_theme.gradient_angle,
|
|
305
|
+
baseMix: message.shared_client_theme.base_mix,
|
|
306
|
+
baseTheme: message.shared_client_theme.base_theme,
|
|
307
|
+
}
|
|
308
|
+
: undefined,
|
|
301
309
|
};
|
|
302
310
|
}
|
|
303
311
|
static messageToRaw(message) {
|
|
@@ -404,6 +412,14 @@ class Messages {
|
|
|
404
412
|
: undefined,
|
|
405
413
|
poll: message.poll !== undefined ? Polls_1.Polls.pollToRaw(message.poll) : undefined,
|
|
406
414
|
call: message.call,
|
|
415
|
+
shared_client_theme: message.sharedClientTheme !== undefined
|
|
416
|
+
? {
|
|
417
|
+
colors: message.sharedClientTheme.colors,
|
|
418
|
+
gradient_angle: message.sharedClientTheme.gradientAngle,
|
|
419
|
+
base_mix: message.sharedClientTheme.baseMix,
|
|
420
|
+
base_theme: message.sharedClientTheme.baseTheme,
|
|
421
|
+
}
|
|
422
|
+
: undefined,
|
|
407
423
|
};
|
|
408
424
|
}
|
|
409
425
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { Nameplate, RawNameplate, RawUser, User } from "../types/user";
|
|
1
|
+
import type { Collectibles, Nameplate, RawCollectibles, RawNameplate, RawUser, User } from "../types/user";
|
|
2
2
|
export declare class Users {
|
|
3
|
+
static collectiblesFromRaw(collectibles: RawCollectibles): Collectibles;
|
|
4
|
+
static collectiblesToRaw(collectibles: Collectibles): RawCollectibles;
|
|
3
5
|
static nameplateFromRaw(nameplate: RawNameplate): Nameplate;
|
|
4
6
|
static nameplateToRaw(nameplate: Nameplate): RawNameplate;
|
|
5
7
|
static userFromRaw(user: RawUser): User;
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Users = void 0;
|
|
4
4
|
class Users {
|
|
5
|
+
static collectiblesFromRaw(collectibles) {
|
|
6
|
+
return {
|
|
7
|
+
nameplate: collectibles.nameplate !== undefined
|
|
8
|
+
? this.nameplateFromRaw(collectibles.nameplate)
|
|
9
|
+
: undefined,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static collectiblesToRaw(collectibles) {
|
|
13
|
+
return {
|
|
14
|
+
nameplate: collectibles.nameplate !== undefined
|
|
15
|
+
? this.nameplateToRaw(collectibles.nameplate)
|
|
16
|
+
: undefined,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
5
19
|
static nameplateFromRaw(nameplate) {
|
|
6
20
|
return {
|
|
7
21
|
skuId: nameplate.sku_id,
|
|
@@ -46,11 +60,7 @@ class Users {
|
|
|
46
60
|
: undefined,
|
|
47
61
|
collectibles: user.collectibles !== undefined
|
|
48
62
|
? user.collectibles !== null
|
|
49
|
-
?
|
|
50
|
-
nameplate: user.collectibles.nameplate !== undefined
|
|
51
|
-
? this.nameplateFromRaw(user.collectibles.nameplate)
|
|
52
|
-
: undefined,
|
|
53
|
-
}
|
|
63
|
+
? this.collectiblesFromRaw(user.collectibles)
|
|
54
64
|
: null
|
|
55
65
|
: undefined,
|
|
56
66
|
primaryGuild: user.primary_guild !== undefined
|
|
@@ -93,11 +103,7 @@ class Users {
|
|
|
93
103
|
: undefined,
|
|
94
104
|
collectibles: user.collectibles !== undefined
|
|
95
105
|
? user.collectibles !== null
|
|
96
|
-
?
|
|
97
|
-
nameplate: user.collectibles.nameplate !== undefined
|
|
98
|
-
? this.nameplateToRaw(user.collectibles.nameplate)
|
|
99
|
-
: undefined,
|
|
100
|
-
}
|
|
106
|
+
? this.collectiblesToRaw(user.collectibles)
|
|
101
107
|
: null
|
|
102
108
|
: undefined,
|
|
103
109
|
primary_guild: user.primaryGuild !== undefined
|
|
@@ -10,7 +10,7 @@ import { RawRole, Role } from "./role";
|
|
|
10
10
|
import type { RawSoundboardSound, SoundboardSound } from "./soundboard";
|
|
11
11
|
import type { RawStageInstance, StageInstance } from "./stage-instance";
|
|
12
12
|
import { RawSticker, Sticker } from "./sticker";
|
|
13
|
-
import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData } from "./user";
|
|
13
|
+
import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData, Collectibles, RawCollectibles } from "./user";
|
|
14
14
|
import type { RawVoiceState, VoiceState } from "./voice";
|
|
15
15
|
/** https://discord.com/developers/docs/events/gateway-events#payload-structure */
|
|
16
16
|
export interface RawPayload {
|
|
@@ -185,6 +185,7 @@ export interface RawGuildMemberUpdateEvent {
|
|
|
185
185
|
communication_disabled_until?: number | null;
|
|
186
186
|
flags?: GuildMemberFlags;
|
|
187
187
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
188
|
+
collectibles?: RawCollectibles | null;
|
|
188
189
|
}
|
|
189
190
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
190
191
|
export interface RawGuildMembersChunkEvent {
|
|
@@ -625,6 +626,7 @@ export interface GuildMemberUpdateEvent {
|
|
|
625
626
|
communicationDisabledUntil?: number | null;
|
|
626
627
|
flags?: GuildMemberFlags;
|
|
627
628
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
629
|
+
collectibles?: Collectibles | null;
|
|
628
630
|
}
|
|
629
631
|
/** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
630
632
|
export interface GuildMembersChunkEvent {
|
|
@@ -4,7 +4,7 @@ import type { snowflake, timestamp } from "./common";
|
|
|
4
4
|
import type { RawEmoji, Emoji } from "./emoji";
|
|
5
5
|
import type { RawRole, Role } from "./role";
|
|
6
6
|
import type { RawSticker, Sticker } from "./sticker";
|
|
7
|
-
import type { AvatarDecorationData, RawAvatarDecorationData, RawUser, User } from "./user";
|
|
7
|
+
import type { AvatarDecorationData, Collectibles, RawAvatarDecorationData, RawCollectibles, RawUser, User } from "./user";
|
|
8
8
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
|
9
9
|
export interface RawGuild {
|
|
10
10
|
id: snowflake;
|
|
@@ -102,6 +102,7 @@ export interface RawGuildMember {
|
|
|
102
102
|
communication_disabled_until?: timestamp | null;
|
|
103
103
|
unusual_dm_activity_until?: timestamp | null;
|
|
104
104
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
105
|
+
collectibles?: RawCollectibles | null;
|
|
105
106
|
}
|
|
106
107
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
|
|
107
108
|
export interface RawIntegration {
|
|
@@ -286,6 +287,7 @@ export interface GuildMember {
|
|
|
286
287
|
communicationDisabledUntil?: timestamp | null;
|
|
287
288
|
unusualDMActivityUntil?: timestamp | null;
|
|
288
289
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
290
|
+
collectibles?: Collectibles | null;
|
|
289
291
|
}
|
|
290
292
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
|
|
291
293
|
export interface Integration {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
|
|
1
|
+
import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes } from "../constants";
|
|
2
2
|
import type { Application, RawApplication } from "./application";
|
|
3
3
|
import type { Channel, RawChannel } from "./channel";
|
|
4
4
|
import type { snowflake, timestamp } from "./common";
|
|
@@ -46,6 +46,7 @@ export interface RawMessage {
|
|
|
46
46
|
resolved?: RawResolvedData;
|
|
47
47
|
poll?: RawPoll;
|
|
48
48
|
call?: RawMessageCall;
|
|
49
|
+
shared_client_theme?: RawSharedClientTheme;
|
|
49
50
|
}
|
|
50
51
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
51
52
|
export interface RawMessageActivity {
|
|
@@ -208,6 +209,14 @@ export interface RawMessagePin {
|
|
|
208
209
|
pinnet_at: timestamp;
|
|
209
210
|
message: RawMessage;
|
|
210
211
|
}
|
|
212
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
213
|
+
export interface RawSharedClientTheme {
|
|
214
|
+
colors: Array<string>;
|
|
215
|
+
gradient_angle: number;
|
|
216
|
+
base_mix: number;
|
|
217
|
+
base_theme?: BaseThemeTypes | null;
|
|
218
|
+
}
|
|
219
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-structure */
|
|
211
220
|
export interface Message {
|
|
212
221
|
id: snowflake;
|
|
213
222
|
channelId: snowflake;
|
|
@@ -245,11 +254,14 @@ export interface Message {
|
|
|
245
254
|
resolved?: ResolvedData;
|
|
246
255
|
poll?: Poll;
|
|
247
256
|
call?: MessageCall;
|
|
257
|
+
sharedClientTheme?: SharedClientTheme;
|
|
248
258
|
}
|
|
259
|
+
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
|
|
249
260
|
export interface MessageActivity {
|
|
250
261
|
type: MessageActivityTypes;
|
|
251
262
|
partyId?: string;
|
|
252
263
|
}
|
|
264
|
+
/** https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-interaction-metadata-structure */
|
|
253
265
|
export interface MessageInteractionMetadata {
|
|
254
266
|
id: snowflake;
|
|
255
267
|
type: InteractionType;
|
|
@@ -259,10 +271,12 @@ export interface MessageInteractionMetadata {
|
|
|
259
271
|
interactedMessageId?: snowflake;
|
|
260
272
|
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
|
261
273
|
}
|
|
274
|
+
/** https://discord.com/developers/docs/resources/message#message-call-object-message-call-object-structure */
|
|
262
275
|
export interface MessageCall {
|
|
263
276
|
partecipants: Array<snowflake>;
|
|
264
277
|
endedTimestamp?: timestamp | null;
|
|
265
278
|
}
|
|
279
|
+
/** https://discord.com/developers/docs/resources/message#message-reference-object-message-reference-structure */
|
|
266
280
|
export interface MessageReference {
|
|
267
281
|
type?: MessageReferenceTypes;
|
|
268
282
|
messageId?: snowflake;
|
|
@@ -270,9 +284,11 @@ export interface MessageReference {
|
|
|
270
284
|
guildId?: snowflake;
|
|
271
285
|
failIfNotExists?: boolean;
|
|
272
286
|
}
|
|
287
|
+
/** https://discord.com/developers/docs/resources/message#message-snapshot-object-message-snapshot-structure */
|
|
273
288
|
export interface MessageSnapshot {
|
|
274
289
|
message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles" | "stickers" | "stickerItems" | "components">;
|
|
275
290
|
}
|
|
291
|
+
/** https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure */
|
|
276
292
|
export interface Reaction {
|
|
277
293
|
count: number;
|
|
278
294
|
countDetails: ReactionCountDetails;
|
|
@@ -281,10 +297,12 @@ export interface Reaction {
|
|
|
281
297
|
emoji: Emoji;
|
|
282
298
|
burstColors: Array<string>;
|
|
283
299
|
}
|
|
300
|
+
/** https://discord.com/developers/docs/resources/message#reaction-count-details-object-reaction-count-details-structure */
|
|
284
301
|
export interface ReactionCountDetails {
|
|
285
302
|
burst: number;
|
|
286
303
|
normal: number;
|
|
287
304
|
}
|
|
305
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
|
|
288
306
|
export interface Embed {
|
|
289
307
|
title?: string;
|
|
290
308
|
type?: EmbedTypes;
|
|
@@ -300,44 +318,52 @@ export interface Embed {
|
|
|
300
318
|
author?: EmbedAuthor;
|
|
301
319
|
fields?: Array<EmbedField>;
|
|
302
320
|
}
|
|
321
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
|
|
303
322
|
export interface EmbedThumbnail {
|
|
304
323
|
url: string;
|
|
305
324
|
proxyURL?: string;
|
|
306
325
|
height?: number;
|
|
307
326
|
width?: number;
|
|
308
327
|
}
|
|
328
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure */
|
|
309
329
|
export interface EmbedVideo {
|
|
310
330
|
url?: string;
|
|
311
331
|
proxyURL?: string;
|
|
312
332
|
height?: number;
|
|
313
333
|
width?: number;
|
|
314
334
|
}
|
|
335
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
|
|
315
336
|
export interface EmbedImage {
|
|
316
337
|
url: string;
|
|
317
338
|
proxyURL?: string;
|
|
318
339
|
height?: number;
|
|
319
340
|
width?: number;
|
|
320
341
|
}
|
|
342
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
|
|
321
343
|
export interface EmbedProvider {
|
|
322
344
|
name?: string;
|
|
323
345
|
url?: string;
|
|
324
346
|
}
|
|
347
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure */
|
|
325
348
|
export interface EmbedAuthor {
|
|
326
349
|
name: string;
|
|
327
350
|
url?: string;
|
|
328
351
|
iconURL?: string;
|
|
329
352
|
proxyIconURL?: string;
|
|
330
353
|
}
|
|
354
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure */
|
|
331
355
|
export interface EmbedFooter {
|
|
332
356
|
text: string;
|
|
333
357
|
iconURL?: string;
|
|
334
358
|
proxyIconURL?: string;
|
|
335
359
|
}
|
|
360
|
+
/** https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure */
|
|
336
361
|
export interface EmbedField {
|
|
337
362
|
name: string;
|
|
338
363
|
value: string;
|
|
339
364
|
inline?: boolean;
|
|
340
365
|
}
|
|
366
|
+
/** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
|
|
341
367
|
export interface PollResultEmbedFields {
|
|
342
368
|
pollQuestionText: string;
|
|
343
369
|
victorAnswerVotes: Array<number>;
|
|
@@ -348,6 +374,7 @@ export interface PollResultEmbedFields {
|
|
|
348
374
|
victorAnswerEmojiName?: string;
|
|
349
375
|
victorAnswerEmojiAnimated?: boolean;
|
|
350
376
|
}
|
|
377
|
+
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
|
|
351
378
|
export interface Attachment {
|
|
352
379
|
id: snowflake;
|
|
353
380
|
filename: string;
|
|
@@ -364,12 +391,14 @@ export interface Attachment {
|
|
|
364
391
|
waveform?: boolean;
|
|
365
392
|
flags?: AttachmentFlags;
|
|
366
393
|
}
|
|
394
|
+
/** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
|
|
367
395
|
export interface ChannelMention {
|
|
368
396
|
id: snowflake;
|
|
369
397
|
guildId: snowflake;
|
|
370
398
|
type: ChannelTypes;
|
|
371
399
|
name: string;
|
|
372
400
|
}
|
|
401
|
+
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure */
|
|
373
402
|
export interface AllowedMentions {
|
|
374
403
|
parse?: Array<AllowedMentionTypes>;
|
|
375
404
|
roles?: Array<snowflake>;
|
|
@@ -383,7 +412,15 @@ export interface RoleSubscriptionData {
|
|
|
383
412
|
totalMonthsSubscribed: number;
|
|
384
413
|
isRenewal: boolean;
|
|
385
414
|
}
|
|
415
|
+
/** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
|
|
386
416
|
export interface MessagePin {
|
|
387
417
|
pinnetAt: timestamp;
|
|
388
418
|
message: Message;
|
|
389
419
|
}
|
|
420
|
+
/** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
|
|
421
|
+
export interface SharedClientTheme {
|
|
422
|
+
colors: Array<string>;
|
|
423
|
+
gradientAngle: number;
|
|
424
|
+
baseMix: number;
|
|
425
|
+
baseTheme?: BaseThemeTypes | null;
|
|
426
|
+
}
|
package/dist/package.json
CHANGED