Struct serenity::builder::EditRole [−][src]
Expand description
A builder to create or edit a Role
for use via a number of model methods.
These are:
PartialGuild::create_role
Guild::create_role
Guild::edit_role
GuildId::create_role
GuildId::edit_role
Role::edit
Defaults are provided for each parameter on role creation.
Examples
Create a hoisted, mentionable role named "a test role"
:
// assuming a `channel_id` and `guild_id` has been bound
let role = guild_id.create_role(&http, |r| r.hoist(true).mentionable(true).name("a test role"));
Tuple Fields
0: HashMap<&'static str, Value>
Implementations
Whether or not to hoist the role above lower-positioned role in the user list.
Whether or not to make the role mentionable, notifying its users.
The set of permissions to assign the role.
The position to assign the role in the role list. This correlates to the role’s position in the user list.
The unicode emoji to set as the role image.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EditRole
impl UnwindSafe for EditRole
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more