dfx 0.0.5 → 0.1.0

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 (108) hide show
  1. package/DiscordConfig/index.d.ts +29 -0
  2. package/DiscordConfig/index.js +31 -0
  3. package/DiscordConfig/index.js.map +1 -0
  4. package/DiscordConfig/index.ts +45 -0
  5. package/DiscordGateway/index.d.ts +23 -0
  6. package/DiscordGateway/index.js +25 -0
  7. package/DiscordGateway/index.js.map +1 -0
  8. package/DiscordGateway/index.ts +34 -0
  9. package/DiscordGateway/utils.d.ts +3 -0
  10. package/DiscordGateway/utils.js +12 -0
  11. package/DiscordGateway/utils.js.map +1 -0
  12. package/DiscordGateway/utils.ts +17 -0
  13. package/DiscordREST/http.d.ts +3 -0
  14. package/DiscordREST/http.js +20 -0
  15. package/DiscordREST/http.js.map +1 -0
  16. package/DiscordREST/http.ts +21 -0
  17. package/DiscordREST/index.d.ts +11 -0
  18. package/DiscordREST/index.js +65 -0
  19. package/DiscordREST/index.js.map +1 -0
  20. package/DiscordREST/index.ts +83 -0
  21. package/DiscordREST/types.d.ts +5 -0
  22. package/DiscordREST/types.ts +9 -1
  23. package/DiscordShard/heartbeats.d.ts +2 -3
  24. package/DiscordShard/heartbeats.js +9 -13
  25. package/DiscordShard/heartbeats.js.map +1 -1
  26. package/DiscordShard/heartbeats.ts +23 -28
  27. package/DiscordShard/identify.d.ts +2 -3
  28. package/DiscordShard/identify.js +5 -5
  29. package/DiscordShard/identify.js.map +1 -1
  30. package/DiscordShard/identify.ts +11 -12
  31. package/DiscordShard/index.d.ts +14 -14
  32. package/DiscordShard/index.js +24 -21
  33. package/DiscordShard/index.js.map +1 -1
  34. package/DiscordShard/index.ts +45 -33
  35. package/DiscordShard/invalidSession.d.ts +2 -3
  36. package/DiscordShard/invalidSession.js +4 -4
  37. package/DiscordShard/invalidSession.js.map +1 -1
  38. package/DiscordShard/invalidSession.ts +7 -8
  39. package/DiscordShard/utils.d.ts +4 -6
  40. package/DiscordShard/utils.js +5 -12
  41. package/DiscordShard/utils.js.map +1 -1
  42. package/DiscordShard/utils.ts +22 -37
  43. package/DiscordWS/index.d.ts +10 -9
  44. package/DiscordWS/index.js +10 -8
  45. package/DiscordWS/index.js.map +1 -1
  46. package/DiscordWS/index.ts +25 -28
  47. package/Log/index.d.ts +7 -4
  48. package/Log/index.js +16 -7
  49. package/Log/index.js.map +1 -1
  50. package/Log/index.ts +21 -11
  51. package/Utils/memoize.d.ts +3 -0
  52. package/Utils/memoize.js +16 -0
  53. package/Utils/memoize.js.map +1 -0
  54. package/Utils/memoize.ts +15 -0
  55. package/WS/index.d.ts +8 -10
  56. package/WS/index.js +16 -16
  57. package/WS/index.js.map +1 -1
  58. package/WS/index.ts +33 -34
  59. package/bot.js +15 -20
  60. package/bot.js.map +1 -1
  61. package/bot.ts +35 -36
  62. package/esm/DiscordConfig/index.js +26 -0
  63. package/esm/DiscordConfig/index.js.map +1 -0
  64. package/esm/DiscordGateway/index.js +20 -0
  65. package/esm/DiscordGateway/index.js.map +1 -0
  66. package/esm/DiscordGateway/utils.js +7 -0
  67. package/esm/DiscordGateway/utils.js.map +1 -0
  68. package/esm/DiscordREST/http.js +15 -0
  69. package/esm/DiscordREST/http.js.map +1 -0
  70. package/esm/DiscordREST/index.js +61 -0
  71. package/esm/DiscordREST/index.js.map +1 -0
  72. package/esm/DiscordREST/types.js +3 -0
  73. package/esm/DiscordREST/types.js.map +1 -0
  74. package/esm/DiscordShard/commands.js +28 -0
  75. package/esm/DiscordShard/commands.js.map +1 -0
  76. package/esm/DiscordShard/heartbeats.js +24 -0
  77. package/esm/DiscordShard/heartbeats.js.map +1 -0
  78. package/esm/DiscordShard/identify.js +30 -0
  79. package/esm/DiscordShard/identify.js.map +1 -0
  80. package/esm/DiscordShard/index.js +58 -0
  81. package/esm/DiscordShard/index.js.map +1 -0
  82. package/esm/DiscordShard/invalidSession.js +12 -0
  83. package/esm/DiscordShard/invalidSession.js.map +1 -0
  84. package/esm/DiscordShard/utils.js +11 -0
  85. package/esm/DiscordShard/utils.js.map +1 -0
  86. package/esm/DiscordWS/index.js +34 -0
  87. package/esm/DiscordWS/index.js.map +1 -0
  88. package/esm/Log/index.js +22 -0
  89. package/esm/Log/index.js.map +1 -0
  90. package/esm/Utils/memoize.js +12 -0
  91. package/esm/Utils/memoize.js.map +1 -0
  92. package/esm/WS/index.js +65 -0
  93. package/esm/WS/index.js.map +1 -0
  94. package/esm/bot.js +25 -0
  95. package/esm/bot.js.map +1 -0
  96. package/esm/mod.js +16 -0
  97. package/esm/mod.js.map +1 -0
  98. package/esm/types.js +1559 -0
  99. package/esm/types.js.map +1 -0
  100. package/mod.d.ts +5 -1
  101. package/mod.js +15 -2
  102. package/mod.js.map +1 -1
  103. package/mod.ts +14 -3
  104. package/package.json +25 -10
  105. package/types.d.ts +19 -5
  106. package/types.js +2 -1
  107. package/types.js.map +1 -1
  108. package/types.ts +170 -149
package/types.ts CHANGED
@@ -426,6 +426,20 @@ export interface BulkDeleteMessageParams {
426
426
  /** an array of message ids to delete (2-100) */
427
427
  messages: Snowflake[]
428
428
  }
