use crate::context::{BotContext, MessageContext};
use async_trait::async_trait;
#[derive(Debug, Clone)]
pub enum HandlerResult {
Ok,
Continue,
}
#[derive(Debug, Clone)]
pub struct Command {
pub name: &'static str,
pub description: Option<&'static str>,
pub args: Vec<&'static str>,
pub rank: u64,
}
#[async_trait]
pub trait CommandBuilder: Send + Sync + 'static {
fn name(&self) -> &'static str;
fn description(&self) -> Option<&'static str>;
fn args(&self) -> Vec<&'static str>;
fn rank(&self) -> u64;
async fn run(&self, bot: &BotContext, ev: &MessageContext) -> HandlerResult;
}