disgroove 1.3.0-dev.de929bd → 1.3.1-dev.8cd17af

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.
Files changed (54) hide show
  1. package/dist/Client.d.ts +12 -4
  2. package/dist/Client.js +27 -1
  3. package/dist/Client.js.map +1 -1
  4. package/dist/gateway/Shard.d.ts +1 -0
  5. package/dist/gateway/Shard.js +14 -6
  6. package/dist/gateway/Shard.js.map +1 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +1 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/rest/RequestsManager.js +1 -1
  11. package/dist/structures/Application.d.ts +3 -3
  12. package/dist/structures/Application.js.map +1 -1
  13. package/dist/structures/AutoModerationRule.d.ts +3 -3
  14. package/dist/structures/Channel.d.ts +8 -8
  15. package/dist/structures/Channel.js +1 -1
  16. package/dist/structures/Channel.js.map +1 -1
  17. package/dist/structures/ClientApplication.d.ts +324 -0
  18. package/dist/structures/ClientApplication.js +241 -0
  19. package/dist/structures/ClientApplication.js.map +1 -0
  20. package/dist/structures/Guild.d.ts +12 -12
  21. package/dist/structures/Guild.js +3 -3
  22. package/dist/structures/Guild.js.map +1 -1
  23. package/dist/structures/GuildScheduledEvent.js +2 -2
  24. package/dist/structures/GuildScheduledEvent.js.map +1 -1
  25. package/dist/structures/GuildTemplate.js +1 -3
  26. package/dist/structures/GuildTemplate.js.map +1 -1
  27. package/dist/structures/Integration.d.ts +1 -1
  28. package/dist/structures/Invite.d.ts +2 -1
  29. package/dist/structures/Invite.js.map +1 -1
  30. package/dist/structures/Message.d.ts +3 -3
  31. package/dist/structures/Message.js.map +1 -1
  32. package/dist/structures/SKU.d.ts +1 -1
  33. package/dist/structures/SKU.js +3 -3
  34. package/dist/structures/StageInstance.d.ts +1 -1
  35. package/dist/structures/StageInstance.js.map +1 -1
  36. package/dist/structures/UnavailableGuild.d.ts +2 -487
  37. package/dist/structures/UnavailableGuild.js +0 -877
  38. package/dist/structures/UnavailableGuild.js.map +1 -1
  39. package/dist/structures/User.d.ts +2 -2
  40. package/dist/structures/User.js +1 -1
  41. package/dist/structures/User.js.map +1 -1
  42. package/dist/structures/index.d.ts +1 -1
  43. package/dist/structures/index.js +1 -1
  44. package/dist/structures/index.js.map +1 -1
  45. package/dist/types/application.d.ts +3 -3
  46. package/dist/types/channel.d.ts +13 -13
  47. package/dist/types/guild.d.ts +2 -2
  48. package/dist/types/interaction.d.ts +8 -28
  49. package/dist/types/invite.d.ts +3 -2
  50. package/dist/types/sku.d.ts +1 -1
  51. package/dist/types/stage-instance.d.ts +3 -2
  52. package/dist/types/team.d.ts +1 -1
  53. package/dist/types/user.d.ts +3 -3
  54. package/package.json +2 -2
