fetch_role_info

Function fetch_role_info 

Source
pub async fn fetch_role_info(
    client: &Client,
    token: &str,
    guild_id: &str,
    role_id: &str,
) -> Result<Value, Box<dyn Error>>
Expand description

Fetches information about a role in a Discord guild.

§Arguments

  • client - The HTTP client used to send the request.
  • token - The bot token for authentication.
  • guild_id - The ID of the guild.
  • role_id - The ID of the role to fetch information for.

§Returns

A result containing the role information as a JSON value.