disgroove 2.0.1 → 2.1.0-dev.c430b6f

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 (185) hide show
  1. package/dist/lib/Client.d.ts +10 -1
  2. package/dist/lib/Client.js +15 -1
  3. package/dist/lib/constants.d.ts +14 -2
  4. package/dist/lib/constants.js +15 -3
  5. package/dist/lib/gateway/Shard.js +6 -1
  6. package/dist/lib/gateway/ShardManager.js +0 -1
  7. package/dist/lib/gateway/index.js +0 -1
  8. package/dist/lib/index.js +0 -1
  9. package/dist/lib/rest/CDN.js +0 -1
  10. package/dist/lib/rest/Endpoints.d.ts +3 -1
  11. package/dist/lib/rest/Endpoints.js +5 -2
  12. package/dist/lib/rest/RequestManager.d.ts +0 -1
  13. package/dist/lib/rest/RequestManager.js +0 -1
  14. package/dist/lib/rest/index.js +0 -1
  15. package/dist/lib/types/application-command.js +0 -1
  16. package/dist/lib/types/application-role-connection-metadata.js +0 -1
  17. package/dist/lib/types/application.js +0 -1
  18. package/dist/lib/types/audit-log.js +0 -1
  19. package/dist/lib/types/auto-moderation.js +0 -1
  20. package/dist/lib/types/channel.d.ts +4 -0
  21. package/dist/lib/types/channel.js +0 -1
  22. package/dist/lib/types/emoji.js +0 -1
  23. package/dist/lib/types/entitlements.js +0 -1
  24. package/dist/lib/types/gateway-events.d.ts +28 -0
  25. package/dist/lib/types/gateway-events.js +0 -1
  26. package/dist/lib/types/guild-scheduled-event.js +0 -1
  27. package/dist/lib/types/guild-template.js +0 -1
  28. package/dist/lib/types/guild.js +0 -1
  29. package/dist/lib/types/index.js +0 -1
  30. package/dist/lib/types/interaction.d.ts +3 -0
  31. package/dist/lib/types/interaction.js +0 -1
  32. package/dist/lib/types/invite.js +0 -1
  33. package/dist/lib/types/message-components.js +0 -1
  34. package/dist/lib/types/poll.d.ts +52 -0
  35. package/dist/lib/types/poll.js +2 -0
  36. package/dist/lib/types/role.js +0 -1
  37. package/dist/lib/types/sku.js +0 -1
  38. package/dist/lib/types/stage-instance.js +0 -1
  39. package/dist/lib/types/sticker.js +0 -1
  40. package/dist/lib/types/team.js +0 -1
  41. package/dist/lib/types/user.js +0 -1
  42. package/dist/lib/types/voice.js +0 -1
  43. package/dist/lib/types/webhook.d.ts +3 -0
  44. package/dist/lib/types/webhook.js +0 -1
  45. package/dist/lib/utils/Util.js +0 -1
  46. package/dist/lib/utils/errors.js +0 -1
  47. package/dist/lib/utils/index.js +0 -1
  48. package/dist/package.json +3 -2
  49. package/package.json +3 -2
  50. package/dist/lib/Client.js.map +0 -1
  51. package/dist/lib/constants.js.map +0 -1
  52. package/dist/lib/gateway/Shard.js.map +0 -1
  53. package/dist/lib/gateway/ShardManager.js.map +0 -1
  54. package/dist/lib/gateway/ShardsManager.d.ts +0 -6
  55. package/dist/lib/gateway/ShardsManager.js +0 -14
  56. package/dist/lib/gateway/ShardsManager.js.map +0 -1
  57. package/dist/lib/gateway/index.js.map +0 -1
  58. package/dist/lib/index.js.map +0 -1
  59. package/dist/lib/rest/CDN.js.map +0 -1
  60. package/dist/lib/rest/Endpoints.js.map +0 -1
  61. package/dist/lib/rest/REST.d.ts +0 -17
  62. package/dist/lib/rest/REST.js +0 -35
  63. package/dist/lib/rest/REST.js.map +0 -1
  64. package/dist/lib/rest/RequestManager.js.map +0 -1
  65. package/dist/lib/rest/RequestsManager.d.ts +0 -22
  66. package/dist/lib/rest/RequestsManager.js +0 -123
  67. package/dist/lib/rest/RequestsManager.js.map +0 -1
  68. package/dist/lib/rest/index.js.map +0 -1
  69. package/dist/lib/structures/Application.d.ts +0 -174
  70. package/dist/lib/structures/Application.js +0 -328
  71. package/dist/lib/structures/Application.js.map +0 -1
  72. package/dist/lib/structures/ApplicationCommand.d.ts +0 -45
  73. package/dist/lib/structures/ApplicationCommand.js +0 -127
  74. package/dist/lib/structures/ApplicationCommand.js.map +0 -1
  75. package/dist/lib/structures/AuditLog.d.ts +0 -19
  76. package/dist/lib/structures/AuditLog.js +0 -101
  77. package/dist/lib/structures/AuditLog.js.map +0 -1
  78. package/dist/lib/structures/AutoModerationRule.d.ts +0 -34
  79. package/dist/lib/structures/AutoModerationRule.js +0 -96
  80. package/dist/lib/structures/AutoModerationRule.js.map +0 -1
  81. package/dist/lib/structures/Base.d.ts +0 -10
  82. package/dist/lib/structures/Base.js +0 -23
  83. package/dist/lib/structures/Base.js.map +0 -1
  84. package/dist/lib/structures/Channel.d.ts +0 -254
  85. package/dist/lib/structures/Channel.js +0 -592
  86. package/dist/lib/structures/Channel.js.map +0 -1
  87. package/dist/lib/structures/ClientApplication.d.ts +0 -150
  88. package/dist/lib/structures/ClientApplication.js +0 -241
  89. package/dist/lib/structures/ClientApplication.js.map +0 -1
  90. package/dist/lib/structures/Emoji.d.ts +0 -26
  91. package/dist/lib/structures/Emoji.js +0 -75
  92. package/dist/lib/structures/Emoji.js.map +0 -1
  93. package/dist/lib/structures/Entitlement.d.ts +0 -24
  94. package/dist/lib/structures/Entitlement.js +0 -68
  95. package/dist/lib/structures/Entitlement.js.map +0 -1
  96. package/dist/lib/structures/Guild.d.ts +0 -474
  97. package/dist/lib/structures/Guild.js +0 -1141
  98. package/dist/lib/structures/Guild.js.map +0 -1
  99. package/dist/lib/structures/GuildMember.d.ts +0 -49
  100. package/dist/lib/structures/GuildMember.js +0 -146
  101. package/dist/lib/structures/GuildMember.js.map +0 -1
  102. package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -49
  103. package/dist/lib/structures/GuildScheduledEvent.js +0 -118
  104. package/dist/lib/structures/GuildScheduledEvent.js.map +0 -1
  105. package/dist/lib/structures/GuildTemplate.d.ts +0 -30
  106. package/dist/lib/structures/GuildTemplate.js +0 -72
  107. package/dist/lib/structures/GuildTemplate.js.map +0 -1
  108. package/dist/lib/structures/IdentifiableBase.d.ts +0 -15
  109. package/dist/lib/structures/IdentifiableBase.js +0 -25
  110. package/dist/lib/structures/IdentifiableBase.js.map +0 -1
  111. package/dist/lib/structures/Integration.d.ts +0 -31
  112. package/dist/lib/structures/Integration.js +0 -103
  113. package/dist/lib/structures/Integration.js.map +0 -1
  114. package/dist/lib/structures/Interaction.d.ts +0 -76
  115. package/dist/lib/structures/Interaction.js +0 -346
  116. package/dist/lib/structures/Interaction.js.map +0 -1
  117. package/dist/lib/structures/Invite.d.ts +0 -26
  118. package/dist/lib/structures/Invite.js +0 -82
  119. package/dist/lib/structures/Invite.js.map +0 -1
  120. package/dist/lib/structures/Message.d.ts +0 -86
  121. package/dist/lib/structures/Message.js +0 -303
  122. package/dist/lib/structures/Message.js.map +0 -1
  123. package/dist/lib/structures/Role.d.ts +0 -37
  124. package/dist/lib/structures/Role.js +0 -90
  125. package/dist/lib/structures/Role.js.map +0 -1
  126. package/dist/lib/structures/SKU.d.ts +0 -23
  127. package/dist/lib/structures/SKU.js +0 -63
  128. package/dist/lib/structures/SKU.js.map +0 -1
  129. package/dist/lib/structures/StageInstance.d.ts +0 -24
  130. package/dist/lib/structures/StageInstance.js +0 -57
  131. package/dist/lib/structures/StageInstance.js.map +0 -1
  132. package/dist/lib/structures/Sticker.d.ts +0 -31
  133. package/dist/lib/structures/Sticker.js +0 -86
  134. package/dist/lib/structures/Sticker.js.map +0 -1
  135. package/dist/lib/structures/Team.d.ts +0 -14
  136. package/dist/lib/structures/Team.js +0 -39
  137. package/dist/lib/structures/Team.js.map +0 -1
  138. package/dist/lib/structures/TestEntitlement.d.ts +0 -23
  139. package/dist/lib/structures/TestEntitlement.js +0 -61
  140. package/dist/lib/structures/TestEntitlement.js.map +0 -1
  141. package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
  142. package/dist/lib/structures/UnavailableGuild.js +0 -25
  143. package/dist/lib/structures/UnavailableGuild.js.map +0 -1
  144. package/dist/lib/structures/User.d.ts +0 -63
  145. package/dist/lib/structures/User.js +0 -177
  146. package/dist/lib/structures/User.js.map +0 -1
  147. package/dist/lib/structures/VoiceState.d.ts +0 -24
  148. package/dist/lib/structures/VoiceState.js +0 -66
  149. package/dist/lib/structures/VoiceState.js.map +0 -1
  150. package/dist/lib/structures/Webhook.d.ts +0 -82
  151. package/dist/lib/structures/Webhook.js +0 -223
  152. package/dist/lib/structures/Webhook.js.map +0 -1
  153. package/dist/lib/structures/index.d.ts +0 -28
  154. package/dist/lib/structures/index.js +0 -45
  155. package/dist/lib/structures/index.js.map +0 -1
  156. package/dist/lib/types/application-command.js.map +0 -1
  157. package/dist/lib/types/application-role-connection-metadata.js.map +0 -1
  158. package/dist/lib/types/application.js.map +0 -1
  159. package/dist/lib/types/audit-log.js.map +0 -1
  160. package/dist/lib/types/auto-moderation.js.map +0 -1
  161. package/dist/lib/types/channel.js.map +0 -1
  162. package/dist/lib/types/emoji.js.map +0 -1
  163. package/dist/lib/types/entitlements.js.map +0 -1
  164. package/dist/lib/types/gateway-events.js.map +0 -1
  165. package/dist/lib/types/guild-scheduled-event.js.map +0 -1
  166. package/dist/lib/types/guild-template.js.map +0 -1
  167. package/dist/lib/types/guild.js.map +0 -1
  168. package/dist/lib/types/index.js.map +0 -1
  169. package/dist/lib/types/interaction.js.map +0 -1
  170. package/dist/lib/types/invite.js.map +0 -1
  171. package/dist/lib/types/message-components.js.map +0 -1
  172. package/dist/lib/types/role.js.map +0 -1
  173. package/dist/lib/types/sku.js.map +0 -1
  174. package/dist/lib/types/stage-instance.js.map +0 -1
  175. package/dist/lib/types/sticker.js.map +0 -1
  176. package/dist/lib/types/team.js.map +0 -1
  177. package/dist/lib/types/user.js.map +0 -1
  178. package/dist/lib/types/voice.js.map +0 -1
  179. package/dist/lib/types/webhook.js.map +0 -1
  180. package/dist/lib/utils/Collection.d.ts +0 -24
  181. package/dist/lib/utils/Collection.js +0 -65
  182. package/dist/lib/utils/Collection.js.map +0 -1
  183. package/dist/lib/utils/Util.js.map +0 -1
  184. package/dist/lib/utils/errors.js.map +0 -1
  185. package/dist/lib/utils/index.js.map +0 -1
