Trait serenity_commands::Commands
source · pub trait Commands: Sized {
// Required methods
fn create_commands() -> Vec<CreateCommand>;
fn from_command_data(data: &CommandData) -> Result<Self>;
}
Expand description
A utility for creating commands and extracting their data from application commands.
Required Methods§
sourcefn create_commands() -> Vec<CreateCommand>
fn create_commands() -> Vec<CreateCommand>
List of top-level commands.
sourcefn from_command_data(data: &CommandData) -> Result<Self>
fn from_command_data(data: &CommandData) -> Result<Self>
Object Safety§
This trait is not object safe.