Struct twilight_http::request::guild::role::CreateRole [−][src]
pub struct CreateRole<'a> { /* fields omitted */ }
Expand description
Create a role in a guild.
Examples
use twilight_http::Client; use twilight_model::id::GuildId; let client = Client::new("my token".to_owned()); let guild_id = GuildId(234); client.create_role(guild_id) .color(0xd90083) .name("Bright Pink") .exec() .await?;
Implementations
If true, the role can be @mentioned (pinged) in chat.
Set the name of the role.
If none is specified, Discord sets this to New Role
.
Set the allowed permissions of this role.
pub fn exec(self) -> ResponseFuture<Role>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Role>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Notable traits for ResponseFuture<T>
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.