disgroove 1.3.1-dev.6068992 → 1.3.1-dev.71905cd
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/Client.d.ts +1 -2
- package/dist/Client.js +0 -2
- package/dist/Client.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/gateway/Shard.js +3 -68
- package/dist/gateway/Shard.js.map +1 -1
- package/dist/gateway/ShardsManager.d.ts +1 -2
- package/dist/gateway/ShardsManager.js +1 -2
- package/dist/gateway/ShardsManager.js.map +1 -1
- package/dist/rest/RequestsManager.js +1 -1
- package/dist/structures/Application.d.ts +35 -209
- package/dist/structures/Application.js +16 -16
- package/dist/structures/Application.js.map +1 -1
- package/dist/structures/ApplicationCommand.d.ts +3 -32
- package/dist/structures/ApplicationCommand.js.map +1 -1
- package/dist/structures/AuditLog.d.ts +8 -9
- package/dist/structures/AuditLog.js +42 -71
- package/dist/structures/AuditLog.js.map +1 -1
- package/dist/structures/ClientApplication.d.ts +34 -208
- package/dist/structures/ClientApplication.js +16 -16
- package/dist/structures/ClientApplication.js.map +1 -1
- package/dist/structures/Guild.d.ts +28 -116
- package/dist/structures/Guild.js +32 -93
- package/dist/structures/Guild.js.map +1 -1
- package/dist/structures/Interaction.js +6 -7
- package/dist/structures/Interaction.js.map +1 -1
- package/dist/structures/Message.js +6 -7
- package/dist/structures/Message.js.map +1 -1
- package/dist/types/audit-log.d.ts +8 -9
- package/dist/types/gateway-events.d.ts +7 -8
- package/dist/types/guild.d.ts +2 -3
- package/dist/types/interaction.d.ts +6 -7
- package/dist/utils/Util.d.ts +3 -1
- package/dist/utils/Util.js +30 -0
- package/dist/utils/Util.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/test/index.ts +72 -0
- package/test/voice1.ts +67 -0
- package/test/voice2.ts +60 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AuditLog.js","sourceRoot":"","sources":["../../src/structures/AuditLog.ts"],"names":[],"mappings":";;;AAAA,wBAQW;
|
1
|
+
{"version":3,"file":"AuditLog.js","sourceRoot":"","sources":["../../src/structures/AuditLog.ts"],"names":[],"mappings":";;;AAAA,wBAQW;AAIX,8DAA8D;AAC9D,MAAa,QAAQ;IACX,MAAM,CAAS;IACf,GAAG,CAAc;IACzB,mBAAmB,CAA4B;IAC/C,eAAe,CAA2B;IAC1C,mBAAmB,CAA4B;IAC/C,oBAAoB,CAA6B;IACjD,YAAY,CAAqB;IACjC,OAAO,CAAiB;IACxB,KAAK,CAAc;IACnB,QAAQ,CAAiB;IAEzB,YAAY,IAAiB,EAAE,MAAc;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CACtD,CAAC,kBAAkB,EAAE,EAAE,CACrB,IAAI,qBAAkB,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,CAC1D,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;YACpE,QAAQ,EAAE,aAAa,CAAC,SAAS;YACjC,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAC/C,QAAQ,EAAE,MAAM,CAAC,SAAS;gBAC1B,QAAQ,EAAE,MAAM,CAAC,SAAS;gBAC1B,GAAG,EAAE,MAAM,CAAC,GAAG;aAChB,CAAC,CAAC;YACH,MAAM,EAAE,aAAa,CAAC,OAAO;YAC7B,EAAE,EAAE,aAAa,CAAC,EAAE;YACpB,UAAU,EAAE,aAAa,CAAC,WAAW;YACrC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rB;YACD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACtD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;SAC3D,CAAC;IACJ,CAAC;CACF;AAlGD,4BAkGC"}
|
@@ -1,134 +1,19 @@
|
|
1
1
|
import { Base, ApplicationCommand, Application, SKU, Entitlement, TestEntitlement } from ".";
|
2
|
-
import type { JSONGuildApplicationCommandPermissions, RawApplication, JSONApplication,
|
2
|
+
import type { JSONGuildApplicationCommandPermissions, RawApplication, JSONApplication, JSONApplicationRoleConnectionMetadata, JSONInstallParams, JSONApplicationCommandOption } from "../types";
|
3
3
|
import type { Client } from "../Client";
|
4
|
-
import type {
|
4
|
+
import type { ApplicationCommandTypes, ApplicationFlags, Locale } from "../constants";
|
5
5
|
export declare class ClientApplication extends Base {
|
6
6
|
protected raw: Pick<RawApplication, "id" | "flags">;
|
7
7
|
flags?: ApplicationFlags;
|
8
8
|
constructor(data: Pick<RawApplication, "id" | "flags">, client: Client);
|
9
9
|
protected patch(data: Pick<RawApplication, "id" | "flags">): void;
|
10
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
11
|
-
bulkEditGlobalApplicationCommands(commands: Array<{
|
12
|
-
id?: string;
|
13
|
-
name: string;
|
14
|
-
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
15
|
-
description?: string;
|
16
|
-
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
17
|
-
options?: Array<{
|
18
|
-
type: ApplicationCommandOptionType;
|
19
|
-
name: string;
|
20
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
21
|
-
description: string;
|
22
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
23
|
-
required?: boolean;
|
24
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
25
|
-
options?: Array<{
|
26
|
-
type: ApplicationCommandOptionType;
|
27
|
-
name: string;
|
28
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
29
|
-
description: string;
|
30
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
31
|
-
required?: boolean;
|
32
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
33
|
-
channelTypes?: Array<ChannelTypes>;
|
34
|
-
minValue?: number;
|
35
|
-
maxValue?: number;
|
36
|
-
minLength?: number;
|
37
|
-
maxLength?: number;
|
38
|
-
autocomplete?: boolean;
|
39
|
-
}>;
|
40
|
-
channelTypes?: Array<ChannelTypes>;
|
41
|
-
minValue?: number;
|
42
|
-
maxValue?: number;
|
43
|
-
minLength?: number;
|
44
|
-
maxLength?: number;
|
45
|
-
autocomplete?: boolean;
|
46
|
-
}>;
|
47
|
-
defaultMemberPermissions?: string | null;
|
48
|
-
dmPermission?: boolean;
|
49
|
-
defaultPermission?: boolean | null;
|
50
|
-
type?: ApplicationCommandTypes;
|
51
|
-
nsfw?: boolean;
|
52
|
-
}>): Promise<Array<ApplicationCommand>>;
|
53
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
54
|
-
bulkEditGuildApplicationCommands(guildId: string, commands: Array<{
|
55
|
-
id?: string;
|
56
|
-
name?: string;
|
57
|
-
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
58
|
-
description?: string;
|
59
|
-
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
60
|
-
options?: Array<{
|
61
|
-
type: ApplicationCommandOptionType;
|
62
|
-
name: string;
|
63
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
64
|
-
description: string;
|
65
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
66
|
-
required?: boolean;
|
67
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
68
|
-
options?: Array<{
|
69
|
-
type: ApplicationCommandOptionType;
|
70
|
-
name: string;
|
71
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
72
|
-
description: string;
|
73
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
74
|
-
required?: boolean;
|
75
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
76
|
-
channelTypes?: Array<ChannelTypes>;
|
77
|
-
minValue?: number;
|
78
|
-
maxValue?: number;
|
79
|
-
minLength?: number;
|
80
|
-
maxLength?: number;
|
81
|
-
autocomplete?: boolean;
|
82
|
-
}>;
|
83
|
-
channelTypes?: Array<ChannelTypes>;
|
84
|
-
minValue?: number;
|
85
|
-
maxValue?: number;
|
86
|
-
minLength?: number;
|
87
|
-
maxLength?: number;
|
88
|
-
autocomplete?: boolean;
|
89
|
-
}>;
|
90
|
-
defaultMemberPermissions?: string | null;
|
91
|
-
dmPermission?: boolean;
|
92
|
-
defaultPermission?: boolean | null;
|
93
|
-
type: ApplicationCommandTypes;
|
94
|
-
nsfw?: boolean;
|
95
|
-
}>): Promise<Array<ApplicationCommand>>;
|
96
10
|
/** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
|
97
11
|
createGlobalApplicationCommand(options: {
|
98
12
|
name: string;
|
99
13
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
100
14
|
description?: string;
|
101
15
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
102
|
-
options?: Array<
|
103
|
-
type: ApplicationCommandOptionType;
|
104
|
-
name: string;
|
105
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
106
|
-
description: string;
|
107
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
108
|
-
required?: boolean;
|
109
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
110
|
-
options?: Array<{
|
111
|
-
type: ApplicationCommandOptionType;
|
112
|
-
name: string;
|
113
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
114
|
-
description: string;
|
115
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
116
|
-
required?: boolean;
|
117
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
118
|
-
channelTypes?: Array<ChannelTypes>;
|
119
|
-
minValue?: number;
|
120
|
-
maxValue?: number;
|
121
|
-
minLength?: number;
|
122
|
-
maxLength?: number;
|
123
|
-
autocomplete?: boolean;
|
124
|
-
}>;
|
125
|
-
channelTypes?: Array<ChannelTypes>;
|
126
|
-
minValue?: number;
|
127
|
-
maxValue?: number;
|
128
|
-
minLength?: number;
|
129
|
-
maxLength?: number;
|
130
|
-
autocomplete?: boolean;
|
131
|
-
}>;
|
16
|
+
options?: Array<JSONApplicationCommandOption>;
|
132
17
|
defaultMemberPermissions?: string | null;
|
133
18
|
dmPermission?: boolean;
|
134
19
|
defaultPermission?: boolean | null;
|
@@ -141,36 +26,7 @@ export declare class ClientApplication extends Base {
|
|
141
26
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
142
27
|
description?: string;
|
143
28
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
144
|
-
options?: Array<
|
145
|
-
type: ApplicationCommandOptionType;
|
146
|
-
name: string;
|
147
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
148
|
-
description: string;
|
149
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
150
|
-
required?: boolean;
|
151
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
152
|
-
options?: Array<{
|
153
|
-
type: ApplicationCommandOptionType;
|
154
|
-
name: string;
|
155
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
156
|
-
description: string;
|
157
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
158
|
-
required?: boolean;
|
159
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
160
|
-
channelTypes?: Array<ChannelTypes>;
|
161
|
-
minValue?: number;
|
162
|
-
maxValue?: number;
|
163
|
-
minLength?: number;
|
164
|
-
maxLength?: number;
|
165
|
-
autocomplete?: boolean;
|
166
|
-
}>;
|
167
|
-
channelTypes?: Array<ChannelTypes>;
|
168
|
-
minValue?: number;
|
169
|
-
maxValue?: number;
|
170
|
-
minLength?: number;
|
171
|
-
maxLength?: number;
|
172
|
-
autocomplete?: boolean;
|
173
|
-
}>;
|
29
|
+
options?: Array<JSONApplicationCommandOption>;
|
174
30
|
defaultMemberPermissions?: string | null;
|
175
31
|
dmPermission?: boolean;
|
176
32
|
defaultPermission?: boolean | null;
|
@@ -211,36 +67,7 @@ export declare class ClientApplication extends Base {
|
|
211
67
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
212
68
|
description?: string;
|
213
69
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
214
|
-
options?: Array<
|
215
|
-
type: ApplicationCommandOptionType;
|
216
|
-
name: string;
|
217
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
218
|
-
description: string;
|
219
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
220
|
-
required?: boolean;
|
221
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
222
|
-
options?: Array<{
|
223
|
-
type: ApplicationCommandOptionType;
|
224
|
-
name: string;
|
225
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
226
|
-
description: string;
|
227
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
228
|
-
required?: boolean;
|
229
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
230
|
-
channelTypes?: Array<ChannelTypes>;
|
231
|
-
minValue?: number;
|
232
|
-
maxValue?: number;
|
233
|
-
minLength?: number;
|
234
|
-
maxLength?: number;
|
235
|
-
autocomplete?: boolean;
|
236
|
-
}>;
|
237
|
-
channelTypes?: Array<ChannelTypes>;
|
238
|
-
minValue?: number;
|
239
|
-
maxValue?: number;
|
240
|
-
minLength?: number;
|
241
|
-
maxLength?: number;
|
242
|
-
autocomplete?: boolean;
|
243
|
-
}>;
|
70
|
+
options?: Array<JSONApplicationCommandOption>;
|
244
71
|
defaultMemberPermissions?: string | null;
|
245
72
|
defaultPermission?: boolean | null;
|
246
73
|
dmPermission?: boolean;
|
@@ -252,36 +79,7 @@ export declare class ClientApplication extends Base {
|
|
252
79
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
253
80
|
description?: string;
|
254
81
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
255
|
-
options?: Array<
|
256
|
-
type: ApplicationCommandOptionType;
|
257
|
-
name: string;
|
258
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
259
|
-
description: string;
|
260
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
261
|
-
required?: boolean;
|
262
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
263
|
-
options?: Array<{
|
264
|
-
type: ApplicationCommandOptionType;
|
265
|
-
name: string;
|
266
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
267
|
-
description: string;
|
268
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
269
|
-
required?: boolean;
|
270
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
271
|
-
channelTypes?: Array<ChannelTypes>;
|
272
|
-
minValue?: number;
|
273
|
-
maxValue?: number;
|
274
|
-
minLength?: number;
|
275
|
-
maxLength?: number;
|
276
|
-
autocomplete?: boolean;
|
277
|
-
}>;
|
278
|
-
channelTypes?: Array<ChannelTypes>;
|
279
|
-
minValue?: number;
|
280
|
-
maxValue?: number;
|
281
|
-
minLength?: number;
|
282
|
-
maxLength?: number;
|
283
|
-
autocomplete?: boolean;
|
284
|
-
}>;
|
82
|
+
options?: Array<JSONApplicationCommandOption>;
|
285
83
|
defaultMemberPermissions?: string | null;
|
286
84
|
defaultPermission?: boolean | null;
|
287
85
|
dmPermission?: boolean;
|
@@ -317,6 +115,34 @@ export declare class ClientApplication extends Base {
|
|
317
115
|
getApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
|
318
116
|
/** https://discord.com/developers/docs/monetization/skus#list-skus */
|
319
117
|
getSKUs(): Promise<Array<SKU>>;
|
118
|
+
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
119
|
+
setGlobalApplicationCommands(commands: Array<{
|
120
|
+
id?: string;
|
121
|
+
name: string;
|
122
|
+
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
123
|
+
description?: string;
|
124
|
+
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
125
|
+
options?: Array<JSONApplicationCommandOption>;
|
126
|
+
defaultMemberPermissions?: string | null;
|
127
|
+
dmPermission?: boolean;
|
128
|
+
defaultPermission?: boolean | null;
|
129
|
+
type?: ApplicationCommandTypes;
|
130
|
+
nsfw?: boolean;
|
131
|
+
}>): Promise<Array<ApplicationCommand>>;
|
132
|
+
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
133
|
+
setGuildApplicationCommands(guildId: string, commands: Array<{
|
134
|
+
id?: string;
|
135
|
+
name?: string;
|
136
|
+
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
137
|
+
description?: string;
|
138
|
+
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
139
|
+
options?: Array<JSONApplicationCommandOption>;
|
140
|
+
defaultMemberPermissions?: string | null;
|
141
|
+
dmPermission?: boolean;
|
142
|
+
defaultPermission?: boolean | null;
|
143
|
+
type: ApplicationCommandTypes;
|
144
|
+
nsfw?: boolean;
|
145
|
+
}>): Promise<Array<ApplicationCommand>>;
|
320
146
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
321
147
|
updateApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
|
322
148
|
toRaw(): Pick<RawApplication, "id" | "flags">;
|
@@ -15,22 +15,6 @@ class ClientApplication extends _1.Base {
|
|
15
15
|
if (data.flags !== undefined)
|
16
16
|
this.flags = data.flags;
|
17
17
|
}
|
18
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
19
|
-
async bulkEditGlobalApplicationCommands(commands) {
|
20
|
-
return this.client.rest
|
21
|
-
.put(rest_1.Endpoints.applicationCommands(this.id), {
|
22
|
-
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
23
|
-
})
|
24
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
25
|
-
}
|
26
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
27
|
-
async bulkEditGuildApplicationCommands(guildId, commands) {
|
28
|
-
return this.client.rest
|
29
|
-
.put(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
|
30
|
-
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
31
|
-
})
|
32
|
-
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
33
|
-
}
|
34
18
|
/** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
|
35
19
|
async createGlobalApplicationCommand(options) {
|
36
20
|
return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationCommands(this.id), {
|
@@ -214,6 +198,22 @@ class ClientApplication extends _1.Base {
|
|
214
198
|
.get(rest_1.Endpoints.applicationSKUs(this.id))
|
215
199
|
.then((response) => response.map((data) => new _1.SKU(data, this.client)));
|
216
200
|
}
|
201
|
+
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
|
202
|
+
async setGlobalApplicationCommands(commands) {
|
203
|
+
return this.client.rest
|
204
|
+
.put(rest_1.Endpoints.applicationCommands(this.id), {
|
205
|
+
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
206
|
+
})
|
207
|
+
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
208
|
+
}
|
209
|
+
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
210
|
+
async setGuildApplicationCommands(guildId, commands) {
|
211
|
+
return this.client.rest
|
212
|
+
.put(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
|
213
|
+
json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
|
214
|
+
})
|
215
|
+
.then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
|
216
|
+
}
|
217
217
|
/** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
|
218
218
|
async updateApplicationRoleConnectionMetadataRecords() {
|
219
219
|
return this.client.rest
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ClientApplication.js","sourceRoot":"","sources":["../../src/structures/ClientApplication.ts"],"names":[],"mappings":";;;AAAA,wBAOW;
|
1
|
+
{"version":3,"file":"ClientApplication.js","sourceRoot":"","sources":["../../src/structures/ClientApplication.ts"],"names":[],"mappings":";;;AAAA,wBAOW;AAgBX,kCAAoC;AASpC,MAAa,iBAAkB,SAAQ,OAAI;IACtB,GAAG,CAAuC;IAC7D,KAAK,CAAoB;IAEzB,YAAY,IAA0C,EAAE,MAAc;QACpE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAEhB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAEkB,KAAK,CAAC,IAA0C;QACjE,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACxD,CAAC;IAED,8GAA8G;IAC9G,KAAK,CAAC,8BAA8B,CAAC,OAWpC;QACC,OAAO,IAAI,qBAAkB,CAC3B,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CACzB,gBAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC,EACtC;YACE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC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AAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AAreD,8CAqeC"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { ApplicationCommand, AuditLog, AutoModerationRule, Base, Channel, Emoji, GuildMember, GuildScheduledEvent, GuildTemplate, Integration, Invite, Role, StageInstance, Sticker, VoiceState, Webhook } from ".";
|
2
2
|
import type { Client } from "../Client";
|
3
3
|
import { type File } from "../rest";
|
4
|
-
import type {
|
5
|
-
import type { ActionTypes,
|
6
|
-
import { Collection } from "../utils";
|
4
|
+
import type { JSONAutoModerationAction, JSONBan, JSONDefaultReaction, JSONForumTag, JSONGuild, JSONGuildApplicationCommandPermissions, JSONGuildOnboarding, JSONGuildPreview, JSONGuildScheduledEventEntityMetadata, JSONGuildScheduledEventUser, JSONGuildTemplate, JSONGuildWidget, JSONGuildWidgetSettings, JSONOnboardingPrompt, JSONOverwrite, PresenceUpdateEventFields, JSONThreadMember, JSONVoiceRegion, JSONWelcomeScreen, JSONWelcomeScreenChannel, RawGuild, RawGuildCreateEventExtraFields, JSONGuildCreateEventExtraFields, JSONTriggerMetadata, JSONApplicationCommandOption } from "../types";
|
5
|
+
import type { ActionTypes, ApplicationCommandTypes, ChannelTypes, DefaultMessageNotificationLevel, EventTypes, ExplicitContentFilterLevel, ForumLayoutTypes, GuildFeatures, GuildMemberFlags, GuildNSFWLevel, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, ImageWidgetStyleOptions, Locale, MFALevel, OnboardingMode, PremiumTier, SortOrderTypes, SystemChannelFlags, TriggerTypes, VerificationLevel, VideoQualityModes } from "../constants";
|
7
6
|
/** https://discord.com/developers/docs/resources/guild */
|
8
7
|
export declare class Guild extends Base {
|
9
8
|
protected raw: RawGuild & Partial<RawGuildCreateEventExtraFields>;
|
@@ -23,8 +22,8 @@ export declare class Guild extends Base {
|
|
23
22
|
verificationLevel: VerificationLevel;
|
24
23
|
defaultMessageNotifications: DefaultMessageNotificationLevel;
|
25
24
|
explicitContentFilter: ExplicitContentFilterLevel;
|
26
|
-
roles:
|
27
|
-
emojis:
|
25
|
+
roles: Array<Role>;
|
26
|
+
emojis: Array<Emoji>;
|
28
27
|
features: Array<GuildFeatures>;
|
29
28
|
mfaLevel: MFALevel;
|
30
29
|
applicationId: string | null;
|
@@ -53,13 +52,13 @@ export declare class Guild extends Base {
|
|
53
52
|
large?: boolean;
|
54
53
|
unavailable?: boolean;
|
55
54
|
memberCount?: number;
|
56
|
-
voiceStates?:
|
57
|
-
members?:
|
58
|
-
channels?:
|
59
|
-
threads?:
|
60
|
-
presences?:
|
61
|
-
stageInstances?:
|
62
|
-
guildScheduledEvents?:
|
55
|
+
voiceStates?: Array<VoiceState>;
|
56
|
+
members?: Array<GuildMember>;
|
57
|
+
channels?: Array<Channel>;
|
58
|
+
threads?: Array<Channel>;
|
59
|
+
presences?: Array<PresenceUpdateEventFields>;
|
60
|
+
stageInstances?: Array<StageInstance>;
|
61
|
+
guildScheduledEvents?: Array<GuildScheduledEvent>;
|
63
62
|
constructor(data: RawGuild & Partial<RawGuildCreateEventExtraFields>, client: Client);
|
64
63
|
protected patch(data: RawGuild & Partial<RawGuildCreateEventExtraFields>): void;
|
65
64
|
/** https://discord.com/developers/docs/resources/guild#add-guild-member */
|
@@ -72,49 +71,6 @@ export declare class Guild extends Base {
|
|
72
71
|
}): Promise<GuildMember | null>;
|
73
72
|
/** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
|
74
73
|
addMemberRole(userId: string, roleId: string, reason?: string): void;
|
75
|
-
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
76
|
-
bulkEditApplicationCommands(applicationId: string, commands: Array<{
|
77
|
-
id?: string;
|
78
|
-
name?: string;
|
79
|
-
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
80
|
-
description?: string;
|
81
|
-
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
82
|
-
options?: Array<{
|
83
|
-
type: ApplicationCommandOptionType;
|
84
|
-
name: string;
|
85
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
86
|
-
description: string;
|
87
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
88
|
-
required?: boolean;
|
89
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
90
|
-
options: Array<{
|
91
|
-
type: ApplicationCommandOptionType;
|
92
|
-
name: string;
|
93
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
94
|
-
description: string;
|
95
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
96
|
-
required?: boolean;
|
97
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
98
|
-
channelTypes?: Array<ChannelTypes>;
|
99
|
-
minValue?: number;
|
100
|
-
maxValue?: number;
|
101
|
-
minLength?: number;
|
102
|
-
maxLength?: number;
|
103
|
-
autocomplete?: boolean;
|
104
|
-
}>;
|
105
|
-
channelTypes?: Array<ChannelTypes>;
|
106
|
-
minValue?: number;
|
107
|
-
maxValue?: number;
|
108
|
-
minLength?: number;
|
109
|
-
maxLength?: number;
|
110
|
-
autocomplete?: boolean;
|
111
|
-
}>;
|
112
|
-
defaultMemberPermissions?: string | null;
|
113
|
-
dmPermission?: boolean;
|
114
|
-
defaultPermission?: boolean | null;
|
115
|
-
type: ApplicationCommandTypes;
|
116
|
-
nsfw?: boolean;
|
117
|
-
}>): Promise<Array<ApplicationCommand>>;
|
118
74
|
/** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
|
119
75
|
beginGuildPrune(options: {
|
120
76
|
days: number;
|
@@ -124,40 +80,11 @@ export declare class Guild extends Base {
|
|
124
80
|
}, reason?: string): Promise<number>;
|
125
81
|
/** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
|
126
82
|
createApplicationCommand(applicationId: string, options: {
|
127
|
-
name
|
83
|
+
name: string;
|
128
84
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
129
85
|
description?: string;
|
130
86
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
131
|
-
options?: Array<
|
132
|
-
type: ApplicationCommandOptionType;
|
133
|
-
name: string;
|
134
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
135
|
-
description: string;
|
136
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
137
|
-
required?: boolean;
|
138
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
139
|
-
options: Array<{
|
140
|
-
type: ApplicationCommandOptionType;
|
141
|
-
name: string;
|
142
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
143
|
-
description: string;
|
144
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
145
|
-
required?: boolean;
|
146
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
147
|
-
channelTypes?: Array<ChannelTypes>;
|
148
|
-
minValue?: number;
|
149
|
-
maxValue?: number;
|
150
|
-
minLength?: number;
|
151
|
-
maxLength?: number;
|
152
|
-
autocomplete?: boolean;
|
153
|
-
}>;
|
154
|
-
channelTypes?: Array<ChannelTypes>;
|
155
|
-
minValue?: number;
|
156
|
-
maxValue?: number;
|
157
|
-
minLength?: number;
|
158
|
-
maxLength?: number;
|
159
|
-
autocomplete?: boolean;
|
160
|
-
}>;
|
87
|
+
options?: Array<JSONApplicationCommandOption>;
|
161
88
|
defaultMemberPermissions?: string | null;
|
162
89
|
dmPermission?: boolean;
|
163
90
|
defaultPermission?: boolean | null;
|
@@ -289,36 +216,7 @@ export declare class Guild extends Base {
|
|
289
216
|
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
290
217
|
description?: string;
|
291
218
|
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
292
|
-
options?: Array<
|
293
|
-
type: ApplicationCommandOptionType;
|
294
|
-
name: string;
|
295
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
296
|
-
description: string;
|
297
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
298
|
-
required?: boolean;
|
299
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
300
|
-
options: Array<{
|
301
|
-
type: ApplicationCommandOptionType;
|
302
|
-
name: string;
|
303
|
-
nameLocalizations?: Partial<Record<Locale, string>>;
|
304
|
-
description: string;
|
305
|
-
descriptionLocalizations?: Partial<Record<Locale, string>>;
|
306
|
-
required?: boolean;
|
307
|
-
choices?: Array<JSONApplicationCommandOptionChoice>;
|
308
|
-
channelTypes?: Array<ChannelTypes>;
|
309
|
-
minValue?: number;
|
310
|
-
maxValue?: number;
|
311
|
-
minLength?: number;
|
312
|
-
maxLength?: number;
|
313
|
-
autocomplete?: boolean;
|
314
|
-
}>;
|
315
|
-
channelTypes?: Array<ChannelTypes>;
|
316
|
-
minValue?: number;
|
317
|
-
maxValue?: number;
|
318
|
-
minLength?: number;
|
319
|
-
maxLength?: number;
|
320
|
-
autocomplete?: boolean;
|
321
|
-
}>;
|
219
|
+
options?: Array<JSONApplicationCommandOption>;
|
322
220
|
defaultMemberPermissions?: string | null;
|
323
221
|
defaultPermission?: boolean | null;
|
324
222
|
dmPermission?: boolean;
|
@@ -543,6 +441,20 @@ export declare class Guild extends Base {
|
|
543
441
|
query: string;
|
544
442
|
limit?: number;
|
545
443
|
}): Promise<Array<GuildMember>>;
|
444
|
+
/** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
|
445
|
+
setApplicationCommands(applicationId: string, commands: Array<{
|
446
|
+
id?: string;
|
447
|
+
name: string;
|
448
|
+
nameLocalizations?: Partial<Record<Locale, string>> | null;
|
449
|
+
description?: string;
|
450
|
+
descriptionLocalizations?: Partial<Record<Locale, string>> | null;
|
451
|
+
options?: Array<JSONApplicationCommandOption>;
|
452
|
+
defaultMemberPermissions?: string | null;
|
453
|
+
dmPermission?: boolean;
|
454
|
+
defaultPermission?: boolean | null;
|
455
|
+
type: ApplicationCommandTypes;
|
456
|
+
nsfw?: boolean;
|
457
|
+
}>): Promise<Array<ApplicationCommand>>;
|
546
458
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
547
459
|
syncTemplate(code: string): Promise<GuildTemplate>;
|
548
460
|
toRaw(): RawGuild & Partial<RawGuildCreateEventExtraFields>;
|