disgroove 2.2.4-dev.311ef6d → 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 +13 -2
- package/dist/lib/Client.js +36 -0
- package/dist/lib/constants.d.ts +51 -1
- package/dist/lib/constants.js +57 -2
- package/dist/lib/gateway/Shard.js +14 -0
- package/dist/lib/rest/Endpoints.d.ts +2 -1
- package/dist/lib/rest/Endpoints.js +7 -3
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/GuildScheduledEvents.d.ts +3 -1
- package/dist/lib/transformers/GuildScheduledEvents.js +34 -0
- package/dist/lib/types/application.d.ts +2 -0
- package/dist/lib/types/gateway-events.d.ts +22 -1
- package/dist/lib/types/guild-scheduled-event.d.ts +37 -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,9 +12,9 @@ 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
|
-
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata } from "./types/guild-scheduled-event";
|
17
|
+
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
18
18
|
import type { GuildTemplate } from "./types/guild-template";
|
19
19
|
import type { Interaction, InteractionResponse } from "./types/interaction";
|
20
20
|
import type { Invite } from "./types/invite";
|
@@ -275,6 +275,7 @@ export declare class Client extends EventEmitter {
|
|
275
275
|
description?: string;
|
276
276
|
entityType: GuildScheduledEventEntityTypes;
|
277
277
|
image?: string;
|
278
|
+
recurrenceRule?: GuildScheduledEventRecurrenceRule;
|
278
279
|
}, reason?: string): Promise<GuildScheduledEvent>;
|
279
280
|
/** https://discord.com/developers/docs/resources/sticker#create-guild-sticker */
|
280
281
|
createGuildSticker(guildID: snowflake, options: {
|
@@ -607,6 +608,7 @@ export declare class Client extends EventEmitter {
|
|
607
608
|
entityType?: GuildScheduledEventEntityTypes;
|
608
609
|
status?: GuildScheduledEventStatus;
|
609
610
|
image?: string;
|
611
|
+
recurrenceRule?: GuildScheduledEventRecurrenceRule | null;
|
610
612
|
}, reason?: string): Promise<GuildScheduledEvent>;
|
611
613
|
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
|
612
614
|
editGuildSticker(guildID: snowflake, stickerID: snowflake, options: {
|
@@ -776,6 +778,8 @@ export declare class Client extends EventEmitter {
|
|
776
778
|
getCurrentGuildMember(guildID: snowflake): Promise<GuildMember>;
|
777
779
|
/** https://discord.com/developers/docs/resources/user#get-current-user-connections */
|
778
780
|
getCurrentUserConnections(): Promise<Array<Connection>>;
|
781
|
+
/** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
|
782
|
+
getCurrentUserVoiceState(guildID: snowflake): Promise<VoiceState>;
|
779
783
|
/** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
|
780
784
|
getEntitlements(applicationID: snowflake, options?: {
|
781
785
|
userID?: snowflake;
|
@@ -857,6 +861,8 @@ export declare class Client extends EventEmitter {
|
|
857
861
|
}): Promise<{
|
858
862
|
pruned: number;
|
859
863
|
}>;
|
864
|
+
/** https://discord.com/developers/docs/resources/guild#get-guild-role */
|
865
|
+
getGuildRole(guildID: snowflake, roleID: snowflake): Promise<Role>;
|
860
866
|
/** https://discord.com/developers/docs/resources/guild#get-guild-roles */
|
861
867
|
getGuildRoles(guildID: snowflake): Promise<Array<Role>>;
|
862
868
|
/** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
|
@@ -955,6 +961,8 @@ export declare class Client extends EventEmitter {
|
|
955
961
|
getSKUs(applicationID: snowflake): Promise<Array<SKU>>;
|
956
962
|
/** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
|
957
963
|
getStageInstance(channelID: snowflake): Promise<StageInstance>;
|
964
|
+
/** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
|
965
|
+
getStickerPack(packID: snowflake): Promise<StickerPack>;
|
958
966
|
/** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
|
959
967
|
getStickerPacks(): Promise<{
|
960
968
|
stickerPacks: Array<StickerPack>;
|
@@ -973,6 +981,8 @@ export declare class Client extends EventEmitter {
|
|
973
981
|
getUser(userID?: snowflake): Promise<User>;
|
974
982
|
/** https://discord.com/developers/docs/resources/voice#list-voice-regions */
|
975
983
|
getVoiceRegions(): Promise<Array<VoiceRegion>>;
|
984
|
+
/** https://discord.com/developers/docs/resources/voice#get-user-voice-state */
|
985
|
+
getUserVoiceState(guildID: snowflake, userID: snowflake): Promise<VoiceState>;
|
976
986
|
/** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
|
977
987
|
getWebhookMessage(webhookID: snowflake, webhookToken: string, messageID: snowflake, options?: {
|
978
988
|
threadID?: snowflake;
|
@@ -1129,6 +1139,7 @@ export interface ClientEvents {
|
|
1129
1139
|
stageInstanceDelete: [stageInstance: StageInstance];
|
1130
1140
|
typingStart: [typing: TypingStartEventFields];
|
1131
1141
|
userUpdate: [user: User];
|
1142
|
+
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEventFields];
|
1132
1143
|
voiceStateUpdate: [voiceState: VoiceState];
|
1133
1144
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEventFields];
|
1134
1145
|
webhooksUpdate: [channelID: snowflake, guildID: snowflake];
|
package/dist/lib/Client.js
CHANGED
@@ -397,6 +397,9 @@ class Client extends node_events_1.default {
|
|
397
397
|
description: options.description,
|
398
398
|
entity_type: options.entityType,
|
399
399
|
image: options.image,
|
400
|
+
recurrence_rule: options.recurrenceRule !== undefined
|
401
|
+
? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
|
402
|
+
: undefined,
|
400
403
|
},
|
401
404
|
reason,
|
402
405
|
});
|
@@ -1155,6 +1158,11 @@ class Client extends node_events_1.default {
|
|
1155
1158
|
entityType: options.entityType,
|
1156
1159
|
status: options.status,
|
1157
1160
|
image: options.image,
|
1161
|
+
recurrence_rule: options.recurrenceRule !== undefined
|
1162
|
+
? options.recurrenceRule !== null
|
1163
|
+
? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
|
1164
|
+
: null
|
1165
|
+
: undefined,
|
1158
1166
|
},
|
1159
1167
|
reason,
|
1160
1168
|
});
|
@@ -1636,6 +1644,11 @@ class Client extends node_events_1.default {
|
|
1636
1644
|
visibility: connection.visibility,
|
1637
1645
|
}));
|
1638
1646
|
}
|
1647
|
+
/** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
|
1648
|
+
async getCurrentUserVoiceState(guildID) {
|
1649
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
|
1650
|
+
return transformers_1.Voice.voiceStateFromRaw(response);
|
1651
|
+
}
|
1639
1652
|
/** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
|
1640
1653
|
async getEntitlements(applicationID, options) {
|
1641
1654
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
|
@@ -1842,6 +1855,11 @@ class Client extends node_events_1.default {
|
|
1842
1855
|
},
|
1843
1856
|
});
|
1844
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
|
+
}
|
1845
1863
|
/** https://discord.com/developers/docs/resources/guild#get-guild-roles */
|
1846
1864
|
async getGuildRoles(guildID) {
|
1847
1865
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
|
@@ -2065,6 +2083,19 @@ class Client extends node_events_1.default {
|
|
2065
2083
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelID));
|
2066
2084
|
return transformers_1.StageInstances.stageInstanceFromRaw(response);
|
2067
2085
|
}
|
2086
|
+
/** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
|
2087
|
+
async getStickerPack(packID) {
|
2088
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packID));
|
2089
|
+
return {
|
2090
|
+
id: response.id,
|
2091
|
+
stickers: response.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
|
2092
|
+
name: response.name,
|
2093
|
+
skuID: response.sku_id,
|
2094
|
+
coverStickerID: response.cover_sticker_id,
|
2095
|
+
description: response.description,
|
2096
|
+
bannerAssetID: response.banner_asset_id,
|
2097
|
+
};
|
2098
|
+
}
|
2068
2099
|
/** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
|
2069
2100
|
async getStickerPacks() {
|
2070
2101
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPacks());
|
@@ -2116,6 +2147,11 @@ class Client extends node_events_1.default {
|
|
2116
2147
|
custom: voiceRegion.custom,
|
2117
2148
|
}));
|
2118
2149
|
}
|
2150
|
+
/** https://discord.com/developers/docs/resources/voice#get-user-voice-state */
|
2151
|
+
async getUserVoiceState(guildID, userID) {
|
2152
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID, userID));
|
2153
|
+
return transformers_1.Voice.voiceStateFromRaw(response);
|
2154
|
+
}
|
2119
2155
|
/** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
|
2120
2156
|
async getWebhookMessage(webhookID, webhookToken, messageID, options) {
|
2121
2157
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(webhookID, webhookToken, messageID), {
|
package/dist/lib/constants.d.ts
CHANGED
@@ -424,6 +424,38 @@ export declare enum GuildScheduledEventStatus {
|
|
424
424
|
Completed = 3,
|
425
425
|
Canceled = 4
|
426
426
|
}
|
427
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency */
|
428
|
+
export declare enum GuildScheduledEventRecurrenceRuleFrequency {
|
429
|
+
Yearly = 0,
|
430
|
+
Monthly = 1,
|
431
|
+
Weekly = 2,
|
432
|
+
Daily = 3
|
433
|
+
}
|
434
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday */
|
435
|
+
export declare enum GuildScheduledEventRecurrenceRuleWeekday {
|
436
|
+
Monday = 0,
|
437
|
+
Tuesday = 1,
|
438
|
+
Wednesday = 2,
|
439
|
+
Thursday = 3,
|
440
|
+
Friday = 4,
|
441
|
+
Saturday = 5,
|
442
|
+
Sunday = 6
|
443
|
+
}
|
444
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month */
|
445
|
+
export declare enum GuildScheduledEventRecurrenceRuleMonth {
|
446
|
+
January = 1,
|
447
|
+
February = 2,
|
448
|
+
March = 3,
|
449
|
+
April = 4,
|
450
|
+
May = 5,
|
451
|
+
June = 6,
|
452
|
+
July = 7,
|
453
|
+
August = 8,
|
454
|
+
September = 9,
|
455
|
+
October = 10,
|
456
|
+
November = 11,
|
457
|
+
Dicember = 12
|
458
|
+
}
|
427
459
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-types */
|
428
460
|
export declare enum InviteTypes {
|
429
461
|
Guild = 0,
|
@@ -472,7 +504,8 @@ export declare enum MessageTypes {
|
|
472
504
|
GuildIncidentAlertModeDisabled = 37,
|
473
505
|
GuildIncidentReportRaid = 38,
|
474
506
|
GuildIncidentReportFalseAlarm = 39,
|
475
|
-
PurchaseNotification = 44
|
507
|
+
PurchaseNotification = 44,
|
508
|
+
PollResult = 46
|
476
509
|
}
|
477
510
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
|
478
511
|
export declare enum MessageActivityTypes {
|
@@ -500,6 +533,16 @@ export declare enum MessageReferenceTypes {
|
|
500
533
|
Default = 0,
|
501
534
|
Forward = 1
|
502
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
|
+
}
|
503
546
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
504
547
|
export declare enum AttachmentFlags {
|
505
548
|
IsRemix = 4
|
@@ -699,6 +742,7 @@ export declare enum GatewayEvents {
|
|
699
742
|
StageInstanceDelete = "STAGE_INSTANCE_DELETE",
|
700
743
|
TypingStart = "TYPING_START",
|
701
744
|
UserUpdate = "USER_UPDATE",
|
745
|
+
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
702
746
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
703
747
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
704
748
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
@@ -726,6 +770,11 @@ export declare enum ActivityFlags {
|
|
726
770
|
PartyPrivacyVoiceChannel = 128,
|
727
771
|
Embedded = 256
|
728
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
|
+
}
|
729
778
|
/** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
|
730
779
|
export declare enum OAuth2Scopes {
|
731
780
|
ActivitiesRead = "activities.read",
|
@@ -866,6 +915,7 @@ export declare enum JSONErrorCodes {
|
|
866
915
|
UnknownGuildTemplate = 10057,
|
867
916
|
UnknownDiscoverableServerCategory = 10059,
|
868
917
|
UnknownSticker = 10060,
|
918
|
+
UnknownStickerPack = 10061,
|
869
919
|
UnknownInteraction = 10062,
|
870
920
|
UnknownApplicationCommand = 10063,
|
871
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
|
-
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 = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = void 0;
|
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.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) {
|
@@ -471,6 +471,41 @@ var GuildScheduledEventStatus;
|
|
471
471
|
GuildScheduledEventStatus[GuildScheduledEventStatus["Completed"] = 3] = "Completed";
|
472
472
|
GuildScheduledEventStatus[GuildScheduledEventStatus["Canceled"] = 4] = "Canceled";
|
473
473
|
})(GuildScheduledEventStatus || (exports.GuildScheduledEventStatus = GuildScheduledEventStatus = {}));
|
474
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency */
|
475
|
+
var GuildScheduledEventRecurrenceRuleFrequency;
|
476
|
+
(function (GuildScheduledEventRecurrenceRuleFrequency) {
|
477
|
+
GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Yearly"] = 0] = "Yearly";
|
478
|
+
GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Monthly"] = 1] = "Monthly";
|
479
|
+
GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Weekly"] = 2] = "Weekly";
|
480
|
+
GuildScheduledEventRecurrenceRuleFrequency[GuildScheduledEventRecurrenceRuleFrequency["Daily"] = 3] = "Daily";
|
481
|
+
})(GuildScheduledEventRecurrenceRuleFrequency || (exports.GuildScheduledEventRecurrenceRuleFrequency = GuildScheduledEventRecurrenceRuleFrequency = {}));
|
482
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday */
|
483
|
+
var GuildScheduledEventRecurrenceRuleWeekday;
|
484
|
+
(function (GuildScheduledEventRecurrenceRuleWeekday) {
|
485
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Monday"] = 0] = "Monday";
|
486
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Tuesday"] = 1] = "Tuesday";
|
487
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Wednesday"] = 2] = "Wednesday";
|
488
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Thursday"] = 3] = "Thursday";
|
489
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Friday"] = 4] = "Friday";
|
490
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Saturday"] = 5] = "Saturday";
|
491
|
+
GuildScheduledEventRecurrenceRuleWeekday[GuildScheduledEventRecurrenceRuleWeekday["Sunday"] = 6] = "Sunday";
|
492
|
+
})(GuildScheduledEventRecurrenceRuleWeekday || (exports.GuildScheduledEventRecurrenceRuleWeekday = GuildScheduledEventRecurrenceRuleWeekday = {}));
|
493
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month */
|
494
|
+
var GuildScheduledEventRecurrenceRuleMonth;
|
495
|
+
(function (GuildScheduledEventRecurrenceRuleMonth) {
|
496
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["January"] = 1] = "January";
|
497
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["February"] = 2] = "February";
|
498
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["March"] = 3] = "March";
|
499
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["April"] = 4] = "April";
|
500
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["May"] = 5] = "May";
|
501
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["June"] = 6] = "June";
|
502
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["July"] = 7] = "July";
|
503
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["August"] = 8] = "August";
|
504
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["September"] = 9] = "September";
|
505
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["October"] = 10] = "October";
|
506
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["November"] = 11] = "November";
|
507
|
+
GuildScheduledEventRecurrenceRuleMonth[GuildScheduledEventRecurrenceRuleMonth["Dicember"] = 12] = "Dicember";
|
508
|
+
})(GuildScheduledEventRecurrenceRuleMonth || (exports.GuildScheduledEventRecurrenceRuleMonth = GuildScheduledEventRecurrenceRuleMonth = {}));
|
474
509
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-types */
|
475
510
|
var InviteTypes;
|
476
511
|
(function (InviteTypes) {
|
@@ -523,6 +558,7 @@ var MessageTypes;
|
|
523
558
|
MessageTypes[MessageTypes["GuildIncidentReportRaid"] = 38] = "GuildIncidentReportRaid";
|
524
559
|
MessageTypes[MessageTypes["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm";
|
525
560
|
MessageTypes[MessageTypes["PurchaseNotification"] = 44] = "PurchaseNotification";
|
561
|
+
MessageTypes[MessageTypes["PollResult"] = 46] = "PollResult";
|
526
562
|
})(MessageTypes || (exports.MessageTypes = MessageTypes = {}));
|
527
563
|
/** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
|
528
564
|
var MessageActivityTypes;
|
@@ -553,6 +589,17 @@ var MessageReferenceTypes;
|
|
553
589
|
MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
|
554
590
|
MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
|
555
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 = {}));
|
556
603
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
557
604
|
var AttachmentFlags;
|
558
605
|
(function (AttachmentFlags) {
|
@@ -768,6 +815,7 @@ var GatewayEvents;
|
|
768
815
|
GatewayEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
|
769
816
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
770
817
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
818
|
+
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
771
819
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
772
820
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
773
821
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
@@ -797,6 +845,12 @@ var ActivityFlags;
|
|
797
845
|
ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
|
798
846
|
ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
|
799
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 = {}));
|
800
854
|
/** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
|
801
855
|
var OAuth2Scopes;
|
802
856
|
(function (OAuth2Scopes) {
|
@@ -944,6 +998,7 @@ var JSONErrorCodes;
|
|
944
998
|
JSONErrorCodes[JSONErrorCodes["UnknownGuildTemplate"] = 10057] = "UnknownGuildTemplate";
|
945
999
|
JSONErrorCodes[JSONErrorCodes["UnknownDiscoverableServerCategory"] = 10059] = "UnknownDiscoverableServerCategory";
|
946
1000
|
JSONErrorCodes[JSONErrorCodes["UnknownSticker"] = 10060] = "UnknownSticker";
|
1001
|
+
JSONErrorCodes[JSONErrorCodes["UnknownStickerPack"] = 10061] = "UnknownStickerPack";
|
947
1002
|
JSONErrorCodes[JSONErrorCodes["UnknownInteraction"] = 10062] = "UnknownInteraction";
|
948
1003
|
JSONErrorCodes[JSONErrorCodes["UnknownApplicationCommand"] = 10063] = "UnknownApplicationCommand";
|
949
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;
|
@@ -85,6 +85,8 @@ export declare const guildApplicationCommandsPermissions: (applicationID: snowfl
|
|
85
85
|
export declare const webhook: (webhookID: snowflake, webhookToken?: string) => `webhooks/${string}`;
|
86
86
|
export declare const webhookMessage: (webhookID: snowflake, webhookToken: string, messageID?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
|
87
87
|
export declare const webhookPlatform: (webhookID: snowflake, webhookToken: string, platform: "github" | "slack") => `webhooks/${string}/${string}/github` | `webhooks/${string}/${string}/slack`;
|
88
|
+
export declare const stickerPack: (packID: snowflake) => `sticker-packs/${string}`;
|
89
|
+
export declare const stickerPacks: () => "sticker-packs";
|
88
90
|
export declare const gateway: () => "gateway";
|
89
91
|
export declare const gatewayBot: () => "gateway/bot";
|
90
92
|
export declare const oauth2Authorize: () => "oauth2/authorize";
|
@@ -97,5 +99,4 @@ export declare const invite: (code: string) => `invites/${string}`;
|
|
97
99
|
export declare const stageInstance: (channelID: snowflake) => `stage-instances/${string}`;
|
98
100
|
export declare const stageInstances: () => "stage-instances";
|
99
101
|
export declare const sticker: (stickerID: snowflake) => `stickers/${string}`;
|
100
|
-
export declare const stickerPacks: () => "sticker-packs";
|
101
102
|
export declare const voiceRegions: () => "voice/regions";
|
@@ -1,7 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
|
4
|
-
exports.
|
4
|
+
exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
|
5
|
+
exports.voiceRegions = void 0;
|
5
6
|
// Guilds
|
6
7
|
const guild = (guildID) => `guilds/${guildID}`;
|
7
8
|
exports.guild = guild;
|
@@ -189,6 +190,11 @@ const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `we
|
|
189
190
|
exports.webhookMessage = webhookMessage;
|
190
191
|
const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
|
191
192
|
exports.webhookPlatform = webhookPlatform;
|
193
|
+
// Sticker packs
|
194
|
+
const stickerPack = (packID) => `sticker-packs/${packID}`;
|
195
|
+
exports.stickerPack = stickerPack;
|
196
|
+
const stickerPacks = () => "sticker-packs";
|
197
|
+
exports.stickerPacks = stickerPacks;
|
192
198
|
// Gateway
|
193
199
|
const gateway = () => "gateway";
|
194
200
|
exports.gateway = gateway;
|
@@ -216,7 +222,5 @@ const stageInstances = () => "stage-instances";
|
|
216
222
|
exports.stageInstances = stageInstances;
|
217
223
|
const sticker = (stickerID) => `stickers/${stickerID}`;
|
218
224
|
exports.sticker = sticker;
|
219
|
-
const stickerPacks = () => "sticker-packs";
|
220
|
-
exports.stickerPacks = stickerPacks;
|
221
225
|
const voiceRegions = () => "voice/regions";
|
222
226
|
exports.voiceRegions = voiceRegions;
|
@@ -30,6 +30,7 @@ class Applications {
|
|
30
30
|
coverImage: application.cover_image,
|
31
31
|
flags: application.flags,
|
32
32
|
approximateGuildCount: application.approximate_guild_count,
|
33
|
+
approximateUserInstallCount: application.approximate_user_install_count,
|
33
34
|
redirectURIs: application.redirect_uris,
|
34
35
|
interactionsEndpointURL: application.interactions_endpoint_url,
|
35
36
|
roleConnectionsVerificationURL: application.role_connections_verification_url,
|
@@ -75,6 +76,7 @@ class Applications {
|
|
75
76
|
cover_image: application.coverImage,
|
76
77
|
flags: application.flags,
|
77
78
|
approximate_guild_count: application.approximateGuildCount,
|
79
|
+
approximate_user_install_count: application.approximateUserInstallCount,
|
78
80
|
redirect_uris: application.redirectURIs,
|
79
81
|
interactions_endpoint_url: application.interactionsEndpointURL,
|
80
82
|
role_connections_verification_url: application.roleConnectionsVerificationURL,
|
@@ -1,5 +1,7 @@
|
|
1
|
-
import type { RawGuildScheduledEvent, GuildScheduledEvent } from "../types/guild-scheduled-event";
|
1
|
+
import type { RawGuildScheduledEvent, GuildScheduledEvent, RawGuildScheduledEventRecurrenceRule, GuildScheduledEventRecurrenceRule } from "../types/guild-scheduled-event";
|
2
2
|
export declare class GuildScheduledEvents {
|
3
|
+
static guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEventRecurrenceRule: RawGuildScheduledEventRecurrenceRule): GuildScheduledEventRecurrenceRule;
|
4
|
+
static guildScheduledEventRecurrenceRuleToRaw(guildScheduledEventRecurrenceRule: GuildScheduledEventRecurrenceRule): RawGuildScheduledEventRecurrenceRule;
|
3
5
|
static guildScheduledEventFromRaw(guildScheduledEvent: RawGuildScheduledEvent): GuildScheduledEvent;
|
4
6
|
static guildScheduledEventToRaw(guildScheduledEvent: GuildScheduledEvent): RawGuildScheduledEvent;
|
5
7
|
}
|
@@ -3,6 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GuildScheduledEvents = void 0;
|
4
4
|
const Users_1 = require("./Users");
|
5
5
|
class GuildScheduledEvents {
|
6
|
+
static guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEventRecurrenceRule) {
|
7
|
+
return {
|
8
|
+
start: guildScheduledEventRecurrenceRule.start,
|
9
|
+
end: guildScheduledEventRecurrenceRule.end,
|
10
|
+
frequency: guildScheduledEventRecurrenceRule.frequency,
|
11
|
+
interval: guildScheduledEventRecurrenceRule.interval,
|
12
|
+
byWeekday: guildScheduledEventRecurrenceRule.by_weekday,
|
13
|
+
byNWeekday: guildScheduledEventRecurrenceRule.by_n_weekday,
|
14
|
+
byMonth: guildScheduledEventRecurrenceRule.by_month,
|
15
|
+
byMonthDay: guildScheduledEventRecurrenceRule.by_month_day,
|
16
|
+
byYearDay: guildScheduledEventRecurrenceRule.by_year_day,
|
17
|
+
count: guildScheduledEventRecurrenceRule.count,
|
18
|
+
};
|
19
|
+
}
|
20
|
+
static guildScheduledEventRecurrenceRuleToRaw(guildScheduledEventRecurrenceRule) {
|
21
|
+
return {
|
22
|
+
start: guildScheduledEventRecurrenceRule.start,
|
23
|
+
end: guildScheduledEventRecurrenceRule.end,
|
24
|
+
frequency: guildScheduledEventRecurrenceRule.frequency,
|
25
|
+
interval: guildScheduledEventRecurrenceRule.interval,
|
26
|
+
by_weekday: guildScheduledEventRecurrenceRule.byWeekday,
|
27
|
+
by_n_weekday: guildScheduledEventRecurrenceRule.byNWeekday,
|
28
|
+
by_month: guildScheduledEventRecurrenceRule.byMonth,
|
29
|
+
by_month_day: guildScheduledEventRecurrenceRule.byMonthDay,
|
30
|
+
by_year_day: guildScheduledEventRecurrenceRule.byYearDay,
|
31
|
+
count: guildScheduledEventRecurrenceRule.count,
|
32
|
+
};
|
33
|
+
}
|
6
34
|
static guildScheduledEventFromRaw(guildScheduledEvent) {
|
7
35
|
return {
|
8
36
|
id: guildScheduledEvent.id,
|
@@ -23,6 +51,9 @@ class GuildScheduledEvents {
|
|
23
51
|
: undefined,
|
24
52
|
userCount: guildScheduledEvent.user_count,
|
25
53
|
image: guildScheduledEvent.image,
|
54
|
+
recurrenceRule: guildScheduledEvent.reccurence_rule !== null
|
55
|
+
? GuildScheduledEvents.guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEvent.reccurence_rule)
|
56
|
+
: null,
|
26
57
|
};
|
27
58
|
}
|
28
59
|
static guildScheduledEventToRaw(guildScheduledEvent) {
|
@@ -45,6 +76,9 @@ class GuildScheduledEvents {
|
|
45
76
|
: undefined,
|
46
77
|
user_count: guildScheduledEvent.userCount,
|
47
78
|
image: guildScheduledEvent.image,
|
79
|
+
reccurence_rule: guildScheduledEvent.recurrenceRule !== null
|
80
|
+
? GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(guildScheduledEvent.recurrenceRule)
|
81
|
+
: null,
|
48
82
|
};
|
49
83
|
}
|
50
84
|
}
|
@@ -24,6 +24,7 @@ export interface RawApplication {
|
|
24
24
|
cover_image?: string;
|
25
25
|
flags?: ApplicationFlags;
|
26
26
|
approximate_guild_count?: number;
|
27
|
+
approximate_user_install_count?: number;
|
27
28
|
redirect_uris?: Array<string>;
|
28
29
|
interactions_endpoint_url?: string;
|
29
30
|
role_connections_verification_url?: string;
|
@@ -61,6 +62,7 @@ export interface Application {
|
|
61
62
|
coverImage?: string;
|
62
63
|
flags?: ApplicationFlags;
|
63
64
|
approximateGuildCount?: number;
|
65
|
+
approximateUserInstallCount?: number;
|
64
66
|
redirectURIs?: Array<string>;
|
65
67
|
interactionsEndpointURL?: string;
|
66
68
|
roleConnectionsVerificationURL?: string;
|
@@ -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 { GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, GuildScheduledEventEntityTypes } from "../constants";
|
1
|
+
import type { GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, GuildScheduledEventEntityTypes, GuildScheduledEventRecurrenceRuleFrequency, GuildScheduledEventRecurrenceRuleMonth, GuildScheduledEventRecurrenceRuleWeekday } from "../constants";
|
2
2
|
import type { snowflake, timestamp } from "./common";
|
3
3
|
import type { RawGuildMember, GuildMember } from "./guild";
|
4
4
|
import type { RawUser, User } from "./user";
|
@@ -20,6 +20,7 @@ export interface RawGuildScheduledEvent {
|
|
20
20
|
creator?: RawUser;
|
21
21
|
user_count?: number;
|
22
22
|
image?: string;
|
23
|
+
reccurence_rule: RawGuildScheduledEventRecurrenceRule | null;
|
23
24
|
}
|
24
25
|
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata */
|
25
26
|
export interface RawGuildScheduledEventEntityMetadata {
|
@@ -31,6 +32,24 @@ export interface RawGuildScheduledEventUser {
|
|
31
32
|
user: RawUser;
|
32
33
|
member?: RawGuildMember;
|
33
34
|
}
|
35
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure */
|
36
|
+
export interface RawGuildScheduledEventRecurrenceRule {
|
37
|
+
start: timestamp;
|
38
|
+
end: timestamp | null;
|
39
|
+
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
40
|
+
interval: number;
|
41
|
+
by_weekday: GuildScheduledEventRecurrenceRuleWeekday | null;
|
42
|
+
by_n_weekday: RawGuildScheduledEventRecurrenceRuleNWeekday | null;
|
43
|
+
by_month: GuildScheduledEventRecurrenceRuleMonth | null;
|
44
|
+
by_month_day: Array<number>;
|
45
|
+
by_year_day: Array<number>;
|
46
|
+
count: number | null;
|
47
|
+
}
|
48
|
+
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure */
|
49
|
+
export interface RawGuildScheduledEventRecurrenceRuleNWeekday {
|
50
|
+
n: number;
|
51
|
+
day: GuildScheduledEventRecurrenceRuleWeekday;
|
52
|
+
}
|
34
53
|
export interface GuildScheduledEvent {
|
35
54
|
id: snowflake;
|
36
55
|
guildID: snowflake;
|
@@ -48,6 +67,7 @@ export interface GuildScheduledEvent {
|
|
48
67
|
creator?: User;
|
49
68
|
userCount?: number;
|
50
69
|
image?: string;
|
70
|
+
recurrenceRule: GuildScheduledEventRecurrenceRule | null;
|
51
71
|
}
|
52
72
|
export interface GuildScheduledEventEntityMetadata {
|
53
73
|
location?: string;
|
@@ -57,3 +77,19 @@ export interface GuildScheduledEventUser {
|
|
57
77
|
user: User;
|
58
78
|
member?: GuildMember;
|
59
79
|
}
|
80
|
+
export interface GuildScheduledEventRecurrenceRule {
|
81
|
+
start: timestamp;
|
82
|
+
end: timestamp | null;
|
83
|
+
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
84
|
+
interval: number;
|
85
|
+
byWeekday: GuildScheduledEventRecurrenceRuleWeekday | null;
|
86
|
+
byNWeekday: GuildScheduledEventRecurrenceRuleNWeekday | null;
|
87
|
+
byMonth: GuildScheduledEventRecurrenceRuleMonth | null;
|
88
|
+
byMonthDay: Array<number>;
|
89
|
+
byYearDay: Array<number>;
|
90
|
+
count: number | null;
|
91
|
+
}
|
92
|
+
export interface GuildScheduledEventRecurrenceRuleNWeekday {
|
93
|
+
n: number;
|
94
|
+
day: GuildScheduledEventRecurrenceRuleWeekday;
|
95
|
+
}
|
@@ -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