remove_role

Function remove_role 

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

Removes a role from a user 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.
  • user_id - The ID of the user to remove the role from.
  • role_id - The ID of the role to remove.

§Returns

A result indicating success or failure.