oceanic.js 1.10.3-dev.c6c9f52 → 1.10.3-dev.ca8b6e8

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 (205) hide show
  1. package/dist/lib/Client.d.ts +99 -0
  2. package/dist/lib/Client.js +263 -0
  3. package/dist/lib/Constants.d.ts +1215 -0
  4. package/dist/lib/Constants.js +1513 -0
  5. package/dist/lib/gateway/Shard.d.ts +83 -0
  6. package/dist/lib/gateway/Shard.js +1621 -0
  7. package/dist/lib/gateway/ShardManager.d.ts +29 -0
  8. package/dist/lib/gateway/ShardManager.js +300 -0
  9. package/dist/lib/index.d.ts +84 -0
  10. package/dist/lib/index.js +168 -0
  11. package/dist/lib/rest/Bucket.d.ts +33 -0
  12. package/dist/lib/rest/Bucket.js +78 -0
  13. package/dist/lib/rest/DiscordHTTPError.d.ts +16 -0
  14. package/dist/lib/rest/DiscordHTTPError.js +65 -0
  15. package/dist/lib/rest/DiscordRESTError.d.ts +19 -0
  16. package/dist/lib/rest/DiscordRESTError.js +89 -0
  17. package/dist/lib/rest/OAuthHelper.d.ts +62 -0
  18. package/dist/lib/rest/OAuthHelper.js +183 -0
  19. package/dist/lib/rest/RESTManager.d.ts +42 -0
  20. package/dist/lib/rest/RESTManager.js +82 -0
  21. package/dist/lib/rest/RequestHandler.d.ts +28 -0
  22. package/dist/lib/rest/RequestHandler.js +313 -0
  23. package/dist/lib/rest/SequentialBucket.d.ts +25 -0
  24. package/dist/lib/rest/SequentialBucket.js +76 -0
  25. package/dist/lib/routes/Applications.d.ts +171 -0
  26. package/dist/lib/routes/Applications.js +447 -0
  27. package/dist/lib/routes/Channels.d.ts +408 -0
  28. package/dist/lib/routes/Channels.js +1160 -0
  29. package/dist/lib/routes/Guilds.d.ts +606 -0
  30. package/dist/lib/routes/Guilds.js +1669 -0
  31. package/dist/lib/routes/Interactions.d.ts +74 -0
  32. package/dist/lib/routes/Interactions.js +141 -0
  33. package/dist/lib/routes/Miscellaneous.d.ts +31 -0
  34. package/dist/lib/routes/Miscellaneous.js +69 -0
  35. package/dist/lib/routes/OAuth.d.ts +108 -0
  36. package/dist/lib/routes/OAuth.js +312 -0
  37. package/dist/lib/routes/Users.d.ts +32 -0
  38. package/dist/lib/routes/Users.js +59 -0
  39. package/dist/lib/routes/Webhooks.d.ts +128 -0
  40. package/dist/lib/routes/Webhooks.js +265 -0
  41. package/dist/lib/structures/AnnouncementChannel.d.ts +36 -0
  42. package/dist/lib/structures/AnnouncementChannel.js +47 -0
  43. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +18 -0
  44. package/dist/lib/structures/AnnouncementThreadChannel.js +27 -0
  45. package/dist/lib/structures/Application.d.ts +102 -0
  46. package/dist/lib/structures/Application.js +189 -0
  47. package/dist/lib/structures/ApplicationCommand.d.ts +74 -0
  48. package/dist/lib/structures/ApplicationCommand.js +141 -0
  49. package/dist/lib/structures/Attachment.d.ts +34 -0
  50. package/dist/lib/structures/Attachment.js +64 -0
  51. package/dist/lib/structures/AuditLogEntry.d.ts +25 -0
  52. package/dist/lib/structures/AuditLogEntry.js +53 -0
  53. package/dist/lib/structures/AutoModerationRule.d.ts +49 -0
  54. package/dist/lib/structures/AutoModerationRule.js +139 -0
  55. package/dist/lib/structures/AutocompleteInteraction.d.ts +62 -0
  56. package/dist/lib/structures/AutocompleteInteraction.js +115 -0
  57. package/dist/lib/structures/Base.d.ts +20 -0
  58. package/dist/lib/structures/Base.js +58 -0
  59. package/dist/lib/structures/BaseEntitlement.d.ts +19 -0
  60. package/dist/lib/structures/BaseEntitlement.js +44 -0
  61. package/dist/lib/structures/CategoryChannel.d.ts +41 -0
  62. package/dist/lib/structures/CategoryChannel.js +105 -0
  63. package/dist/lib/structures/Channel.d.ts +20 -0
  64. package/dist/lib/structures/Channel.js +91 -0
  65. package/dist/lib/structures/ClientApplication.d.ts +153 -0
  66. package/dist/lib/structures/ClientApplication.js +220 -0
  67. package/dist/lib/structures/CommandInteraction.d.ts +127 -0
  68. package/dist/lib/structures/CommandInteraction.js +297 -0
  69. package/dist/lib/structures/ComponentInteraction.d.ts +137 -0
  70. package/dist/lib/structures/ComponentInteraction.js +311 -0
  71. package/dist/lib/structures/Entitlement.d.ts +12 -0
  72. package/dist/lib/structures/Entitlement.js +26 -0
  73. package/dist/lib/structures/ExtendedUser.d.ts +26 -0
  74. package/dist/lib/structures/ExtendedUser.js +57 -0
  75. package/dist/lib/structures/ForumChannel.d.ts +11 -0
  76. package/dist/lib/structures/ForumChannel.js +19 -0
  77. package/dist/lib/structures/GroupChannel.d.ts +62 -0
  78. package/dist/lib/structures/GroupChannel.js +133 -0
  79. package/dist/lib/structures/Guild.d.ts +654 -0
  80. package/dist/lib/structures/Guild.js +1319 -0
  81. package/dist/lib/structures/GuildChannel.d.ts +34 -0
  82. package/dist/lib/structures/GuildChannel.js +75 -0
  83. package/dist/lib/structures/GuildPreview.d.ts +50 -0
  84. package/dist/lib/structures/GuildPreview.js +119 -0
  85. package/dist/lib/structures/GuildScheduledEvent.d.ts +60 -0
  86. package/dist/lib/structures/GuildScheduledEvent.js +154 -0
  87. package/dist/lib/structures/GuildTemplate.d.ts +55 -0
  88. package/dist/lib/structures/GuildTemplate.js +126 -0
  89. package/dist/lib/structures/Integration.d.ts +54 -0
  90. package/dist/lib/structures/Integration.js +156 -0
  91. package/dist/lib/structures/Interaction.d.ts +40 -0
  92. package/dist/lib/structures/Interaction.js +90 -0
  93. package/dist/lib/structures/InteractionResolvedChannel.d.ts +28 -0
  94. package/dist/lib/structures/InteractionResolvedChannel.js +45 -0
  95. package/dist/lib/structures/Invite.d.ts +64 -0
  96. package/dist/lib/structures/Invite.js +193 -0
  97. package/dist/lib/structures/InviteGuild.d.ts +52 -0
  98. package/dist/lib/structures/InviteGuild.js +88 -0
  99. package/dist/lib/structures/MediaChannel.d.ts +11 -0
  100. package/dist/lib/structures/MediaChannel.js +19 -0
  101. package/dist/lib/structures/Member.d.ts +122 -0
  102. package/dist/lib/structures/Member.js +255 -0
  103. package/dist/lib/structures/Message.d.ts +194 -0
  104. package/dist/lib/structures/Message.js +477 -0
  105. package/dist/lib/structures/ModalSubmitInteraction.d.ts +128 -0
  106. package/dist/lib/structures/ModalSubmitInteraction.js +240 -0
  107. package/dist/lib/structures/OAuthApplication.d.ts +79 -0
  108. package/dist/lib/structures/OAuthApplication.js +210 -0
  109. package/dist/lib/structures/OAuthGuild.d.ts +35 -0
  110. package/dist/lib/structures/OAuthGuild.js +61 -0
  111. package/dist/lib/structures/PartialApplication.d.ts +30 -0
  112. package/dist/lib/structures/PartialApplication.js +67 -0
  113. package/dist/lib/structures/Permission.d.ts +21 -0
  114. package/dist/lib/structures/Permission.js +68 -0
  115. package/dist/lib/structures/PermissionOverwrite.d.ts +26 -0
  116. package/dist/lib/structures/PermissionOverwrite.js +49 -0
  117. package/dist/lib/structures/PingInteraction.d.ts +16 -0
  118. package/dist/lib/structures/PingInteraction.js +26 -0
  119. package/dist/lib/structures/Poll.d.ts +28 -0
  120. package/dist/lib/structures/Poll.js +78 -0
  121. package/dist/lib/structures/PrivateChannel.d.ts +90 -0
  122. package/dist/lib/structures/PrivateChannel.js +131 -0
  123. package/dist/lib/structures/PrivateThreadChannel.d.ts +18 -0
  124. package/dist/lib/structures/PrivateThreadChannel.js +27 -0
  125. package/dist/lib/structures/PublicThreadChannel.d.ts +21 -0
  126. package/dist/lib/structures/PublicThreadChannel.js +37 -0
  127. package/dist/lib/structures/Role.d.ts +52 -0
  128. package/dist/lib/structures/Role.js +137 -0
  129. package/dist/lib/structures/SKU.d.ts +32 -0
  130. package/dist/lib/structures/SKU.js +53 -0
  131. package/dist/lib/structures/StageChannel.d.ts +33 -0
  132. package/dist/lib/structures/StageChannel.js +44 -0
  133. package/dist/lib/structures/StageInstance.d.ts +36 -0
  134. package/dist/lib/structures/StageInstance.js +94 -0
  135. package/dist/lib/structures/Team.d.ts +22 -0
  136. package/dist/lib/structures/Team.js +67 -0
  137. package/dist/lib/structures/TestEntitlement.d.ts +10 -0
  138. package/dist/lib/structures/TestEntitlement.js +21 -0
  139. package/dist/lib/structures/TextChannel.d.ts +34 -0
  140. package/dist/lib/structures/TextChannel.js +46 -0
  141. package/dist/lib/structures/TextableChannel.d.ts +158 -0
  142. package/dist/lib/structures/TextableChannel.js +276 -0
  143. package/dist/lib/structures/TextableVoiceChannel.d.ts +39 -0
  144. package/dist/lib/structures/TextableVoiceChannel.js +81 -0
  145. package/dist/lib/structures/ThreadChannel.d.ts +159 -0
  146. package/dist/lib/structures/ThreadChannel.js +295 -0
  147. package/dist/lib/structures/ThreadOnlyChannel.d.ts +99 -0
  148. package/dist/lib/structures/ThreadOnlyChannel.js +233 -0
  149. package/dist/lib/structures/ThreadableChannel.d.ts +36 -0
  150. package/dist/lib/structures/ThreadableChannel.js +58 -0
  151. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  152. package/dist/lib/structures/UnavailableGuild.js +21 -0
  153. package/dist/lib/structures/User.d.ts +82 -0
  154. package/dist/lib/structures/User.js +168 -0
  155. package/dist/lib/structures/VoiceChannel.d.ts +20 -0
  156. package/dist/lib/structures/VoiceChannel.js +35 -0
  157. package/dist/lib/structures/VoiceState.d.ts +51 -0
  158. package/dist/lib/structures/VoiceState.js +140 -0
  159. package/dist/lib/structures/Webhook.d.ts +129 -0
  160. package/dist/lib/structures/Webhook.js +206 -0
  161. package/dist/lib/types/applications.d.ts +466 -0
  162. package/dist/lib/types/audit-log.d.ts +122 -0
  163. package/dist/lib/types/auto-moderation.d.ts +99 -0
  164. package/dist/lib/types/channels.d.ts +1244 -0
  165. package/dist/lib/types/client.d.ts +228 -0
  166. package/dist/lib/types/events.d.ts +265 -0
  167. package/dist/lib/types/gateway-raw.d.ts +584 -0
  168. package/dist/lib/types/gateway.d.ts +351 -0
  169. package/dist/lib/types/guild-template.d.ts +33 -0
  170. package/dist/lib/types/guilds.d.ts +855 -0
  171. package/dist/lib/types/index.d.ts +18 -0
  172. package/dist/lib/types/interactions.d.ts +377 -0
  173. package/dist/lib/types/json.d.ts +742 -0
  174. package/dist/lib/types/misc.d.ts +28 -0
  175. package/dist/lib/types/oauth.d.ts +201 -0
  176. package/dist/lib/types/request-handler.d.ts +52 -0
  177. package/dist/lib/types/scheduled-events.d.ts +88 -0
  178. package/dist/lib/types/shared.d.ts +9 -0
  179. package/dist/lib/types/users.d.ts +45 -0
  180. package/dist/lib/types/voice.d.ts +45 -0
  181. package/dist/lib/types/webhooks.d.ts +74 -0
  182. package/dist/lib/util/Collection.d.ts +47 -0
  183. package/dist/lib/util/Collection.js +78 -0
  184. package/dist/lib/util/Errors.d.ts +29 -0
  185. package/dist/lib/util/Errors.js +56 -0
  186. package/dist/lib/util/Routes.d.ts +127 -0
  187. package/dist/lib/util/Routes.js +248 -0
  188. package/dist/lib/util/SimpleCollection.d.ts +12 -0
  189. package/dist/lib/util/SimpleCollection.js +81 -0
  190. package/dist/lib/util/TypedCollection.d.ts +24 -0
  191. package/dist/lib/util/TypedCollection.js +76 -0
  192. package/dist/lib/util/TypedEmitter.d.ts +19 -0
  193. package/dist/lib/util/TypedEmitter.js +19 -0
  194. package/dist/lib/util/Util.d.ts +58 -0
  195. package/dist/lib/util/Util.js +535 -0
  196. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +170 -0
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +213 -0
  198. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +24 -0
  199. package/dist/lib/util/interactions/MessageInteractionResponse.js +28 -0
  200. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +24 -0
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +34 -0
  202. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +60 -0
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +124 -0
  204. package/dist/package.json +1 -1
  205. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ /** @module REST/Interactions */
