disgroove 2.0.1 → 2.1.0-dev.8697575
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 +15 -1
- package/dist/lib/Client.js +27 -1
- package/dist/lib/constants.d.ts +20 -2
- package/dist/lib/constants.js +22 -3
- package/dist/lib/gateway/Shard.js +6 -1
- package/dist/lib/gateway/ShardManager.js +0 -1
- package/dist/lib/gateway/index.js +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/rest/CDN.js +0 -1
- package/dist/lib/rest/Endpoints.d.ts +4 -1
- package/dist/lib/rest/Endpoints.js +8 -3
- package/dist/lib/rest/RequestManager.d.ts +0 -1
- package/dist/lib/rest/RequestManager.js +0 -1
- package/dist/lib/rest/index.js +0 -1
- package/dist/lib/types/application-command.js +0 -1
- package/dist/lib/types/application-role-connection-metadata.js +0 -1
- package/dist/lib/types/application.d.ts +11 -1
- package/dist/lib/types/application.js +0 -1
- package/dist/lib/types/audit-log.js +0 -1
- package/dist/lib/types/auto-moderation.js +0 -1
- package/dist/lib/types/channel.d.ts +4 -0
- package/dist/lib/types/channel.js +0 -1
- package/dist/lib/types/emoji.js +0 -1
- package/dist/lib/types/entitlements.js +0 -1
- package/dist/lib/types/gateway-events.d.ts +28 -0
- package/dist/lib/types/gateway-events.js +0 -1
- package/dist/lib/types/guild-scheduled-event.js +0 -1
- package/dist/lib/types/guild-template.js +0 -1
- package/dist/lib/types/guild.d.ts +4 -0
- package/dist/lib/types/guild.js +0 -1
- package/dist/lib/types/index.js +0 -1
- package/dist/lib/types/interaction.d.ts +3 -0
- package/dist/lib/types/interaction.js +0 -1
- package/dist/lib/types/invite.js +0 -1
- package/dist/lib/types/message-components.js +0 -1
- package/dist/lib/types/poll.d.ts +52 -0
- package/dist/lib/types/poll.js +2 -0
- package/dist/lib/types/role.js +0 -1
- package/dist/lib/types/sku.js +0 -1
- package/dist/lib/types/stage-instance.js +0 -1
- package/dist/lib/types/sticker.js +0 -1
- package/dist/lib/types/team.js +0 -1
- package/dist/lib/types/user.js +0 -1
- package/dist/lib/types/voice.js +0 -1
- package/dist/lib/types/webhook.d.ts +3 -0
- package/dist/lib/types/webhook.js +0 -1
- package/dist/lib/utils/Util.js +0 -1
- package/dist/lib/utils/errors.js +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/package.json +3 -2
- package/package.json +3 -2
- package/dist/lib/Client.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/gateway/Shard.js.map +0 -1
- package/dist/lib/gateway/ShardManager.js.map +0 -1
- package/dist/lib/gateway/ShardsManager.d.ts +0 -6
- package/dist/lib/gateway/ShardsManager.js +0 -14
- package/dist/lib/gateway/ShardsManager.js.map +0 -1
- package/dist/lib/gateway/index.js.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/rest/CDN.js.map +0 -1
- package/dist/lib/rest/Endpoints.js.map +0 -1
- package/dist/lib/rest/REST.d.ts +0 -17
- package/dist/lib/rest/REST.js +0 -35
- package/dist/lib/rest/REST.js.map +0 -1
- package/dist/lib/rest/RequestManager.js.map +0 -1
- package/dist/lib/rest/RequestsManager.d.ts +0 -22
- package/dist/lib/rest/RequestsManager.js +0 -123
- package/dist/lib/rest/RequestsManager.js.map +0 -1
- package/dist/lib/rest/index.js.map +0 -1
- package/dist/lib/structures/Application.d.ts +0 -174
- package/dist/lib/structures/Application.js +0 -328
- package/dist/lib/structures/Application.js.map +0 -1
- package/dist/lib/structures/ApplicationCommand.d.ts +0 -45
- package/dist/lib/structures/ApplicationCommand.js +0 -127
- package/dist/lib/structures/ApplicationCommand.js.map +0 -1
- package/dist/lib/structures/AuditLog.d.ts +0 -19
- package/dist/lib/structures/AuditLog.js +0 -101
- package/dist/lib/structures/AuditLog.js.map +0 -1
- package/dist/lib/structures/AutoModerationRule.d.ts +0 -34
- package/dist/lib/structures/AutoModerationRule.js +0 -96
- package/dist/lib/structures/AutoModerationRule.js.map +0 -1
- package/dist/lib/structures/Base.d.ts +0 -10
- package/dist/lib/structures/Base.js +0 -23
- package/dist/lib/structures/Base.js.map +0 -1
- package/dist/lib/structures/Channel.d.ts +0 -254
- package/dist/lib/structures/Channel.js +0 -592
- package/dist/lib/structures/Channel.js.map +0 -1
- package/dist/lib/structures/ClientApplication.d.ts +0 -150
- package/dist/lib/structures/ClientApplication.js +0 -241
- package/dist/lib/structures/ClientApplication.js.map +0 -1
- package/dist/lib/structures/Emoji.d.ts +0 -26
- package/dist/lib/structures/Emoji.js +0 -75
- package/dist/lib/structures/Emoji.js.map +0 -1
- package/dist/lib/structures/Entitlement.d.ts +0 -24
- package/dist/lib/structures/Entitlement.js +0 -68
- package/dist/lib/structures/Entitlement.js.map +0 -1
- package/dist/lib/structures/Guild.d.ts +0 -474
- package/dist/lib/structures/Guild.js +0 -1141
- package/dist/lib/structures/Guild.js.map +0 -1
- package/dist/lib/structures/GuildMember.d.ts +0 -49
- package/dist/lib/structures/GuildMember.js +0 -146
- package/dist/lib/structures/GuildMember.js.map +0 -1
- package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -49
- package/dist/lib/structures/GuildScheduledEvent.js +0 -118
- package/dist/lib/structures/GuildScheduledEvent.js.map +0 -1
- package/dist/lib/structures/GuildTemplate.d.ts +0 -30
- package/dist/lib/structures/GuildTemplate.js +0 -72
- package/dist/lib/structures/GuildTemplate.js.map +0 -1
- package/dist/lib/structures/IdentifiableBase.d.ts +0 -15
- package/dist/lib/structures/IdentifiableBase.js +0 -25
- package/dist/lib/structures/IdentifiableBase.js.map +0 -1
- package/dist/lib/structures/Integration.d.ts +0 -31
- package/dist/lib/structures/Integration.js +0 -103
- package/dist/lib/structures/Integration.js.map +0 -1
- package/dist/lib/structures/Interaction.d.ts +0 -76
- package/dist/lib/structures/Interaction.js +0 -346
- package/dist/lib/structures/Interaction.js.map +0 -1
- package/dist/lib/structures/Invite.d.ts +0 -26
- package/dist/lib/structures/Invite.js +0 -82
- package/dist/lib/structures/Invite.js.map +0 -1
- package/dist/lib/structures/Message.d.ts +0 -86
- package/dist/lib/structures/Message.js +0 -303
- package/dist/lib/structures/Message.js.map +0 -1
- package/dist/lib/structures/Role.d.ts +0 -37
- package/dist/lib/structures/Role.js +0 -90
- package/dist/lib/structures/Role.js.map +0 -1
- package/dist/lib/structures/SKU.d.ts +0 -23
- package/dist/lib/structures/SKU.js +0 -63
- package/dist/lib/structures/SKU.js.map +0 -1
- package/dist/lib/structures/StageInstance.d.ts +0 -24
- package/dist/lib/structures/StageInstance.js +0 -57
- package/dist/lib/structures/StageInstance.js.map +0 -1
- package/dist/lib/structures/Sticker.d.ts +0 -31
- package/dist/lib/structures/Sticker.js +0 -86
- package/dist/lib/structures/Sticker.js.map +0 -1
- package/dist/lib/structures/Team.d.ts +0 -14
- package/dist/lib/structures/Team.js +0 -39
- package/dist/lib/structures/Team.js.map +0 -1
- package/dist/lib/structures/TestEntitlement.d.ts +0 -23
- package/dist/lib/structures/TestEntitlement.js +0 -61
- package/dist/lib/structures/TestEntitlement.js.map +0 -1
- package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
- package/dist/lib/structures/UnavailableGuild.js +0 -25
- package/dist/lib/structures/UnavailableGuild.js.map +0 -1
- package/dist/lib/structures/User.d.ts +0 -63
- package/dist/lib/structures/User.js +0 -177
- package/dist/lib/structures/User.js.map +0 -1
- package/dist/lib/structures/VoiceState.d.ts +0 -24
- package/dist/lib/structures/VoiceState.js +0 -66
- package/dist/lib/structures/VoiceState.js.map +0 -1
- package/dist/lib/structures/Webhook.d.ts +0 -82
- package/dist/lib/structures/Webhook.js +0 -223
- package/dist/lib/structures/Webhook.js.map +0 -1
- package/dist/lib/structures/index.d.ts +0 -28
- package/dist/lib/structures/index.js +0 -45
- package/dist/lib/structures/index.js.map +0 -1
- package/dist/lib/types/application-command.js.map +0 -1
- package/dist/lib/types/application-role-connection-metadata.js.map +0 -1
- package/dist/lib/types/application.js.map +0 -1
- package/dist/lib/types/audit-log.js.map +0 -1
- package/dist/lib/types/auto-moderation.js.map +0 -1
- package/dist/lib/types/channel.js.map +0 -1
- package/dist/lib/types/emoji.js.map +0 -1
- package/dist/lib/types/entitlements.js.map +0 -1
- package/dist/lib/types/gateway-events.js.map +0 -1
- package/dist/lib/types/guild-scheduled-event.js.map +0 -1
- package/dist/lib/types/guild-template.js.map +0 -1
- package/dist/lib/types/guild.js.map +0 -1
- package/dist/lib/types/index.js.map +0 -1
- package/dist/lib/types/interaction.js.map +0 -1
- package/dist/lib/types/invite.js.map +0 -1
- package/dist/lib/types/message-components.js.map +0 -1
- package/dist/lib/types/role.js.map +0 -1
- package/dist/lib/types/sku.js.map +0 -1
- package/dist/lib/types/stage-instance.js.map +0 -1
- package/dist/lib/types/sticker.js.map +0 -1
- package/dist/lib/types/team.js.map +0 -1
- package/dist/lib/types/user.js.map +0 -1
- package/dist/lib/types/voice.js.map +0 -1
- package/dist/lib/types/webhook.js.map +0 -1
- package/dist/lib/utils/Collection.d.ts +0 -24
- package/dist/lib/utils/Collection.js +0 -65
- package/dist/lib/utils/Collection.js.map +0 -1
- package/dist/lib/utils/Util.js.map +0 -1
- package/dist/lib/utils/errors.js.map +0 -1
- package/dist/lib/utils/index.js.map +0 -1
@@ -1,123 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.RequestsManager = void 0;
|
27
|
-
const _1 = require(".");
|
28
|
-
const constants_1 = require("../constants");
|
29
|
-
const utils_1 = require("../utils");
|
30
|
-
const pkg = __importStar(require("../../package.json"));
|
31
|
-
class RequestsManager {
|
32
|
-
token;
|
33
|
-
auth;
|
34
|
-
globalBlock = false;
|
35
|
-
constructor(token, auth) {
|
36
|
-
this.token = token;
|
37
|
-
this.auth = auth;
|
38
|
-
}
|
39
|
-
request(method, endpoint, data) {
|
40
|
-
return new Promise(async (resolve, reject) => {
|
41
|
-
if (this.globalBlock && !endpoint.startsWith("interactions"))
|
42
|
-
return;
|
43
|
-
let url = new URL(`https://discord.com/api/v10/${endpoint}`);
|
44
|
-
if (data?.query)
|
45
|
-
for (const [key, value] of Object.entries(data.query))
|
46
|
-
if (value !== undefined)
|
47
|
-
url.searchParams.set(key, String(value));
|
48
|
-
let headers = {
|
49
|
-
"User-Agent": `DiscordBot (https://github.com/XenKys/disgroove, ${pkg.version})`,
|
50
|
-
Authorization: `${this.auth} ${this.token}`,
|
51
|
-
};
|
52
|
-
let body;
|
53
|
-
if (data?.authorization === false)
|
54
|
-
delete headers["Authorization"];
|
55
|
-
if (method !== _1.RESTMethods.Get) {
|
56
|
-
if (data?.form || (data?.files && data?.files?.length !== 0)) {
|
57
|
-
const formData = data.form ?? new FormData();
|
58
|
-
if (data?.files && data?.files?.length !== 0) {
|
59
|
-
for (let i = 0; i < data?.files.length; i++) {
|
60
|
-
const file = data?.files[i];
|
61
|
-
formData?.set(`files[${i}]`, new Blob([file.contents]), file.name);
|
62
|
-
}
|
63
|
-
if (data?.json)
|
64
|
-
formData?.set("payload_json", JSON.stringify(data?.json));
|
65
|
-
}
|
66
|
-
body = formData;
|
67
|
-
}
|
68
|
-
else {
|
69
|
-
body = JSON.stringify(data?.json);
|
70
|
-
headers["Content-Type"] = "application/json";
|
71
|
-
}
|
72
|
-
if (data?.reason !== undefined)
|
73
|
-
headers["X-Audit-Log-Reason"] = data?.reason;
|
74
|
-
}
|
75
|
-
try {
|
76
|
-
const response = await fetch(url.href, {
|
77
|
-
method,
|
78
|
-
body,
|
79
|
-
headers,
|
80
|
-
});
|
81
|
-
if (response.headers.has("X-RateLimit-Global")) {
|
82
|
-
this.globalBlock = true;
|
83
|
-
setTimeout(() => {
|
84
|
-
this.globalBlock = false;
|
85
|
-
}, Number(response.headers.get("Retry-After")) * 1000);
|
86
|
-
}
|
87
|
-
if (response.status >= constants_1.HTTPResponseCodes.NotModified) {
|
88
|
-
if (response.status === constants_1.HTTPResponseCodes.TooManyRequests) {
|
89
|
-
setTimeout(() => this.request(method, endpoint, data)
|
90
|
-
.then(resolve)
|
91
|
-
.catch(reject), Number(response.headers.get("Retry-After")) * 1000);
|
92
|
-
}
|
93
|
-
else if (response.status === constants_1.HTTPResponseCodes.GatewayUnavailable) {
|
94
|
-
setTimeout(() => this.request(method, endpoint, data)
|
95
|
-
.then(resolve)
|
96
|
-
.catch(reject), 5 * 1000);
|
97
|
-
}
|
98
|
-
else {
|
99
|
-
const responseJSON = await response.json();
|
100
|
-
reject(responseJSON &&
|
101
|
-
typeof responseJSON === "object" &&
|
102
|
-
"code" in responseJSON &&
|
103
|
-
"message" in responseJSON &&
|
104
|
-
responseJSON.code !== 0
|
105
|
-
? new utils_1.RESTError(`[${responseJSON.code}] ${responseJSON.message}`)
|
106
|
-
: new utils_1.HTTPError(`[${response.status}] ${response.statusText}`));
|
107
|
-
}
|
108
|
-
}
|
109
|
-
else if (response.status === constants_1.HTTPResponseCodes.NoContent) {
|
110
|
-
resolve(null);
|
111
|
-
}
|
112
|
-
else {
|
113
|
-
resolve((await response.json()));
|
114
|
-
}
|
115
|
-
}
|
116
|
-
catch (err) {
|
117
|
-
reject(err);
|
118
|
-
}
|
119
|
-
});
|
120
|
-
}
|
121
|
-
}
|
122
|
-
exports.RequestsManager = RequestsManager;
|
123
|
-
//# sourceMappingURL=RequestsManager.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"RequestsManager.js","sourceRoot":"","sources":["../../../lib/rest/RequestsManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAAgC;AAChC,4CAAiD;AACjD,oCAAgD;AAChD,wDAA0C;AAgB1C,MAAa,eAAe;IAC1B,KAAK,CAAS;IACd,IAAI,CAAmB;IACvB,WAAW,GAAY,KAAK,CAAC;IAE7B,YAAY,KAAa,EAAE,IAAsB;QAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,OAAO,CACL,MAAmB,EACnB,QAAgB,EAChB,IAAkB;QAElB,OAAO,IAAI,OAAO,CAAI,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YAC9C,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC;gBAAE,OAAO;YAErE,IAAI,GAAG,GAAQ,IAAI,GAAG,CAAC,+BAA+B,QAAQ,EAAE,CAAC,CAAC;YAElE,IAAI,IAAI,EAAE,KAAK;gBACb,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;oBACnD,IAAI,KAAK,KAAK,SAAS;wBAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,M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AAO,CAAI,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC;6BACpC,IAAI,CAAC,OAAO,CAAC;6BACb,KAAK,CAAC,MAAM,CAAC,EAClB,CAAC,GAAG,IAAI,CACT,CAAC;oBACJ,CAAC;yBAAM,CAAC;wBACN,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;wBAE3C,MAAM,CACJ,YAAY;4BACV,OAAO,YAAY,KAAK,QAAQ;4BAChC,MAAM,IAAI,YAAY;4BACtB,SAAS,IAAI,YAAY;4BACzB,YAAY,CAAC,IAAI,KAAK,CAAC;4BACvB,CAAC,CAAC,IAAI,iBAAS,CACX,IAAI,YAAY,CAAC,IAAI,KAAK,YAAY,CAAC,OAAO,EAAE,CACjD;4BACH,CAAC,CAAC,IAAI,iBAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CACjE,CAAC;oBACJ,CAAC;gBACH,CAAC;qBAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,6BAAiB,CAAC,SAAS,EAAE,CAAC;oBAC3D,OAAO,CAAC,IAAS,CAAC,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM,CAAC,CAAC;gBACxC,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvHD,0CAuHC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/rest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6B;AAC7B,yDAAyC;AACzC,mDAAiC"}
|
@@ -1,174 +0,0 @@
|
|
1
|
-
import { IdentifiableBase, User, ApplicationCommand, Team, Guild, TestEntitlement, Entitlement, SKU } from ".";
|
2
|
-
import type { JSONInstallParams, JSONGuildApplicationCommandPermissions, RawApplication, JSONApplication, JSONApplicationRoleConnectionMetadata, JSONApplicationCommandOption } from "../types";
|
3
|
-
import type { Client } from "../Client";
|
4
|
-
import type { ApplicationCommandTypes, ApplicationFlags, Locales } from "../constants";
|
5
|
-
/** https://discord.com/developers/docs/resources/application */
|
6
|
-
export declare class Application extends IdentifiableBase {
|
7
|
-
protected raw: RawApplication;
|
8
|
-
name: string;
|
9
|
-
icon: string | null;
|
10
|
-
description: string;
|
11
|
-
rpcOrigins?: Array<string>;
|
12
|
-
botPublic: boolean;
|
13
|
-
botRequireCodeGrant: boolean;
|
14
|
-
termsOfServiceURL?: string;
|
15
|
-
privacyPolicyURL?: string;
|
16
|
-
owner?: User;
|
17
|
-
verifyKey: string;
|
18
|
-
team: Team | null;
|
19
|
-
guildId?: string;
|
20
|
-
guild?: Guild;
|
21
|
-
primarySKUId?: string;
|
22
|
-
slug?: string;
|
23
|
-
coverImage?: string;
|
24
|
-
flags?: ApplicationFlags;
|
25
|
-
approximateGuildCount?: number;
|
26
|
-
redirectURIs?: Array<string>;
|
27
|
-
interactionsEndpointURL?: string;
|
28
|
-
roleConnectionsVerificationURL?: string;
|
29
|
-
tags?: Array<string>;
|
30
|
-
installParams?: JSONInstallParams;
|
31
|
-
customInstallURL?: string;
|
32
|
-
constructor(data: RawApplication, client: Client);
|
33
|
-
protected patch(data: RawApplication): void;
|
34
|
-
/** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
|
35
|
-
createGlobalApplicationCommand(options: {
|
36
|
-
name: string;
|
37
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
38
|
-
description?: string;
|
39
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
40
|
-
options?: Array<JSONApplicationCommandOption>;
|
41
|
-
defaultMemberPermissions?: string | null;
|
42
|
-
dmPermission?: boolean;
|
43
|
-
defaultPermission?: boolean | null;
|
44
|
-
type?: ApplicationCommandTypes;
|
45
|
-
nsfw?: boolean;
|
46
|
-
}): Promise<ApplicationCommand>;
|
47
|
-
/** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
|
48
|
-
createGuildApplicationCommand(guildId: string, options: {
|
49
|
-
name: string;
|
50
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
51
|
-
description?: string;
|
52
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
53
|
-
options?: Array<JSONApplicationCommandOption>;
|
54
|
-
defaultMemberPermissions?: string | null;
|
55
|
-
dmPermission?: boolean;
|
56
|
-
defaultPermission?: boolean | null;
|
57
|
-
type?: ApplicationCommandTypes;
|
58
|
-
nsfw?: boolean;
|
59
|
-
}): Promise<ApplicationCommand>;
|
60
|
-
/** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
|
61
|
-
createTestEntitlement(options: {
|
62
|
-
skuId: string;
|
63
|
-
ownerId: string;
|
64
|
-
ownerType: number;
|
65
|
-
}): Promise<TestEntitlement>;
|
66
|
-
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
67
|
-
deleteGlobalApplicationCommand(commandId: string): void;
|
68
|
-
/** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
|
69
|
-
deleteGuildApplicationCommand(guildId: string, commandId: string): void;
|
70
|
-
/** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
|
71
|
-
deleteTestEntitlement(entitlementId: string): void;
|
72
|
-
/** https://discord.com/developers/docs/resources/application#edit-current-application */
|
73
|
-
edit(options: {
|
74
|
-
customInstallURL?: string;
|
75
|
-
description?: string;
|
76
|
-
roleConnectionsVerificationURL?: string;
|
77
|
-
installParams?: JSONInstallParams;
|
78
|
-
flags?: ApplicationFlags;
|
79
|
-
icon?: string;
|
80
|
-
coverImage?: string;
|
81
|
-
interactionsEndpointURL?: string;
|
82
|
-
tags?: Array<string>;
|
83
|
-
}): Promise<Application>;
|
84
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
|
85
|
-
editApplicationCommandPermissions(guildId: string, commandId: string, options: {
|
86
|
-
permissions: Array<JSONGuildApplicationCommandPermissions>;
|
87
|
-
}): Promise<JSONGuildApplicationCommandPermissions>;
|
88
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
|
89
|
-
editGlobalApplicationCommand(commandId: string, options: {
|
90
|
-
name?: string;
|
91
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
92
|
-
description?: string;
|
93
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
94
|
-
options?: Array<JSONApplicationCommandOption>;
|
95
|
-
defaultMemberPermissions?: string | null;
|
96
|
-
defaultPermission?: boolean | null;
|
97
|
-
dmPermission?: boolean;
|
98
|
-
nsfw?: boolean;
|
99
|
-
}): Promise<ApplicationCommand>;
|
100
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
|
101
|
-
editGuildApplicationCommand(guildId: string, commandId: string, options: {
|
102
|
-
name?: string;
|
103
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
104
|
-
description?: string;
|
105
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
106
|
-
options?: Array<JSONApplicationCommandOption>;
|
107
|
-
defaultMemberPermissions?: string | null;
|
108
|
-
defaultPermission?: boolean | null;
|
109
|
-
dmPermission?: boolean;
|
110
|
-
nsfw?: boolean;
|
111
|
-
}): Promise<ApplicationCommand>;
|
112
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
|
113
|
-
getApplicationCommandPermissions(guildId: string, commandId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
|
114
|
-
/** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
|
115
|
-
getEntitlements(options?: {
|
116
|
-
userId?: string;
|
117
|
-
skuIds?: Array<string>;
|
118
|
-
before?: string;
|
119
|
-
after?: string;
|
120
|
-
limit?: number;
|
121
|
-
guildId?: string;
|
122
|
-
excludeEnded?: boolean;
|
123
|
-
}): Promise<Array<Entitlement>>;
|
124
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
|
125
|
-
getGlobalApplicationCommand(commandId: string): Promise<ApplicationCommand>;
|
126
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
|
127
|
-
getGlobalApplicationCommands(options: {
|
128
|
-
withLocalizations?: boolean;
|
129
|
-
}): Promise<Array<ApplicationCommand>>;
|
130
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
|
131
|
-
getGuildApplicationCommand(guildId: string, commandId: string): Promise<ApplicationCommand>;
|
132
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
|
133
|
-
getGuildApplicationCommands(guildId: string, options?: {
|
134
|
-
withLocalizations?: boolean;
|
135
|
-
}): Promise<Array<ApplicationCommand>>;
|
136
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
|
137
|
-
getGuildApplicationCommandPermissions(guildId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
|
138
|
-
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
|
139
|
-
getApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
|
140
|
-
/** https://discord.com/developers/docs/monetization/skus#list-skus */
|
141
|
-
getSKUs(): Promise<Array<SKU>>;
|
142
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
143
|
-
setGlobalApplicationCommands(commands: Array<{
|
144
|
-
id?: string;
|
145
|
-
name: string;
|
146
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
147
|
-
description?: string;
|
148
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
149
|
-
options?: Array<JSONApplicationCommandOption>;
|
150
|
-
defaultMemberPermissions?: string | null;
|
151
|
-
dmPermission?: boolean;
|
152
|
-
defaultPermission?: boolean | null;
|
153
|
-
type?: ApplicationCommandTypes;
|
154
|
-
nsfw?: boolean;
|
155
|
-
}>): Promise<Array<ApplicationCommand>>;
|
156
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
157
|
-
setGuildApplicationCommands(guildId: string, commands: Array<{
|
158
|
-
id?: string;
|
159
|
-
name: string;
|
160
|
-
nameLocalizations?: Partial<Record<Locales, string>> | null;
|
161
|
-
description?: string;
|
162
|
-
descriptionLocalizations?: Partial<Record<Locales, string>> | null;
|
163
|
-
options?: Array<JSONApplicationCommandOption>;
|
164
|
-
defaultMemberPermissions?: string | null;
|
165
|
-
dmPermission?: boolean;
|
166
|
-
defaultPermission?: boolean | null;
|
167
|
-
type: ApplicationCommandTypes;
|
168
|
-
nsfw?: boolean;
|
169
|
-
}>): Promise<Array<ApplicationCommand>>;
|
170
|
-
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
171
|
-
updateApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
|
172
|
-
toRaw(): RawApplication;
|
173
|
-
toJSON(): JSONApplication;
|
174
|
-
}
|
@@ -1,328 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Application = void 0;
|
4
|
-
const _1 = require(".");
|
5
|
-
const rest_1 = require("../rest");
|
6
|
-
/** https://discord.com/developers/docs/resources/application */
|
7
|
-
class Application extends _1.IdentifiableBase {
|
8
|
-
raw;
|
9
|
-
name;
|
10
|
-
icon;
|
11
|
-
description;
|
12
|
-
rpcOrigins;
|
13
|
-
botPublic;
|
14
|
-
botRequireCodeGrant;
|
15
|
-
termsOfServiceURL;
|
16
|
-
privacyPolicyURL;
|
17
|
-
owner;
|
18
|
-
verifyKey;
|
19
|
-
team;
|
20
|
-
guildId;
|
21
|
-
guild;
|
22
|
-
primarySKUId;
|
23
|
-
slug;
|
24
|
-
coverImage;
|
25
|
-
flags;
|
26
|
-
approximateGuildCount;
|
27
|
-
redirectURIs;
|
28
|
-
interactionsEndpointURL;
|
29
|
-
roleConnectionsVerificationURL;
|
30
|
-
tags;
|
31
|
-
installParams;
|
32
|
-
customInstallURL;
|
33
|
-
constructor(data, client) {
|
34
|
-
super(data.id, client);
|
35
|
-
this.raw = data;
|
36
|
-
this.name = data.name;
|
37
|
-
this.icon = data.icon;
|
38
|
-
this.description = data.description;
|
39
|
-
this.botPublic = data.bot_public;
|
40
|
-
this.botRequireCodeGrant = data.bot_require_code_grant;
|
41
|
-
this.verifyKey = data.verify_key;
|
42
|
-
this.team = null;
|
43
|
-
this.patch(data);
|
44
|
-
}
|
45
|
-
patch(data) {
|
46
|
-
if (data.rpc_origins !== undefined)
|
47
|
-
this.rpcOrigins = data.rpc_origins;
|
48
|
-
if (data.terms_of_service_url !== undefined)
|
49
|
-
this.termsOfServiceURL = data.terms_of_service_url;
|
50
|
-
if (data.owner !== undefined)
|
51
|
-
this.owner = new _1.User(data.owner, this.client);
|
52
|
-
if (data.team !== undefined)
|
53
|
-
this.team = data.team !== null ? new _1.Team(data.team, this.client) : null;
|
54
|
-
if (data.guild_id !== undefined)
|
55
|
-
this.guildId = data.guild_id;
|
56
|
-
if (data.guild !== undefined)
|
57
|
-
this.guild = new _1.Guild(data.guild, this.client);
|
58
|
-
if (data.primary_sku_id !== undefined)
|
59
|
-
this.primarySKUId = data.primary_sku_id;
|
60
|
-
if (data.slug !== undefined)
|
61
|
-
this.slug = data.slug;
|
62
|
-
if (data.cover_image !== undefined)
|
63
|
-
this.coverImage = data.cover_image;
|
64
|
-
if (data.flags !== undefined)
|
65
|
-
this.flags = data.flags;
|
66
|
-
if (data.approximate_guild_count !== undefined)
|
67
|
-
this.approximateGuildCount = data.approximate_guild_count;
|
68
|
-
if (data.redirect_uris !== undefined)
|
69
|
-
this.redirectURIs = data.redirect_uris;
|
70
|
-
if (data.interactions_endpoint_url !== undefined)
|
71
|
-
this.interactionsEndpointURL = data.interactions_endpoint_url;
|
72
|
-
if (data.role_connections_verification_url !== undefined)
|
73
|
-
this.roleConnectionsVerificationURL =
|
74
|
-
data.role_connections_verification_url;
|
75
|
-
if (data.tags !== undefined)
|
76
|
-
this.tags = data.tags;
|
77
|
-
if (data.install_params !== undefined)
|
78
|
-
this.installParams = data.install_params;
|
79
|
-
if (data.custom_install_url !== undefined)
|
80
|
-
this.customInstallURL = data.custom_install_url;
|
81
|
-
}
|
82
|
-
/** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
|
83
|
-
async createGlobalApplicationCommand(options) {
|
84
|
-
return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationCommands(this.id), {
|
85
|
-
json: this.client.util.applicationCommandToRaw(options),
|
86
|
-
}), this.client);
|
87
|
-
}
|
88
|
-
/** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
|
89
|
-
async createGuildApplicationCommand(guildId, options) {
|
90
|
-
return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
|
91
|
-
json: this.client.util.applicationCommandToRaw(options),
|
92
|
-
}), this.client);
|
93
|
-
}
|
94
|
-
/** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
|
95
|
-
async createTestEntitlement(options) {
|
96
|
-
return new _1.TestEntitlement(await this.client.rest.post(rest_1.Endpoints.applicationEntitlements(this.id), {
|
97
|
-
json: {
|
98
|
-
sku_id: options.skuId,
|
99
|
-
owner_id: options.ownerId,
|
100
|
-
owner_type: options.ownerType,
|
101
|
-
},
|
102
|
-
}), this.client);
|
103
|
-
}
|
104
|
-
/** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
|
105
|
-
deleteGlobalApplicationCommand(commandId) {
|
106
|
-
this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.id, commandId));
|
107
|
-
}
|
108
|
-
/** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
|
109
|
-
deleteGuildApplicationCommand(guildId, commandId) {
|
110
|
-
this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId));
|
111
|
-
}
|
112
|
-
/** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
|
113
|
-
deleteTestEntitlement(entitlementId) {
|
114
|
-
this.client.rest.delete(rest_1.Endpoints.applicationEntitlement(this.id, entitlementId));
|
115
|
-
}
|
116
|
-
/** https://discord.com/developers/docs/resources/application#edit-current-application */
|
117
|
-
async edit(options) {
|
118
|
-
return new Application(await this.client.rest.patch(rest_1.Endpoints.applicationCurrentUser(), {
|
119
|
-
json: {
|
120
|
-
custom_install_url: options.customInstallURL,
|
121
|
-
description: options.description,
|
122
|
-
role_connections_verification_url: options.roleConnectionsVerificationURL,
|
123
|
-
install_params: options.installParams,
|
124
|
-
flags: options.flags,
|
125
|
-
icon: options.icon,
|
126
|
-
cover_image: options.coverImage,
|
127
|
-
interactions_endpoint_url: options.interactionsEndpointURL,
|
128
|
-
tags: options.tags,
|
129
|
-
},
|
130
|
-
}), this.client);
|
131
|
-
}
|
132
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
|
133
|
-
async editApplicationCommandPermissions(guildId, commandId, options) {
|
134
|
-
return this.client.rest
|
135
|
-
.put(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId), {
|
136
|
-
json: {
|
137
|
-
permissions: options.permissions.map((option) => ({
|
138
|
-
id: option.id,
|
139
|
-
application_id: option.applicationId,
|
140
|
-
guild_id: option.guildId,
|
141
|
-
permissions: option.permissions.map((permission) => ({
|
142
|
-
id: permission.id,
|
143
|
-
type: permission.type,
|
144
|
-
permission: permission.permission,
|
145
|
-
})),
|
146
|
-
})),
|
147
|
-
},
|
148
|
-
})
|
149
|
-
.then((response) => ({
|
150
|
-
id: response.id,
|
151
|
-
applicationId: response.application_id,
|
152
|
-
guildId: response.guild_id,
|
153
|
-
permissions: response.permissions.map((permission) => ({
|
154
|
-
id: permission.id,
|
155
|
-
type: permission.type,
|
156
|
-
permission: permission.permission,
|
157
|
-
})),
|
158
|
-
}));
|
159
|
-
}
|
160
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
|
161
|
-
async editGlobalApplicationCommand(commandId, options) {
|
162
|
-
return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationCommand(this.id, commandId), {
|
163
|
-
json: this.client.util.applicationCommandToRaw(options),
|
164
|
-
}), this.client);
|
165
|
-
}
|
166
|
-
/** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
|
167
|
-
async editGuildApplicationCommand(guildId, commandId, options) {
|
168
|
-
return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId), {
|
169
|
-
json: this.client.util.applicationCommandToRaw(options),
|
170
|
-
}), this.client);
|
171
|
-
}
|
172
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
|
173
|
-
async getApplicationCommandPermissions(guildId, commandId) {
|
174
|
-
return this.client.rest
|
175
|
-
.get(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId))
|
176
|
-
.then((response) => response.map((permissions) => ({
|
177
|
-
id: permissions.id,
|
178
|
-
applicationId: permissions.application_id,
|
179
|
-
guildId: permissions.guild_id,
|
180
|
-
permissions: permissions.permissions.map((permission) => ({
|
181
|
-
id: permission.id,
|
182
|
-
type: permission.type,
|
183
|
-
permission: permission.permission,
|
184
|
-
})),
|
185
|
-
})));
|
186
|
-
}
|
187
|
-
/** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
|
188
|
-
async getEntitlements(options) {
|
189
|
-
return this.client.rest
|
190
|
-
.get(rest_1.Endpoints.applicationEntitlements(this.id), {
|
191
|
-
query: {
|
192
|
-
user_id: options?.userId,
|
193
|
-
sku_ids: options?.skuIds,
|
194
|
-
before: options?.before,
|
195
|
-
after: options?.after,
|
196
|
-
limit: options?.limit,
|
197
|
-
guild_id: options?.guildId,
|
198
|
-
exclude_ended: options?.excludeEnded,
|
199
|
-
},
|
200
|
-
})
|
201
|
-
.then((response) => response.map((data) => new _1.Entitlement(data, this.client)));
|
202
|
-
}
|
203
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
|
204
|
-
async getGlobalApplicationCommand(commandId) {
|
205
|
-
return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationCommand(this.id, commandId)), this.client);
|
206
|
-
}
|
207
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
|
208
|
-
async getGlobalApplicationCommands(options) {
|
209
|
-
return this.client.rest
|
210
|
-
.get(rest_1.Endpoints.applicationCommands(this.id), {
|
211
|
-
query: {
|
212
|
-
with_localizations: options.withLocalizations,
|
213
|
-
},
|
214
|
-
})
|
215
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
216
|
-
}
|
217
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
|
218
|
-
async getGuildApplicationCommand(guildId, commandId) {
|
219
|
-
return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId)), this.client);
|
220
|
-
}
|
221
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
|
222
|
-
async getGuildApplicationCommands(guildId, options) {
|
223
|
-
return this.client.rest
|
224
|
-
.get(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
|
225
|
-
query: {
|
226
|
-
with_localizations: options?.withLocalizations,
|
227
|
-
},
|
228
|
-
})
|
229
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
230
|
-
}
|
231
|
-
/** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
|
232
|
-
async getGuildApplicationCommandPermissions(guildId) {
|
233
|
-
return this.client.rest
|
234
|
-
.get(rest_1.Endpoints.guildApplicationCommandsPermissions(this.id, guildId))
|
235
|
-
.then((response) => response.map((permissions) => ({
|
236
|
-
id: permissions.id,
|
237
|
-
applicationId: permissions.application_id,
|
238
|
-
guildId: permissions.guild_id,
|
239
|
-
permissions: permissions.permissions.map((permission) => ({
|
240
|
-
id: permission.id,
|
241
|
-
type: permission.type,
|
242
|
-
permission: permission.permission,
|
243
|
-
})),
|
244
|
-
})));
|
245
|
-
}
|
246
|
-
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
|
247
|
-
async getApplicationRoleConnectionMetadataRecords() {
|
248
|
-
return this.client.rest
|
249
|
-
.get(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
|
250
|
-
.then((response) => response.map((data) => ({
|
251
|
-
type: data.type,
|
252
|
-
key: data.key,
|
253
|
-
name: data.name,
|
254
|
-
nameLocalizations: data.name_localizations,
|
255
|
-
description: data.description,
|
256
|
-
descriptionLocalizations: data.description_localizations,
|
257
|
-
})));
|
258
|
-
}
|
259
|
-
/** https://discord.com/developers/docs/monetization/skus#list-skus */
|
260
|
-
async getSKUs() {
|
261
|
-
return this.client.rest
|
262
|
-
.get(rest_1.Endpoints.applicationSKUs(this.id))
|
263
|
-
.then((response) => response.map((data) => new _1.SKU(data, this.client)));
|
264
|
-
}
|
265
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
266
|
-
async setGlobalApplicationCommands(commands) {
|
267
|
-
return this.client.rest
|
268
|
-
.put(rest_1.Endpoints.applicationCommands(this.id), {
|
269
|
-
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
270
|
-
})
|
271
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
272
|
-
}
|
273
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
274
|
-
async setGuildApplicationCommands(guildId, commands) {
|
275
|
-
return this.client.rest
|
276
|
-
.put(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
|
277
|
-
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
278
|
-
})
|
279
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
280
|
-
}
|
281
|
-
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
282
|
-
async updateApplicationRoleConnectionMetadataRecords() {
|
283
|
-
return this.client.rest
|
284
|
-
.put(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
|
285
|
-
.then((response) => response.map((data) => ({
|
286
|
-
type: data.type,
|
287
|
-
key: data.key,
|
288
|
-
name: data.name,
|
289
|
-
nameLocalizations: data.name_localizations,
|
290
|
-
description: data.description,
|
291
|
-
descriptionLocalizations: data.description_localizations,
|
292
|
-
})));
|
293
|
-
}
|
294
|
-
toRaw() {
|
295
|
-
return this.raw;
|
296
|
-
}
|
297
|
-
toJSON() {
|
298
|
-
return {
|
299
|
-
...super.toJSON(),
|
300
|
-
name: this.name,
|
301
|
-
icon: this.icon,
|
302
|
-
description: this.description,
|
303
|
-
rpcOrigins: this.rpcOrigins,
|
304
|
-
botPublic: this.botPublic,
|
305
|
-
botRequireCodeGrant: this.botRequireCodeGrant,
|
306
|
-
termsOfServiceURL: this.termsOfServiceURL,
|
307
|
-
privacyPolicyURL: this.privacyPolicyURL,
|
308
|
-
owner: this.owner?.toJSON(),
|
309
|
-
verifyKey: this.verifyKey,
|
310
|
-
team: this.team?.toJSON() ?? null,
|
311
|
-
guildId: this.guildId,
|
312
|
-
guild: this.guild?.toJSON(),
|
313
|
-
primarySKUId: this.primarySKUId,
|
314
|
-
slug: this.slug,
|
315
|
-
coverImage: this.coverImage,
|
316
|
-
flags: this.flags,
|
317
|
-
approximateGuildCount: this.approximateGuildCount,
|
318
|
-
redirectURIs: this.redirectURIs,
|
319
|
-
interactionsEndpointURL: this.interactionsEndpointURL,
|
320
|
-
roleConnectionsVerificationURL: this.roleConnectionsVerificationURL,
|
321
|
-
tags: this.tags,
|
322
|
-
installParams: this.installParams,
|
323
|
-
customInstallURL: this.customInstallURL,
|
324
|
-
};
|
325
|
-
}
|
326
|
-
}
|
327
|
-
exports.Application = Application;
|
328
|
-
//# sourceMappingURL=Application.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../lib/structures/Application.ts"],"names":[],"mappings":";;;AAAA,wBASW;AAeX,kCAAoC;AAOpC,gEAAgE;AAChE,MAAa,WAAY,SAAQ,mBAAgB;IAC5B,GAAG,CAAiB;IAEvC,IAAI,CAAS;IACb,IAAI,CAAgB;IACpB,WAAW,CAAS;IACpB,UAAU,CAAiB;IAC3B,SAAS,CAAU;IACnB,mBAAmB,CAAU;IAC7B,iBAAiB,CAAU;IAC3B,gBAAgB,CAAU;IAC1B,KAAK,CAAQ;IACb,SAAS,CAAS;IAClB,IAAI,CAAc;IAClB,OAAO,CAAU;IACjB,KAAK,CAAS;IACd,YAAY,CAAU;IACtB,IAAI,CAAU;IACd,UAAU,CAAU;IACpB,KAAK,CAAoB;IACzB,qBAAqB,CAAU;IAC/B,YAAY,CAAiB;IAC7B,uBAAuB,CAAU;IACjC,8BAA8B,CAAU;IACxC,IAAI,CAAiB;IACrB,aAAa,CAAqB;IAClC,gBAAgB,CAAU;IAE1B,YAAY,IAAoB,EAAE,MAAc;QAC9C,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,CAAC,IAAI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