disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.bc90599
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 +291 -254
- package/dist/lib/Client.js +553 -459
- package/dist/lib/constants.d.ts +29 -21
- package/dist/lib/constants.js +33 -24
- package/dist/lib/gateway/Shard.d.ts +2 -2
- package/dist/lib/gateway/Shard.js +98 -82
- package/dist/lib/index.d.ts +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/lib/rest/Endpoints.d.ts +95 -91
- package/dist/lib/rest/Endpoints.js +111 -102
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.js +4 -4
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.d.ts +13 -3
- package/dist/lib/transformers/Components.js +283 -156
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +300 -55
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +36 -50
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +8 -8
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +12 -7
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +478 -0
- package/dist/lib/types/components.js +2 -0
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +203 -130
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +40 -22
- package/dist/lib/types/interaction.d.ts +35 -18
- package/dist/lib/types/invite.d.ts +5 -2
- package/dist/lib/types/lobby.d.ts +31 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message-components.d.ts +334 -118
- package/dist/lib/types/message.d.ts +30 -18
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +8 -5
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/formatters.d.ts +7 -7
- package/dist/lib/utils/formatters.js +19 -19
- package/dist/package.json +4 -4
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { GuildNavigationTypes, TimestampStyles } from "../constants";
|
|
1
|
+
import { GuildNavigationTypes, type TimestampStyles } from "../constants";
|
|
2
2
|
import type { snowflake } from "../types/common";
|
|
3
3
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
4
|
-
export declare function userMention(
|
|
4
|
+
export declare function userMention(userId: snowflake): string;
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
6
|
-
export declare function channelMention(
|
|
6
|
+
export declare function channelMention(channelId: snowflake): string;
|
|
7
7
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
8
|
-
export declare function roleMention(
|
|
8
|
+
export declare function roleMention(roleId: snowflake): string;
|
|
9
9
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
10
|
-
export declare function slashCommandMention(commandName: string,
|
|
10
|
+
export declare function slashCommandMention(commandName: string, commandId: snowflake, subCommandName?: string, subCommandGroupName?: string): string;
|
|
11
11
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
12
|
-
export declare function customEmoji(emojiName: string,
|
|
12
|
+
export declare function customEmoji(emojiName: string, emojiId: snowflake, animated?: boolean): string;
|
|
13
13
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
14
14
|
export declare function unixTimestamp(time: number, style?: TimestampStyles): string;
|
|
15
15
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
16
|
-
export declare function guildNavigation(
|
|
16
|
+
export declare function guildNavigation(guildId: snowflake, type: GuildNavigationTypes, roleId?: snowflake): string;
|
|
17
17
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
18
18
|
export declare function email(username: string, domain: string): string;
|
|
19
19
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
@@ -3,34 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.phoneNumber = exports.email = exports.guildNavigation = exports.unixTimestamp = exports.customEmoji = exports.slashCommandMention = exports.roleMention = exports.channelMention = exports.userMention = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
6
|
-
function userMention(
|
|
7
|
-
return `<@${
|
|
6
|
+
function userMention(userId) {
|
|
7
|
+
return `<@${userId}>`;
|
|
8
8
|
}
|
|
9
9
|
exports.userMention = userMention;
|
|
10
10
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
11
|
-
function channelMention(
|
|
12
|
-
return `<#${
|
|
11
|
+
function channelMention(channelId) {
|
|
12
|
+
return `<#${channelId}>`;
|
|
13
13
|
}
|
|
14
14
|
exports.channelMention = channelMention;
|
|
15
15
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
16
|
-
function roleMention(
|
|
17
|
-
return `<@&${
|
|
16
|
+
function roleMention(roleId) {
|
|
17
|
+
return `<@&${roleId}>`;
|
|
18
18
|
}
|
|
19
19
|
exports.roleMention = roleMention;
|
|
20
20
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
21
|
-
function slashCommandMention(commandName,
|
|
21
|
+
function slashCommandMention(commandName, commandId, subCommandName, subCommandGroupName) {
|
|
22
22
|
return subCommandName
|
|
23
23
|
? subCommandGroupName
|
|
24
|
-
? `</${commandName} ${subCommandGroupName} ${subCommandName}:${
|
|
25
|
-
: `</${commandName} ${subCommandName}:${
|
|
26
|
-
: `</${commandName}:${
|
|
24
|
+
? `</${commandName} ${subCommandGroupName} ${subCommandName}:${commandId}>`
|
|
25
|
+
: `</${commandName} ${subCommandName}:${commandId}>`
|
|
26
|
+
: `</${commandName}:${commandId}>`;
|
|
27
27
|
}
|
|
28
28
|
exports.slashCommandMention = slashCommandMention;
|
|
29
29
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
30
|
-
function customEmoji(emojiName,
|
|
30
|
+
function customEmoji(emojiName, emojiId, animated) {
|
|
31
31
|
return animated
|
|
32
|
-
? `<a:${emojiName}:${
|
|
33
|
-
: `<:${emojiName}:${
|
|
32
|
+
? `<a:${emojiName}:${emojiId}>`
|
|
33
|
+
: `<:${emojiName}:${emojiId}>`;
|
|
34
34
|
}
|
|
35
35
|
exports.customEmoji = customEmoji;
|
|
36
36
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
@@ -39,19 +39,19 @@ function unixTimestamp(time, style) {
|
|
|
39
39
|
}
|
|
40
40
|
exports.unixTimestamp = unixTimestamp;
|
|
41
41
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
42
|
-
function guildNavigation(
|
|
43
|
-
return
|
|
44
|
-
? `<${
|
|
45
|
-
: `<${
|
|
42
|
+
function guildNavigation(guildId, type, roleId) {
|
|
43
|
+
return roleId && type === constants_1.GuildNavigationTypes.LinkedRoles
|
|
44
|
+
? `<${guildId}:${type}:${roleId}>`
|
|
45
|
+
: `<${guildId}:${type}>`;
|
|
46
46
|
}
|
|
47
47
|
exports.guildNavigation = guildNavigation;
|
|
48
48
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
49
49
|
function email(username, domain) {
|
|
50
|
-
return `<${username}
|
|
50
|
+
return `<${username}@${domain}>`;
|
|
51
51
|
}
|
|
52
52
|
exports.email = email;
|
|
53
53
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
54
54
|
function phoneNumber(number) {
|
|
55
|
-
return `<+${
|
|
55
|
+
return `<+${number}>`;
|
|
56
56
|
}
|
|
57
57
|
exports.phoneNumber = phoneNumber;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-dev.bc90599",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
28
|
+
"@types/node": "^22.18.1",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"undici-types": "^7.
|
|
30
|
+
"typescript": "^5.9.2",
|
|
31
|
+
"undici-types": "^7.16.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ws": "^8.18.3"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-dev.bc90599",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
28
|
+
"@types/node": "^22.18.1",
|
|
29
29
|
"@types/ws": "^8.18.1",
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"undici-types": "^7.
|
|
30
|
+
"typescript": "^5.9.2",
|
|
31
|
+
"undici-types": "^7.16.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ws": "^8.18.3"
|