disgroove 2.0.0 → 2.1.0-dev.118f285

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 (190) hide show
  1. package/dist/lib/Client.d.ts +16 -4
  2. package/dist/lib/Client.js +216 -180
  3. package/dist/lib/constants.d.ts +29 -5
  4. package/dist/lib/constants.js +235 -209
  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 +5 -2
  11. package/dist/lib/rest/Endpoints.js +10 -5
  12. package/dist/lib/rest/RequestManager.d.ts +2 -3
  13. package/dist/lib/rest/RequestManager.js +17 -18
  14. package/dist/lib/rest/index.js +0 -1
  15. package/dist/lib/types/application-command.d.ts +5 -1
  16. package/dist/lib/types/application-command.js +0 -1
  17. package/dist/lib/types/application-role-connection-metadata.js +0 -1
  18. package/dist/lib/types/application.d.ts +11 -1
  19. package/dist/lib/types/application.js +0 -1
  20. package/dist/lib/types/audit-log.js +0 -1
  21. package/dist/lib/types/auto-moderation.js +0 -1
  22. package/dist/lib/types/channel.d.ts +4 -1
  23. package/dist/lib/types/channel.js +0 -1
  24. package/dist/lib/types/emoji.js +0 -1
  25. package/dist/lib/types/entitlements.js +0 -1
  26. package/dist/lib/types/gateway-events.d.ts +28 -0
  27. package/dist/lib/types/gateway-events.js +0 -1
  28. package/dist/lib/types/guild-scheduled-event.js +0 -1
  29. package/dist/lib/types/guild-template.js +0 -1
  30. package/dist/lib/types/guild.d.ts +4 -0
  31. package/dist/lib/types/guild.js +0 -1
  32. package/dist/lib/types/index.d.ts +1 -0
  33. package/dist/lib/types/index.js +1 -1
  34. package/dist/lib/types/interaction.d.ts +3 -1
  35. package/dist/lib/types/interaction.js +0 -1
  36. package/dist/lib/types/invite.js +0 -1
  37. package/dist/lib/types/message-components.js +0 -1
  38. package/dist/lib/types/poll.d.ts +66 -0
  39. package/dist/lib/types/poll.js +2 -0
  40. package/dist/lib/types/role.js +0 -1
  41. package/dist/lib/types/sku.js +0 -1
  42. package/dist/lib/types/stage-instance.js +0 -1
  43. package/dist/lib/types/sticker.js +0 -1
  44. package/dist/lib/types/team.js +0 -1
  45. package/dist/lib/types/user.js +0 -1
  46. package/dist/lib/types/voice.js +0 -1
  47. package/dist/lib/types/webhook.d.ts +3 -1
  48. package/dist/lib/types/webhook.js +0 -1
  49. package/dist/lib/utils/Util.js +0 -1
  50. package/dist/lib/utils/errors.d.ts +1 -1
  51. package/dist/lib/utils/errors.js +4 -5
  52. package/dist/lib/utils/index.js +0 -1
  53. package/dist/package.json +4 -2
  54. package/package.json +4 -2
  55. package/dist/lib/Client.js.map +0 -1
  56. package/dist/lib/constants.js.map +0 -1
  57. package/dist/lib/gateway/Shard.js.map +0 -1
  58. package/dist/lib/gateway/ShardManager.js.map +0 -1
  59. package/dist/lib/gateway/ShardsManager.d.ts +0 -6
  60. package/dist/lib/gateway/ShardsManager.js +0 -14
  61. package/dist/lib/gateway/ShardsManager.js.map +0 -1
  62. package/dist/lib/gateway/index.js.map +0 -1
  63. package/dist/lib/index.js.map +0 -1
  64. package/dist/lib/rest/CDN.js.map +0 -1
  65. package/dist/lib/rest/Endpoints.js.map +0 -1
  66. package/dist/lib/rest/REST.d.ts +0 -17
  67. package/dist/lib/rest/REST.js +0 -35
  68. package/dist/lib/rest/REST.js.map +0 -1
  69. package/dist/lib/rest/RequestManager.js.map +0 -1
  70. package/dist/lib/rest/RequestsManager.d.ts +0 -22
  71. package/dist/lib/rest/RequestsManager.js +0 -123
  72. package/dist/lib/rest/RequestsManager.js.map +0 -1
  73. package/dist/lib/rest/index.js.map +0 -1
  74. package/dist/lib/structures/Application.d.ts +0 -174
  75. package/dist/lib/structures/Application.js +0 -328
  76. package/dist/lib/structures/Application.js.map +0 -1
  77. package/dist/lib/structures/ApplicationCommand.d.ts +0 -45
  78. package/dist/lib/structures/ApplicationCommand.js +0 -127
  79. package/dist/lib/structures/ApplicationCommand.js.map +0 -1
  80. package/dist/lib/structures/AuditLog.d.ts +0 -19
  81. package/dist/lib/structures/AuditLog.js +0 -101
  82. package/dist/lib/structures/AuditLog.js.map +0 -1
  83. package/dist/lib/structures/AutoModerationRule.d.ts +0 -34
  84. package/dist/lib/structures/AutoModerationRule.js +0 -96
  85. package/dist/lib/structures/AutoModerationRule.js.map +0 -1
  86. package/dist/lib/structures/Base.d.ts +0 -10
  87. package/dist/lib/structures/Base.js +0 -23
  88. package/dist/lib/structures/Base.js.map +0 -1
  89. package/dist/lib/structures/Channel.d.ts +0 -254
  90. package/dist/lib/structures/Channel.js +0 -592
  91. package/dist/lib/structures/Channel.js.map +0 -1
  92. package/dist/lib/structures/ClientApplication.d.ts +0 -150
  93. package/dist/lib/structures/ClientApplication.js +0 -241
  94. package/dist/lib/structures/ClientApplication.js.map +0 -1
  95. package/dist/lib/structures/Emoji.d.ts +0 -26
  96. package/dist/lib/structures/Emoji.js +0 -75
  97. package/dist/lib/structures/Emoji.js.map +0 -1
  98. package/dist/lib/structures/Entitlement.d.ts +0 -24
  99. package/dist/lib/structures/Entitlement.js +0 -68
  100. package/dist/lib/structures/Entitlement.js.map +0 -1
  101. package/dist/lib/structures/Guild.d.ts +0 -474
  102. package/dist/lib/structures/Guild.js +0 -1141
  103. package/dist/lib/structures/Guild.js.map +0 -1
  104. package/dist/lib/structures/GuildMember.d.ts +0 -49
  105. package/dist/lib/structures/GuildMember.js +0 -146
  106. package/dist/lib/structures/GuildMember.js.map +0 -1
  107. package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -49
  108. package/dist/lib/structures/GuildScheduledEvent.js +0 -118
  109. package/dist/lib/structures/GuildScheduledEvent.js.map +0 -1
  110. package/dist/lib/structures/GuildTemplate.d.ts +0 -30
  111. package/dist/lib/structures/GuildTemplate.js +0 -72
  112. package/dist/lib/structures/GuildTemplate.js.map +0 -1
  113. package/dist/lib/structures/IdentifiableBase.d.ts +0 -15
  114. package/dist/lib/structures/IdentifiableBase.js +0 -25
  115. package/dist/lib/structures/IdentifiableBase.js.map +0 -1
  116. package/dist/lib/structures/Integration.d.ts +0 -31
  117. package/dist/lib/structures/Integration.js +0 -103
  118. package/dist/lib/structures/Integration.js.map +0 -1
  119. package/dist/lib/structures/Interaction.d.ts +0 -76
  120. package/dist/lib/structures/Interaction.js +0 -346
  121. package/dist/lib/structures/Interaction.js.map +0 -1
  122. package/dist/lib/structures/Invite.d.ts +0 -26
  123. package/dist/lib/structures/Invite.js +0 -82
  124. package/dist/lib/structures/Invite.js.map +0 -1
  125. package/dist/lib/structures/Message.d.ts +0 -86
  126. package/dist/lib/structures/Message.js +0 -303
  127. package/dist/lib/structures/Message.js.map +0 -1
  128. package/dist/lib/structures/Role.d.ts +0 -37
  129. package/dist/lib/structures/Role.js +0 -90
  130. package/dist/lib/structures/Role.js.map +0 -1
  131. package/dist/lib/structures/SKU.d.ts +0 -23
  132. package/dist/lib/structures/SKU.js +0 -63
  133. package/dist/lib/structures/SKU.js.map +0 -1
  134. package/dist/lib/structures/StageInstance.d.ts +0 -24
  135. package/dist/lib/structures/StageInstance.js +0 -57
  136. package/dist/lib/structures/StageInstance.js.map +0 -1
  137. package/dist/lib/structures/Sticker.d.ts +0 -31
  138. package/dist/lib/structures/Sticker.js +0 -86
  139. package/dist/lib/structures/Sticker.js.map +0 -1
  140. package/dist/lib/structures/Team.d.ts +0 -14
  141. package/dist/lib/structures/Team.js +0 -39
  142. package/dist/lib/structures/Team.js.map +0 -1
  143. package/dist/lib/structures/TestEntitlement.d.ts +0 -23
  144. package/dist/lib/structures/TestEntitlement.js +0 -61
  145. package/dist/lib/structures/TestEntitlement.js.map +0 -1
  146. package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
  147. package/dist/lib/structures/UnavailableGuild.js +0 -25
  148. package/dist/lib/structures/UnavailableGuild.js.map +0 -1
  149. package/dist/lib/structures/User.d.ts +0 -63
  150. package/dist/lib/structures/User.js +0 -177
  151. package/dist/lib/structures/User.js.map +0 -1
  152. package/dist/lib/structures/VoiceState.d.ts +0 -24
  153. package/dist/lib/structures/VoiceState.js +0 -66
  154. package/dist/lib/structures/VoiceState.js.map +0 -1
  155. package/dist/lib/structures/Webhook.d.ts +0 -82
  156. package/dist/lib/structures/Webhook.js +0 -223
  157. package/dist/lib/structures/Webhook.js.map +0 -1
  158. package/dist/lib/structures/index.d.ts +0 -28
  159. package/dist/lib/structures/index.js +0 -45
  160. package/dist/lib/structures/index.js.map +0 -1
  161. package/dist/lib/types/application-command.js.map +0 -1
  162. package/dist/lib/types/application-role-connection-metadata.js.map +0 -1
  163. package/dist/lib/types/application.js.map +0 -1
  164. package/dist/lib/types/audit-log.js.map +0 -1
  165. package/dist/lib/types/auto-moderation.js.map +0 -1
  166. package/dist/lib/types/channel.js.map +0 -1
  167. package/dist/lib/types/emoji.js.map +0 -1
  168. package/dist/lib/types/entitlements.js.map +0 -1
  169. package/dist/lib/types/gateway-events.js.map +0 -1
  170. package/dist/lib/types/guild-scheduled-event.js.map +0 -1
  171. package/dist/lib/types/guild-template.js.map +0 -1
  172. package/dist/lib/types/guild.js.map +0 -1
  173. package/dist/lib/types/index.js.map +0 -1
  174. package/dist/lib/types/interaction.js.map +0 -1
  175. package/dist/lib/types/invite.js.map +0 -1
  176. package/dist/lib/types/message-components.js.map +0 -1
  177. package/dist/lib/types/role.js.map +0 -1
  178. package/dist/lib/types/sku.js.map +0 -1
  179. package/dist/lib/types/stage-instance.js.map +0 -1
  180. package/dist/lib/types/sticker.js.map +0 -1
  181. package/dist/lib/types/team.js.map +0 -1
  182. package/dist/lib/types/user.js.map +0 -1
  183. package/dist/lib/types/voice.js.map +0 -1
  184. package/dist/lib/types/webhook.js.map +0 -1
  185. package/dist/lib/utils/Collection.d.ts +0 -24
  186. package/dist/lib/utils/Collection.js +0 -65
  187. package/dist/lib/utils/Collection.js.map +0 -1
  188. package/dist/lib/utils/Util.js.map +0 -1
  189. package/dist/lib/utils/errors.js.map +0 -1
  190. package/dist/lib/utils/index.js.map +0 -1
