@discordjs/core 2.2.2 → 2.3.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.
package/dist/http-only.js CHANGED
@@ -26,6 +26,7 @@ __export(http_only_exports, {
26
26
  ApplicationCommandsAPI: () => ApplicationCommandsAPI,
27
27
  ApplicationsAPI: () => ApplicationsAPI,
28
28
  ChannelsAPI: () => ChannelsAPI,
29
+ GatewayAPI: () => GatewayAPI,
29
30
  GuildsAPI: () => GuildsAPI,
30
31
  InteractionsAPI: () => InteractionsAPI,
31
32
  InvitesAPI: () => InvitesAPI,
@@ -790,14 +791,74 @@ var ChannelsAPI = class {
790
791
  signal
791
792
  });
792
793
  }
794
+ /**
795
+ * Adds a recipient to a group DM channel
796
+ *
797
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
798
+ * @param channelId - The id of the channel to add the recipient to
799
+ * @param userId - The id of the user to add as a recipient
800
+ * @param body - The data for adding the recipient
801
+ * @param options - The options for adding the recipient
802
+ */
803
+ async addGroupDMRecipient(channelId, userId, body, { signal } = {}) {
804
+ await this.rest.put(import_v103.Routes.channelRecipient(channelId, userId), {
805
+ body,
806
+ signal
807
+ });
808
+ }
809
+ /**
810
+ * Removes a recipient from a group DM channel
811
+ *
812
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
813
+ * @param channelId - The id of the channel to remove the recipient from
814
+ * @param userId - The id of the user to remove as a recipient
815
+ * @param options - The options for removing the recipient
816
+ */
817
+ async removeGroupDMRecipient(channelId, userId, { signal } = {}) {
818
+ await this.rest.delete(import_v103.Routes.channelRecipient(channelId, userId), {
819
+ signal
820
+ });
821
+ }
822
+ };
823
+
824
+ // src/api/gateway.ts
825
+ var import_v104 = require("discord-api-types/v10");
826
+ var GatewayAPI = class {
827
+ constructor(rest) {
828
+ this.rest = rest;
829
+ }
830
+ static {
831
+ __name(this, "GatewayAPI");
832
+ }
833
+ /**
834
+ * Gets gateway information.
835
+ *
836
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway}
837
+ * @param options - The options for fetching the gateway information
838
+ */
839
+ async get({ signal } = {}) {
840
+ return this.rest.get(import_v104.Routes.gateway(), {
841
+ auth: false,
842
+ signal
843
+ });
844
+ }
845
+ /**
846
+ * Gets gateway information with additional metadata.
847
+ *
848
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway-bot}
849
+ * @param options - The options for fetching the gateway information
850
+ */
851
+ async getBot({ signal } = {}) {
852
+ return this.rest.get(import_v104.Routes.gatewayBot(), { signal });
853
+ }
793
854
  };
794
855
 
795
856
  // src/api/guild.ts
796
857
  var import_rest3 = require("@discordjs/rest");
797
- var import_v105 = require("discord-api-types/v10");
858
+ var import_v106 = require("discord-api-types/v10");
798
859
 
799
860
  // src/api/voice.ts