@@ -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,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,IAAI,CAAC,qBAAqB;YACjD,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;YACrD,8BAA8B,EAAE,IAAI,CAAC,8BAA8B;YACnE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC;IACJ,CAAC;CACF;AAvjBD,kCAujBC"}
@@ -1,45 +0,0 @@
1
- import type { Client } from "../Client";
2
- import type { JSONApplicationCommand, JSONApplicationCommandOption, JSONApplicationCommandPermission, JSONGuildApplicationCommandPermissions, RawApplicationCommand } from "../types";
3
- import type { ApplicationCommandTypes, Locales } from "../constants";
4
- import { IdentifiableBase } from ".";
5
- /** https://discord.com/developers/docs/interactions/application-commands */
6
- export declare class ApplicationCommand extends IdentifiableBase {
7
- protected raw: RawApplicationCommand;
8
- type?: ApplicationCommandTypes;
9
- applicationId: string;
10
- guildId?: string;
11
- name: string;
12
- nameLocalizations?: Partial<Record<Locales, string>> | null;
13
- description: string;
14
- descriptionLocalizations?: Partial<Record<Locales, string>> | null;
15
- options?: Array<JSONApplicationCommandOption>;
16
- defaultMemberPermissions: string | null;
17
- dmPermission?: boolean;
18
- defaultPermission?: boolean | null;
19
- nsfw?: boolean;
20
- version: string;
21
- constructor(data: RawApplicationCommand, client: Client);
22
- protected patch(data: RawApplicationCommand): void;
23
- /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
24
- delete(): void;
25
- /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
26
- edit(options: {
27
- name?: string;
28
- nameLocalizations?: Partial<Record<Locales, string>> | null;
29
- description?: string;
30
- descriptionLocalizations?: Partial<Record<Locales, string>> | null;
31
- options?: Array<JSONApplicationCommandOption>;
32
- defaultMemberPermissions?: string | null;
33
- defaultPermission?: boolean | null;
34
- dmPermission?: boolean;
35
- nsfw?: boolean;
36
- }): Promise<ApplicationCommand>;
37
- /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
38
- editPermissions(options: {
39
- permissions: Array<JSONApplicationCommandPermission>;
40
- }): Promise<JSONGuildApplicationCommandPermissions>;
41
- /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
42
- getPermissions(): Promise<JSONGuildApplicationCommandPermissions>;
43
- toRaw(): RawApplicationCommand;
44
- toJSON(): JSONApplicationCommand;
45
- }