disgroove 2.2.4-dev.311ef6d → 2.2.4-dev.618a556
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 +11 -1
- package/dist/lib/Client.js +34 -0
- package/dist/lib/constants.d.ts +32 -0
- package/dist/lib/constants.js +37 -2
- 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/guild-scheduled-event.d.ts +37 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/lib/Client.d.ts
CHANGED
@@ -14,7 +14,7 @@ import type { Emoji } from "./types/emoji";
|
|
14
14
|
import type { Entitlement } from "./types/entitlements";
|
15
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";
|
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;
|
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;
|
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,9 @@ 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
|
+
? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
|
1163
|
+
: undefined,
|
1158
1164
|
},
|
1159
1165
|
reason,
|
1160
1166
|
});
|
@@ -1636,6 +1642,11 @@ class Client extends node_events_1.default {
|
|
1636
1642
|
visibility: connection.visibility,
|
1637
1643
|
}));
|
1638
1644
|
}
|
1645
|
+
/** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
|
1646
|
+
async getCurrentUserVoiceState(guildID) {
|
1647
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
|
1648
|
+
return transformers_1.Voice.voiceStateFromRaw(response);
|
1649
|
+
}
|
1639
1650
|
/** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
|
1640
1651
|
async getEntitlements(applicationID, options) {
|
1641
1652
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
|
@@ -1842,6 +1853,11 @@ class Client extends node_events_1.default {
|
|
1842
1853
|
},
|
1843
1854
|
});
|
1844
1855
|
}
|
1856
|
+
/** https://discord.com/developers/docs/resources/guild#get-guild-role */
|
1857
|
+
async getGuildRole(guildID, roleID) {
|
1858
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildID, roleID));
|
1859
|
+
return transformers_1.Roles.roleFromRaw(response);
|
1860
|
+
}
|
1845
1861
|
/** https://discord.com/developers/docs/resources/guild#get-guild-roles */
|
1846
1862
|
async getGuildRoles(guildID) {
|
1847
1863
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
|
@@ -2065,6 +2081,19 @@ class Client extends node_events_1.default {
|
|
2065
2081
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelID));
|
2066
2082
|
return transformers_1.StageInstances.stageInstanceFromRaw(response);
|
2067
2083
|
}
|
2084
|
+
/** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
|
2085
|
+
async getStickerPack(packID) {
|
2086
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packID));
|
2087
|
+
return {
|
2088
|
+
id: response.id,
|
2089
|
+
stickers: response.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
|
2090
|
+
name: response.name,
|
2091
|
+
skuID: response.sku_id,
|
2092
|
+
coverStickerID: response.cover_sticker_id,
|
2093
|
+
description: response.description,
|
2094
|
+
bannerAssetID: response.banner_asset_id,
|
2095
|
+
};
|
2096
|
+
}
|
2068
2097
|
/** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
|
2069
2098
|
async getStickerPacks() {
|
2070
2099
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPacks());
|
@@ -2116,6 +2145,11 @@ class Client extends node_events_1.default {
|
|
2116
2145
|
custom: voiceRegion.custom,
|
2117
2146
|
}));
|
2118
2147
|
}
|
2148
|
+
/** https://discord.com/developers/docs/resources/voice#get-user-voice-state */
|
2149
|
+
async getUserVoiceState(guildID, userID) {
|
2150
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID, userID));
|
2151
|
+
return transformers_1.Voice.voiceStateFromRaw(response);
|
2152
|
+
}
|
2119
2153
|
/** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
|
2120
2154
|
async getWebhookMessage(webhookID, webhookToken, messageID, options) {
|
2121
2155
|
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,
|
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.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageReferenceTypes = exports.MessageFlags = void 0;
|
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) {
|
@@ -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 { 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
|
+
}
|
package/dist/package.json
CHANGED