Struct twilight_http::request::guild::member::AddGuildMember
source · pub struct AddGuildMember<'a> { /* private fields */ }Implementations§
source§impl<'a> AddGuildMember<'a>
impl<'a> AddGuildMember<'a>
Add a user to a guild.
An access token for the user with guilds.join scope is required. All other
fields are optional. See Discord Docs/Add Guild Member.
sourcepub const fn deaf(self, deaf: bool) -> Self
pub const fn deaf(self, deaf: bool) -> Self
Whether the new member will be unable to hear audio when connected to a voice channel.
sourcepub const fn mute(self, mute: bool) -> Self
pub const fn mute(self, mute: bool) -> Self
Whether the new member will be unable to speak in voice channels.
sourcepub fn nick(self, nick: &'a str) -> Result<Self, ValidationError>
pub fn nick(self, nick: &'a str) -> Result<Self, ValidationError>
sourcepub const fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
pub const fn roles(self, roles: &'a [Id<RoleMarker>]) -> Self
List of roles to assign the new member.
sourcepub fn exec(self) -> ResponseFuture<PartialMember> ⓘ
👎Deprecated since 0.14.0: use .await or into_future instead
pub fn exec(self) -> ResponseFuture<PartialMember> ⓘ
.await or into_future insteadExecute the request, returning a future resolving to a Response.
Trait Implementations§
source§impl IntoFuture for AddGuildMember<'_>
impl IntoFuture for AddGuildMember<'_>
§type Output = Result<Response<PartialMember>, Error>
type Output = Result<Response<PartialMember>, Error>
The output that the future will produce on completion.
§type IntoFuture = ResponseFuture<PartialMember>
type IntoFuture = ResponseFuture<PartialMember>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more