@discordjs/core 2.2.1 → 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
  }
@@ -903,9 +964,10 @@ var GuildsAPI = class {
903
964
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
904
965
  * @param body - The guild to create
905
966
  * @param options - The options for creating the guild
967
+ * @deprecated API related to guild ownership may no longer be used.
906
968
  */
907
969
  async create(body, { signal } = {}) {
908
- return this.rest.post(import_v105.Routes.guilds(), { body, signal });
970
+ return this.rest.post(import_v106.Routes.guilds(), { body, signal });
909
971
  }
910
972
  /**
911
973
  * Edits a guild
@@ -916,7 +978,7 @@ var GuildsAPI = class {
916
978
  * @param options - The options for editing the guild
917
979
  */
918
980
  async edit(guildId, body, { reason, signal } = {}) {
919
- return this.rest.patch(import_v105.Routes.guild(guildId), {
981
+ return this.rest.patch(import_v106.Routes.guild(guildId), {
920
982
  reason,
921
983
  body,
922
984
  signal
@@ -928,9 +990,10 @@ var GuildsAPI = class {
928
990
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
929
991
  * @param guildId - The id of the guild to delete
930
992
  * @param options - The options for deleting this guild
993
+ * @deprecated API related to guild ownership may no longer be used.
931
994
  */
932
995
  async delete(guildId, { signal } = {}) {
933
- await this.rest.delete(import_v105.Routes.guild(guildId), { signal });
996
+ await this.rest.delete(import_v106.Routes.guild(guildId), { signal });
934
997
  }
935
998
  /**
936
999
  * Adds user to the guild
@@ -942,7 +1005,7 @@ var GuildsAPI = class {
942
1005
  * @param options - The options for adding users to the guild
943
1006
  */
944
1007
  async addMember(guildId, userId, body, { signal } = {}) {
945
- return this.rest.put(import_v105.Routes.guildMember(guildId, userId), {
1008
+ return this.rest.put(import_v106.Routes.guildMember(guildId, userId), {
946
1009
  body,
947
1010
  signal
948
1011
  });
@@ -956,7 +1019,7 @@ var GuildsAPI = class {
956
1019
  * @param options - The options for fetching the guild members
957
1020
  */
958
1021
  async getMembers(guildId, query = {}, { signal } = {}) {
959
- return this.rest.get(import_v105.Routes.guildMembers(guildId), {
1022
+ return this.rest.get(import_v106.Routes.guildMembers(guildId), {
960
1023
  query: (0, import_rest3.makeURLSearchParams)(query),
961
1024
  signal
962
1025
  });
@@ -969,7 +1032,7 @@ var GuildsAPI = class {
969
1032
  * @param options - The options for fetching the guild channels
970
1033
  */
971
1034
  async getChannels(guildId, { signal } = {}) {
972
- return this.rest.get(import_v105.Routes.guildChannels(guildId), {
1035
+ return this.rest.get(import_v106.Routes.guildChannels(guildId), {
973
1036
  signal
974
1037
  });
975
1038
  }
@@ -982,7 +1045,7 @@ var GuildsAPI = class {
982
1045
  * @param options - The options for creating the guild channel
983
1046
  */
984
1047
  async createChannel(guildId, body, { reason, signal } = {}) {
985
- return this.rest.post(import_v105.Routes.guildChannels(guildId), {
1048
+ return this.rest.post(import_v106.Routes.guildChannels(guildId), {
986
1049
  reason,
987
1050
  body,
988
1051
  signal
@@ -997,7 +1060,7 @@ var GuildsAPI = class {
997
1060
  * @param options - The options for editing the guild channel positions
998
1061
  */
999
1062
  async setChannelPositions(guildId, body, { reason, signal } = {}) {
1000
- 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 });
1001
1064
  }
1002
1065
  /**
1003
1066
  * Fetches the active threads in a guild
@@ -1007,7 +1070,7 @@ var GuildsAPI = class {
1007
1070
  * @param options - The options for fetching the active threads
1008
1071
  */
1009
1072
  async getActiveThreads(guildId, { signal } = {}) {
1010
- return this.rest.get(import_v105.Routes.guildActiveThreads(guildId), { signal });
1073
+ return this.rest.get(import_v106.Routes.guildActiveThreads(guildId), { signal });
1011
1074
  }
1012
1075
  /**
1013
1076
  * Fetches a guild member ban
@@ -1018,7 +1081,7 @@ var GuildsAPI = class {
1018
1081
  * @param options - The options for fetching the ban
1019
1082
  */
1020
1083
  async getMemberBan(guildId, userId, { signal } = {}) {
1021
- return this.rest.get(import_v105.Routes.guildBan(guildId, userId), { signal });
1084
+ return this.rest.get(import_v106.Routes.guildBan(guildId, userId), { signal });
1022
1085
  }
1023
1086
  /**
1024
1087
  * Fetches guild member bans
@@ -1029,7 +1092,7 @@ var GuildsAPI = class {
1029
1092
  * @param options - The options for fetching the bans
1030
1093
  */
1031
1094
  async getMemberBans(guildId, query = {}, { signal } = {}) {
1032
- return this.rest.get(import_v105.Routes.guildBans(guildId), {
1095
+ return this.rest.get(import_v106.Routes.guildBans(guildId), {
1033
1096
  query: (0, import_rest3.makeURLSearchParams)(query),
1034
1097
  signal
1035
1098
  });
@@ -1044,7 +1107,7 @@ var GuildsAPI = class {
1044
1107
  * @param options - The options for banning the user
1045
1108
  */
1046
1109
  async banUser(guildId, userId, body = {}, { reason, signal } = {}) {
1047
- 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 });
1048
1111
  }
1049
1112
  /**
1050
1113
  * Unbans a user from a guild
@@ -1055,7 +1118,7 @@ var GuildsAPI = class {
1055
1118
  * @param options - The options for unbanning the user
1056
1119
  */
1057
1120
  async unbanUser(guildId, userId, { reason, signal } = {}) {
1058
- 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 });
1059
1122
  }
1060
1123
  /**
1061
1124
  * Bulk ban users from a guild
@@ -1066,7 +1129,7 @@ var GuildsAPI = class {
1066
1129
  * @param options - The options for bulk banning users
1067
1130
  */
1068
1131
  async bulkBanUsers(guildId, body, { reason, signal } = {}) {
1069
- return this.rest.post(import_v105.Routes.guildBulkBan(guildId), {
1132
+ return this.rest.post(import_v106.Routes.guildBulkBan(guildId), {
1070
1133
  reason,
1071
1134
  body,
1072
1135
  signal
@@ -1080,7 +1143,7 @@ var GuildsAPI = class {
1080
1143
  * @param options - The options for fetching the guild roles
1081
1144
  */
1082
1145
  async getRoles(guildId, { signal } = {}) {
1083
- return this.rest.get(import_v105.Routes.guildRoles(guildId), { signal });
1146
+ return this.rest.get(import_v106.Routes.guildRoles(guildId), { signal });
1084
1147
  }
1085
1148
  /**
1086
1149
  * Get a role in a guild
@@ -1091,7 +1154,7 @@ var GuildsAPI = class {
1091
1154
  * @param options - The options for fetching the guild role
1092
1155
  */
1093
1156
  async getRole(guildId, roleId, { signal } = {}) {
1094
- return this.rest.get(import_v105.Routes.guildRole(guildId, roleId), { signal });
1157
+ return this.rest.get(import_v106.Routes.guildRole(guildId, roleId), { signal });
1095
1158
  }
1096
1159
  /**
1097
1160
  * Creates a guild role
@@ -1102,7 +1165,7 @@ var GuildsAPI = class {
1102
1165
  * @param options - The options for creating the guild role
1103
1166
  */
1104
1167
  async createRole(guildId, body, { reason, signal } = {}) {
1105
- 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 });
1106
1169
  }
1107
1170
  /**
1108
1171
  * Sets role positions in a guild
@@ -1113,7 +1176,7 @@ var GuildsAPI = class {
1113
1176
  * @param options - The options for setting role positions
1114
1177
  */
1115
1178
  async setRolePositions(guildId, body, { reason, signal } = {}) {
1116
- return this.rest.patch(import_v105.Routes.guildRoles(guildId), {
1179
+ return this.rest.patch(import_v106.Routes.guildRoles(guildId), {
1117
1180
  reason,
1118
1181
  body,
1119
1182
  signal
@@ -1129,7 +1192,7 @@ var GuildsAPI = class {
1129
1192
  * @param options - The options for editing the guild role
1130
1193
  */
1131
1194
  async editRole(guildId, roleId, body, { reason, signal } = {}) {
1132
- return this.rest.patch(import_v105.Routes.guildRole(guildId, roleId), {
1195
+ return this.rest.patch(import_v106.Routes.guildRole(guildId, roleId), {
1133
1196
  reason,
1134
1197
  body,
1135
1198
  signal
@@ -1144,7 +1207,7 @@ var GuildsAPI = class {
1144
1207
  * @param options - The options for deleting the guild role
1145
1208
  */
1146
1209
  async deleteRole(guildId, roleId, { reason, signal } = {}) {
1147
- 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 });
1148
1211
  }
1149
1212
  /**
1150
1213
  * Edits the multi-factor-authentication (MFA) level of a guild
@@ -1153,9 +1216,10 @@ var GuildsAPI = class {
1153
1216
  * @param guildId - The id of the guild to edit the MFA level for
1154
1217
  * @param level - The new MFA level
1155
1218
  * @param options - The options for editing the MFA level
1219
+ * @deprecated API related to guild ownership may no longer be used.
1156
1220
  */
1157
1221
  async editMFALevel(guildId, level, { reason, signal } = {}) {
1158
- return this.rest.post(import_v105.Routes.guildMFA(guildId), {
1222
+ return this.rest.post(import_v106.Routes.guildMFA(guildId), {
1159
1223
  reason,
1160
1224
  signal,
1161
1225
  body: { level }
@@ -1170,7 +1234,7 @@ var GuildsAPI = class {
1170
1234
  * @param options - The options for fetching the number of pruned members
1171
1235
  */
1172
1236
  async getPruneCount(guildId, query = {}, { signal } = {}) {
1173
- return this.rest.get(import_v105.Routes.guildPrune(guildId), {
1237
+ return this.rest.get(import_v106.Routes.guildPrune(guildId), {
1174
1238
  signal,
1175
1239
  query: (0, import_rest3.makeURLSearchParams)(query)
1176
1240
  });
@@ -1184,7 +1248,7 @@ var GuildsAPI = class {
1184
1248
  * @param options - The options for initiating the prune
1185
1249
  */
1186
1250
  async beginPrune(guildId, body = {}, { reason, signal } = {}) {
1187
- return this.rest.post(import_v105.Routes.guildPrune(guildId), {
1251
+ return this.rest.post(import_v106.Routes.guildPrune(guildId), {
1188
1252
  body,
1189
1253
  reason,
1190
1254
  signal
@@ -1198,7 +1262,7 @@ var GuildsAPI = class {
1198
1262
  * @param options - The options for fetching the voice regions
1199
1263
  */
1200
1264
  async getVoiceRegions(guildId, { signal } = {}) {
1201
- return this.rest.get(import_v105.Routes.guildVoiceRegions(guildId), { signal });
1265
+ return this.rest.get(import_v106.Routes.guildVoiceRegions(guildId), { signal });
1202
1266
  }
1203
1267
  /**
1204
1268
  * Fetches the invites for a guild
@@ -1208,7 +1272,7 @@ var GuildsAPI = class {
1208
1272
  * @param options - The options for fetching the invites
1209
1273
  */
1210
1274
  async getInvites(guildId, { signal } = {}) {
1211
- return this.rest.get(import_v105.Routes.guildInvites(guildId), { signal });
1275
+ return this.rest.get(import_v106.Routes.guildInvites(guildId), { signal });
1212
1276
  }
1213
1277
  /**
1214
1278
  * Fetches the integrations for a guild
@@ -1218,7 +1282,7 @@ var GuildsAPI = class {
1218
1282
  * @param options - The options for fetching the integrations
1219
1283
  */
1220
1284
  async getIntegrations(guildId, { signal } = {}) {
1221
- return this.rest.get(import_v105.Routes.guildIntegrations(guildId), { signal });
1285
+ return this.rest.get(import_v106.Routes.guildIntegrations(guildId), { signal });
1222
1286
  }
1223
1287
  /**
1224
1288
  * Deletes an integration from a guild
@@ -1229,7 +1293,7 @@ var GuildsAPI = class {
1229
1293
  * @param options - The options for deleting the integration
1230
1294
  */
1231
1295
  async deleteIntegration(guildId, integrationId, { reason, signal } = {}) {
1232
- 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 });
1233
1297
  }
1234
1298
  /**
1235
1299
  * Fetches the widget settings for a guild
@@ -1239,7 +1303,7 @@ var GuildsAPI = class {
1239
1303
  * @param options - The options for fetching the widget settings
1240
1304
  */
1241
1305
  async getWidgetSettings(guildId, { signal } = {}) {
1242
- return this.rest.get(import_v105.Routes.guildWidgetSettings(guildId), {
1306
+ return this.rest.get(import_v106.Routes.guildWidgetSettings(guildId), {
1243
1307
  signal
1244
1308
  });
1245
1309
  }
@@ -1252,7 +1316,7 @@ var GuildsAPI = class {
1252
1316
  * @param options - The options for editing the widget settings
1253
1317
  */
1254
1318
  async editWidgetSettings(guildId, body, { reason, signal } = {}) {
1255
- return this.rest.patch(import_v105.Routes.guildWidgetSettings(guildId), {
1319
+ return this.rest.patch(import_v106.Routes.guildWidgetSettings(guildId), {
1256
1320
  reason,
1257
1321
  body,
1258
1322
  signal
@@ -1266,7 +1330,7 @@ var GuildsAPI = class {
1266
1330
  * @param options - The options for fetching the widget
1267
1331
  */
1268
1332
  async getWidget(guildId, { signal } = {}) {
1269
- return this.rest.get(import_v105.Routes.guildWidgetJSON(guildId), { signal });
1333
+ return this.rest.get(import_v106.Routes.guildWidgetJSON(guildId), { signal });
1270
1334
  }
1271
1335
  /**
1272
1336
  * Fetches the vanity url for a guild
@@ -1276,7 +1340,7 @@ var GuildsAPI = class {
1276
1340
  * @param options - The options for fetching the vanity url
1277
1341
  */
1278
1342
  async getVanityURL(guildId, { signal } = {}) {
1279
- return this.rest.get(import_v105.Routes.guildVanityUrl(guildId), { signal });
1343
+ return this.rest.get(import_v106.Routes.guildVanityUrl(guildId), { signal });
1280
1344
  }
1281
1345
  /**
1282
1346
  * Fetches the widget image for a guild
@@ -1287,7 +1351,7 @@ var GuildsAPI = class {
1287
1351
  * @param options - The options for fetching the widget image
1288
1352
  */
1289
1353
  async getWidgetImage(guildId, style, { signal } = {}) {
1290
- return this.rest.get(import_v105.Routes.guildWidgetImage(guildId), {
1354
+ return this.rest.get(import_v106.Routes.guildWidgetImage(guildId), {
1291
1355
  query: (0, import_rest3.makeURLSearchParams)({ style }),
1292
1356
  signal
1293
1357
  });
@@ -1300,7 +1364,7 @@ var GuildsAPI = class {
1300
1364
  * @param options - The options for fetching the welcome screen
1301
1365
  */
1302
1366
  async getWelcomeScreen(guildId, { signal } = {}) {
1303
- return this.rest.get(import_v105.Routes.guildWelcomeScreen(guildId), { signal });
1367
+ return this.rest.get(import_v106.Routes.guildWelcomeScreen(guildId), { signal });
1304
1368
  }
1305
1369
  /**
1306
1370
  * Edits the welcome screen for a guild
@@ -1311,7 +1375,7 @@ var GuildsAPI = class {
1311
1375
  * @param options - The options for editing the welcome screen
1312
1376
  */
1313
1377
  async editWelcomeScreen(guildId, body, { reason, signal } = {}) {
1314
- return this.rest.patch(import_v105.Routes.guildWelcomeScreen(guildId), {
1378
+ return this.rest.patch(import_v106.Routes.guildWelcomeScreen(guildId), {
1315
1379
  reason,
1316
1380
  body,
1317
1381
  signal
@@ -1338,7 +1402,7 @@ var GuildsAPI = class {
1338
1402
  * @param options - The options for fetching the emojis
1339
1403
  */
1340
1404
  async getEmojis(guildId, { signal } = {}) {
1341
- return this.rest.get(import_v105.Routes.guildEmojis(guildId), { signal });
1405
+ return this.rest.get(import_v106.Routes.guildEmojis(guildId), { signal });
1342
1406
  }
1343
1407
  /**
1344
1408
  * Fetches an emoji for a guild
@@ -1349,7 +1413,7 @@ var GuildsAPI = class {
1349
1413
  * @param options - The options for fetching the emoji
1350
1414
  */
1351
1415
  async getEmoji(guildId, emojiId, { signal } = {}) {
1352
- return this.rest.get(import_v105.Routes.guildEmoji(guildId, emojiId), { signal });
1416
+ return this.rest.get(import_v106.Routes.guildEmoji(guildId, emojiId), { signal });
1353
1417
  }
1354
1418
  /**
1355
1419
  * Creates a new emoji for a guild
@@ -1360,7 +1424,7 @@ var GuildsAPI = class {
1360
1424
  * @param options - The options for creating the emoji
1361
1425
  */
1362
1426
  async createEmoji(guildId, body, { reason, signal } = {}) {
1363
- return this.rest.post(import_v105.Routes.guildEmojis(guildId), {
1427
+ return this.rest.post(import_v106.Routes.guildEmojis(guildId), {
1364
1428
  reason,
1365
1429
  body,
1366
1430
  signal
@@ -1376,7 +1440,7 @@ var GuildsAPI = class {
1376
1440
  * @param options - The options for editing the emoji
1377
1441
  */
1378
1442
  async editEmoji(guildId, emojiId, body, { reason, signal } = {}) {
1379
- return this.rest.patch(import_v105.Routes.guildEmoji(guildId, emojiId), {
1443
+ return this.rest.patch(import_v106.Routes.guildEmoji(guildId, emojiId), {
1380
1444
  reason,
1381
1445
  body,
1382
1446
  signal
@@ -1391,7 +1455,7 @@ var GuildsAPI = class {
1391
1455
  * @param options - The options for deleting the emoji
1392
1456
  */
1393
1457
  async deleteEmoji(guildId, emojiId, { reason, signal } = {}) {
1394
- 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 });
1395
1459
  }
1396
1460
  /**
1397
1461
  * Fetches all scheduled events for a guild
@@ -1402,7 +1466,7 @@ var GuildsAPI = class {
1402
1466
  * @param options - The options for fetching the scheduled events
1403
1467
  */
1404
1468
  async getScheduledEvents(guildId, query = {}, { signal } = {}) {
1405
- return this.rest.get(import_v105.Routes.guildScheduledEvents(guildId), {
1469
+ return this.rest.get(import_v106.Routes.guildScheduledEvents(guildId), {
1406
1470
  query: (0, import_rest3.makeURLSearchParams)(query),
1407
1471
  signal
1408
1472
  });
@@ -1416,7 +1480,7 @@ var GuildsAPI = class {
1416
1480
  * @param options - The options for creating the scheduled event
1417
1481
  */
1418
1482
  async createScheduledEvent(guildId, body, { reason, signal } = {}) {
1419
- return this.rest.post(import_v105.Routes.guildScheduledEvents(guildId), {
1483
+ return this.rest.post(import_v106.Routes.guildScheduledEvents(guildId), {
1420
1484
  reason,
1421
1485
  body,
1422
1486
  signal
@@ -1432,7 +1496,7 @@ var GuildsAPI = class {
1432
1496
  * @param options - The options for fetching the scheduled event
1433
1497
  */
1434
1498
  async getScheduledEvent(guildId, eventId, query = {}, { signal } = {}) {
1435
- return this.rest.get(import_v105.Routes.guildScheduledEvent(guildId, eventId), {
1499
+ return this.rest.get(import_v106.Routes.guildScheduledEvent(guildId, eventId), {
1436
1500
  query: (0, import_rest3.makeURLSearchParams)(query),
1437
1501
  signal
1438
1502
  });
@@ -1447,7 +1511,7 @@ var GuildsAPI = class {
1447
1511
  * @param options - The options for editing the scheduled event
1448
1512
  */
1449
1513
  async editScheduledEvent(guildId, eventId, body, { reason, signal } = {}) {
1450
- return this.rest.patch(import_v105.Routes.guildScheduledEvent(guildId, eventId), {
1514
+ return this.rest.patch(import_v106.Routes.guildScheduledEvent(guildId, eventId), {
1451
1515
  reason,
1452
1516
  body,
1453
1517
  signal
@@ -1462,7 +1526,7 @@ var GuildsAPI = class {
1462
1526
  * @param options - The options for deleting the scheduled event
1463
1527
  */
1464
1528
  async deleteScheduledEvent(guildId, eventId, { reason, signal } = {}) {
1465
- 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 });
1466
1530
  }
1467
1531
  /**
1468
1532
  * Gets all users that are interested in a scheduled event
@@ -1474,7 +1538,7 @@ var GuildsAPI = class {
1474
1538
  * @param options - The options for fetching the scheduled event users
1475
1539
  */
1476
1540
  async getScheduledEventUsers(guildId, eventId, query = {}, { signal } = {}) {
1477
- return this.rest.get(import_v105.Routes.guildScheduledEventUsers(guildId, eventId), {
1541
+ return this.rest.get(import_v106.Routes.guildScheduledEventUsers(guildId, eventId), {
1478
1542
  query: (0, import_rest3.makeURLSearchParams)(query),
1479
1543
  signal
1480
1544
  });
@@ -1487,7 +1551,7 @@ var GuildsAPI = class {
1487
1551
  * @param options - The options for fetching the templates
1488
1552
  */
1489
1553
  async getTemplates(guildId, { signal } = {}) {
1490
- return this.rest.get(import_v105.Routes.guildTemplates(guildId), { signal });
1554
+ return this.rest.get(import_v106.Routes.guildTemplates(guildId), { signal });
1491
1555
  }
1492
1556
  /**
1493
1557
  * Syncs a template for a guild
@@ -1498,7 +1562,7 @@ var GuildsAPI = class {
1498
1562
  * @param options - The options for syncing the template
1499
1563
  */
1500
1564
  async syncTemplate(guildId, templateCode, { signal } = {}) {
1501
- return this.rest.put(import_v105.Routes.guildTemplate(guildId, templateCode), {
1565
+ return this.rest.put(import_v106.Routes.guildTemplate(guildId, templateCode), {
1502
1566
  signal
1503
1567
  });
1504
1568
  }
@@ -1512,7 +1576,7 @@ var GuildsAPI = class {
1512
1576
  * @param options - The options for editing the template
1513
1577
  */
1514
1578
  async editTemplate(guildId, templateCode, body, { signal } = {}) {
1515
- return this.rest.patch(import_v105.Routes.guildTemplate(guildId, templateCode), {
1579
+ return this.rest.patch(import_v106.Routes.guildTemplate(guildId, templateCode), {
1516
1580
  body,
1517
1581
  signal
1518
1582
  });
@@ -1526,7 +1590,7 @@ var GuildsAPI = class {
1526
1590
  * @param options - The options for deleting the template
1527
1591
  */
1528
1592
  async deleteTemplate(guildId, templateCode, { signal } = {}) {
1529
- await this.rest.delete(import_v105.Routes.guildTemplate(guildId, templateCode), { signal });
1593
+ await this.rest.delete(import_v106.Routes.guildTemplate(guildId, templateCode), { signal });
1530
1594
  }
1531
1595
  /**
1532
1596
  * Fetches all the stickers for a guild
@@ -1536,7 +1600,7 @@ var GuildsAPI = class {
1536
1600
  * @param options - The options for fetching the stickers
1537
1601
  */
1538
1602
  async getStickers(guildId, { signal } = {}) {
1539
- return this.rest.get(import_v105.Routes.guildStickers(guildId), { signal });
1603
+ return this.rest.get(import_v106.Routes.guildStickers(guildId), { signal });
1540
1604
  }
1541
1605
  /**
1542
1606
  * Fetches a sticker for a guild
@@ -1547,7 +1611,7 @@ var GuildsAPI = class {
1547
1611
  * @param options - The options for fetching the sticker
1548
1612
  */
1549
1613
  async getSticker(guildId, stickerId, { signal } = {}) {
1550
- return this.rest.get(import_v105.Routes.guildSticker(guildId, stickerId), { signal });
1614
+ return this.rest.get(import_v106.Routes.guildSticker(guildId, stickerId), { signal });
1551
1615
  }
1552
1616
  /**
1553
1617
  * Creates a sticker for a guild
@@ -1559,7 +1623,7 @@ var GuildsAPI = class {
1559
1623
  */
1560
1624
  async createSticker(guildId, { file, ...body }, { reason, signal } = {}) {
1561
1625
  const fileData = { ...file, key: "file" };
1562
- return this.rest.post(import_v105.Routes.guildStickers(guildId), {
1626
+ return this.rest.post(import_v106.Routes.guildStickers(guildId), {
1563
1627
  appendToFormData: true,
1564
1628
  body,
1565
1629
  files: [fileData],
@@ -1577,7 +1641,7 @@ var GuildsAPI = class {
1577
1641
  * @param options - The options for editing the sticker
1578
1642
  */
1579
1643
  async editSticker(guildId, stickerId, body, { reason, signal } = {}) {
1580
- return this.rest.patch(import_v105.Routes.guildSticker(guildId, stickerId), {
1644
+ return this.rest.patch(import_v106.Routes.guildSticker(guildId, stickerId), {
1581
1645
  reason,
1582
1646
  body,
1583
1647
  signal
@@ -1592,7 +1656,7 @@ var GuildsAPI = class {
1592
1656
  * @param options - The options for deleting the sticker
1593
1657
  */
1594
1658
  async deleteSticker(guildId, stickerId, { reason, signal } = {}) {
1595
- 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 });
1596
1660
  }
1597
1661
  /**
1598
1662
  * Fetches the audit logs for a guild
@@ -1603,7 +1667,7 @@ var GuildsAPI = class {
1603
1667
  * @param options - The options for fetching the audit logs
1604
1668
  */
1605
1669
  async getAuditLogs(guildId, query = {}, { signal } = {}) {
1606
- return this.rest.get(import_v105.Routes.guildAuditLog(guildId), {
1670
+ return this.rest.get(import_v106.Routes.guildAuditLog(guildId), {
1607
1671
  query: (0, import_rest3.makeURLSearchParams)(query),
1608
1672
  signal
1609
1673
  });
@@ -1616,7 +1680,7 @@ var GuildsAPI = class {
1616
1680
  * @param options - The options for fetching the auto moderation rules
1617
1681
  */
1618
1682
  async getAutoModerationRules(guildId, { signal } = {}) {
1619
- return this.rest.get(import_v105.Routes.guildAutoModerationRules(guildId), {
1683
+ return this.rest.get(import_v106.Routes.guildAutoModerationRules(guildId), {
1620
1684
  signal
1621
1685
  });
1622
1686
  }
@@ -1629,7 +1693,7 @@ var GuildsAPI = class {
1629
1693
  * @param options - The options for fetching the auto moderation rule
1630
1694
  */
1631
1695
  async getAutoModerationRule(guildId, ruleId, { signal } = {}) {
1632
- return this.rest.get(import_v105.Routes.guildAutoModerationRule(guildId, ruleId), {
1696
+ return this.rest.get(import_v106.Routes.guildAutoModerationRule(guildId, ruleId), {
1633
1697
  signal
1634
1698
  });
1635
1699
  }
@@ -1642,7 +1706,7 @@ var GuildsAPI = class {
1642
1706
  * @param options - The options for creating the auto moderation rule
1643
1707
  */
1644
1708
  async createAutoModerationRule(guildId, body, { reason, signal } = {}) {
1645
- return this.rest.post(import_v105.Routes.guildAutoModerationRules(guildId), {
1709
+ return this.rest.post(import_v106.Routes.guildAutoModerationRules(guildId), {
1646
1710
  reason,
1647
1711
  body,
1648
1712
  signal
@@ -1658,7 +1722,7 @@ var GuildsAPI = class {
1658
1722
  * @param options - The options for editing the auto moderation rule
1659
1723
  */
1660
1724
  async editAutoModerationRule(guildId, ruleId, body, { reason, signal } = {}) {
1661
- return this.rest.patch(import_v105.Routes.guildAutoModerationRule(guildId, ruleId), {
1725
+ return this.rest.patch(import_v106.Routes.guildAutoModerationRule(guildId, ruleId), {
1662
1726
  reason,
1663
1727
  body,
1664
1728
  signal
@@ -1673,7 +1737,7 @@ var GuildsAPI = class {
1673
1737
  * @param options - The options for deleting the auto moderation rule
1674
1738
  */
1675
1739
  async deleteAutoModerationRule(guildId, ruleId, { reason, signal } = {}) {
1676
- 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 });
1677
1741
  }
1678
1742
  /**
1679
1743
  * Fetches a guild member
@@ -1684,7 +1748,7 @@ var GuildsAPI = class {
1684
1748
  * @param options - The options for fetching the guild member
1685
1749
  */
1686
1750
  async getMember(guildId, userId, { signal } = {}) {
1687
- return this.rest.get(import_v105.Routes.guildMember(guildId, userId), { signal });
1751
+ return this.rest.get(import_v106.Routes.guildMember(guildId, userId), { signal });
1688
1752
  }
1689
1753
  /**
1690
1754
  * Searches for guild members
@@ -1695,7 +1759,7 @@ var GuildsAPI = class {
1695
1759
  * @param options - The options for searching for guild members
1696
1760
  */
1697
1761
  async searchForMembers(guildId, query, { signal } = {}) {
1698
- return this.rest.get(import_v105.Routes.guildMembersSearch(guildId), {
1762
+ return this.rest.get(import_v106.Routes.guildMembersSearch(guildId), {
1699
1763
  query: (0, import_rest3.makeURLSearchParams)(query),
1700
1764
  signal
1701
1765
  });
@@ -1710,7 +1774,7 @@ var GuildsAPI = class {
1710
1774
  * @param options - The options for editing the guild member
1711
1775
  */
1712
1776
  async editMember(guildId, userId, body = {}, { reason, signal } = {}) {
1713
- return this.rest.patch(import_v105.Routes.guildMember(guildId, userId), {
1777
+ return this.rest.patch(import_v106.Routes.guildMember(guildId, userId), {
1714
1778
  reason,
1715
1779
  body,
1716
1780
  signal
@@ -1725,7 +1789,7 @@ var GuildsAPI = class {
1725
1789
  * @param options - The options for removing the guild member
1726
1790
  */
1727
1791
  async removeMember(guildId, userId, { reason, signal } = {}) {
1728
- 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 });
1729
1793
  }
1730
1794
  /**
1731
1795
  * Adds a role to a guild member
@@ -1737,7 +1801,7 @@ var GuildsAPI = class {
1737
1801
  * @param options - The options for adding a role to a guild member
1738
1802
  */
1739
1803
  async addRoleToMember(guildId, userId, roleId, { reason, signal } = {}) {
1740
- 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 });
1741
1805
  }
1742
1806
  /**
1743
1807
  * Removes a role from a guild member
@@ -1749,7 +1813,7 @@ var GuildsAPI = class {
1749
1813
  * @param options - The options for removing a role from a guild member
1750
1814
  */
1751
1815
  async removeRoleFromMember(guildId, userId, roleId, { reason, signal } = {}) {
1752
- 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 });
1753
1817
  }
1754
1818
  /**
1755
1819
  * Fetches a guild template
@@ -1759,18 +1823,18 @@ var GuildsAPI = class {
1759
1823
  * @param options - The options for fetching the guild template
1760
1824
  */
1761
1825
  async getTemplate(templateCode, { signal } = {}) {
1762
- return this.rest.get(import_v105.Routes.template(templateCode), { signal });
1826
+ return this.rest.get(import_v106.Routes.template(templateCode), { signal });
1763
1827
  }
1764
1828
  /**
1765
1829
  * Creates a new template
1766
1830
  *
1767
1831
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1768
- * @param templateCode - The code of the template
1832
+ * @param guildId - The id of the guild
1769
1833
  * @param body - The data for creating the template
1770
1834
  * @param options - The options for creating the template
1771
1835
  */
1772
- async createTemplate(templateCode, body, { signal } = {}) {
1773
- return this.rest.post(import_v105.Routes.template(templateCode), { body, signal });
1836
+ async createTemplate(guildId, body, { signal } = {}) {
1837
+ return this.rest.post(import_v106.Routes.guildTemplates(guildId), { body, signal });
1774
1838
  }
1775
1839
  /**
1776
1840
  * Fetches webhooks for a guild
@@ -1779,7 +1843,7 @@ var GuildsAPI = class {
1779
1843
  * @param id - The id of the guild
1780
1844
  */
1781
1845
  async getWebhooks(id) {
1782
- return this.rest.get(import_v105.Routes.guildWebhooks(id));
1846
+ return this.rest.get(import_v106.Routes.guildWebhooks(id));
1783
1847
  }
1784
1848
  /**
1785
1849
  * Sets the voice state for the current user
@@ -1801,7 +1865,7 @@ var GuildsAPI = class {
1801
1865
  * @param options - The options for fetching the guild onboarding
1802
1866
  */
1803
1867
  async getOnboarding(guildId, { signal } = {}) {
1804
- return this.rest.get(import_v105.Routes.guildOnboarding(guildId), { signal });
1868
+ return this.rest.get(import_v106.Routes.guildOnboarding(guildId), { signal });
1805
1869
  }
1806
1870
  /**
1807
1871
  * Edits a guild onboarding
@@ -1812,16 +1876,30 @@ var GuildsAPI = class {
1812
1876
  * @param options - The options for editing the guild onboarding
1813
1877
  */
1814
1878
  async editOnboarding(guildId, body, { reason, signal } = {}) {
1815
- return this.rest.put(import_v105.Routes.guildOnboarding(guildId), {
1879
+ return this.rest.put(import_v106.Routes.guildOnboarding(guildId), {
1816
1880
  reason,
1817
1881
  body,
1818
1882
  signal
1819
1883
  });
1820
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
+ }
1821
1899
  };
1822
1900
 
1823
1901
  // src/api/interactions.ts
1824
- var import_v106 = require("discord-api-types/v10");
1902
+ var import_v107 = require("discord-api-types/v10");
1825
1903
  var InteractionsAPI = class {
1826
1904
  constructor(rest, webhooks) {
1827
1905
  this.rest = rest;
@@ -1840,11 +1918,11 @@ var InteractionsAPI = class {
1840
1918
  * @param options - The options for replying
1841
1919
  */
1842
1920
  async reply(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1843
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1921
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1844
1922
  files,
1845
1923
  auth: false,
1846
1924
  body: {
1847
- type: import_v106.InteractionResponseType.ChannelMessageWithSource,
1925
+ type: import_v107.InteractionResponseType.ChannelMessageWithSource,
1848
1926
  data
1849
1927
  },
1850
1928
  signal
@@ -1860,10 +1938,10 @@ var InteractionsAPI = class {
1860
1938
  * @param options - The options for deferring
1861
1939
  */
1862
1940
  async defer(interactionId, interactionToken, data, { signal } = {}) {
1863
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1941
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1864
1942
  auth: false,
1865
1943
  body: {
1866
- type: import_v106.InteractionResponseType.DeferredChannelMessageWithSource,
1944
+ type: import_v107.InteractionResponseType.DeferredChannelMessageWithSource,
1867
1945
  data
1868
1946
  },
1869
1947
  signal
@@ -1878,10 +1956,10 @@ var InteractionsAPI = class {
1878
1956
  * @param options - The options for deferring
1879
1957
  */
1880
1958
  async deferMessageUpdate(interactionId, interactionToken, { signal } = {}) {
1881
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
1959
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1882
1960
  auth: false,
1883
1961
  body: {
1884
- type: import_v106.InteractionResponseType.DeferredMessageUpdate
1962
+ type: import_v107.InteractionResponseType.DeferredMessageUpdate
1885
1963
  },
1886
1964
  signal
1887
1965
  });
@@ -1954,11 +2032,11 @@ var InteractionsAPI = class {
1954
2032
  * @param options - The options for updating the interaction
1955
2033
  */
1956
2034
  async updateMessage(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1957
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2035
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1958
2036
  files,
1959
2037
  auth: false,
1960
2038
  body: {
1961
- type: import_v106.InteractionResponseType.UpdateMessage,
2039
+ type: import_v107.InteractionResponseType.UpdateMessage,
1962
2040
  data
1963
2041
  },
1964
2042
  signal
@@ -1974,10 +2052,10 @@ var InteractionsAPI = class {
1974
2052
  * @param options - The options for sending the autocomplete response
1975
2053
  */
1976
2054
  async createAutocompleteResponse(interactionId, interactionToken, callbackData, { signal } = {}) {
1977
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2055
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1978
2056
  auth: false,
1979
2057
  body: {
1980
- type: import_v106.InteractionResponseType.ApplicationCommandAutocompleteResult,
2058
+ type: import_v107.InteractionResponseType.ApplicationCommandAutocompleteResult,
1981
2059
  data: callbackData
1982
2060
  },
1983
2061
  signal
@@ -1993,10 +2071,10 @@ var InteractionsAPI = class {
1993
2071
  * @param options - The options for sending the modal
1994
2072
  */
1995
2073
  async createModal(interactionId, interactionToken, callbackData, { signal } = {}) {
1996
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2074
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
1997
2075
  auth: false,
1998
2076
  body: {
1999
- type: import_v106.InteractionResponseType.Modal,
2077
+ type: import_v107.InteractionResponseType.Modal,
2000
2078
  data: callbackData
2001
2079
  },
2002
2080
  signal
@@ -2012,10 +2090,10 @@ var InteractionsAPI = class {
2012
2090
  * @deprecated Sending a premium-style button is the new Discord behavior.
2013
2091
  */
2014
2092
  async sendPremiumRequired(interactionId, interactionToken, { signal } = {}) {
2015
- await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
2093
+ await this.rest.post(import_v107.Routes.interactionCallback(interactionId, interactionToken), {
2016
2094
  auth: false,
2017
2095
  body: {
2018
- type: import_v106.InteractionResponseType.PremiumRequired
2096
+ type: import_v107.InteractionResponseType.PremiumRequired
2019
2097
  },
2020
2098
  signal
2021
2099
  });
@@ -2024,7 +2102,7 @@ var InteractionsAPI = class {
2024
2102
 
2025
2103
  // src/api/invite.ts
2026
2104
  var import_rest4 = require("@discordjs/rest");
2027
- var import_v107 = require("discord-api-types/v10");
2105
+ var import_v108 = require("discord-api-types/v10");
2028
2106
  var InvitesAPI = class {
2029
2107
  constructor(rest) {
2030
2108
  this.rest = rest;
@@ -2041,7 +2119,7 @@ var InvitesAPI = class {
2041
2119
  * @param options - The options for fetching the invite
2042
2120
  */
2043
2121
  async get(code, query = {}, { signal } = {}) {
2044
- return this.rest.get(import_v107.Routes.invite(code), {
2122
+ return this.rest.get(import_v108.Routes.invite(code), {
2045
2123
  query: (0, import_rest4.makeURLSearchParams)(query),
2046
2124
  signal
2047
2125
  });
@@ -2054,13 +2132,13 @@ var InvitesAPI = class {
2054
2132
  * @param options - The options for deleting the invite
2055
2133
  */
2056
2134
  async delete(code, { reason, signal } = {}) {
2057
- await this.rest.delete(import_v107.Routes.invite(code), { reason, signal });
2135
+ await this.rest.delete(import_v108.Routes.invite(code), { reason, signal });
2058
2136
  }
2059
2137
  };
2060
2138
 
2061
2139
  // src/api/monetization.ts
2062
2140
  var import_rest5 = require("@discordjs/rest");
2063
- var import_v108 = require("discord-api-types/v10");
2141
+ var import_v109 = require("discord-api-types/v10");
2064
2142
  var MonetizationAPI = class {
2065
2143
  constructor(rest) {
2066
2144
  this.rest = rest;
@@ -2075,7 +2153,7 @@ var MonetizationAPI = class {
2075
2153
  * @param options - The options for fetching the SKUs.
2076
2154
  */
2077
2155
  async getSKUs(applicationId, { signal } = {}) {
2078
- return this.rest.get(import_v108.Routes.skus(applicationId), { signal });
2156
+ return this.rest.get(import_v109.Routes.skus(applicationId), { signal });
2079
2157
  }
2080
2158
  /**
2081
2159
  * Fetches the entitlements for an application.
@@ -2086,7 +2164,7 @@ var MonetizationAPI = class {
2086
2164
  * @param options - The options for fetching entitlements
2087
2165
  */
2088
2166
  async getEntitlements(applicationId, query, { signal } = {}) {
2089
- return this.rest.get(import_v108.Routes.entitlements(applicationId), {
2167
+ return this.rest.get(import_v109.Routes.entitlements(applicationId), {
2090
2168
  signal,
2091
2169
  query: (0, import_rest5.makeURLSearchParams)(query)
2092
2170
  });
@@ -2100,7 +2178,7 @@ var MonetizationAPI = class {
2100
2178
  * @param options - The options for creating the entitlement
2101
2179
  */
2102
2180
  async createTestEntitlement(applicationId, body, { signal } = {}) {
2103
- return this.rest.post(import_v108.Routes.entitlements(applicationId), {
2181
+ return this.rest.post(import_v109.Routes.entitlements(applicationId), {
2104
2182
  body,
2105
2183
  signal
2106
2184
  });
@@ -2114,7 +2192,7 @@ var MonetizationAPI = class {
2114
2192
  * @param options - The options for deleting the entitlement
2115
2193
  */
2116
2194
  async deleteTestEntitlement(applicationId, entitlementId, { signal } = {}) {
2117
- await this.rest.delete(import_v108.Routes.entitlement(applicationId, entitlementId), { signal });
2195
+ await this.rest.delete(import_v109.Routes.entitlement(applicationId, entitlementId), { signal });
2118
2196
  }
2119
2197
  /**
2120
2198
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
@@ -2125,13 +2203,13 @@ var MonetizationAPI = class {
2125
2203
  * @param options - The options for consuming the entitlement
2126
2204
  */
2127
2205
  async consumeEntitlement(applicationId, entitlementId, { signal } = {}) {
2128
- await this.rest.post(import_v108.Routes.consumeEntitlement(applicationId, entitlementId), { signal });
2206
+ await this.rest.post(import_v109.Routes.consumeEntitlement(applicationId, entitlementId), { signal });
2129
2207
  }
2130
2208
  };
2131
2209
 
2132
2210
  // src/api/oauth2.ts
2133
2211
  var import_rest6 = require("@discordjs/rest");
2134
- var import_v109 = require("discord-api-types/v10");
2212
+ var import_v1010 = require("discord-api-types/v10");
2135
2213
  var OAuth2API = class {
2136
2214
  constructor(rest) {
2137
2215
  this.rest = rest;
@@ -2146,7 +2224,7 @@ var OAuth2API = class {
2146
2224
  * @param options - The options for creating the authorization URL
2147
2225
  */
2148
2226
  generateAuthorizationURL(options) {
2149
- 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()}`);
2150
2228
  url.search = (0, import_rest6.makeURLSearchParams)(options).toString();
2151
2229
  return url.toString();
2152
2230
  }
@@ -2158,7 +2236,7 @@ var OAuth2API = class {
2158
2236
  * @param options - The options for the token exchange request
2159
2237
  */
2160
2238
  async tokenExchange(body, { signal } = {}) {
2161
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2239
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2162
2240
  body: (0, import_rest6.makeURLSearchParams)(body),
2163
2241
  passThroughBody: true,
2164
2242
  headers: {
@@ -2176,7 +2254,7 @@ var OAuth2API = class {
2176
2254
  * @param options - The options for the refresh token request
2177
2255
  */
2178
2256
  async refreshToken(body, { signal } = {}) {
2179
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2257
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2180
2258
  body: (0, import_rest6.makeURLSearchParams)(body),
2181
2259
  passThroughBody: true,
2182
2260
  headers: {
@@ -2196,7 +2274,7 @@ var OAuth2API = class {
2196
2274
  * @param options - The options for the client credentials grant request
2197
2275
  */
2198
2276
  async getToken(body, { signal } = {}) {
2199
- return this.rest.post(import_v109.Routes.oauth2TokenExchange(), {
2277
+ return this.rest.post(import_v1010.Routes.oauth2TokenExchange(), {
2200
2278
  body: (0, import_rest6.makeURLSearchParams)(body),
2201
2279
  passThroughBody: true,
2202
2280
  headers: {
@@ -2213,7 +2291,7 @@ var OAuth2API = class {
2213
2291
  * @param options - The options for the current bot application information request
2214
2292
  */
2215
2293
  async getCurrentBotApplicationInformation({ signal } = {}) {
2216
- return this.rest.get(import_v109.Routes.oauth2CurrentApplication(), {
2294
+ return this.rest.get(import_v1010.Routes.oauth2CurrentApplication(), {
2217
2295
  signal
2218
2296
  });
2219
2297
  }
@@ -2224,7 +2302,7 @@ var OAuth2API = class {
2224
2302
  * @param options - The options for the current authorization information request
2225
2303
  */
2226
2304
  async getCurrentAuthorizationInformation({ signal } = {}) {
2227
- return this.rest.get(import_v109.Routes.oauth2CurrentAuthorization(), {
2305
+ return this.rest.get(import_v1010.Routes.oauth2CurrentAuthorization(), {
2228
2306
  signal
2229
2307
  });
2230
2308
  }
@@ -2238,7 +2316,7 @@ var OAuth2API = class {
2238
2316
  * @param options - The options for the token revocation request
2239
2317
  */
2240
2318
  async revokeToken(applicationId, applicationSecret, body, { signal } = {}) {
2241
- await this.rest.post(import_v109.Routes.oauth2TokenRevocation(), {
2319
+ await this.rest.post(import_v1010.Routes.oauth2TokenRevocation(), {
2242
2320
  body: (0, import_rest6.makeURLSearchParams)(body),
2243
2321
  passThroughBody: true,
2244
2322
  headers: {
@@ -2253,7 +2331,7 @@ var OAuth2API = class {
2253
2331
 
2254
2332
  // src/api/poll.ts
2255
2333
  var import_rest7 = require("@discordjs/rest");
2256
- var import_v1010 = require("discord-api-types/v10");
2334
+ var import_v1011 = require("discord-api-types/v10");
2257
2335
  var PollAPI = class {
2258
2336
  constructor(rest) {
2259
2337
  this.rest = rest;
@@ -2272,7 +2350,7 @@ var PollAPI = class {
2272
2350
  * @param options - The options for getting the list of voters
2273
2351
  */
2274
2352
  async getAnswerVoters(channelId, messageId, answerId, query, { signal } = {}) {
2275
- return this.rest.get(import_v1010.Routes.pollAnswerVoters(channelId, messageId, answerId), {
2353
+ return this.rest.get(import_v1011.Routes.pollAnswerVoters(channelId, messageId, answerId), {
2276
2354
  signal,
2277
2355
  query: (0, import_rest7.makeURLSearchParams)(query)
2278
2356
  });
@@ -2286,14 +2364,14 @@ var PollAPI = class {
2286
2364
  * @param options - The options for expiring the poll
2287
2365
  */
2288
2366
  async expirePoll(channelId, messageId, { signal } = {}) {
2289
- return this.rest.post(import_v1010.Routes.expirePoll(channelId, messageId), {
2367
+ return this.rest.post(import_v1011.Routes.expirePoll(channelId, messageId), {
2290
2368
  signal
2291
2369
  });
2292
2370
  }
2293
2371
  };
2294
2372
 
2295
2373
  // src/api/roleConnections.ts
2296
- var import_v1011 = require("discord-api-types/v10");
2374
+ var import_v1012 = require("discord-api-types/v10");
2297
2375
  var RoleConnectionsAPI = class {
2298
2376
  constructor(rest) {
2299
2377
  this.rest = rest;
@@ -2309,7 +2387,7 @@ var RoleConnectionsAPI = class {
2309
2387
  * @param options - The options for fetching the role connection metadata records
2310
2388
  */
2311
2389
  async getMetadataRecords(applicationId, { signal } = {}) {
2312
- return this.rest.get(import_v1011.Routes.applicationRoleConnectionMetadata(applicationId), {
2390
+ return this.rest.get(import_v1012.Routes.applicationRoleConnectionMetadata(applicationId), {
2313
2391
  signal
2314
2392
  });
2315
2393
  }
@@ -2322,7 +2400,7 @@ var RoleConnectionsAPI = class {
2322
2400
  * @param options - The options for updating the role connection metadata records
2323
2401
  */
2324
2402
  async updateMetadataRecords(applicationId, body, { signal } = {}) {
2325
- return this.rest.put(import_v1011.Routes.applicationRoleConnectionMetadata(applicationId), {
2403
+ return this.rest.put(import_v1012.Routes.applicationRoleConnectionMetadata(applicationId), {
2326
2404
  body,
2327
2405
  signal
2328
2406
  });
@@ -2330,7 +2408,7 @@ var RoleConnectionsAPI = class {
2330
2408
  };
2331
2409
 
2332
2410
  // src/api/stageInstances.ts
2333
- var import_v1012 = require("discord-api-types/v10");
2411
+ var import_v1013 = require("discord-api-types/v10");
2334
2412
  var StageInstancesAPI = class {
2335
2413
  constructor(rest) {
2336
2414
  this.rest = rest;
@@ -2346,7 +2424,7 @@ var StageInstancesAPI = class {
2346
2424
  * @param options - The options for creating the new stage instance
2347
2425
  */
2348
2426
  async create(body, { reason, signal } = {}) {
2349
- return this.rest.post(import_v1012.Routes.stageInstances(), {
2427
+ return this.rest.post(import_v1013.Routes.stageInstances(), {
2350
2428
  body,
2351
2429
  reason,
2352
2430
  signal
@@ -2360,7 +2438,7 @@ var StageInstancesAPI = class {
2360
2438
  * @param options - The options for fetching the stage instance
2361
2439
  */
2362
2440
  async get(channelId, { signal } = {}) {
2363
- return this.rest.get(import_v1012.Routes.stageInstance(channelId), { signal });
2441
+ return this.rest.get(import_v1013.Routes.stageInstance(channelId), { signal });
2364
2442
  }
2365
2443
  /**
2366
2444
  * Edits a stage instance
@@ -2371,7 +2449,7 @@ var StageInstancesAPI = class {
2371
2449
  * @param options - The options for editing the stage instance
2372
2450
  */
2373
2451
  async edit(channelId, body, { reason, signal } = {}) {
2374
- return this.rest.patch(import_v1012.Routes.stageInstance(channelId), {
2452
+ return this.rest.patch(import_v1013.Routes.stageInstance(channelId), {
2375
2453
  body,
2376
2454
  reason,
2377
2455
  signal
@@ -2385,12 +2463,12 @@ var StageInstancesAPI = class {
2385
2463
  * @param options - The options for deleting the stage instance
2386
2464
  */
2387
2465
  async delete(channelId, { reason, signal } = {}) {
2388
- await this.rest.delete(import_v1012.Routes.stageInstance(channelId), { reason, signal });
2466
+ await this.rest.delete(import_v1013.Routes.stageInstance(channelId), { reason, signal });
2389
2467
  }
2390
2468
  };
2391
2469
 
2392
2470
  // src/api/sticker.ts
2393
- var import_v1013 = require("discord-api-types/v10");
2471
+ var import_v1014 = require("discord-api-types/v10");
2394
2472
  var StickersAPI = class {
2395
2473
  constructor(rest) {
2396
2474
  this.rest = rest;
@@ -2406,7 +2484,7 @@ var StickersAPI = class {
2406
2484
  * @param options - The options for fetching the sticker pack
2407
2485
  */
2408
2486
  async getStickerPack(packId, { signal } = {}) {
2409
- return this.rest.get(import_v1013.Routes.stickerPack(packId), { signal });
2487
+ return this.rest.get(import_v1014.Routes.stickerPack(packId), { signal });
2410
2488
  }
2411
2489
  /**
2412
2490
  * Fetches all of the sticker packs
@@ -2415,7 +2493,7 @@ var StickersAPI = class {
2415
2493
  * @param options - The options for fetching the sticker packs
2416
2494
  */
2417
2495
  async getStickers({ signal } = {}) {
2418
- return this.rest.get(import_v1013.Routes.stickerPacks(), { signal });
2496
+ return this.rest.get(import_v1014.Routes.stickerPacks(), { signal });
2419
2497
  }
2420
2498
  /**
2421
2499
  * Fetches all of the sticker packs
@@ -2435,12 +2513,12 @@ var StickersAPI = class {
2435
2513
  * @param options - The options for fetching the sticker
2436
2514
  */
2437
2515
  async get(stickerId, { signal } = {}) {
2438
- return this.rest.get(import_v1013.Routes.sticker(stickerId), { signal });
2516
+ return this.rest.get(import_v1014.Routes.sticker(stickerId), { signal });
2439
2517
  }
2440
2518
  };
2441
2519
 
2442
2520
  // src/api/thread.ts
2443
- var import_v1014 = require("discord-api-types/v10");
2521
+ var import_v1015 = require("discord-api-types/v10");
2444
2522
  var ThreadsAPI = class {
2445
2523
  constructor(rest) {
2446
2524
  this.rest = rest;
@@ -2456,7 +2534,7 @@ var ThreadsAPI = class {
2456
2534
  * @param options - The options for joining the thread
2457
2535
  */
2458
2536
  async join(threadId, { signal } = {}) {
2459
- await this.rest.put(import_v1014.Routes.threadMembers(threadId, "@me"), { signal });
2537
+ await this.rest.put(import_v1015.Routes.threadMembers(threadId, "@me"), { signal });
2460
2538
  }
2461
2539
  /**
2462
2540
  * Adds a member to a thread
@@ -2467,7 +2545,7 @@ var ThreadsAPI = class {
2467
2545
  * @param options - The options for adding the member to the thread
2468
2546
  */
2469
2547
  async addMember(threadId, userId, { signal } = {}) {
2470
- await this.rest.put(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2548
+ await this.rest.put(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2471
2549
  }
2472
2550
  /**
2473
2551
  * Removes the current user from a thread
@@ -2477,7 +2555,7 @@ var ThreadsAPI = class {
2477
2555
  * @param options - The options for leaving the thread
2478
2556
  */
2479
2557
  async leave(threadId, { signal } = {}) {
2480
- await this.rest.delete(import_v1014.Routes.threadMembers(threadId, "@me"), { signal });
2558
+ await this.rest.delete(import_v1015.Routes.threadMembers(threadId, "@me"), { signal });
2481
2559
  }
2482
2560
  /**
2483
2561
  * Removes a member from a thread
@@ -2488,7 +2566,7 @@ var ThreadsAPI = class {
2488
2566
  * @param options - The options for removing the member from the thread
2489
2567
  */
2490
2568
  async removeMember(threadId, userId, { signal } = {}) {
2491
- await this.rest.delete(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2569
+ await this.rest.delete(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2492
2570
  }
2493
2571
  /**
2494
2572
  * Fetches a member of a thread
@@ -2499,7 +2577,7 @@ var ThreadsAPI = class {
2499
2577
  * @param options - The options for fetching the member
2500
2578
  */
2501
2579
  async getMember(threadId, userId, { signal } = {}) {
2502
- return this.rest.get(import_v1014.Routes.threadMembers(threadId, userId), { signal });
2580
+ return this.rest.get(import_v1015.Routes.threadMembers(threadId, userId), { signal });
2503
2581
  }
2504
2582
  /**
2505
2583
  * Fetches all members of a thread
@@ -2509,13 +2587,13 @@ var ThreadsAPI = class {
2509
2587
  * @param options - The options for fetching the members
2510
2588
  */
2511
2589
  async getAllMembers(threadId, { signal } = {}) {
2512
- return this.rest.get(import_v1014.Routes.threadMembers(threadId), { signal });
2590
+ return this.rest.get(import_v1015.Routes.threadMembers(threadId), { signal });
2513
2591
  }
2514
2592
  };
2515
2593
 
2516
2594
  // src/api/user.ts
2517
2595
  var import_rest8 = require("@discordjs/rest");
2518
- var import_v1015 = require("discord-api-types/v10");
2596
+ var import_v1016 = require("discord-api-types/v10");
2519
2597
  var UsersAPI = class {
2520
2598
  constructor(rest) {
2521
2599
  this.rest = rest;
@@ -2531,7 +2609,7 @@ var UsersAPI = class {
2531
2609
  * @param options - The options for fetching the user
2532
2610
  */
2533
2611
  async get(userId, { signal } = {}) {
2534
- return this.rest.get(import_v1015.Routes.user(userId), { signal });
2612
+ return this.rest.get(import_v1016.Routes.user(userId), { signal });
2535
2613
  }
2536
2614
  /**
2537
2615
  * Returns the user object of the requester's account
@@ -2540,7 +2618,7 @@ var UsersAPI = class {
2540
2618
  * @param options - The options for fetching the current user
2541
2619
  */
2542
2620
  async getCurrent({ signal } = {}) {
2543
- return this.rest.get(import_v1015.Routes.user("@me"), { signal });
2621
+ return this.rest.get(import_v1016.Routes.user("@me"), { signal });
2544
2622
  }
2545
2623
  /**
2546
2624
  * Returns a list of partial guild objects the current user is a member of
@@ -2550,7 +2628,7 @@ var UsersAPI = class {
2550
2628
  * @param options - The options for fetching the guilds
2551
2629
  */
2552
2630
  async getGuilds(query = {}, { signal } = {}) {
2553
- return this.rest.get(import_v1015.Routes.userGuilds(), {
2631
+ return this.rest.get(import_v1016.Routes.userGuilds(), {
2554
2632
  query: (0, import_rest8.makeURLSearchParams)(query),
2555
2633
  signal
2556
2634
  });
@@ -2563,7 +2641,7 @@ var UsersAPI = class {
2563
2641
  * @param options - The options for leaving the guild
2564
2642
  */
2565
2643
  async leaveGuild(guildId, { signal } = {}) {
2566
- await this.rest.delete(import_v1015.Routes.userGuild(guildId), { signal });
2644
+ await this.rest.delete(import_v1016.Routes.userGuild(guildId), { signal });
2567
2645
  }
2568
2646
  /**
2569
2647
  * Edits the current user
@@ -2573,7 +2651,7 @@ var UsersAPI = class {
2573
2651
  * @param options - The options for editing the user
2574
2652
  */
2575
2653
  async edit(body, { signal } = {}) {
2576
- return this.rest.patch(import_v1015.Routes.user("@me"), { body, signal });
2654
+ return this.rest.patch(import_v1016.Routes.user("@me"), { body, signal });
2577
2655
  }
2578
2656
  /**
2579
2657
  * Fetches the guild member for the current user
@@ -2583,7 +2661,7 @@ var UsersAPI = class {
2583
2661
  * @param options - The options for fetching the guild member
2584
2662
  */
2585
2663
  async getGuildMember(guildId, { signal } = {}) {
2586
- return this.rest.get(import_v1015.Routes.userGuildMember(guildId), { signal });
2664
+ return this.rest.get(import_v1016.Routes.userGuildMember(guildId), { signal });
2587
2665
  }
2588
2666
  /**
2589
2667
  * Edits the guild member for the current user
@@ -2594,7 +2672,7 @@ var UsersAPI = class {
2594
2672
  * @param options - The options for editing the guild member
2595
2673
  */
2596
2674
  async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
2597
- return this.rest.patch(import_v1015.Routes.guildMember(guildId, "@me"), {
2675
+ return this.rest.patch(import_v1016.Routes.guildMember(guildId, "@me"), {
2598
2676
  reason,
2599
2677
  body,
2600
2678
  signal
@@ -2608,7 +2686,7 @@ var UsersAPI = class {
2608
2686
  * @param options - The options for opening the DM
2609
2687
  */
2610
2688
  async createDM(userId, { signal } = {}) {
2611
- return this.rest.post(import_v1015.Routes.userChannels(), {
2689
+ return this.rest.post(import_v1016.Routes.userChannels(), {
2612
2690
  body: { recipient_id: userId },
2613
2691
  signal
2614
2692
  });
@@ -2620,7 +2698,7 @@ var UsersAPI = class {
2620
2698
  * @param options - The options for fetching the user's connections
2621
2699
  */
2622
2700
  async getConnections({ signal } = {}) {
2623
- return this.rest.get(import_v1015.Routes.userConnections(), { signal });
2701
+ return this.rest.get(import_v1016.Routes.userConnections(), { signal });
2624
2702
  }
2625
2703
  /**
2626
2704
  * Gets the current user's active application role connection
@@ -2630,7 +2708,7 @@ var UsersAPI = class {
2630
2708
  * @param options - The options for fetching the role connections
2631
2709
  */
2632
2710
  async getApplicationRoleConnection(applicationId, { signal } = {}) {
2633
- return this.rest.get(import_v1015.Routes.userApplicationRoleConnection(applicationId), {
2711
+ return this.rest.get(import_v1016.Routes.userApplicationRoleConnection(applicationId), {
2634
2712
  signal
2635
2713
  });
2636
2714
  }
@@ -2643,7 +2721,7 @@ var UsersAPI = class {
2643
2721
  * @param options - The options for updating the application role connection
2644
2722
  */
2645
2723
  async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
2646
- return this.rest.put(import_v1015.Routes.userApplicationRoleConnection(applicationId), {
2724
+ return this.rest.put(import_v1016.Routes.userApplicationRoleConnection(applicationId), {
2647
2725
  body,
2648
2726
  signal
2649
2727
  });
@@ -2652,7 +2730,7 @@ var UsersAPI = class {
2652
2730
 
2653
2731
  // src/api/webhook.ts
2654
2732
  var import_rest9 = require("@discordjs/rest");
2655
- var import_v1016 = require("discord-api-types/v10");
2733
+ var import_v1017 = require("discord-api-types/v10");
2656
2734
  var WebhooksAPI = class {
2657
2735
  constructor(rest) {
2658
2736
  this.rest = rest;
@@ -2669,7 +2747,7 @@ var WebhooksAPI = class {
2669
2747
  * @param options - The options for fetching the webhook
2670
2748
  */
2671
2749
  async get(id, { token, signal } = {}) {
2672
- return this.rest.get(import_v1016.Routes.webhook(id, token), {
2750
+ return this.rest.get(import_v1017.Routes.webhook(id, token), {
2673
2751
  signal,
2674
2752
  auth: !token
2675
2753
  });
@@ -2684,7 +2762,7 @@ var WebhooksAPI = class {
2684
2762
  * @param options - The options for editing the webhook
2685
2763
  */
2686
2764
  async edit(id, body, { token, reason, signal } = {}) {
2687
- return this.rest.patch(import_v1016.Routes.webhook(id, token), {
2765
+ return this.rest.patch(import_v1017.Routes.webhook(id, token), {
2688
2766
  reason,
2689
2767
  body,
2690
2768
  signal,
@@ -2700,7 +2778,7 @@ var WebhooksAPI = class {
2700
2778
  * @param options - The options for deleting the webhook
2701
2779
  */
2702
2780
  async delete(id, { token, reason, signal } = {}) {
2703
- await this.rest.delete(import_v1016.Routes.webhook(id, token), {
2781
+ await this.rest.delete(import_v1017.Routes.webhook(id, token), {
2704
2782
  reason,
2705
2783
  signal,
2706
2784
  auth: !token
@@ -2722,7 +2800,7 @@ var WebhooksAPI = class {
2722
2800
  files,
2723
2801
  ...body
2724
2802
  }, { signal } = {}) {
2725
- return this.rest.post(import_v1016.Routes.webhook(id, token), {
2803
+ return this.rest.post(import_v1017.Routes.webhook(id, token), {
2726
2804
  query: (0, import_rest9.makeURLSearchParams)({ wait, thread_id, with_components }),
2727
2805
  files,
2728
2806
  body,
@@ -2742,7 +2820,7 @@ var WebhooksAPI = class {
2742
2820
  * @param options - The options for executing the webhook
2743
2821
  */
2744
2822
  async executeSlack(id, token, body, query = {}, { signal } = {}) {
2745
- await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "slack"), {
2823
+ await this.rest.post(import_v1017.Routes.webhookPlatform(id, token, "slack"), {
2746
2824
  query: (0, import_rest9.makeURLSearchParams)(query),
2747
2825
  body,
2748
2826
  auth: false,
@@ -2760,7 +2838,7 @@ var WebhooksAPI = class {
2760
2838
  * @param options - The options for executing the webhook
2761
2839
  */
2762
2840
  async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2763
- await this.rest.post(import_v1016.Routes.webhookPlatform(id, token, "github"), {
2841
+ await this.rest.post(import_v1017.Routes.webhookPlatform(id, token, "github"), {
2764
2842
  query: (0, import_rest9.makeURLSearchParams)(query),
2765
2843
  body,
2766
2844
  signal,
@@ -2778,7 +2856,7 @@ var WebhooksAPI = class {
2778
2856
  * @param options - The options for fetching the message
2779
2857
  */
2780
2858
  async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2781
- return this.rest.get(import_v1016.Routes.webhookMessage(id, token, messageId), {
2859
+ return this.rest.get(import_v1017.Routes.webhookMessage(id, token, messageId), {
2782
2860
  query: (0, import_rest9.makeURLSearchParams)(query),
2783
2861
  auth: false,
2784
2862
  signal
@@ -2800,7 +2878,7 @@ var WebhooksAPI = class {
2800
2878
  files,
2801
2879
  ...body
2802
2880
  }, { signal } = {}) {
2803
- return this.rest.patch(import_v1016.Routes.webhookMessage(id, token, messageId), {
2881
+ return this.rest.patch(import_v1017.Routes.webhookMessage(id, token, messageId), {
2804
2882
  query: (0, import_rest9.makeURLSearchParams)({ thread_id, with_components }),
2805
2883
  auth: false,
2806
2884
  body,
@@ -2819,7 +2897,7 @@ var WebhooksAPI = class {
2819
2897
  * @param options - The options for deleting the message
2820
2898
  */
2821
2899
  async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2822
- await this.rest.delete(import_v1016.Routes.webhookMessage(id, token, messageId), {
2900
+ await this.rest.delete(import_v1017.Routes.webhookMessage(id, token, messageId), {
2823
2901
  query: (0, import_rest9.makeURLSearchParams)(query),
2824
2902
  auth: false,
2825
2903
  signal
@@ -2834,6 +2912,7 @@ var API = class {
2834
2912
  this.applicationCommands = new ApplicationCommandsAPI(rest);
2835
2913
  this.applications = new ApplicationsAPI(rest);
2836
2914
  this.channels = new ChannelsAPI(rest);
2915
+ this.gateway = new GatewayAPI(rest);
2837
2916
  this.guilds = new GuildsAPI(rest);
2838
2917
  this.invites = new InvitesAPI(rest);
2839
2918
  this.monetization = new MonetizationAPI(rest);
@@ -2854,6 +2933,7 @@ var API = class {
2854
2933
  applicationCommands;
2855
2934
  applications;
2856
2935
  channels;
2936
+ gateway;
2857
2937
  guilds;
2858
2938
  interactions;
2859
2939
  invites;
@@ -2888,13 +2968,14 @@ __name(withFiles, "withFiles");
2888
2968
 
2889
2969
  // src/http-only/index.ts
2890
2970
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2891
- var version = "2.2.1";
2971
+ var version = "2.3.0";
2892
2972
  // Annotate the CommonJS export names for ESM import in node:
2893
2973
  0 && (module.exports = {
2894
2974
  API,
2895
2975
  ApplicationCommandsAPI,
2896
2976
  ApplicationsAPI,
2897
2977
  ChannelsAPI,
2978
+ GatewayAPI,
2898
2979
  GuildsAPI,
2899
2980
  InteractionsAPI,
2900
2981
  InvitesAPI,