@@ -39,7 +39,7 @@ class Client extends node_events_1.default {
39
39
  }
40
40
  /** https://discord.com/developers/docs/resources/channel#group-dm-add-recipient */
41
41
  addGroupRecipient(channelId, userId, options) {
42
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.channelRecipient(channelId, userId), {
42
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelRecipient(channelId, userId), {
43
43
  json: {
44
44
  access_token: options.accessToken,
45
45
  nick: options.nick,
@@ -49,7 +49,7 @@ class Client extends node_events_1.default {
49
49
  /** https://discord.com/developers/docs/resources/guild#add-guild-member */
50
50
  addGuildMember(guildId, userId, options) {
51
51
  return this.rest
52
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.guildMember(guildId, userId), {
52
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMember(guildId, userId), {
53
53
  json: {
54
54
  access_token: options.accessToken,
55
55
  nick: options.nick,
@@ -62,18 +62,18 @@ class Client extends node_events_1.default {
62
62
  }
63
63
  /** https://discord.com/developers/docs/resources/guild#add-guild-member-role */
64
64
  addGuildMemberRole(guildId, userId, roleId, reason) {
65
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
65
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
66
66
  reason,
67
67
  });
68
68
  }
69
69
  /** https://discord.com/developers/docs/resources/channel#add-thread-member */
70
70
  addThreadMember(channelId, userId) {
71
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.threadMembers(channelId, userId));
71
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelId, userId));
72
72
  }
73
73
  /** https://discord.com/developers/docs/resources/guild#begin-guild-prune */
74
74
  beginGuildPrune(guildId, options, reason) {
75
75
  return this.rest
76
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildPrune(guildId), {
76
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildPrune(guildId), {
77
77
  json: {
78
78
  days: options.days,
79
79
  compute_prune_count: options.computePruneCount,
@@ -84,11 +84,23 @@ class Client extends node_events_1.default {
84
84
  })
85
85
  .then((response) => this.util.toCamelCase(response));
86
86
  }
87
+ /** https://discord.com/developers/docs/resources/guild#bulk-guild-ban */
88
+ bulkGuildBan(guildId, options, reason) {
89
+ return this.rest
90
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.bulkGuildBan(guildId), {
91
+ json: {
92
+ user_ids: options.userIds,
93
+ delete_message_seconds: options.deleteMessageSeconds,
94
+ },
95
+ reason,
96
+ })
97
+ .then((response) => this.util.toCamelCase(response));
98
+ }
87
99
  /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
88
100
  bulkDeleteMessages(channelId, options, reason) {
89
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.channelBulkDelete(channelId), {
101
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelBulkDelete(channelId), {
90
102
  json: {
91
- messages: options?.messagesIds,
103
+ messages: options?.messages,
92
104
  },
93
105
  reason,
94
106
  });
@@ -96,7 +108,7 @@ class Client extends node_events_1.default {
96
108
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
97
109
  bulkEditGlobalApplicationCommands(applicationId, commands) {
98
110
  return this.rest
99
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.applicationCommands(applicationId), {
111
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommands(applicationId), {
100
112
  json: commands.map((command) => this.util.toSnakeCase(command)),
101
113
  })
102
114
  .then((response) => response.map((applicationCommand) => this.util.toCamelCase(applicationCommand)));
@@ -104,7 +116,7 @@ class Client extends node_events_1.default {
104
116
  /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
105
117
  bulkEditGuildApplicationCommands(applicationId, guildId, commands) {
106
118
  return this.rest
107
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
119
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
108
120
  json: commands.map((command) => this.util.toSnakeCase(command)),
109
121
  })
110
122
  .then((response) => response.map((applicationCommand) => this.util.toCamelCase(applicationCommand)));
@@ -122,7 +134,7 @@ class Client extends node_events_1.default {
122
134
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
123
135
  createAutoModerationRule(guildId, options, reason) {
124
136
  return this.rest
125
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildAutoModerationRules(guildId), {
137
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildAutoModerationRules(guildId), {
126
138
  json: {
127
139
  name: options.name,
128
140
  event_type: options.eventType,
@@ -140,7 +152,7 @@ class Client extends node_events_1.default {
140
152
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
141
153
  createChannel(guildId, options, reason) {
142
154
  return this.rest
143
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildChannels(guildId), {
155
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildChannels(guildId), {
144
156
  json: {
145
157
  name: options.name,
146
158
  type: options.type,
@@ -172,7 +184,7 @@ class Client extends node_events_1.default {
172
184
  /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
173
185
  createChannelInvite(channelId, options, reason) {
174
186
  return this.rest
175
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.channelInvites(channelId), {
187
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelInvites(channelId), {
176
188
  json: {
177
189
  max_age: options.maxAge,
178
190
  max_uses: options.maxUses,
@@ -189,7 +201,7 @@ class Client extends node_events_1.default {
189
201
  /** https://discord.com/developers/docs/resources/webhook#create-webhook */
190
202
  createChannelWebhook(channelId, options, reason) {
191
203
  return this.rest
192
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.channelWebhooks(channelId), {
204
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelWebhooks(channelId), {
193
205
  json: {
194
206
  name: options.name,
195
207
  avatar: options.avatar,
@@ -201,7 +213,7 @@ class Client extends node_events_1.default {
201
213
  /** https://discord.com/developers/docs/resources/user#create-dm */
202
214
  createDM(options) {
203
215
  return this.rest
204
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.userChannels(), {
216
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.userChannels(), {
205
217
  json: {
206
218
  recipient_id: options.recipientId,
207
219
  },
@@ -211,7 +223,7 @@ class Client extends node_events_1.default {
211
223
  /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
212
224
  createGlobalApplicationCommand(applicationId, options) {
213
225
  return this.rest
214
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.applicationCommands(applicationId), {
226
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationCommands(applicationId), {
215
227
  json: {
216
228
  type: options.type,
217
229
  name: options.name,
@@ -230,7 +242,7 @@ class Client extends node_events_1.default {
230
242
  /** https://discord.com/developers/docs/resources/user#create-group-dm */
231
243
  createGroupDM(options) {
232
244
  return this.rest
233
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.userChannels(), {
245
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.userChannels(), {
234
246
  json: {
235
247
  access_tokens: options.accessTokens,
236
248
  nicks: options.nicks,
@@ -241,7 +253,7 @@ class Client extends node_events_1.default {
241
253
  /** https://discord.com/developers/docs/resources/guild#create-guild */
242
254
  createGuild(options) {
243
255
  return this.rest
244
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guilds(), {
256
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guilds(), {
245
257
  json: {
246
258
  name: options.name,
247
259
  region: options.region,
@@ -262,7 +274,7 @@ class Client extends node_events_1.default {
262
274
  /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
263
275
  createGuildApplicationCommand(applicationId, guildId, options) {
264
276
  return this.rest
265
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
277
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
266
278
  json: {
267
279
  type: options.type,
268
280
  name: options.name,
@@ -279,7 +291,7 @@ class Client extends node_events_1.default {
279
291
  }
280
292
  /** https://discord.com/developers/docs/resources/guild#create-guild-ban */
281
293
  createGuildBan(guildId, userId, options, reason) {
282
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.guildBan(guildId, userId), {
294
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildBan(guildId, userId), {
283
295
  json: {
284
296
  delete_message_days: options?.deleteMessageDays,
285
297
  delete_message_seconds: options?.deleteMessageSeconds,
@@ -290,7 +302,7 @@ class Client extends node_events_1.default {
290
302
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
291
303
  createGuildEmoji(guildId, options, reason) {
292
304
  return this.rest
293
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildEmojis(guildId), {
305
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildEmojis(guildId), {
294
306
  json: {
295
307
  name: options.name,
296
308
  image: options.image,
@@ -303,7 +315,7 @@ class Client extends node_events_1.default {
303
315
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template */
304
316
  createGuildFromTemplate(code, options) {
305
317
  return this.rest
306
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.template(code), {
318
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.template(code), {
307
319
  json: {
308
320
  name: options.name,
309
321
  icon: options.icon,
@@ -314,7 +326,7 @@ class Client extends node_events_1.default {
314
326
  /** https://discord.com/developers/docs/resources/guild#create-guild-role */
315
327
  createGuildRole(guildId, options, reason) {
316
328
  return this.rest
317
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildRoles(guildId), {
329
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildRoles(guildId), {
318
330
  json: {
319
331
  name: options.name,
320
332
  permissions: options.permissions,
@@ -331,7 +343,7 @@ class Client extends node_events_1.default {
331
343
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
332
344
  createGuildScheduledEvent(guildId, options, reason) {
333
345
  return this.rest
334
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildScheduledEvents(guildId), {
346
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildScheduledEvents(guildId), {
335
347
  json: {
336
348
  channel_id: options.channelId,
337
349
  entity_metadata: options.entityMetadata,
@@ -355,7 +367,7 @@ class Client extends node_events_1.default {
355
367
  formData.set("tags", options.tags);
356
368
  formData.set("file", new Blob([options.file.contents]), options.file.name);
357
369
  return this.rest
358
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildStickers(guildId), {
370
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildStickers(guildId), {
359
371
  form: formData,
360
372
  reason,
361
373
  })
@@ -364,7 +376,7 @@ class Client extends node_events_1.default {
364
376
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
365
377
  createGuildTemplate(guildId, options) {
366
378
  return this.rest
367
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.guildTemplates(guildId), {
379
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildTemplates(guildId), {
368
380
  json: {
369
381
  name: options.name,
370
382
  description: options.description,
@@ -375,7 +387,7 @@ class Client extends node_events_1.default {
375
387
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message */
376
388
  createInteractionFollowupMessage(applicationId, interactionToken, options) {
377
389
  return this.rest
378
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.webhook(applicationId, interactionToken), {
390
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(applicationId, interactionToken), {
379
391
  json: {
380
392
  content: options.content,
381
393
  tts: options.tts,
@@ -408,7 +420,7 @@ class Client extends node_events_1.default {
408
420
  case constants_1.InteractionCallbackType.ChannelMessageWithSource:
409
421
  case constants_1.InteractionCallbackType.UpdateMessage:
410
422
  {
411
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
423
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
412
424
  json: {
413
425
  type: options.type,
414
426
  data: {
@@ -424,6 +436,9 @@ class Client extends node_events_1.default {
424
436
  ? this.util.toSnakeCase(options.data.components)
425
437
  : undefined,
426
438
  attachments: options.data?.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
439
+ poll: options.data?.poll !== undefined
440
+ ? this.util.toSnakeCase(options.data?.poll)
441
+ : undefined,
427
442
  },
428
443
  },
429
444
  files: options.data?.files,
@@ -433,7 +448,7 @@ class Client extends node_events_1.default {
433
448
  case constants_1.InteractionCallbackType.DeferredChannelMessageWithSource:
434
449
  case constants_1.InteractionCallbackType.DeferredUpdateMessage:
435
450
  {
436
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
451
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
437
452
  json: {
438
453
  type: options.type,
439
454
  data: {
@@ -445,7 +460,7 @@ class Client extends node_events_1.default {
445
460
  break;
446
461
  case constants_1.InteractionCallbackType.ApplicationCommandAutocompleteResult:
447
462
  {
448
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
463
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
449
464
  json: {
450
465
  type: options.type,
451
466
  data: {
@@ -457,7 +472,7 @@ class Client extends node_events_1.default {
457
472
  break;
458
473
  case constants_1.InteractionCallbackType.Modal:
459
474
  {
460
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
475
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
461
476
  json: {
462
477
  type: options.type,
463
478
  data: {
@@ -473,7 +488,7 @@ class Client extends node_events_1.default {
473
488
  break;
474
489
  case constants_1.InteractionCallbackType.PremiumRequired:
475
490
  {
476
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
491
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.interactionCallback(interactionId, interactionToken), {
477
492
  json: {
478
493
  type: options.type,
479
494
  data: {},
@@ -486,7 +501,7 @@ class Client extends node_events_1.default {
486
501
  /** https://discord.com/developers/docs/resources/channel#create-message */
487
502
  createMessage(channelId, options) {
488
503
  return this.rest
489
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.channelMessages(channelId), {
504
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessages(channelId), {
490
505
  json: {
491
506
  content: options.content,
492
507
  nonce: options.nonce,
@@ -505,6 +520,9 @@ class Client extends node_events_1.default {
505
520
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
506
521
  flags: options.flags,
507
522
  enforce_nonce: options.enforceNonce,
523
+ poll: options.poll !== undefined
524
+ ? this.util.toSnakeCase(options.poll)
525
+ : undefined,
508
526
  },
509
527
  files: options.files,
510
528
  })
@@ -512,12 +530,12 @@ class Client extends node_events_1.default {
512
530
  }
513
531
  /** https://discord.com/developers/docs/resources/channel#create-reaction */
514
532
  createMessageReaction(channelId, messageId, emoji) {
515
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji));
533
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji));
516
534
  }
517
535
  /** https://discord.com/developers/docs/resources/stage-instance#create-stage-instance */
518
536
  createStageInstance(options, reason) {
519
537
  return this.rest
520
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.stageInstances(), {
538
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.stageInstances(), {
521
539
  json: {
522
540
  channel_id: options.channelId,
523
541
  topic: options.topic,
@@ -532,7 +550,7 @@ class Client extends node_events_1.default {
532
550
  /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
533
551
  createTestEntitlement(applicationId, options) {
534
552
  return this.rest
535
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationId), {
553
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationId), {
536
554
  json: {
537
555
  sku_id: options.skuId,
538
556
  owner_id: options.ownerId,
@@ -544,7 +562,7 @@ class Client extends node_events_1.default {
544
562
  /** https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel */
545
563
  createThread(channelId, options, reason) {
546
564
  return this.rest
547
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.threads(channelId), {
565
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId), {
548
566
  json: {
549
567
  name: options.name,
550
568
  auto_archive_duration: options.autoArchiveDuration,
@@ -560,7 +578,7 @@ class Client extends node_events_1.default {
560
578
  /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
561
579
  createThreadFromMessage(channelId, messageId, options, reason) {
562
580
  return this.rest
563
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.threads(channelId, messageId), {
581
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId, messageId), {
564
582
  json: {
565
583
  name: options.name,
566
584
  auto_archive_duration: options.autoArchiveDuration,
@@ -573,7 +591,7 @@ class Client extends node_events_1.default {
573
591
  /** https://discord.com/developers/docs/resources/channel#start-thread-without-message */
574
592
  createThreadWithoutMessage(channelId, options, reason) {
575
593
  return this.rest
576
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.threads(channelId), {
594
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.threads(channelId), {
577
595
  json: {
578
596
  name: options.name,
579
597
  auto_archive_duration: options.autoArchiveDuration,
@@ -588,124 +606,124 @@ class Client extends node_events_1.default {
588
606
  /** https://discord.com/developers/docs/resources/channel#crosspost-message */
589
607
  crosspostMessage(channelId, messageId) {
590
608
  return this.rest
591
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.channelMessage(channelId, messageId))
609
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelMessage(channelId, messageId))
592
610
  .then((response) => this.util.toCamelCase(response));
593
611
  }
594
612
  /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
595
613
  deleteAllMessageReactions(channelId, messageId, emoji) {
596
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji));
614
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji));
597
615
  }
598
616
  /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
599
617
  deleteAutoModerationRule(guildId, autoModerationRuleId, reason) {
600
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
618
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
601
619
  reason,
602
620
  });
603
621
  }
604
622
  /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
605
623
  deleteChannel(channelId, reason) {
606
624
  return this.rest
607
- .request(rest_1.RestMethods.Delete, rest_1.Endpoints.channel(channelId), {
625
+ .request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channel(channelId), {
608
626
  reason,
609
627
  })
610
628
  .then((response) => this.util.toCamelCase(response));
611
629
  }
612
630
  /** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
613
631
  deleteChannelPermission(channelId, overwriteId, reason) {
614
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
632
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
615
633
  reason,
616
634
  });
617
635
  }
618
636
  /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
619
637
  deleteGlobalApplicationCommand(applicationId, commandId) {
620
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
638
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationCommand(applicationId, commandId));
621
639
  }
622
640
  /** https://discord.com/developers/docs/resources/guild#delete-guild */
623
641
  deleteGuild(guildId) {
624
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guild(guildId));
642
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guild(guildId));
625
643
  }
626
644
  /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
627
645
  deleteGuildApplicationCommand(applicationId, guildId, commandId) {
628
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId));
646
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId));
629
647
  }
630
648
  /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
631
649
  deleteGuildEmoji(guildId, emojiId, reason) {
632
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
650
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
633
651
  reason,
634
652
  });
635
653
  }
636
654
  /** https://discord.com/developers/docs/resources/guild#delete-guild-integration */
637
655
  deleteGuildIntegration(guildId, integrationId, reason) {
638
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildIntegration(guildId, integrationId), {
656
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildIntegration(guildId, integrationId), {
639
657
  reason,
640
658
  });
641
659
  }
642
660
  /** https://discord.com/developers/docs/resources/guild#delete-guild-role */
643
661
  deleteGuildRole(guildId, roleId, reason) {
644
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildRole(guildId, roleId), {
662
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildRole(guildId, roleId), {
645
663
  reason,
646
664
  });
647
665
  }
648
666
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event */
649
667
  deleteGuildScheduledEvent(guildId, guildScheduledEventId) {
650
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId));
668
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId));
651
669
  }
652
670
  /** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
653
671
  deleteGuildSticker(guildId, stickerId, reason) {
654
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildSticker(guildId, stickerId), {
672
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildSticker(guildId, stickerId), {
655
673
  reason,
656
674
  });
657
675
  }
658
676
  /** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
659
677
  deleteGuildTemplate(guildId, code) {
660
678
  return this.rest
661
- .request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildTemplate(guildId, code))
679
+ .request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildTemplate(guildId, code))
662
680
  .then((response) => this.util.toCamelCase(response));
663
681
  }
664
682
  /** https://discord.com/developers/docs/resources/invite#delete-invite */
665
683
  deleteInvite(code, reason) {
666
684
  return this.rest
667
- .request(rest_1.RestMethods.Delete, rest_1.Endpoints.invite(code), {
685
+ .request(rest_1.RESTMethods.Delete, rest_1.Endpoints.invite(code), {
668
686
  reason,
669
687
  })
670
688
  .then((response) => this.util.toCamelCase(response));
671
689
  }
672
690
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message */
673
691
  deleteInteractionFollowupMessage(applicationId, interactionToken, messageId) {
674
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId));
692
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId));
675
693
  }
676
694
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response */
677
695
  deleteInteractionResponse(applicationId, interactionToken) {
678
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken));
696
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(applicationId, interactionToken));
679
697
  }
680
698
  /** https://discord.com/developers/docs/resources/channel#delete-message */
681
699
  deleteMessage(channelId, messageId, reason) {
682
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelMessage(channelId, messageId), {
700
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessage(channelId, messageId), {
683
701
  reason,
684
702
  });
685
703
  }
686
704
  /** https://discord.com/developers/docs/resources/channel#delete-user-reaction */
687
705
  deleteMessageReaction(channelId, messageId, emoji, userId) {
688
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji, userId));
706
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelMessageReaction(channelId, messageId, emoji, userId));
689
707
  }
690
708
  /** https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance */
691
709
  deleteStageInstance(channelId, reason) {
692
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.stageInstance(channelId), {
710
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.stageInstance(channelId), {
693
711
  reason,
694
712
  });
695
713
  }
696
714
  /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
697
715
  deleteTestEntitlement(applicationId, entitlementId) {
698
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.applicationEntitlement(applicationId, entitlementId));
716
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEntitlement(applicationId, entitlementId));
699
717
  }
700
718
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook */
701
719
  deleteWebhook(webhookId, reason) {
702
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.webhook(webhookId), {
720
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookId), {
703
721
  reason,
704
722
  });
705
723
  }
706
724
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook-message */
707
725
  deleteWebhookMessage(webhookId, webhookToken, messageId, options) {
708
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
726
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
709
727
  query: {
710
728
  thread_id: options?.threadId,
711
729
  },
@@ -713,7 +731,7 @@ class Client extends node_events_1.default {
713
731
  }
714
732
  /** https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token */
715
733
  deleteWebhookWithToken(webhookId, webhookToken, reason) {
716
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.webhook(webhookId, webhookToken), {
734
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.webhook(webhookId, webhookToken), {
717
735
  reason,
718
736
  authorization: false,
719
737
  });
@@ -724,7 +742,7 @@ class Client extends node_events_1.default {
724
742
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
725
743
  editAutoModerationRule(guildId, autoModerationRuleId, options, reason) {
726
744
  return this.rest
727
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
745
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildAutoModerationRule(guildId, autoModerationRuleId), {
728
746
  json: {
729
747
  name: options.name,
730
748
  event_type: options.eventType,
@@ -742,7 +760,7 @@ class Client extends node_events_1.default {
742
760
  /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
743
761
  editApplicationCommandPermissions(applicationId, guildId, commandId, options) {
744
762
  return this.rest
745
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId), {
763
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId), {
746
764
  json: {
747
765
  permissions: options.permissions.map((permission) => this.util.toSnakeCase(permission)),
748
766
  },
@@ -752,7 +770,7 @@ class Client extends node_events_1.default {
752
770
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
753
771
  editChannel(channelId, options, reason) {
754
772
  return this.rest
755
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.channel(channelId), {
773
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channel(channelId), {
756
774
  json: {
757
775
  name: options.name,
758
776
  type: options.type,
@@ -784,14 +802,14 @@ class Client extends node_events_1.default {
784
802
  }
785
803
  /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions */
786
804
  editChannelPermissions(channelId, overwriteId, options, reason) {
787
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
805
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPermission(channelId, overwriteId), {
788
806
  json: options,
789
807
  reason,
790
808
  });
791
809
  }
792
810
  /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions */
793
811
  editChannelPositions(guildId, options) {
794
- this.rest.request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildChannels(guildId), {
812
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildChannels(guildId), {
795
813
  json: options.map((data) => ({
796
814
  id: data.id,
797
815
  position: data.position,
@@ -803,7 +821,7 @@ class Client extends node_events_1.default {
803
821
  /** https://discord.com/developers/docs/resources/user#modify-current-user */
804
822
  editCurrentUser(options) {
805
823
  return this.rest
806
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.user(), {
824
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.user(), {
807
825
  json: {
808
826
  username: options.username,
809
827
  avatar: options.avatar,
@@ -814,7 +832,7 @@ class Client extends node_events_1.default {
814
832
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
815
833
  editCurrentGuildMember(guildId, options, reason) {
816
834
  return this.rest
817
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildMember(guildId), {
835
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildId), {
818
836
  json: {
819
837
  nick: options.nick,
820
838
  },
@@ -824,7 +842,7 @@ class Client extends node_events_1.default {
824
842
  }
825
843
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
826
844
  editCurrentUserVoiceState(guildId, options) {
827
- this.rest.request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId), {
845
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId), {
828
846
  json: {
829
847
  channel_id: options.channelId,
830
848
  suppress: options.suppress,
@@ -835,7 +853,7 @@ class Client extends node_events_1.default {
835
853
  /** https://discord.com/developers/docs/resources/application#edit-current-application */
836
854
  editCurrentApplication(options) {
837
855
  return this.rest
838
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.applicationCurrentUser(), {
856
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationCurrentUser(), {
839
857
  json: {
840
858
  custom_install_url: options.customInstallUrl,
841
859
  description: options.description,
@@ -853,7 +871,7 @@ class Client extends node_events_1.default {
853
871
  /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
854
872
  editGlobalApplicationCommand(applicationId, commandId, options) {
855
873
  return this.rest
856
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.applicationCommand(applicationId, commandId), {
874
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationCommand(applicationId, commandId), {
857
875
  json: {
858
876
  name: options.name,
859
877
  name_localizations: options.nameLocalizations,
@@ -871,7 +889,7 @@ class Client extends node_events_1.default {
871
889
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
872
890
  editGuild(guildId, options, reason) {
873
891
  return this.rest
874
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guild(guildId), {
892
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guild(guildId), {
875
893
  json: {
876
894
  name: options.name,
877
895
  region: options.region,
@@ -902,7 +920,7 @@ class Client extends node_events_1.default {
902
920
  /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
903
921
  editGuildApplicationCommand(applicationId, guildId, commandId, options) {
904
922
  return this.rest
905
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId), {
923
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId), {
906
924
  json: {
907
925
  name: options.name,
908
926
  name_localizations: options.nameLocalizations,
@@ -919,7 +937,7 @@ class Client extends node_events_1.default {
919
937
  /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
920
938
  editGuildEmoji(guildId, emojiId, options, reason) {
921
939
  return this.rest
922
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
940
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildEmoji(guildId, emojiId), {
923
941
  json: {
924
942
  name: options.name,
925
943
  roles: options.roles,
@@ -931,7 +949,7 @@ class Client extends node_events_1.default {
931
949
  /** https://discord.com/developers/docs/resources/guild#modify-guild-member */
932
950
  editGuildMember(guildId, userId, options, reason) {
933
951
  return this.rest
934
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildMember(guildId, userId), {
952
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildMember(guildId, userId), {
935
953
  json: {
936
954
  nick: options.nick,
937
955
  roles: options.roles,
@@ -947,7 +965,7 @@ class Client extends node_events_1.default {
947
965
  }
948
966
  /** https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level */
949
967
  editGuildMFALevel(guildId, options, reason) {
950
- return this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.guildMFA(guildId), {
968
+ return this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildMFA(guildId), {
951
969
  json: {
952
970
  level: options.level,
953
971
  },
@@ -956,7 +974,7 @@ class Client extends node_events_1.default {
956
974
  }
957
975
  /** https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */
958
976
  editGuildOnboarding(guildId, options, reason) {
959
- this.rest.request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildOnboarding(guildId), {
977
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildOnboarding(guildId), {
960
978
  json: {
961
979
  prompts: options.prompts.map((prompt) => this.util.toSnakeCase(prompt)),
962
980
  },
@@ -966,7 +984,7 @@ class Client extends node_events_1.default {
966
984
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role */
967
985
  editGuildRole(guildId, roleId, options, reason) {
968
986
  return this.rest
969
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildRole(guildId, roleId), {
987
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRole(guildId, roleId), {
970
988
  json: {
971
989
  name: options?.name,
972
990
  permissions: options?.permissions,
@@ -983,7 +1001,7 @@ class Client extends node_events_1.default {
983
1001
  /** https://discord.com/developers/docs/resources/guild#modify-guild-role-positions */
984
1002
  editGuildRolePositions(guildId, options) {
985
1003
  return this.rest
986
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildRoles(guildId), {
1004
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildRoles(guildId), {
987
1005
  json: options.map((role) => this.util.toSnakeCase(role)),
988
1006
  })
989
1007
  .then((response) => response.map((role) => this.util.toCamelCase(role)));
@@ -991,7 +1009,7 @@ class Client extends node_events_1.default {
991
1009
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */
992
1010
  editGuildScheduledEvent(guildId, guildScheduledEventId, options, reason) {
993
1011
  return this.rest
994
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
1012
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
995
1013
  json: {
996
1014
  channel_id: options.channelId,
997
1015
  entity_metadata: options.entityMetadata,
@@ -1011,7 +1029,7 @@ class Client extends node_events_1.default {
1011
1029
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
1012
1030
  editGuildSticker(guildId, stickerId, options, reason) {
1013
1031
  return this.rest
1014
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildSticker(guildId, stickerId), {
1032
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildSticker(guildId, stickerId), {
1015
1033
  json: {
1016
1034
  name: options.name,
1017
1035
  description: options.description,
@@ -1024,7 +1042,7 @@ class Client extends node_events_1.default {
1024
1042
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
1025
1043
  editGuildTemplate(guildId, code, options) {
1026
1044
  return this.rest
1027
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildTemplate(guildId, code), {
1045
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildTemplate(guildId, code), {
1028
1046
  json: {
1029
1047
  name: options.name,
1030
1048
  description: options.description,
@@ -1035,7 +1053,7 @@ class Client extends node_events_1.default {
1035
1053
  /** https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen */
1036
1054
  editGuildWelcomeScreen(guildId, options, reason) {
1037
1055
  return this.rest
1038
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildWelcomeScreen(guildId), {
1056
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWelcomeScreen(guildId), {
1039
1057
  json: {
1040
1058
  enabled: options.enabled,
1041
1059
  welcome_channels: options.welcomeChannels,
@@ -1048,7 +1066,7 @@ class Client extends node_events_1.default {
1048
1066
  /** https://discord.com/developers/docs/resources/guild#modify-guild-widget */
1049
1067
  editGuildWidget(guildId, options, reason) {
1050
1068
  return this.rest
1051
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildWidgetSettings(guildId), {
1069
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildWidgetSettings(guildId), {
1052
1070
  json: {
1053
1071
  enabled: options.enabled,
1054
1072
  channel_id: options.channelId,
@@ -1060,7 +1078,7 @@ class Client extends node_events_1.default {
1060
1078
  /** https://discord.com/developers/docs/resources/channel#edit-message */
1061
1079
  editMessage(channelId, messageId, options) {
1062
1080
  return this.rest
1063
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.channelMessage(channelId, messageId), {
1081
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channelMessage(channelId, messageId), {
1064
1082
  json: {
1065
1083
  content: options.content,
1066
1084
  embeds: options.embeds !== undefined
@@ -1088,7 +1106,7 @@ class Client extends node_events_1.default {
1088
1106
  /** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance */
1089
1107
  editStageInstance(channelId, options, reason) {
1090
1108
  return this.rest
1091
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.stageInstance(channelId), {
1109
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.stageInstance(channelId), {
1092
1110
  json: {
1093
1111
  topic: options.topic,
1094
1112
  privacy_level: options.privacyLevel,
@@ -1100,7 +1118,7 @@ class Client extends node_events_1.default {
1100
1118
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message */
1101
1119
  editInteractionFollowupMessage(applicationId, interactionToken, messageId, options) {
1102
1120
  return this.rest
1103
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
1121
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
1104
1122
  json: {
1105
1123
  content: options.content,
1106
1124
  embeds: options.embeds !== undefined
@@ -1131,7 +1149,7 @@ class Client extends node_events_1.default {
1131
1149
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
1132
1150
  editInteractionResponse(applicationId, interactionToken, options) {
1133
1151
  return this.rest
1134
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
1152
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
1135
1153
  json: {
1136
1154
  content: options.content,
1137
1155
  embeds: options.embeds !== undefined
@@ -1161,7 +1179,7 @@ class Client extends node_events_1.default {
1161
1179
  }
1162
1180
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
1163
1181
  editUserVoiceState(guildId, userId, options) {
1164
- this.rest.request(rest_1.RestMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId, userId), {
1182
+ this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildVoiceState(guildId, userId), {
1165
1183
  json: {
1166
1184
  channel_id: options.channelId,
1167
1185
  suppress: options.suppress,
@@ -1172,7 +1190,7 @@ class Client extends node_events_1.default {
1172
1190
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook */
1173
1191
  editWebhook(webhookId, options, reason) {
1174
1192
  return this.rest
1175
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.webhook(webhookId), {
1193
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookId), {
1176
1194
  json: {
1177
1195
  name: options.name,
1178
1196
  avatar: options.avatar,
@@ -1185,7 +1203,7 @@ class Client extends node_events_1.default {
1185
1203
  /** https://discord.com/developers/docs/resources/webhook#edit-webhook-message */
1186
1204
  editWebhookMessage(webhookId, webhookToken, messageId, options) {
1187
1205
  return this.rest
1188
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
1206
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
1189
1207
  json: {
1190
1208
  content: options.content,
1191
1209
  embeds: options.embeds !== undefined
@@ -1216,7 +1234,7 @@ class Client extends node_events_1.default {
1216
1234
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
1217
1235
  editWebhookWithToken(webhookId, webhookToken, options, reason) {
1218
1236
  return this.rest
1219
- .request(rest_1.RestMethods.Patch, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1237
+ .request(rest_1.RESTMethods.Patch, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1220
1238
  json: {
1221
1239
  name: options.name,
1222
1240
  avatar: options.avatar,
@@ -1229,7 +1247,7 @@ class Client extends node_events_1.default {
1229
1247
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
1230
1248
  executeWebhook(webhookId, webhookToken, options) {
1231
1249
  return this.rest
1232
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1250
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhook(webhookId, webhookToken), {
1233
1251
  json: {
1234
1252
  content: options.content,
1235
1253
  username: options.username,
@@ -1253,6 +1271,10 @@ class Client extends node_events_1.default {
1253
1271
  attachments: options.attachments?.map((attachment) => this.util.toSnakeCase(attachment)),
1254
1272
  flags: options.flags,
1255
1273
  thread_name: options.threadName,
1274
+ applied_tags: options.appliedTags,
1275
+ poll: options.poll !== undefined
1276
+ ? this.util.toSnakeCase(options.poll)
1277
+ : undefined,
1256
1278
  },
1257
1279
  files: options.files,
1258
1280
  query: {
@@ -1269,7 +1291,7 @@ class Client extends node_events_1.default {
1269
1291
  */
1270
1292
  executeWebhookPlatform(webhookId, webhookToken, platform, options) {
1271
1293
  return this.rest
1272
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.webhookPlatform(webhookId, webhookToken, platform), {
1294
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.webhookPlatform(webhookId, webhookToken, platform), {
1273
1295
  query: {
1274
1296
  thread_id: options.threadId,
1275
1297
  wait: options.wait,
@@ -1278,10 +1300,15 @@ class Client extends node_events_1.default {
1278
1300
  })
1279
1301
  .then((response) => response !== null ? this.util.toCamelCase(response) : null);
1280
1302
  }
1303
+ expirePoll(channelId, messageId) {
1304
+ return this.rest
1305
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId))
1306
+ .then((response) => this.util.toCamelCase(response));
1307
+ }
1281
1308
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
1282
1309
  followChannel(channelId, options) {
1283
1310
  return this.rest
1284
- .request(rest_1.RestMethods.Post, rest_1.Endpoints.channelFollowers(channelId), {
1311
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelFollowers(channelId), {
1285
1312
  json: {
1286
1313
  webhook_channel_id: options.webhookChannelId,
1287
1314
  },
@@ -1291,13 +1318,13 @@ class Client extends node_events_1.default {
1291
1318
  /** https://discord.com/developers/docs/resources/guild#list-active-guild-threads */
1292
1319
  getActiveGuildThreads(guildId) {
1293
1320
  return this.rest
1294
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildActiveThreads(guildId))
1321
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildActiveThreads(guildId))
1295
1322
  .then((response) => this.util.toCamelCase(response));
1296
1323
  }
1297
1324
  /** https://discord.com/developers/docs/resources/channel#list-public-archived-threads */
1298
1325
  getArchivedThreads(channelId, archivedStatus, options) {
1299
1326
  return this.rest
1300
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelThreads(channelId, archivedStatus, false), {
1327
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelId, archivedStatus, false), {
1301
1328
  query: {
1302
1329
  before: options?.before,
1303
1330
  limit: options?.limit,
@@ -1308,7 +1335,7 @@ class Client extends node_events_1.default {
1308
1335
  /** https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */
1309
1336
  getAuditLog(guildId, options) {
1310
1337
  return this.rest
1311
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildAuditLog(guildId), {
1338
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAuditLog(guildId), {
1312
1339
  query: {
1313
1340
  user_id: options?.userId,
1314
1341
  action_type: options?.actionType,
@@ -1322,79 +1349,79 @@ class Client extends node_events_1.default {
1322
1349
  /** https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */
1323
1350
  getAutoModerationRule(guildId, ruleId) {
1324
1351
  return this.rest
1325
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildAutoModerationRule(guildId, ruleId))
1352
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRule(guildId, ruleId))
1326
1353
  .then((response) => this.util.toCamelCase(response));
1327
1354
  }
1328
1355
  /** https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */
1329
1356
  getAutoModerationRules(guildId) {
1330
1357
  return this.rest
1331
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildId))
1358
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildId))
1332
1359
  .then((response) => response.map((autoModerationRule) => this.util.toCamelCase(autoModerationRule)));
1333
1360
  }
1334
1361
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
1335
1362
  getApplicationCommandPermissions(applicationId, guildId, commandId) {
1336
1363
  return this.rest
1337
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId))
1364
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationId, guildId, commandId))
1338
1365
  .then((response) => this.util.toCamelCase(response));
1339
1366
  }
1340
1367
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
1341
1368
  getApplicationRoleConnectionMetadataRecords(applicationId) {
1342
1369
  return this.rest
1343
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId))
1370
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId))
1344
1371
  .then((response) => response.map((applicationRoleConnectionMetadata) => this.util.toCamelCase(applicationRoleConnectionMetadata)));
1345
1372
  }
1346
1373
  /** https://discord.com/developers/docs/resources/channel#get-channel */
1347
1374
  getChannel(channelId) {
1348
1375
  return this.rest
1349
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channel(channelId))
1376
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channel(channelId))
1350
1377
  .then((response) => this.util.toCamelCase(response));
1351
1378
  }
1352
1379
  /** https://discord.com/developers/docs/resources/guild#get-guild-channels */
1353
1380
  getChannels(guildId) {
1354
1381
  return this.rest
1355
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildChannels(guildId))
1382
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildChannels(guildId))
1356
1383
  .then((response) => response.map((channel) => this.util.toCamelCase(channel)));
1357
1384
  }
1358
1385
  /** https://discord.com/developers/docs/resources/channel#get-channel-invites */
1359
1386
  getChannelInvites(channelId) {
1360
1387
  return this.rest
1361
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelInvites(channelId))
1388
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelInvites(channelId))
1362
1389
  .then((response) => response.map((invite) => this.util.toCamelCase(invite)));
1363
1390
  }
1364
1391
  /** https://discord.com/developers/docs/resources/webhook#get-channel-webhooks */
1365
1392
  getChannelWebhooks(channelId) {
1366
1393
  return this.rest
1367
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelWebhooks(channelId))
1394
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelWebhooks(channelId))
1368
1395
  .then((response) => response.map((webhook) => this.util.toCamelCase(webhook)));
1369
1396
  }
1370
1397
  /** https://discord.com/developers/docs/resources/application#get-current-application */
1371
1398
  getCurrentApplication() {
1372
1399
  return this.rest
1373
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationCurrentUser())
1400
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCurrentUser())
1374
1401
  .then((response) => this.util.toCamelCase(response));
1375
1402
  }
1376
1403
  /** https://discord.com/developers/docs/resources/user#get-current-user-application-role-connection */
1377
1404
  getCurrentApplicationRoleConnection(applicationId) {
1378
1405
  return this.rest
1379
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.userApplicationRoleConnection(applicationId))
1406
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.userApplicationRoleConnection(applicationId))
1380
1407
  .then((response) => this.util.toCamelCase(response));
1381
1408
  }
1382
1409
  /** https://discord.com/developers/docs/resources/user#get-current-user-guild-member */
1383
1410
  getCurrentGuildMember(guildId) {
1384
1411
  return this.rest
1385
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildMember(guildId))
1412
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildId))
1386
1413
  .then((response) => this.util.toCamelCase(response));
1387
1414
  }
1388
1415
  /** https://discord.com/developers/docs/resources/user#get-current-user-connections */
1389
1416
  getCurrentUserConnections() {
1390
1417
  return this.rest
1391
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.userConnections())
1418
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.userConnections())
1392
1419
  .then((response) => response.map((connection) => this.util.toCamelCase(connection)));
1393
1420
  }
1394
1421
  /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
1395
1422
  getEntitlements(applicationId, options) {
1396
1423
  return this.rest
1397
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationId), {
1424
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationId), {
1398
1425
  query: {
1399
1426
  user_id: options?.userId,
1400
1427
  sku_ids: options?.skuIds,
@@ -1409,24 +1436,24 @@ class Client extends node_events_1.default {
1409
1436
  }
1410
1437
  /** https://discord.com/developers/docs/topics/gateway#get-gateway */
1411
1438
  getGateway() {
1412
- return this.rest.request(rest_1.RestMethods.Get, rest_1.Endpoints.gateway());
1439
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.gateway());
1413
1440
  }
1414
1441
  /** https://discord.com/developers/docs/topics/gateway#get-gateway-bot */
1415
1442
  getGatewayBot() {
1416
1443
  return this.rest
1417
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.gatewayBot())
1444
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.gatewayBot())
1418
1445
  .then((response) => this.util.toCamelCase(response));
1419
1446
  }
1420
1447
  /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
1421
1448
  getGlobalApplicationCommand(applicationId, commandId) {
1422
1449
  return this.rest
1423
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationCommand(applicationId, commandId))
1450
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommand(applicationId, commandId))
1424
1451
  .then((response) => this.util.toCamelCase(response));
1425
1452
  }
1426
1453
  /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
1427
1454
  getGlobalApplicationCommands(applicationId, options) {
1428
1455
  return this.rest
1429
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationCommands(applicationId), {
1456
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommands(applicationId), {
1430
1457
  query: {
1431
1458
  with_localizations: options.withLocalizations,
1432
1459
  },
@@ -1436,7 +1463,7 @@ class Client extends node_events_1.default {
1436
1463
  /** https://discord.com/developers/docs/resources/guild#get-guild */
1437
1464
  getGuild(guildId, options) {
1438
1465
  return this.rest
1439
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guild(guildId), {
1466
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guild(guildId), {
1440
1467
  query: {
1441
1468
  with_counts: options?.withCounts,
1442
1469
  },
@@ -1446,7 +1473,7 @@ class Client extends node_events_1.default {
1446
1473
  /** https://discord.com/developers/docs/resources/user#get-current-user-guilds */
1447
1474
  getGuilds(options) {
1448
1475
  return this.rest
1449
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.userGuilds(), {
1476
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.userGuilds(), {
1450
1477
  query: {
1451
1478
  before: options?.before,
1452
1479
  after: options?.after,
@@ -1459,13 +1486,13 @@ class Client extends node_events_1.default {
1459
1486
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
1460
1487
  getGuildApplicationCommand(applicationId, guildId, commandId) {
1461
1488
  return this.rest
1462
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId))
1489
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommand(applicationId, guildId, commandId))
1463
1490
  .then((response) => this.util.toCamelCase(response));
1464
1491
  }
1465
1492
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
1466
1493
  getGuildApplicationCommands(applicationId, guildId, options) {
1467
1494
  return this.rest
1468
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
1495
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationGuildCommands(applicationId, guildId), {
1469
1496
  query: {
1470
1497
  with_localizations: options?.withLocalizations,
1471
1498
  },
@@ -1475,19 +1502,19 @@ class Client extends node_events_1.default {
1475
1502
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
1476
1503
  getGuildApplicationCommandPermissions(applicationId, guildId) {
1477
1504
  return this.rest
1478
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildApplicationCommandsPermissions(applicationId, guildId))
1505
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildApplicationCommandsPermissions(applicationId, guildId))
1479
1506
  .then((response) => this.util.toCamelCase(response));
1480
1507
  }
1481
1508
  /** https://discord.com/developers/docs/resources/guild#get-guild-ban */
1482
1509
  getGuildBan(guildId, userId) {
1483
1510
  return this.rest
1484
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildBan(guildId, userId))
1511
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBan(guildId, userId))
1485
1512
  .then((response) => this.util.toCamelCase(response));
1486
1513
  }
1487
1514
  /** https://discord.com/developers/docs/resources/guild#get-guild-bans */
1488
1515
  getGuildBans(guildId, options) {
1489
1516
  return this.rest
1490
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildBans(guildId), {
1517
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildBans(guildId), {
1491
1518
  query: {
1492
1519
  limit: options?.limit,
1493
1520
  before: options?.before,
@@ -1499,55 +1526,55 @@ class Client extends node_events_1.default {
1499
1526
  /** https://discord.com/developers/docs/resources/emoji#get-guild-emoji */
1500
1527
  getGuildEmoji(guildId, emojiId) {
1501
1528
  return this.rest
1502
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildEmoji(guildId, emojiId))
1529
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmoji(guildId, emojiId))
1503
1530
  .then((response) => this.util.toCamelCase(response));
1504
1531
  }
1505
1532
  /** https://discord.com/developers/docs/resources/emoji#list-guild-emojis */
1506
1533
  getGuildEmojis(guildId) {
1507
1534
  return this.rest
1508
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildEmojis(guildId))
1535
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildEmojis(guildId))
1509
1536
  .then((response) => response.map((emoji) => this.util.toCamelCase(emoji)));
1510
1537
  }
1511
1538
  /** https://discord.com/developers/docs/resources/guild#get-guild-integrations */
1512
1539
  getGuildIntegrations(guildId) {
1513
1540
  return this.rest
1514
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildIntegrations(guildId))
1541
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildIntegrations(guildId))
1515
1542
  .then((response) => response.map((integration) => this.util.toCamelCase(integration)));
1516
1543
  }
1517
1544
  /** https://discord.com/developers/docs/resources/guild#get-guild-invites */
1518
1545
  getGuildInvites(guildId) {
1519
1546
  return this.rest
1520
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildInvites(guildId))
1547
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildInvites(guildId))
1521
1548
  .then((response) => response.map((invite) => this.util.toCamelCase(invite)));
1522
1549
  }
1523
1550
  /** https://discord.com/developers/docs/resources/guild#get-guild-member */
1524
1551
  getGuildMember(guildId, userId) {
1525
1552
  return this.rest
1526
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildMember(guildId, userId))
1553
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMember(guildId, userId))
1527
1554
  .then((response) => this.util.toCamelCase(response));
1528
1555
  }
1529
1556
  /** https://discord.com/developers/docs/resources/guild#list-guild-members */
1530
1557
  getGuildMembers(guildId) {
1531
1558
  return this.rest
1532
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildMembers(guildId))
1559
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembers(guildId))
1533
1560
  .then((response) => response.map((guildMember) => this.util.toCamelCase(guildMember)));
1534
1561
  }
1535
1562
  /** https://discord.com/developers/docs/resources/guild#get-guild-onboarding */
1536
1563
  getGuildOnboarding(guildId) {
1537
1564
  return this.rest
1538
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildOnboarding(guildId))
1565
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildOnboarding(guildId))
1539
1566
  .then((response) => this.util.toCamelCase(response));
1540
1567
  }
1541
1568
  /** https://discord.com/developers/docs/resources/guild#get-guild-preview */
1542
1569
  getGuildPreview(guildId) {
1543
1570
  return this.rest
1544
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildPreview(guildId))
1571
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPreview(guildId))
1545
1572
  .then((response) => this.util.toCamelCase(response));
1546
1573
  }
1547
1574
  /** https://discord.com/developers/docs/resources/guild#get-guild-prune-count */
1548
1575
  getGuildPruneCount(guildId, options) {
1549
1576
  return this.rest
1550
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildPrune(guildId), {
1577
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildPrune(guildId), {
1551
1578
  query: {
1552
1579
  days: options.days,
1553
1580
  include_roles: options.includeRoles,
@@ -1558,13 +1585,13 @@ class Client extends node_events_1.default {
1558
1585
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
1559
1586
  getGuildRoles(guildId) {
1560
1587
  return this.rest
1561
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildRoles(guildId))
1588
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildId))
1562
1589
  .then((response) => response.map((role) => this.util.toCamelCase(role)));
1563
1590
  }
1564
1591
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
1565
1592
  getGuildScheduledEvents(guildId, options) {
1566
1593
  return this.rest
1567
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildScheduledEvents(guildId), {
1594
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvents(guildId), {
1568
1595
  query: {
1569
1596
  with_user_count: options?.withUserCount,
1570
1597
  },
@@ -1574,7 +1601,7 @@ class Client extends node_events_1.default {
1574
1601
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users */
1575
1602
  getGuildScheduledEventUsers(guildId, guildScheduledEventId, options) {
1576
1603
  return this.rest
1577
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
1604
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildScheduledEvent(guildId, guildScheduledEventId), {
1578
1605
  query: {
1579
1606
  limit: options?.limit,
1580
1607
  with_member: options?.withMember,
@@ -1587,52 +1614,52 @@ class Client extends node_events_1.default {
1587
1614
  /** https://discord.com/developers/docs/resources/sticker#get-guild-sticker */
1588
1615
  getGuildSticker(guildId, stickerId) {
1589
1616
  return this.rest
1590
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildSticker(guildId, stickerId))
1617
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildSticker(guildId, stickerId))
1591
1618
  .then((response) => this.util.toCamelCase(response));
1592
1619
  }
1593
1620
  /** https://discord.com/developers/docs/resources/sticker#list-guild-stickers */
1594
1621
  getGuildStickers(guildId) {
1595
1622
  return this.rest
1596
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildStickers(guildId))
1623
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildStickers(guildId))
1597
1624
  .then((response) => response.map((sticker) => this.util.toCamelCase(sticker)));
1598
1625
  }
1599
1626
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
1600
1627
  getGuildTemplate(guildId, code) {
1601
1628
  return this.rest
1602
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildTemplate(guildId, code))
1629
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplate(guildId, code))
1603
1630
  .then((response) => this.util.toCamelCase(response));
1604
1631
  }
1605
1632
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-templates */
1606
1633
  getGuildTemplates(guildId) {
1607
1634
  return this.rest
1608
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildTemplates(guildId))
1635
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildTemplates(guildId))
1609
1636
  .then((response) => response.map((guildTemplate) => this.util.toCamelCase(guildTemplate)));
1610
1637
  }
1611
1638
  /** https://discord.com/developers/docs/resources/guild#get-guild-vanity-url */
1612
1639
  getGuildVanityUrl(guildId) {
1613
- return this.rest.request(rest_1.RestMethods.Get, rest_1.Endpoints.guildVanityUrl(guildId));
1640
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVanityUrl(guildId));
1614
1641
  }
1615
1642
  /** https://discord.com/developers/docs/resources/guild#get-guild-voice-regions */
1616
1643
  getGuildVoiceRegions(guildId) {
1617
1644
  return this.rest
1618
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildVoiceRegions(guildId))
1645
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceRegions(guildId))
1619
1646
  .then((response) => response.map((VoiceRegion) => this.util.toCamelCase(VoiceRegion)));
1620
1647
  }
1621
1648
  /** https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen */
1622
1649
  getGuildWelcomeScreen(guildId) {
1623
1650
  return this.rest
1624
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildWelcomeScreen(guildId))
1651
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWelcomeScreen(guildId))
1625
1652
  .then((response) => this.util.toCamelCase(response));
1626
1653
  }
1627
1654
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget */
1628
1655
  getGuildWidget(guildId) {
1629
1656
  return this.rest
1630
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildWidgetJson(guildId))
1657
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetJSON(guildId))
1631
1658
  .then((response) => this.util.toCamelCase(response));
1632
1659
  }
1633
1660
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget-image */
1634
1661
  getGuildWidgetImage(guildId, options) {
1635
- return this.rest.request(rest_1.RestMethods.Get, rest_1.Endpoints.guildWidgetImage(guildId), {
1662
+ return this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetImage(guildId), {
1636
1663
  query: {
1637
1664
  style: options?.style,
1638
1665
  },
@@ -1641,13 +1668,13 @@ class Client extends node_events_1.default {
1641
1668
  /** https://discord.com/developers/docs/resources/guild#get-guild-widget-settings */
1642
1669
  getGuildWidgetSettings(guildId) {
1643
1670
  return this.rest
1644
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildWidgetSettings(guildId))
1671
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWidgetSettings(guildId))
1645
1672
  .then((response) => this.util.toCamelCase(response));
1646
1673
  }
1647
1674
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message */
1648
1675
  getInteractionFollowupMessage(applicationId, interactionToken, messageId, options) {
1649
1676
  return this.rest
1650
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
1677
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken, messageId), {
1651
1678
  query: {
1652
1679
  thread_id: options?.threadId,
1653
1680
  },
@@ -1657,7 +1684,7 @@ class Client extends node_events_1.default {
1657
1684
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response */
1658
1685
  getInteractionResponse(applicationId, interactionToken, options) {
1659
1686
  return this.rest
1660
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
1687
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(applicationId, interactionToken), {
1661
1688
  query: {
1662
1689
  thread_id: options?.threadId,
1663
1690
  },
@@ -1667,7 +1694,7 @@ class Client extends node_events_1.default {
1667
1694
  /** https://discord.com/developers/docs/resources/invite#get-invite */
1668
1695
  getInvite(code, options) {
1669
1696
  return this.rest
1670
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.invite(code), {
1697
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.invite(code), {
1671
1698
  query: {
1672
1699
  with_counts: options?.withCounts,
1673
1700
  with_expiration: options?.withExpiration,
@@ -1679,7 +1706,7 @@ class Client extends node_events_1.default {
1679
1706
  /** https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads */
1680
1707
  getJoinedPrivateArchivedThreads(channelId, options) {
1681
1708
  return this.rest
1682
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelThreads(channelId, "private", true), {
1709
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelThreads(channelId, "private", true), {
1683
1710
  query: {
1684
1711
  before: options?.before,
1685
1712
  limit: options?.limit,
@@ -1690,13 +1717,13 @@ class Client extends node_events_1.default {
1690
1717
  /** https://discord.com/developers/docs/resources/channel#get-channel-message */
1691
1718
  getMessage(channelId, messageId) {
1692
1719
  return this.rest
1693
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelMessage(channelId, messageId))
1720
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessage(channelId, messageId))
1694
1721
  .then((response) => this.util.toCamelCase(response));
1695
1722
  }
1696
1723
  /** https://discord.com/developers/docs/resources/channel#get-reactions */
1697
1724
  getMessageReactions(channelId, messageId, emoji, options) {
1698
1725
  return this.rest
1699
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji), {
1726
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessageAllReactions(channelId, messageId, emoji), {
1700
1727
  query: {
1701
1728
  after: options?.after,
1702
1729
  limit: options?.limit,
@@ -1707,7 +1734,7 @@ class Client extends node_events_1.default {
1707
1734
  /** https://discord.com/developers/docs/resources/channel#get-channel-messages */
1708
1735
  getMessages(channelId, options) {
1709
1736
  return this.rest
1710
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelMessages(channelId), {
1737
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelMessages(channelId), {
1711
1738
  query: {
1712
1739
  around: options.around,
1713
1740
  before: options.before,
@@ -1720,43 +1747,53 @@ class Client extends node_events_1.default {
1720
1747
  /** https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information */
1721
1748
  getOAuth2Application() {
1722
1749
  return this.rest
1723
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.oauth2CurrentApplication())
1750
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.oauth2CurrentApplication())
1724
1751
  .then((response) => this.util.toCamelCase(response));
1725
1752
  }
1726
1753
  /** https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information */
1727
1754
  getOAuth2Authorization() {
1728
1755
  return this.rest
1729
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.oauth2Authorization())
1756
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.oauth2Authorization())
1730
1757
  .then((response) => this.util.toCamelCase(response));
1731
1758
  }
1732
1759
  /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
1733
1760
  getPinnedMessages(channelId) {
1734
1761
  return this.rest
1735
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.channelPins(channelId))
1762
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelId))
1736
1763
  .then((response) => response.map((message) => this.util.toCamelCase(message)));
1737
1764
  }
1765
+ getPollAnswerVoters(channelId, messageId, answerId, options) {
1766
+ return this.rest
1767
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.pollAnswerVoters(channelId, messageId, answerId), {
1768
+ query: {
1769
+ after: options?.after,
1770
+ limit: options?.limit,
1771
+ },
1772
+ })
1773
+ .then((response) => this.util.toCamelCase(response));
1774
+ }
1738
1775
  /** https://discord.com/developers/docs/monetization/skus#list-skus */
1739
1776
  getSkus(applicationId) {
1740
1777
  return this.rest
1741
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.applicationSkus(applicationId))
1778
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationSkus(applicationId))
1742
1779
  .then((response) => response.map((sku) => this.util.toCamelCase(sku)));
1743
1780
  }
1744
1781
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
1745
1782
  getStageInstance(channelId) {
1746
1783
  return this.rest
1747
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.stageInstance(channelId))
1784
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelId))
1748
1785
  .then((response) => this.util.toCamelCase(response));
1749
1786
  }
1750
1787
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
1751
1788
  getStickerPacks() {
1752
1789
  return this.rest
1753
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.stickerPacks())
1790
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPacks())
1754
1791
  .then((response) => this.util.toCamelCase(response));
1755
1792
  }
1756
1793
  /** https://discord.com/developers/docs/resources/channel#get-thread-member */
1757
1794
  getThreadMember(channelId, userId, options) {
1758
1795
  return this.rest
1759
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.threadMembers(channelId, userId), {
1796
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelId, userId), {
1760
1797
  query: {
1761
1798
  with_member: options?.withMember,
1762
1799
  },
@@ -1766,7 +1803,7 @@ class Client extends node_events_1.default {
1766
1803
  /** https://discord.com/developers/docs/resources/channel#list-thread-members */
1767
1804
  getThreadMembers(channelId, options) {
1768
1805
  return this.rest
1769
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.threadMembers(channelId), {
1806
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.threadMembers(channelId), {
1770
1807
  query: {
1771
1808
  with_member: options?.withMember,
1772
1809
  after: options?.after,
@@ -1778,19 +1815,19 @@ class Client extends node_events_1.default {
1778
1815
  /** https://discord.com/developers/docs/resources/user#get-user */
1779
1816
  getUser(userId) {
1780
1817
  return this.rest
1781
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.user(userId))
1818
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.user(userId))
1782
1819
  .then((response) => this.util.toCamelCase(response));
1783
1820
  }
1784
1821
  /** https://discord.com/developers/docs/resources/voice#list-voice-regions */
1785
1822
  getVoiceRegions() {
1786
1823
  return this.rest
1787
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.voiceRegions())
1824
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.voiceRegions())
1788
1825
  .then((response) => response.map((voiceRegion) => this.util.toCamelCase(voiceRegion)));
1789
1826
  }
1790
1827
  /** https://discord.com/developers/docs/resources/webhook#get-webhook-message */
1791
1828
  getWebhookMessage(webhookId, webhookToken, messageId, options) {
1792
1829
  return this.rest
1793
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
1830
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.webhookMessage(webhookId, webhookToken, messageId), {
1794
1831
  query: {
1795
1832
  thread_id: options?.threadId,
1796
1833
  },
@@ -1800,12 +1837,12 @@ class Client extends node_events_1.default {
1800
1837
  /** https://discord.com/developers/docs/resources/webhook#get-guild-webhooks */
1801
1838
  getWebhooks(guildId) {
1802
1839
  return this.rest
1803
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildWebhooks(guildId))
1840
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildWebhooks(guildId))
1804
1841
  .then((response) => response.map((webhook) => this.util.toCamelCase(webhook)));
1805
1842
  }
1806
1843
  /** https://discord.com/developers/docs/resources/channel#join-thread */
1807
1844
  joinThread(channelId) {
1808
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.threadMembers(channelId, "@me"));
1845
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.threadMembers(channelId, "@me"));
1809
1846
  }
1810
1847
  /** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
1811
1848
  joinVoiceChannel(guildId, channelId, options) {
@@ -1821,11 +1858,11 @@ class Client extends node_events_1.default {
1821
1858
  }
1822
1859
  /** https://discord.com/developers/docs/resources/user#leave-guild */
1823
1860
  leaveGuild(guildId) {
1824
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.userGuild(guildId));
1861
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.userGuild(guildId));
1825
1862
  }
1826
1863
  /** https://discord.com/developers/docs/resources/channel#leave-thread */
1827
1864
  leaveThread(channelId) {
1828
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.threadMembers(channelId, "@me"));
1865
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelId, "@me"));
1829
1866
  }
1830
1867
  /** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
1831
1868
  leaveVoiceChannel(guildId) {
@@ -1841,40 +1878,40 @@ class Client extends node_events_1.default {
1841
1878
  }
1842
1879
  /** https://discord.com/developers/docs/resources/channel#pin-message */
1843
1880
  pinMessage(channelId, messageId, reason) {
1844
- this.rest.request(rest_1.RestMethods.Put, rest_1.Endpoints.channelPin(channelId, messageId), {
1881
+ this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelPin(channelId, messageId), {
1845
1882
  reason,
1846
1883
  });
1847
1884
  }
1848
1885
  /** https://discord.com/developers/docs/resources/guild#remove-guild-ban */
1849
1886
  removeBan(guildId, userId, reason) {
1850
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildBan(guildId, userId), {
1887
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildBan(guildId, userId), {
1851
1888
  reason,
1852
1889
  });
1853
1890
  }
1854
1891
  /** https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient */
1855
1892
  removeGroupRecipient(channelId, userId) {
1856
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelRecipient(channelId, userId));
1893
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelRecipient(channelId, userId));
1857
1894
  }
1858
1895
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member */
1859
1896
  removeGuildMember(guildId, userId, reason) {
1860
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildMember(guildId, userId), {
1897
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMember(guildId, userId), {
1861
1898
  reason,
1862
1899
  });
1863
1900
  }
1864
1901
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
1865
1902
  removeGuildMemberRole(guildId, userId, roleId, reason) {
1866
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
1903
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.guildMemberRole(guildId, userId, roleId), {
1867
1904
  reason,
1868
1905
  });
1869
1906
  }
1870
1907
  /** https://discord.com/developers/docs/resources/channel#remove-thread-member */
1871
1908
  removeThreadMember(channelId, userId) {
1872
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.threadMembers(channelId, userId));
1909
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelId, userId));
1873
1910
  }
1874
1911
  /** https://discord.com/developers/docs/resources/guild#search-guild-members */
1875
1912
  searchGuildMembers(guildId, options) {
1876
1913
  return this.rest
1877
- .request(rest_1.RestMethods.Get, rest_1.Endpoints.guildMembersSearch(guildId), {
1914
+ .request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMembersSearch(guildId), {
1878
1915
  query: {
1879
1916
  query: options.query,
1880
1917
  limit: options.limit,
@@ -1890,23 +1927,23 @@ class Client extends node_events_1.default {
1890
1927
  /** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
1891
1928
  syncGuildTemplate(guildId, code) {
1892
1929
  return this.rest
1893
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code))
1930
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code))
1894
1931
  .then((response) => this.util.toCamelCase(response));
1895
1932
  }
1896
1933
  /** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
1897
1934
  triggerTypingIndicator(channelId) {
1898
- this.rest.request(rest_1.RestMethods.Post, rest_1.Endpoints.channelTyping(channelId));
1935
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.channelTyping(channelId));
1899
1936
  }
1900
1937
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
1901
1938
  updateApplicationRoleConnectionMetadataRecords(applicationId) {
1902
1939
  return this.rest
1903
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId))
1940
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationId))
1904
1941
  .then((response) => response.map((applicationRoleConnectionMetadata) => this.util.toCamelCase(applicationRoleConnectionMetadata)));
1905
1942
  }
1906
1943
  /** https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection */
1907
1944
  updateCurrentApplicationRoleConnection(options) {
1908
1945
  return this.rest
1909
- .request(rest_1.RestMethods.Put, rest_1.Endpoints.userApplicationRoleConnection(this.application.id), {
1946
+ .request(rest_1.RESTMethods.Put, rest_1.Endpoints.userApplicationRoleConnection(this.application.id), {
1910
1947
  json: {
1911
1948
  platform_name: options.platformName,
1912
1949
  platform_username: options.platformUsername,
@@ -1917,10 +1954,9 @@ class Client extends node_events_1.default {
1917
1954
  }
1918
1955
  /** https://discord.com/developers/docs/resources/channel#unpin-message */
1919
1956
  unpinMessage(channelId, messageId, reason) {
1920
- this.rest.request(rest_1.RestMethods.Delete, rest_1.Endpoints.channelPin(channelId, messageId), {
1957
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channelPin(channelId, messageId), {
1921
1958
  reason,
1922
1959
  });
1923
1960
  }
1924
1961
  }
1925
1962
  exports.Client = Client;
1926
- //# sourceMappingURL=Client.js.map