429
+ export interface BulkOverwriteGuildApplicationCommandParams {
430
+ /** application command id, if known */
431
+ id: Snowflake
432
+ /** 1-32 character name */
433
+ name: string
434
+ /** 1-100 character description */
435
+ description: string
436
+ /** the parameters for the command */
437
+ options?: ApplicationCommandOption[]
438
+ /** whether the command is enabled by default when the app is added to a guild */
439
+ default_permission?: boolean
440
+ /** the type of command, defaults 1 if not set */
441
+ type?: ApplicationCommandType
442
+ }
429
443
  export interface Button {
430
444
  /** 2 for a button */
431
445
  type: number
@@ -784,7 +798,7 @@ export interface CreateMessageParams {
784
798
  flags: number
785
799
  }
786
800
  export function createRoutes<O = any>(
787
- fetch: <R, P>(route: Route<P, O>) => Response<R>
801
+ fetch: <R, P>(route: Route<P, O>) => Response<R>,
788
802
  ): Endpoints<O> {
789
803
  return {
790
804
  addGuildMember: (guildId, userId, params, options) =>
@@ -810,7 +824,7 @@ export function createRoutes<O = any>(
810
824
  applicationId,
811
825
  guildId,
812
826
  params,
813
- options
827
+ options,
814
828
  ) =>
815
829
  fetch({
816
830
  method: "PUT",
@@ -838,10 +852,16 @@ export function createRoutes<O = any>(
838
852
  url: `/applications/${applicationId}/commands`,
839
853
  options,
840
854
  }),
841
- bulkOverwriteGuildApplicationCommands: (applicationId, guildId, options) =>
855
+ bulkOverwriteGuildApplicationCommands: (
856
+ applicationId,
857
+ guildId,
858
+ params,
859
+ options,
860
+ ) =>
842
861
  fetch({
843
862
  method: "PUT",
844
863
  url: `/applications/${applicationId}/guilds/${guildId}/commands`,
864
+ params,
845
865
  options,
846
866
  }),
847
867
  createChannelInvite: (channelId, params, options) =>
@@ -952,7 +972,7 @@ export function createRoutes<O = any>(
952
972
  interactionId,
953
973
  interactionToken,
954
974
  params,
955
- options
975
+ options,
956
976
  ) =>
957
977
  fetch({
958
978
  method: "POST",
@@ -1021,7 +1041,7 @@ export function createRoutes<O = any>(
1021
1041
  applicationId,
1022
1042
  interactionToken,
1023
1043
  messageId,
1024
- options
1044
+ options,
1025
1045
  ) =>
1026
1046
  fetch({
1027
1047
  method: "DELETE",
@@ -1044,7 +1064,7 @@ export function createRoutes<O = any>(
1044
1064
  applicationId,
1045
1065
  guildId,
1046
1066
  commandId,
1047
- options
1067
+ options,
1048
1068
  ) =>
1049
1069
  fetch({
1050
1070
  method: "DELETE",
@@ -1102,7 +1122,7 @@ export function createRoutes<O = any>(
1102
1122
  deleteOriginalInteractionResponse: (
1103
1123
  applicationId,
1104
1124
  interactionToken,
1105
- options
1125
+ options,
1106
1126
  ) =>
1107
1127
  fetch({
1108
1128
  method: "DELETE",
@@ -1138,7 +1158,7 @@ export function createRoutes<O = any>(
1138
1158
  webhookToken,
1139
1159
  messageId,
1140
1160
  params,
1141
- options
1161
+ options,
1142
1162
  ) =>
1143
1163
  fetch({
1144
1164
  method: "DELETE",
@@ -1157,7 +1177,7 @@ export function createRoutes<O = any>(
1157
1177
  guildId,
1158
1178
  commandId,
1159
1179
  params,
1160
- options
1180
+ options,
1161
1181
  ) =>
1162
1182
  fetch({
1163
1183
  method: "PUT",
@@ -1176,7 +1196,7 @@ export function createRoutes<O = any>(
1176
1196
  applicationId,
1177
1197
  interactionToken,
1178
1198
  messageId,
1179
- options
1199
+ options,
1180
1200
  ) =>
1181
1201
  fetch({
1182
1202
  method: "PATCH",
@@ -1195,7 +1215,7 @@ export function createRoutes<O = any>(
1195
1215
  guildId,
1196
1216
  commandId,
1197
1217
  params,
1198
- options
1218
+ options,
1199
1219
  ) =>
1200
1220
  fetch({
1201
1221
  method: "PATCH",
@@ -1213,7 +1233,7 @@ export function createRoutes<O = any>(
1213
1233
  editOriginalInteractionResponse: (
1214
1234
  applicationId,
1215
1235
  interactionToken,
1216
- options
1236
+ options,
1217
1237
  ) =>
1218
1238
  fetch({
1219
1239
  method: "PATCH",
@@ -1257,7 +1277,7 @@ export function createRoutes<O = any>(
1257
1277
  applicationId,
1258
1278
  guildId,
1259
1279
  commandId,
1260
- options
1280
+ options,
1261
1281
  ) =>
1262
1282
  fetch({
1263
1283
  method: "GET",
@@ -1448,7 +1468,7 @@ export function createRoutes<O = any>(
1448
1468
  guildId,
1449
1469
  guildScheduledEventId,
1450
1470
  params,
1451
- options
1471
+ options,
1452
1472
  ) =>
1453
1473
  fetch({
1454
1474
  method: "GET",
@@ -1527,7 +1547,7 @@ export function createRoutes<O = any>(
1527
1547
  getOriginalInteractionResponse: (
1528
1548
  applicationId,
1529
1549
  interactionToken,
1530
- options
1550
+ options,
1531
1551
  ) =>
1532
1552
  fetch({
1533
1553
  method: "GET",
@@ -1785,7 +1805,7 @@ export function createRoutes<O = any>(
1785
1805
  guildId,
1786
1806
  guildScheduledEventId,
1787
1807
  params,
1788
- options
1808
+ options,
1789
1809
  ) =>
1790
1810
  fetch({
1791
1811
  method: "PATCH",
@@ -2138,55 +2158,56 @@ export interface Endpoints<O> {
2138
2158
  guildId: string,
2139
2159
  userId: string,
2140
2160
  params?: Partial<AddGuildMemberParams>,
2141
- options?: O
2161
+ options?: O,
2142
2162
  ) => Response<GuildMember>
2143
2163
  /** Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
2144
2164
  addGuildMemberRole: (
2145
2165
  guildId: string,
2146
2166
  userId: string,
2147
2167
  roleId: string,
2148
- options?: O
2168
+ options?: O,
2149
2169
  ) => Response<any>
2150
2170
  /** Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event. */
2151
2171
  addThreadMember: (
2152
2172
  channelId: string,
2153
2173
  userId: string,
2154
- options?: O
2174
+ options?: O,
2155
2175
  ) => Response<any>
2156
2176
  batchEditApplicationCommandPermissions: (
2157
2177
  applicationId: string,
2158
2178
  guildId: string,
2159
2179
  params?: Partial<GuildApplicationCommandPermission[]>,
2160
- options?: O
2180
+ options?: O,
2161
2181
  ) => Response<GuildApplicationCommandPermission[]>
2162
2182
  /** Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one 'pruned' key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the compute_prune_count option to false, forcing 'pruned' to null. Fires multiple Guild Member Remove Gateway events. */
2163
2183
  beginGuildPrune: (
2164
2184
  guildId: string,
2165
2185
  params?: Partial<BeginGuildPruneParams>,
2166
- options?: O
2186
+ options?: O,
2167
2187
  ) => Response<any>
2168
2188
  /** Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event. */
2169
2189
  bulkDeleteMessages: (
2170
2190
  channelId: string,
2171
2191
  params?: Partial<BulkDeleteMessageParams>,
2172
- options?: O
2192
+ options?: O,
2173
2193
  ) => Response<any>
2174
2194
  /** Takes a list of application commands, overwriting the existing global command list for this application. Updates will be available in all guilds after 1 hour. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits. */
2175
2195
  bulkOverwriteGlobalApplicationCommands: (
2176
2196
  applicationId: string,
2177
- options?: O
2197
+ options?: O,
2178
2198
  ) => Response<ApplicationCommand[]>
2179
2199
  /** Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns 200 and a list of application command objects. */
2180
2200
  bulkOverwriteGuildApplicationCommands: (
2181
2201
  applicationId: string,
2182
2202
  guildId: string,
2183
- options?: O
2203
+ params?: Partial<BulkOverwriteGuildApplicationCommandParams>,
2204
+ options?: O,
2184
2205
  ) => Response<ApplicationCommand[]>
2185
2206
  /** Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event. */
2186
2207
  createChannelInvite: (
2187
2208
  channelId: string,
2188
2209
  params?: Partial<CreateChannelInviteParams>,
2189
- options?: O
2210
+ options?: O,
2190
2211
  ) => Response<Invite>
2191
2212
  /** Create a new DM channel with a user. Returns a DM channel object. */
2192
2213
  createDm: (params?: Partial<CreateDmParams>, options?: O) => Response<Channel>
@@ -2194,89 +2215,89 @@ export interface Endpoints<O> {
2194
2215
  createFollowupMessage: (
2195
2216
  applicationId: string,
2196
2217
  interactionToken: string,
2197
- options?: O
2218
+ options?: O,
2198
2219
  ) => Response<any>
2199
2220
  createGlobalApplicationCommand: (
2200
2221
  applicationId: string,
2201
2222
  params?: Partial<CreateGlobalApplicationCommandParams>,
2202
- options?: O
2223
+ options?: O,
2203
2224
  ) => Response<ApplicationCommand>
2204
2225
  /** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client */
2205
2226
  createGroupDm: (
2206
2227
  params?: Partial<CreateGroupDmParams>,
2207
- options?: O
2228
+ options?: O,
2208
2229
  ) => Response<Channel>
2209
2230
  /** Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event. */
2210
2231
  createGuild: (
2211
2232
  params?: Partial<CreateGuildParams>,
2212
- options?: O
2233
+ options?: O,
2213
2234
  ) => Response<Guild>
2214
2235
  createGuildApplicationCommand: (
2215
2236
  applicationId: string,
2216
2237
  guildId: string,
2217
2238
  params?: Partial<CreateGuildApplicationCommandParams>,
2218
- options?: O
2239
+ options?: O,
2219
2240
  ) => Response<ApplicationCommand>
2220
2241
  /** Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event. */
2221
2242
  createGuildBan: (
2222
2243
  guildId: string,
2223
2244
  userId: string,
2224
2245
  params?: Partial<CreateGuildBanParams>,
2225
- options?: O
2246
+ options?: O,
2226
2247
  ) => Response<any>
2227
2248
  /** Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event. */
2228
2249
  createGuildChannel: (
2229
2250
  guildId: string,
2230
2251
  params?: Partial<CreateGuildChannelParams>,
2231
- options?: O
2252
+ options?: O,
2232
2253
  ) => Response<Channel>
2233
2254
  /** Create a new emoji for the guild. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
2234
2255
  createGuildEmoji: (
2235
2256
  guildId: string,
2236
2257
  params?: Partial<CreateGuildEmojiParams>,
2237
- options?: O
2258
+ options?: O,
2238
2259
  ) => Response<Emoji>
2239
2260
  /** Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event. */
2240
2261
  createGuildFromGuildTemplate: (
2241
2262
  templateCode: string,
2242
2263
  params?: Partial<CreateGuildFromGuildTemplateParams>,
2243
- options?: O
2264
+ options?: O,
2244
2265
  ) => Response<Guild>
2245
2266
  /** Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional. */
2246
2267
  createGuildRole: (
2247
2268
  guildId: string,
2248
2269
  params?: Partial<CreateGuildRoleParams>,
2249
- options?: O
2270
+ options?: O,
2250
2271
  ) => Response<Role>
2251
2272
  /** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. */
2252
2273
  createGuildScheduledEvent: (
2253
2274
  guildId: string,
2254
2275
  params?: Partial<CreateGuildScheduledEventParams>,
2255
- options?: O
2276
+ options?: O,
2256
2277
  ) => Response<GuildScheduledEvent>
2257
2278
  /** Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success. */
2258
2279
  createGuildSticker: (
2259
2280
  guildId: string,
2260
2281
  params?: Partial<CreateGuildStickerParams>,
2261
- options?: O
2282
+ options?: O,
2262
2283
  ) => Response<Sticker>
2263
2284
  /** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
2264
2285
  createGuildTemplate: (
2265
2286
  guildId: string,
2266
2287
  params?: Partial<CreateGuildTemplateParams>,
2267
- options?: O
2288
+ options?: O,
2268
2289
  ) => Response<GuildTemplate>
2269
2290
  /** Create a response to an Interaction from the gateway. Body is an interaction response. Returns 204 No Content. */
2270
2291
  createInteractionResponse: (
2271
2292
  interactionId: string,
2272
2293
  interactionToken: string,
2273
2294
  params?: Partial<InteractionResponse>,
2274
- options?: O
2295
+ options?: O,
2275
2296
  ) => Response<any>
2276
2297
  createMessage: (
2277
2298
  channelId: string,
2278
2299
  params?: Partial<CreateMessageParams>,
2279
- options?: O
2300
+ options?: O,
2280
2301
  ) => Response<Message>
2281
2302
  /** Create a reaction for the message. This endpoint requires the 'READ_MESSAGE_HISTORY' permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the 'ADD_REACTIONS' permission to be present on the current user. Returns a 204 empty response on success.
2282
2303
  The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
@@ -2284,30 +2305,30 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2284
2305
  channelId: string,
2285
2306
  messageId: string,
2286
2307
  emoji: string,
2287
- options?: O
2308
+ options?: O,
2288
2309
  ) => Response<any>
2289
2310
  /** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. */
2290
2311
  createStageInstance: (
2291
2312
  params?: Partial<CreateStageInstanceParams>,
2292
- options?: O
2313
+ options?: O,
2293
2314
  ) => Response<StageInstance>
2294
2315
  /** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. */
2295
2316
  createWebhook: (
2296
2317
  channelId: string,
2297
2318
  params?: Partial<CreateWebhookParams>,
2298
- options?: O
2319
+ options?: O,
2299
2320
  ) => Response<Webhook>
2300
2321
  /** Crosspost a message in a News Channel to following channels. This endpoint requires the 'SEND_MESSAGES' permission, if the current user sent the message, or additionally the 'MANAGE_MESSAGES' permission, for all other messages, to be present for the current user. */
2301
2322
  crosspostMessage: (
2302
2323
  channelId: string,
2303
2324
  messageId: string,
2304
- options?: O
2325
+ options?: O,
2305
2326
  ) => Response<Message>
2306
2327
  /** Deletes all reactions on a message. This endpoint requires the 'MANAGE_MESSAGES' permission to be present on the current user. Fires a Message Reaction Remove All Gateway event. */
2307
2328
  deleteAllReactions: (
2308
2329
  channelId: string,
2309
2330
  messageId: string,
2310
- options?: O
2331
+ options?: O,
2311
2332
  ) => Response<any>
2312
2333
  /** Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
2313
2334
  The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
@@ -2315,13 +2336,13 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2315
2336
  channelId: string,
2316
2337
  messageId: string,
2317
2338
  emoji: string,
2318
- options?: O
2339
+ options?: O,
2319
2340
  ) => Response<any>
2320
2341
  /** Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. For more information about permissions, see permissions */
2321
2342
  deleteChannelPermission: (
2322
2343
  channelId: string,
2323
2344
  overwriteId: string,
2324
- options?: O
2345
+ options?: O,
2325
2346
  ) => Response<any>
2326
2347
  /** Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread). */
2327
2348
  deletecloseChannel: (channelId: string, options?: O) => Response<Channel>
@@ -2330,13 +2351,13 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2330
2351
  applicationId: string,
2331
2352
  interactionToken: string,
2332
2353
  messageId: string,
2333
- options?: O
2354
+ options?: O,
2334
2355
  ) => Response<any>
2335
2356
  /** Deletes a global command. Returns 204 No Content on success. */
2336
2357
  deleteGlobalApplicationCommand: (
2337
2358
  applicationId: string,
2338
2359
  commandId: string,
2339
- options?: O
2360
+ options?: O,
2340
2361
  ) => Response<any>
2341
2362
  /** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */
2342
2363
  deleteGuild: (guildId: string, options?: O) => Response<any>
@@ -2345,43 +2366,43 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2345
2366
  applicationId: string,
2346
2367
  guildId: string,
2347
2368
  commandId: string,
2348
- options?: O
2369
+ options?: O,
2349
2370
  ) => Response<any>
2350
2371
  /** Delete the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
2351
2372
  deleteGuildEmoji: (
2352
2373
  guildId: string,
2353
2374
  emojiId: string,
2354
- options?: O
2375
+ options?: O,
2355
2376
  ) => Response<any>
2356
2377
  /** Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires a Guild Integrations Update Gateway event. */
2357
2378
  deleteGuildIntegration: (
2358
2379
  guildId: string,
2359
2380
  integrationId: string,
2360
- options?: O
2381
+ options?: O,
2361
2382
  ) => Response<any>
2362
2383
  /** Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event. */
2363
2384
  deleteGuildRole: (
2364
2385
  guildId: string,
2365
2386
  roleId: string,
2366
- options?: O
2387
+ options?: O,
2367
2388
  ) => Response<any>
2368
2389
  /** Delete a guild scheduled event. Returns a 204 on success. */
2369
2390
  deleteGuildScheduledEvent: (
2370
2391
  guildId: string,
2371
2392
  guildScheduledEventId: string,
2372
- options?: O
2393
+ options?: O,
2373
2394
  ) => Response<any>
2374
2395
  /** Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. */
2375
2396
  deleteGuildSticker: (
2376
2397
  guildId: string,
2377
2398
  stickerId: string,
2378
- options?: O
2399
+ options?: O,
2379
2400
  ) => Response<any>
2380
2401
  /** Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success. */
2381
2402
  deleteGuildTemplate: (
2382
2403
  guildId: string,
2383
2404
  templateCode: string,
2384
- options?: O
2405
+ options?: O,
2385
2406
  ) => Response<GuildTemplate>
2386
2407
  /** Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires a Invite Delete Gateway event. */
2387
2408
  deleteInvite: (inviteCode: string, options?: O) => Response<Invite>
@@ -2389,13 +2410,13 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2389
2410
  deleteMessage: (
2390
2411
  channelId: string,
2391
2412
  messageId: string,
2392
- options?: O
2413
+ options?: O,
2393
2414
  ) => Response<any>
2394
2415
  /** Deletes the initial Interaction response. Returns 204 No Content on success. Does not support ephemeral followups. */
2395
2416
  deleteOriginalInteractionResponse: (
2396
2417
  applicationId: string,
2397
2418
  interactionToken: string,
2398
- options?: O
2419
+ options?: O,
2399
2420
  ) => Response<any>
2400
2421
  /** Delete a reaction the current user has made for the message. Returns a 204 empty response on success.
2401
2422
  The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
@@ -2403,7 +2424,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2403
2424
  channelId: string,
2404
2425
  messageId: string,
2405
2426
  emoji: string,
2406
- options?: O
2427
+ options?: O,
2407
2428
  ) => Response<any>
2408
2429
  /** Deletes the Stage instance. Returns 204 No Content. */
2409
2430
  deleteStageInstance: (channelId: string, options?: O) => Response<any>
@@ -2414,7 +2435,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2414
2435
  messageId: string,
2415
2436
  emoji: string,
2416
2437
  userId: string,
2417
- options?: O
2438
+ options?: O,
2418
2439
  ) => Response<any>
2419
2440
  /** Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. */
2420
2441
  deleteWebhook: (webhookId: string, options?: O) => Response<any>
@@ -2424,60 +2445,60 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2424
2445
  webhookToken: string,
2425
2446
  messageId: string,
2426
2447
  params?: Partial<DeleteWebhookMessageParams>,
2427
- options?: O
2448
+ options?: O,
2428
2449
  ) => Response<any>
2429
2450
  /** Same as above, except this call does not require authentication. */
2430
2451
  deleteWebhookWithToken: (
2431
2452
  webhookId: string,
2432
2453
  webhookToken: string,
2433
- options?: O
2454
+ options?: O,
2434
2455
  ) => Response<any>
2435
2456
  editApplicationCommandPermissions: (
2436
2457
  applicationId: string,
2437
2458
  guildId: string,
2438
2459
  commandId: string,
2439
2460
  params?: Partial<EditApplicationCommandPermissionParams>,
2440
- options?: O
2461
+ options?: O,
2441
2462
  ) => Response<GuildApplicationCommandPermission>
2442
- /** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. For more information about permissions, see permissions. */
2463
+ /** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. For more information about permissions, see permissions. */
2443
2464
  editChannelPermissions: (
2444
2465
  channelId: string,
2445
2466
  overwriteId: string,
2446
2467
  params?: Partial<EditChannelPermissionParams>,
2447
- options?: O
2468
+ options?: O,
2448
2469
  ) => Response<any>
2449
- /** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. Does not support ephemeral followups. */
2470
+ /** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
2450
2471
  editFollowupMessage: (
2451
2472
  applicationId: string,
2452
2473
  interactionToken: string,
2453
2474
  messageId: string,
2454
- options?: O
2475
+ options?: O,
2455
2476
  ) => Response<any>
2456
2477
  editGlobalApplicationCommand: (
2457
2478
  applicationId: string,
2458
2479
  commandId: string,
2459
2480
  params?: Partial<EditGlobalApplicationCommandParams>,
2460
- options?: O
2481
+ options?: O,
2461
2482
  ) => Response<ApplicationCommand>
2462
2483
  editGuildApplicationCommand: (
2463
2484
  applicationId: string,
2464
2485
  guildId: string,
2465
2486
  commandId: string,
2466
2487
  params?: Partial<EditGuildApplicationCommandParams>,
2467
- options?: O
2488
+ options?: O,
2468
2489
  ) => Response<ApplicationCommand>
2469
2490
  /** Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). */
2470
2491
  editMessage: (
2471
2492
  channelId: string,
2472
2493
  messageId: string,
2473
2494
  params?: Partial<EditMessageParams>,
2474
- options?: O
2495
+ options?: O,
2475
2496
  ) => Response<Message>
2476
2497
  /** Edits the initial Interaction response. Functions the same as Edit Webhook Message. */
2477
2498
  editOriginalInteractionResponse: (
2478
2499
  applicationId: string,
2479
2500
  interactionToken: string,
2480
- options?: O
2501
+ options?: O,
2481
2502
  ) => Response<any>
2482
2503
  /** Edits a previously-sent webhook message from the same token. Returns a message object on success. */
2483
2504
  editWebhookMessage: (
@@ -2485,39 +2506,39 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2485
2506
  webhookToken: string,
2486
2507
  messageId: string,
2487
2508
  params?: Partial<EditWebhookMessageParams>,
2488
- options?: O
2509
+ options?: O,
2489
2510
  ) => Response<Message>
2490
2511
  /** Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. */
2491
2512
  executeGitHubCompatibleWebhook: (
2492
2513
  webhookId: string,
2493
2514
  webhookToken: string,
2494
- options?: O
2515
+ options?: O,
2495
2516
  ) => Response<any>
2496
2517
  /** Refer to Slack's documentation for more information. We do not support Slack's channel, icon_emoji, mrkdwn, or mrkdwn_in properties. */
2497
2518
  executeSlackCompatibleWebhook: (
2498
2519
  webhookId: string,
2499
2520
  webhookToken: string,
2500
- options?: O
2521
+ options?: O,
2501
2522
  ) => Response<any>
2502
2523
  /** Refer to Uploading Files for details on attachments and multipart/form-data requests. Returns a message or 204 No Content depending on the wait query parameter. */
2503
2524
  executeWebhook: (
2504
2525
  webhookId: string,
2505
2526
  webhookToken: string,
2506
2527
  params?: Partial<ExecuteWebhookParams>,
2507
- options?: O
2528
+ options?: O,
2508
2529
  ) => Response<any>
2509
2530
  /** Follow a News Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. */
2510
2531
  followNewsChannel: (
2511
2532
  channelId: string,
2512
2533
  params?: Partial<FollowNewsChannelParams>,
2513
- options?: O
2534
+ options?: O,
2514
2535
  ) => Response<FollowedChannel>
2515
2536
  /** Fetches command permissions for a specific command for your application in a guild. Returns a guild application command permissions object. */
2516
2537
  getApplicationCommandPermissions: (
2517
2538
  applicationId: string,
2518
2539
  guildId: string,
2519
2540
  commandId: string,
2520
- options?: O
2541
+ options?: O,
2521
2542
  ) => Response<GuildApplicationCommandPermission>
2522
2543
  /** Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result. */
2523
2544
  getChannel: (channelId: string, options?: O) => Response<Channel>
@@ -2527,13 +2548,13 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2527
2548
  getChannelMessage: (
2528
2549
  channelId: string,
2529
2550
  messageId: string,
2530
- options?: O
2551
+ options?: O,
2531
2552
  ) => Response<Message>
2532
2553
  /** Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user. If the current user is missing the 'READ_MESSAGE_HISTORY' permission in the channel then this will return no messages (since they cannot read the message history). Returns an array of message objects on success. */
2533
2554
  getChannelMessages: (
2534
2555
  channelId: string,
2535
2556
  params?: Partial<GetChannelMessageParams>,
2536
- options?: O
2557
+ options?: O,
2537
2558
  ) => Response<Message[]>
2538
2559
  /** Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission. */
2539
2560
  getChannelWebhooks: (channelId: string, options?: O) => Response<Webhook[]>
@@ -2542,19 +2563,19 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2542
2563
  /** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
2543
2564
  getCurrentUserGuildMember: (
2544
2565
  guildId: string,
2545
- options?: O
2566
+ options?: O,
2546
2567
  ) => Response<GuildMember>
2547
2568
  /** Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope. */
2548
2569
  getCurrentUserGuilds: (
2549
2570
  params?: Partial<GetCurrentUserGuildParams>,
2550
- options?: O
2571
+ options?: O,
2551
2572
  ) => Response<Guild[]>
2552
- /** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. Does not support ephemeral followups. */
2573
+ /** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
2553
2574
  getFollowupMessage: (
2554
2575
  applicationId: string,
2555
2576
  interactionToken: string,
2556
2577
  messageId: string,
2557
- options?: O
2578
+ options?: O,
2558
2579
  ) => Response<any>
2559
2580
  getGateway: (options?: O) => Response<any>
2560
2581
  getGatewayBot: (options?: O) => Response<GetGatewayBotResponse>
@@ -2562,43 +2583,43 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2562
2583
  getGlobalApplicationCommand: (
2563
2584
  applicationId: string,
2564
2585
  commandId: string,
2565
- options?: O
2586
+ options?: O,
2566
2587
  ) => Response<ApplicationCommand>
2567
2588
  /** Fetch all of the global commands for your application. Returns an array of application command objects. */
2568
2589
  getGlobalApplicationCommands: (
2569
2590
  applicationId: string,
2570
- options?: O
2591
+ options?: O,
2571
2592
  ) => Response<ApplicationCommand[]>
2572
2593
  /** Returns the guild object for the given id. If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild. */
2573
2594
  getGuild: (
2574
2595
  guildId: string,
2575
2596
  params?: Partial<GetGuildParams>,
2576
- options?: O
2597
+ options?: O,
2577
2598
  ) => Response<Guild>
2578
2599
  /** Fetch a guild command for your application. Returns an application command object. */
2579
2600
  getGuildApplicationCommand: (
2580
2601
  applicationId: string,
2581
2602
  guildId: string,
2582
2603
  commandId: string,
2583
- options?: O
2604
+ options?: O,
2584
2605
  ) => Response<ApplicationCommand>
2585
2606
  /** Fetches command permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects. */
2586
2607
  getGuildApplicationCommandPermissions: (
2587
2608
  applicationId: string,
2588
2609
  guildId: string,
2589
- options?: O
2610
+ options?: O,
2590
2611
  ) => Response<GuildApplicationCommandPermission[]>
2591
2612
  /** Fetch all of the guild commands for your application for a specific guild. Returns an array of application command objects. */
2592
2613
  getGuildApplicationCommands: (
2593
2614
  applicationId: string,
2594
2615
  guildId: string,
2595
- options?: O
2616
+ options?: O,
2596
2617
  ) => Response<ApplicationCommand[]>
2597
2618
  /** Returns an audit log object for the guild. Requires the 'VIEW_AUDIT_LOG' permission. */
2598
2619
  getGuildAuditLog: (
2599
2620
  guildId: string,
2600
2621
  params?: Partial<GetGuildAuditLogParams>,
2601
- options?: O
2622
+ options?: O,
2602
2623
  ) => Response<AuditLog>
2603
2624
  /** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */
2604
2625
  getGuildBan: (guildId: string, userId: string, options?: O) => Response<Ban>
@@ -2610,12 +2631,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2610
2631
  getGuildEmoji: (
2611
2632
  guildId: string,
2612
2633
  emojiId: string,
2613
- options?: O
2634
+ options?: O,
2614
2635
  ) => Response<Emoji>
2615
2636
  /** Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission. */
2616
2637
  getGuildIntegrations: (
2617
2638
  guildId: string,
2618
- options?: O
2639
+ options?: O,
2619
2640
  ) => Response<Integration[]>
2620
2641
  /** Returns a list of invite objects (with invite metadata) for the guild. Requires the MANAGE_GUILD permission. */
2621
2642
  getGuildInvites: (guildId: string, options?: O) => Response<Invite[]>
@@ -2623,7 +2644,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2623
2644
  getGuildMember: (
2624
2645
  guildId: string,
2625
2646
  userId: string,
2626
- options?: O
2647
+ options?: O,
2627
2648
  ) => Response<GuildMember>
2628
2649
  /** Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable. */
2629
2650
  getGuildPreview: (guildId: string, options?: O) => Response<GuildPreview>
@@ -2631,7 +2652,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2631
2652
  getGuildPruneCount: (
2632
2653
  guildId: string,
2633
2654
  params?: Partial<GetGuildPruneCountParams>,
2634
- options?: O
2655
+ options?: O,
2635
2656
  ) => Response<any>
2636
2657
  /** Returns a list of role objects for the guild. */
2637
2658
  getGuildRoles: (guildId: string, options?: O) => Response<Role[]>
@@ -2640,25 +2661,25 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2640
2661
  guildId: string,
2641
2662
  guildScheduledEventId: string,
2642
2663
  params?: Partial<GetGuildScheduledEventParams>,
2643
- options?: O
2664
+ options?: O,
2644
2665
  ) => Response<GuildScheduledEvent>
2645
2666
  /** Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set. */
2646
2667
  getGuildScheduledEventUsers: (
2647
2668
  guildId: string,
2648
2669
  guildScheduledEventId: string,
2649
2670
  params?: Partial<GetGuildScheduledEventUserParams>,
2650
- options?: O
2671
+ options?: O,
2651
2672
  ) => Response<GuildScheduledEventUser[]>
2652
2673
  /** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
2653
2674
  getGuildSticker: (
2654
2675
  guildId: string,
2655
2676
  stickerId: string,
2656
- options?: O
2677
+ options?: O,
2657
2678
  ) => Response<Sticker>
2658
2679
  /** Returns a guild template object for the given code. */
2659
2680
  getGuildTemplate: (
2660
2681
  templateCode: string,
2661
- options?: O
2682
+ options?: O,
2662
2683
  ) => Response<GuildTemplate>
2663
2684
  /** Returns an array of guild template objects. Requires the MANAGE_GUILD permission. */
2664
2685
  getGuildTemplates: (guildId: string, options?: O) => Response<GuildTemplate[]>
@@ -2667,14 +2688,14 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2667
2688
  /** Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled. */
2668
2689
  getGuildVoiceRegions: (
2669
2690
  guildId: string,
2670
- options?: O
2691
+ options?: O,
2671
2692
  ) => Response<VoiceRegion[]>
2672
2693
  /** Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS permission. */
2673
2694
  getGuildWebhooks: (guildId: string, options?: O) => Response<Webhook[]>
2674
2695
  /** Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required. */
2675
2696
  getGuildWelcomeScreen: (
2676
2697
  guildId: string,
2677
- options?: O
2698
+ options?: O,
2678
2699
  ) => Response<WelcomeScreen>
2679
2700
  /** Returns the widget for the guild. */
2680
2701
  getGuildWidget: (guildId: string, options?: O) => Response<GetGuildWidget>
@@ -2682,24 +2703,24 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2682
2703
  getGuildWidgetImage: (
2683
2704
  guildId: string,
2684
2705
  params?: Partial<GetGuildWidgetImageParams>,
2685
- options?: O
2706
+ options?: O,
2686
2707
  ) => Response<any>
2687
2708
  /** Returns a guild widget settings object. Requires the MANAGE_GUILD permission. */
2688
2709
  getGuildWidgetSettings: (
2689
2710
  guildId: string,
2690
- options?: O
2711
+ options?: O,
2691
2712
  ) => Response<GuildWidgetSetting>
2692
2713
  /** Returns an invite object for the given code. */
2693
2714
  getInvite: (
2694
2715
  inviteCode: string,
2695
2716
  params?: Partial<GetInviteParams>,
2696
- options?: O
2717
+ options?: O,
2697
2718
  ) => Response<Invite>
2698
2719
  /** Returns the initial Interaction response. Functions the same as Get Webhook Message. */
2699
2720
  getOriginalInteractionResponse: (
2700
2721
  applicationId: string,
2701
2722
  interactionToken: string,
2702
- options?: O
2723
+ options?: O,
2703
2724
  ) => Response<any>
2704
2725
  /** Returns all pinned messages in the channel as an array of message objects. */
2705
2726
  getPinnedMessages: (channelId: string, options?: O) => Response<Message[]>
@@ -2710,7 +2731,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2710
2731
  messageId: string,
2711
2732
  emoji: string,
2712
2733
  params?: Partial<GetReactionParams>,
2713
- options?: O
2734
+ options?: O,
2714
2735
  ) => Response<User[]>
2715
2736
  /** Gets the stage instance associated with the Stage channel, if it exists. */
2716
2737
  getStageInstance: (channelId: string, options?: O) => Response<any>
@@ -2720,7 +2741,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2720
2741
  getThreadMember: (
2721
2742
  channelId: string,
2722
2743
  userId: string,
2723
- options?: O
2744
+ options?: O,
2724
2745
  ) => Response<ThreadMember>
2725
2746
  /** Returns a user object for a given user ID. */
2726
2747
  getUser: (userId: string, options?: O) => Response<User>
@@ -2734,26 +2755,26 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2734
2755
  webhookToken: string,
2735
2756
  messageId: string,
2736
2757
  params?: Partial<GetWebhookMessageParams>,
2737
- options?: O
2758
+ options?: O,
2738
2759
  ) => Response<Message>
2739
2760
  /** Same as above, except this call does not require authentication and returns no user in the webhook object. */
2740
2761
  getWebhookWithToken: (
2741
2762
  webhookId: string,
2742
2763
  webhookToken: string,
2743
- options?: O
2764
+ options?: O,
2744
2765
  ) => Response<any>
2745
2766
  /** Adds a recipient to a Group DM using their access token. */
2746
2767
  groupDmAddRecipient: (
2747
2768
  channelId: string,
2748
2769
  userId: string,
2749
2770
  params?: Partial<GroupDmAddRecipientParams>,
2750
- options?: O
2771
+ options?: O,
2751
2772
  ) => Response<any>
2752
2773
  /** Removes a recipient from a Group DM. */
2753
2774
  groupDmRemoveRecipient: (
2754
2775
  channelId: string,
2755
2776
  userId: string,
2756
- options?: O
2777
+ options?: O,
2757
2778
  ) => Response<any>
2758
2779
  /** Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
2759
2780
  joinThread: (channelId: string, options?: O) => Response<any>
@@ -2764,12 +2785,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2764
2785
  /** Returns all active threads in the channel, including public and private threads. Threads are ordered by their id, in descending order. */
2765
2786
  listActiveThreads: (
2766
2787
  channelId: string,
2767
- options?: O
2788
+ options?: O,
2768
2789
  ) => Response<ListActiveThreadResponse>
2769
2790
  /** Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order. */
2770
2791
  listGuildActiveThreads: (
2771
2792
  guildId: string,
2772
- options?: O
2793
+ options?: O,
2773
2794
  ) => Response<ListGuildActiveThreadResponse>
2774
2795
  /** Returns a list of emoji objects for the given guild. */
2775
2796
  listGuildEmojis: (guildId: string, options?: O) => Response<Emoji[]>
@@ -2777,7 +2798,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2777
2798
  listGuildMembers: (
2778
2799
  guildId: string,
2779
2800
  params?: Partial<ListGuildMemberParams>,
2780
- options?: O
2801
+ options?: O,
2781
2802
  ) => Response<GuildMember[]>
2782
2803
  /** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
2783
2804
  listGuildStickers: (guildId: string, options?: O) => Response<Sticker[]>
@@ -2785,7 +2806,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2785
2806
  listJoinedPrivateArchivedThreads: (
2786
2807
  channelId: string,
2787
2808
  params?: Partial<ListJoinedPrivateArchivedThreadParams>,
2788
- options?: O
2809
+ options?: O,
2789
2810
  ) => Response<ListJoinedPrivateArchivedThreadResponse>
2790
2811
  /** Returns the list of sticker packs available to Nitro subscribers. */
2791
2812
  listNitroStickerPacks: (options?: O) => Response<any>
@@ -2793,24 +2814,24 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2793
2814
  listPrivateArchivedThreads: (
2794
2815
  channelId: string,
2795
2816
  params?: Partial<ListPrivateArchivedThreadParams>,
2796
- options?: O
2817
+ options?: O,
2797
2818
  ) => Response<ListPrivateArchivedThreadResponse>
2798
2819
  /** Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type GUILD_PUBLIC_THREAD. When called on a GUILD_NEWS channel returns threads of type GUILD_NEWS_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
2799
2820
  listPublicArchivedThreads: (
2800
2821
  channelId: string,
2801
2822
  params?: Partial<ListPublicArchivedThreadParams>,
2802
- options?: O
2823
+ options?: O,
2803
2824
  ) => Response<ListPublicArchivedThreadResponse>
2804
2825
  /** Returns a list of guild scheduled event objects for the given guild. */
2805
2826
  listScheduledEventsForGuild: (
2806
2827
  guildId: string,
2807
2828
  params?: Partial<ListScheduledEventsForGuildParams>,
2808
- options?: O
2829
+ options?: O,
2809
2830
  ) => Response<GuildScheduledEvent[]>
2810
2831
  /** Returns array of thread members objects that are members of the thread. */
2811
2832
  listThreadMembers: (
2812
2833
  channelId: string,
2813
- options?: O
2834
+ options?: O,
2814
2835
  ) => Response<ThreadMember[]>
2815
2836
  /** Returns an array of voice region objects that can be used when setting a voice or stage channel's rtc_region. */
2816
2837
  listVoiceRegions: (options?: O) => Response<VoiceRegion[]>
@@ -2818,181 +2839,181 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
2818
2839
  modifyChannel: (
2819
2840
  channelId: string,
2820
2841
  params?: Partial<ModifyChannelParams>,
2821
- options?: O
2842
+ options?: O,
2822
2843
  ) => Response<Channel>
2823
2844
  /** Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event. */
2824
2845
  modifyCurrentMember: (
2825
2846
  guildId: string,
2826
2847
  params?: Partial<ModifyCurrentMemberParams>,
2827
- options?: O
2848
+ options?: O,
2828
2849
  ) => Response<any>
2829
2850
  /** Modify the requester's user account settings. Returns a user object on success. */
2830
2851
  modifyCurrentUser: (
2831
2852
  params?: Partial<ModifyCurrentUserParams>,
2832
- options?: O
2853
+ options?: O,
2833
2854
  ) => Response<User>
2834
2855
  modifyCurrentUserNick: (
2835
2856
  guildId: string,
2836
2857
  params?: Partial<ModifyCurrentUserNickParams>,
2837
- options?: O
2858
+ options?: O,
2838
2859
  ) => Response<any>
2839
2860
  /** Updates the current user's voice state. Returns 204 No Content on success. */
2840
2861
  modifyCurrentUserVoiceState: (
2841
2862
  guildId: string,
2842
2863
  params?: Partial<ModifyCurrentUserVoiceStateParams>,
2843
- options?: O
2864
+ options?: O,
2844
2865
  ) => Response<any>
2845
2866
  /** Modify a guild's settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event. */
2846
2867
  modifyGuild: (
2847
2868
  guildId: string,
2848
2869
  params?: Partial<ModifyGuildParams>,
2849
- options?: O
2870
+ options?: O,
2850
2871
  ) => Response<Guild>
2851
2872
  /** Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events. */
2852
2873
  modifyGuildChannelPositions: (
2853
2874
  guildId: string,
2854
2875
  params?: Partial<ModifyGuildChannelPositionParams>,
2855
- options?: O
2876
+ options?: O,
2856
2877
  ) => Response<any>
2857
2878
  /** Modify the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
2858
2879
  modifyGuildEmoji: (
2859
2880
  guildId: string,
2860
2881
  emojiId: string,
2861
2882
  params?: Partial<ModifyGuildEmojiParams>,
2862
- options?: O
2883
+ options?: O,
2863
2884
  ) => Response<Emoji>
2864
2885
  /** Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice. */
2865
2886
  modifyGuildMember: (
2866
2887
  guildId: string,
2867
2888
  userId: string,
2868
2889
  params?: Partial<ModifyGuildMemberParams>,
2869
- options?: O
2890
+ options?: O,
2870
2891
  ) => Response<GuildMember>
2871
2892
  /** Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event. */
2872
2893
  modifyGuildRole: (
2873
2894
  guildId: string,
2874
2895
  roleId: string,
2875
2896
  params?: Partial<ModifyGuildRoleParams>,
2876
- options?: O
2897
+ options?: O,
2877
2898
  ) => Response<Role>
2878
2899
  /** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events. */
2879
2900
  modifyGuildRolePositions: (
2880
2901
  guildId: string,
2881
2902
  params?: Partial<ModifyGuildRolePositionParams>,
2882
- options?: O
2903
+ options?: O,
2883
2904
  ) => Response<Role[]>
2884
2905
  /** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. */
2885
2906
  modifyGuildScheduledEvent: (
2886
2907
  guildId: string,
2887
2908
  guildScheduledEventId: string,
2888
2909
  params?: Partial<ModifyGuildScheduledEventParams>,
2889
- options?: O
2910
+ options?: O,
2890
2911
  ) => Response<GuildScheduledEvent>
2891
2912
  /** Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success. */
2892
2913
  modifyGuildSticker: (
2893
2914
  guildId: string,
2894
2915
  stickerId: string,
2895
2916
  params?: Partial<ModifyGuildStickerParams>,
2896
- options?: O
2917
+ options?: O,
2897
2918
  ) => Response<Sticker>
2898
2919
  /** Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
2899
2920
  modifyGuildTemplate: (
2900
2921
  guildId: string,
2901
2922
  templateCode: string,
2902
2923
  params?: Partial<ModifyGuildTemplateParams>,
2903
- options?: O
2924
+ options?: O,
2904
2925
  ) => Response<GuildTemplate>
2905
2926
  /** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. */
2906
2927
  modifyGuildWelcomeScreen: (
2907
2928
  guildId: string,
2908
2929
  params?: Partial<ModifyGuildWelcomeScreenParams>,
2909
- options?: O
2930
+ options?: O,
2910
2931
  ) => Response<WelcomeScreen>
2911
2932
  /** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object. */
2912
2933
  modifyGuildWidget: (
2913
2934
  guildId: string,
2914
- options?: O
2935
+ options?: O,
2915
2936
  ) => Response<GuildWidgetSetting>
2916
2937
  /** Updates fields of an existing Stage instance. Returns the updated Stage instance. */
2917
2938
  modifyStageInstance: (
2918
2939
  channelId: string,
2919
2940
  params?: Partial<ModifyStageInstanceParams>,
2920
- options?: O
2941
+ options?: O,
2921
2942
  ) => Response<StageInstance>
2922
2943
  /** Updates another user's voice state. */
2923
2944
  modifyUserVoiceState: (
2924
2945
  guildId: string,
2925
2946
  userId: string,
2926
2947
  params?: Partial<ModifyUserVoiceStateParams>,
2927
- options?: O
2948
+ options?: O,
2928
2949
  ) => Response<any>
2929
2950
  /** Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. */
2930
2951
  modifyWebhook: (
2931
2952
  webhookId: string,
2932
2953
  params?: Partial<ModifyWebhookParams>,
2933
- options?: O
2954
+ options?: O,
2934
2955
  ) => Response<Webhook>
2935
2956
  /** Same as above, except this call does not require authentication, does not accept a channel_id parameter in the body, and does not return a user in the webhook object. */
2936
2957
  modifyWebhookWithToken: (
2937
2958
  webhookId: string,
2938
2959
  webhookToken: string,
2939
- options?: O
2960
+ options?: O,
2940
2961
  ) => Response<any>
2941
2962
  /** Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. */
2942
2963
  pinMessage: (
2943
2964
  channelId: string,
2944
2965
  messageId: string,
2945
- options?: O
2966
+ options?: O,
2946
2967
  ) => Response<any>
2947
2968
  /** Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event. */
2948
2969
  removeGuildBan: (
2949
2970
  guildId: string,
2950
2971
  userId: string,
2951
- options?: O
2972
+ options?: O,
2952
2973
  ) => Response<any>
2953
2974
  /** Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event. */
2954
2975
  removeGuildMember: (
2955
2976
  guildId: string,
2956
2977
  userId: string,
2957
- options?: O
2978
+ options?: O,
2958
2979
  ) => Response<any>
2959
2980
  /** Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
2960
2981
  removeGuildMemberRole: (
2961
2982
  guildId: string,
2962
2983
  userId: string,
2963
2984
  roleId: string,
2964
- options?: O
2985
+ options?: O,
2965
2986
  ) => Response<any>
2966
2987
  /** Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a GUILD_PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
2967
2988
  removeThreadMember: (
2968
2989
  channelId: string,
2969
2990
  userId: string,
2970
- options?: O
2991
+ options?: O,
2971
2992
  ) => Response<any>
2972
2993
  /** Returns a list of guild member objects whose username or nickname starts with a provided string. */
2973
2994
  searchGuildMembers: (
2974
2995
  guildId: string,
2975
2996
  params?: Partial<SearchGuildMemberParams>,
2976
- options?: O
2997
+ options?: O,
2977
2998
  ) => Response<GuildMember[]>
2978
2999
  /** Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
2979
3000
  startThreadWithMessage: (
2980
3001
  channelId: string,
2981
3002
  messageId: string,
2982
3003
  params?: Partial<StartThreadWithMessageParams>,
2983
- options?: O
3004
+ options?: O,
2984
3005
  ) => Response<Channel>
2985
3006
  /** Creates a new thread that is not connected to an existing message. The created thread defaults to a GUILD_PRIVATE_THREAD*. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
2986
3007
  startThreadWithoutMessage: (
2987
3008
  channelId: string,
2988
3009
  params?: Partial<StartThreadWithoutMessageParams>,
2989
- options?: O
3010
+ options?: O,
2990
3011
  ) => Response<Channel>
2991
3012
  /** Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
2992
3013
  syncGuildTemplate: (
2993
3014
  guildId: string,
2994
3015
  templateCode: string,
2995
- options?: O
3016
+ options?: O,
2996
3017
  ) => Response<GuildTemplate>
2997
3018
  /** Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event. */
2998
3019
  triggerTypingIndicator: (channelId: string, options?: O) => Response<any>
@@ -3000,7 +3021,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3000
3021
  unpinMessage: (
3001
3022
  channelId: string,
3002
3023
  messageId: string,
3003
- options?: O
3024
+ options?: O,
3004
3025
  ) => Response<any>
3005
3026
  }
3006
3027
  export interface ExecuteWebhookParams {
@@ -4818,7 +4839,7 @@ export interface SearchGuildMemberParams {
4818
4839
  export interface SelectMenu {
4819
4840
  /** 3 for a select menu */
4820
4841
  type: number
4821
- /** a developer-defined identifier for the button, max 100 characters */
4842
+ /** a developer-defined identifier for the select menu, max 100 characters */
4822
4843
  custom_id: string
4823
4844
  /** the choices in the select, max 25 */
4824
4845
  options: SelectOption[]