@discordjs/core 3.0.0-dev.1733357587-d0dc86488 → 3.0.0-dev.1733443981-00dceb32b

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.
@@ -887,14 +887,19 @@ var GuildsAPI = class {
887
887
  static {
888
888
  __name(this, "GuildsAPI");
889
889
  }
890
- async get(guildId, queryOrOptions = {}, options = {}) {
891
- const requestData = {
892
- signal: ("signal" in queryOrOptions ? queryOrOptions : options).signal
893
- };
894
- if ("with_counts" in queryOrOptions) {
895
- requestData.query = makeURLSearchParams3(queryOrOptions);
896
- }
897
- return this.rest.get(Routes5.guild(guildId), requestData);
890
+ /**
891
+ * Fetches a guild
892
+ *
893
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
894
+ * @param guildId - The id of the guild
895
+ * @param query - The query options for fetching the guild
896
+ * @param options - The options for fetching the guild
897
+ */
898
+ async get(guildId, query = {}, { signal } = {}) {
899
+ return this.rest.get(Routes5.guild(guildId), {
900
+ query: makeURLSearchParams3(query),
901
+ signal
902
+ });
898
903
  }
899
904
  /**
900
905
  * Fetches a guild preview
@@ -1912,11 +1917,7 @@ var InteractionsAPI = class {
1912
1917
  static {
1913
1918
  __name(this, "InteractionsAPI");
1914
1919
  }
1915
- async reply(interactionId, interactionToken, {
1916
- files,
1917
- with_response,
1918
- ...data
1919
- }, { signal } = {}) {
1920
+ async reply(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
1920
1921
  const response = await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
1921
1922
  query: makeURLSearchParams4({ with_response }),
1922
1923
  files,
@@ -1929,10 +1930,7 @@ var InteractionsAPI = class {
1929
1930
  });
1930
1931
  return with_response ? response : void 0;
1931
1932
  }
1932
- async defer(interactionId, interactionToken, {
1933
- with_response,
1934
- ...data
1935
- } = {}, { signal } = {}) {
1933
+ async defer(interactionId, interactionToken, { with_response, ...data } = {}, { signal } = {}) {
1936
1934
  const response = await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
1937
1935
  query: makeURLSearchParams4({ with_response }),
1938
1936
  auth: false,
@@ -2013,11 +2011,7 @@ var InteractionsAPI = class {
2013
2011
  async deleteReply(applicationId, interactionToken, messageId, { signal } = {}) {
2014
2012
  await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? "@original", {}, { signal });
2015
2013
  }
2016
- async updateMessage(interactionId, interactionToken, {
2017
- files,
2018
- with_response,
2019
- ...data
2020
- }, { signal } = {}) {
2014
+ async updateMessage(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
2021
2015
  const response = await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2022
2016
  files,
2023
2017
  auth: false,
@@ -2029,10 +2023,7 @@ var InteractionsAPI = class {
2029
2023
  });
2030
2024
  return with_response ? response : void 0;
2031
2025
  }
2032
- async createAutocompleteResponse(interactionId, interactionToken, {
2033
- with_response,
2034
- ...data
2035
- }, { signal } = {}) {
2026
+ async createAutocompleteResponse(interactionId, interactionToken, { with_response, ...data }, { signal } = {}) {
2036
2027
  const response = await this.rest.post(Routes6.interactionCallback(interactionId, interactionToken), {
2037
2028
  auth: false,
2038
2029
  body: {
@@ -2173,6 +2164,19 @@ var MonetizationAPI = class {
2173
2164
  query: makeURLSearchParams6(query)
2174
2165
  });
2175
2166
  }
2167
+ /**
2168
+ * Fetches an entitlement for an application.
2169
+ *
2170
+ * @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
2171
+ * @param applicationId - The application id to fetch the entitlement for
2172
+ * @param entitlementId - The entitlement id to fetch
2173
+ * @param options - The options for fetching the entitlement
2174
+ */
2175
+ async getEntitlement(applicationId, entitlementId, { signal } = {}) {
2176
+ return this.rest.get(Routes8.entitlement(applicationId, entitlementId), {
2177
+ signal
2178
+ });
2179
+ }
2176
2180
  /**
2177
2181
  * Creates a test entitlement for an application's SKU.
2178
2182
  *
@@ -2836,12 +2840,7 @@ var WebhooksAPI = class {
2836
2840
  * @param body - The data for executing the webhook
2837
2841
  * @param options - The options for executing the webhook
2838
2842
  */
2839
- async execute(id, token, {
2840
- wait,
2841
- thread_id,
2842
- files,
2843
- ...body
2844
- }, { signal } = {}) {
2843
+ async execute(id, token, { wait, thread_id, files, ...body }, { signal } = {}) {
2845
2844
  return this.rest.post(Routes17.webhook(id, token), {
2846
2845
  query: makeURLSearchParams10({ wait, thread_id }),
2847
2846
  files,
@@ -2914,11 +2913,7 @@ var WebhooksAPI = class {
2914
2913
  * @param body - The data for editing the message
2915
2914
  * @param options - The options for editing the message
2916
2915
  */
2917
- async editMessage(id, token, messageId, {
2918
- thread_id,
2919
- files,
2920
- ...body
2921
- }, { signal } = {}) {
2916
+ async editMessage(id, token, messageId, { thread_id, files, ...body }, { signal } = {}) {
2922
2917
  return this.rest.patch(Routes17.webhookMessage(id, token, messageId), {
2923
2918
  query: makeURLSearchParams10({ thread_id }),
2924
2919
  auth: false,
@@ -3009,7 +3004,7 @@ __name(withFiles, "withFiles");
3009
3004
 
3010
3005
  // src/http-only/index.ts
3011
3006
  export * from "discord-api-types/v10";
3012
- var version = "3.0.0-dev.1733357587-d0dc86488";
3007
+ var version = "3.0.0-dev.1733443981-00dceb32b";
3013
3008
  export {
3014
3009
  API,
3015
3010
  ApplicationCommandsAPI,