800
- var import_v104 = require("discord-api-types/v10");
861
+ var import_v105 = require("discord-api-types/v10");
801
862
  var VoiceAPI = class {
802
863
  constructor(rest) {
803
864
  this.rest = rest;
@@ -812,7 +873,7 @@ var VoiceAPI = class {
812
873
  * @param options - The options for fetching the voice regions
813
874
  */
814
875
  async getVoiceRegions({ signal } = {}) {
815
- return this.rest.get(import_v104.Routes.voiceRegions(), { signal });
876
+ return this.rest.get(import_v105.Routes.voiceRegions(), { signal });
816
877
  }
817
878
  /**
818
879
  * Fetches voice state of a user by their id
@@ -821,7 +882,7 @@ var VoiceAPI = class {
821
882
  * @param options - The options for fetching user voice state
822
883
  */
823
884
  async getUserVoiceState(guildId, userId, { signal } = {}) {
824
- return this.rest.get(import_v104.Routes.guildVoiceState(guildId, userId), {
885
+ return this.rest.get(import_v105.Routes.guildVoiceState(guildId, userId), {
825
886
  signal
826
887
  });
827
888
  }
@@ -832,7 +893,7 @@ var VoiceAPI = class {
832
893
  * @param options - The options for fetching user voice state
833
894
  */
834
895
  async getVoiceState(guildId, { signal } = {}) {
835
- return this.rest.get(import_v104.Routes.guildVoiceState(guildId, "@me"), {
896
+ return this.rest.get(import_v105.Routes.guildVoiceState(guildId, "@me"), {
836
897
  signal
837
898
  });
838
899
  }
@@ -846,7 +907,7 @@ var VoiceAPI = class {
846
907
  * @param options - The options for editing the voice state
847
908
  */
848
909
  async editUserVoiceState(guildId, userId, body, { reason, signal } = {}) {
849
- return this.rest.patch(import_v104.Routes.guildVoiceState(guildId, userId), {
910
+ return this.rest.patch(import_v105.Routes.guildVoiceState(guildId, userId), {
850
911
  reason,
851
912
  body,
852
913
  signal
@@ -861,7 +922,7 @@ var VoiceAPI = class {
861
922
  * @param options - The options for editing the voice state
862
923
  */
863
924
  async editVoiceState(guildId, body = {}, { signal } = {}) {
864
- return this.rest.patch(import_v104.Routes.guildVoiceState(guildId, "@me"), {
925
+ return this.rest.patch(import_v105.Routes.guildVoiceState(guildId, "@me"), {
865
926
  body,
866
927
  signal
867
928
  });
@@ -883,7 +944,7 @@ var GuildsAPI = class {
883
944
  if ("with_counts" in queryOrOptions) {
884
945
  requestData.query = (0, import_rest3.makeURLSearchParams)(queryOrOptions);
885
946
  }
886
- return this.rest.get(import_v105.Routes.guild(guildId), requestData);
947
+ return this.rest.get(import_v106.Routes.guild(guildId), requestData);
887
948
  }
888
949
  /**
889
950
  * Fetches a guild preview
@@ -893,7 +954,7 @@ var GuildsAPI = class {
893
954
  * @param options - The options for fetching the guild preview
894
955
  */
895
956
  async getPreview(guildId, { signal } = {}) {
896
- return this.rest.get(import_v105.Routes.guildPreview(guildId), {
957
+ return this.rest.get(import_v106.Routes.guildPreview(guildId), {
897
958
  signal
898
959
  });
899
960
  }
@@ -906,7 +967,7 @@ var GuildsAPI = class {
906
967
  * @deprecated API related to guild ownership may no longer be used.
907
968
  */
908
969
  async create(body, { signal } = {}) {
909
- return this.rest.post(import_v105.Routes.guilds(), { body, signal });
970
+ return this.rest.post(import_v106.Routes.guilds(), { body, signal });
910
971
  }
911
972
  /**
912
973
  * Edits a guild
@@ -917,7 +978,7 @@ var GuildsAPI = class {
917
978
  * @param options - The options for editing the guild
918
979
  */
919
980
  async edit(guildId, body, { reason, signal } = {}) {
920
- return this.rest.patch(import_v105.Routes.guild(guildId), {
981
+ return this.rest.patch(import_v106.Routes.guild(guildId), {
921
982
  reason,
922
983
  body,
923
984
  signal
@@ -932,7 +993,7 @@ var GuildsAPI = class {
932
993
  * @deprecated API related to guild ownership may no longer be used.
933
994
  */
934
995
  async delete(guildId, { signal } = {}) {
935
- await this.rest.delete(import_v105.Routes.guild(guildId), { signal });
996
+ await this.rest.delete(import_v106.Routes.guild(guildId), { signal });
936
997
  }
937
998
  /**
938
999
  * Adds user to the guild
@@ -944,7 +1005,7 @@ var GuildsAPI = class {
944
1005
  * @param options - The options for adding users to the guild
945
1006
  */
946
1007
  async addMember(guildId, userId, body, { signal } = {}) {
947
- return this.rest.put(import_v105.Routes.guildMember(guildId, userId), {
1008
+ return this.rest.put(import_v106.Routes.guildMember(guildId, userId), {
948
1009
  body,
949
1010
  signal
950
1011
  });
@@ -958,7 +1019,7 @@ var GuildsAPI = class {
958
1019
  * @param options - The options for fetching the guild members
959
1020
  */
960
1021
  async getMembers(guildId, query = {}, { signal } = {}) {
961
- return this.rest.get(import_v105.Routes.guildMembers(guildId), {
1022
+ return this.rest.get(import_v106.Routes.guildMembers(guildId), {
962
1023
  query: (0, import_rest3.makeURLSearchParams)(query),
963
1024
  signal
964
1025
  });
@@ -971,7 +1032,7 @@ var GuildsAPI = class {
971
1032
  * @param options - The options for fetching the guild channels
972
1033
  */
973
1034
  async getChannels(guildId, { signal } = {}) {
974
- return this.rest.get(import_v105.Routes.guildChannels(guildId), {
1035
+ return this.rest.get(import_v106.Routes.guildChannels(guildId), {
975
1036
  signal
976
1037
  });
977
1038
  }
@@ -984,7 +1045,7 @@ var GuildsAPI = class {
984
1045
  * @param options - The options for creating the guild channel
985
1046
  */
986
1047
  async createChannel(guildId, body, { reason, signal } = {}) {
987
- return this.rest.post(import_v105.Routes.guildChannels(guildId), {
1048
+ return this.rest.post(import_v106.Routes.guildChannels(guildId), {
988
1049
  reason,
989
1050
  body,
990
1051
  signal
@@ -999,7 +1060,7 @@ var GuildsAPI = class {
999
1060
  * @param options - The options for editing the guild channel positions
1000
1061
  */
1001
1062
  async setChannelPositions(guildId, body, { reason, signal } = {}) {
1002
- await this.rest.patch(import_v105.Routes.guildChannels(guildId), { reason, body, signal });
1063
+ await this.rest.patch(import_v106.Routes.guildChannels(guildId), { reason, body, signal });
1003
1064
  }
1004
1065
  /**
1005
1066
  * Fetches the active threads in a guild
@@ -1009,7 +1070,7 @@ var GuildsAPI = class {
1009
1070
  * @param options - The options for fetching the active threads
1010
1071
  */
1011
1072
  async getActiveThreads(guildId, { signal } = {}) {
1012
- return this.rest.get(import_v105.Routes.guildActiveThreads(guildId), { signal });
1073
+ return this.rest.get(import_v106.Routes.guildActiveThreads(guildId), { signal });
1013
1074
  }
1014
1075
  /**
1015
1076
  * Fetches a guild member ban
@@ -1020,7 +1081,7 @@ var GuildsAPI = class {
1020
1081
  * @param options - The options for fetching the ban
1021
1082
  */
1022
1083
  async getMemberBan(guildId, userId, { signal } = {}) {
1023
- return this.rest.get(import_v105.Routes.guildBan(guildId, userId), { signal });
1084
+ return this.rest.get(import_v106.Routes.guildBan(guildId, userId), { signal });
1024
1085
  }
1025
1086
  /**
1026
1087
  * Fetches guild member bans
@@ -1031,7 +1092,7 @@ var GuildsAPI = class {
1031
1092
  * @param options - The options for fetching the bans
1032
1093
  */
1033
1094
  async getMemberBans(guildId, query = {}, { signal } = {}) {
1034
- return this.rest.get(import_v105.Routes.guildBans(guildId), {
1095
+ return this.rest.get(import_v106.Routes.guildBans(guildId), {
1035
1096
  query: (0, import_rest3.makeURLSearchParams)(query),
1036
1097
  signal
1037
1098
  });
@@ -1046,7 +1107,7 @@ var GuildsAPI = class {
1046
1107
  * @param options - The options for banning the user
1047
1108
  */
1048
1109
  async banUser(guildId, userId, body = {}, { reason, signal } = {}) {
1049
- await this.rest.put(import_v105.Routes.guildBan(guildId, userId), { reason, body, signal });
1110
+ await this.rest.put(import_v106.Routes.guildBan(guildId, userId), { reason, body, signal });
1050
1111
  }
1051
1112
  /**
1052
1113
  * Unbans a user from a guild
@@ -1057,7 +1118,7 @@ var GuildsAPI = class {
1057
1118
  * @param options - The options for unbanning the user
1058
1119
  */
1059
1120
  async unbanUser(guildId, userId, { reason, signal } = {}) {
1060
- await this.rest.delete(import_v105.Routes.guildBan(guildId, userId), { reason, signal });
1121
+ await this.rest.delete(import_v106.Routes.guildBan(guildId, userId), { reason, signal });
1061
1122
  }
1062
1123
  /**
1063
1124
  * Bulk ban users from a guild
@@ -1068,7 +1129,7 @@ var GuildsAPI = class {
1068
1129
  * @param options - The options for bulk banning users
1069
1130
  */
1070
1131
  async bulkBanUsers(guildId, body, { reason, signal } = {}) {
1071
- return this.rest.post(import_v105.Routes.guildBulkBan(guildId), {
1132
+ return this.rest.post(import_v106.Routes.guildBulkBan(guildId), {
1072
1133
  reason,
1073
1134
  body,
1074
1135
  signal
@@ -1082,7 +1143,7 @@ var GuildsAPI = class {
1082
1143
  * @param options - The options for fetching the guild roles
1083
1144
  */
1084
1145
  async getRoles(guildId, { signal } = {}) {
1085
- return this.rest.get(import_v105.Routes.guildRoles(guildId), { signal });
1146
+ return this.rest.get(import_v106.Routes.guildRoles(guildId), { signal });
1086
1147
  }
1087
1148
  /**
1088
1149
  * Get a role in a guild
@@ -1093,7 +1154,7 @@ var GuildsAPI = class {
1093
1154
  * @param options - The options for fetching the guild role
1094
1155
  */
1095
1156
  async getRole(guildId, roleId, { signal } = {}) {
1096
- return this.rest.get(import_v105.Routes.guildRole(guildId, roleId), { signal });
1157
+ return this.rest.get(import_v106.Routes.guildRole(guildId, roleId), { signal });
1097
1158
  }
1098
1159
  /**
1099
1160
  * Creates a guild role
@@ -1104,7 +1165,7 @@ var GuildsAPI = class {
1104
1165
  * @param options - The options for creating the guild role
1105
1166
  */
1106
1167
  async createRole(guildId, body, { reason, signal } = {}) {
1107
- return this.rest.post(import_v105.Routes.guildRoles(guildId), { reason, body, signal });
1168
+ return this.rest.post(import_v106.Routes.guildRoles(guildId), { reason, body, signal });
1108
1169
  }
1109
1170
  /**
1110
1171
  * Sets role positions in a guild
@@ -1115,7 +1176,7 @@ var GuildsAPI = class {
1115
1176
  * @param options - The options for setting role positions
1116
1177
  */
1117
1178
  async setRolePositions(guildId, body, { reason, signal } = {}) {
1118
- return this.rest.patch(import_v105.Routes.guildRoles(guildId), {
1179
+ return this.rest.patch(import_v106.Routes.guildRoles(guildId), {
1119
1180
  reason,
1120
1181
  body,
1121
1182
  signal
@@ -1131,7 +1192,7 @@ var GuildsAPI = class {
1131
1192
  * @param options - The options for editing the guild role
1132
1193
  */
1133
1194
  async editRole(guildId, roleId, body, { reason, signal } = {}) {
1134
- return this.rest.patch(import_v105.Routes.guildRole(guildId, roleId), {
1195
+ return this.rest.patch(import_v106.Routes.guildRole(guildId, roleId), {
1135
1196
  reason,
1136
1197
  body,
1137
1198
  signal
@@ -1146,7 +1207,7 @@ var GuildsAPI = class {
1146
1207
  * @param options - The options for deleting the guild role
1147
1208
  */
1148
1209
  async deleteRole(guildId, roleId, { reason, signal } = {}) {
1149
- await this.rest.delete(import_v105.Routes.guildRole(guildId, roleId), { reason, signal });
1210
+ await this.rest.delete(import_v106.Routes.guildRole(guildId, roleId), { reason, signal });
1150
1211
  }
1151
1212
  /**
1152
1213
  * Edits the multi-factor-authentication (MFA) level of a guild
@@ -1158,7 +1219,7 @@ var GuildsAPI = class {
1158
1219
  * @deprecated API related to guild ownership may no longer be used.
1159
1220
  */
1160
1221
  async editMFALevel(guildId, level, { reason, signal } = {}) {
1161
- return this.rest.post(import_v105.Routes.guildMFA(guildId), {
1222
+ return this.rest.post(import_v106.Routes.guildMFA(guildId), {
1162
1223
  reason,
1163
1224
  signal,
1164
1225
  body: { level }
@@ -1173,7 +1234,7 @@ var GuildsAPI = class {
1173
1234
  * @param options - The options for fetching the number of pruned members
1174
1235
  */
1175
1236
  async getPruneCount(guildId, query = {}, { signal } = {}) {
1176
- return this.rest.get(import_v105.Routes.guildPrune(guildId), {
1237
+ return this.rest.get(import_v106.Routes.guildPrune(guildId), {
1177
1238
  signal,
1178
1239
  query: (0, import_rest3.makeURLSearchParams)(query)
1179
1240
  });
@@ -1187,7 +1248,7 @@ var GuildsAPI = class {
1187
1248
  * @param options - The options for initiating the prune
1188
1249
  */
1189
1250
  async beginPrune(guildId, body = {}, { reason, signal } = {}) {
1190
- return this.rest.post(import_v105.Routes.guildPrune(guildId), {
1251
+ return this.rest.post(import_v106.Routes.guildPrune(guildId), {
1191
1252
  body,
1192
1253
  reason,
1193
1254
  signal
@@ -1201,7 +1262,7 @@ var GuildsAPI = class {
1201
1262
  * @param options - The options for fetching the voice regions
1202
1263
  */
1203
1264
  async getVoiceRegions(guildId, { signal } = {}) {
1204
- return this.rest.get(import_v105.Routes.guildVoiceRegions(guildId), { signal });
1265
+ return this.rest.get(import_v106.Routes.guildVoiceRegions(guildId), { signal });
1205
1266
  }
1206
1267
  /**
1207
1268
  * Fetches the invites for a guild
@@ -1211,7 +1272,7 @@ var GuildsAPI = class {
1211
1272
  * @param options - The options for fetching the invites
1212
1273
  */
1213
1274
  async getInvites(guildId, { signal } = {}) {
1214
- return this.rest.get(import_v105.Routes.guildInvites(guildId), { signal });
1275
+ return this.rest.get(import_v106.Routes.guildInvites(guildId), { signal });
1215
1276
  }
1216
1277
  /**
1217
1278
  * Fetches the integrations for a guild
@@ -1221,7 +1282,7 @@ var GuildsAPI = class {
1221
1282
  * @param options - The options for fetching the integrations
1222
1283
  */
1223
1284
  async getIntegrations(guildId, { signal } = {}) {
1224
- return this.rest.get(import_v105.Routes.guildIntegrations(guildId), { signal });
1285
+ return this.rest.get(import_v106.Routes.guildIntegrations(guildId), { signal });
1225
1286
  }
1226
1287
  /**
1227
1288
  * Deletes an integration from a guild
@@ -1232,7 +1293,7 @@ var GuildsAPI = class {
1232
1293
  * @param options - The options for deleting the integration
1233
1294
  */
1234
1295
  async deleteIntegration(guildId, integrationId, { reason, signal } = {}) {
1235
- await this.rest.delete(import_v105.Routes.guildIntegration(guildId, integrationId), { reason, signal });
1296
+ await this.rest.delete(import_v106.Routes.guildIntegration(guildId, integrationId), { reason, signal });
1236
1297
  }
1237
1298
  /**
1238
1299
  * Fetches the widget settings for a guild
@@ -1242,7 +1303,7 @@ var GuildsAPI = class {
1242
1303
  * @param options - The options for fetching the widget settings
1243
1304
  */
1244
1305
  async getWidgetSettings(guildId, { signal } = {}) {
1245
- return this.rest.get(import_v105.Routes.guildWidgetSettings(guildId), {
1306
+ return this.rest.get(import_v106.Routes.guildWidgetSettings(guildId), {
1246
1307
  signal
1247
1308
  });
1248
1309
  }
@@ -1255,7 +1316,7 @@ var GuildsAPI = class {
1255
1316
  * @param options - The options for editing the widget settings
1256
1317
  */
1257
1318
  async editWidgetSettings(guildId, body, { reason, signal } = {}) {
1258
- return this.rest.patch(import_v105.Routes.guildWidgetSettings(guildId), {
1319
+ return this.rest.patch(import_v106.Routes.guildWidgetSettings(guildId), {
1259
1320
  reason,
1260
1321
  body,
1261
1322
  signal
@@ -1269,7 +1330,7 @@ var GuildsAPI = class {
1269
1330
  * @param options - The options for fetching the widget
1270
1331
  */
1271
1332
  async getWidget(guildId, { signal } = {}) {
1272
- return this.rest.get(import_v105.Routes.guildWidgetJSON(guildId), { signal });
1333
+ return this.rest.get(import_v106.Routes.guildWidgetJSON(guildId), { signal });
1273
1334
  }
1274
1335
  /**
1275
1336
  * Fetches the vanity url for a guild
@@ -1279,7 +1340,7 @@ var GuildsAPI = class {
1279
1340
  * @param options - The options for fetching the vanity url
1280
1341
  */
1281
1342
  async getVanityURL(guildId, { signal } = {}) {
1282
- return this.rest.get(import_v105.Routes.guildVanityUrl(guildId), { signal });
1343
+ return this.rest.get(import_v106.Routes.guildVanityUrl(guildId), { signal });
1283
1344
  }
1284
1345
  /**
1285
1346
  * Fetches the widget image for a guild
@@ -1290,7 +1351,7 @@ var GuildsAPI = class {
1290
1351
  * @param options - The options for fetching the widget image
1291
1352
  */
1292
1353
  async getWidgetImage(guildId, style, { signal } = {}) {
1293
- return this.rest.get(import_v105.Routes.guildWidgetImage(guildId), {
1354
+ return this.rest.get(import_v106.Routes.guildWidgetImage(guildId), {
1294
1355
  query: (0, import_rest3.makeURLSearchParams)({ style }),
1295
1356
  signal
1296
1357
  });
@@ -1303,7 +1364,7 @@ var GuildsAPI = class {
1303
1364
  * @param options - The options for fetching the welcome screen
1304
1365
  */
1305
1366
  async getWelcomeScreen(guildId, { signal } = {}) {
1306
- return this.rest.get(import_v105.Routes.guildWelcomeScreen(guildId), { signal });
1367
+ return this.rest.get(import_v106.Routes.guildWelcomeScreen(guildId), { signal });
1307
1368
  }
1308
1369
  /**
1309
1370
  * Edits the welcome screen for a guild
@@ -1314,7 +1375,7 @@ var GuildsAPI = class {
1314
1375
  * @param options - The options for editing the welcome screen
1315
1376
  */
1316
1377
  async editWelcomeScreen(guildId, body, { reason, signal } = {}) {
1317
- return this.rest.patch(import_v105.Routes.guildWelcomeScreen(guildId), {
1378
+ return this.rest.patch(import_v106.Routes.guildWelcomeScreen(guildId), {
1318
1379
  reason,
1319
1380
  body,
1320
1381
  signal
@@ -1341,7 +1402,7 @@ var GuildsAPI = class {
1341
1402
  * @param options - The options for fetching the emojis
1342
1403
  */
1343
1404
  async getEmojis(guildId, { signal } = {}) {
1344
- return this.rest.get(import_v105.Routes.guildEmojis(guildId), { signal });
1405
+ return this.rest.get(import_v106.Routes.guildEmojis(guildId), { signal });
1345
1406
  }
1346
1407
  /**
1347
1408
  * Fetches an emoji for a guild
@@ -1352,7 +1413,7 @@ var GuildsAPI = class {
1352
1413
  * @param options - The options for fetching the emoji
1353
1414
  */
1354
1415
  async getEmoji(guildId, emojiId, { signal } = {}) {
1355
- return this.rest.get(import_v105.Routes.guildEmoji(guildId, emojiId), { signal });
1416
+ return this.rest.get(import_v106.Routes.guildEmoji(guildId, emojiId), { signal });
1356
1417
  }
1357
1418
  /**
1358
1419
  * Creates a new emoji for a guild
@@ -1363,7 +1424,7 @@ var GuildsAPI = class {
1363
1424
  * @param options - The options for creating the emoji
1364
1425
  */
1365
1426
  async createEmoji(guildId, body, { reason, signal } = {}) {
1366
- return this.rest.post(import_v105.Routes.guildEmojis(guildId), {
1427
+ return this.rest.post(import_v106.Routes.guildEmojis(guildId), {
1367
1428
  reason,
1368
1429
  body,
1369
1430
  signal
@@ -1379,7 +1440,7 @@ var GuildsAPI = class {
1379
1440
  * @param options - The options for editing the emoji
1380
1441
  */
1381
1442
  async editEmoji(guildId, emojiId, body, { reason, signal } = {}) {
1382
- return this.rest.patch(import_v105.Routes.guildEmoji(guildId, emojiId), {
1443
+ return this.rest.patch(import_v106.Routes.guildEmoji(guildId, emojiId), {
1383
1444
  reason,
1384
1445
  body,
1385
1446
  signal
@@ -1394,7 +1455,7 @@ var GuildsAPI = class {
1394
1455
  * @param options - The options for deleting the emoji
1395
1456
  */
1396
1457
  async deleteEmoji(guildId, emojiId, { reason, signal } = {}) {
1397
- await this.rest.delete(import_v105.Routes.guildEmoji(guildId, emojiId), { reason, signal });
1458
+ await this.rest.delete(import_v106.Routes.guildEmoji(guildId, emojiId), { reason, signal });
1398
1459
  }
1399
1460
  /**
1400
1461
  * Fetches all scheduled events for a guild
@@ -1405,7 +1466,7 @@ var GuildsAPI = class {
1405
1466
  * @param options - The options for fetching the scheduled events
1406
1467
  */
1407
1468
  async getScheduledEvents(guildId, query = {}, { signal } = {}) {
1408
- return this.rest.get(import_v105.Routes.guildScheduledEvents(guildId), {
1469
+ return this.rest.get(import_v106.Routes.guildScheduledEvents(guildId), {
1409
1470
  query: (0, import_rest3.makeURLSearchParams)(query),
1410
1471
  signal
1411
1472
  });
@@ -1419,7 +1480,7 @@ var GuildsAPI = class {
1419
1480
  * @param options - The options for creating the scheduled event
1420
1481
  */
1421
1482
  async createScheduledEvent(guildId, body, { reason, signal } = {}) {
1422
- return this.rest.post(import_v105.Routes.guildScheduledEvents(guildId), {
1483
+ return this.rest.post(import_v106.Routes.guildScheduledEvents(guildId), {
1423
1484
  reason,
1424
1485
  body,
1425
1486
  signal
@@ -1435,7 +1496,7 @@ var GuildsAPI = class {
1435
1496
  * @param options - The options for fetching the scheduled event
1436
1497
  */
1437
1498
  async getScheduledEvent(guildId, eventId, query = {}, { signal } = {}) {
1438
- return this.rest.get(import_v105.Routes.guildScheduledEvent(guildId, eventId), {
1499
+ return this.rest.get(import_v106.Routes.guildScheduledEvent(guildId, eventId), {
1439
1500
  query: (0, import_rest3.makeURLSearchParams)(query),
1440
1501
  signal
1441
1502
  });
@@ -1450,7 +1511,7 @@ var GuildsAPI = class {
1450
1511
  * @param options - The options for editing the scheduled event
1451
1512
  */
1452
1513
  async editScheduledEvent(guildId, eventId, body, { reason, signal } = {}) {
1453
- return this.rest.patch(import_v105.Routes.guildScheduledEvent(guildId, eventId), {
1514
+ return this.rest.patch(import_v106.Routes.guildScheduledEvent(guildId, eventId), {
1454
1515
  reason,
1455
1516
  body,
1456
1517
  signal
@@ -1465,7 +1526,7 @@ var GuildsAPI = class {
1465
1526
  * @param options - The options for deleting the scheduled event
1466
1527
  */
1467
1528
  async deleteScheduledEvent(guildId, eventId, { reason, signal } = {}) {
1468
- await this.rest.delete(import_v105.Routes.guildScheduledEvent(guildId, eventId), { reason, signal });
1529
+ await this.rest.delete(import_v106.Routes.guildScheduledEvent(guildId, eventId), { reason, signal });
1469
1530
  }
1470
1531
  /**
1471
1532
  * Gets all users that are interested in a scheduled event
@@ -1477,7 +1538,7 @@ var GuildsAPI = class {
1477
1538
  * @param options - The options for fetching the scheduled event users
1478
1539
  */
1479
1540
  async getScheduledEventUsers(guildId, eventId, query = {}, { signal } = {}) {
1480
- return this.rest.get(import_v105.Routes.guildScheduledEventUsers(guildId, eventId), {
1541
+ return this.rest.get(import_v106.Routes.guildScheduledEventUsers(guildId, eventId), {
1481
1542
  query: (0, import_rest3.makeURLSearchParams)(query),
1482
1543
  signal
1483
1544
  });
@@ -1490,7 +1551,7 @@ var GuildsAPI = class {
1490
1551
  * @param options - The options for fetching the templates
1491
1552
  */
1492
1553
  async getTemplates(guildId, { signal } = {}) {
1493
- return this.rest.get(import_v105.Routes.guildTemplates(guildId), { signal });
1554
+ return this.rest.get(import_v106.Routes.guildTemplates(guildId), { signal });
1494
1555
  }
1495
1556
  /**
1496
1557
  * Syncs a template for a guild
@@ -1501,7 +1562,7 @@ var GuildsAPI = class {
1501
1562
  * @param options - The options for syncing the template
1502
1563
  */
1503
1564
  async syncTemplate(guildId, templateCode, { signal } = {}) {
1504
- return this.rest.put(import_v105.Routes.guildTemplate(guildId, templateCode), {
1565
+ return this.rest.put(import_v106.Routes.guildTemplate(guildId, templateCode), {
1505
1566
  signal
1506
1567
  });
1507
1568
  }
@@ -1515,7 +1576,7 @@ var GuildsAPI = class {
1515
1576
  * @param options - The options for editing the template
1516
1577
  */
1517
1578
  async editTemplate(guildId, templateCode, body, { signal } = {}) {
1518
- return this.rest.patch(import_v105.Routes.guildTemplate(guildId, templateCode), {
1579
+ return this.rest.patch(import_v106.Routes.guildTemplate(guildId, templateCode), {
1519
1580
  body,
1520
1581
  signal
1521
1582
  });
@@ -1529,7 +1590,7 @@ var GuildsAPI = class {
1529
1590
  * @param options - The options for deleting the template
1530
1591
  */
1531
1592
  async deleteTemplate(guildId, templateCode, { signal } = {}) {
1532
- await this.rest.delete(import_v105.Routes.guildTemplate(guildId, templateCode), { signal });
1593
+ await this.rest.delete(import_v106.Routes.guildTemplate(guildId, templateCode), { signal });
1533
1594
  }
1534
1595
  /**
1535
1596
  * Fetches all the stickers for a guild
@@ -1539,7 +1600,7 @@ var GuildsAPI = class {
1539
1600
  * @param options - The options for fetching the stickers
1540
1601
  */
1541
1602
  async getStickers(guildId, { signal } = {}) {
1542
- return this.rest.get(import_v105.Routes.guildStickers(guildId), { signal });
1603
+ return this.rest.get(import_v106.Routes.guildStickers(guildId), { signal });
1543
1604
  }
1544
1605
  /**
1545
1606
  * Fetches a sticker for a guild
@@ -1550,7 +1611,7 @@ var GuildsAPI = class {
1550
1611
  * @param options - The options for fetching the sticker
1551
1612
  */
1552
1613
  async getSticker(guildId, stickerId, { signal } = {}) {
1553
- return this.rest.get(import_v105.Routes.guildSticker(guildId, stickerId), { signal });
1614
+ return this.rest.get(import_v106.Routes.guildSticker(guildId, stickerId), { signal });
1554
1615
  }
1555
1616
  /**
1556
1617
  * Creates a sticker for a guild
@@ -1562,7 +1623,7 @@ var GuildsAPI = class {
1562
1623
  */
1563
1624
  async createSticker(guildId, { file, ...body }, { reason, signal } = {}) {
1564
1625
  const fileData = { ...file, key: "file" };
1565
- return this.rest.post(import_v105.Routes.guildStickers(guildId), {
1626
+ return this.rest.post(import_v106.Routes.guildStickers(guildId), {
1566
1627
  appendToFormData: true,
1567
1628
  body,
1568
1629
  files: [fileData],
@@ -1580,7 +1641,7 @@ var GuildsAPI = class {
1580
1641
  * @param options - The options for editing the sticker
1581
1642
  */
1582
1643
  async editSticker(guildId, stickerId, body, { reason, signal } = {}) {
1583
- return this.rest.patch(import_v105.Routes.guildSticker(guildId, stickerId), {
1644
+ return this.rest.patch(import_v106.Routes.guildSticker(guildId, stickerId), {
1584
1645
  reason,
1585
1646
  body,
1586
1647
  signal
@@ -1595,7 +1656,7 @@ var GuildsAPI = class {
1595
1656
  * @param options - The options for deleting the sticker
1596
1657
  */
1597
1658
  async deleteSticker(guildId, stickerId, { reason, signal } = {}) {
1598
- await this.rest.delete(import_v105.Routes.guildSticker(guildId, stickerId), { reason, signal });
1659
+ await this.rest.delete(import_v106.Routes.guildSticker(guildId, stickerId), { reason, signal });
1599
1660
  }
1600
1661
  /**
1601
1662
  * Fetches the audit logs for a guild
@@ -1606,7 +1667,7 @@ var GuildsAPI = class {
1606
1667
  * @param options - The options for fetching the audit logs
1607
1668
  */
1608
1669
  async getAuditLogs(guildId, query = {}, { signal } = {}) {
1609
- return this.rest.get(import_v105.Routes.guildAuditLog(guildId), {
1670
+ return this.rest.get(import_v106.Routes.guildAuditLog(guildId), {
1610
1671
  query: (0, import_rest3.makeURLSearchParams)(query),
1611
1672
  signal
1612
1673
  });
@@ -1619,7 +1680,7 @@ var GuildsAPI = class {
1619
1680
  * @param options - The options for fetching the auto moderation rules
1620
1681
  */
1621
1682
  async getAutoModerationRules(guildId, { signal } = {}) {
1622
- return this.rest.get(import_v105.Routes.guildAutoModerationRules(guildId), {
1683
+ return this.rest.get(import_v106.Routes.guildAutoModerationRules(guildId), {
1623
1684
  signal
1624
1685
  });
1625
1686
  }
@@ -1632,7 +1693,7 @@ var GuildsAPI = class {
1632
1693
  * @param options - The options for fetching the auto moderation rule
1633
1694
  */
1634
1695
  async getAutoModerationRule(guildId, ruleId, { signal } = {}) {
1635
- return this.rest.get(import_v105.Routes.guildAutoModerationRule(guildId, ruleId), {
1696
+ return this.rest.get(import_v106.Routes.guildAutoModerationRule(guildId, ruleId), {
1636
1697
  signal
1637
1698
  });
1638
1699
  }
@@ -1645,7 +1706,7 @@ var GuildsAPI = class {
1645
1706
  * @param options - The options for creating the auto moderation rule
1646
1707
  */
1647
1708
  async createAutoModerationRule(guildId, body, { reason, signal } = {}) {
1648
- return this.rest.post(import_v105.Routes.guildAutoModerationRules(guildId), {
1709
+ return this.rest.post(import_v106.Routes.guildAutoModerationRules(guildId), {
1649
1710
  reason,
1650
1711
  body,
1651
1712
  signal
@@ -1661,7 +1722,7 @@ var GuildsAPI = class {
1661
1722
  * @param options - The options for editing the auto moderation rule
1662
1723
  */
1663
1724
  async editAutoModerationRule(guildId, ruleId, body, { reason, signal } = {}) {
1664
- return this.rest.patch(import_v105.Routes.guildAutoModerationRule(guildId, ruleId), {
1725
+ return this.rest.patch(import_v106.Routes.guildAutoModerationRule(guildId, ruleId), {
1665
1726
  reason,
1666
1727
  body,
1667
1728
  signal
@@ -1676,7 +1737,7 @@ var GuildsAPI = class {
1676
1737
  * @param options - The options for deleting the auto moderation rule
1677
1738
  */
1678
1739
  async deleteAutoModerationRule(guildId, ruleId, { reason, signal } = {}) {
1679
- await this.rest.delete(import_v105.Routes.guildAutoModerationRule(guildId, ruleId), { reason, signal });
1740
+ await this.rest.delete(import_v106.Routes.guildAutoModerationRule(guildId, ruleId), { reason, signal });
1680
1741
  }
1681
1742
  /**
1682
1743
  * Fetches a guild member
@@ -1687,7 +1748,7 @@ var GuildsAPI = class {
1687
1748
  * @param options - The options for fetching the guild member
1688
1749
  */
1689
1750
  async getMember(guildId, userId, { signal } = {}) {
1690
- return this.rest.get(import_v105.Routes.guildMember(guildId, userId), { signal });
1751
+ return this.rest.get(import_v106.Routes.guildMember(guildId, userId), { signal });
1691
1752
  }
1692
1753
  /**
1693
1754
  * Searches for guild members
@@ -1698,7 +1759,7 @@ var GuildsAPI = class {
1698
1759
  * @param options - The options for searching for guild members
1699
1760
  */
1700
1761
  async searchForMembers(guildId, query, { signal } = {}) {
1701
- return this.rest.get(import_v105.Routes.guildMembersSearch(guildId), {
1762
+ return this.rest.get(import_v106.Routes.guildMembersSearch(guildId), {
1702
1763
  query: (0, import_rest3.makeURLSearchParams)(query),
1703
1764
  signal
1704
1765
  });
@@ -1713,7 +1774,7 @@ var GuildsAPI = class {
1713
1774
  * @param options - The options for editing the guild member
1714
1775
  */
1715
1776
  async editMember(guildId, userId, body = {}, { reason, signal } = {}) {
1716
- return this.rest.patch(import_v105.Routes.guildMember(guildId, userId), {
1777
+ return this.rest.patch(import_v106.Routes.guildMember(guildId, userId), {
1717
1778
  reason,
1718
1779
  body,
1719
1780
  signal
@@ -1728,7 +1789,7 @@ var GuildsAPI = class {
1728
1789
  * @param options - The options for removing the guild member
1729
1790
  */
1730
1791
  async removeMember(guildId, userId, { reason, signal } = {}) {
1731
- return this.rest.delete(import_v105.Routes.guildMember(guildId, userId), { reason, signal });
1792
+ return this.rest.delete(import_v106.Routes.guildMember(guildId, userId), { reason, signal });
1732
1793
  }
1733
1794
  /**
1734
1795
  * Adds a role to a guild member
@@ -1740,7 +1801,7 @@ var GuildsAPI = class {
1740
1801
  * @param options - The options for adding a role to a guild member
1741
1802
  */
1742
1803
  async addRoleToMember(guildId, userId, roleId, { reason, signal } = {}) {
1743
- await this.rest.put(import_v105.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1804
+ await this.rest.put(import_v106.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1744
1805
  }
1745
1806
  /**
1746
1807
  * Removes a role from a guild member
@@ -1752,7 +1813,7 @@ var GuildsAPI = class {
1752
1813
  * @param options - The options for removing a role from a guild member
1753
1814
  */
1754
1815
  async removeRoleFromMember(guildId, userId, roleId, { reason, signal } = {}) {
1755
- await this.rest.delete(import_v105.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1816
+ await this.rest.delete(import_v106.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1756
1817
  }
1757
1818
  /**
1758
1819
  * Fetches a guild template
@@ -1762,7 +1823,7 @@ var GuildsAPI = class {
1762
1823
  * @param options - The options for fetching the guild template
1763
1824
  */
1764
1825
  async getTemplate(templateCode, { signal } = {}) {
1765
- return this.rest.get(import_v105.Routes.template(templateCode), { signal });
1826
+ return this.rest.get(import_v106.Routes.template(templateCode), { signal });
1766
1827
  }
1767
1828
  /**
1768
1829
  * Creates a new template
@@ -1773,7 +1834,7 @@ var GuildsAPI = class {
1773
1834
  * @param options - The options for creating the template
1774
1835
  */
1775
1836
  async createTemplate(guildId, body, { signal } = {}) {
1776
- return this.rest.post(import_v105.Routes.guildTemplates(guildId), { body, signal });
1837
+ return this.rest.post(import_v106.Routes.guildTemplates(guildId), { body, signal });
1777
1838
  }
1778
1839
  /**
1779
1840
  * Fetches webhooks for a guild
@@ -1782,7 +1843,7 @@ var GuildsAPI = class {
1782
1843
  * @param id - The id of the guild
1783
1844
  */
1784
1845
  async getWebhooks(id) {
1785
- return this.rest.get(import_v105.Routes.guildWebhooks(id));
1846
+ return this.rest.get(import_v106.Routes.guildWebhooks(id));
1786
1847
  }
1787
1848
  /**
1788
1849
  * Sets the voice state for the current user
@@ -1804,7 +1865,7 @@ var GuildsAPI = class {
1804
1865
  * @param options - The options for fetching the guild onboarding
1805
1866
  */
1806
1867
  async getOnboarding(guildId, { signal } = {}) {
1807
- return this.rest.get(import_v105.Routes.guildOnboarding(guildId), { signal });
1868
+ return this.rest.get(import_v106.Routes.guildOnboarding(guildId), { signal });
1808
1869
  }
1809
1870
  /**
1810
1871
  * Edits a guild onboarding
@@ -1815,16 +1876,30 @@ var GuildsAPI = class {
1815
1876
  * @param options - The options for editing the guild onboarding
1816
1877
  */
1817
1878
  async editOnboarding(guildId, body, { reason, signal } = {}) {
1818
- return this.rest.put(import_v105.Routes.guildOnboarding(guildId), {
1879
+ return this.rest.put(import_v106.Routes.guildOnboarding(guildId), {
1819
1880
  reason,
1820
1881
  body,
1821
1882
  signal
1822
1883
  });
1823
1884
  }
1885
+ /**
1886
+ * Modifies incident actions for a guild.
1887
+ *
1888
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
1889
+ * @param guildId - The id of the guild
1890
+ * @param body - The data for modifying guild incident actions
1891
+ * @param options - The options for modifying guild incident actions
1892
+ */
1893
+ async editIncidentActions(guildId, body, { signal } = {}) {
1894
+ return this.rest.put(import_v106.Routes.guildIncidentActions(guildId), {
1895
+ body,
1896
+ signal
1897
+ });
1898
+ }
1824
1899
  };
1825
1900
 
1826
1901
  // src/api/interactions.ts
1827
- var import_v106 = require("discord-api-types/v10");
1902
+ var import_v107 = require("discord-api-types/v10");
1828
1903
  var InteractionsAPI = class {
1829
1904
  constructor(rest, webhooks) {
1830
1905
  this.rest = rest;
@@ -1843,11 +1918,11 @@ var InteractionsAPI = class {
1843
1918
  * @param options - The options for replying
1844
1919
  */
1845
1920
  async reply(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1846
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1921
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1847
1922
  files,
1848
1923
  auth: false,
1849
1924
  body: {
1850
- type: import_v106.InteractionResponseType.ChannelMessageWithSource,
1925
+ type: import_v107.InteractionResponseType.ChannelMessageWithSource,
1851
1926
  data
1852
1927
  },
1853
1928
  signal
@@ -1863,10 +1938,10 @@ var InteractionsAPI = class {
1863
1938
  * @param options - The options for deferring
1864
1939
  */
1865
1940
  async defer(interactionId, interactionToken, data, { signal } = {}) {
1866
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1941
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1867
1942
  auth: false,
1868
1943
  body: {
1869
- type: import_v106.InteractionResponseType.DeferredChannelMessageWithSource,
1944
+ type: import_v107.InteractionResponseType.DeferredChannelMessageWithSource,
1870
1945
  data
1871
1946
  },
1872
1947
  signal
@@ -1881,10 +1956,10 @@ var InteractionsAPI = class {
1881
1956
  * @param options - The options for deferring
1882
1957
  */
1883
1958
  async deferMessageUpdate(interactionId, interactionToken, { signal } = {}) {
1884
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1959
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1885
1960
  auth: false,
1886
1961
  body: {
1887
- type: import_v106.InteractionResponseType.DeferredMessageUpdate
1962
+ type: import_v107.InteractionResponseType.DeferredMessageUpdate
1888
1963
  },
1889
1964
  signal
1890
1965
  });
@@ -1957,11 +2032,11 @@ var InteractionsAPI = class {
1957
2032
  * @param options - The options for updating the interaction
1958
2033
  */
1959
2034
  async updateMessage(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1960
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2035
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1961
2036
  files,
1962
2037
  auth: false,
1963
2038
  body: {
1964
- type: import_v106.InteractionResponseType.UpdateMessage,
2039
+ type: import_v107.InteractionResponseType.UpdateMessage,
1965
2040
  data
1966
2041
  },
1967
2042
  signal
@@ -1977,10 +2052,10 @@ var InteractionsAPI = class {
1977
2052
  * @param options - The options for sending the autocomplete response
1978
2053
  */
1979
2054
  async createAutocompleteResponse(interactionId, interactionToken, callbackData, { signal } = {}) {
1980
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2055
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1981
2056
  auth: false,
1982
2057
  body: {
1983
- type: import_v106.InteractionResponseType.ApplicationCommandAutocompleteResult,
2058
+ type: import_v107.InteractionResponseType.ApplicationCommandAutocompleteResult,
1984
2059
  data: callbackData
1985
2060
  },
1986
2061
  signal
@@ -1996,10 +2071,10 @@ var InteractionsAPI = class {
1996
2071
  * @param options - The options for sending the modal
1997
2072
  */
1998
2073
  async createModal(interactionId, interactionToken, callbackData, { signal } = {}) {
1999
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2074
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
2000
2075
  auth: false,
2001
2076
  body: {
2002
- type: import_v106.InteractionResponseType.Modal,
2077
+ type: import_v107.InteractionResponseType.Modal,
2003
2078
  data: callbackData
2004
2079
  },
2005
2080
  signal
@@ -2015,10 +2090,10 @@ var InteractionsAPI = class {
2015
2090
  * @deprecated Sending a premium-style button is the new Discord behavior.
2016
2091
  */
2017
2092
  async sendPremiumRequired(interactionId, interactionToken, { signal } = {}) {
2018
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2093
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
2019
2094
  auth: false,
2020
2095
  body: {
2021
- type: import_v106.InteractionResponseType.PremiumRequired
2096
+ type: import_v107.InteractionResponseType.PremiumRequired
2022
2097
  },
2023
2098
  signal
2024
2099
  });
@@ -2027,7 +2102,7 @@ var InteractionsAPI = class {
2027
2102
 
2028
2103
  // src/api/invite.ts
2029
2104
  var import_rest4 = require("@discordjs/rest");
2030
- var import_v107 = require("discord-api-types/v10");
2105
+ var import_v108 = require("discord-api-types/v10");
2031
2106
  var InvitesAPI = class {
2032
2107
  constructor(rest) {
2033
2108
  this.rest = rest;
@@ -2044,7 +2119,7 @@ var InvitesAPI = class {
2044
2119
  * @param options - The options for fetching the invite
2045
2120
  */
2046
2121
  async get(code, query = {}, { signal } = {}) {
2047
- return this.rest.get(import_v107.Routes.invite(code), {
2122
+ return this.rest.get(import_v108.Routes.invite(code), {
2048
2123
  query: (0, import_rest4.makeURLSearchParams)(query),
2049
2124
  signal
2050
2125
  });
@@ -2057,13 +2132,13 @@ var InvitesAPI = class {
2057
2132
  * @param options - The options for deleting the invite
2058
2133
  */
2059
2134
  async delete(code, { reason, signal } = {}) {
2060
- await this.rest.delete(import_v107.Routes.invite(code), { reason, signal });
2135
+ await this.rest.delete(import_v108.Routes.invite(code), { reason, signal });
2061
2136
  }
2062
2137
  };
2063
2138
 
2064
2139
  // src/api/monetization.ts
2065
2140
  var import_rest5 = require("@discordjs/rest");
2066
- var import_v108 = require("discord-api-types/v10");
2141
+ var import_v109 = require("discord-api-types/v10");
2067
2142
  var MonetizationAPI = class {
2068
2143
  constructor(rest) {
2069
2144
  this.rest = rest;
@@ -2078,7 +2153,7 @@ var MonetizationAPI = class {
2078
2153
  * @param options - The options for fetching the SKUs.
2079
2154
  */
2080
2155
  async getSKUs(applicationId, { signal } = {}) {
2081
- return this.rest.get(import_v108.Routes.skus(applicationId), { signal });
2156
+ return this.rest.get(import_v109.Routes.skus(applicationId), { signal });
2082
2157
  }
2083
2158
  /**
2084
2159
  * Fetches the entitlements for an application.
@@ -2089,7 +2164,7 @@ var MonetizationAPI = class {
2089
2164
  * @param options - The options for fetching entitlements
2090
2165
  */
2091
2166
  async getEntitlements(applicationId, query, { signal } = {}) {
2092
- return this.rest.get(import_v108.Routes.entitlements(applicationId), {
2167
+ return this.rest.get(import_v109.Routes.entitlements(applicationId), {
2093
2168
  signal,
2094
2169
  query: (0, import_rest5.makeURLSearchParams)(query)
2095
2170
  });
@@ -2103,7 +2178,7 @@ var MonetizationAPI = class {
2103
2178
  * @param options - The options for creating the entitlement
2104
2179
  */
2105
2180
  async createTestEntitlement(applicationId, body, { signal } = {}) {
2106
- return this.rest.post(import_v108.Routes.entitlements(applicationId), {
2181
+ return this.rest.post(import_v109.Routes.entitlements(applicationId), {
2107
2182
  body,
2108
2183
  signal
2109
2184
  });
@@ -2117,7 +2192,7 @@ var MonetizationAPI = class {
2117
2192
  * @param options - The options for deleting the entitlement
2118
2193
  */
2119
2194
  async deleteTestEntitlement(applicationId, entitlementId, { signal } = {}) {
2120
- await this.rest.delete(import_v108.Routes.entitlement(applicationId, entitlementId), { signal });
2195
+ await this.rest.delete(import_v109.Routes.entitlement(applicationId, entitlementId), { signal });
2121
2196
  }
2122
2197
  /**
2123
2198
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
@@ -2128,13 +2203,13 @@ var MonetizationAPI = class {
2128
2203
  * @param options - The options for consuming the entitlement
2129
2204
  */
2130
2205
  async consumeEntitlement(applicationId, entitlementId, { signal } = {}) {
2131
- await this.rest.post(import_v108.Routes.consumeEntitlement(applicationId, entitlementId), { signal });
2206
+ await this.rest.post(import_v109.Routes.consumeEntitlement(applicationId, entitlementId), { signal });
2132
2207
  }
2133
2208
  };
2134
2209
 
2135
2210
  // src/api/oauth2.ts
2136
2211
  var import_rest6 = require("@discordjs/rest");
2137
- var import_v109 = require("discord-api-types/v10");
2212
+ var import_v1010 = require("discord-api-types/v10");
2138
2213
  var OAuth2API = class {
2139
2214
  constructor(rest) {
2140
2215
  this.rest = rest;
@@ -2149,7 +2224,7 @@ var OAuth2API = class {
2149
2224
  * @param options - The options for creating the authorization URL
2150
2225
  */
2151
2226
  generateAuthorizationURL(options) {
2152
- const url = new URL(`${import_v109.RouteBases.api}${import_v109.Routes.oauth2Authorization()}`);
2227
+ const url = new URL(`${import_v1010.RouteBases.api}${import_v1010.Routes.oauth2Authorization()}`);
2153
2228
  url.search = (0, import_rest6.makeURLSearchParams)(options).toString();
2154
2229
  return url.toString();
2155
2230
  }
@@ -2161,7 +2236,7 @@ var OAuth2API = class {
2161
2236
  * @param options - The options for the token exchange request
2162
2237
  */
2163
2238
  async tokenExchange(body, { signal } = {}) {
2164
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2239
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2165
2240
  body: (0, import_rest6.makeURLSearchParams)(body),
2166
2241
  passThroughBody: true,
2167
2242
  headers: {
@@ -2179,7 +2254,7 @@ var OAuth2API = class {
2179
2254
  * @param options - The options for the refresh token request
2180
2255
  */
2181
2256
  async refreshToken(body, { signal } = {}) {
2182
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2257
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2183
2258
  body: (0, import_rest6.makeURLSearchParams)(body),
2184
2259
  passThroughBody: true,
2185
2260
  headers: {
@@ -2199,7 +2274,7 @@ var OAuth2API = class {
2199
2274
  * @param options - The options for the client credentials grant request
2200
2275
  */
2201
2276
  async getToken(body, { signal } = {}) {
2202
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2277
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2203
2278
  body: (0, import_rest6.makeURLSearchParams)(body),
2204
2279
  passThroughBody: true,
2205
2280
  headers: {
@@ -2216,7 +2291,7 @@ var OAuth2API = class {
2216
2291
  * @param options - The options for the current bot application information request
2217
2292
  */
2218
2293
  async getCurrentBotApplicationInformation({ signal } = {}) {
2219
- return this.rest.get(import_v109.Routes.oauth2CurrentApplication(), {
2294
+ return this.rest.get(import_v1010.Routes.oauth2CurrentApplication(), {
2220
2295
  signal
2221
2296
  });
2222
2297
  }
@@ -2227,7 +2302,7 @@ var OAuth2API = class {
2227
2302
  * @param options - The options for the current authorization information request
2228
2303
  */
2229
2304
  async getCurrentAuthorizationInformation({ signal } = {}) {
2230
- return this.rest.get(import_v109.Routes.oauth2CurrentAuthorization(), {
2305
+ return this.rest.get(import_v1010.Routes.oauth2CurrentAuthorization(), {
2231
2306
  signal
2232
2307
  });
2233
2308
  }
@@ -2241,7 +2316,7 @@ var OAuth2API = class {
2241
2316
  * @param options - The options for the token revocation request
2242
2317
  */
2243
2318
  async revokeToken(applicationId, applicationSecret, body, { signal } = {}) {
2244
- await this.rest.post(import_v109.Routes.oauth2TokenRevocation(), {
2319
+ await this.rest.post(import_v1010.Routes.oauth2TokenRevocation(), {
2245
2320
  body: (0, import_rest6.makeURLSearchParams)(body),
2246
2321
  passThroughBody: true,
2247
2322
  headers: {
@@ -2256,7 +2331,7 @@ var OAuth2API = class {
2256
2331
 
2257
2332
  // src/api/poll.ts
2258
2333
  var import_rest7 = require("@discordjs/rest");
2259
- var import_v1010 = require("discord-api-types/v10");
2334
+ var import_v1011 = require("discord-api-types/v10");
2260
2335
  var PollAPI = class {
2261
2336
  constructor(rest) {
2262
2337
  this.rest = rest;
@@ -2275,7 +2350,7 @@ var PollAPI = class {
2275
2350
  * @param options - The options for getting the list of voters
2276
2351
  */
2277
2352
  async getAnswerVoters(channelId, messageId, answerId, query, { signal } = {}) {
2278
- return this.rest.get(import_v1010.Routes.pollAnswerVoters(channelId, messageId, answerId), {
2353
+ return this.rest.get(import_v1011.Routes.pollAnswerVoters(channelId, messageId, answerId), {
2279
2354
  signal,
2280
2355
  query: (0, import_rest7.makeURLSearchParams)(query)
2281
2356
  });
@@ -2289,14 +2364,14 @@ var PollAPI = class {
2289
2364
  * @param options - The options for expiring the poll
2290
2365
  */
2291
2366
  async expirePoll(channelId, messageId, { signal } = {}) {
2292
- return this.rest.post(import_v1010.Routes.expirePoll(channelId, messageId), {
2367
+ return this.rest.post(import_v1011.Routes.expirePoll(channelId, messageId), {
2293
2368
  signal
2294
2369
  });
2295
2370
  }
2296
2371
  };
2297
2372
 
2298
2373
  // src/api/roleConnections.ts
2299
- var import_v1011 = require("discord-api-types/v10");
2374
+ var import_v1012 = require("discord-api-types/v10");
2300
2375
  var RoleConnectionsAPI = class {
2301
2376
  constructor(rest) {
2302
2377
  this.rest = rest;
@@ -2312,7 +2387,7 @@ var RoleConnectionsAPI = class {
2312
2387
  * @param options - The options for fetching the role connection metadata records
2313
2388
  */
2314
2389
  async getMetadataRecords(applicationId, { signal } = {}) {
2315
- return this.rest.get(import_v1011.Routes.applicationRoleConnectionMetadata(applicationId), {
2390
+ return this.rest.get(import_v1012.Routes.applicationRoleConnectionMetadata(applicationId), {
2316
2391
  signal
2317
2392
  });
2318
2393
  }
@@ -2325,7 +2400,7 @@ var RoleConnectionsAPI = class {
2325
2400
  * @param options - The options for updating the role connection metadata records
2326
2401
  */
2327
2402
  async updateMetadataRecords(applicationId, body, { signal } = {}) {
2328
- return this.rest.put(import_v1011.Routes.applicationRoleConnectionMetadata(applicationId), {
2403
+ return this.rest.put(import_v1012.Routes.applicationRoleConnectionMetadata(applicationId), {
2329
2404
  body,
2330
2405
  signal
2331
2406
  });
@@ -2333,7 +2408,7 @@ var RoleConnectionsAPI = class {
2333
2408
  };
2334
2409
 
2335
2410
  // src/api/stageInstances.ts
2336
- var import_v1012 = require("discord-api-types/v10");
2411
+ var import_v1013 = require("discord-api-types/v10");
2337
2412
  var StageInstancesAPI = class {
2338
2413
  constructor(rest) {
2339
2414
  this.rest = rest;
@@ -2349,7 +2424,7 @@ var StageInstancesAPI = class {
2349
2424
  * @param options - The options for creating the new stage instance
2350
2425
  */
2351
2426
  async create(body, { reason, signal } = {}) {
2352
- return this.rest.post(import_v1012.Routes.stageInstances(), {
2427
+ return this.rest.post(import_v1013.Routes.stageInstances(), {
2353
2428
  body,
2354
2429
  reason,
2355
2430
  signal
@@ -2363,7 +2438,7 @@ var StageInstancesAPI = class {
2363
2438
  * @param options - The options for fetching the stage instance
2364
2439
  */
2365
2440
  async get(channelId, { signal } = {}) {
2366
- return this.rest.get(import_v1012.Routes.stageInstance(channelId), { signal });
2441
+ return this.rest.get(import_v1013.Routes.stageInstance(channelId), { signal });
2367
2442
  }
2368
2443
  /**
2369
2444
  * Edits a stage instance
@@ -2374,7 +2449,7 @@ var StageInstancesAPI = class {
2374
2449
  * @param options - The options for editing the stage instance
2375
2450
  */
2376
2451
  async edit(channelId, body, { reason, signal } = {}) {
2377
- return this.rest.patch(import_v1012.Routes.stageInstance(channelId), {
2452
+ return this.rest.patch(import_v1013.Routes.stageInstance(channelId), {
2378
2453
  body,
2379
2454
  reason,
2380
2455
  signal
@@ -2388,12 +2463,12 @@ var StageInstancesAPI = class {
2388
2463
  * @param options - The options for deleting the stage instance
2389
2464
  */
2390
2465
  async delete(channelId, { reason, signal } = {}) {
2391
- await this.rest.delete(import_v1012.Routes.stageInstance(channelId), { reason, signal });
2466
+ await this.rest.delete(import_v1013.Routes.stageInstance(channelId), { reason, signal });
2392
2467
  }
2393
2468
  };
2394
2469
 
2395
2470
  // src/api/sticker.ts
2396
- var import_v1013 = require("discord-api-types/v10");
2471
+ var import_v1014 = require("discord-api-types/v10");
2397
2472
  var StickersAPI = class {
2398
2473
  constructor(rest) {
2399
2474
  this.rest = rest;
@@ -2409,7 +2484,7 @@ var StickersAPI = class {
2409
2484
  * @param options - The options for fetching the sticker pack
2410
2485
  */
2411
2486
  async getStickerPack(packId, { signal } = {}) {
2412
- return this.rest.get(import_v1013.Routes.stickerPack(packId), { signal });
2487
+ return this.rest.get(import_v1014.Routes.stickerPack(packId), { signal });
2413
2488
  }
2414
2489
  /**
2415
2490
  * Fetches all of the sticker packs
@@ -2418,7 +2493,7 @@ var StickersAPI = class {
2418
2493
  * @param options - The options for fetching the sticker packs
2419
2494
  */
2420
2495
  async getStickers({ signal } = {}) {
2421
- return this.rest.get(import_v1013.Routes.stickerPacks(), { signal });
2496
+ return this.rest.get(import_v1014.Routes.stickerPacks(), { signal });
2422
2497
  }
2423
2498
  /**
2424
2499
  * Fetches all of the sticker packs
@@ -2438,12 +2513,12 @@ var StickersAPI = class {
2438
2513
  * @param options - The options for fetching the sticker
2439
2514
  */
2440
2515
  async get(stickerId, { signal } = {}) {
2441
- return this.rest.get(import_v1013.Routes.sticker(stickerId), { signal });
2516
+ return this.rest.get(import_v1014.Routes.sticker(stickerId), { signal });
2442
2517
  }
2443
2518
  };
2444
2519
 
2445
2520
  // src/api/thread.ts
2446
- var import_v1014 = require("discord-api-types/v10");
2521
+ var import_v1015 = require("discord-api-types/v10");
2447
2522
  var ThreadsAPI = class {
2448
2523
  constructor(rest) {
2449
2524
  this.rest = rest;
@@ -2459,7 +2534,7 @@ var ThreadsAPI = class {
2459
2534
  * @param options - The options for joining the thread
2460
2535
  */
2461
2536
  async join(threadId, { signal } = {}) {
2462
- await this.rest.put(import_v1014.Routes.threadMembers(threadId, "@me"), { signal });
2537
+ await this.rest.put(import_v1015.Routes.threadMembers(threadId, "@me"), { signal });
2463
2538
  }
2464
2539
  /**
2465
2540
  * Adds a member to a thread
@@ -2470,7 +2545,7 @@ var ThreadsAPI = class {
2470
2545
  * @param options - The options for adding the member to the thread
2471
2546
  */
2472
2547
  async addMember(threadId, userId, { signal } = {}) {
2473
- await this.rest.put(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2548
+ await this.rest.put(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2474
2549
  }
2475
2550
  /**
2476
2551
  * Removes the current user from a thread
@@ -2480,7 +2555,7 @@ var ThreadsAPI = class {
2480
2555
  * @param options - The options for leaving the thread
2481
2556
  */
2482
2557
  async leave(threadId, { signal } = {}) {
2483
- await this.rest.delete(import_v1014.Routes.threadMembers(threadId, "@me"), { signal });
2558
+ await this.rest.delete(import_v1015.Routes.threadMembers(threadId, "@me"), { signal });
2484
2559
  }
2485
2560
  /**
2486
2561
  * Removes a member from a thread
@@ -2491,7 +2566,7 @@ var ThreadsAPI = class {
2491
2566
  * @param options - The options for removing the member from the thread
2492
2567
  */
2493
2568
  async removeMember(threadId, userId, { signal } = {}) {
2494
- await this.rest.delete(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2569
+ await this.rest.delete(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2495
2570
  }
2496
2571
  /**
2497
2572
  * Fetches a member of a thread
@@ -2502,7 +2577,7 @@ var ThreadsAPI = class {
2502
2577
  * @param options - The options for fetching the member
2503
2578
  */
2504
2579
  async getMember(threadId, userId, { signal } = {}) {
2505
- return this.rest.get(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2580
+ return this.rest.get(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2506
2581
  }
2507
2582
  /**
2508
2583
  * Fetches all members of a thread
@@ -2512,13 +2587,13 @@ var ThreadsAPI = class {
2512
2587
  * @param options - The options for fetching the members
2513
2588
  */
2514
2589
  async getAllMembers(threadId, { signal } = {}) {
2515
- return this.rest.get(import_v1014.Routes.threadMembers(threadId), { signal });
2590
+ return this.rest.get(import_v1015.Routes.threadMembers(threadId), { signal });
2516
2591
  }
2517
2592
  };
2518
2593
 
2519
2594
  // src/api/user.ts
2520
2595
  var import_rest8 = require("@discordjs/rest");
2521
- var import_v1015 = require("discord-api-types/v10");
2596
+ var import_v1016 = require("discord-api-types/v10");
2522
2597
  var UsersAPI = class {
2523
2598
  constructor(rest) {
2524
2599
  this.rest = rest;
@@ -2534,7 +2609,7 @@ var UsersAPI = class {
2534
2609
  * @param options - The options for fetching the user
2535
2610
  */
2536
2611
  async get(userId, { signal } = {}) {
2537
- return this.rest.get(import_v1015.Routes.user(userId), { signal });
2612
+ return this.rest.get(import_v1016.Routes.user(userId), { signal });
2538
2613
  }
2539
2614
  /**
2540
2615
  * Returns the user object of the requester's account
@@ -2543,7 +2618,7 @@ var UsersAPI = class {
2543
2618
  * @param options - The options for fetching the current user
2544
2619
  */
2545
2620
  async getCurrent({ signal } = {}) {
2546
- return this.rest.get(import_v1015.Routes.user("@me"), { signal });
2621
+ return this.rest.get(import_v1016.Routes.user("@me"), { signal });
2547
2622
  }
2548
2623
  /**
2549
2624
  * Returns a list of partial guild objects the current user is a member of
@@ -2553,7 +2628,7 @@ var UsersAPI = class {
2553
2628
  * @param options - The options for fetching the guilds
2554
2629
  */
2555
2630
  async getGuilds(query = {}, { signal } = {}) {
2556
- return this.rest.get(import_v1015.Routes.userGuilds(), {
2631
+ return this.rest.get(import_v1016.Routes.userGuilds(), {
2557
2632
  query: (0, import_rest8.makeURLSearchParams)(query),
2558
2633
  signal
2559
2634
  });
@@ -2566,7 +2641,7 @@ var UsersAPI = class {
2566
2641
  * @param options - The options for leaving the guild
2567
2642
  */
2568
2643
  async leaveGuild(guildId, { signal } = {}) {
2569
- await this.rest.delete(import_v1015.Routes.userGuild(guildId), { signal });
2644
+ await this.rest.delete(import_v1016.Routes.userGuild(guildId), { signal });
2570
2645
  }
2571
2646
  /**
2572
2647
  * Edits the current user
@@ -2576,7 +2651,7 @@ var UsersAPI = class {
2576
2651
  * @param options - The options for editing the user
2577
2652
  */
2578
2653
  async edit(body, { signal } = {}) {
2579
- return this.rest.patch(import_v1015.Routes.user("@me"), { body, signal });
2654
+ return this.rest.patch(import_v1016.Routes.user("@me"), { body, signal });
2580
2655
  }
2581
2656
  /**
2582
2657
  * Fetches the guild member for the current user
@@ -2586,7 +2661,7 @@ var UsersAPI = class {
2586
2661
  * @param options - The options for fetching the guild member
2587
2662
  */
2588
2663
  async getGuildMember(guildId, { signal } = {}) {
2589
- return this.rest.get(import_v1015.Routes.userGuildMember(guildId), { signal });
2664
+ return this.rest.get(import_v1016.Routes.userGuildMember(guildId), { signal });
2590
2665
  }
2591
2666
  /**
2592
2667
  * Edits the guild member for the current user
@@ -2597,7 +2672,7 @@ var UsersAPI = class {
2597
2672
  * @param options - The options for editing the guild member
2598
2673
  */
2599
2674
  async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
2600
- return this.rest.patch(import_v1015.Routes.guildMember(guildId, "@me"), {
2675
+ return this.rest.patch(import_v1016.Routes.guildMember(guildId, "@me"), {
2601
2676
  reason,
2602
2677
  body,
2603
2678
  signal
@@ -2611,7 +2686,7 @@ var UsersAPI = class {
2611
2686
  * @param options - The options for opening the DM
2612
2687
  */
2613
2688
  async createDM(userId, { signal } = {}) {
2614
- return this.rest.post(import_v1015.Routes.userChannels(), {
2689
+ return this.rest.post(import_v1016.Routes.userChannels(), {
2615
2690
  body: { recipient_id: userId },
2616
2691
  signal
2617
2692
  });
@@ -2623,7 +2698,7 @@ var UsersAPI = class {
2623
2698
  * @param options - The options for fetching the user's connections
2624
2699
  */
2625
2700
  async getConnections({ signal } = {}) {
2626
- return this.rest.get(import_v1015.Routes.userConnections(), { signal });
2701
+ return this.rest.get(import_v1016.Routes.userConnections(), { signal });
2627
2702
  }
2628
2703
  /**
2629
2704
  * Gets the current user's active application role connection
@@ -2633,7 +2708,7 @@ var UsersAPI = class {
2633
2708
  * @param options - The options for fetching the role connections
2634
2709
  */
2635
2710
  async getApplicationRoleConnection(applicationId, { signal } = {}) {
2636
- return this.rest.get(import_v1015.Routes.userApplicationRoleConnection(applicationId), {
2711
+ return this.rest.get(import_v1016.Routes.userApplicationRoleConnection(applicationId), {
2637
2712
  signal
2638
2713
  });
2639
2714
  }
@@ -2646,7 +2721,7 @@ var UsersAPI = class {
2646
2721
  * @param options - The options for updating the application role connection
2647
2722
  */
2648
2723
  async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
2649
- return this.rest.put(import_v1015.Routes.userApplicationRoleConnection(applicationId), {
2724
+ return this.rest.put(import_v1016.Routes.userApplicationRoleConnection(applicationId), {
2650
2725
  body,
2651
2726
  signal
2652
2727
  });
@@ -2655,7 +2730,7 @@ var UsersAPI = class {
2655
2730
 
2656
2731
  // src/api/webhook.ts
2657
2732
  var import_rest9 = require("@discordjs/rest");
2658
- var import_v1016 = require("discord-api-types/v10");
2733
+ var import_v1017 = require("discord-api-types/v10");
2659
2734
  var WebhooksAPI = class {
2660
2735
  constructor(rest) {
2661
2736
  this.rest = rest;
@@ -2672,7 +2747,7 @@ var WebhooksAPI = class {
2672
2747
  * @param options - The options for fetching the webhook
2673
2748
  */
2674
2749
  async get(id, { token, signal } = {}) {
2675
- return this.rest.get(import_v1016.Routes.webhook(id, token), {
2750
+ return this.rest.get(import_v1017.Routes.webhook(id, token), {
2676
2751
  signal,
2677
2752
  auth: !token
2678
2753
  });
@@ -2687,7 +2762,7 @@ var WebhooksAPI = class {
2687
2762
  * @param options - The options for editing the webhook
2688
2763
  */
2689
2764
  async edit(id, body, { token, reason, signal } = {}) {
2690
- return this.rest.patch(import_v1016.Routes.webhook(id, token), {
2765
+ return this.rest.patch(import_v1017.Routes.webhook(id, token), {
2691
2766
  reason,
2692
2767
  body,
2693
2768
  signal,
@@ -2703,7 +2778,7 @@ var WebhooksAPI = class {
2703
2778
  * @param options - The options for deleting the webhook
2704
2779
  */
2705
2780
  async delete(id, { token, reason, signal } = {}) {
2706
- await this.rest.delete(import_v1016.Routes.webhook(id, token), {
2781
+ await this.rest.delete(import_v1017.Routes.webhook(id, token), {
2707
2782
  reason,
2708
2783
  signal,
2709
2784
  auth: !token
@@ -2725,7 +2800,7 @@ var WebhooksAPI = class {
2725
2800
  files,
2726
2801
  ...body
2727
2802
  }, { signal } = {}) {
2728
- return this.rest.post(import_v1016.Routes.webhook(id, token), {
2803
+ return this.rest.post(import_v1017.Routes.webhook(id, token), {
2729
2804
  query: (0, import_rest9.makeURLSearchParams)({ wait, thread_id, with_components }),
2730
2805
  files,
2731
2806
  body,
@@ -2745,7 +2820,7 @@ var WebhooksAPI = class {
2745
2820
  * @param options - The options for executing the webhook
2746
2821
  */
2747
2822
  async executeSlack(id, token, body, query = {}, { signal } = {}) {
2748
- await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "slack"), {
2823
+ await this.rest.post(import_v1017.Routes.webhookPlatform(id, token, "slack"), {
2749
2824
  query: (0, import_rest9.makeURLSearchParams)(query),
2750
2825
  body,
2751
2826
  auth: false,
@@ -2763,7 +2838,7 @@ var WebhooksAPI = class {
2763
2838
  * @param options - The options for executing the webhook
2764
2839
  */
2765
2840
  async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2766
- await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "github"), {
2841
+ await this.rest.post(import_v1017.Routes.webhookPlatform(id, token, "github"), {
2767
2842
  query: (0, import_rest9.makeURLSearchParams)(query),
2768
2843
  body,
2769
2844
  signal,
@@ -2781,7 +2856,7 @@ var WebhooksAPI = class {
2781
2856
  * @param options - The options for fetching the message
2782
2857
  */
2783
2858
  async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2784
- return this.rest.get(import_v1016.Routes.webhookMessage(id, token, messageId), {
2859
+ return this.rest.get(import_v1017.Routes.webhookMessage(id, token, messageId), {
2785
2860
  query: (0, import_rest9.makeURLSearchParams)(query),
2786
2861
  auth: false,
2787
2862
  signal
@@ -2803,7 +2878,7 @@ var WebhooksAPI = class {
2803
2878
  files,
2804
2879
  ...body
2805
2880
  }, { signal } = {}) {
2806
- return this.rest.patch(import_v1016.Routes.webhookMessage(id, token, messageId), {
2881
+ return this.rest.patch(import_v1017.Routes.webhookMessage(id, token, messageId), {
2807
2882
  query: (0, import_rest9.makeURLSearchParams)({ thread_id, with_components }),
2808
2883
  auth: false,
2809
2884
  body,
@@ -2822,7 +2897,7 @@ var WebhooksAPI = class {
2822
2897
  * @param options - The options for deleting the message
2823
2898
  */
2824
2899
  async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2825
- await this.rest.delete(import_v1016.Routes.webhookMessage(id, token, messageId), {
2900
+ await this.rest.delete(import_v1017.Routes.webhookMessage(id, token, messageId), {
2826
2901
  query: (0, import_rest9.makeURLSearchParams)(query),
2827
2902
  auth: false,
2828
2903
  signal
@@ -2837,6 +2912,7 @@ var API = class {
2837
2912
  this.applicationCommands = new ApplicationCommandsAPI(rest);
2838
2913
  this.applications = new ApplicationsAPI(rest);
2839
2914
  this.channels = new ChannelsAPI(rest);
2915
+ this.gateway = new GatewayAPI(rest);
2840
2916
  this.guilds = new GuildsAPI(rest);
2841
2917
  this.invites = new InvitesAPI(rest);
2842
2918
  this.monetization = new MonetizationAPI(rest);
@@ -2857,6 +2933,7 @@ var API = class {
2857
2933
  applicationCommands;
2858
2934
  applications;
2859
2935
  channels;
2936
+ gateway;
2860
2937
  guilds;
2861
2938
  interactions;
2862
2939
  invites;
@@ -2891,13 +2968,14 @@ __name(withFiles, "withFiles");
2891
2968
 
2892
2969
  // src/http-only/index.ts
2893
2970
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2894
- var version = "2.2.2";
2971
+ var version = "2.3.0";
2895
2972
  // Annotate the CommonJS export names for ESM import in node:
2896
2973
  0 && (module.exports = {
2897
2974
  API,
2898
2975
  ApplicationCommandsAPI,
2899
2976
  ApplicationsAPI,
2900
2977
  ChannelsAPI,
2978
+ GatewayAPI,
2901
2979
  GuildsAPI,
2902
2980
  InteractionsAPI,
2903
2981
  InvitesAPI,