@discordjs/core 1.1.2-dev.1703117367-891a67ac4 → 1.2.0-dev.1703462992-0f1e02b3d

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
@@ -29,6 +29,7 @@ __export(http_only_exports, {
29
29
  GuildsAPI: () => GuildsAPI,
30
30
  InteractionsAPI: () => InteractionsAPI,
31
31
  InvitesAPI: () => InvitesAPI,
32
+ MonetizationAPI: () => MonetizationAPI,
32
33
  OAuth2API: () => OAuth2API,
33
34
  RoleConnectionsAPI: () => RoleConnectionsAPI,
34
35
  StageInstancesAPI: () => StageInstancesAPI,
@@ -1824,6 +1825,23 @@ var InteractionsAPI = class {
1824
1825
  signal
1825
1826
  });
1826
1827
  }
1828
+ /**
1829
+ * Sends a premium required response to an interaction
1830
+ *
1831
+ * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
1832
+ * @param interactionId - The id of the interaction
1833
+ * @param interactionToken - The token of the interaction
1834
+ * @param options - The options for sending the premium required response
1835
+ */
1836
+ async sendPremiumRequired(interactionId, interactionToken, { signal } = {}) {
1837
+ await this.rest.post(import_v105.Routes.interactionCallback(interactionId, interactionToken), {
1838
+ auth: false,
1839
+ body: {
1840
+ type: import_v105.InteractionResponseType.PremiumRequired
1841
+ },
1842
+ signal
1843
+ });
1844
+ }
1827
1845
  };
1828
1846
 
1829
1847
  // src/api/invite.ts
@@ -1862,10 +1880,70 @@ var InvitesAPI = class {
1862
1880
  }
1863
1881
  };
1864
1882
 
1865
- // src/api/oauth2.ts
1866
- var import_node_url = require("url");
1883
+ // src/api/monetization.ts
1867
1884
  var import_rest5 = require("@discordjs/rest");
1868
1885
  var import_v107 = require("discord-api-types/v10");
