Skip to content

zaun_client::Role · Struct

pub struct Role { … }

A role of a community.

pub fn managed_by(&self) -> Option<BotId>

The bot whose managed role this is: only that bot holds it, and only the owner’s grants change it.

pub fn mention(&self) -> String

The text that shows a mention of this role, <@&id>.

pub const fn id(&self) -> RoleId

Its id.

pub const fn community(&self) -> &Community

The community it belongs to.

pub fn data(&self) -> Option<RoleData>

The cache’s copy, or None when the cache does not have it.

pub fn name(&self) -> String

Its name (empty when the cache does not have it).

pub fn permissions(&self) -> Permissions

Its permissions.

pub fn delete(&self) -> Result<()>

Deletes the role.

The host refused or did not answer.

Clone, Debug, Display, PartialEq

Full rustdoc page