@@ -0,0 +1,324 @@
1
+ import { Base, ApplicationCommand, Application, SKU, Entitlement, TestEntitlement } from ".";
2
+ import type { JSONGuildApplicationCommandPermissions, RawApplication, JSONApplication, JSONApplicationCommandOptionChoice, JSONApplicationRoleConnectionMetadata, JSONInstallParams } from "../types";
3
+ import type { Client } from "../Client";
4
+ import type { ApplicationCommandOptionType, ApplicationCommandTypes, ApplicationFlags, ChannelTypes, Locale } from "../constants";
5
+ export declare class ClientApplication extends Base {
6
+ protected raw: Pick<RawApplication, "id" | "flags">;
7
+ flags?: ApplicationFlags;
8
+ constructor(data: Pick<RawApplication, "id" | "flags">, client: Client);
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
+ /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
97
+ createGlobalApplicationCommand(options: {
98
+ name: string;
99
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
100
+ description?: string;
101
+ 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
+ }>;
132
+ defaultMemberPermissions?: string | null;
133
+ dmPermission?: boolean;
134
+ defaultPermission?: boolean | null;
135
+ type?: ApplicationCommandTypes;
136
+ nsfw?: boolean;
137
+ }): Promise<ApplicationCommand>;
138
+ /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
139
+ createGuildApplicationCommand(guildId: string, options: {
140
+ name?: string;
141
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
142
+ description?: string;
143
+ 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
+ }>;
174
+ defaultMemberPermissions?: string | null;
175
+ dmPermission?: boolean;
176
+ defaultPermission?: boolean | null;
177
+ type?: ApplicationCommandTypes;
178
+ nsfw?: boolean;
179
+ }): Promise<ApplicationCommand>;
180
+ /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
181
+ createTestEntitlement(options: {
182
+ skuId: string;
183
+ ownerId: string;
184
+ ownerType: number;
185
+ }): Promise<TestEntitlement>;
186
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
187
+ deleteGlobalApplicationCommand(commandId: string): void;
188
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
189
+ deleteGuildApplicationCommand(guildId: string, commandId: string): void;
190
+ /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
191
+ deleteTestEntitlement(entitlementId: string): void;
192
+ /** https://discord.com/developers/docs/resources/application#edit-current-application */
193
+ edit(options: {
194
+ customInstallURL?: string;
195
+ description?: string;
196
+ roleConnectionsVerificationURL?: string;
197
+ installParams?: JSONInstallParams;
198
+ flags?: ApplicationFlags;
199
+ icon?: string;
200
+ coverImage?: string;
201
+ interactionsEndpointURL?: string;
202
+ tags?: Array<string>;
203
+ }): Promise<Application>;
204
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
205
+ editApplicationCommandPermissions(guildId: string, commandId: string, options: {
206
+ permissions: Array<JSONGuildApplicationCommandPermissions>;
207
+ }): Promise<JSONGuildApplicationCommandPermissions>;
208
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
209
+ editGlobalApplicationCommand(commandId: string, options: {
210
+ name?: string;
211
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
212
+ description?: string;
213
+ 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
+ }>;
244
+ defaultMemberPermissions?: string | null;
245
+ defaultPermission?: boolean | null;
246
+ dmPermission?: boolean;
247
+ nsfw?: boolean;
248
+ }): Promise<ApplicationCommand>;
249
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
250
+ editGuildApplicationCommand(guildId: string, commandId: string, options: {
251
+ name?: string;
252
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
253
+ description?: string;
254
+ 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
+ }>;
285
+ defaultMemberPermissions?: string | null;
286
+ defaultPermission?: boolean | null;
287
+ dmPermission?: boolean;
288
+ nsfw?: boolean;
289
+ }): Promise<ApplicationCommand>;
290
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
291
+ getApplicationCommandPermissions(guildId: string, commandId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
292
+ /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
293
+ getEntitlements(options?: {
294
+ userId?: string;
295
+ skuIds?: Array<string>;
296
+ before?: string;
297
+ after?: string;
298
+ limit?: number;
299
+ guildId?: string;
300
+ excludeEnded?: boolean;
301
+ }): Promise<Array<Entitlement>>;
302
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
303
+ getGlobalApplicationCommand(commandId: string): Promise<ApplicationCommand>;
304
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
305
+ getGlobalApplicationCommands(options: {
306
+ withLocalizations?: boolean;
307
+ }): Promise<Array<ApplicationCommand>>;
308
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
309
+ getGuildApplicationCommand(guildId: string, commandId: string): Promise<ApplicationCommand>;
310
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
311
+ getGuildApplicationCommands(guildId: string, options?: {
312
+ withLocalizations?: boolean;
313
+ }): Promise<Array<ApplicationCommand>>;
314
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
315
+ getGuildApplicationCommandPermissions(guildId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
316
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
317
+ getApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
318
+ /** https://discord.com/developers/docs/monetization/skus#list-skus */
319
+ getSKUs(): Promise<Array<SKU>>;
320
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
321
+ updateApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
322
+ toRaw(): Pick<RawApplication, "id" | "flags">;
323
+ toJSON(): Pick<JSONApplication, "id" | "flags">;
324
+ }
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientApplication = void 0;
4
+ const _1 = require(".");
5
+ const rest_1 = require("../rest");
6
+ class ClientApplication extends _1.Base {
7
+ raw;
8
+ flags;
9
+ constructor(data, client) {
10
+ super(data.id, client);
11
+ this.raw = data;
12
+ this.patch(data);
13
+ }
14
+ patch(data) {
15
+ if (data.flags !== undefined)
16
+ this.flags = data.flags;
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
+ /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
35
+ async createGlobalApplicationCommand(options) {
36
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationCommands(this.id), {
37
+ json: this.client.util.applicationCommandToRaw(options),
38
+ }), this.client);
39
+ }
40
+ /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
41
+ async createGuildApplicationCommand(guildId, options) {
42
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
43
+ json: this.client.util.applicationCommandToRaw(options),
44
+ }), this.client);
45
+ }
46
+ /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
47
+ async createTestEntitlement(options) {
48
+ return new _1.TestEntitlement(await this.client.rest.post(rest_1.Endpoints.applicationEntitlements(this.id), {
49
+ json: {
50
+ sku_id: options.skuId,
51
+ owner_id: options.ownerId,
52
+ owner_type: options.ownerType,
53
+ },
54
+ }), this.client);
55
+ }
56
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
57
+ deleteGlobalApplicationCommand(commandId) {
58
+ this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.id, commandId));
59
+ }
60
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
61
+ deleteGuildApplicationCommand(guildId, commandId) {
62
+ this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId));
63
+ }
64
+ /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
65
+ deleteTestEntitlement(entitlementId) {
66
+ this.client.rest.delete(rest_1.Endpoints.applicationEntitlement(this.id, entitlementId));
67
+ }
68
+ /** https://discord.com/developers/docs/resources/application#edit-current-application */
69
+ async edit(options) {
70
+ return new _1.Application(await this.client.rest.patch(rest_1.Endpoints.applicationCurrentUser(), {
71
+ json: {
72
+ custom_install_url: options.customInstallURL,
73
+ description: options.description,
74
+ role_connections_verification_url: options.roleConnectionsVerificationURL,
75
+ install_params: options.installParams,
76
+ flags: options.flags,
77
+ icon: options.icon,
78
+ cover_image: options.coverImage,
79
+ interactions_endpoint_url: options.interactionsEndpointURL,
80
+ tags: options.tags,
81
+ },
82
+ }), this.client);
83
+ }
84
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
85
+ async editApplicationCommandPermissions(guildId, commandId, options) {
86
+ return this.client.rest
87
+ .put(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId), {
88
+ json: {
89
+ permissions: options.permissions.map((option) => ({
90
+ id: option.id,
91
+ application_id: option.applicationId,
92
+ guild_id: option.guildId,
93
+ permissions: option.permissions.map((permission) => ({
94
+ id: permission.id,
95
+ type: permission.type,
96
+ permission: permission.permission,
97
+ })),
98
+ })),
99
+ },
100
+ })
101
+ .then((response) => ({
102
+ id: response.id,
103
+ applicationId: response.application_id,
104
+ guildId: response.guild_id,
105
+ permissions: response.permissions.map((permission) => ({
106
+ id: permission.id,
107
+ type: permission.type,
108
+ permission: permission.permission,
109
+ })),
110
+ }));
111
+ }
112
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
113
+ async editGlobalApplicationCommand(commandId, options) {
114
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationCommand(this.id, commandId), {
115
+ json: this.client.util.applicationCommandToRaw(options),
116
+ }), this.client);
117
+ }
118
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
119
+ async editGuildApplicationCommand(guildId, commandId, options) {
120
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId), {
121
+ json: this.client.util.applicationCommandToRaw(options),
122
+ }), this.client);
123
+ }
124
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
125
+ async getApplicationCommandPermissions(guildId, commandId) {
126
+ return this.client.rest
127
+ .get(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId))
128
+ .then((response) => response.map((permissions) => ({
129
+ id: permissions.id,
130
+ applicationId: permissions.application_id,
131
+ guildId: permissions.guild_id,
132
+ permissions: permissions.permissions.map((permission) => ({
133
+ id: permission.id,
134
+ type: permission.type,
135
+ permission: permission.permission,
136
+ })),
137
+ })));
138
+ }
139
+ /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
140
+ async getEntitlements(options) {
141
+ return this.client.rest
142
+ .get(rest_1.Endpoints.applicationEntitlements(this.id), {
143
+ query: {
144
+ user_id: options?.userId,
145
+ sku_ids: options?.skuIds,
146
+ before: options?.before,
147
+ after: options?.after,
148
+ limit: options?.limit,
149
+ guild_id: options?.guildId,
150
+ exclude_ended: options?.excludeEnded,
151
+ },
152
+ })
153
+ .then((response) => response.map((data) => new _1.Entitlement(data, this.client)));
154
+ }
155
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
156
+ async getGlobalApplicationCommand(commandId) {
157
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationCommand(this.id, commandId)), this.client);
158
+ }
159
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
160
+ async getGlobalApplicationCommands(options) {
161
+ return this.client.rest
162
+ .get(rest_1.Endpoints.applicationCommands(this.id), {
163
+ query: {
164
+ with_localizations: options.withLocalizations,
165
+ },
166
+ })
167
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
168
+ }
169
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
170
+ async getGuildApplicationCommand(guildId, commandId) {
171
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId)), this.client);
172
+ }
173
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
174
+ async getGuildApplicationCommands(guildId, options) {
175
+ return this.client.rest
176
+ .get(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
177
+ query: {
178
+ with_localizations: options?.withLocalizations,
179
+ },
180
+ })
181
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
182
+ }
183
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
184
+ async getGuildApplicationCommandPermissions(guildId) {
185
+ return this.client.rest
186
+ .get(rest_1.Endpoints.guildApplicationCommandsPermissions(this.id, guildId))
187
+ .then((response) => response.map((permissions) => ({
188
+ id: permissions.id,
189
+ applicationId: permissions.application_id,
190
+ guildId: permissions.guild_id,
191
+ permissions: permissions.permissions.map((permission) => ({
192
+ id: permission.id,
193
+ type: permission.type,
194
+ permission: permission.permission,
195
+ })),
196
+ })));
197
+ }
198
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
199
+ async getApplicationRoleConnectionMetadataRecords() {
200
+ return this.client.rest
201
+ .get(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
202
+ .then((response) => response.map((data) => ({
203
+ type: data.type,
204
+ key: data.key,
205
+ name: data.name,
206
+ nameLocalizations: data.name_localizations,
207
+ description: data.description,
208
+ descriptionLocalizations: data.description_localizations,
209
+ })));
210
+ }
211
+ /** https://discord.com/developers/docs/monetization/skus#list-skus */
212
+ async getSKUs() {
213
+ return this.client.rest
214
+ .get(rest_1.Endpoints.applicationSKUs(this.id))
215
+ .then((response) => response.map((data) => new _1.SKU(data, this.client)));
216
+ }
217
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
218
+ async updateApplicationRoleConnectionMetadataRecords() {
219
+ return this.client.rest
220
+ .put(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
221
+ .then((response) => response.map((data) => ({
222
+ type: data.type,
223
+ key: data.key,
224
+ name: data.name,
225
+ nameLocalizations: data.name_localizations,
226
+ description: data.description,
227
+ descriptionLocalizations: data.description_localizations,
228
+ })));
229
+ }
230
+ toRaw() {
231
+ return this.raw;
232
+ }
233
+ toJSON() {
234
+ return {
235
+ ...super.toJSON(),
236
+ flags: this.flags,
237
+ };
238
+ }
239
+ }
240
+ exports.ClientApplication = ClientApplication;
241
+ //# sourceMappingURL=ClientApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientApplication.js","sourceRoot":"","sources":["../../src/structures/ClientApplication.ts"],"names":[],"mappings":";;;AAAA,wBAOW;AAeX,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,uHAAuH;IACvH,KAAK,CAAC,iCAAiC,CACrC,QAyCE;QA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YAC1C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,wBAAwB,EAAE,IAAI,CAAC,yBAAyB;SACzD,CAAC,CAAC,CACJ,CAAC;IACN,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AAnpBD,8CAmpBC"}
@@ -1,8 +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 { JSONApplicationCommandOptionChoice, JSONAutoModerationAction, JSONBan, JSONDefaultReaction, JSONForumTag, JSONGuild, JSONGuildApplicationCommandPermissions, JSONGuildOnboarding, JSONGuildPreview, JSONGuildScheduledEventEntityMetadata, JSONGuildScheduledEventUser, JSONGuildTemplate, JSONGuildWidget, JSONGuildWidgetSettings, JSONOnboardingPrompt, JSONOverwrite, PresenceUpdateEventFields, JSONThreadMember, JSONVoiceRegion, JSONWelcomeScreen, JSONWelcomeScreenChannel, RawGuild, RawGuildCreateEventExtraFields, JSONGuildCreateEventExtraFields } from "../types";
5
- import type { ApplicationCommandOptionType, ApplicationCommandTypes, ChannelTypes, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, GuildMemberFlags, GuildNSFWLevel, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, ImageWidgetStyleOptions, Locale, MFALevel, OnboardingMode, PremiumTier, SystemChannelFlags, VerificationLevel } from "../constants";
4
+ import type { JSONApplicationCommandOptionChoice, JSONAutoModerationAction, JSONBan, JSONDefaultReaction, JSONForumTag, JSONGuild, JSONGuildApplicationCommandPermissions, JSONGuildOnboarding, JSONGuildPreview, JSONGuildScheduledEventEntityMetadata, JSONGuildScheduledEventUser, JSONGuildTemplate, JSONGuildWidget, JSONGuildWidgetSettings, JSONOnboardingPrompt, JSONOverwrite, PresenceUpdateEventFields, JSONThreadMember, JSONVoiceRegion, JSONWelcomeScreen, JSONWelcomeScreenChannel, RawGuild, RawGuildCreateEventExtraFields, JSONGuildCreateEventExtraFields, JSONTriggerMetadata } from "../types";
5
+ import type { ActionTypes, ApplicationCommandOptionType, ApplicationCommandTypes, ChannelTypes, DefaultMessageNotificationLevel, EventTypes, ExplicitContentFilterLevel, ForumLayoutTypes, GuildFeatures, GuildMemberFlags, GuildNSFWLevel, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, ImageWidgetStyleOptions, Locale, MFALevel, OnboardingMode, PremiumTier, SortOrderTypes, SystemChannelFlags, TriggerTypes, VerificationLevel, VideoQualityModes } from "../constants";
6
6
  /** https://discord.com/developers/docs/resources/guild */
7
7
  export declare class Guild extends Base {
8
8
  protected raw: RawGuild & Partial<RawGuildCreateEventExtraFields>;
@@ -166,9 +166,9 @@ export declare class Guild extends Base {
166
166
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
167
167
  createAutoModerationRule(options: {
168
168
  name: string;
169
- eventType: number;
170
- triggerType: number;
171
- triggerMetadata?: object;
169
+ eventType: EventTypes;
170
+ triggerType: TriggerTypes;
171
+ triggerMetadata?: JSONTriggerMetadata;
172
172
  actions: Array<JSONAutoModerationAction>;
173
173
  enabled?: boolean;
174
174
  exemptRoles?: Array<string>;
@@ -192,12 +192,12 @@ export declare class Guild extends Base {
192
192
  parentId?: string | null;
193
193
  nsfw?: boolean;
194
194
  rtcRegion?: string | null;
195
- videoQualityMode?: number;
195
+ videoQualityMode?: VideoQualityModes;
196
196
  defaultAutoArchiveDuration?: number;
197
197
  defaultReactionEmoji?: JSONDefaultReaction | null;
198
198
  availableTags?: Array<JSONForumTag>;
199
- defaultSortOrder?: number | null;
200
- defaultForumLayout?: number;
199
+ defaultSortOrder?: SortOrderTypes | null;
200
+ defaultForumLayout?: ForumLayoutTypes;
201
201
  defaultThreadRateLimitPerUser?: number;
202
202
  }, reason?: string): Promise<Channel>;
203
203
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
@@ -326,9 +326,9 @@ export declare class Guild extends Base {
326
326
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
327
327
  editAutoModerationRule(ruleId: string, options: {
328
328
  name?: string;
329
- eventType?: number;
330
- triggerType?: number;
331
- triggerMetadata?: object;
329
+ eventType?: EventTypes;
330
+ triggerType?: TriggerTypes;
331
+ triggerMetadata?: JSONTriggerMetadata;
332
332
  actions?: Array<JSONAutoModerationAction>;
333
333
  enabled?: boolean;
334
334
  exemptRoles?: Array<string>;
@@ -451,7 +451,7 @@ export declare class Guild extends Base {
451
451
  /** https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */
452
452
  getAuditLog(options?: {
453
453
  userId?: string;
454
- actionType?: number;
454
+ actionType?: ActionTypes;
455
455
  before?: string;
456
456
  after?: string;
457
457
  limit?: number;