pub struct CreateBotAuthParameters { /* private fields */ }
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>
pub async fn auto_client_id(self, http: impl AsRef<Http>) -> Result<Self>
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 Freeze for CreateBotAuthParameters
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