pub async fn check_permission(
client: &Client,
token: &str,
guild_id: &str,
user_id: &str,
permission: &str,
) -> Result<bool, Box<dyn Error>>Expand description
Checks if a user has a specific permission 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.permission- The permission to check for.
§Returns
A result indicating whether the user has the specified permission.