disgroove 2.2.5 → 2.2.6-dev.3f22d60
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 +23 -21
- package/dist/lib/Client.js +7 -2
- package/dist/lib/constants.d.ts +22 -2
- package/dist/lib/constants.js +24 -2
- package/dist/lib/rest/RequestManager.d.ts +2 -2
- package/dist/lib/transformers/Applications.js +8 -0
- package/dist/lib/transformers/Components.d.ts +27 -0
- package/dist/lib/transformers/Components.js +399 -0
- package/dist/lib/transformers/Messages.d.ts +3 -4
- package/dist/lib/transformers/Messages.js +49 -170
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +34 -0
- package/dist/lib/transformers/index.d.ts +1 -0
- package/dist/lib/transformers/index.js +1 -0
- package/dist/lib/types/application.d.ts +9 -1
- package/dist/lib/types/interaction.d.ts +7 -7
- package/dist/lib/types/message-components.d.ts +137 -6
- package/dist/lib/types/message.d.ts +5 -3
- package/dist/lib/types/user.d.ts +22 -0
- package/dist/lib/utils/CDN.d.ts +23 -23
- package/dist/package.json +3 -2
- package/package.json +3 -2
package/dist/lib/Client.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
/// <reference types="node" />
|
3
3
|
/// <reference types="node" />
|
4
4
|
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes } from "./constants";
|
5
|
-
import { RequestManager, type
|
5
|
+
import { RequestManager, type FileData } from "./rest";
|
6
6
|
import EventEmitter from "node:events";
|
7
7
|
import { Shard } from "./gateway";
|
8
8
|
import type { ActivityInstance, Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
|
@@ -20,7 +20,6 @@ import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventE
|
|
20
20
|
import type { GuildTemplate } from "./types/guild-template";
|
21
21
|
import type { Interaction, InteractionCallbackResponse, InteractionResponse } from "./types/interaction";
|
22
22
|
import type { Invite } from "./types/invite";
|
23
|
-
import type { ActionRow } from "./types/message-components";
|
24
23
|
import type { PollCreateParams } from "./types/poll";
|
25
24
|
import type { Role } from "./types/role";
|
26
25
|
import type { SKU } from "./types/sku";
|
@@ -30,7 +29,7 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
|
|
30
29
|
import type { VoiceRegion, VoiceState } from "./types/voice";
|
31
30
|
import type { Webhook } from "./types/webhook";
|
32
31
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
33
|
-
import type { Embed, AllowedMentions, Attachment, Message, MessageReference } from "./types/message";
|
32
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessageTopLevelComponent } from "./types/message";
|
34
33
|
import type { Subscription } from "./types/subscription";
|
35
34
|
import type { SoundboardSound } from "./types/soundboard";
|
36
35
|
export interface GatewayOptions {
|
@@ -286,7 +285,7 @@ export declare class Client extends EventEmitter {
|
|
286
285
|
name: string;
|
287
286
|
description: string;
|
288
287
|
tags: string;
|
289
|
-
file:
|
288
|
+
file: FileData;
|
290
289
|
}, reason?: string): Promise<Sticker>;
|
291
290
|
/** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
|
292
291
|
createGuildSoundboardSound(guildID: snowflake, options: {
|
@@ -307,8 +306,8 @@ export declare class Client extends EventEmitter {
|
|
307
306
|
tts?: boolean;
|
308
307
|
embeds?: Array<Embed>;
|
309
308
|
allowedMentions?: AllowedMentions;
|
310
|
-
components?: Array<
|
311
|
-
files?: Array<
|
309
|
+
components?: Array<MessageTopLevelComponent>;
|
310
|
+
files?: Array<FileData> | null;
|
312
311
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
313
312
|
flags?: MessageFlags;
|
314
313
|
threadName?: string;
|
@@ -327,9 +326,9 @@ export declare class Client extends EventEmitter {
|
|
327
326
|
embeds?: Array<Embed>;
|
328
327
|
allowedMentions?: AllowedMentions;
|
329
328
|
messageReference?: MessageReference;
|
330
|
-
components?: Array<
|
329
|
+
components?: Array<MessageTopLevelComponent>;
|
331
330
|
stickersIDs?: Array<snowflake>;
|
332
|
-
files?: Array<
|
331
|
+
files?: Array<FileData>;
|
333
332
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
334
333
|
flags?: MessageFlags;
|
335
334
|
enforceNonce?: boolean;
|
@@ -360,11 +359,11 @@ export declare class Client extends EventEmitter {
|
|
360
359
|
content?: string;
|
361
360
|
embeds?: Array<Embed>;
|
362
361
|
allowedMentions?: AllowedMentions;
|
363
|
-
components?: Array<
|
362
|
+
components?: Array<MessageTopLevelComponent>;
|
364
363
|
stickerIDs?: Array<snowflake>;
|
365
364
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
366
365
|
flags?: MessageFlags;
|
367
|
-
files?: Array<
|
366
|
+
files?: Array<FileData>;
|
368
367
|
};
|
369
368
|
appliedTags?: Array<snowflake>;
|
370
369
|
}, reason?: string): Promise<Channel>;
|
@@ -666,8 +665,8 @@ export declare class Client extends EventEmitter {
|
|
666
665
|
embeds?: Array<Embed> | null;
|
667
666
|
flags?: MessageFlags | null;
|
668
667
|
allowedMentions?: AllowedMentions | null;
|
669
|
-
components?: Array<
|
670
|
-
files?: Array<
|
668
|
+
components?: Array<MessageTopLevelComponent> | null;
|
669
|
+
files?: Array<FileData> | null;
|
671
670
|
attachments?: Array<Attachment> | null;
|
672
671
|
}): Promise<Message>;
|
673
672
|
/** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */
|
@@ -680,8 +679,8 @@ export declare class Client extends EventEmitter {
|
|
680
679
|
content?: string | null;
|
681
680
|
embeds?: Array<Embed> | null;
|
682
681
|
allowedMentions?: AllowedMentions | null;
|
683
|
-
components?: Array<
|
684
|
-
files?: Array<
|
682
|
+
components?: Array<MessageTopLevelComponent> | null;
|
683
|
+
files?: Array<FileData> | null;
|
685
684
|
attachments?: Array<Partial<Attachment>> | null;
|
686
685
|
poll?: PollCreateParams | null;
|
687
686
|
threadID?: snowflake;
|
@@ -691,8 +690,8 @@ export declare class Client extends EventEmitter {
|
|
691
690
|
content?: string | null;
|
692
691
|
embeds?: Array<Embed> | null;
|
693
692
|
allowedMentions?: AllowedMentions | null;
|
694
|
-
components?: Array<
|
695
|
-
files?: Array<
|
693
|
+
components?: Array<MessageTopLevelComponent> | null;
|
694
|
+
files?: Array<FileData> | null;
|
696
695
|
attachments?: Array<Partial<Attachment>> | null;
|
697
696
|
poll?: PollCreateParams | null;
|
698
697
|
threadID?: snowflake;
|
@@ -713,8 +712,8 @@ export declare class Client extends EventEmitter {
|
|
713
712
|
content?: string | null;
|
714
713
|
embeds?: Array<Embed> | null;
|
715
714
|
allowedMentions?: AllowedMentions | null;
|
716
|
-
components?: Array<
|
717
|
-
files?: Array<
|
715
|
+
components?: Array<MessageTopLevelComponent> | null;
|
716
|
+
files?: Array<FileData> | null;
|
718
717
|
attachments?: Array<Partial<Attachment>> | null;
|
719
718
|
poll?: PollCreateParams | null;
|
720
719
|
threadID?: snowflake;
|
@@ -735,8 +734,8 @@ export declare class Client extends EventEmitter {
|
|
735
734
|
tts?: boolean;
|
736
735
|
embeds?: Array<Embed>;
|
737
736
|
allowedMentions?: AllowedMentions;
|
738
|
-
components?: Array<
|
739
|
-
files?: Array<
|
737
|
+
components?: Array<MessageTopLevelComponent>;
|
738
|
+
files?: Array<FileData>;
|
740
739
|
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
741
740
|
flags?: MessageFlags;
|
742
741
|
threadName?: string;
|
@@ -889,7 +888,10 @@ export declare class Client extends EventEmitter {
|
|
889
888
|
/** https://discord.com/developers/docs/resources/guild#get-guild-member */
|
890
889
|
getGuildMember(guildID: snowflake, userID: snowflake): Promise<GuildMember>;
|
891
890
|
/** https://discord.com/developers/docs/resources/guild#list-guild-members */
|
892
|
-
getGuildMembers(guildID: snowflake
|
891
|
+
getGuildMembers(guildID: snowflake, options: {
|
892
|
+
limit?: number;
|
893
|
+
after?: snowflake;
|
894
|
+
}): Promise<Array<GuildMember>>;
|
893
895
|
/** https://discord.com/developers/docs/resources/guild#get-guild-onboarding */
|
894
896
|
getGuildOnboarding(guildID: snowflake): Promise<GuildOnboarding>;
|
895
897
|
/** https://discord.com/developers/docs/resources/guild#get-guild-preview */
|
package/dist/lib/Client.js
CHANGED
@@ -1926,8 +1926,13 @@ class Client extends node_events_1.default {
|
|
1926
1926
|
return transformers_1.Guilds.guildMemberFromRaw(response);
|
1927
1927
|
}
|
1928
1928
|
/** https://discord.com/developers/docs/resources/guild#list-guild-members */
|
1929
|
-
async getGuildMembers(guildID) {
|
1930
|
-
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembers(guildID)
|
1929
|
+
async getGuildMembers(guildID, options) {
|
1930
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembers(guildID), {
|
1931
|
+
query: {
|
1932
|
+
limit: options.limit,
|
1933
|
+
after: options.after,
|
1934
|
+
},
|
1935
|
+
});
|
1931
1936
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
1932
1937
|
}
|
1933
1938
|
/** https://discord.com/developers/docs/resources/guild#get-guild-onboarding */
|
package/dist/lib/constants.d.ts
CHANGED
@@ -22,6 +22,7 @@ export declare enum ImageFormats {
|
|
22
22
|
PNG = "png",
|
23
23
|
WebP = "webp",
|
24
24
|
GIF = "gif",
|
25
|
+
AVIF = "avif",
|
25
26
|
Lottie = "json"
|
26
27
|
}
|
27
28
|
/** https://discord.com/developers/docs/reference#locales */
|
@@ -114,7 +115,19 @@ export declare enum ComponentTypes {
|
|
114
115
|
UserSelect = 5,
|
115
116
|
RoleSelect = 6,
|
116
117
|
MentionableSelect = 7,
|
117
|
-
ChannelSelect = 8
|
118
|
+
ChannelSelect = 8,
|
119
|
+
Section = 9,
|
120
|
+
TextDisplay = 10,
|
121
|
+
Thumbnail = 11,
|
122
|
+
MediaGallery = 12,
|
123
|
+
File = 13,
|
124
|
+
Separator = 14,
|
125
|
+
Container = 17
|
126
|
+
}
|
127
|
+
/** https://discord.com/developers/docs/components/reference#separator-separator-structure */
|
128
|
+
export declare enum SeparatorSpacing {
|
129
|
+
Small = 1,
|
130
|
+
Large = 2
|
118
131
|
}
|
119
132
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
120
133
|
export declare enum InteractionCallbackType {
|
@@ -147,6 +160,12 @@ export declare enum ApplicationIntegrationTypes {
|
|
147
160
|
GuildInstall = 0,
|
148
161
|
UserInstall = 1
|
149
162
|
}
|
163
|
+
/** https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status */
|
164
|
+
export declare enum ApplicationEventWebhookStatus {
|
165
|
+
Disabled = 1,
|
166
|
+
Enabled = 2,
|
167
|
+
DisabledByDiscord = 3
|
168
|
+
}
|
150
169
|
/** https://discord.com/developers/docs/resources/application#application-object-application-flags */
|
151
170
|
export declare enum ApplicationFlags {
|
152
171
|
ApplicationAutoModerationRuleCreateBadge = 64,
|
@@ -550,7 +569,8 @@ export declare enum MessageFlags {
|
|
550
569
|
FailedToMentionSomeRolesInThread = 256,
|
551
570
|
SuppressNotifications = 4096,
|
552
571
|
IsVoiceMessage = 8192,
|
553
|
-
HasSnapshot = 16384
|
572
|
+
HasSnapshot = 16384,
|
573
|
+
IsComponentsV2 = 32768
|
554
574
|
}
|
555
575
|
/** https://discord.com/developers/docs/resources/message#message-reference-types */
|
556
576
|
export declare enum MessageReferenceTypes {
|
package/dist/lib/constants.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.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 = void 0;
|
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.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.SeparatorSpacing = exports.ComponentTypes = 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.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) {
|
@@ -29,6 +29,7 @@ var ImageFormats;
|
|
29
29
|
ImageFormats["PNG"] = "png";
|
30
30
|
ImageFormats["WebP"] = "webp";
|
31
31
|
ImageFormats["GIF"] = "gif";
|
32
|
+
ImageFormats["AVIF"] = "avif";
|
32
33
|
ImageFormats["Lottie"] = "json";
|
33
34
|
})(ImageFormats || (exports.ImageFormats = ImageFormats = {}));
|
34
35
|
/** https://discord.com/developers/docs/reference#locales */
|
@@ -130,7 +131,20 @@ var ComponentTypes;
|
|
130
131
|
ComponentTypes[ComponentTypes["RoleSelect"] = 6] = "RoleSelect";
|
131
132
|
ComponentTypes[ComponentTypes["MentionableSelect"] = 7] = "MentionableSelect";
|
132
133
|
ComponentTypes[ComponentTypes["ChannelSelect"] = 8] = "ChannelSelect";
|
134
|
+
ComponentTypes[ComponentTypes["Section"] = 9] = "Section";
|
135
|
+
ComponentTypes[ComponentTypes["TextDisplay"] = 10] = "TextDisplay";
|
136
|
+
ComponentTypes[ComponentTypes["Thumbnail"] = 11] = "Thumbnail";
|
137
|
+
ComponentTypes[ComponentTypes["MediaGallery"] = 12] = "MediaGallery";
|
138
|
+
ComponentTypes[ComponentTypes["File"] = 13] = "File";
|
139
|
+
ComponentTypes[ComponentTypes["Separator"] = 14] = "Separator";
|
140
|
+
ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
|
133
141
|
})(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
|
142
|
+
/** https://discord.com/developers/docs/components/reference#separator-separator-structure */
|
143
|
+
var SeparatorSpacing;
|
144
|
+
(function (SeparatorSpacing) {
|
145
|
+
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
146
|
+
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
147
|
+
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
134
148
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type */
|
135
149
|
var InteractionCallbackType;
|
136
150
|
(function (InteractionCallbackType) {
|
@@ -166,6 +180,13 @@ var ApplicationIntegrationTypes;
|
|
166
180
|
ApplicationIntegrationTypes[ApplicationIntegrationTypes["GuildInstall"] = 0] = "GuildInstall";
|
167
181
|
ApplicationIntegrationTypes[ApplicationIntegrationTypes["UserInstall"] = 1] = "UserInstall";
|
168
182
|
})(ApplicationIntegrationTypes || (exports.ApplicationIntegrationTypes = ApplicationIntegrationTypes = {}));
|
183
|
+
/** https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status */
|
184
|
+
var ApplicationEventWebhookStatus;
|
185
|
+
(function (ApplicationEventWebhookStatus) {
|
186
|
+
ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["Disabled"] = 1] = "Disabled";
|
187
|
+
ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["Enabled"] = 2] = "Enabled";
|
188
|
+
ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["DisabledByDiscord"] = 3] = "DisabledByDiscord";
|
189
|
+
})(ApplicationEventWebhookStatus || (exports.ApplicationEventWebhookStatus = ApplicationEventWebhookStatus = {}));
|
169
190
|
/** https://discord.com/developers/docs/resources/application#application-object-application-flags */
|
170
191
|
var ApplicationFlags;
|
171
192
|
(function (ApplicationFlags) {
|
@@ -608,6 +629,7 @@ var MessageFlags;
|
|
608
629
|
MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
|
609
630
|
MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
|
610
631
|
MessageFlags[MessageFlags["HasSnapshot"] = 16384] = "HasSnapshot";
|
632
|
+
MessageFlags[MessageFlags["IsComponentsV2"] = 32768] = "IsComponentsV2";
|
611
633
|
})(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
|
612
634
|
/** https://discord.com/developers/docs/resources/message#message-reference-types */
|
613
635
|
var MessageReferenceTypes;
|
@@ -11,7 +11,7 @@ export declare enum RESTMethods {
|
|
11
11
|
export interface RequestData {
|
12
12
|
json?: unknown;
|
13
13
|
form?: FormData;
|
14
|
-
files?: Array<
|
14
|
+
files?: Array<FileData> | null;
|
15
15
|
reason?: string;
|
16
16
|
query?: Record<string, any>;
|
17
17
|
authorization?: boolean;
|
@@ -22,7 +22,7 @@ export interface ErrorResponse {
|
|
22
22
|
message: string;
|
23
23
|
errors: Record<string, unknown>;
|
24
24
|
}
|
25
|
-
export interface
|
25
|
+
export interface FileData {
|
26
26
|
contents: Buffer;
|
27
27
|
name: string;
|
28
28
|
}
|
@@ -31,9 +31,13 @@ class Applications {
|
|
31
31
|
flags: application.flags,
|
32
32
|
approximateGuildCount: application.approximate_guild_count,
|
33
33
|
approximateUserInstallCount: application.approximate_user_install_count,
|
34
|
+
approximateUserAuthorizationCount: application.approximate_user_authorization_count,
|
34
35
|
redirectURIs: application.redirect_uris,
|
35
36
|
interactionsEndpointURL: application.interactions_endpoint_url,
|
36
37
|
roleConnectionsVerificationURL: application.role_connections_verification_url,
|
38
|
+
eventWebhooksURL: application.event_webhooks_url,
|
39
|
+
eventWebhooksStatus: application.event_webhooks_status,
|
40
|
+
eventWebhooksTypes: application.event_webhooks_types,
|
37
41
|
tags: application.tags,
|
38
42
|
installParams: application.install_params,
|
39
43
|
integrationTypesConfig: application.integration_types_config !== undefined
|
@@ -77,9 +81,13 @@ class Applications {
|
|
77
81
|
flags: application.flags,
|
78
82
|
approximate_guild_count: application.approximateGuildCount,
|
79
83
|
approximate_user_install_count: application.approximateUserInstallCount,
|
84
|
+
approximate_user_authorization_count: application.approximateUserAuthorizationCount,
|
80
85
|
redirect_uris: application.redirectURIs,
|
81
86
|
interactions_endpoint_url: application.interactionsEndpointURL,
|
82
87
|
role_connections_verification_url: application.roleConnectionsVerificationURL,
|
88
|
+
event_webhooks_url: application.eventWebhooksURL,
|
89
|
+
event_webhooks_status: application.eventWebhooksStatus,
|
90
|
+
event_webhooks_types: application.eventWebhooksTypes,
|
83
91
|
tags: application.tags,
|
84
92
|
install_params: application.installParams,
|
85
93
|
integration_types_config: application.integrationTypesConfig !== undefined
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, SelectMenu, RawSelectMenu, MediaGallery, RawMediaGallery } from "../types/message-components.js";
|
2
|
+
export declare class Components {
|
3
|
+
static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
|
4
|
+
static actionRowToRaw(actionRow: ActionRow): RawActionRow;
|
5
|
+
static buttonFromRaw(button: RawButton): Button;
|
6
|
+
static buttonToRaw(button: Button): RawButton;
|
7
|
+
static containerFromRaw(container: RawContainer): Container;
|
8
|
+
static containerToRaw(container: Container): RawContainer;
|
9
|
+
static fileFromRaw(file: RawFile): File;
|
10
|
+
static fileToRaw(file: File): RawFile;
|
11
|
+
static mediaGalleryFromRaw(mediaGallery: RawMediaGallery): MediaGallery;
|
12
|
+
static mediaGalleryToRaw(mediaGallery: MediaGallery): RawMediaGallery;
|
13
|
+
static sectionFromRaw(section: RawSection): Section;
|
14
|
+
static sectionToRaw(section: Section): RawSection;
|
15
|
+
static selectMenuFromRaw(selectMenu: RawSelectMenu): SelectMenu;
|
16
|
+
static selectMenuToRaw(selectMenu: SelectMenu): RawSelectMenu;
|
17
|
+
static separatorFromRaw(separator: RawSeparator): Separator;
|
18
|
+
static separatorToRaw(separator: Separator): RawSeparator;
|
19
|
+
static textDisplayFromRaw(textDisplay: RawTextDisplay): TextDisplay;
|
20
|
+
static textDisplayToRaw(textDisplay: TextDisplay): RawTextDisplay;
|
21
|
+
static textInputFromRaw(textInput: RawTextInput): TextInput;
|
22
|
+
static textInputToRaw(textInput: TextInput): RawTextInput;
|
23
|
+
static thumbnailFromRaw(thumbnail: RawThumbnail): Thumbnail;
|
24
|
+
static thumbnailToRaw(thumbnail: Thumbnail): RawThumbnail;
|
25
|
+
static unfurledMediaItemFromRaw(unfurledMediaItem: RawUnfurledMediaItem): UnfurledMediaItem;
|
26
|
+
static unfurledMediaItemToRaw(unfurledMediaItem: UnfurledMediaItem): RawUnfurledMediaItem;
|
27
|
+
}
|