disgroove 2.2.5-dev.86e9686 → 2.2.5-dev.8d93f59
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/README.md +1 -10
- package/dist/lib/Client.d.ts +11 -1
- package/dist/lib/Client.js +24 -0
- package/dist/lib/constants.d.ts +9 -2
- package/dist/lib/constants.js +7 -0
- package/dist/lib/rest/Endpoints.d.ts +1 -0
- package/dist/lib/rest/Endpoints.js +5 -3
- package/dist/lib/transformers/Guilds.js +16 -0
- package/dist/lib/transformers/Subscriptions.js +2 -0
- package/dist/lib/types/entitlements.d.ts +4 -4
- package/dist/lib/types/guild.d.ts +15 -0
- package/dist/lib/types/message.d.ts +8 -8
- package/dist/lib/types/subscription.d.ts +2 -0
- package/dist/package.json +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
@@ -7,14 +7,6 @@ A module to interface with Discord
|
|
7
7
|
- Flexible
|
8
8
|
- 100% coverage of the [Official Discord API Documentation](https://discord.com/developers/docs/intro)
|
9
9
|
|
10
|
-
## Installation
|
11
|
-
|
12
|
-
[**Node.js v18**](https://nodejs.org) or newer required
|
13
|
-
|
14
|
-
```
|
15
|
-
npm install disgroove
|
16
|
-
```
|
17
|
-
|
18
10
|
## Example
|
19
11
|
|
20
12
|
```js
|
@@ -53,5 +45,4 @@ client.on("interactionCreate", async (interaction) => {
|
|
53
45
|
client.connect();
|
54
46
|
```
|
55
47
|
|
56
|
-
More examples on the [GitHub repository](https://github.com/
|
57
|
-
For support and more join the [Discord server](https://discord.gg/kunfRQgRyD)
|
48
|
+
More examples on the [GitHub repository](https://github.com/sergiogotuzzo/disgroove/tree/main/examples)
|
package/dist/lib/Client.d.ts
CHANGED
@@ -14,7 +14,7 @@ import type { LocaleMap, snowflake, timestamp } from "./types/common";
|
|
14
14
|
import type { Emoji } from "./types/emoji";
|
15
15
|
import type { Entitlement } from "./types/entitlements";
|
16
16
|
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, GuildSoundboardSoundDeleteEventFields } from "./types/gateway-events";
|
17
|
-
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
|
17
|
+
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel, IncidentsData } from "./types/guild";
|
18
18
|
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
19
19
|
import type { GuildTemplate } from "./types/guild-template";
|
20
20
|
import type { Interaction, InteractionCallbackResponse, InteractionResponse } from "./types/interaction";
|
@@ -575,6 +575,11 @@ export declare class Client extends EventEmitter {
|
|
575
575
|
name?: string;
|
576
576
|
roles?: Array<snowflake> | null;
|
577
577
|
}, reason?: string): Promise<Emoji>;
|
578
|
+
/** https://discord.com/developers/docs/resources/emoji#modify-guild-incidents-actions */
|
579
|
+
editGuildIncidentsActions(guildID: snowflake, options?: {
|
580
|
+
invitesDisabledUntil?: timestamp | null;
|
581
|
+
dmsDisabledUntil?: timestamp | null;
|
582
|
+
}, reason?: string): Promise<IncidentsData>;
|
578
583
|
/** https://discord.com/developers/docs/resources/guild#modify-guild-member */
|
579
584
|
editGuildMember(guildID: snowflake, userID: snowflake, options: {
|
580
585
|
nick?: string | null;
|
@@ -712,6 +717,7 @@ export declare class Client extends EventEmitter {
|
|
712
717
|
attachments?: Array<Partial<Attachment>> | null;
|
713
718
|
poll?: PollCreateParams | null;
|
714
719
|
threadID?: snowflake;
|
720
|
+
withComponents?: boolean;
|
715
721
|
}): Promise<Message>;
|
716
722
|
/** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
|
717
723
|
editWebhookWithToken(webhookID: snowflake, webhookToken: string, options: {
|
@@ -737,6 +743,7 @@ export declare class Client extends EventEmitter {
|
|
737
743
|
poll?: PollCreateParams;
|
738
744
|
wait?: boolean;
|
739
745
|
threadID?: snowflake;
|
746
|
+
withComponents?: boolean;
|
740
747
|
}): Promise<Message | null>;
|
741
748
|
/**
|
742
749
|
* https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
|
@@ -809,6 +816,8 @@ export declare class Client extends EventEmitter {
|
|
809
816
|
getCurrentUserVoiceState(guildID: snowflake): Promise<VoiceState>;
|
810
817
|
/** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
|
811
818
|
getDefaultSoundboardSounds(): Promise<Array<SoundboardSound>>;
|
819
|
+
/** https://discord.com/developers/docs/resources/entitlement#get-entitlement */
|
820
|
+
getEntitlement(applicationID: snowflake, entitlementID: snowflake): Promise<Entitlement>;
|
812
821
|
/** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
|
813
822
|
getEntitlements(applicationID: snowflake, options?: {
|
814
823
|
userID?: snowflake;
|
@@ -818,6 +827,7 @@ export declare class Client extends EventEmitter {
|
|
818
827
|
limit?: number;
|
819
828
|
guildID?: snowflake;
|
820
829
|
excludeEnded?: boolean;
|
830
|
+
excludeDeleted?: boolean;
|
821
831
|
}): Promise<Array<Entitlement>>;
|
822
832
|
/** https://discord.com/developers/docs/topics/gateway#get-gateway */
|
823
833
|
getGateway(): Promise<{
|
package/dist/lib/Client.js
CHANGED
@@ -1098,6 +1098,22 @@ class Client extends node_events_1.default {
|
|
1098
1098
|
});
|
1099
1099
|
return transformers_1.Emojis.emojiFromRaw(response);
|
1100
1100
|
}
|
1101
|
+
/** https://discord.com/developers/docs/resources/emoji#modify-guild-incidents-actions */
|
1102
|
+
async editGuildIncidentsActions(guildID, options, reason) {
|
1103
|
+
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildIncidentsActions(guildID), {
|
1104
|
+
json: {
|
1105
|
+
invites_disabled_until: options?.invitesDisabledUntil,
|
1106
|
+
dms_disabled_until: options?.dmsDisabledUntil,
|
1107
|
+
},
|
1108
|
+
reason,
|
1109
|
+
});
|
1110
|
+
return {
|
1111
|
+
invitesDisabledUntil: response.invites_disabled_until,
|
1112
|
+
dmsDisabledUntil: response.dms_disabled_until,
|
1113
|
+
dmSpamDetectedAt: response.dm_spam_detected_at,
|
1114
|
+
raidDetectedAt: response.raid_detected_at,
|
1115
|
+
};
|
1116
|
+
}
|
1101
1117
|
/** https://discord.com/developers/docs/resources/guild#modify-guild-member */
|
1102
1118
|
async editGuildMember(guildID, userID, options, reason) {
|
1103
1119
|
const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildID, userID), {
|
@@ -1515,6 +1531,7 @@ class Client extends node_events_1.default {
|
|
1515
1531
|
files: options.files,
|
1516
1532
|
query: {
|
1517
1533
|
thread_id: options.threadID,
|
1534
|
+
with_components: options.withComponents,
|
1518
1535
|
},
|
1519
1536
|
});
|
1520
1537
|
return transformers_1.Messages.messageFromRaw(response);
|
@@ -1577,6 +1594,7 @@ class Client extends node_events_1.default {
|
|
1577
1594
|
query: {
|
1578
1595
|
wait: options.wait,
|
1579
1596
|
thread_id: options.threadID,
|
1597
|
+
with_components: options.withComponents,
|
1580
1598
|
},
|
1581
1599
|
});
|
1582
1600
|
return response !== null ? transformers_1.Messages.messageFromRaw(response) : response;
|
@@ -1757,6 +1775,11 @@ class Client extends node_events_1.default {
|
|
1757
1775
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.soundboardDefaultSounds());
|
1758
1776
|
return response.map((sound) => transformers_1.Soundboards.soundboardSoundFromRaw(sound));
|
1759
1777
|
}
|
1778
|
+
/** https://discord.com/developers/docs/resources/entitlement#get-entitlement */
|
1779
|
+
async getEntitlement(applicationID, entitlementID) {
|
1780
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlement(applicationID, entitlementID));
|
1781
|
+
return transformers_1.Entitlements.entitlementFromRaw(response);
|
1782
|
+
}
|
1760
1783
|
/** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
|
1761
1784
|
async getEntitlements(applicationID, options) {
|
1762
1785
|
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
|
@@ -1768,6 +1791,7 @@ class Client extends node_events_1.default {
|
|
1768
1791
|
limit: options?.limit,
|
1769
1792
|
guild_id: options?.guildID,
|
1770
1793
|
exclude_ended: options?.excludeEnded,
|
1794
|
+
exclude_deleted: options?.excludeDeleted,
|
1771
1795
|
},
|
1772
1796
|
});
|
1773
1797
|
return response.map((entitlement) => transformers_1.Entitlements.entitlementFromRaw(entitlement));
|
package/dist/lib/constants.d.ts
CHANGED
@@ -549,7 +549,8 @@ export declare enum MessageFlags {
|
|
549
549
|
Loading = 128,
|
550
550
|
FailedToMentionSomeRolesInThread = 256,
|
551
551
|
SuppressNotifications = 4096,
|
552
|
-
IsVoiceMessage = 8192
|
552
|
+
IsVoiceMessage = 8192,
|
553
|
+
HasSnapshot = 16384
|
553
554
|
}
|
554
555
|
/** https://discord.com/developers/docs/resources/message#message-reference-types */
|
555
556
|
export declare enum MessageReferenceTypes {
|
@@ -631,12 +632,17 @@ export declare enum PremiumTypes {
|
|
631
632
|
export declare enum Services {
|
632
633
|
AmazonMusic = "amazon-music",
|
633
634
|
BattleNet = "battlenet",
|
635
|
+
BungieNet = "bungie",
|
636
|
+
Bluesky = "bluesky",
|
637
|
+
Crunchyroll = "crunchyroll",
|
638
|
+
Domain = "domain",
|
634
639
|
Ebay = "ebay",
|
635
640
|
EpicGames = "epicgames",
|
636
641
|
Facebook = "facebook",
|
637
642
|
GitHub = "github",
|
638
643
|
Instagram = "instagram",
|
639
644
|
LeagueOfLegends = "leagueoflegends",
|
645
|
+
Mastodon = "mastodon",
|
640
646
|
PayPal = "paypal",
|
641
647
|
Playstation = "playstation",
|
642
648
|
Reddit = "reddit",
|
@@ -903,7 +909,8 @@ export declare enum VoiceCloseEventCodes {
|
|
903
909
|
UnknownProtocol = 4012,
|
904
910
|
Disconnect = 4014,
|
905
911
|
VoiceServerCrashed = 4015,
|
906
|
-
UnknownEncryptionMode = 4016
|
912
|
+
UnknownEncryptionMode = 4016,
|
913
|
+
BadRequest = 4020
|
907
914
|
}
|
908
915
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
909
916
|
export declare enum HTTPResponseCodes {
|
package/dist/lib/constants.js
CHANGED
@@ -607,6 +607,7 @@ var MessageFlags;
|
|
607
607
|
MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread";
|
608
608
|
MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
|
609
609
|
MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
|
610
|
+
MessageFlags[MessageFlags["HasSnapshot"] = 16384] = "HasSnapshot";
|
610
611
|
})(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
|
611
612
|
/** https://discord.com/developers/docs/resources/message#message-reference-types */
|
612
613
|
var MessageReferenceTypes;
|
@@ -700,12 +701,17 @@ var Services;
|
|
700
701
|
(function (Services) {
|
701
702
|
Services["AmazonMusic"] = "amazon-music";
|
702
703
|
Services["BattleNet"] = "battlenet";
|
704
|
+
Services["BungieNet"] = "bungie";
|
705
|
+
Services["Bluesky"] = "bluesky";
|
706
|
+
Services["Crunchyroll"] = "crunchyroll";
|
707
|
+
Services["Domain"] = "domain";
|
703
708
|
Services["Ebay"] = "ebay";
|
704
709
|
Services["EpicGames"] = "epicgames";
|
705
710
|
Services["Facebook"] = "facebook";
|
706
711
|
Services["GitHub"] = "github";
|
707
712
|
Services["Instagram"] = "instagram";
|
708
713
|
Services["LeagueOfLegends"] = "leagueoflegends";
|
714
|
+
Services["Mastodon"] = "mastodon";
|
709
715
|
Services["PayPal"] = "paypal";
|
710
716
|
Services["Playstation"] = "playstation";
|
711
717
|
Services["Reddit"] = "reddit";
|
@@ -988,6 +994,7 @@ var VoiceCloseEventCodes;
|
|
988
994
|
VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
|
989
995
|
VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
|
990
996
|
VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
|
997
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
|
991
998
|
})(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
|
992
999
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
993
1000
|
var HTTPResponseCodes;
|
@@ -12,6 +12,7 @@ export declare const guildChannels: (guildID: snowflake) => `guilds/${string}/ch
|
|
12
12
|
export declare const guildMemberNickname: (guildID: snowflake) => `guilds/${string}/members/@me/nick`;
|
13
13
|
export declare const guildEmoji: (guildID: snowflake, emojiID: snowflake) => `guilds/${string}/emojis/${string}`;
|
14
14
|
export declare const guildEmojis: (guildID: snowflake) => `guilds/${string}/emojis`;
|
15
|
+
export declare const guildIncidentsActions: (guildID: snowflake) => `guilds/${string}/incidents-actions`;
|
15
16
|
export declare const guildIntegration: (guildID: snowflake, integrationID: snowflake) => `guilds/${string}/integrations/${string}`;
|
16
17
|
export declare const guildIntegrations: (guildID: snowflake) => `guilds/${string}/integrations`;
|
17
18
|
export declare const guildInvites: (guildID: snowflake) => `guilds/${string}/invites`;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.
|
5
|
-
exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = void 0;
|
3
|
+
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.guildSoundboardSounds = exports.guildSoundboardSound = 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.guildIncidentsActions = 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.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = 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.applicationActivityInstance = 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 = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = void 0;
|
5
|
+
exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = void 0;
|
6
6
|
// Guilds
|
7
7
|
const guild = (guildID) => `guilds/${guildID}`;
|
8
8
|
exports.guild = guild;
|
@@ -30,6 +30,8 @@ const guildEmoji = (guildID, emojiID) => `guilds/${guildID}/emojis/${emojiID}`;
|
|
30
30
|
exports.guildEmoji = guildEmoji;
|
31
31
|
const guildEmojis = (guildID) => `guilds/${guildID}/emojis`;
|
32
32
|
exports.guildEmojis = guildEmojis;
|
33
|
+
const guildIncidentsActions = (guildID) => `guilds/${guildID}/incidents-actions`;
|
34
|
+
exports.guildIncidentsActions = guildIncidentsActions;
|
33
35
|
const guildIntegration = (guildID, integrationID) => `guilds/${guildID}/integrations/${integrationID}`;
|
34
36
|
exports.guildIntegration = guildIntegration;
|
35
37
|
const guildIntegrations = (guildID) => `guilds/${guildID}/integrations`;
|
@@ -85,6 +85,14 @@ class Guilds {
|
|
85
85
|
stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerFromRaw(sticker)),
|
86
86
|
premiumProgressBarEnabled: guild.premium_progress_bar_enabled,
|
87
87
|
safetyAlertsChannelID: guild.safety_alerts_channel_id,
|
88
|
+
incidentsData: guild.incidents_data !== null
|
89
|
+
? {
|
90
|
+
invitesDisabledUntil: guild.incidents_data.invites_disabled_until,
|
91
|
+
dmsDisabledUntil: guild.incidents_data.dms_disabled_until,
|
92
|
+
dmSpamDetectedAt: guild.incidents_data.dm_spam_detected_at,
|
93
|
+
raidDetectedAt: guild.incidents_data.raid_detected_at,
|
94
|
+
}
|
95
|
+
: null,
|
88
96
|
};
|
89
97
|
}
|
90
98
|
static guildMemberFromRaw(guildMember) {
|
@@ -194,6 +202,14 @@ class Guilds {
|
|
194
202
|
stickers: guild.stickers?.map((sticker) => Stickers_1.Stickers.stickerToRaw(sticker)),
|
195
203
|
premium_progress_bar_enabled: guild.premiumProgressBarEnabled,
|
196
204
|
safety_alerts_channel_id: guild.safetyAlertsChannelID,
|
205
|
+
incidents_data: guild.incidentsData !== null
|
206
|
+
? {
|
207
|
+
invites_disabled_until: guild.incidentsData.invitesDisabledUntil,
|
208
|
+
dms_disabled_until: guild.incidentsData.dmsDisabledUntil,
|
209
|
+
dm_spam_detected_at: guild.incidentsData.dmSpamDetectedAt,
|
210
|
+
raid_detected_at: guild.incidentsData.raidDetectedAt,
|
211
|
+
}
|
212
|
+
: null,
|
197
213
|
};
|
198
214
|
}
|
199
215
|
static integrationFromRaw(integration) {
|
@@ -8,6 +8,7 @@ class Subscriptions {
|
|
8
8
|
userID: subscription.user_id,
|
9
9
|
skuIDs: subscription.sku_ids,
|
10
10
|
entitlementIDs: subscription.entitlement_ids,
|
11
|
+
renewalSKUIDs: subscription.renewal_sku_ids,
|
11
12
|
currentPeriodStart: subscription.current_period_start,
|
12
13
|
currentPeriodEnd: subscription.current_period_end,
|
13
14
|
status: subscription.status,
|
@@ -21,6 +22,7 @@ class Subscriptions {
|
|
21
22
|
user_id: subscription.userID,
|
22
23
|
sku_ids: subscription.skuIDs,
|
23
24
|
entitlement_ids: subscription.entitlementIDs,
|
25
|
+
renewal_sku_ids: subscription.renewalSKUIDs,
|
24
26
|
current_period_start: subscription.currentPeriodStart,
|
25
27
|
current_period_end: subscription.currentPeriodEnd,
|
26
28
|
status: subscription.status,
|
@@ -9,8 +9,8 @@ export interface RawEntitlement {
|
|
9
9
|
type: EntitlementTypes;
|
10
10
|
deleted: boolean;
|
11
11
|
consumed?: boolean;
|
12
|
-
starts_at
|
13
|
-
ends_at
|
12
|
+
starts_at: timestamp | null;
|
13
|
+
ends_at: timestamp | null;
|
14
14
|
guild_id?: snowflake;
|
15
15
|
}
|
16
16
|
export interface Entitlement {
|
@@ -21,7 +21,7 @@ export interface Entitlement {
|
|
21
21
|
type: EntitlementTypes;
|
22
22
|
deleted: boolean;
|
23
23
|
consumed?: boolean;
|
24
|
-
startsAt
|
25
|
-
endsAt
|
24
|
+
startsAt: timestamp | null;
|
25
|
+
endsAt: timestamp | null;
|
26
26
|
guildID?: snowflake;
|
27
27
|
}
|
@@ -50,6 +50,7 @@ export interface RawGuild {
|
|
50
50
|
stickers?: Array<RawSticker>;
|
51
51
|
premium_progress_bar_enabled: boolean;
|
52
52
|
safety_alerts_channel_id: snowflake | null;
|
53
|
+
incidents_data: RawIncidentsData | null;
|
53
54
|
}
|
54
55
|
/** https://discord.com/developers/docs/resources/guild#unavailable-guild-object */
|
55
56
|
export interface RawUnavailableGuild {
|
@@ -180,6 +181,13 @@ export interface RawPromptOption {
|
|
180
181
|
title: string;
|
181
182
|
description: string | null;
|
182
183
|
}
|
184
|
+
/** https://discord.com/developers/docs/resources/guild#incidents-data-object-incidents-data-structure */
|
185
|
+
export interface RawIncidentsData {
|
186
|
+
invites_disabled_until: timestamp | null;
|
187
|
+
dms_disabled_until: timestamp | null;
|
188
|
+
dm_spam_detected_at?: timestamp | null;
|
189
|
+
raid_detected_at?: timestamp | null;
|
190
|
+
}
|
183
191
|
export interface Guild {
|
184
192
|
id: snowflake;
|
185
193
|
name: string;
|
@@ -224,6 +232,7 @@ export interface Guild {
|
|
224
232
|
stickers?: Array<Sticker>;
|
225
233
|
premiumProgressBarEnabled: boolean;
|
226
234
|
safetyAlertsChannelID: snowflake | null;
|
235
|
+
incidentsData: IncidentsData | null;
|
227
236
|
}
|
228
237
|
export interface UnavailableGuild {
|
229
238
|
id: snowflake;
|
@@ -340,3 +349,9 @@ export interface PromptOption {
|
|
340
349
|
title: string;
|
341
350
|
description: string | null;
|
342
351
|
}
|
352
|
+
export interface IncidentsData {
|
353
|
+
invitesDisabledUntil: timestamp | null;
|
354
|
+
dmsDisabledUntil: timestamp | null;
|
355
|
+
dmSpamDetectedAt?: timestamp | null;
|
356
|
+
raidDetectedAt?: timestamp | null;
|
357
|
+
}
|
@@ -191,10 +191,10 @@ export interface RawChannelMention {
|
|
191
191
|
}
|
192
192
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure */
|
193
193
|
export interface RawAllowedMentions {
|
194
|
-
parse
|
195
|
-
roles
|
196
|
-
users
|
197
|
-
replied_user
|
194
|
+
parse?: Array<AllowedMentionTypes>;
|
195
|
+
roles?: Array<snowflake>;
|
196
|
+
users?: Array<snowflake>;
|
197
|
+
replied_user?: boolean;
|
198
198
|
}
|
199
199
|
export interface Message {
|
200
200
|
id: snowflake;
|
@@ -359,8 +359,8 @@ export interface ChannelMention {
|
|
359
359
|
name: string;
|
360
360
|
}
|
361
361
|
export interface AllowedMentions {
|
362
|
-
parse
|
363
|
-
roles
|
364
|
-
users
|
365
|
-
repliedUser
|
362
|
+
parse?: Array<AllowedMentionTypes>;
|
363
|
+
roles?: Array<snowflake>;
|
364
|
+
users?: Array<snowflake>;
|
365
|
+
repliedUser?: boolean;
|
366
366
|
}
|
@@ -6,6 +6,7 @@ export interface RawSubscription {
|
|
6
6
|
user_id: snowflake;
|
7
7
|
sku_ids: Array<snowflake>;
|
8
8
|
entitlement_ids: Array<snowflake>;
|
9
|
+
renewal_sku_ids: Array<snowflake>;
|
9
10
|
current_period_start: timestamp;
|
10
11
|
current_period_end: timestamp;
|
11
12
|
status: SubscriptionStatuses;
|
@@ -17,6 +18,7 @@ export interface Subscription {
|
|
17
18
|
userID: snowflake;
|
18
19
|
skuIDs: Array<snowflake>;
|
19
20
|
entitlementIDs: Array<snowflake>;
|
21
|
+
renewalSKUIDs: Array<snowflake>;
|
20
22
|
currentPeriodStart: timestamp;
|
21
23
|
currentPeriodEnd: timestamp;
|
22
24
|
status: SubscriptionStatuses;
|
package/dist/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "disgroove",
|
3
|
-
"version": "2.2.5-dev.
|
3
|
+
"version": "2.2.5-dev.8d93f59",
|
4
4
|
"description": "A module to interface with Discord",
|
5
5
|
"main": "./dist/lib/index.js",
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
7
7
|
"repository": {
|
8
8
|
"type": "git",
|
9
|
-
"url": "git+https://github.com/
|
9
|
+
"url": "git+https://github.com/sergiogotuzzo/disgroove.git"
|
10
10
|
},
|
11
11
|
"keywords": [
|
12
12
|
"api",
|
@@ -21,9 +21,9 @@
|
|
21
21
|
"author": "XenKys",
|
22
22
|
"license": "MIT",
|
23
23
|
"bugs": {
|
24
|
-
"url": "https://github.com/
|
24
|
+
"url": "https://github.com/sergiogotuzzo/disgroove/issues"
|
25
25
|
},
|
26
|
-
"homepage": "https://github.com/
|
26
|
+
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
27
27
|
"devDependencies": {
|
28
28
|
"@types/node": "^22.5.3",
|
29
29
|
"@types/ws": "^8.5.12",
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "disgroove",
|
3
|
-
"version": "2.2.5-dev.
|
3
|
+
"version": "2.2.5-dev.8d93f59",
|
4
4
|
"description": "A module to interface with Discord",
|
5
5
|
"main": "./dist/lib/index.js",
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
7
7
|
"repository": {
|
8
8
|
"type": "git",
|
9
|
-
"url": "git+https://github.com/
|
9
|
+
"url": "git+https://github.com/sergiogotuzzo/disgroove.git"
|
10
10
|
},
|
11
11
|
"keywords": [
|
12
12
|
"api",
|
@@ -21,9 +21,9 @@
|
|
21
21
|
"author": "XenKys",
|
22
22
|
"license": "MIT",
|
23
23
|
"bugs": {
|
24
|
-
"url": "https://github.com/
|
24
|
+
"url": "https://github.com/sergiogotuzzo/disgroove/issues"
|
25
25
|
},
|
26
|
-
"homepage": "https://github.com/
|
26
|
+
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
27
27
|
"devDependencies": {
|
28
28
|
"@types/node": "^22.5.3",
|
29
29
|
"@types/ws": "^8.5.12",
|