Struct Role
zaun_client::Role · Struct
pub struct Role { … }A role of a community.
Methods
Section titled “Methods”managed_by
Section titled “managed_by”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.
mention
Section titled “mention”pub fn mention(&self) -> StringThe text that shows a mention of this role, <@&id>.
pub const fn id(&self) -> RoleIdIts id.
community
Section titled “community”pub const fn community(&self) -> &CommunityThe 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) -> StringIts name (empty when the cache does not have it).
permissions
Section titled “permissions”pub fn permissions(&self) -> PermissionsIts permissions.
delete
Section titled “delete”pub fn delete(&self) -> Result<()>Deletes the role.
Errors
Section titled “Errors”The host refused or did not answer.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Display, PartialEq