pub struct DiscordClient { /* private fields */ }Implementations§
Source§impl DiscordClient
impl DiscordClient
pub fn get_global_commands(&self) -> Result<Vec<ApplicationCommand>>
pub fn get_guild_commands( &self, guild_id: &str, ) -> Result<Vec<ApplicationCommand>>
pub fn create_global_command( &self, command: &ApplicationCommand, ) -> Result<ApplicationCommand>
pub fn create_guild_command( &self, guild_id: &str, command: &ApplicationCommand, ) -> Result<ApplicationCommand>
Sourcepub fn overwrite_global_commands(
&self,
commands: &Vec<&ApplicationCommand>,
) -> Result<Vec<ApplicationCommand>>
pub fn overwrite_global_commands( &self, commands: &Vec<&ApplicationCommand>, ) -> Result<Vec<ApplicationCommand>>
Sets the list of global commands.
WARNING: All existing commands will be deleted
Sourcepub fn overwrite_guild_commands(
&self,
guild_id: &str,
commands: &Vec<&ApplicationCommand>,
) -> Result<Vec<ApplicationCommand>>
pub fn overwrite_guild_commands( &self, guild_id: &str, commands: &Vec<&ApplicationCommand>, ) -> Result<Vec<ApplicationCommand>>
Sets the list of guild commands.
WARNING: All existing commands will be deleted
Source§impl DiscordClient
impl DiscordClient
Auto Trait Implementations§
impl Freeze for DiscordClient
impl !RefUnwindSafe for DiscordClient
impl Send for DiscordClient
impl Sync for DiscordClient
impl Unpin for DiscordClient
impl !UnwindSafe for DiscordClient
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