@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.
@@ -680,6 +680,15 @@ declare class GuildsAPI {
680
680
  * @param options - The options for fetching the guild roles
681
681
  */
682
682
  getRoles(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRolesResult>;
683
+ /**
684
+ * Get a role in a guild
685
+ *
686
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
687
+ * @param guildId - The id of the guild to fetch the role from
688
+ * @param roleId - The id of the role to fetch
689
+ * @param options - The options for fetching the guild role
690
+ */
691
+ getRole(guildId: Snowflake, roleId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIRole>;
683
692
  /**
684
693
  * Creates a guild role
685
694
  *
@@ -680,6 +680,15 @@ declare class GuildsAPI {
680
680
  * @param options - The options for fetching the guild roles
681
681
  */
682
682
  getRoles(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildRolesResult>;
683
+ /**
684
+ * Get a role in a guild
685
+ *
686
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
687
+ * @param guildId - The id of the guild to fetch the role from
688
+ * @param roleId - The id of the role to fetch
689
+ * @param options - The options for fetching the guild role
690
+ */
691
+ getRole(guildId: Snowflake, roleId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIRole>;
683
692
  /**
684
693
  * Creates a guild role
685
694
  *
package/dist/http-only.js CHANGED
@@ -1072,6 +1072,17 @@ var GuildsAPI = class {
1072
1072
  async getRoles(guildId, { signal } = {}) {
1073
1073
  return this.rest.get(import_v105.Routes.guildRoles(guildId), { signal });
1074
1074
  }
1075
+ /**
1076
+ * Get a role in a guild
1077
+ *
1078
+ * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role}
1079
+ * @param guildId - The id of the guild to fetch the role from
1080
+ * @param roleId - The id of the role to fetch
1081
+ * @param options - The options for fetching the guild role
1082
+ */
1083
+ async getRole(guildId, roleId, { signal } = {}) {
1084
+ return this.rest.get(import_v105.Routes.guildRole(guildId, roleId), { signal });
1085
+ }
1075
1086
  /**
1076
1087
  * Creates a guild role
1077
1088
  *
@@ -2865,7 +2876,7 @@ __name(withFiles, "withFiles");
2865
2876
 
2866
2877
  // src/http-only/index.ts
2867
2878
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2868
- var version = "2.0.0-dev.1724155493-bf83db948";
2879
+ var version = "2.0.0-dev.1724285451-bba0e72e2";
2869
2880
  // Annotate the CommonJS export names for ESM import in node:
2870
2881
  0 && (module.exports = {
2871
2882
  API,