@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/index.mjs CHANGED
@@ -753,17 +753,77 @@ var ChannelsAPI = class {
753
753
  signal
754
754
  });
755
755
  }
756
+ /**
757
+ * Adds a recipient to a group DM channel
758
+ *
759
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
760
+ * @param channelId - The id of the channel to add the recipient to
761
+ * @param userId - The id of the user to add as a recipient
762
+ * @param body - The data for adding the recipient
763
+ * @param options - The options for adding the recipient
764
+ */
765
+ async addGroupDMRecipient(channelId, userId, body, { signal } = {}) {
766
+ await this.rest.put(Routes3.channelRecipient(channelId, userId), {
767
+ body,
768
+ signal
769
+ });
770
+ }
771
+ /**
772
+ * Removes a recipient from a group DM channel
773
+ *
774
+ * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient}
775
+ * @param channelId - The id of the channel to remove the recipient from
776
+ * @param userId - The id of the user to remove as a recipient
777
+ * @param options - The options for removing the recipient
778
+ */
779
+ async removeGroupDMRecipient(channelId, userId, { signal } = {}) {
780
+ await this.rest.delete(Routes3.channelRecipient(channelId, userId), {
781
+ signal
782
+ });
783
+ }
784
+ };
785
+
786
+ // src/api/gateway.ts
787
+ import { Routes as Routes4 } from "discord-api-types/v10";
788
+ var GatewayAPI = class {
789
+ constructor(rest) {
790
+ this.rest = rest;
791
+ }
792
+ static {
793
+ __name(this, "GatewayAPI");
794
+ }
795
+ /**
796
+ * Gets gateway information.
797
+ *
798
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway}
799
+ * @param options - The options for fetching the gateway information
800
+ */
801
+ async get({ signal } = {}) {
802
+ return this.rest.get(Routes4.gateway(), {
803
+ auth: false,
804
+ signal
805
+ });
806
+ }
807
+ /**
808
+ * Gets gateway information with additional metadata.
809
+ *
810
+ * @see {@link https://discord.com/developers/docs/events/gateway#get-gateway-bot}
811
+ * @param options - The options for fetching the gateway information
812
+ */
813
+ async getBot({ signal } = {}) {
814
+ return this.rest.get(Routes4.gatewayBot(), { signal });
815
+ }
756
816
  };
757
817
 
758
818
  // src/api/guild.ts
759
819
  import { makeURLSearchParams as makeURLSearchParams3 } from "@discordjs/rest";
760
820
  import {
761
- Routes as Routes5
821
+ Routes as Routes6
762
822
  } from "discord-api-types/v10";
763
823
 
764
824
  // src/api/voice.ts
765
825
  import {
766
- Routes as Routes4
826
+ Routes as Routes5
767
827
  } from "discord-api-types/v10";
