@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.
- package/dist/http-only.d.mts +61 -49
- package/dist/http-only.d.ts +61 -49
- package/dist/http-only.js +33 -38
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +33 -38
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +61 -49
- package/dist/index.d.ts +61 -49
- package/dist/index.js +33 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/http-only.js
CHANGED
|
@@ -921,14 +921,19 @@ var GuildsAPI = class {
|
|
|
921
921
|
static {
|
|
922
922
|
__name(this, "GuildsAPI");
|
|
923
923
|
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
924
|
+
/**
|
|
925
|
+
* Fetches a guild
|
|
926
|
+
*
|
|
927
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild}
|
|
928
|
+
* @param guildId - The id of the guild
|
|
929
|
+
* @param query - The query options for fetching the guild
|
|
930
|
+
* @param options - The options for fetching the guild
|
|
931
|
+
*/
|
|
932
|
+
async get(guildId, query = {}, { signal } = {}) {
|
|
933
|
+
return this.rest.get(import_v105.Routes.guild(guildId), {
|
|
934
|
+
query: (0, import_rest3.makeURLSearchParams)(query),
|
|
935
|
+
signal
|
|
936
|
+
});
|
|
932
937
|
}
|
|
933
938
|
/**
|
|
934
939
|
* Fetches a guild preview
|
|
@@ -1943,11 +1948,7 @@ var InteractionsAPI = class {
|
|
|
1943
1948
|
static {
|
|
1944
1949
|
__name(this, "InteractionsAPI");
|
|
1945
1950
|
}
|
|
1946
|
-
async reply(interactionId, interactionToken, {
|
|
1947
|
-
files,
|
|
1948
|
-
with_response,
|
|
1949
|
-
...data
|
|
1950
|
-
}, { signal } = {}) {
|
|
1951
|
+
async reply(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
|
|
1951
1952
|
const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
|
|
1952
1953
|
query: (0, import_rest4.makeURLSearchParams)({ with_response }),
|
|
1953
1954
|
files,
|
|
@@ -1960,10 +1961,7 @@ var InteractionsAPI = class {
|
|
|
1960
1961
|
});
|
|
1961
1962
|
return with_response ? response : void 0;
|
|
1962
1963
|
}
|
|
1963
|
-
async defer(interactionId, interactionToken, {
|
|
1964
|
-
with_response,
|
|
1965
|
-
...data
|
|
1966
|
-
} = {}, { signal } = {}) {
|
|
1964
|
+
async defer(interactionId, interactionToken, { with_response, ...data } = {}, { signal } = {}) {
|
|
1967
1965
|
const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
|
|
1968
1966
|
query: (0, import_rest4.makeURLSearchParams)({ with_response }),
|
|
1969
1967
|
auth: false,
|
|
@@ -2044,11 +2042,7 @@ var InteractionsAPI = class {
|
|
|
2044
2042
|
async deleteReply(applicationId, interactionToken, messageId, { signal } = {}) {
|
|
2045
2043
|
await this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? "@original", {}, { signal });
|
|
2046
2044
|
}
|
|
2047
|
-
async updateMessage(interactionId, interactionToken, {
|
|
2048
|
-
files,
|
|
2049
|
-
with_response,
|
|
2050
|
-
...data
|
|
2051
|
-
}, { signal } = {}) {
|
|
2045
|
+
async updateMessage(interactionId, interactionToken, { files, with_response, ...data }, { signal } = {}) {
|
|
2052
2046
|
const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
|
|
2053
2047
|
files,
|
|
2054
2048
|
auth: false,
|
|
@@ -2060,10 +2054,7 @@ var InteractionsAPI = class {
|
|
|
2060
2054
|
});
|
|
2061
2055
|
return with_response ? response : void 0;
|
|
2062
2056
|
}
|
|
2063
|
-
async createAutocompleteResponse(interactionId, interactionToken, {
|
|
2064
|
-
with_response,
|
|
2065
|
-
...data
|
|
2066
|
-
}, { signal } = {}) {
|
|
2057
|
+
async createAutocompleteResponse(interactionId, interactionToken, { with_response, ...data }, { signal } = {}) {
|
|
2067
2058
|
const response = await this.rest.post(import_v106.Routes.interactionCallback(interactionId, interactionToken), {
|
|
2068
2059
|
auth: false,
|
|
2069
2060
|
body: {
|
|
@@ -2202,6 +2193,19 @@ var MonetizationAPI = class {
|
|
|
2202
2193
|
query: (0, import_rest6.makeURLSearchParams)(query)
|
|
2203
2194
|
});
|
|
2204
2195
|
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Fetches an entitlement for an application.
|
|
2198
|
+
*
|
|
2199
|
+
* @see {@link https://discord.com/developers/docs/resources/entitlement#get-entitlement}
|
|
2200
|
+
* @param applicationId - The application id to fetch the entitlement for
|
|
2201
|
+
* @param entitlementId - The entitlement id to fetch
|
|
2202
|
+
* @param options - The options for fetching the entitlement
|
|
2203
|
+
*/
|
|
2204
|
+
async getEntitlement(applicationId, entitlementId, { signal } = {}) {
|
|
2205
|
+
return this.rest.get(import_v108.Routes.entitlement(applicationId, entitlementId), {
|
|
2206
|
+
signal
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2205
2209
|
/**
|
|
2206
2210
|
* Creates a test entitlement for an application's SKU.
|
|
2207
2211
|
*
|
|
@@ -2848,12 +2852,7 @@ var WebhooksAPI = class {
|
|
|
2848
2852
|
* @param body - The data for executing the webhook
|
|
2849
2853
|
* @param options - The options for executing the webhook
|
|
2850
2854
|
*/
|
|
2851
|
-
async execute(id, token, {
|
|
2852
|
-
wait,
|
|
2853
|
-
thread_id,
|
|
2854
|
-
files,
|
|
2855
|
-
...body
|
|
2856
|
-
}, { signal } = {}) {
|
|
2855
|
+
async execute(id, token, { wait, thread_id, files, ...body }, { signal } = {}) {
|
|
2857
2856
|
return this.rest.post(import_v1017.Routes.webhook(id, token), {
|
|
2858
2857
|
query: (0, import_rest10.makeURLSearchParams)({ wait, thread_id }),
|
|
2859
2858
|
files,
|
|
@@ -2926,11 +2925,7 @@ var WebhooksAPI = class {
|
|
|
2926
2925
|
* @param body - The data for editing the message
|
|
2927
2926
|
* @param options - The options for editing the message
|
|
2928
2927
|
*/
|
|
2929
|
-
async editMessage(id, token, messageId, {
|
|
2930
|
-
thread_id,
|
|
2931
|
-
files,
|
|
2932
|
-
...body
|
|
2933
|
-
}, { signal } = {}) {
|
|
2928
|
+
async editMessage(id, token, messageId, { thread_id, files, ...body }, { signal } = {}) {
|
|
2934
2929
|
return this.rest.patch(import_v1017.Routes.webhookMessage(id, token, messageId), {
|
|
2935
2930
|
query: (0, import_rest10.makeURLSearchParams)({ thread_id }),
|
|
2936
2931
|
auth: false,
|
|
@@ -3021,7 +3016,7 @@ __name(withFiles, "withFiles");
|
|
|
3021
3016
|
|
|
3022
3017
|
// src/http-only/index.ts
|
|
3023
3018
|
__reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
|
|
3024
|
-
var version = "3.0.0-dev.
|
|
3019
|
+
var version = "3.0.0-dev.1733443981-00dceb32b";
|
|
3025
3020
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3026
3021
|
0 && (module.exports = {
|
|
3027
3022
|
API,
|