Struct serenity::builder::CreateBotAuthParameters
source · pub struct CreateBotAuthParameters { /* private fields */ }Available on crate feature
builder only.Expand description
A builder for constructing an invite link with custom OAuth2 scopes.
Implementations§
source§impl CreateBotAuthParameters
impl CreateBotAuthParameters
sourcepub fn new() -> Self
pub fn new() -> Self
Equivalent to Self::default.
sourcepub fn client_id(self, client_id: impl Into<ApplicationId>) -> Self
pub fn client_id(self, client_id: impl Into<ApplicationId>) -> Self
Specify the client Id of your application.
sourcepub async fn auto_client_id(self, http: impl AsRef<Http>) -> Result<Self>
Available on crate feature http only.
pub async fn auto_client_id(self, http: impl AsRef<Http>) -> Result<Self>
http only.Automatically fetch and set the client Id of your application by inquiring Discord’s API.
Errors
Returns an HttpError::UnsuccessfulRequest if the user is not authorized for this
endpoint.
sourcepub fn scopes(self, scopes: &[Scope]) -> Self
pub fn scopes(self, scopes: &[Scope]) -> Self
Specify the scopes for your application.
Note: This needs to include the Bot scope.
sourcepub fn permissions(self, permissions: Permissions) -> Self
pub fn permissions(self, permissions: Permissions) -> Self
Specify the permissions your application requires.
sourcepub fn guild_id(self, guild_id: impl Into<GuildId>) -> Self
pub fn guild_id(self, guild_id: impl Into<GuildId>) -> Self
Specify the Id of the guild to prefill the dropdown picker for the user.
sourcepub fn disable_guild_select(self, disable: bool) -> Self
pub fn disable_guild_select(self, disable: bool) -> Self
Specify whether the user cannot change the guild in the dropdown picker.
Trait Implementations§
source§impl Clone for CreateBotAuthParameters
impl Clone for CreateBotAuthParameters
source§fn clone(&self) -> CreateBotAuthParameters
fn clone(&self) -> CreateBotAuthParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CreateBotAuthParameters
impl Debug for CreateBotAuthParameters
source§impl Default for CreateBotAuthParameters
impl Default for CreateBotAuthParameters
source§fn default() -> CreateBotAuthParameters
fn default() -> CreateBotAuthParameters
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CreateBotAuthParameters
impl Send for CreateBotAuthParameters
impl Sync for CreateBotAuthParameters
impl Unpin for CreateBotAuthParameters
impl UnwindSafe for CreateBotAuthParameters
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more