create_guild_role

Function create_guild_role 

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

Creates a new 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 to create the role in.
  • role_settings - The JSON value of the role settings.

§Returns

A result containing the created role information as a JSON value.