disgroove 2.2.4 → 2.2.5-dev.4e978d8
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
CHANGED
@@ -656,6 +656,7 @@ export declare class Client extends EventEmitter {
|
|
656
656
|
components?: Array<ActionRow> | null;
|
657
657
|
files?: Array<File> | null;
|
658
658
|
attachments?: Array<Partial<Attachment>> | null;
|
659
|
+
poll?: PollCreateParams | null;
|
659
660
|
threadID?: snowflake;
|
660
661
|
}): Promise<Message>;
|
661
662
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
|
@@ -666,6 +667,7 @@ export declare class Client extends EventEmitter {
|
|
666
667
|
components?: Array<ActionRow> | null;
|
667
668
|
files?: Array<File> | null;
|
668
669
|
attachments?: Array<Partial<Attachment>> | null;
|
670
|
+
poll?: PollCreateParams | null;
|
669
671
|
threadID?: snowflake;
|
670
672
|
}): Promise<Message>;
|
671
673
|
/** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
|
@@ -687,6 +689,7 @@ export declare class Client extends EventEmitter {
|
|
687
689
|
components?: Array<ActionRow> | null;
|
688
690
|
files?: Array<File> | null;
|
689
691
|
attachments?: Array<Partial<Attachment>> | null;
|
692
|
+
poll?: PollCreateParams | null;
|
690
693
|
threadID?: snowflake;
|
691
694
|
}): Promise<Message>;
|
692
695
|
/** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
|
package/dist/lib/Client.js
CHANGED
@@ -1309,6 +1309,20 @@ class Client extends node_events_1.default {
|
|
1309
1309
|
waveform: attachment.waveform,
|
1310
1310
|
flags: attachment.flags,
|
1311
1311
|
})),
|
1312
|
+
poll: options.poll !== undefined
|
1313
|
+
? options.poll !== null
|
1314
|
+
? {
|
1315
|
+
question: options.poll.question,
|
1316
|
+
answers: options.poll.answers.map((answer) => ({
|
1317
|
+
answer_id: answer.answerID,
|
1318
|
+
poll_media: answer.pollMedia,
|
1319
|
+
})),
|
1320
|
+
duration: options.poll.duration,
|
1321
|
+
allow_multiselect: options.poll.allowMultiselect,
|
1322
|
+
layout_type: options.poll.layoutType,
|
1323
|
+
}
|
1324
|
+
: null
|
1325
|
+
: undefined,
|
1312
1326
|
},
|
1313
1327
|
files: options.files,
|
1314
1328
|
query: {
|
@@ -1356,6 +1370,20 @@ class Client extends node_events_1.default {
|
|
1356
1370
|
waveform: attachment.waveform,
|
1357
1371
|
flags: attachment.flags,
|
1358
1372
|
})),
|
1373
|
+
poll: options.poll !== undefined
|
1374
|
+
? options.poll !== null
|
1375
|
+
? {
|
1376
|
+
question: options.poll.question,
|
1377
|
+
answers: options.poll.answers.map((answer) => ({
|
1378
|
+
answer_id: answer.answerID,
|
1379
|
+
poll_media: answer.pollMedia,
|
1380
|
+
})),
|
1381
|
+
duration: options.poll.duration,
|
1382
|
+
allow_multiselect: options.poll.allowMultiselect,
|
1383
|
+
layout_type: options.poll.layoutType,
|
1384
|
+
}
|
1385
|
+
: null
|
1386
|
+
: undefined,
|
1359
1387
|
},
|
1360
1388
|
files: options.files,
|
1361
1389
|
query: {
|
@@ -1424,6 +1452,20 @@ class Client extends node_events_1.default {
|
|
1424
1452
|
waveform: attachment.waveform,
|
1425
1453
|
flags: attachment.flags,
|
1426
1454
|
})),
|
1455
|
+
poll: options.poll !== undefined
|
1456
|
+
? options.poll !== null
|
1457
|
+
? {
|
1458
|
+
question: options.poll.question,
|
1459
|
+
answers: options.poll.answers.map((answer) => ({
|
1460
|
+
answer_id: answer.answerID,
|
1461
|
+
poll_media: answer.pollMedia,
|
1462
|
+
})),
|
1463
|
+
duration: options.poll.duration,
|
1464
|
+
allow_multiselect: options.poll.allowMultiselect,
|
1465
|
+
layout_type: options.poll.layoutType,
|
1466
|
+
}
|
1467
|
+
: null
|
1468
|
+
: undefined,
|
1427
1469
|
},
|
1428
1470
|
files: options.files,
|
1429
1471
|
query: {
|
package/dist/lib/constants.d.ts
CHANGED
@@ -12,7 +12,8 @@ export declare enum TimestampStyles {
|
|
12
12
|
export declare enum GuildNavigationTypes {
|
13
13
|
Customize = "customize",
|
14
14
|
BrowseChannels = "browse",
|
15
|
-
ServerGuide = "guide"
|
15
|
+
ServerGuide = "guide",
|
16
|
+
LinkedRoles = "linked-roles"
|
16
17
|
}
|
17
18
|
/** https://discord.com/developers/docs/reference#image-formatting-image-formats */
|
18
19
|
export declare enum ImageFormats {
|
@@ -616,6 +617,7 @@ export declare enum PremiumTypes {
|
|
616
617
|
}
|
617
618
|
/** https://discord.com/developers/docs/resources/user#connection-object-services */
|
618
619
|
export declare enum Services {
|
620
|
+
AmazonMusic = "amazon-music",
|
619
621
|
BattleNet = "battlenet",
|
620
622
|
Ebay = "ebay",
|
621
623
|
EpicGames = "epicgames",
|
@@ -999,6 +1001,8 @@ export declare enum JSONErrorCodes {
|
|
999
1001
|
FeatureTemporarilyDisabledServerSide = 40006,
|
1000
1002
|
UserBannedFromThisGuild = 40007,
|
1001
1003
|
ConnectionHasBeenRevoked = 40012,
|
1004
|
+
OnlyConsumableSKUsCanBeConsumed = 40018,
|
1005
|
+
YouCanOnlyDeleteSandboxEntitlements = 40019,
|
1002
1006
|
TargetUserIsNotConnectedToVoice = 40032,
|
1003
1007
|
ThisMessageWasAlreadyCrossposted = 40033,
|
1004
1008
|
ApplicationCommandWithThatNameAlreadyExists = 40041,
|
@@ -1010,6 +1014,7 @@ export declare enum JSONErrorCodes {
|
|
1010
1014
|
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40066,
|
1011
1015
|
TagRequiredToCreateAForumPostInThisChannel = 40067,
|
1012
1016
|
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40074,
|
1017
|
+
ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages = 40094,
|
1013
1018
|
CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent = 40333,
|
1014
1019
|
MissingAccess = 50001,
|
1015
1020
|
InvalidAccountType = 50002,
|
package/dist/lib/constants.js
CHANGED
@@ -19,6 +19,7 @@ var GuildNavigationTypes;
|
|
19
19
|
GuildNavigationTypes["Customize"] = "customize";
|
20
20
|
GuildNavigationTypes["BrowseChannels"] = "browse";
|
21
21
|
GuildNavigationTypes["ServerGuide"] = "guide";
|
22
|
+
GuildNavigationTypes["LinkedRoles"] = "linked-roles";
|
22
23
|
})(GuildNavigationTypes || (exports.GuildNavigationTypes = GuildNavigationTypes = {}));
|
23
24
|
/** https://discord.com/developers/docs/reference#image-formatting-image-formats */
|
24
25
|
var ImageFormats;
|
@@ -684,6 +685,7 @@ var PremiumTypes;
|
|
684
685
|
/** https://discord.com/developers/docs/resources/user#connection-object-services */
|
685
686
|
var Services;
|
686
687
|
(function (Services) {
|
688
|
+
Services["AmazonMusic"] = "amazon-music";
|
687
689
|
Services["BattleNet"] = "battlenet";
|
688
690
|
Services["Ebay"] = "ebay";
|
689
691
|
Services["EpicGames"] = "epicgames";
|
@@ -1084,6 +1086,8 @@ var JSONErrorCodes;
|
|
1084
1086
|
JSONErrorCodes[JSONErrorCodes["FeatureTemporarilyDisabledServerSide"] = 40006] = "FeatureTemporarilyDisabledServerSide";
|
1085
1087
|
JSONErrorCodes[JSONErrorCodes["UserBannedFromThisGuild"] = 40007] = "UserBannedFromThisGuild";
|
1086
1088
|
JSONErrorCodes[JSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
|
1089
|
+
JSONErrorCodes[JSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed";
|
1090
|
+
JSONErrorCodes[JSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements";
|
1087
1091
|
JSONErrorCodes[JSONErrorCodes["TargetUserIsNotConnectedToVoice"] = 40032] = "TargetUserIsNotConnectedToVoice";
|
1088
1092
|
JSONErrorCodes[JSONErrorCodes["ThisMessageWasAlreadyCrossposted"] = 40033] = "ThisMessageWasAlreadyCrossposted";
|
1089
1093
|
JSONErrorCodes[JSONErrorCodes["ApplicationCommandWithThatNameAlreadyExists"] = 40041] = "ApplicationCommandWithThatNameAlreadyExists";
|
@@ -1095,6 +1099,7 @@ var JSONErrorCodes;
|
|
1095
1099
|
JSONErrorCodes[JSONErrorCodes["ThereAreNoTagsAvailableThatCanBeSetByNonModerators"] = 40066] = "ThereAreNoTagsAvailableThatCanBeSetByNonModerators";
|
1096
1100
|
JSONErrorCodes[JSONErrorCodes["TagRequiredToCreateAForumPostInThisChannel"] = 40067] = "TagRequiredToCreateAForumPostInThisChannel";
|
1097
1101
|
JSONErrorCodes[JSONErrorCodes["AnEntitlementHasAlreadyBeenGrantedForThisResource"] = 40074] = "AnEntitlementHasAlreadyBeenGrantedForThisResource";
|
1102
|
+
JSONErrorCodes[JSONErrorCodes["ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages"] = 40094] = "ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages";
|
1098
1103
|
JSONErrorCodes[JSONErrorCodes["CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent"] = 40333] = "CloudflareIsBlockingYourRequestThisCanOftenBeResolvedBySettingAProperUserAgent";
|
1099
1104
|
JSONErrorCodes[JSONErrorCodes["MissingAccess"] = 50001] = "MissingAccess";
|
1100
1105
|
JSONErrorCodes[JSONErrorCodes["InvalidAccountType"] = 50002] = "InvalidAccountType";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { GuildNavigationTypes, TimestampStyles } from "../constants";
|
2
2
|
import type { snowflake } from "../types/common";
|
3
3
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
4
4
|
export declare function userMention(userID: snowflake): string;
|
@@ -13,4 +13,4 @@ export declare function customEmoji(emojiName: string, emojiID: snowflake, anima
|
|
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(guildID: snowflake, type: GuildNavigationTypes): string;
|
16
|
+
export declare function guildNavigation(guildID: snowflake, type: GuildNavigationTypes, roleID?: snowflake): string;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.guildNavigation = exports.unixTimestamp = exports.customEmoji = exports.slashCommandMention = exports.roleMention = exports.channelMention = exports.userMention = void 0;
|
4
|
+
const constants_1 = require("../constants");
|
4
5
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
5
6
|
function userMention(userID) {
|
6
7
|
return `<@${userID}>`;
|
@@ -38,7 +39,9 @@ function unixTimestamp(time, style) {
|
|
38
39
|
}
|
39
40
|
exports.unixTimestamp = unixTimestamp;
|
40
41
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
41
|
-
function guildNavigation(guildID, type) {
|
42
|
-
return
|
42
|
+
function guildNavigation(guildID, type, roleID) {
|
43
|
+
return roleID && type === constants_1.GuildNavigationTypes.LinkedRoles
|
44
|
+
? `<${guildID}:${type}:${roleID}>`
|
45
|
+
: `<${guildID}:${type}>`;
|
43
46
|
}
|
44
47
|
exports.guildNavigation = guildNavigation;
|
package/dist/package.json
CHANGED