disgroove 1.3.2 → 1.3.3-dev.2

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 (277) hide show
  1. package/dist/lib/Client.d.ts +234 -0
  2. package/dist/lib/Client.js +256 -0
  3. package/dist/lib/Client.js.map +1 -0
  4. package/dist/lib/constants.d.ts +1084 -0
  5. package/dist/lib/constants.js +1163 -0
  6. package/dist/lib/constants.js.map +1 -0
  7. package/dist/lib/gateway/Shard.d.ts +25 -0
  8. package/dist/lib/gateway/Shard.js +522 -0
  9. package/dist/lib/gateway/Shard.js.map +1 -0
  10. package/dist/lib/gateway/ShardsManager.d.ts +5 -0
  11. package/dist/lib/gateway/ShardsManager.js +13 -0
  12. package/dist/lib/gateway/ShardsManager.js.map +1 -0
  13. package/dist/lib/gateway/index.d.ts +2 -0
  14. package/dist/lib/gateway/index.js +19 -0
  15. package/dist/lib/gateway/index.js.map +1 -0
  16. package/dist/lib/index.d.ts +7 -0
  17. package/dist/lib/index.js +24 -0
  18. package/dist/lib/index.js.map +1 -0
  19. package/dist/lib/rest/CDN.d.ts +21 -0
  20. package/dist/lib/rest/CDN.js +46 -0
  21. package/dist/lib/rest/CDN.js.map +1 -0
  22. package/dist/lib/rest/Endpoints.d.ts +94 -0
  23. package/dist/lib/rest/Endpoints.js +211 -0
  24. package/dist/lib/rest/Endpoints.js.map +1 -0
  25. package/dist/lib/rest/REST.d.ts +22 -0
  26. package/dist/lib/rest/REST.js +35 -0
  27. package/dist/lib/rest/REST.js.map +1 -0
  28. package/dist/lib/rest/RequestsManager.d.ts +17 -0
  29. package/dist/lib/rest/RequestsManager.js +124 -0
  30. package/dist/lib/rest/RequestsManager.js.map +1 -0
  31. package/dist/lib/rest/index.d.ts +4 -0
  32. package/dist/lib/rest/index.js +34 -0
  33. package/dist/lib/rest/index.js.map +1 -0
  34. package/dist/lib/structures/Application.d.ts +174 -0
  35. package/dist/lib/structures/Application.js +328 -0
  36. package/dist/lib/structures/Application.js.map +1 -0
  37. package/dist/lib/structures/ApplicationCommand.d.ts +45 -0
  38. package/dist/lib/structures/ApplicationCommand.js +127 -0
  39. package/dist/lib/structures/ApplicationCommand.js.map +1 -0
  40. package/dist/lib/structures/AuditLog.d.ts +20 -0
  41. package/dist/lib/structures/AuditLog.js +76 -0
  42. package/dist/lib/structures/AuditLog.js.map +1 -0
  43. package/dist/lib/structures/AutoModerationRule.d.ts +34 -0
  44. package/dist/lib/structures/AutoModerationRule.js +96 -0
  45. package/dist/lib/structures/AutoModerationRule.js.map +1 -0
  46. package/dist/lib/structures/Base.d.ts +17 -0
  47. package/dist/lib/structures/Base.js +31 -0
  48. package/dist/lib/structures/Base.js.map +1 -0
  49. package/dist/lib/structures/Channel.d.ts +253 -0
  50. package/dist/lib/structures/Channel.js +591 -0
  51. package/dist/lib/structures/Channel.js.map +1 -0
  52. package/dist/lib/structures/ClientApplication.d.ts +150 -0
  53. package/dist/lib/structures/ClientApplication.js +241 -0
  54. package/dist/lib/structures/ClientApplication.js.map +1 -0
  55. package/dist/lib/structures/Emoji.d.ts +28 -0
  56. package/dist/lib/structures/Emoji.js +79 -0
  57. package/dist/lib/structures/Emoji.js.map +1 -0
  58. package/dist/lib/structures/Entitlement.d.ts +24 -0
  59. package/dist/lib/structures/Entitlement.js +68 -0
  60. package/dist/lib/structures/Entitlement.js.map +1 -0
  61. package/dist/lib/structures/Guild.d.ts +462 -0
  62. package/dist/lib/structures/Guild.js +1095 -0
  63. package/dist/lib/structures/Guild.js.map +1 -0
  64. package/dist/lib/structures/GuildMember.d.ts +50 -0
  65. package/dist/lib/structures/GuildMember.js +149 -0
  66. package/dist/lib/structures/GuildMember.js.map +1 -0
  67. package/dist/lib/structures/GuildScheduledEvent.d.ts +49 -0
  68. package/dist/lib/structures/GuildScheduledEvent.js +118 -0
  69. package/dist/lib/structures/GuildScheduledEvent.js.map +1 -0
  70. package/dist/lib/structures/GuildTemplate.d.ts +32 -0
  71. package/dist/lib/structures/GuildTemplate.js +76 -0
  72. package/dist/lib/structures/GuildTemplate.js.map +1 -0
  73. package/dist/lib/structures/Integration.d.ts +30 -0
  74. package/dist/lib/structures/Integration.js +102 -0
  75. package/dist/lib/structures/Integration.js.map +1 -0
  76. package/dist/lib/structures/Interaction.d.ts +76 -0
  77. package/dist/lib/structures/Interaction.js +345 -0
  78. package/dist/lib/structures/Interaction.js.map +1 -0
  79. package/dist/lib/structures/Invite.d.ts +28 -0
  80. package/dist/lib/structures/Invite.js +86 -0
  81. package/dist/lib/structures/Invite.js.map +1 -0
  82. package/dist/lib/structures/Message.d.ts +84 -0
  83. package/dist/lib/structures/Message.js +300 -0
  84. package/dist/lib/structures/Message.js.map +1 -0
  85. package/dist/lib/structures/Role.d.ts +37 -0
  86. package/dist/lib/structures/Role.js +90 -0
  87. package/dist/lib/structures/Role.js.map +1 -0
  88. package/dist/lib/structures/SKU.d.ts +23 -0
  89. package/dist/lib/structures/SKU.js +63 -0
  90. package/dist/lib/structures/SKU.js.map +1 -0
  91. package/dist/lib/structures/StageInstance.d.ts +24 -0
  92. package/dist/lib/structures/StageInstance.js +57 -0
  93. package/dist/lib/structures/StageInstance.js.map +1 -0
  94. package/dist/lib/structures/Sticker.d.ts +31 -0
  95. package/dist/lib/structures/Sticker.js +86 -0
  96. package/dist/lib/structures/Sticker.js.map +1 -0
  97. package/dist/lib/structures/Team.d.ts +14 -0
  98. package/dist/lib/structures/Team.js +39 -0
  99. package/dist/lib/structures/Team.js.map +1 -0
  100. package/dist/lib/structures/TestEntitlement.d.ts +23 -0
  101. package/dist/lib/structures/TestEntitlement.js +61 -0
  102. package/dist/lib/structures/TestEntitlement.js.map +1 -0
  103. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  104. package/dist/lib/structures/UnavailableGuild.js +25 -0
  105. package/dist/lib/structures/UnavailableGuild.js.map +1 -0
  106. package/dist/lib/structures/User.d.ts +63 -0
  107. package/dist/lib/structures/User.js +177 -0
  108. package/dist/lib/structures/User.js.map +1 -0
  109. package/dist/lib/structures/VoiceState.d.ts +26 -0
  110. package/dist/lib/structures/VoiceState.js +70 -0
  111. package/dist/lib/structures/VoiceState.js.map +1 -0
  112. package/dist/lib/structures/Webhook.d.ts +84 -0
  113. package/dist/lib/structures/Webhook.js +239 -0
  114. package/dist/lib/structures/Webhook.js.map +1 -0
  115. package/dist/lib/structures/index.d.ts +27 -0
  116. package/dist/lib/structures/index.js +44 -0
  117. package/dist/lib/structures/index.js.map +1 -0
  118. package/dist/lib/types/application-command.d.ts +102 -0
  119. package/dist/lib/types/application-command.js +3 -0
  120. package/dist/lib/types/application-command.js.map +1 -0
  121. package/dist/lib/types/application-role-connection-metadata.d.ts +18 -0
  122. package/dist/lib/types/application-role-connection-metadata.js +3 -0
  123. package/dist/lib/types/application-role-connection-metadata.js.map +1 -0
  124. package/dist/lib/types/application.d.ts +66 -0
  125. package/dist/lib/types/application.js +3 -0
  126. package/dist/lib/types/application.js.map +1 -0
  127. package/dist/lib/types/audit-log.d.ts +82 -0
  128. package/dist/lib/types/audit-log.js +3 -0
  129. package/dist/lib/types/audit-log.js.map +1 -0
  130. package/dist/lib/types/auto-moderation.d.ts +65 -0
  131. package/dist/lib/types/auto-moderation.js +3 -0
  132. package/dist/lib/types/auto-moderation.js.map +1 -0
  133. package/dist/lib/types/channel.d.ts +456 -0
  134. package/dist/lib/types/channel.js +3 -0
  135. package/dist/lib/types/channel.js.map +1 -0
  136. package/dist/lib/types/emoji.d.ts +22 -0
  137. package/dist/lib/types/emoji.js +3 -0
  138. package/dist/lib/types/emoji.js.map +1 -0
  139. package/dist/lib/types/entitlements.d.ts +32 -0
  140. package/dist/lib/types/entitlements.js +3 -0
  141. package/dist/lib/types/entitlements.js.map +1 -0
  142. package/dist/lib/types/gateway-events.d.ts +805 -0
  143. package/dist/lib/types/gateway-events.js +3 -0
  144. package/dist/lib/types/gateway-events.js.map +1 -0
  145. package/dist/lib/types/guild-scheduled-event.d.ts +57 -0
  146. package/dist/lib/types/guild-scheduled-event.js +3 -0
  147. package/dist/lib/types/guild-scheduled-event.js.map +1 -0
  148. package/dist/lib/types/guild-template.d.ts +28 -0
  149. package/dist/lib/types/guild-template.js +3 -0
  150. package/dist/lib/types/guild-template.js.map +1 -0
  151. package/dist/lib/types/guild.d.ts +333 -0
  152. package/dist/lib/types/guild.js +3 -0
  153. package/dist/lib/types/guild.js.map +1 -0
  154. package/dist/lib/types/index.d.ts +23 -0
  155. package/dist/lib/types/index.js +40 -0
  156. package/dist/lib/types/index.js.map +1 -0
  157. package/dist/lib/types/interaction.d.ts +170 -0
  158. package/dist/lib/types/interaction.js +3 -0
  159. package/dist/lib/types/interaction.js.map +1 -0
  160. package/dist/lib/types/invite.d.ts +59 -0
  161. package/dist/lib/types/invite.js +3 -0
  162. package/dist/lib/types/invite.js.map +1 -0
  163. package/dist/lib/types/message-components.d.ts +100 -0
  164. package/dist/lib/types/message-components.js +3 -0
  165. package/dist/lib/types/message-components.js.map +1 -0
  166. package/dist/lib/types/role.d.ts +47 -0
  167. package/dist/lib/types/role.js +3 -0
  168. package/dist/lib/types/role.js.map +1 -0
  169. package/dist/lib/types/sku.d.ts +30 -0
  170. package/dist/lib/types/sku.js +3 -0
  171. package/dist/lib/types/sku.js.map +1 -0
  172. package/dist/lib/types/stage-instance.d.ts +20 -0
  173. package/dist/lib/types/stage-instance.js +3 -0
  174. package/dist/lib/types/stage-instance.js.map +1 -0
  175. package/dist/lib/types/sticker.d.ts +61 -0
  176. package/dist/lib/types/sticker.js +3 -0
  177. package/dist/lib/types/sticker.js.map +1 -0
  178. package/dist/lib/types/team.d.ts +30 -0
  179. package/dist/lib/types/team.js +3 -0
  180. package/dist/lib/types/team.js.map +1 -0
  181. package/dist/lib/types/user.d.ts +77 -0
  182. package/dist/lib/types/user.js +3 -0
  183. package/dist/lib/types/user.js.map +1 -0
  184. package/dist/lib/types/voice.d.ts +47 -0
  185. package/dist/lib/types/voice.js +3 -0
  186. package/dist/lib/types/voice.js.map +1 -0
  187. package/dist/lib/types/webhook.d.ts +31 -0
  188. package/dist/lib/types/webhook.js +3 -0
  189. package/dist/lib/types/webhook.js.map +1 -0
  190. package/dist/lib/utils/Util.d.ts +15 -0
  191. package/dist/lib/utils/Util.js +543 -0
  192. package/dist/lib/utils/Util.js.map +1 -0
  193. package/dist/lib/utils/errors.d.ts +12 -0
  194. package/dist/lib/utils/errors.js +25 -0
  195. package/dist/lib/utils/errors.js.map +1 -0
  196. package/dist/lib/utils/index.d.ts +2 -0
  197. package/dist/lib/utils/index.js +19 -0
  198. package/dist/lib/utils/index.js.map +1 -0
  199. package/dist/package.json +1 -1
  200. package/examples/applicationCommands.js +43 -0
  201. package/examples/buttons.js +70 -0
  202. package/examples/embeds.js +36 -0
  203. package/examples/ephemeralMessages.js +32 -0
  204. package/examples/files.js +36 -0
  205. package/examples/modalSubmit.js +62 -0
  206. package/examples/permissions.js +41 -0
  207. package/examples/selectMenus.js +160 -0
  208. package/examples/text.txt +1 -0
  209. package/lib/Client.ts +616 -0
  210. package/lib/constants.ts +1173 -0
  211. package/lib/gateway/Shard.ts +704 -0
  212. package/lib/gateway/ShardsManager.ts +11 -0
  213. package/lib/gateway/index.ts +2 -0
  214. package/lib/index.ts +7 -0
  215. package/lib/rest/CDN.ts +56 -0
  216. package/lib/rest/Endpoints.ts +241 -0
  217. package/lib/rest/REST.ts +45 -0
  218. package/lib/rest/RequestsManager.ts +134 -0
  219. package/lib/rest/index.ts +4 -0
  220. package/lib/structures/Application.ts +599 -0
  221. package/lib/structures/ApplicationCommand.ts +187 -0
  222. package/lib/structures/AuditLog.ts +112 -0
  223. package/lib/structures/AutoModerationRule.ts +127 -0
  224. package/lib/structures/Base.ts +39 -0
  225. package/lib/structures/Channel.ts +921 -0
  226. package/lib/structures/ClientApplication.ts +515 -0
  227. package/lib/structures/Emoji.ts +95 -0
  228. package/lib/structures/Entitlement.ts +65 -0
  229. package/lib/structures/Guild.ts +1842 -0
  230. package/lib/structures/GuildMember.ts +193 -0
  231. package/lib/structures/GuildScheduledEvent.ts +164 -0
  232. package/lib/structures/GuildTemplate.ts +103 -0
  233. package/lib/structures/Integration.ts +136 -0
  234. package/lib/structures/Interaction.ts +506 -0
  235. package/lib/structures/Invite.ts +108 -0
  236. package/lib/structures/Message.ts +421 -0
  237. package/lib/structures/Role.ts +116 -0
  238. package/lib/structures/SKU.ts +63 -0
  239. package/lib/structures/StageInstance.ts +74 -0
  240. package/lib/structures/Sticker.ts +100 -0
  241. package/lib/structures/Team.ts +41 -0
  242. package/lib/structures/TestEntitlement.ts +78 -0
  243. package/lib/structures/UnavailableGuild.ts +27 -0
  244. package/lib/structures/User.ts +233 -0
  245. package/lib/structures/VoiceState.ts +72 -0
  246. package/lib/structures/Webhook.ts +341 -0
  247. package/lib/structures/index.ts +27 -0
  248. package/lib/types/application-command.ts +118 -0
  249. package/lib/types/application-role-connection-metadata.ts +23 -0
  250. package/lib/types/application.ts +77 -0
  251. package/lib/types/audit-log.ts +105 -0
  252. package/lib/types/auto-moderation.ts +78 -0
  253. package/lib/types/channel.ts +534 -0
  254. package/lib/types/emoji.ts +24 -0
  255. package/lib/types/entitlements.ts +34 -0
  256. package/lib/types/gateway-events.ts +970 -0
  257. package/lib/types/guild-scheduled-event.ts +67 -0
  258. package/lib/types/guild-template.ts +30 -0
  259. package/lib/types/guild.ts +388 -0
  260. package/lib/types/index.ts +23 -0
  261. package/lib/types/interaction.ts +224 -0
  262. package/lib/types/invite.ts +78 -0
  263. package/lib/types/message-components.ts +127 -0
  264. package/lib/types/role.ts +51 -0
  265. package/lib/types/sku.ts +32 -0
  266. package/lib/types/stage-instance.ts +22 -0
  267. package/lib/types/sticker.ts +67 -0
  268. package/lib/types/team.ts +34 -0
  269. package/lib/types/user.ts +93 -0
  270. package/lib/types/voice.ts +51 -0
  271. package/lib/types/webhook.ts +40 -0
  272. package/lib/utils/Util.ts +600 -0
  273. package/lib/utils/errors.ts +23 -0
  274. package/lib/utils/index.ts +2 -0
  275. package/package.json +1 -1
  276. package/test/basic.js +8 -0
  277. package/tsconfig.json +107 -0
