pub trait Command: Send + Sync {
// Required method
fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
client: &'life1 Client,
token: &'life2 str,
channel_id: &'life3 str,
args: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}
Expand description
The Command
trait defines a common interface for all commands.
Each command must implement the execute
method which handles the command’s logic.