1886
+ var MonetizationAPI = class {
1887
+ constructor(rest) {
1888
+ this.rest = rest;
1889
+ }
1890
+ static {
1891
+ __name(this, "MonetizationAPI");
1892
+ }
1893
+ /**
1894
+ * Fetches the SKUs for an application.
1895
+ *
1896
+ * @see {@link https://discord.com/developers/docs/monetization/skus#list-skus}
1897
+ * @param options - The options for fetching the SKUs.
1898
+ */
1899
+ async getSKUs(applicationId, { signal } = {}) {
1900
+ return this.rest.get(import_v107.Routes.skus(applicationId), { signal });
1901
+ }
1902
+ /**
1903
+ * Fetches the entitlements for an application.
1904
+ *
1905
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#list-entitlements}
1906
+ * @param applicationId - The application id to fetch entitlements for
1907
+ * @param query - The query options for fetching entitlements
1908
+ * @param options - The options for fetching entitlements
1909
+ */
1910
+ async getEntitlements(applicationId, query, { signal } = {}) {
1911
+ return this.rest.get(import_v107.Routes.entitlements(applicationId), {
1912
+ signal,
1913
+ query: (0, import_rest5.makeURLSearchParams)(query)
1914
+ });
1915
+ }
1916
+ /**
1917
+ * Creates a test entitlement for an application's SKU.
1918
+ *
1919
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement}
1920
+ * @param applicationId - The application id to create the entitlement for
1921
+ * @param body - The data for creating the entitlement
1922
+ * @param options - The options for creating the entitlement
1923
+ */
1924
+ async createTestEntitlement(applicationId, body, { signal } = {}) {
1925
+ return this.rest.post(import_v107.Routes.entitlements(applicationId), {
1926
+ body,
1927
+ signal
1928
+ });
1929
+ }
1930
+ /**
1931
+ * Deletes a test entitlement for an application's SKU.
1932
+ *
1933
+ * @see {@link https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement}
1934
+ * @param applicationId - The application id to delete the entitlement for
1935
+ * @param entitlementId - The entitlement id to delete
1936
+ * @param options - The options for deleting the entitlement
1937
+ */
1938
+ async deleteTestEntitlement(applicationId, entitlementId, { signal } = {}) {
1939
+ await this.rest.delete(import_v107.Routes.entitlement(applicationId, entitlementId), { signal });
1940
+ }
1941
+ };
1942
+
1943
+ // src/api/oauth2.ts
1944
+ var import_node_url = require("url");
1945
+ var import_rest6 = require("@discordjs/rest");
1946
+ var import_v108 = require("discord-api-types/v10");
1869
1947
  var OAuth2API = class {
1870
1948
  constructor(rest) {
1871
1949
  this.rest = rest;
@@ -1880,8 +1958,8 @@ var OAuth2API = class {
1880
1958
  * @param options - The options for creating the authorization URL
1881
1959
  */
1882
1960
  generateAuthorizationURL(options) {
1883
- const url = new import_node_url.URL(`${import_v107.RouteBases.api}${import_v107.Routes.oauth2Authorization()}`);
1884
- url.search = (0, import_rest5.makeURLSearchParams)(options).toString();
1961
+ const url = new import_node_url.URL(`${import_v108.RouteBases.api}${import_v108.Routes.oauth2Authorization()}`);
1962
+ url.search = (0, import_rest6.makeURLSearchParams)(options).toString();
1885
1963
  return url.toString();
1886
1964
  }
1887
1965
  /**
@@ -1892,8 +1970,8 @@ var OAuth2API = class {
1892
1970
  * @param options - The options for the token exchange request
1893
1971
  */
1894
1972
  async tokenExchange(body, { signal } = {}) {
1895
- return this.rest.post(import_v107.Routes.oauth2TokenExchange(), {
1896
- body: (0, import_rest5.makeURLSearchParams)(body),
1973
+ return this.rest.post(import_v108.Routes.oauth2TokenExchange(), {
1974
+ body: (0, import_rest6.makeURLSearchParams)(body),
1897
1975
  passThroughBody: true,
1898
1976
  headers: {
1899
1977
  "Content-Type": "application/x-www-form-urlencoded"
@@ -1909,8 +1987,8 @@ var OAuth2API = class {
1909
1987
  * @param options - The options for the refresh token request
1910
1988
  */
1911
1989
  async refreshToken(body, { signal } = {}) {
1912
- return this.rest.post(import_v107.Routes.oauth2TokenExchange(), {
1913
- body: (0, import_rest5.makeURLSearchParams)(body),
1990
+ return this.rest.post(import_v108.Routes.oauth2TokenExchange(), {
1991
+ body: (0, import_rest6.makeURLSearchParams)(body),
1914
1992
  passThroughBody: true,
1915
1993
  headers: {
1916
1994
  "Content-Type": "application/x-www-form-urlencoded"
@@ -1928,8 +2006,8 @@ var OAuth2API = class {
1928
2006
  * @param options - The options for the client credentials grant request
1929
2007
  */
1930
2008
  async getToken(body, { signal } = {}) {
1931
- return this.rest.post(import_v107.Routes.oauth2TokenExchange(), {
1932
- body: (0, import_rest5.makeURLSearchParams)(body),
2009
+ return this.rest.post(import_v108.Routes.oauth2TokenExchange(), {
2010
+ body: (0, import_rest6.makeURLSearchParams)(body),
1933
2011
  passThroughBody: true,
1934
2012
  headers: {
1935
2013
  "Content-Type": "application/x-www-form-urlencoded"
@@ -1944,7 +2022,7 @@ var OAuth2API = class {
1944
2022
  * @param options - The options for the current bot application information request
1945
2023
  */
1946
2024
  async getCurrentBotApplicationInformation({ signal } = {}) {
1947
- return this.rest.get(import_v107.Routes.oauth2CurrentApplication(), {
2025
+ return this.rest.get(import_v108.Routes.oauth2CurrentApplication(), {
1948
2026
  signal
1949
2027
  });
1950
2028
  }
@@ -1955,14 +2033,14 @@ var OAuth2API = class {
1955
2033
  * @param options - The options for the current authorization information request
1956
2034
  */
1957
2035
  async getCurrentAuthorizationInformation({ signal } = {}) {
1958
- return this.rest.get(import_v107.Routes.oauth2CurrentAuthorization(), {
2036
+ return this.rest.get(import_v108.Routes.oauth2CurrentAuthorization(), {
1959
2037
  signal
1960
2038
  });
1961
2039
  }
1962
2040
  };
1963
2041
 
1964
2042
  // src/api/roleConnections.ts
1965
- var import_v108 = require("discord-api-types/v10");
2043
+ var import_v109 = require("discord-api-types/v10");
1966
2044
  var RoleConnectionsAPI = class {
1967
2045
  constructor(rest) {
1968
2046
  this.rest = rest;
@@ -1978,7 +2056,7 @@ var RoleConnectionsAPI = class {
1978
2056
  * @param options - The options for fetching the role connection metadata records
1979
2057
  */
1980
2058
  async getMetadataRecords(applicationId, { signal } = {}) {
1981
- return this.rest.get(import_v108.Routes.applicationRoleConnectionMetadata(applicationId), {
2059
+ return this.rest.get(import_v109.Routes.applicationRoleConnectionMetadata(applicationId), {
1982
2060
  signal
1983
2061
  });
1984
2062
  }
@@ -1991,7 +2069,7 @@ var RoleConnectionsAPI = class {
1991
2069
  * @param options - The options for updating the role connection metadata records
1992
2070
  */
1993
2071
  async updateMetadataRecords(applicationId, body, { signal } = {}) {
1994
- return this.rest.put(import_v108.Routes.applicationRoleConnectionMetadata(applicationId), {
2072
+ return this.rest.put(import_v109.Routes.applicationRoleConnectionMetadata(applicationId), {
1995
2073
  body,
1996
2074
  signal
1997
2075
  });
@@ -1999,7 +2077,7 @@ var RoleConnectionsAPI = class {
1999
2077
  };
2000
2078
 
2001
2079
  // src/api/stageInstances.ts
2002
- var import_v109 = require("discord-api-types/v10");
2080
+ var import_v1010 = require("discord-api-types/v10");
2003
2081
  var StageInstancesAPI = class {
2004
2082
  constructor(rest) {
2005
2083
  this.rest = rest;
@@ -2015,7 +2093,7 @@ var StageInstancesAPI = class {
2015
2093
  * @param options - The options for creating the new stage instance
2016
2094
  */
2017
2095
  async create(body, { reason, signal } = {}) {
2018
- return this.rest.post(import_v109.Routes.stageInstances(), {
2096
+ return this.rest.post(import_v1010.Routes.stageInstances(), {
2019
2097
  body,
2020
2098
  reason,
2021
2099
  signal
@@ -2029,7 +2107,7 @@ var StageInstancesAPI = class {
2029
2107
  * @param options - The options for fetching the stage instance
2030
2108
  */
2031
2109
  async get(channelId, { signal } = {}) {
2032
- return this.rest.get(import_v109.Routes.stageInstance(channelId), { signal });
2110
+ return this.rest.get(import_v1010.Routes.stageInstance(channelId), { signal });
2033
2111
  }
2034
2112
  /**
2035
2113
  * Edits a stage instance
@@ -2040,7 +2118,7 @@ var StageInstancesAPI = class {
2040
2118
  * @param options - The options for editing the stage instance
2041
2119
  */
2042
2120
  async edit(channelId, body, { reason, signal } = {}) {
2043
- return this.rest.patch(import_v109.Routes.stageInstance(channelId), {
2121
+ return this.rest.patch(import_v1010.Routes.stageInstance(channelId), {
2044
2122
  body,
2045
2123
  reason,
2046
2124
  signal
@@ -2054,12 +2132,12 @@ var StageInstancesAPI = class {
2054
2132
  * @param options - The options for deleting the stage instance
2055
2133
  */
2056
2134
  async delete(channelId, { reason, signal } = {}) {
2057
- await this.rest.delete(import_v109.Routes.stageInstance(channelId), { reason, signal });
2135
+ await this.rest.delete(import_v1010.Routes.stageInstance(channelId), { reason, signal });
2058
2136
  }
2059
2137
  };
2060
2138
 
2061
2139
  // src/api/sticker.ts
2062
- var import_v1010 = require("discord-api-types/v10");
2140
+ var import_v1011 = require("discord-api-types/v10");
2063
2141
  var StickersAPI = class {
2064
2142
  constructor(rest) {
2065
2143
  this.rest = rest;
@@ -2074,7 +2152,7 @@ var StickersAPI = class {
2074
2152
  * @param options - The options for fetching the sticker packs
2075
2153
  */
2076
2154
  async getStickers({ signal } = {}) {
2077
- return this.rest.get(import_v1010.Routes.stickerPacks(), { signal });
2155
+ return this.rest.get(import_v1011.Routes.stickerPacks(), { signal });
2078
2156
  }
2079
2157
  /**
2080
2158
  * Fetches all of the sticker packs
@@ -2094,12 +2172,12 @@ var StickersAPI = class {
2094
2172
  * @param options - The options for fetching the sticker
2095
2173
  */
2096
2174
  async get(stickerId, { signal } = {}) {
2097
- return this.rest.get(import_v1010.Routes.sticker(stickerId), { signal });
2175
+ return this.rest.get(import_v1011.Routes.sticker(stickerId), { signal });
2098
2176
  }
2099
2177
  };
2100
2178
 
2101
2179
  // src/api/thread.ts
2102
- var import_v1011 = require("discord-api-types/v10");
2180
+ var import_v1012 = require("discord-api-types/v10");
2103
2181
  var ThreadsAPI = class {
2104
2182
  constructor(rest) {
2105
2183
  this.rest = rest;
@@ -2115,7 +2193,7 @@ var ThreadsAPI = class {
2115
2193
  * @param options - The options for joining the thread
2116
2194
  */
2117
2195
  async join(threadId, { signal } = {}) {
2118
- await this.rest.put(import_v1011.Routes.threadMembers(threadId, "@me"), { signal });
2196
+ await this.rest.put(import_v1012.Routes.threadMembers(threadId, "@me"), { signal });
2119
2197
  }
2120
2198
  /**
2121
2199
  * Adds a member to a thread
@@ -2126,7 +2204,7 @@ var ThreadsAPI = class {
2126
2204
  * @param options - The options for adding the member to the thread
2127
2205
  */
2128
2206
  async addMember(threadId, userId, { signal } = {}) {
2129
- await this.rest.put(import_v1011.Routes.threadMembers(threadId, userId), { signal });
2207
+ await this.rest.put(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2130
2208
  }
2131
2209
  /**
2132
2210
  * Removes the current user from a thread
@@ -2136,7 +2214,7 @@ var ThreadsAPI = class {
2136
2214
  * @param options - The options for leaving the thread
2137
2215
  */
2138
2216
  async leave(threadId, { signal } = {}) {
2139
- await this.rest.delete(import_v1011.Routes.threadMembers(threadId, "@me"), { signal });
2217
+ await this.rest.delete(import_v1012.Routes.threadMembers(threadId, "@me"), { signal });
2140
2218
  }
2141
2219
  /**
2142
2220
  * Removes a member from a thread
@@ -2147,7 +2225,7 @@ var ThreadsAPI = class {
2147
2225
  * @param options - The options for removing the member from the thread
2148
2226
  */
2149
2227
  async removeMember(threadId, userId, { signal } = {}) {
2150
- await this.rest.delete(import_v1011.Routes.threadMembers(threadId, userId), { signal });
2228
+ await this.rest.delete(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2151
2229
  }
2152
2230
  /**
2153
2231
  * Fetches a member of a thread
@@ -2158,7 +2236,7 @@ var ThreadsAPI = class {
2158
2236
  * @param options - The options for fetching the member
2159
2237
  */
2160
2238
  async getMember(threadId, userId, { signal } = {}) {
2161
- return this.rest.get(import_v1011.Routes.threadMembers(threadId, userId), { signal });
2239
+ return this.rest.get(import_v1012.Routes.threadMembers(threadId, userId), { signal });
2162
2240
  }
2163
2241
  /**
2164
2242
  * Fetches all members of a thread
@@ -2168,13 +2246,13 @@ var ThreadsAPI = class {
2168
2246
  * @param options - The options for fetching the members
2169
2247
  */
2170
2248
  async getAllMembers(threadId, { signal } = {}) {
2171
- return this.rest.get(import_v1011.Routes.threadMembers(threadId), { signal });
2249
+ return this.rest.get(import_v1012.Routes.threadMembers(threadId), { signal });
2172
2250
  }
2173
2251
  };
2174
2252
 
2175
2253
  // src/api/user.ts
2176
- var import_rest6 = require("@discordjs/rest");
2177
- var import_v1012 = require("discord-api-types/v10");
2254
+ var import_rest7 = require("@discordjs/rest");
2255
+ var import_v1013 = require("discord-api-types/v10");
2178
2256
  var UsersAPI = class {
2179
2257
  constructor(rest) {
2180
2258
  this.rest = rest;
@@ -2190,7 +2268,7 @@ var UsersAPI = class {
2190
2268
  * @param options - The options for fetching the user
2191
2269
  */
2192
2270
  async get(userId, { signal } = {}) {
2193
- return this.rest.get(import_v1012.Routes.user(userId), { signal });
2271
+ return this.rest.get(import_v1013.Routes.user(userId), { signal });
2194
2272
  }
2195
2273
  /**
2196
2274
  * Returns the user object of the requester's account
@@ -2199,7 +2277,7 @@ var UsersAPI = class {
2199
2277
  * @param options - The options for fetching the current user
2200
2278
  */
2201
2279
  async getCurrent({ signal } = {}) {
2202
- return this.rest.get(import_v1012.Routes.user("@me"), { signal });
2280
+ return this.rest.get(import_v1013.Routes.user("@me"), { signal });
2203
2281
  }
2204
2282
  /**
2205
2283
  * Returns a list of partial guild objects the current user is a member of
@@ -2209,8 +2287,8 @@ var UsersAPI = class {
2209
2287
  * @param options - The options for fetching the guilds
2210
2288
  */
2211
2289
  async getGuilds(query = {}, { signal } = {}) {
2212
- return this.rest.get(import_v1012.Routes.userGuilds(), {
2213
- query: (0, import_rest6.makeURLSearchParams)(query),
2290
+ return this.rest.get(import_v1013.Routes.userGuilds(), {
2291
+ query: (0, import_rest7.makeURLSearchParams)(query),
2214
2292
  signal
2215
2293
  });
2216
2294
  }
@@ -2222,7 +2300,7 @@ var UsersAPI = class {
2222
2300
  * @param options - The options for leaving the guild
2223
2301
  */
2224
2302
  async leaveGuild(guildId, { signal } = {}) {
2225
- await this.rest.delete(import_v1012.Routes.userGuild(guildId), { signal });
2303
+ await this.rest.delete(import_v1013.Routes.userGuild(guildId), { signal });
2226
2304
  }
2227
2305
  /**
2228
2306
  * Edits the current user
@@ -2232,7 +2310,7 @@ var UsersAPI = class {
2232
2310
  * @param options - The options for editing the user
2233
2311
  */
2234
2312
  async edit(body, { signal } = {}) {
2235
- return this.rest.patch(import_v1012.Routes.user("@me"), { body, signal });
2313
+ return this.rest.patch(import_v1013.Routes.user("@me"), { body, signal });
2236
2314
  }
2237
2315
  /**
2238
2316
  * Fetches the guild member for the current user
@@ -2242,7 +2320,7 @@ var UsersAPI = class {
2242
2320
  * @param options - The options for fetching the guild member
2243
2321
  */
2244
2322
  async getGuildMember(guildId, { signal } = {}) {
2245
- return this.rest.get(import_v1012.Routes.userGuildMember(guildId), { signal });
2323
+ return this.rest.get(import_v1013.Routes.userGuildMember(guildId), { signal });
2246
2324
  }
2247
2325
  /**
2248
2326
  * Edits the guild member for the current user
@@ -2253,7 +2331,7 @@ var UsersAPI = class {
2253
2331
  * @param options - The options for editing the guild member
2254
2332
  */
2255
2333
  async editCurrentGuildMember(guildId, body = {}, { reason, signal } = {}) {
2256
- return this.rest.patch(import_v1012.Routes.guildMember(guildId, "@me"), {
2334
+ return this.rest.patch(import_v1013.Routes.guildMember(guildId, "@me"), {
2257
2335
  reason,
2258
2336
  body,
2259
2337
  signal
@@ -2267,7 +2345,7 @@ var UsersAPI = class {
2267
2345
  * @param options - The options for opening the DM
2268
2346
  */
2269
2347
  async createDM(userId, { signal } = {}) {
2270
- return this.rest.post(import_v1012.Routes.userChannels(), {
2348
+ return this.rest.post(import_v1013.Routes.userChannels(), {
2271
2349
  body: { recipient_id: userId },
2272
2350
  signal
2273
2351
  });
@@ -2279,7 +2357,7 @@ var UsersAPI = class {
2279
2357
  * @param options - The options for fetching the user's connections
2280
2358
  */
2281
2359
  async getConnections({ signal } = {}) {
2282
- return this.rest.get(import_v1012.Routes.userConnections(), { signal });
2360
+ return this.rest.get(import_v1013.Routes.userConnections(), { signal });
2283
2361
  }
2284
2362
  /**
2285
2363
  * Gets the current user's active application role connection
@@ -2289,7 +2367,7 @@ var UsersAPI = class {
2289
2367
  * @param options - The options for fetching the role connections
2290
2368
  */
2291
2369
  async getApplicationRoleConnection(applicationId, { signal } = {}) {
2292
- return this.rest.get(import_v1012.Routes.userApplicationRoleConnection(applicationId), {
2370
+ return this.rest.get(import_v1013.Routes.userApplicationRoleConnection(applicationId), {
2293
2371
  signal
2294
2372
  });
2295
2373
  }
@@ -2302,7 +2380,7 @@ var UsersAPI = class {
2302
2380
  * @param options - The options for updating the application role connection
2303
2381
  */
2304
2382
  async updateApplicationRoleConnection(applicationId, body, { signal } = {}) {
2305
- return this.rest.put(import_v1012.Routes.userApplicationRoleConnection(applicationId), {
2383
+ return this.rest.put(import_v1013.Routes.userApplicationRoleConnection(applicationId), {
2306
2384
  body,
2307
2385
  signal
2308
2386
  });
@@ -2310,7 +2388,7 @@ var UsersAPI = class {
2310
2388
  };
2311
2389
 
2312
2390
  // src/api/voice.ts
2313
- var import_v1013 = require("discord-api-types/v10");
2391
+ var import_v1014 = require("discord-api-types/v10");
2314
2392
  var VoiceAPI = class {
2315
2393
  constructor(rest) {
2316
2394
  this.rest = rest;
@@ -2325,13 +2403,13 @@ var VoiceAPI = class {
2325
2403
  * @param options - The options for fetching the voice regions
2326
2404
  */
2327
2405
  async getVoiceRegions({ signal } = {}) {
2328
- return this.rest.get(import_v1013.Routes.voiceRegions(), { signal });
2406
+ return this.rest.get(import_v1014.Routes.voiceRegions(), { signal });
2329
2407
  }
2330
2408
  };
2331
2409
 
2332
2410
  // src/api/webhook.ts
2333
- var import_rest7 = require("@discordjs/rest");
2334
- var import_v1014 = require("discord-api-types/v10");
2411
+ var import_rest8 = require("@discordjs/rest");
2412
+ var import_v1015 = require("discord-api-types/v10");
2335
2413
  var WebhooksAPI = class {
2336
2414
  constructor(rest) {
2337
2415
  this.rest = rest;
@@ -2348,7 +2426,7 @@ var WebhooksAPI = class {
2348
2426
  * @param options - The options for fetching the webhook
2349
2427
  */
2350
2428
  async get(id, { token, signal } = {}) {
2351
- return this.rest.get(import_v1014.Routes.webhook(id, token), {
2429
+ return this.rest.get(import_v1015.Routes.webhook(id, token), {
2352
2430
  signal,
2353
2431
  auth: !token
2354
2432
  });
@@ -2363,7 +2441,7 @@ var WebhooksAPI = class {
2363
2441
  * @param options - The options for editing the webhook
2364
2442
  */
2365
2443
  async edit(id, body, { token, reason, signal } = {}) {
2366
- return this.rest.patch(import_v1014.Routes.webhook(id, token), {
2444
+ return this.rest.patch(import_v1015.Routes.webhook(id, token), {
2367
2445
  reason,
2368
2446
  body,
2369
2447
  signal,
@@ -2379,7 +2457,7 @@ var WebhooksAPI = class {
2379
2457
  * @param options - The options for deleting the webhook
2380
2458
  */
2381
2459
  async delete(id, { token, reason, signal } = {}) {
2382
- await this.rest.delete(import_v1014.Routes.webhook(id, token), {
2460
+ await this.rest.delete(import_v1015.Routes.webhook(id, token), {
2383
2461
  reason,
2384
2462
  signal,
2385
2463
  auth: !token
@@ -2400,8 +2478,8 @@ var WebhooksAPI = class {
2400
2478
  files,
2401
2479
  ...body
2402
2480
  }, { signal } = {}) {
2403
- return this.rest.post(import_v1014.Routes.webhook(id, token), {
2404
- query: (0, import_rest7.makeURLSearchParams)({ wait, thread_id }),
2481
+ return this.rest.post(import_v1015.Routes.webhook(id, token), {
2482
+ query: (0, import_rest8.makeURLSearchParams)({ wait, thread_id }),
2405
2483
  files,
2406
2484
  body,
2407
2485
  auth: false,
@@ -2420,8 +2498,8 @@ var WebhooksAPI = class {
2420
2498
  * @param options - The options for executing the webhook
2421
2499
  */
2422
2500
  async executeSlack(id, token, body, query = {}, { signal } = {}) {
2423
- await this.rest.post(import_v1014.Routes.webhookPlatform(id, token, "slack"), {
2424
- query: (0, import_rest7.makeURLSearchParams)(query),
2501
+ await this.rest.post(import_v1015.Routes.webhookPlatform(id, token, "slack"), {
2502
+ query: (0, import_rest8.makeURLSearchParams)(query),
2425
2503
  body,
2426
2504
  auth: false,
2427
2505
  signal
@@ -2438,8 +2516,8 @@ var WebhooksAPI = class {
2438
2516
  * @param options - The options for executing the webhook
2439
2517
  */
2440
2518
  async executeGitHub(id, token, body, query = {}, { signal } = {}) {
2441
- await this.rest.post(import_v1014.Routes.webhookPlatform(id, token, "github"), {
2442
- query: (0, import_rest7.makeURLSearchParams)(query),
2519
+ await this.rest.post(import_v1015.Routes.webhookPlatform(id, token, "github"), {
2520
+ query: (0, import_rest8.makeURLSearchParams)(query),
2443
2521
  body,
2444
2522
  signal,
2445
2523
  auth: false
@@ -2456,8 +2534,8 @@ var WebhooksAPI = class {
2456
2534
  * @param options - The options for fetching the message
2457
2535
  */
2458
2536
  async getMessage(id, token, messageId, query = {}, { signal } = {}) {
2459
- return this.rest.get(import_v1014.Routes.webhookMessage(id, token, messageId), {
2460
- query: (0, import_rest7.makeURLSearchParams)(query),
2537
+ return this.rest.get(import_v1015.Routes.webhookMessage(id, token, messageId), {
2538
+ query: (0, import_rest8.makeURLSearchParams)(query),
2461
2539
  auth: false,
2462
2540
  signal
2463
2541
  });
@@ -2477,8 +2555,8 @@ var WebhooksAPI = class {
2477
2555
  files,
2478
2556
  ...body
2479
2557
  }, { signal } = {}) {
2480
- return this.rest.patch(import_v1014.Routes.webhookMessage(id, token, messageId), {
2481
- query: (0, import_rest7.makeURLSearchParams)({ thread_id }),
2558
+ return this.rest.patch(import_v1015.Routes.webhookMessage(id, token, messageId), {
2559
+ query: (0, import_rest8.makeURLSearchParams)({ thread_id }),
2482
2560
  auth: false,
2483
2561
  body,
2484
2562
  signal,
@@ -2496,8 +2574,8 @@ var WebhooksAPI = class {
2496
2574
  * @param options - The options for deleting the message
2497
2575
  */
2498
2576
  async deleteMessage(id, token, messageId, query = {}, { signal } = {}) {
2499
- await this.rest.delete(import_v1014.Routes.webhookMessage(id, token, messageId), {
2500
- query: (0, import_rest7.makeURLSearchParams)(query),
2577
+ await this.rest.delete(import_v1015.Routes.webhookMessage(id, token, messageId), {
2578
+ query: (0, import_rest8.makeURLSearchParams)(query),
2501
2579
  auth: false,
2502
2580
  signal
2503
2581
  });
@@ -2513,6 +2591,7 @@ var API = class {
2513
2591
  this.channels = new ChannelsAPI(rest);
2514
2592
  this.guilds = new GuildsAPI(rest);
2515
2593
  this.invites = new InvitesAPI(rest);
2594
+ this.monetization = new MonetizationAPI(rest);
2516
2595
  this.roleConnections = new RoleConnectionsAPI(rest);
2517
2596
  this.oauth2 = new OAuth2API(rest);
2518
2597
  this.stageInstances = new StageInstancesAPI(rest);
@@ -2532,6 +2611,7 @@ var API = class {
2532
2611
  guilds;
2533
2612
  interactions;
2534
2613
  invites;
2614
+ monetization;
2535
2615
  oauth2;
2536
2616
  roleConnections;
2537
2617
  stageInstances;
@@ -2561,7 +2641,7 @@ __name(withFiles, "withFiles");
2561
2641
 
2562
2642
  // src/http-only/index.ts
2563
2643
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2564
- var version = "1.1.2-dev.1703117367-891a67ac4";
2644
+ var version = "1.2.0-dev.1703462992-0f1e02b3d";
2565
2645
  // Annotate the CommonJS export names for ESM import in node:
2566
2646
  0 && (module.exports = {
2567
2647
  API,
@@ -2571,6 +2651,7 @@ var version = "1.1.2-dev.1703117367-891a67ac4";
2571
2651
  GuildsAPI,
2572
2652
  InteractionsAPI,
2573
2653
  InvitesAPI,
2654
+ MonetizationAPI,
2574
2655
  OAuth2API,
2575
2656
  RoleConnectionsAPI,
2576
2657
  StageInstancesAPI,