@discordjs/core 2.0.0-dev.1724155493-bf83db948 → 2.0.0-dev.1724285451-bba0e72e2
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 +9 -0
- package/dist/http-only.d.ts +9 -0
- package/dist/http-only.js +12 -1
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +12 -1
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -683,6 +683,15 @@ declare class GuildsAPI {
|
|
|
683
683
|
* @param options - The options for fetching the guild roles
|
|
684
684
|
*/
|
|
685
685
|
getRoles(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRolesResult>;
|
|
686
|
+
/**
|
|
687
|
+
* Get a role in a guild
|
|
688
|
+
*
|
|
689
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
|
|
690
|
+
* @param guildId - The id of the guild to fetch the role from
|
|
691
|
+
* @param roleId - The id of the role to fetch
|
|
692
|
+
* @param options - The options for fetching the guild role
|
|
693
|
+
*/
|
|
694
|
+
getRole(guildId: Snowflake, roleId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIRole>;
|
|
686
695
|
/**
|
|
687
696
|
* Creates a guild role
|
|
688
697
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -683,6 +683,15 @@ declare class GuildsAPI {
|
|
|
683
683
|
* @param options - The options for fetching the guild roles
|
|
684
684
|
*/
|
|
685
685
|
getRoles(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRolesResult>;
|
|
686
|
+
/**
|
|
687
|
+
* Get a role in a guild
|
|
688
|
+
*
|
|
689
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
|
|
690
|
+
* @param guildId - The id of the guild to fetch the role from
|
|
691
|
+
* @param roleId - The id of the role to fetch
|
|
692
|
+
* @param options - The options for fetching the guild role
|
|
693
|
+
*/
|
|
694
|
+
getRole(guildId: Snowflake, roleId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIRole>;
|
|
686
695
|
/**
|
|
687
696
|
* Creates a guild role
|
|
688
697
|
*
|
package/dist/index.js
CHANGED
|
@@ -1073,6 +1073,17 @@ var GuildsAPI = class {
|
|
|
1073
1073
|
async getRoles(guildId, { signal } = {}) {
|
|
1074
1074
|
return this.rest.get(import_v105.Routes.guildRoles(guildId), { signal });
|
|
1075
1075
|
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Get a role in a guild
|
|
1078
|
+
*
|
|
1079
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
|
|
1080
|
+
* @param guildId - The id of the guild to fetch the role from
|
|
1081
|
+
* @param roleId - The id of the role to fetch
|
|
1082
|
+
* @param options - The options for fetching the guild role
|
|
1083
|
+
*/
|
|
1084
|
+
async getRole(guildId, roleId, { signal } = {}) {
|
|
1085
|
+
return this.rest.get(import_v105.Routes.guildRole(guildId, roleId), { signal });
|
|
1086
|
+
}
|
|
1076
1087
|
/**
|
|
1077
1088
|
* Creates a guild role
|
|
1078
1089
|
*
|
|
@@ -3010,7 +3021,7 @@ __name(withFiles, "withFiles");
|
|
|
3010
3021
|
|
|
3011
3022
|
// src/index.ts
|
|
3012
3023
|
__reExport(src_exports, require("discord-api-types/v10"), module.exports);
|
|
3013
|
-
var version = "2.0.0-dev.
|
|
3024
|
+
var version = "2.0.0-dev.1724285451-bba0e72e2";
|
|
3014
3025
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3015
3026
|
0 && (module.exports = {
|
|
3016
3027
|
API,
|