@@ -0,0 +1,150 @@
1
+ import { Base, ApplicationCommand, Application, SKU, Entitlement, TestEntitlement } from ".";
2
+ import type { JSONGuildApplicationCommandPermissions, RawApplication, JSONApplication, JSONApplicationRoleConnectionMetadata, JSONInstallParams, JSONApplicationCommandOption } from "../types";
3
+ import type { Client } from "../Client";
4
+ import type { ApplicationCommandTypes, ApplicationFlags, 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#create-global-application-command */
11
+ createGlobalApplicationCommand(options: {
12
+ name: string;
13
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
14
+ description?: string;
15
+ descriptionLocalizations?: Partial<Record<Locale, string>> | null;
16
+ options?: Array<JSONApplicationCommandOption>;
17
+ defaultMemberPermissions?: string | null;
18
+ dmPermission?: boolean;
19
+ defaultPermission?: boolean | null;
20
+ type?: ApplicationCommandTypes;
21
+ nsfw?: boolean;
22
+ }): Promise<ApplicationCommand>;
23
+ /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
24
+ createGuildApplicationCommand(guildId: string, options: {
25
+ name?: string;
26
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
27
+ description?: string;
28
+ descriptionLocalizations?: Partial<Record<Locale, string>> | null;
29
+ options?: Array<JSONApplicationCommandOption>;
30
+ defaultMemberPermissions?: string | null;
31
+ dmPermission?: boolean;
32
+ defaultPermission?: boolean | null;
33
+ type?: ApplicationCommandTypes;
34
+ nsfw?: boolean;
35
+ }): Promise<ApplicationCommand>;
36
+ /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
37
+ createTestEntitlement(options: {
38
+ skuId: string;
39
+ ownerId: string;
40
+ ownerType: number;
41
+ }): Promise<TestEntitlement>;
42
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
43
+ deleteGlobalApplicationCommand(commandId: string): void;
44
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
45
+ deleteGuildApplicationCommand(guildId: string, commandId: string): void;
46
+ /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
47
+ deleteTestEntitlement(entitlementId: string): void;
48
+ /** https://discord.com/developers/docs/resources/application#edit-current-application */
49
+ edit(options: {
50
+ customInstallURL?: string;
51
+ description?: string;
52
+ roleConnectionsVerificationURL?: string;
53
+ installParams?: JSONInstallParams;
54
+ flags?: ApplicationFlags;
55
+ icon?: string;
56
+ coverImage?: string;
57
+ interactionsEndpointURL?: string;
58
+ tags?: Array<string>;
59
+ }): Promise<Application>;
60
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
61
+ editApplicationCommandPermissions(guildId: string, commandId: string, options: {
62
+ permissions: Array<JSONGuildApplicationCommandPermissions>;
63
+ }): Promise<JSONGuildApplicationCommandPermissions>;
64
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
65
+ editGlobalApplicationCommand(commandId: string, options: {
66
+ name?: string;
67
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
68
+ description?: string;
69
+ descriptionLocalizations?: Partial<Record<Locale, string>> | null;
70
+ options?: Array<JSONApplicationCommandOption>;
71
+ defaultMemberPermissions?: string | null;
72
+ defaultPermission?: boolean | null;
73
+ dmPermission?: boolean;
74
+ nsfw?: boolean;
75
+ }): Promise<ApplicationCommand>;
76
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
77
+ editGuildApplicationCommand(guildId: string, commandId: string, options: {
78
+ name?: string;
79
+ nameLocalizations?: Partial<Record<Locale, string>> | null;
80
+ description?: string;
81
+ descriptionLocalizations?: Partial<Record<Locale, string>> | null;
82
+ options?: Array<JSONApplicationCommandOption>;
83
+ defaultMemberPermissions?: string | null;
84
+ defaultPermission?: boolean | null;
85
+ dmPermission?: boolean;
86
+ nsfw?: boolean;
87
+ }): Promise<ApplicationCommand>;
88
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
89
+ getApplicationCommandPermissions(guildId: string, commandId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
90
+ /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
91
+ getEntitlements(options?: {
92
+ userId?: string;
93
+ skuIds?: Array<string>;
94
+ before?: string;
95
+ after?: string;
96
+ limit?: number;
97
+ guildId?: string;
98
+ excludeEnded?: boolean;
99
+ }): Promise<Array<Entitlement>>;
100
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
101
+ getGlobalApplicationCommand(commandId: string): Promise<ApplicationCommand>;
102
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
103
+ getGlobalApplicationCommands(options: {
104
+ withLocalizations?: boolean;
105
+ }): Promise<Array<ApplicationCommand>>;
106
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
107
+ getGuildApplicationCommand(guildId: string, commandId: string): Promise<ApplicationCommand>;
108
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
109
+ getGuildApplicationCommands(guildId: string, options?: {
110
+ withLocalizations?: boolean;
111
+ }): Promise<Array<ApplicationCommand>>;
112
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
113
+ getGuildApplicationCommandPermissions(guildId: string): Promise<Array<JSONGuildApplicationCommandPermissions>>;
114
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
115
+ getApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
116
+ /** https://discord.com/developers/docs/monetization/skus#list-skus */
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>>;
146
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
147
+ updateApplicationRoleConnectionMetadataRecords(): Promise<Array<JSONApplicationRoleConnectionMetadata>>;
148
+ toRaw(): Pick<RawApplication, "id" | "flags">;
149
+ toJSON(): Pick<JSONApplication, "id" | "flags">;
150
+ }
@@ -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#create-global-application-command */
19
+ async createGlobalApplicationCommand(options) {
20
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationCommands(this.id), {
21
+ json: this.client.util.applicationCommandToRaw(options),
22
+ }), this.client);
23
+ }
24
+ /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
25
+ async createGuildApplicationCommand(guildId, options) {
26
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
27
+ json: this.client.util.applicationCommandToRaw(options),
28
+ }), this.client);
29
+ }
30
+ /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
31
+ async createTestEntitlement(options) {
32
+ return new _1.TestEntitlement(await this.client.rest.post(rest_1.Endpoints.applicationEntitlements(this.id), {
33
+ json: {
34
+ sku_id: options.skuId,
35
+ owner_id: options.ownerId,
36
+ owner_type: options.ownerType,
37
+ },
38
+ }), this.client);
39
+ }
40
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
41
+ deleteGlobalApplicationCommand(commandId) {
42
+ this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.id, commandId));
43
+ }
44
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
45
+ deleteGuildApplicationCommand(guildId, commandId) {
46
+ this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId));
47
+ }
48
+ /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
49
+ deleteTestEntitlement(entitlementId) {
50
+ this.client.rest.delete(rest_1.Endpoints.applicationEntitlement(this.id, entitlementId));
51
+ }
52
+ /** https://discord.com/developers/docs/resources/application#edit-current-application */
53
+ async edit(options) {
54
+ return new _1.Application(await this.client.rest.patch(rest_1.Endpoints.applicationCurrentUser(), {
55
+ json: {
56
+ custom_install_url: options.customInstallURL,
57
+ description: options.description,
58
+ role_connections_verification_url: options.roleConnectionsVerificationURL,
59
+ install_params: options.installParams,
60
+ flags: options.flags,
61
+ icon: options.icon,
62
+ cover_image: options.coverImage,
63
+ interactions_endpoint_url: options.interactionsEndpointURL,
64
+ tags: options.tags,
65
+ },
66
+ }), this.client);
67
+ }
68
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
69
+ async editApplicationCommandPermissions(guildId, commandId, options) {
70
+ return this.client.rest
71
+ .put(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId), {
72
+ json: {
73
+ permissions: options.permissions.map((option) => ({
74
+ id: option.id,
75
+ application_id: option.applicationId,
76
+ guild_id: option.guildId,
77
+ permissions: option.permissions.map((permission) => ({
78
+ id: permission.id,
79
+ type: permission.type,
80
+ permission: permission.permission,
81
+ })),
82
+ })),
83
+ },
84
+ })
85
+ .then((response) => ({
86
+ id: response.id,
87
+ applicationId: response.application_id,
88
+ guildId: response.guild_id,
89
+ permissions: response.permissions.map((permission) => ({
90
+ id: permission.id,
91
+ type: permission.type,
92
+ permission: permission.permission,
93
+ })),
94
+ }));
95
+ }
96
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
97
+ async editGlobalApplicationCommand(commandId, options) {
98
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationCommand(this.id, commandId), {
99
+ json: this.client.util.applicationCommandToRaw(options),
100
+ }), this.client);
101
+ }
102
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
103
+ async editGuildApplicationCommand(guildId, commandId, options) {
104
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId), {
105
+ json: this.client.util.applicationCommandToRaw(options),
106
+ }), this.client);
107
+ }
108
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
109
+ async getApplicationCommandPermissions(guildId, commandId) {
110
+ return this.client.rest
111
+ .get(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId))
112
+ .then((response) => response.map((permissions) => ({
113
+ id: permissions.id,
114
+ applicationId: permissions.application_id,
115
+ guildId: permissions.guild_id,
116
+ permissions: permissions.permissions.map((permission) => ({
117
+ id: permission.id,
118
+ type: permission.type,
119
+ permission: permission.permission,
120
+ })),
121
+ })));
122
+ }
123
+ /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
124
+ async getEntitlements(options) {
125
+ return this.client.rest
126
+ .get(rest_1.Endpoints.applicationEntitlements(this.id), {
127
+ query: {
128
+ user_id: options?.userId,
129
+ sku_ids: options?.skuIds,
130
+ before: options?.before,
131
+ after: options?.after,
132
+ limit: options?.limit,
133
+ guild_id: options?.guildId,
134
+ exclude_ended: options?.excludeEnded,
135
+ },
136
+ })
137
+ .then((response) => response.map((data) => new _1.Entitlement(data, this.client)));
138
+ }
139
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
140
+ async getGlobalApplicationCommand(commandId) {
141
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationCommand(this.id, commandId)), this.client);
142
+ }
143
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
144
+ async getGlobalApplicationCommands(options) {
145
+ return this.client.rest
146
+ .get(rest_1.Endpoints.applicationCommands(this.id), {
147
+ query: {
148
+ with_localizations: options.withLocalizations,
149
+ },
150
+ })
151
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
152
+ }
153
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
154
+ async getGuildApplicationCommand(guildId, commandId) {
155
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId)), this.client);
156
+ }
157
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
158
+ async getGuildApplicationCommands(guildId, options) {
159
+ return this.client.rest
160
+ .get(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
161
+ query: {
162
+ with_localizations: options?.withLocalizations,
163
+ },
164
+ })
165
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
166
+ }
167
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
168
+ async getGuildApplicationCommandPermissions(guildId) {
169
+ return this.client.rest
170
+ .get(rest_1.Endpoints.guildApplicationCommandsPermissions(this.id, guildId))
171
+ .then((response) => response.map((permissions) => ({
172
+ id: permissions.id,
173
+ applicationId: permissions.application_id,
174
+ guildId: permissions.guild_id,
175
+ permissions: permissions.permissions.map((permission) => ({
176
+ id: permission.id,
177
+ type: permission.type,
178
+ permission: permission.permission,
179
+ })),
180
+ })));
181
+ }
182
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
183
+ async getApplicationRoleConnectionMetadataRecords() {
184
+ return this.client.rest
185
+ .get(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
186
+ .then((response) => response.map((data) => ({
187
+ type: data.type,
188
+ key: data.key,
189
+ name: data.name,
190
+ nameLocalizations: data.name_localizations,
191
+ description: data.description,
192
+ descriptionLocalizations: data.description_localizations,
193
+ })));
194
+ }
195
+ /** https://discord.com/developers/docs/monetization/skus#list-skus */
196
+ async getSKUs() {
197
+ return this.client.rest
198
+ .get(rest_1.Endpoints.applicationSKUs(this.id))
199
+ .then((response) => response.map((data) => new _1.SKU(data, this.client)));
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
+ /** 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":["../../../lib/structures/ClientApplication.ts"],"names":[],"mappings":";;;AAAA,wBAOW;AAeX,kCAAoC;AAOpC,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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AO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AAreD,8CAqeC"}
@@ -0,0 +1,28 @@
1
+ import { User } from ".";
2
+ import type { Client } from "../Client";
3
+ import type { JSONEmoji, RawEmoji } from "../types";
4
+ /** https://discord.com/developers/docs/resources/emoji */
5
+ export declare class Emoji {
6
+ private client;
7
+ private raw;
8
+ id: string | null;
9
+ name: string | null;
10
+ roles?: Array<string>;
11
+ user?: User;
12
+ requireColons?: boolean;
13
+ managed?: boolean;
14
+ animated?: boolean;
15
+ available?: boolean;
16
+ constructor(data: RawEmoji, client: Client);
17
+ private patch;
18
+ /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
19
+ delete(guildId: string, reason?: string): void;
20
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
21
+ edit(guildId: string, options: {
22
+ name?: string;
23
+ roles?: Array<string> | null;
24
+ }, reason?: string): Promise<Emoji>;
25
+ toString(): string;
26
+ toRaw(): RawEmoji;
27
+ toJSON(): JSONEmoji;
28
+ }
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Emoji = void 0;
4
+ const _1 = require(".");
5
+ const rest_1 = require("../rest");
6
+ /** https://discord.com/developers/docs/resources/emoji */
7
+ class Emoji {
8
+ client;
9
+ raw;
10
+ id;
11
+ name;
12
+ roles;
13
+ user;
14
+ requireColons;
15
+ managed;
16
+ animated;
17
+ available;
18
+ constructor(data, client) {
19
+ this.client = client;
20
+ this.raw = data;
21
+ this.id = data.id;
22
+ this.name = data.name;
23
+ this.patch(data);
24
+ }
25
+ patch(data) {
26
+ if (data.roles !== undefined)
27
+ this.roles = data.roles;
28
+ if (data.user !== undefined)
29
+ this.user = new _1.User(data.user, this.client);
30
+ if (data.require_colons !== undefined)
31
+ this.requireColons = data.require_colons;
32
+ if (data.managed !== undefined)
33
+ this.managed = data.managed;
34
+ if (data.animated !== undefined)
35
+ this.animated = data.animated;
36
+ if (data.available !== undefined)
37
+ this.available = data.available;
38
+ }
39
+ /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
40
+ delete(guildId, reason) {
41
+ if (!this.id)
42
+ throw new Error("[disgroove] Cannot delete a default Discord emoji");
43
+ this.client.rest.delete(rest_1.Endpoints.guildEmoji(guildId, this.id), {
44
+ reason,
45
+ });
46
+ }
47
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
48
+ async edit(guildId, options, reason) {
49
+ if (!this.id)
50
+ throw new Error("[disgroove] Cannot edit a default Discord emoji");
51
+ return new Emoji(await this.client.rest.patch(rest_1.Endpoints.guildEmoji(guildId, this.id), {
52
+ json: {
53
+ name: options.name,
54
+ roles: options.roles,
55
+ },
56
+ reason,
57
+ }), this.client);
58
+ }
59
+ toString() {
60
+ return `[${this.constructor.name}]`;
61
+ }
62
+ toRaw() {
63
+ return this.raw;
64
+ }
65
+ toJSON() {
66
+ return {
67
+ id: this.id,
68
+ name: this.name,
69
+ roles: this.roles,
70
+ user: this.user?.toJSON(),
71
+ requireColons: this.requireColons,
72
+ managed: this.managed,
73
+ animated: this.animated,
74
+ available: this.available,
75
+ };
76
+ }
77
+ }
78
+ exports.Emoji = Emoji;
79
+ //# sourceMappingURL=Emoji.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../../lib/structures/Emoji.ts"],"names":[],"mappings":";;;AAAA,wBAAyB;AAEzB,kCAAoC;AAGpC,0DAA0D;AAC1D,MAAa,KAAK;IACR,MAAM,CAAS;IACf,GAAG,CAAW;IACtB,EAAE,CAAgB;IAClB,IAAI,CAAgB;IACpB,KAAK,CAAiB;IACtB,IAAI,CAAQ;IACZ,aAAa,CAAW;IACxB,OAAO,CAAW;IAClB,QAAQ,CAAW;IACnB,SAAS,CAAW;IAEpB,YAAY,IAAc,EAAE,MAAc;QACxC,IAAI,CAAC,MA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AAC,IAAI,CACR,OAAe,EACf,OAGC,EACD,MAAe;QAEf,IAAI,CAAC,IAAI,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAErE,OAAO,IAAI,KAAK,CACd,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAC1B,gBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EACtC;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;aACrB;YACD,MAAM;SACP,CACF,EACD,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC;IACtC,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE;YACzB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF;AAxFD,sBAwFC"}
@@ -0,0 +1,24 @@
1
+ import type { Client } from "../Client";
2
+ import type { JSONEntitlement, RawEntitlement } from "../types";
3
+ import { Base } from ".";
4
+ import type { EntitlementTypes } from "../constants";
5
+ /** https://discord.com/developers/docs/monetization/entitlements */
6
+ export declare class Entitlement extends Base {
7
+ protected raw: RawEntitlement;
8
+ skuId: string;
9
+ applicationId: string;
10
+ userId?: string;
11
+ promotionId?: string | null;
12
+ type: EntitlementTypes;
13
+ deleted: boolean;
14
+ giftCodeFlags?: number;
15
+ consumed?: boolean;
16
+ startsAt?: string;
17
+ endsAt?: string;
18
+ guildId?: string;
19
+ subscriptionId?: string;
20
+ constructor(data: RawEntitlement, client: Client);
21
+ protected patch(data: RawEntitlement): void;
22
+ toRaw(): RawEntitlement;
23
+ toJSON(): JSONEntitlement;
24
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Entitlement = void 0;
4
+ const _1 = require(".");
5
+ /** https://discord.com/developers/docs/monetization/entitlements */
6
+ class Entitlement extends _1.Base {
7
+ raw;
8
+ skuId;
9
+ applicationId;
10
+ userId;
11
+ promotionId; // Undocumented
12
+ type;
13
+ deleted;
14
+ giftCodeFlags; // Undocumented
15
+ consumed; // Undocumented
16
+ startsAt;
17
+ endsAt;
18
+ guildId;
19
+ subscriptionId; // Undocumented
20
+ constructor(data, client) {
21
+ super(data.id, client);
22
+ this.raw = data;
23
+ this.skuId = data.sku_id;
24
+ this.applicationId = data.application_id;
25
+ this.type = data.type;
26
+ this.deleted = data.deleted;
27
+ }
28
+ patch(data) {
29
+ if (data.user_id !== undefined)
30
+ this.userId = data.user_id;
31
+ if (data.promotion_id !== undefined)
32
+ this.promotionId = data.promotion_id;
33
+ if (data.gift_code_flags !== undefined)
34
+ this.giftCodeFlags = data.gift_code_flags;
35
+ if (data.consumed !== undefined)
36
+ this.consumed = data.consumed;
37
+ if (data.starts_at !== undefined)
38
+ this.startsAt = data.starts_at;
39
+ if (data.ends_at !== undefined)
40
+ this.endsAt = data.ends_at;
41
+ if (data.guild_id !== undefined)
42
+ this.guildId = data.guild_id;
43
+ if (data.subscription_id !== undefined)
44
+ this.subscriptionId;
45
+ }
46
+ toRaw() {
47
+ return this.raw;
48
+ }
49
+ toJSON() {
50
+ return {
51
+ id: this.id,
52
+ skuId: this.skuId,
53
+ applicationId: this.applicationId,
54
+ userId: this.userId,
55
+ promotionId: this.promotionId,
56
+ type: this.type,
57
+ deleted: this.deleted,
58
+ giftCodeFlags: this.giftCodeFlags,
59
+ consumed: this.consumed,
60
+ startsAt: this.startsAt,
61
+ endsAt: this.endsAt,
62
+ guildId: this.guildId,
63
+ subscriptionId: this.subscriptionId,
64
+ };
65
+ }
66
+ }
67
+ exports.Entitlement = Entitlement;
68
+ //# sourceMappingURL=Entitlement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Entitlement.js","sourceRoot":"","sources":["../../../lib/structures/Entitlement.ts"],"names":[],"mappings":";;;AAEA,wBAAyB;AAGzB,oEAAoE;AACpE,MAAa,WAAY,SAAQ,OAAI;IAChB,GAAG,CAAiB;IACvC,KAAK,CAAS;IACd,aAAa,CAAS;IACtB,MAAM,CAAU;IAChB,WAAW,CAAiB,CAAC,eAAe;IAC5C,IAAI,CAAmB;IACvB,OAAO,CAAU;IACjB,aAAa,CAAU,CAAC,eAAe;IACvC,QAAQ,CAAW,CAAC,eAAe;IACnC,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,cAAc,CAAU,CAAC,eAAe;IAExC,YAAY,IAAoB,EAAE,MAAc;QAC9C,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC9B,CAAC;IAEkB,KAAK,CAAC,IAAoB;QAC3C,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3D,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;YAAE,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