768
828
  var VoiceAPI = class {
769
829
  constructor(rest) {
@@ -779,7 +839,7 @@ var VoiceAPI = class {
779
839
  * @param options - The options for fetching the voice regions
780
840
  */
781
841
  async getVoiceRegions({ signal } = {}) {
782
- return this.rest.get(Routes4.voiceRegions(), { signal });
842
+ return this.rest.get(Routes5.voiceRegions(), { signal });
783
843
  }
784
844
  /**
785
845
  * Fetches voice state of a user by their id
@@ -788,7 +848,7 @@ var VoiceAPI = class {
788
848
  * @param options - The options for fetching user voice state
789
849
  */
790
850
  async getUserVoiceState(guildId, userId, { signal } = {}) {
791
- return this.rest.get(Routes4.guildVoiceState(guildId, userId), {
851
+ return this.rest.get(Routes5.guildVoiceState(guildId, userId), {
792
852
  signal
793
853
  });
794
854
  }
@@ -799,7 +859,7 @@ var VoiceAPI = class {
799
859
  * @param options - The options for fetching user voice state
800
860
  */
801
861
  async getVoiceState(guildId, { signal } = {}) {
802
- return this.rest.get(Routes4.guildVoiceState(guildId, "@me"), {
862
+ return this.rest.get(Routes5.guildVoiceState(guildId, "@me"), {
803
863
  signal
804
864
  });
805
865
  }
@@ -813,7 +873,7 @@ var VoiceAPI = class {
813
873
  * @param options - The options for editing the voice state
814
874
  */
815
875
  async editUserVoiceState(guildId, userId, body, { reason, signal } = {}) {
816
- return this.rest.patch(Routes4.guildVoiceState(guildId, userId), {
876
+ return this.rest.patch(Routes5.guildVoiceState(guildId, userId), {
817
877
  reason,
818
878
  body,
819
879
  signal
@@ -828,7 +888,7 @@ var VoiceAPI = class {
828
888
  * @param options - The options for editing the voice state
829
889
  */
830
890
  async editVoiceState(guildId, body = {}, { signal } = {}) {
831
- return this.rest.patch(Routes4.guildVoiceState(guildId, "@me"), {
891
+ return this.rest.patch(Routes5.guildVoiceState(guildId, "@me"), {
832
892
  body,
833
893
  signal
834
894
  });
@@ -850,7 +910,7 @@ var GuildsAPI = class {
850
910
  if ("with_counts" in queryOrOptions) {
851
911
  requestData.query = makeURLSearchParams3(queryOrOptions);
852
912
  }
853
- return this.rest.get(Routes5.guild(guildId), requestData);
913
+ return this.rest.get(Routes6.guild(guildId), requestData);
854
914
  }
855
915
  /**
856
916
  * Fetches a guild preview
@@ -860,7 +920,7 @@ var GuildsAPI = class {
860
920
  * @param options - The options for fetching the guild preview
861
921
  */
862
922
  async getPreview(guildId, { signal } = {}) {
863
- return this.rest.get(Routes5.guildPreview(guildId), {
923
+ return this.rest.get(Routes6.guildPreview(guildId), {
864
924
  signal
865
925
  });
866
926
  }
@@ -870,9 +930,10 @@ var GuildsAPI = class {
870
930
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
871
931
  * @param body - The guild to create
872
932
  * @param options - The options for creating the guild
933
+ * @deprecated API related to guild ownership may no longer be used.
873
934
  */
874
935
  async create(body, { signal } = {}) {
875
- return this.rest.post(Routes5.guilds(), { body, signal });
936
+ return this.rest.post(Routes6.guilds(), { body, signal });
876
937
  }
877
938
  /**
878
939
  * Edits a guild
@@ -883,7 +944,7 @@ var GuildsAPI = class {
883
944
  * @param options - The options for editing the guild
884
945
  */
885
946
  async edit(guildId, body, { reason, signal } = {}) {
886
- return this.rest.patch(Routes5.guild(guildId), {
947
+ return this.rest.patch(Routes6.guild(guildId), {
887
948
  reason,
888
949
  body,
889
950
  signal
@@ -895,9 +956,10 @@ var GuildsAPI = class {
895
956
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
896
957
  * @param guildId - The id of the guild to delete
897
958
  * @param options - The options for deleting this guild
959
+ * @deprecated API related to guild ownership may no longer be used.
898
960
  */
899
961
  async delete(guildId, { signal } = {}) {
900
- await this.rest.delete(Routes5.guild(guildId), { signal });
962
+ await this.rest.delete(Routes6.guild(guildId), { signal });
901
963
  }
902
964
  /**
903
965
  * Adds user to the guild
@@ -909,7 +971,7 @@ var GuildsAPI = class {
909
971
  * @param options - The options for adding users to the guild
910
972
  */
911
973
  async addMember(guildId, userId, body, { signal } = {}) {
912
- return this.rest.put(Routes5.guildMember(guildId, userId), {
974
+ return this.rest.put(Routes6.guildMember(guildId, userId), {
913
975
  body,
914
976
  signal
915
977
  });
@@ -923,7 +985,7 @@ var GuildsAPI = class {
923
985
  * @param options - The options for fetching the guild members
924
986
  */
925
987
  async getMembers(guildId, query = {}, { signal } = {}) {
926
- return this.rest.get(Routes5.guildMembers(guildId), {
988
+ return this.rest.get(Routes6.guildMembers(guildId), {
927
989
  query: makeURLSearchParams3(query),
928
990
  signal
929
991
  });
@@ -936,7 +998,7 @@ var GuildsAPI = class {
936
998
  * @param options - The options for fetching the guild channels
937
999
  */
938
1000
  async getChannels(guildId, { signal } = {}) {
939
- return this.rest.get(Routes5.guildChannels(guildId), {
1001
+ return this.rest.get(Routes6.guildChannels(guildId), {
940
1002
  signal
941
1003
  });
942
1004
  }
@@ -949,7 +1011,7 @@ var GuildsAPI = class {
949
1011
  * @param options - The options for creating the guild channel
950
1012
  */
951
1013
  async createChannel(guildId, body, { reason, signal } = {}) {
952
- return this.rest.post(Routes5.guildChannels(guildId), {
1014
+ return this.rest.post(Routes6.guildChannels(guildId), {
953
1015
  reason,
954
1016
  body,
955
1017
  signal
@@ -964,7 +1026,7 @@ var GuildsAPI = class {
964
1026
  * @param options - The options for editing the guild channel positions
965
1027
  */
966
1028
  async setChannelPositions(guildId, body, { reason, signal } = {}) {
967
- await this.rest.patch(Routes5.guildChannels(guildId), { reason, body, signal });
1029
+ await this.rest.patch(Routes6.guildChannels(guildId), { reason, body, signal });
968
1030
  }
969
1031
  /**
970
1032
  * Fetches the active threads in a guild
@@ -974,7 +1036,7 @@ var GuildsAPI = class {
974
1036
  * @param options - The options for fetching the active threads
975
1037
  */
976
1038
  async getActiveThreads(guildId, { signal } = {}) {
977
- return this.rest.get(Routes5.guildActiveThreads(guildId), { signal });
1039
+ return this.rest.get(Routes6.guildActiveThreads(guildId), { signal });
978
1040
  }
979
1041
  /**
980
1042
  * Fetches a guild member ban
@@ -985,7 +1047,7 @@ var GuildsAPI = class {
985
1047
  * @param options - The options for fetching the ban
986
1048
  */
987
1049
  async getMemberBan(guildId, userId, { signal } = {}) {
988
- return this.rest.get(Routes5.guildBan(guildId, userId), { signal });
1050
+ return this.rest.get(Routes6.guildBan(guildId, userId), { signal });
989
1051
  }
990
1052
  /**
991
1053
  * Fetches guild member bans
@@ -996,7 +1058,7 @@ var GuildsAPI = class {
996
1058
  * @param options - The options for fetching the bans
997
1059
  */
998
1060
  async getMemberBans(guildId, query = {}, { signal } = {}) {
999
- return this.rest.get(Routes5.guildBans(guildId), {
1061
+ return this.rest.get(Routes6.guildBans(guildId), {
1000
1062
  query: makeURLSearchParams3(query),
1001
1063
  signal
1002
1064
  });
@@ -1011,7 +1073,7 @@ var GuildsAPI = class {
1011
1073
  * @param options - The options for banning the user
1012
1074
  */
1013
1075
  async banUser(guildId, userId, body = {}, { reason, signal } = {}) {
1014
- await this.rest.put(Routes5.guildBan(guildId, userId), { reason, body, signal });
1076
+ await this.rest.put(Routes6.guildBan(guildId, userId), { reason, body, signal });
1015
1077
  }
1016
1078
  /**
1017
1079
  * Unbans a user from a guild
@@ -1022,7 +1084,7 @@ var GuildsAPI = class {
1022
1084
  * @param options - The options for unbanning the user
1023
1085
  */
1024
1086
  async unbanUser(guildId, userId, { reason, signal } = {}) {
1025
- await this.rest.delete(Routes5.guildBan(guildId, userId), { reason, signal });
1087
+ await this.rest.delete(Routes6.guildBan(guildId, userId), { reason, signal });
1026
1088
  }
1027
1089
  /**
1028
1090
  * Bulk ban users from a guild
@@ -1033,7 +1095,7 @@ var GuildsAPI = class {
1033
1095
  * @param options - The options for bulk banning users
1034
1096
  */
1035
1097
  async bulkBanUsers(guildId, body, { reason, signal } = {}) {
1036
- return this.rest.post(Routes5.guildBulkBan(guildId), {
1098
+ return this.rest.post(Routes6.guildBulkBan(guildId), {
1037
1099
  reason,
1038
1100
  body,
1039
1101
  signal
@@ -1047,7 +1109,7 @@ var GuildsAPI = class {
1047
1109
  * @param options - The options for fetching the guild roles
1048
1110
  */
1049
1111
  async getRoles(guildId, { signal } = {}) {
1050
- return this.rest.get(Routes5.guildRoles(guildId), { signal });
1112
+ return this.rest.get(Routes6.guildRoles(guildId), { signal });
1051
1113
  }
1052
1114
  /**
1053
1115
  * Get a role in a guild
@@ -1058,7 +1120,7 @@ var GuildsAPI = class {
1058
1120
  * @param options - The options for fetching the guild role
1059
1121
  */
1060
1122
  async getRole(guildId, roleId, { signal } = {}) {
1061
- return this.rest.get(Routes5.guildRole(guildId, roleId), { signal });
1123
+ return this.rest.get(Routes6.guildRole(guildId, roleId), { signal });
1062
1124
  }
1063
1125
  /**
1064
1126
  * Creates a guild role
@@ -1069,7 +1131,7 @@ var GuildsAPI = class {
1069
1131
  * @param options - The options for creating the guild role
1070
1132
  */
1071
1133
  async createRole(guildId, body, { reason, signal } = {}) {
1072
- return this.rest.post(Routes5.guildRoles(guildId), { reason, body, signal });
1134
+ return this.rest.post(Routes6.guildRoles(guildId), { reason, body, signal });
1073
1135
  }
1074
1136
  /**
1075
1137
  * Sets role positions in a guild
@@ -1080,7 +1142,7 @@ var GuildsAPI = class {
1080
1142
  * @param options - The options for setting role positions
1081
1143
  */
1082
1144
  async setRolePositions(guildId, body, { reason, signal } = {}) {
1083
- return this.rest.patch(Routes5.guildRoles(guildId), {
1145
+ return this.rest.patch(Routes6.guildRoles(guildId), {
1084
1146
  reason,
1085
1147
  body,
1086
1148
  signal
@@ -1096,7 +1158,7 @@ var GuildsAPI = class {
1096
1158
  * @param options - The options for editing the guild role
1097
1159
  */
1098
1160
  async editRole(guildId, roleId, body, { reason, signal } = {}) {
1099
- return this.rest.patch(Routes5.guildRole(guildId, roleId), {
1161
+ return this.rest.patch(Routes6.guildRole(guildId, roleId), {
1100
1162
  reason,
1101
1163
  body,
1102
1164
  signal
@@ -1111,7 +1173,7 @@ var GuildsAPI = class {
1111
1173
  * @param options - The options for deleting the guild role
1112
1174
  */
1113
1175
  async deleteRole(guildId, roleId, { reason, signal } = {}) {
1114
- await this.rest.delete(Routes5.guildRole(guildId, roleId), { reason, signal });
1176
+ await this.rest.delete(Routes6.guildRole(guildId, roleId), { reason, signal });
1115
1177
  }
1116
1178
  /**
1117
1179
  * Edits the multi-factor-authentication (MFA) level of a guild
@@ -1120,9 +1182,10 @@ var GuildsAPI = class {
1120
1182
  * @param guildId - The id of the guild to edit the MFA level for
1121
1183
  * @param level - The new MFA level
1122
1184
  * @param options - The options for editing the MFA level
1185
+ * @deprecated API related to guild ownership may no longer be used.
1123
1186
  */
1124
1187
  async editMFALevel(guildId, level, { reason, signal } = {}) {
1125
- return this.rest.post(Routes5.guildMFA(guildId), {
1188
+ return this.rest.post(Routes6.guildMFA(guildId), {
1126
1189
  reason,
1127
1190
  signal,
1128
1191
  body: { level }
@@ -1137,7 +1200,7 @@ var GuildsAPI = class {
1137
1200
  * @param options - The options for fetching the number of pruned members
1138
1201
  */
1139
1202
  async getPruneCount(guildId, query = {}, { signal } = {}) {
1140
- return this.rest.get(Routes5.guildPrune(guildId), {
1203
+ return this.rest.get(Routes6.guildPrune(guildId), {
1141
1204
  signal,
1142
1205
  query: makeURLSearchParams3(query)
1143
1206
  });
@@ -1151,7 +1214,7 @@ var GuildsAPI = class {
1151
1214
  * @param options - The options for initiating the prune
1152
1215
  */
1153
1216
  async beginPrune(guildId, body = {}, { reason, signal } = {}) {
1154
- return this.rest.post(Routes5.guildPrune(guildId), {
1217
+ return this.rest.post(Routes6.guildPrune(guildId), {
1155
1218
  body,
1156
1219
  reason,
1157
1220
  signal
@@ -1165,7 +1228,7 @@ var GuildsAPI = class {
1165
1228
  * @param options - The options for fetching the voice regions
1166
1229
  */
1167
1230
  async getVoiceRegions(guildId, { signal } = {}) {
1168
- return this.rest.get(Routes5.guildVoiceRegions(guildId), { signal });
1231
+ return this.rest.get(Routes6.guildVoiceRegions(guildId), { signal });
1169
1232
  }
1170
1233
  /**
1171
1234
  * Fetches the invites for a guild
@@ -1175,7 +1238,7 @@ var GuildsAPI = class {
1175
1238
  * @param options - The options for fetching the invites
1176
1239
  */
1177
1240
  async getInvites(guildId, { signal } = {}) {
1178
- return this.rest.get(Routes5.guildInvites(guildId), { signal });
1241
+ return this.rest.get(Routes6.guildInvites(guildId), { signal });
1179
1242
  }
1180
1243
  /**
1181
1244
  * Fetches the integrations for a guild
@@ -1185,7 +1248,7 @@ var GuildsAPI = class {
1185
1248
  * @param options - The options for fetching the integrations
1186
1249
  */
1187
1250
  async getIntegrations(guildId, { signal } = {}) {
1188
- return this.rest.get(Routes5.guildIntegrations(guildId), { signal });
1251
+ return this.rest.get(Routes6.guildIntegrations(guildId), { signal });
1189
1252
  }
1190
1253
  /**
1191
1254
  * Deletes an integration from a guild
@@ -1196,7 +1259,7 @@ var GuildsAPI = class {
1196
1259
  * @param options - The options for deleting the integration
1197
1260
  */
1198
1261
  async deleteIntegration(guildId, integrationId, { reason, signal } = {}) {
1199
- await this.rest.delete(Routes5.guildIntegration(guildId, integrationId), { reason, signal });
1262
+ await this.rest.delete(Routes6.guildIntegration(guildId, integrationId), { reason, signal });
1200
1263
  }
1201
1264
  /**
1202
1265
  * Fetches the widget settings for a guild
@@ -1206,7 +1269,7 @@ var GuildsAPI = class {
1206
1269
  * @param options - The options for fetching the widget settings
1207
1270
  */
1208
1271
  async getWidgetSettings(guildId, { signal } = {}) {
1209
- return this.rest.get(Routes5.guildWidgetSettings(guildId), {
1272
+ return this.rest.get(Routes6.guildWidgetSettings(guildId), {
1210
1273
  signal
1211
1274
  });
1212
1275
  }
@@ -1219,7 +1282,7 @@ var GuildsAPI = class {
1219
1282
  * @param options - The options for editing the widget settings
1220
1283
  */
1221
1284
  async editWidgetSettings(guildId, body, { reason, signal } = {}) {
1222
- return this.rest.patch(Routes5.guildWidgetSettings(guildId), {
1285
+ return this.rest.patch(Routes6.guildWidgetSettings(guildId), {
1223
1286
  reason,
1224
1287
  body,
1225
1288
  signal
@@ -1233,7 +1296,7 @@ var GuildsAPI = class {
1233
1296
  * @param options - The options for fetching the widget
1234
1297
  */
1235
1298
  async getWidget(guildId, { signal } = {}) {
1236
- return this.rest.get(Routes5.guildWidgetJSON(guildId), { signal });
1299
+ return this.rest.get(Routes6.guildWidgetJSON(guildId), { signal });
1237
1300
  }
1238
1301
  /**
1239
1302
  * Fetches the vanity url for a guild
@@ -1243,7 +1306,7 @@ var GuildsAPI = class {
1243
1306
  * @param options - The options for fetching the vanity url
1244
1307
  */
1245
1308
  async getVanityURL(guildId, { signal } = {}) {
1246
- return this.rest.get(Routes5.guildVanityUrl(guildId), { signal });
1309
+ return this.rest.get(Routes6.guildVanityUrl(guildId), { signal });
1247
1310
  }
1248
1311
  /**
1249
1312
  * Fetches the widget image for a guild
@@ -1254,7 +1317,7 @@ var GuildsAPI = class {
1254
1317
  * @param options - The options for fetching the widget image
1255
1318
  */
1256
1319
  async getWidgetImage(guildId, style, { signal } = {}) {
1257
- return this.rest.get(Routes5.guildWidgetImage(guildId), {
1320
+ return this.rest.get(Routes6.guildWidgetImage(guildId), {
1258
1321
  query: makeURLSearchParams3({ style }),
1259
1322
  signal
1260
1323
  });
@@ -1267,7 +1330,7 @@ var GuildsAPI = class {
1267
1330
  * @param options - The options for fetching the welcome screen
1268
1331
  */
1269
1332
  async getWelcomeScreen(guildId, { signal } = {}) {
1270
- return this.rest.get(Routes5.guildWelcomeScreen(guildId), { signal });
1333
+ return this.rest.get(Routes6.guildWelcomeScreen(guildId), { signal });
1271
1334
  }
1272
1335
  /**
1273
1336
  * Edits the welcome screen for a guild
@@ -1278,7 +1341,7 @@ var GuildsAPI = class {
1278
1341
  * @param options - The options for editing the welcome screen
1279
1342
  */
1280
1343
  async editWelcomeScreen(guildId, body, { reason, signal } = {}) {
1281
- return this.rest.patch(Routes5.guildWelcomeScreen(guildId), {
1344
+ return this.rest.patch(Routes6.guildWelcomeScreen(guildId), {
1282
1345
  reason,
1283
1346
  body,
1284
1347
  signal
@@ -1305,7 +1368,7 @@ var GuildsAPI = class {
1305
1368
  * @param options - The options for fetching the emojis
1306
1369
  */
1307
1370
  async getEmojis(guildId, { signal } = {}) {
1308
- return this.rest.get(Routes5.guildEmojis(guildId), { signal });
1371
+ return this.rest.get(Routes6.guildEmojis(guildId), { signal });
1309
1372
  }
1310
1373
  /**
1311
1374
  * Fetches an emoji for a guild
@@ -1316,7 +1379,7 @@ var GuildsAPI = class {
1316
1379
  * @param options - The options for fetching the emoji
1317
1380
  */
1318
1381
  async getEmoji(guildId, emojiId, { signal } = {}) {
1319
- return this.rest.get(Routes5.guildEmoji(guildId, emojiId), { signal });
1382
+ return this.rest.get(Routes6.guildEmoji(guildId, emojiId), { signal });
1320
1383
  }
1321
1384
  /**
1322
1385
  * Creates a new emoji for a guild
@@ -1327,7 +1390,7 @@ var GuildsAPI = class {
1327
1390
  * @param options - The options for creating the emoji
1328
1391
  */
1329
1392
  async createEmoji(guildId, body, { reason, signal } = {}) {
1330
- return this.rest.post(Routes5.guildEmojis(guildId), {
1393
+ return this.rest.post(Routes6.guildEmojis(guildId), {
1331
1394
  reason,
1332
1395
  body,
1333
1396
  signal
@@ -1343,7 +1406,7 @@ var GuildsAPI = class {
1343
1406
  * @param options - The options for editing the emoji
1344
1407
  */
1345
1408
  async editEmoji(guildId, emojiId, body, { reason, signal } = {}) {
1346
- return this.rest.patch(Routes5.guildEmoji(guildId, emojiId), {
1409
+ return this.rest.patch(Routes6.guildEmoji(guildId, emojiId), {
1347
1410
  reason,
1348
1411
  body,
1349
1412
  signal
@@ -1358,7 +1421,7 @@ var GuildsAPI = class {
1358
1421
  * @param options - The options for deleting the emoji
1359
1422
  */
1360
1423
  async deleteEmoji(guildId, emojiId, { reason, signal } = {}) {
1361
- await this.rest.delete(Routes5.guildEmoji(guildId, emojiId), { reason, signal });
1424
+ await this.rest.delete(Routes6.guildEmoji(guildId, emojiId), { reason, signal });
1362
1425
  }
1363
1426
  /**
1364
1427
  * Fetches all scheduled events for a guild
@@ -1369,7 +1432,7 @@ var GuildsAPI = class {
1369
1432
  * @param options - The options for fetching the scheduled events
1370
1433
  */
1371
1434
  async getScheduledEvents(guildId, query = {}, { signal } = {}) {
1372
- return this.rest.get(Routes5.guildScheduledEvents(guildId), {
1435
+ return this.rest.get(Routes6.guildScheduledEvents(guildId), {
1373
1436
  query: makeURLSearchParams3(query),
1374
1437
  signal
1375
1438
  });
@@ -1383,7 +1446,7 @@ var GuildsAPI = class {
1383
1446
  * @param options - The options for creating the scheduled event
1384
1447
  */
1385
1448
  async createScheduledEvent(guildId, body, { reason, signal } = {}) {
1386
- return this.rest.post(Routes5.guildScheduledEvents(guildId), {
1449
+ return this.rest.post(Routes6.guildScheduledEvents(guildId), {
1387
1450
  reason,
1388
1451
  body,
1389
1452
  signal
@@ -1399,7 +1462,7 @@ var GuildsAPI = class {
1399
1462
  * @param options - The options for fetching the scheduled event
1400
1463
  */
1401
1464
  async getScheduledEvent(guildId, eventId, query = {}, { signal } = {}) {
1402
- return this.rest.get(Routes5.guildScheduledEvent(guildId, eventId), {
1465
+ return this.rest.get(Routes6.guildScheduledEvent(guildId, eventId), {
1403
1466
  query: makeURLSearchParams3(query),
1404
1467
  signal
1405
1468
  });
@@ -1414,7 +1477,7 @@ var GuildsAPI = class {
1414
1477
  * @param options - The options for editing the scheduled event
1415
1478
  */
1416
1479
  async editScheduledEvent(guildId, eventId, body, { reason, signal } = {}) {
1417
- return this.rest.patch(Routes5.guildScheduledEvent(guildId, eventId), {
1480
+ return this.rest.patch(Routes6.guildScheduledEvent(guildId, eventId), {
1418
1481
  reason,
1419
1482
  body,
1420
1483
  signal
@@ -1429,7 +1492,7 @@ var GuildsAPI = class {
1429
1492
  * @param options - The options for deleting the scheduled event
1430
1493
  */
1431
1494
  async deleteScheduledEvent(guildId, eventId, { reason, signal } = {}) {
1432
- await this.rest.delete(Routes5.guildScheduledEvent(guildId, eventId), { reason, signal });
1495
+ await this.rest.delete(Routes6.guildScheduledEvent(guildId, eventId), { reason, signal });
1433
1496
  }
1434
1497
  /**
1435
1498
  * Gets all users that are interested in a scheduled event
@@ -1441,7 +1504,7 @@ var GuildsAPI = class {
1441
1504
  * @param options - The options for fetching the scheduled event users
1442
1505
  */
1443
1506
  async getScheduledEventUsers(guildId, eventId, query = {}, { signal } = {}) {
1444
- return this.rest.get(Routes5.guildScheduledEventUsers(guildId, eventId), {
1507
+ return this.rest.get(Routes6.guildScheduledEventUsers(guildId, eventId), {
1445
1508
  query: makeURLSearchParams3(query),
1446
1509
  signal
1447
1510
  });
@@ -1454,7 +1517,7 @@ var GuildsAPI = class {
1454
1517
  * @param options - The options for fetching the templates
1455
1518
  */
1456
1519
  async getTemplates(guildId, { signal } = {}) {
1457
- return this.rest.get(Routes5.guildTemplates(guildId), { signal });
1520
+ return this.rest.get(Routes6.guildTemplates(guildId), { signal });
1458
1521
  }
1459
1522
  /**
1460
1523
  * Syncs a template for a guild
@@ -1465,7 +1528,7 @@ var GuildsAPI = class {
1465
1528
  * @param options - The options for syncing the template
1466
1529
  */
1467
1530
  async syncTemplate(guildId, templateCode, { signal } = {}) {
1468
- return this.rest.put(Routes5.guildTemplate(guildId, templateCode), {
1531
+ return this.rest.put(Routes6.guildTemplate(guildId, templateCode), {
1469
1532
  signal
1470
1533
  });
1471
1534
  }
@@ -1479,7 +1542,7 @@ var GuildsAPI = class {
1479
1542
  * @param options - The options for editing the template
1480
1543
  */
1481
1544
  async editTemplate(guildId, templateCode, body, { signal } = {}) {
1482
- return this.rest.patch(Routes5.guildTemplate(guildId, templateCode), {
1545
+ return this.rest.patch(Routes6.guildTemplate(guildId, templateCode), {
1483
1546
  body,
1484
1547
  signal
1485
1548
  });
@@ -1493,7 +1556,7 @@ var GuildsAPI = class {
1493
1556
  * @param options - The options for deleting the template
1494
1557
  */
1495
1558
  async deleteTemplate(guildId, templateCode, { signal } = {}) {
1496
- await this.rest.delete(Routes5.guildTemplate(guildId, templateCode), { signal });
1559
+ await this.rest.delete(Routes6.guildTemplate(guildId, templateCode), { signal });
1497
1560
  }
1498
1561
  /**
1499
1562
  * Fetches all the stickers for a guild
@@ -1503,7 +1566,7 @@ var GuildsAPI = class {
1503
1566
  * @param options - The options for fetching the stickers
1504
1567
  */
1505
1568
  async getStickers(guildId, { signal } = {}) {
1506
- return this.rest.get(Routes5.guildStickers(guildId), { signal });
1569
+ return this.rest.get(Routes6.guildStickers(guildId), { signal });
1507
1570
  }
1508
1571
  /**
1509
1572
  * Fetches a sticker for a guild
@@ -1514,7 +1577,7 @@ var GuildsAPI = class {
1514
1577
  * @param options - The options for fetching the sticker
1515
1578
  */
1516
1579
  async getSticker(guildId, stickerId, { signal } = {}) {
1517
- return this.rest.get(Routes5.guildSticker(guildId, stickerId), { signal });
1580
+ return this.rest.get(Routes6.guildSticker(guildId, stickerId), { signal });
1518
1581
  }
1519
1582
  /**
1520
1583
  * Creates a sticker for a guild
@@ -1526,7 +1589,7 @@ var GuildsAPI = class {
1526
1589
  */
1527
1590
  async createSticker(guildId, { file, ...body }, { reason, signal } = {}) {
1528
1591
  const fileData = { ...file, key: "file" };
1529
- return this.rest.post(Routes5.guildStickers(guildId), {
1592
+ return this.rest.post(Routes6.guildStickers(guildId), {
1530
1593
  appendToFormData: true,
1531
1594
  body,
1532
1595
  files: [fileData],
@@ -1544,7 +1607,7 @@ var GuildsAPI = class {
1544
1607
  * @param options - The options for editing the sticker
1545
1608
  */
1546
1609
  async editSticker(guildId, stickerId, body, { reason, signal } = {}) {
1547
- return this.rest.patch(Routes5.guildSticker(guildId, stickerId), {
1610
+ return this.rest.patch(Routes6.guildSticker(guildId, stickerId), {
1548
1611
  reason,
1549
1612
  body,
1550
1613
  signal
@@ -1559,7 +1622,7 @@ var GuildsAPI = class {
1559
1622
  * @param options - The options for deleting the sticker
1560
1623
  */
1561
1624
  async deleteSticker(guildId, stickerId, { reason, signal } = {}) {
1562
- await this.rest.delete(Routes5.guildSticker(guildId, stickerId), { reason, signal });
1625
+ await this.rest.delete(Routes6.guildSticker(guildId, stickerId), { reason, signal });
1563
1626
  }
1564
1627
  /**
1565
1628
  * Fetches the audit logs for a guild
@@ -1570,7 +1633,7 @@ var GuildsAPI = class {
1570
1633
  * @param options - The options for fetching the audit logs
1571
1634
  */
1572
1635
  async getAuditLogs(guildId, query = {}, { signal } = {}) {
1573
- return this.rest.get(Routes5.guildAuditLog(guildId), {
1636
+ return this.rest.get(Routes6.guildAuditLog(guildId), {
1574
1637
  query: makeURLSearchParams3(query),
1575
1638
  signal
1576
1639
  });
@@ -1583,7 +1646,7 @@ var GuildsAPI = class {
1583
1646
  * @param options - The options for fetching the auto moderation rules
1584
1647
  */
1585
1648
  async getAutoModerationRules(guildId, { signal } = {}) {
1586
- return this.rest.get(Routes5.guildAutoModerationRules(guildId), {
1649
+ return this.rest.get(Routes6.guildAutoModerationRules(guildId), {
1587
1650
  signal
1588
1651
  });
1589
1652
  }
@@ -1596,7 +1659,7 @@ var GuildsAPI = class {
1596
1659
  * @param options - The options for fetching the auto moderation rule
1597
1660
  */
1598
1661
  async getAutoModerationRule(guildId, ruleId, { signal } = {}) {
1599
- return this.rest.get(Routes5.guildAutoModerationRule(guildId, ruleId), {
1662
+ return this.rest.get(Routes6.guildAutoModerationRule(guildId, ruleId), {
1600
1663
  signal
1601
1664
  });
1602
1665
  }
@@ -1609,7 +1672,7 @@ var GuildsAPI = class {
1609
1672
  * @param options - The options for creating the auto moderation rule
1610
1673
  */
1611
1674
  async createAutoModerationRule(guildId, body, { reason, signal } = {}) {
1612
- return this.rest.post(Routes5.guildAutoModerationRules(guildId), {
1675
+ return this.rest.post(Routes6.guildAutoModerationRules(guildId), {
1613
1676
  reason,
1614
1677
  body,
1615
1678
  signal
@@ -1625,7 +1688,7 @@ var GuildsAPI = class {
1625
1688
  * @param options - The options for editing the auto moderation rule
1626
1689
  */
1627
1690
  async editAutoModerationRule(guildId, ruleId, body, { reason, signal } = {}) {
1628
- return this.rest.patch(Routes5.guildAutoModerationRule(guildId, ruleId), {
1691
+ return this.rest.patch(Routes6.guildAutoModerationRule(guildId, ruleId), {
1629
1692
  reason,
1630
1693
  body,
1631
1694
  signal
@@ -1640,7 +1703,7 @@ var GuildsAPI = class {
1640
1703
  * @param options - The options for deleting the auto moderation rule
1641
1704
  */
1642
1705
  async deleteAutoModerationRule(guildId, ruleId, { reason, signal } = {}) {
1643
- await this.rest.delete(Routes5.guildAutoModerationRule(guildId, ruleId), { reason, signal });
1706
+ await this.rest.delete(Routes6.guildAutoModerationRule(guildId, ruleId), { reason, signal });
1644
1707
  }
1645
1708
  /**
1646
1709
  * Fetches a guild member
@@ -1651,7 +1714,7 @@ var GuildsAPI = class {
1651
1714
  * @param options - The options for fetching the guild member
1652
1715
  */
1653
1716
  async getMember(guildId, userId, { signal } = {}) {
1654
- return this.rest.get(Routes5.guildMember(guildId, userId), { signal });
1717
+ return this.rest.get(Routes6.guildMember(guildId, userId), { signal });
1655
1718
  }
1656
1719
  /**
1657
1720
  * Searches for guild members
@@ -1662,7 +1725,7 @@ var GuildsAPI = class {
1662
1725
  * @param options - The options for searching for guild members
1663
1726
  */
1664
1727
  async searchForMembers(guildId, query, { signal } = {}) {
1665
- return this.rest.get(Routes5.guildMembersSearch(guildId), {
1728
+ return this.rest.get(Routes6.guildMembersSearch(guildId), {
1666
1729
  query: makeURLSearchParams3(query),
1667
1730
  signal
1668
1731
  });
@@ -1677,7 +1740,7 @@ var GuildsAPI = class {
1677
1740
  * @param options - The options for editing the guild member
1678
1741
  */
1679
1742
  async editMember(guildId, userId, body = {}, { reason, signal } = {}) {
1680
- return this.rest.patch(Routes5.guildMember(guildId, userId), {
1743
+ return this.rest.patch(Routes6.guildMember(guildId, userId), {
1681
1744
  reason,
1682
1745
  body,
1683
1746
  signal
@@ -1692,7 +1755,7 @@ var GuildsAPI = class {
1692
1755
  * @param options - The options for removing the guild member
1693
1756
  */
1694
1757
  async removeMember(guildId, userId, { reason, signal } = {}) {
1695
- return this.rest.delete(Routes5.guildMember(guildId, userId), { reason, signal });
1758
+ return this.rest.delete(Routes6.guildMember(guildId, userId), { reason, signal });
1696
1759
  }
1697
1760
  /**
1698
1761
  * Adds a role to a guild member
@@ -1704,7 +1767,7 @@ var GuildsAPI = class {
1704
1767
  * @param options - The options for adding a role to a guild member
1705
1768
  */
1706
1769
  async addRoleToMember(guildId, userId, roleId, { reason, signal } = {}) {
1707
- await this.rest.put(Routes5.guildMemberRole(guildId, userId, roleId), { reason, signal });
1770
+ await this.rest.put(Routes6.guildMemberRole(guildId, userId, roleId), { reason, signal });
1708
1771
  }
1709
1772
  /**
1710
1773
  * Removes a role from a guild member
@@ -1716,7 +1779,7 @@ var GuildsAPI = class {
1716
1779
  * @param options - The options for removing a role from a guild member
1717
1780
  */
1718
1781
  async removeRoleFromMember(guildId, userId, roleId, { reason, signal } = {}) {
1719
- await this.rest.delete(Routes5.guildMemberRole(guildId, userId, roleId), { reason, signal });
1782
+ await this.rest.delete(Routes6.guildMemberRole(guildId, userId, roleId), { reason, signal });
1720
1783
  }
1721
1784
  /**
1722
1785
  * Fetches a guild template
@@ -1726,18 +1789,18 @@ var GuildsAPI = class {
1726
1789
  * @param options - The options for fetching the guild template
1727
1790
  */
1728
1791
  async getTemplate(templateCode, { signal } = {}) {
1729
- return this.rest.get(Routes5.template(templateCode), { signal });
1792
+ return this.rest.get(Routes6.template(templateCode), { signal });
1730
1793
  }
1731
1794
  /**
1732
1795
  * Creates a new template
1733
1796
  *
1734
1797
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1735
- * @param templateCode - The code of the template
1798
+ * @param guildId - The id of the guild
1736
1799
  * @param body - The data for creating the template
1737
1800
  * @param options - The options for creating the template
1738
1801
  */
1739
- async createTemplate(templateCode, body, { signal } = {}) {
1740
- return this.rest.post(Routes5.template(templateCode), { body, signal });
1802
+ async createTemplate(guildId, body, { signal } = {}) {
1803
+ return this.rest.post(Routes6.guildTemplates(guildId), { body, signal });
1741
1804
  }
1742
1805
  /**
1743
1806
  * Fetches webhooks for a guild
@@ -1746,7 +1809,7 @@ var GuildsAPI = class {
1746
1809
  * @param id - The id of the guild
1747
1810
  */
1748
1811
  async getWebhooks(id) {
1749
- return this.rest.get(Routes5.guildWebhooks(id));
1812
+ return this.rest.get(Routes6.guildWebhooks(id));
1750
1813
  }
1751
1814
  /**
1752
1815
  * Sets the voice state for the current user
@@ -1768,7 +1831,7 @@ var GuildsAPI = class {
1768
1831
  * @param options - The options for fetching the guild onboarding
1769
1832
  */
1770
1833
  async getOnboarding(guildId, { signal } = {}) {
1771
- return this.rest.get(Routes5.guildOnboarding(guildId), { signal });
1834
+ return this.rest.get(Routes6.guildOnboarding(guildId), { signal });
1772
1835
  }
1773
1836
  /**
1774
1837
  * Edits a guild onboarding
@@ -1779,18 +1842,32 @@ var GuildsAPI = class {
1779
1842
  * @param options - The options for editing the guild onboarding
1780
1843
  */
1781
1844
  async editOnboarding(guildId, body, { reason, signal } = {}) {
1782
- return this.rest.put(Routes5.guildOnboarding(guildId), {
1845
+ return this.rest.put(Routes6.guildOnboarding(guildId), {
1783
1846
  reason,
1784
1847
  body,
1785
1848
  signal
1786
1849
  });
1787
1850
  }
1851
+ /**
1852
+ * Modifies incident actions for a guild.
1853
+ *
1854
+ * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
1855
+ * @param guildId - The id of the guild
1856
+ * @param body - The data for modifying guild incident actions
1857
+ * @param options - The options for modifying guild incident actions
1858
+ */
1859
+ async editIncidentActions(guildId, body, { signal } = {}) {
1860
+ return this.rest.put(Routes6.guildIncidentActions(guildId), {
1861
+ body,
1862
+ signal
1863
+ });
1864
+ }
1788
1865
  };
1789
1866
 
1790
1867
  // src/api/interactions.ts
1791
1868
  import {
1792
1869
  InteractionResponseType,
1793
- Routes as Routes6
1870
+ Routes as Routes7
1794
1871
  } from "discord-api-types/v10";
1795
1872
  var InteractionsAPI = class {
1796
1873
  constructor(rest, webhooks) {
@@ -1810,7 +1887,7 @@ var InteractionsAPI = class {
1810
1887
  * @param options - The options for replying
1811
1888
  */
1812
1889
  async reply(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1813
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
1890
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1814
1891
  files,
1815
1892
  auth: false,
1816
1893
  body: {
@@ -1830,7 +1907,7 @@ var InteractionsAPI = class {
1830
1907
  * @param options - The options for deferring
1831
1908
  */
1832
1909
  async defer(interactionId, interactionToken, data, { signal } = {}) {
1833
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
1910
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1834
1911
  auth: false,
1835
1912
  body: {
1836
1913
  type: InteractionResponseType.DeferredChannelMessageWithSource,
@@ -1848,7 +1925,7 @@ var InteractionsAPI = class {
1848
1925
  * @param options - The options for deferring
1849
1926
  */
1850
1927
  async deferMessageUpdate(interactionId, interactionToken, { signal } = {}) {
1851
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
1928
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1852
1929
  auth: false,
1853
1930
  body: {
1854
1931
  type: InteractionResponseType.DeferredMessageUpdate
@@ -1924,7 +2001,7 @@ var InteractionsAPI = class {
1924
2001
  * @param options - The options for updating the interaction
1925
2002
  */
1926
2003
  async updateMessage(interactionId, interactionToken, { files, ...data }, { signal } = {}) {
1927
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2004
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1928
2005
  files,
1929
2006
  auth: false,
1930
2007
  body: {
@@ -1944,7 +2021,7 @@ var InteractionsAPI = class {
1944
2021
  * @param options - The options for sending the autocomplete response
1945
2022
  */
1946
2023
  async createAutocompleteResponse(interactionId, interactionToken, callbackData, { signal } = {}) {
1947
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2024
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1948
2025
  auth: false,
1949
2026
  body: {
1950
2027
  type: InteractionResponseType.ApplicationCommandAutocompleteResult,
@@ -1963,7 +2040,7 @@ var InteractionsAPI = class {
1963
2040
  * @param options - The options for sending the modal
1964
2041
  */
1965
2042
  async createModal(interactionId, interactionToken, callbackData, { signal } = {}) {
1966
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2043
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1967
2044
  auth: false,
1968
2045
  body: {
1969
2046
  type: InteractionResponseType.Modal,
@@ -1982,7 +2059,7 @@ var InteractionsAPI = class {
1982
2059
  * @deprecated Sending a premium-style button is the new Discord behavior.
1983
2060
  */
1984
2061
  async sendPremiumRequired(interactionId, interactionToken, { signal } = {}) {
1985
- await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2062
+ await this.rest.post(Routes7.interactionCallback(interactionId, interactionToken), {
1986
2063
  auth: false,
1987
2064
  body: {
1988
2065
  type: InteractionResponseType.PremiumRequired
@@ -1994,7 +2071,7 @@ var InteractionsAPI = class {
1994
2071
 
1995
2072
  // src/api/invite.ts
1996
2073
  import { makeURLSearchParams as makeURLSearchParams4 } from "@discordjs/rest";
1997
- import { Routes as Routes7 } from "discord-api-types/v10";
2074
+ import { Routes as Routes8 } from "discord-api-types/v10";
1998
2075
  var InvitesAPI = class {
1999
2076
  constructor(rest) {
2000
2077
  this.rest = rest;
@@ -2011,7 +2088,7 @@ var InvitesAPI = class {
2011
2088
  * @param options - The options for fetching the invite
2012
2089
  */
2013
2090
  async get(code, query = {}, { signal } = {}) {
2014
- return this.rest.get(Routes7.invite(code), {
2091
+ return this.rest.get(Routes8.invite(code), {
2015
2092
  query: makeURLSearchParams4(query),
2016
2093
  signal
2017
2094
  });
@@ -2024,14 +2101,14 @@ var InvitesAPI = class {
2024
2101
  * @param options - The options for deleting the invite
2025
2102
  */
2026
2103
  async delete(code, { reason, signal } = {}) {
2027
- await this.rest.delete(Routes7.invite(code), { reason, signal });
2104
+ await this.rest.delete(Routes8.invite(code), { reason, signal });
2028
2105
  }
2029
2106
  };
2030
2107
 
2031
2108
  // src/api/monetization.ts
2032
2109
  import { makeURLSearchParams as makeURLSearchParams5 } from "@discordjs/rest";
2033
2110
  import {
2034
- Routes as Routes8
2111
+ Routes as Routes9
2035
2112
  } from "discord-api-types/v10";
2036
2113
  var MonetizationAPI = class {
2037
2114
  constructor(rest) {
@@ -2047,7 +2124,7 @@ var MonetizationAPI = class {
2047
2124
  * @param options - The options for fetching the SKUs.
2048
2125
  */
2049
2126
  async getSKUs(applicationId, { signal } = {}) {
2050
- return this.rest.get(Routes8.skus(applicationId), { signal });
2127
+ return this.rest.get(Routes9.skus(applicationId), { signal });
2051
2128
  }
2052
2129
  /**
2053
2130
  * Fetches the entitlements for an application.
@@ -2058,7 +2135,7 @@ var MonetizationAPI = class {
2058
2135
  * @param options - The options for fetching entitlements
2059
2136
  */
2060
2137
  async getEntitlements(applicationId, query, { signal } = {}) {
2061
- return this.rest.get(Routes8.entitlements(applicationId), {
2138
+ return this.rest.get(Routes9.entitlements(applicationId), {
2062
2139
  signal,
2063
2140
  query: makeURLSearchParams5(query)
2064
2141
  });
@@ -2072,7 +2149,7 @@ var MonetizationAPI = class {
2072
2149
  * @param options - The options for creating the entitlement
2073
2150
  */
2074
2151
  async createTestEntitlement(applicationId, body, { signal } = {}) {
2075
- return this.rest.post(Routes8.entitlements(applicationId), {
2152
+ return this.rest.post(Routes9.entitlements(applicationId), {
2076
2153
  body,
2077
2154
  signal
2078
2155
  });
@@ -2086,7 +2163,7 @@ var MonetizationAPI = class {
2086
2163
  * @param options - The options for deleting the entitlement
2087
2164
  */
2088
2165
  async deleteTestEntitlement(applicationId, entitlementId, { signal } = {}) {
2089
- await this.rest.delete(Routes8.entitlement(applicationId, entitlementId), { signal });
2166
+ await this.rest.delete(Routes9.entitlement(applicationId, entitlementId), { signal });
2090
2167
  }
2091
2168
  /**
2092
2169
  * Marks a given entitlement for the user as consumed. Only available for One-Time Purchase consumable SKUs.
@@ -2097,14 +2174,14 @@ var MonetizationAPI = class {
2097
2174
  * @param options - The options for consuming the entitlement
2098
2175
  */
2099
2176
  async consumeEntitlement(applicationId, entitlementId, { signal } = {}) {
2100
- await this.rest.post(Routes8.consumeEntitlement(applicationId, entitlementId), { signal });
2177
+ await this.rest.post(Routes9.consumeEntitlement(applicationId, entitlementId), { signal });
2101
2178
  }
2102
2179
  };
2103
2180
 
2104
2181
  // src/api/oauth2.ts
2105
2182
  import { makeURLSearchParams as makeURLSearchParams6 } from "@discordjs/rest";
2106
2183
  import {
2107
- Routes as Routes9,
2184
+ Routes as Routes10,
2108
2185
  RouteBases
2109
2186
  } from "discord-api-types/v10";
2110
2187
  var OAuth2API = class {
@@ -2121,7 +2198,7 @@ var OAuth2API = class {
2121
2198
  * @param options - The options for creating the authorization URL
2122
2199
  */
2123
2200
  generateAuthorizationURL(options) {
2124
- const url = new URL(`${RouteBases.api}${Routes9.oauth2Authorization()}`);
2201
+ const url = new URL(`${RouteBases.api}${Routes10.oauth2Authorization()}`);
2125
2202
  url.search = makeURLSearchParams6(options).toString();
2126
2203
  return url.toString();
2127
2204
  }
@@ -2133,7 +2210,7 @@ var OAuth2API = class {
2133
2210
  * @param options - The options for the token exchange request
2134
2211
  */
2135
2212
  async tokenExchange(body, { signal } = {}) {
2136
- return this.rest.post(Routes9.oauth2TokenExchange(), {
2213
+ return this.rest.post(Routes10.oauth2TokenExchange(), {
2137
2214
  body: makeURLSearchParams6(body),
2138
2215
  passThroughBody: true,
2139
2216
  headers: {
@@ -2151,7 +2228,7 @@ var OAuth2API = class {
2151
2228
  * @param options - The options for the refresh token request
2152
2229
  */
2153
2230
  async refreshToken(body, { signal } = {}) {
2154
- return this.rest.post(Routes9.oauth2TokenExchange(), {
2231
+ return this.rest.post(Routes10.oauth2TokenExchange(), {
2155
2232
  body: makeURLSearchParams6(body),
2156
2233
  passThroughBody: true,
2157
2234
  headers: {
@@ -2171,7 +2248,7 @@ var OAuth2API = class {
2171
2248
  * @param options - The options for the client credentials grant request
2172
2249
  */
2173
2250
  async getToken(body, { signal } = {}) {
2174
- return this.rest.post(Routes9.oauth2TokenExchange(), {
2251
+ return this.rest.post(Routes10.oauth2TokenExchange(), {
2175
2252
  body: makeURLSearchParams6(body),
2176
2253
  passThroughBody: true,
2177
2254
  headers: {
@@ -2188,7 +2265,7 @@ var OAuth2API = class {
2188
2265
  * @param options - The options for the current bot application information request
2189
2266
  */
2190
2267
  async getCurrentBotApplicationInformation({ signal } = {}) {
2191
- return this.rest.get(Routes9.oauth2CurrentApplication(), {
2268
+ return this.rest.get(Routes10.oauth2CurrentApplication(), {
2192
2269
  signal
2193
2270
  });
2194
2271
  }
@@ -2199,7 +2276,7 @@ var OAuth2API = class {
2199
2276
  * @param options - The options for the current authorization information request
2200
2277
  */
2201
2278
  async getCurrentAuthorizationInformation({ signal } = {}) {
2202
- return this.rest.get(Routes9.oauth2CurrentAuthorization(), {
2279
+ return this.rest.get(Routes10.oauth2CurrentAuthorization(), {
2203
2280
  signal
2204
2281
  });
2205
2282
  }
@@ -2213,7 +2290,7 @@ var OAuth2API = class {
2213
2290
  * @param options - The options for the token revocation request
2214
2291
  */
2215
2292
  async revokeToken(applicationId, applicationSecret, body, { signal } = {}) {
2216
- await this.rest.post(Routes9.oauth2TokenRevocation(), {
2293
+ await this.rest.post(Routes10.oauth2TokenRevocation(), {
2217
2294
  body: makeURLSearchParams6(body),
2218
2295
  passThroughBody: true,
2219
2296
  headers: {
@@ -2229,7 +2306,7 @@ var OAuth2API = class {
2229
2306
  // src/api/poll.ts
2230
2307
  import { makeURLSearchParams as makeURLSearchParams7 } from "@discordjs/rest";
2231
2308
  import {
2232
- Routes as Routes10
2309
+ Routes as Routes11
2233
2310
  } from "discord-api-types/v10";
2234
2311
  var PollAPI = class {
2235
2312
  constructor(rest) {
@@ -2249,7 +2326,7 @@ var PollAPI = class {
2249
2326
  * @param options - The options for getting the list of voters
2250
2327
  */
2251
2328
  async getAnswerVoters(channelId, messageId, answerId, query, { signal } = {}) {
2252
- return this.rest.get(Routes10.pollAnswerVoters(channelId, messageId, answerId), {
2329
+ return this.rest.get(Routes11.pollAnswerVoters(channelId, messageId, answerId), {
2253
2330
  signal,
2254
2331
  query: makeURLSearchParams7(query)
2255
2332
  });
@@ -2263,7 +2340,7 @@ var PollAPI = class {
2263
2340
  * @param options - The options for expiring the poll
2264
2341
  */
2265
2342
  async expirePoll(channelId, messageId, { signal } = {}) {
2266
- return this.rest.post(Routes10.expirePoll(channelId, messageId), {
2343
+ return this.rest.post(Routes11.expirePoll(channelId, messageId), {
2267
2344
  signal
2268
2345
  });
2269
2346
  }
@@ -2271,7 +2348,7 @@ var PollAPI = class {
2271
2348
 
2272
2349
  // src/api/roleConnections.ts
2273
2350
  import {
2274
- Routes as Routes11
2351
+ Routes as Routes12
2275
2352
  } from "discord-api-types/v10";
2276
2353
  var RoleConnectionsAPI = class {
2277
2354
  constructor(rest) {
@@ -2288,7 +2365,7 @@ var RoleConnectionsAPI = class {
2288
2365
  * @param options - The options for fetching the role connection metadata records
2289
2366
  */
2290
2367
  async getMetadataRecords(applicationId, { signal } = {}) {
2291
- return this.rest.get(Routes11.applicationRoleConnectionMetadata(applicationId), {
2368
+ return this.rest.get(Routes12.applicationRoleConnectionMetadata(applicationId), {
2292
2369
  signal
2293
2370
  });
2294
2371
  }
@@ -2301,7 +2378,7 @@ var RoleConnectionsAPI = class {
2301
2378
  * @param options - The options for updating the role connection metadata records
2302
2379
  */
2303
2380
  async updateMetadataRecords(applicationId, body, { signal } = {}) {
2304
- return this.rest.put(Routes11.applicationRoleConnectionMetadata(applicationId), {
2381
+ return this.rest.put(Routes12.applicationRoleConnectionMetadata(applicationId), {
2305
2382
  body,
2306
2383
  signal
2307
2384
  });
@@ -2310,7 +2387,7 @@ var RoleConnectionsAPI = class {
2310
2387
 
2311
2388
  // src/api/stageInstances.ts
2312
2389
  import {
2313
- Routes as Routes12
2390
+ Routes as Routes13
2314
2391
  } from "discord-api-types/v10";
2315
2392
  var StageInstancesAPI = class {
2316
2393
  constructor(rest) {
@@ -2327,7 +2404,7 @@ var StageInstancesAPI = class {
2327
2404
  * @param options - The options for creating the new stage instance
2328
2405
  */
2329
2406
  async create(body, { reason, signal } = {}) {
2330
- return this.rest.post(Routes12.stageInstances(), {
2407
+ return this.rest.post(Routes13.stageInstances(), {
2331
2408
  body,
2332
2409
  reason,
2333
2410
  signal
@@ -2341,7 +2418,7 @@ var StageInstancesAPI = class {
2341
2418
  * @param options - The options for fetching the stage instance
2342
2419
  */
2343
2420
  async get(channelId, { signal } = {}) {
2344
- return this.rest.get(Routes12.stageInstance(channelId), { signal });
2421
+ return this.rest.get(Routes13.stageInstance(channelId), { signal });
2345
2422
  }
2346
2423
  /**
2347
2424
  * Edits a stage instance
@@ -2352,7 +2429,7 @@ var StageInstancesAPI = class {
2352
2429
  * @param options - The options for editing the stage instance
2353
2430
  */
2354
2431
  async edit(channelId, body, { reason, signal } = {}) {
2355
- return this.rest.patch(Routes12.stageInstance(channelId), {
2432
+ return this.rest.patch(Routes13.stageInstance(channelId), {
2356
2433
  body,
2357
2434
  reason,
2358
2435
  signal
@@ -2366,13 +2443,13 @@ var StageInstancesAPI = class {
2366
2443
  * @param options - The options for deleting the stage instance
2367
2444
  */
2368
2445
  async delete(channelId, { reason, signal } = {}) {
2369
- await this.rest.delete(Routes12.stageInstance(channelId), { reason, signal });
2446
+ await this.rest.delete(Routes13.stageInstance(channelId), { reason, signal });
2370
2447
  }
2371
2448
  };
2372
2449
 
2373
2450
  // src/api/sticker.ts
2374
2451
  import {
2375
- Routes as Routes13
2452
+ Routes as Routes14
2376
2453
  } from "discord-api-types/v10";
2377
2454
  var StickersAPI = class {
2378
2455
  constructor(rest) {
@@ -2389,7 +2466,7 @@ var StickersAPI = class {
2389
2466
  * @param options - The options for fetching the sticker pack
2390
2467
  */
2391
2468
  async getStickerPack(packId, { signal } = {}) {
2392
- return this.rest.get(Routes13.stickerPack(packId), { signal });
2469
+ return this.rest.get(Routes14.stickerPack(packId), { signal });
2393
2470
  }
2394
2471
  /**
2395
2472
  * Fetches all of the sticker packs
@@ -2398,7 +2475,7 @@ var StickersAPI = class {
2398
2475
  * @param options - The options for fetching the sticker packs
2399
2476
  */
2400
2477
  async getStickers({ signal } = {}) {
2401
- return this.rest.get(Routes13.stickerPacks(), { signal });
2478
+ return this.rest.get(Routes14.stickerPacks(), { signal });
2402
2479
  }
2403
2480
  /**
2404
2481
  * Fetches all of the sticker packs
@@ -2418,13 +2495,13 @@ var StickersAPI = class {
2418
2495
  * @param options - The options for fetching the sticker
2419
2496
  */
2420
2497
  async get(stickerId, { signal } = {}) {
2421
- return this.rest.get(Routes13.sticker(stickerId), { signal });
2498
+ return this.rest.get(Routes14.sticker(stickerId), { signal });
2422
2499
  }
2423
2500
  };
2424
2501
 
2425
2502
  // src/api/thread.ts
2426
2503
  import {
2427
- Routes as Routes14
2504
+ Routes as Routes15
2428
2505
  } from "discord-api-types/v10";
2429
2506
  var ThreadsAPI = class {
2430
2507
  constructor(rest) {
@@ -2441,7 +2518,7 @@ var ThreadsAPI = class {
2441
2518
  * @param options - The options for joining the thread
2442
2519
  */
2443
2520
  async join(threadId, { signal } = {}) {
2444
- await this.rest.put(Routes14.threadMembers(threadId, "@me"), { signal });
2521
+ await this.rest.put(Routes15.threadMembers(threadId, "@me"), { signal });
2445
2522
  }
2446
2523
  /**
2447
2524
  * Adds a member to a thread
@@ -2452,7 +2529,7 @@ var ThreadsAPI = class {
2452
2529
  * @param options - The options for adding the member to the thread
2453
2530
  */
2454
2531
  async addMember(threadId, userId, { signal } = {}) {
2455
- await this.rest.put(Routes14.threadMembers(threadId, userId), { signal });
2532
+ await this.rest.put(Routes15.threadMembers(threadId, userId), { signal });
2456
2533
  }
2457
2534
  /**
2458
2535
  * Removes the current user from a thread
@@ -2462,7 +2539,7 @@ var ThreadsAPI = class {
2462
2539
  * @param options - The options for leaving the thread
2463
2540
  */
2464
2541
  async leave(threadId, { signal } = {}) {
2465
- await this.rest.delete(Routes14.threadMembers(threadId, "@me"), { signal });
2542
+ await this.rest.delete(Routes15.threadMembers(threadId, "@me"), { signal });
2466
2543
  }
2467
2544
  /**
2468
2545
  * Removes a member from a thread
@@ -2473,7 +2550,7 @@ var ThreadsAPI = class {
2473
2550
  * @param options - The options for removing the member from the thread
2474
2551
  */
2475
2552
  async removeMember(threadId, userId, { signal } = {}) {
2476
- await this.rest.delete(Routes14.threadMembers(threadId, userId), { signal });
2553
+ await this.rest.delete(Routes15.threadMembers(threadId, userId), { signal });
2477
2554
  }
2478
2555
  /**
2479
2556
  * Fetches a member of a thread
@@ -2484,7 +2561,7 @@ var ThreadsAPI = class {
2484
2561
  * @param options - The options for fetching the member
2485
2562
  */
2486
2563
  async getMember(threadId, userId, { signal } = {}) {
2487
- return this.rest.get(Routes14.threadMembers(threadId, userId), { signal });
2564
+ return this.rest.get(Routes15.threadMembers(threadId, userId), { signal });
2488
2565
  }
2489
2566
  /**
2490
2567
  * Fetches all members of a thread
@@ -2494,14 +2571,14 @@ var ThreadsAPI = class {
2494
2571
  * @param options - The options for fetching the members
2495
2572
  */
2496
2573
  async getAllMembers(threadId, { signal } = {}) {
2497
- return this.rest.get(Routes14.threadMembers(threadId), { signal });
2574
+ return this.rest.get(Routes15.threadMembers(threadId), { signal });
2498
2575
  }
2499
2576
  };
2500
2577
 
2501
2578
  // src/api/user.ts
2502
2579
  import { makeURLSearchParams as makeURLSearchParams8 } from "@discordjs/rest";
2503
2580
  import {
2504
- Routes as Routes15
2581
+ Routes as Routes16
2505
2582
  } from "discord-api-types/v10";
2506
2583
  var UsersAPI = class {
2507
2584
  constructor(rest) {
@@ -2518,7 +2595,7 @@ var UsersAPI = class {
2518
2595
  * @param options - The options for fetching the user
2519
2596
  */
2520
2597
  async get(userId, { signal } = {}) {
2521
- return this.rest.get(Routes15.user(userId), { signal });
2598
+ return this.rest.get(Routes16.user(userId), { signal });
2522
2599
  }
2523
2600
  /**
2524
2601
  * Returns the user object of the requester's account
@@ -2527,7 +2604,7 @@ var UsersAPI = class {
2527
2604
  * @param options - The options for fetching the current user
2528
2605
  */
2529
2606
  async getCurrent({ signal } = {}) {
2530
- return this.rest.get(Routes15.user("@me"), { signal });
2607
+ return this.rest.get(Routes16.user("@me"), { signal });
2531
2608
  }
2532
2609
  /**
2533
2610
  * Returns a list of partial guild objects the current user is a member of
@@ -2537,7 +2614,7 @@ var UsersAPI = class {
2537
2614
  * @param options - The options for fetching the guilds
2538
2615
  */
2539
2616
  async getGuilds(query = {}, { signal } = {}) {
2540
- return this.rest.get(Routes15.userGuilds(), {
2617
+ return this.rest.get(Routes16.userGuilds(), {
2541
2618
  query: makeURLSearchParams8(query),
2542
2619
  signal
2543
2620
  });
@@ -2550,7 +2627,7 @@ var UsersAPI = class {
2550
2627
  * @param options - The options for leaving the guild
2551
2628
  */
2552
2629
  async leaveGuild(guildId, { signal } = {}) {
2553
- await this.rest.delete(Routes15.userGuild(guildId), { signal });
2630
+ await this.rest.delete(Routes16.userGuild(guildId), { signal });
2554
2631
  }
2555
2632
  /**
2556
2633
  * Edits the current user
@@ -2560,7 +2637,7 @@ var UsersAPI = class {
2560
2637
  * @param options - The options for editing the user
2561
2638
  */
2562
2639
  async edit(body, { signal } = {}) {
2563
- return this.rest.patch(Routes15.user("@me"), { body, signal });
2640
+ return this.rest.patch(Routes16.user("@me"), { body, signal });
2564
2641
  }
2565
2642
  /**
2566
2643
  * Fetches the guild member for the current user
@@ -2570,7 +2647,7 @@ var UsersAPI = class {
2570
2647
  * @param options - The options for fetching the guild member
2571
2648
  */
2572
2649
  async getGuildMember(guildId, { signal } = {}) {
2573
- return this.rest.get(Routes15.userGuildMember(guildId), { signal });
2650
+ return this.rest.get(Routes16.userGuildMember(guildId), { signal });
2574
2651
  }
2575
2652
  /**
2576
2653
  * Edits the guild member for the current user
@@ -2581,7 +2658,7 @@ var UsersAPI = class {
2581
2658
  * @param options - The options for editing the guild member
2582
2659
  */
2583
2660
  async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
2584
- return this.rest.patch(Routes15.guildMember(guildId, "@me"), {
2661
+ return this.rest.patch(Routes16.guildMember(guildId, "@me"), {
2585
2662
  reason,
2586
2663
  body,
2587
2664
  signal
@@ -2595,7 +2672,7 @@ var UsersAPI = class {
2595
2672
  * @param options - The options for opening the DM
2596
2673
  */
2597
2674
  async createDM(userId, { signal } = {}) {
2598
- return this.rest.post(Routes15.userChannels(), {
2675
+ return this.rest.post(Routes16.userChannels(), {
2599
2676
  body: { recipient_id: userId },
2600
2677
  signal
2601
2678
  });
@@ -2607,7 +2684,7 @@ var UsersAPI = class {
2607
2684
  * @param options - The options for fetching the user's connections
2608
2685
  */
2609
2686
  async getConnections({ signal } = {}) {
2610
- return this.rest.get(Routes15.userConnections(), { signal });
2687
+ return this.rest.get(Routes16.userConnections(), { signal });
2611
2688
  }
2612
2689
  /**
2613
2690
  * Gets the current user's active application role connection
@@ -2617,7 +2694,7 @@ var UsersAPI = class {
2617
2694
  * @param options - The options for fetching the role connections
2618
2695
  */
2619
2696
  async getApplicationRoleConnection(applicationId, { signal } = {}) {
2620
- return this.rest.get(Routes15.userApplicationRoleConnection(applicationId), {
2697
+ return this.rest.get(Routes16.userApplicationRoleConnection(applicationId), {
2621
2698
  signal
2622
2699
  });
2623
2700
  }
@@ -2630,7 +2707,7 @@ var UsersAPI = class {
2630
2707
  * @param options - The options for updating the application role connection
2631
2708
  */
2632
2709
  async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
2633
- return this.rest.put(Routes15.userApplicationRoleConnection(applicationId), {
2710
+ return this.rest.put(Routes16.userApplicationRoleConnection(applicationId), {
2634
2711
  body,
2635
2712
  signal
2636
2713
  });
@@ -2640,7 +2717,7 @@ var UsersAPI = class {
2640
2717
  // src/api/webhook.ts
2641
2718
  import { makeURLSearchParams as makeURLSearchParams9 } from "@discordjs/rest";
2642
2719
  import {
2643
- Routes as Routes16
2720
+ Routes as Routes17
2644
2721
  } from "discord-api-types/v10";
2645
2722
  var WebhooksAPI = class {
2646
2723
  constructor(rest) {
@@ -2658,7 +2735,7 @@ var WebhooksAPI = class {
2658
2735
  * @param options - The options for fetching the webhook
2659
2736
  */
2660
2737
  async get(id, { token, signal } = {}) {
2661
- return this.rest.get(Routes16.webhook(id, token), {
2738
+ return this.rest.get(Routes17.webhook(id, token), {
2662
2739
  signal,
2663
2740
  auth: !token
2664
2741
  });
@@ -2673,7 +2750,7 @@ var WebhooksAPI = class {
2673
2750
  * @param options - The options for editing the webhook
2674
2751
  */
2675
2752
  async edit(id, body, { token, reason, signal } = {}) {
2676
- return this.rest.patch(Routes16.webhook(id, token), {
2753
+ return this.rest.patch(Routes17.webhook(id, token), {
2677
2754
  reason,
2678
2755
  body,
2679
2756
  signal,
@@ -2689,7 +2766,7 @@ var WebhooksAPI = class {
2689
2766
  * @param options - The options for deleting the webhook
2690
2767
  */
2691
2768
  async delete(id, { token, reason, signal } = {}) {
2692
- await this.rest.delete(Routes16.webhook(id, token), {
2769
+ await this.rest.delete(Routes17.webhook(id, token), {
2693
2770
  reason,
2694
2771
  signal,
2695
2772
  auth: !token
@@ -2711,7 +2788,7 @@ var WebhooksAPI = class {
2711
2788
  files,
2712
2789
  ...body
2713
2790
  }, { signal } = {}) {
2714
- return this.rest.post(Routes16.webhook(id, token), {
2791
+ return this.rest.post(Routes17.webhook(id, token), {
2715
2792
  query: makeURLSearchParams9({ wait, thread_id, with_components }),
2716
2793
  files,
2717
2794
  body,
@@ -2731,7 +2808,7 @@ var WebhooksAPI = class {
2731
2808
  * @param options - The options for executing the webhook
2732
2809
  */
2733
2810
  async executeSlack(id, token, body, query = {}, { signal } = {}) {
2734
- await this.rest.post(Routes16.webhookPlatform(id, token, "slack"), {
2811
+ await this.rest.post(Routes17.webhookPlatform(id, token, "slack"), {
2735
2812
  query: makeURLSearchParams9(query),
2736
2813
  body,
2737
2814
  auth: false,
@@ -2749,7 +2826,7 @@ var WebhooksAPI = class {
2749
2826
  * @param options - The options for executing the webhook
2750
2827
  */
2751
2828
  async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2752
- await this.rest.post(Routes16.webhookPlatform(id, token, "github"), {
2829
+ await this.rest.post(Routes17.webhookPlatform(id, token, "github"), {
2753
2830
  query: makeURLSearchParams9(query),
2754
2831
  body,
2755
2832
  signal,
@@ -2767,7 +2844,7 @@ var WebhooksAPI = class {
2767
2844
  * @param options - The options for fetching the message
2768
2845
  */
2769
2846
  async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2770
- return this.rest.get(Routes16.webhookMessage(id, token, messageId), {
2847
+ return this.rest.get(Routes17.webhookMessage(id, token, messageId), {
2771
2848
  query: makeURLSearchParams9(query),
2772
2849
  auth: false,
2773
2850
  signal
@@ -2789,7 +2866,7 @@ var WebhooksAPI = class {
2789
2866
  files,
2790
2867
  ...body
2791
2868
  }, { signal } = {}) {
2792
- return this.rest.patch(Routes16.webhookMessage(id, token, messageId), {
2869
+ return this.rest.patch(Routes17.webhookMessage(id, token, messageId), {
2793
2870
  query: makeURLSearchParams9({ thread_id, with_components }),
2794
2871
  auth: false,
2795
2872
  body,
@@ -2808,7 +2885,7 @@ var WebhooksAPI = class {
2808
2885
  * @param options - The options for deleting the message
2809
2886
  */
2810
2887
  async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2811
- await this.rest.delete(Routes16.webhookMessage(id, token, messageId), {
2888
+ await this.rest.delete(Routes17.webhookMessage(id, token, messageId), {
2812
2889
  query: makeURLSearchParams9(query),
2813
2890
  auth: false,
2814
2891
  signal
@@ -2823,6 +2900,7 @@ var API = class {
2823
2900
  this.applicationCommands = new ApplicationCommandsAPI(rest);
2824
2901
  this.applications = new ApplicationsAPI(rest);
2825
2902
  this.channels = new ChannelsAPI(rest);
2903
+ this.gateway = new GatewayAPI(rest);
2826
2904
  this.guilds = new GuildsAPI(rest);
2827
2905
  this.invites = new InvitesAPI(rest);
2828
2906
  this.monetization = new MonetizationAPI(rest);
@@ -2843,6 +2921,7 @@ var API = class {
2843
2921
  applicationCommands;
2844
2922
  applications;
2845
2923
  channels;
2924
+ gateway;
2846
2925
  guilds;
2847
2926
  interactions;
2848
2927
  invites;
@@ -3026,13 +3105,14 @@ __name(withFiles, "withFiles");
3026
3105
 
3027
3106
  // src/index.ts
3028
3107
  export * from "discord-api-types/v10";
3029
- var version = "2.2.1";
3108
+ var version = "2.3.0";
3030
3109
  export {
3031
3110
  API,
3032
3111
  ApplicationCommandsAPI,
3033
3112
  ApplicationsAPI,
3034
3113
  ChannelsAPI,
3035
3114
  Client,
3115
+ GatewayAPI,
3036
3116
  GuildsAPI,
3037
3117
  InteractionsAPI,
3038
3118
  InvitesAPI,