2
+ import type { EditInteractionContent, InteractionContent, InteractionResponse } from "../types/interactions";
3
+ import type RESTManager from "../rest/RESTManager";
4
+ import type Message from "../structures/Message";
5
+ import type { AnyTextableChannel } from "../types/channels";
6
+ import type { Uncached } from "../types/shared";
7
+ /** Various methods for interacting with interactions. Located at {@link Client#rest | Client#rest}{@link RESTManager#interactions | .interactions}. */
8
+ export default class Interactions {
9
+ private _manager;
10
+ constructor(manager: RESTManager);
11
+ /**
12
+ * Create a followup message.
13
+ * @param applicationID The ID of the application.
14
+ * @param interactionToken The token of the interaction.
15
+ * @param options The options for creating the followup message.
16
+ * @caching This method **does not** cache its result.
17
+ */
18
+ createFollowupMessage<T extends AnyTextableChannel | Uncached>(applicationID: string, interactionToken: string, options: InteractionContent): Promise<Message<T>>;
19
+ /**
20
+ * Create an initial interaction response.
21
+ * @param interactionID The ID of the interaction.
22
+ * @param interactionToken The token of the interaction.
23
+ * @param options The options for creating the interaction response.
24
+ * @caching This method **does not** cache its result.
25
+ */
26
+ createInteractionResponse(interactionID: string, interactionToken: string, options: InteractionResponse): Promise<void>;
27
+ /**
28
+ * Delete a follow-up message.
29
+ * @param applicationID The ID of the application.
30
+ * @param interactionToken The token of the interaction.
31
+ * @param messageID The ID of the message.
32
+ * @caching This method **does not** cache its result.
33
+ */
34
+ deleteFollowupMessage(applicationID: string, interactionToken: string, messageID: string): Promise<void>;
35
+ /**
36
+ * Delete the original interaction response.
37
+ * @param applicationID The ID of the application.
38
+ * @param interactionToken The token of the interaction.
39
+ * @caching This method **does not** cache its result.
40
+ */
41
+ deleteOriginalMessage(applicationID: string, interactionToken: string): Promise<void>;
42
+ /**
43
+ * Edit a followup message.
44
+ * @param applicationID The ID of the application.
45
+ * @param interactionToken The token of the interaction.
46
+ * @param messageID The ID of the message.
47
+ * @param options The options for editing the followup message.
48
+ * @caching This method **does not** cache its result.
49
+ */
50
+ editFollowupMessage<T extends AnyTextableChannel | Uncached>(applicationID: string, interactionToken: string, messageID: string, options: EditInteractionContent): Promise<Message<T>>;
51
+ /**
52
+ * Edit an original interaction response.
53
+ * @param applicationID The ID of the application.
54
+ * @param interactionToken The token of the interaction.
55
+ * @param options The options for editing the original message.
56
+ * @caching This method **does not** cache its result.
57
+ */
58
+ editOriginalMessage<T extends AnyTextableChannel | Uncached>(applicationID: string, interactionToken: string, options: EditInteractionContent): Promise<Message<T>>;
59
+ /**
60
+ * Get a followup message.
61
+ * @param applicationID The ID of the application.
62
+ * @param interactionToken The token of the interaction.
63
+ * @param messageID The ID of the message.
64
+ * @caching This method **does not** cache its result.
65
+ */
66
+ getFollowupMessage<T extends AnyTextableChannel | Uncached>(applicationID: string, interactionToken: string, messageID: string): Promise<Message<T>>;
67
+ /**
68
+ * Get an original interaction response.
69
+ * @param applicationID The ID of the application.
70
+ * @param interactionToken The token of the interaction.
71
+ * @caching This method **does not** cache its result.
72
+ */
73
+ getOriginalMessage<T extends AnyTextableChannel | Uncached>(applicationID: string, interactionToken: string): Promise<Message<T>>;
74
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Routes = tslib_1.__importStar(require("../util/Routes"));
5
+ const Constants_1 = require("../Constants");
6
+ /** Various methods for interacting with interactions. Located at {@link Client#rest | Client#rest}{@link RESTManager#interactions | .interactions}. */
7
+ class Interactions {
8
+ _manager;
9
+ constructor(manager) {
10
+ this._manager = manager;
11
+ }
12
+ /**
13
+ * Create a followup message.
14
+ * @param applicationID The ID of the application.
15
+ * @param interactionToken The token of the interaction.
16
+ * @param options The options for creating the followup message.
17
+ * @caching This method **does not** cache its result.
18
+ */
19
+ async createFollowupMessage(applicationID, interactionToken, options) {
20
+ return this._manager.webhooks.execute(applicationID, interactionToken, options);
21
+ }
22
+ /**
23
+ * Create an initial interaction response.
24
+ * @param interactionID The ID of the interaction.
25
+ * @param interactionToken The token of the interaction.
26
+ * @param options The options for creating the interaction response.
27
+ * @caching This method **does not** cache its result.
28
+ */
29
+ async createInteractionResponse(interactionID, interactionToken, options) {
30
+ let data;
31
+ switch (options.type) {
32
+ case Constants_1.InteractionResponseTypes.PONG: {
33
+ break;
34
+ }
35
+ case Constants_1.InteractionResponseTypes.CHANNEL_MESSAGE_WITH_SOURCE:
36
+ case Constants_1.InteractionResponseTypes.UPDATE_MESSAGE: {
37
+ data = {
38
+ allowed_mentions: this._manager.client.util.formatAllowedMentions(options.data.allowedMentions),
39
+ attachments: options.data.attachments,
40
+ content: options.data.content,
41
+ components: options.data.components ? this._manager.client.util.componentsToRaw(options.data.components) : undefined,
42
+ embeds: options.data.embeds ? this._manager.client.util.embedsToRaw(options.data.embeds) : undefined,
43
+ flags: options.data.flags
44
+ };
45
+ break;
46
+ }
47
+ case Constants_1.InteractionResponseTypes.APPLICATION_COMMAND_AUTOCOMPLETE_RESULT: {
48
+ data = {
49
+ choices: options.data.choices.map(d => ({
50
+ name: d.name,
51
+ name_localizations: d.nameLocalizations,
52
+ value: d.value
53
+ }))
54
+ };
55
+ break;
56
+ }
57
+ case Constants_1.InteractionResponseTypes.MODAL: {
58
+ data = {
59
+ custom_id: options.data.customID,
60
+ components: this._manager.client.util.componentsToRaw(options.data.components),
61
+ title: options.data.title
62
+ };
63
+ break;
64
+ }
65
+ default: {
66
+ data = options.data;
67
+ break;
68
+ }
69
+ }
70
+ await this._manager.authRequest({
71
+ method: "POST",
72
+ path: Routes.INTERACTION_CALLBACK(interactionID, interactionToken),
73
+ route: "/interactions/:id/:token/callback",
74
+ json: {
75
+ data,
76
+ type: options.type
77
+ }
78
+ });
79
+ }
80
+ /**
81
+ * Delete a follow-up message.
82
+ * @param applicationID The ID of the application.
83
+ * @param interactionToken The token of the interaction.
84
+ * @param messageID The ID of the message.
85
+ * @caching This method **does not** cache its result.
86
+ */
87
+ async deleteFollowupMessage(applicationID, interactionToken, messageID) {
88
+ await this._manager.webhooks.deleteMessage(applicationID, interactionToken, messageID);
89
+ }
90
+ /**
91
+ * Delete the original interaction response.
92
+ * @param applicationID The ID of the application.
93
+ * @param interactionToken The token of the interaction.
94
+ * @caching This method **does not** cache its result.
95
+ */
96
+ async deleteOriginalMessage(applicationID, interactionToken) {
97
+ await this.deleteFollowupMessage(applicationID, interactionToken, "@original");
98
+ }
99
+ /**
100
+ * Edit a followup message.
101
+ * @param applicationID The ID of the application.
102
+ * @param interactionToken The token of the interaction.
103
+ * @param messageID The ID of the message.
104
+ * @param options The options for editing the followup message.
105
+ * @caching This method **does not** cache its result.
106
+ */
107
+ async editFollowupMessage(applicationID, interactionToken, messageID, options) {
108
+ return this._manager.webhooks.editMessage(applicationID, interactionToken, messageID, options);
109
+ }
110
+ /**
111
+ * Edit an original interaction response.
112
+ * @param applicationID The ID of the application.
113
+ * @param interactionToken The token of the interaction.
114
+ * @param options The options for editing the original message.
115
+ * @caching This method **does not** cache its result.
116
+ */
117
+ async editOriginalMessage(applicationID, interactionToken, options) {
118
+ return this.editFollowupMessage(applicationID, interactionToken, "@original", options);
119
+ }
120
+ /**
121
+ * Get a followup message.
122
+ * @param applicationID The ID of the application.
123
+ * @param interactionToken The token of the interaction.
124
+ * @param messageID The ID of the message.
125
+ * @caching This method **does not** cache its result.
126
+ */
127
+ async getFollowupMessage(applicationID, interactionToken, messageID) {
128
+ return this._manager.webhooks.getMessage(applicationID, interactionToken, messageID);
129
+ }
130
+ /**
131
+ * Get an original interaction response.
132
+ * @param applicationID The ID of the application.
133
+ * @param interactionToken The token of the interaction.
134
+ * @caching This method **does not** cache its result.
135
+ */
136
+ async getOriginalMessage(applicationID, interactionToken) {
137
+ return this.getFollowupMessage(applicationID, interactionToken, "@original");
138
+ }
139
+ }
140
+ exports.default = Interactions;
141
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW50ZXJhY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3JvdXRlcy9JbnRlcmFjdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncy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0FBQyxDQUFDO0lBQ25GLENBQUM7SUFFRDs7Ozs7OztPQU9HO0lBQ0gsS0FBSyxDQUFDLG1CQUFtQixDQUEwQyxhQUFxQixFQUFFLGdCQUF3QixFQUFFLFNBQWlCLEVBQUUsT0FBK0I7UUFDbEssT0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUksYUFBYSxFQUFFLGdCQUFnQixFQUFFLFNBQVMsRUFBRSxPQUFPLENBQUMsQ0FBQztJQUN0RyxDQUFDO0lBRUQ7Ozs7OztPQU1HO0lBQ0gsS0FBSyxDQUFDLG1CQUFtQixDQUEwQyxhQUFxQixFQUFFLGdCQUF3QixFQUFFLE9BQStCO1FBQy9JLE9BQU8sSUFBSSxDQUFDLG1CQUFtQixDQUFJLGFBQWEsRUFBRSxnQkFBZ0IsRUFBRSxXQUFXLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDOUYsQ0FBQztJQUVEOzs7Ozs7T0FNRztJQUNILEtBQUssQ0FBQyxrQkFBa0IsQ0FBMEMsYUFBcUIsRUFBRSxnQkFBd0IsRUFBRSxTQUFpQjtRQUNoSSxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBSSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsU0FBUyxDQUFDLENBQUM7SUFDNUYsQ0FBQztJQUVEOzs7OztPQUtHO0lBQ0gsS0FBSyxDQUFDLGtCQUFrQixDQUEwQyxhQUFxQixFQUFFLGdCQUF3QjtRQUM3RyxPQUFPLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsV0FBVyxDQUFDLENBQUM7SUFDakYsQ0FBQztDQUNKO0FBL0lELCtCQStJQyJ9
@@ -0,0 +1,31 @@
1
+ import type RESTManager from "../rest/RESTManager";
2
+ import type { Sticker, StickerPack } from "../types/guilds";
3
+ import type { VoiceRegion } from "../types/voice";
4
+ import type { RefreshAttachmentURLsResponse } from "../types/misc";
5
+ /** Methods that don't fit anywhere else. Located at {@link Client#rest | Client#rest}{@link RESTManager#misc | .misc}. */
6
+ export default class Miscellaneous {
7
+ private _manager;
8
+ constructor(manager: RESTManager);
9
+ /**
10
+ * Get a sticker.
11
+ * @param stickerID The ID of the sticker to get.
12
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached, or if the sticker is not a guild sticker.
13
+ * @caches {@link Guild#stickers | Guild#stickers}
14
+ */
15
+ getSticker(stickerID: string): Promise<Sticker>;
16
+ /**
17
+ * Get the default sticker packs.
18
+ * @caching This method **does not** cache its result.
19
+ */
20
+ getStickerPacks(): Promise<Array<StickerPack>>;
21
+ /**
22
+ * Get the list of usable voice regions.
23
+ * @caching This method **does not** cache its result.
24
+ */
25
+ getVoiceRegions(): Promise<Array<VoiceRegion>>;
26
+ /**
27
+ * Refresh expired attachment URLs.
28
+ * @param urls The CDN urls to refresh.
29
+ */
30
+ refreshAttachmentURLs(urls: Array<string>): Promise<RefreshAttachmentURLsResponse>;
31
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module REST/Miscellaneous */
5
+ const Routes = tslib_1.__importStar(require("../util/Routes"));
6
+ /** Methods that don't fit anywhere else. Located at {@link Client#rest | Client#rest}{@link RESTManager#misc | .misc}. */
7
+ class Miscellaneous {
8
+ _manager;
9
+ constructor(manager) {
10
+ this._manager = manager;
11
+ }
12
+ /**
13
+ * Get a sticker.
14
+ * @param stickerID The ID of the sticker to get.
15
+ * @caching This method **may** cache its result. The result will not be cached if the guild is not cached, or if the sticker is not a guild sticker.
16
+ * @caches {@link Guild#stickers | Guild#stickers}
17
+ */
18
+ async getSticker(stickerID) {
19
+ return this._manager.authRequest({
20
+ method: "GET",
21
+ path: Routes.STICKER(stickerID)
22
+ }).then(data => data.guild_id === undefined ? this._manager.client.util.convertSticker(data) : this._manager.client.guilds.get(data.guild_id)?.stickers.update(data) ?? this._manager.client.util.convertSticker(data));
23
+ }
24
+ /**
25
+ * Get the default sticker packs.
26
+ * @caching This method **does not** cache its result.
27
+ */
28
+ async getStickerPacks() {
29
+ return this._manager.authRequest({
30
+ method: "GET",
31
+ path: Routes.STICKER_PACKS
32
+ }).then(data => data.sticker_packs.map(pack => ({
33
+ bannerAssetID: pack.banner_asset_id,
34
+ coverStickerID: pack.cover_sticker_id,
35
+ description: pack.description,
36
+ id: pack.id,
37
+ name: pack.name,
38
+ skuID: pack.sku_id,
39
+ stickers: pack.stickers.map(sticker => this._manager.client.util.convertSticker(sticker))
40
+ })));
41
+ }
42
+ /**
43
+ * Get the list of usable voice regions.
44
+ * @caching This method **does not** cache its result.
45
+ */
46
+ async getVoiceRegions() {
47
+ return this._manager.authRequest({
48
+ method: "GET",
49
+ path: Routes.VOICE_REGIONS
50
+ });
51
+ }
52
+ /**
53
+ * Refresh expired attachment URLs.
54
+ * @param urls The CDN urls to refresh.
55
+ */
56
+ async refreshAttachmentURLs(urls) {
57
+ return this._manager.authRequest({
58
+ method: "POST",
59
+ path: Routes.REFRESH_ATTACHMENT_URLS,
60
+ json: {
61
+ attachment_urls: urls
62
+ }
63
+ }).then(data => ({
64
+ refreshedURLs: data.refreshed_urls
65
+ }));
66
+ }
67
+ }
68
+ exports.default = Miscellaneous;
69
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlzY2VsbGFuZW91cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9yb3V0ZXMvTWlzY2VsbGFuZW91cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBaUM7QUFDakMsK0RBQXlDO0FBTXpDLDBIQUEwSDtBQUMxSCxNQUFxQixhQUFhO0lBQ3RCLFFBQVEsQ0FBYztJQUM5QixZQUFZLE9BQW9CO1FBQzVC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SjtBQWhFRCxnQ0FnRUMifQ==
@@ -0,0 +1,108 @@
1
+ /** @module REST/OAuth */
2
+ import type { AuthorizationInformation, ClientCredentialsTokenOptions, ClientCredentialsTokenResponse, Connection, ExchangeCodeOptions, ExchangeCodeResponse, RefreshTokenOptions, RefreshTokenResponse, RevokeTokenOptions, GetCurrentGuildsOptions, RoleConnectionMetadata, RoleConnection } from "../types/oauth";
3
+ import OAuthApplication from "../structures/OAuthApplication";
4
+ import Member from "../structures/Member";
5
+ import type RESTManager from "../rest/RESTManager";
6
+ import OAuthHelper from "../rest/OAuthHelper";
7
+ import OAuthGuild from "../structures/OAuthGuild";
8
+ import ExtendedUser from "../structures/ExtendedUser";
9
+ import type { UpdateUserApplicationRoleConnectionOptions } from "../types";
10
+ /** Various methods for interacting with oauth. Located at {@link Client#rest | Client#rest}{@link RESTManager#oauth | .oauth}. */
11
+ export default class OAuth {
12
+ private _manager;
13
+ constructor(manager: RESTManager);
14
+ /**
15
+ * Get an access token for the application owner. If the application is owned by a team, this is restricted to `identify` & `applications.commands.update`.
16
+ * @param options The options to for the client credentials grant.
17
+ * @caching This method **does not** cache its result.
18
+ */
19
+ clientCredentialsGrant(options: ClientCredentialsTokenOptions): Promise<ClientCredentialsTokenResponse>;
20
+ /**
21
+ * Exchange a code for an access token.
22
+ * @param options The options for exchanging the code.
23
+ * @caching This method **does not** cache its result.
24
+ */
25
+ exchangeCode(options: ExchangeCodeOptions): Promise<ExchangeCodeResponse>;
26
+ /**
27
+ * Get the current OAuth2 application's information.
28
+ * @caching This method **does not** cache its result.
29
+ */
30
+ getApplication(): Promise<OAuthApplication>;
31
+ /**
32
+ * Get information about the current authorization.
33
+ *
34
+ * Note: OAuth only. Bots cannot use this.
35
+ * @caching This method **does** cache part of its result.
36
+ * @caches {@link Client#users | Client#users}
37
+ */
38
+ getCurrentAuthorizationInformation(): Promise<AuthorizationInformation>;
39
+ /**
40
+ * Get the connections of the currently authenticated user.
41
+ *
42
+ * Note: Requires the `connections` scope when using oauth.
43
+ * @caching This method **does not** cache its result.
44
+ */
45
+ getCurrentConnections(): Promise<Array<Connection>>;
46
+ /**
47
+ * Get the guild member information about the currently authenticated user.
48
+ *
49
+ * Note: OAuth only. Requires the `guilds.members.read` scope. Bots cannot use this.
50
+ * @param guild the ID of the guild
51
+ * @caching This method **does not** cache its result.
52
+ */
53
+ getCurrentGuildMember(guild: string): Promise<Member>;
54
+ /**
55
+ * Get the currently authenticated user's guilds. Note these are missing several properties gateway guilds have.
56
+ * @param options The options for getting the current user's guilds.
57
+ * @caching This method **does not** cache its result.
58
+ */
59
+ getCurrentGuilds(options?: GetCurrentGuildsOptions): Promise<Array<OAuthGuild>>;
60
+ /**
61
+ * Get the currently authenticated user's information.
62
+ * @caching This method **does not** cache its result.
63
+ */
64
+ getCurrentUser(): Promise<ExtendedUser>;
65
+ /**
66
+ * Get a helper instance that can be used with a specific access token.
67
+ * @param accessToken The access token. Must be prefixed with `Bearer `.
68
+ */
69
+ getHelper(accessToken: string): OAuthHelper;
70
+ /**
71
+ * Get an application's role connection metadata records.
72
+ * @param applicationID The ID of the application.
73
+ * @caching This method **does not** cache its result.
74
+ */
75
+ getRoleConnectionsMetadata(applicationID: string): Promise<Array<RoleConnectionMetadata>>;
76
+ /**
77
+ * Get the authenticated user's role connection object for an application. This requires the `role_connections.write` scope.
78
+ * @param applicationID The ID of the application.
79
+ * @caching This method **does not** cache its result.
80
+ */
81
+ getUserRoleConnection(applicationID: string): Promise<RoleConnection>;
82
+ /**
83
+ * Refresh an existing access token.
84
+ * @param options The options for refreshing the token.
85
+ * @caching This method **does not** cache its result.
86
+ */
87
+ refreshToken(options: RefreshTokenOptions): Promise<RefreshTokenResponse>;
88
+ /**
89
+ * Revoke an access token.
90
+ * @param options The options for revoking the token.
91
+ * @caching This method **does not** cache its result.
92
+ */
93
+ revokeToken(options: RevokeTokenOptions): Promise<void>;
94
+ /**
95
+ * Update an application's role connections metadata.
96
+ * @param applicationID The ID of the application.
97
+ * @param metadata The metadata records.
98
+ * @caching This method **does not** cache its result.
99
+ */
100
+ updateRoleConnectionsMetadata(applicationID: string, metadata: Array<RoleConnectionMetadata>): Promise<Array<RoleConnectionMetadata>>;
101
+ /**
102
+ * Update the authenticated user's role connection object for an application. This requires the `role_connections.write` scope.
103
+ * @param applicationID The ID of the application.
104
+ * @param data The metadata to update.
105
+ * @caching This method **does not** cache its result.
106
+ */
107
+ updateUserRoleConnection(applicationID: string, data: UpdateUserApplicationRoleConnectionOptions): Promise<RoleConnection>;
108
+ }