separate interactions and handler

This commit is contained in:
2021-06-24 20:07:12 +05:30
parent 8d75b36431
commit fe16903e6a
5 changed files with 80 additions and 51 deletions

12
src/commands/general.rs Normal file
View File

@@ -0,0 +1,12 @@
use serenity::prelude::*;
use serenity::model::prelude::*;
use serenity::framework::standard::{
CommandResult,
macros::command
};
#[command]
pub async fn ping(ctx: &Context, msg: &Message) -> CommandResult {
msg.reply(ctx, "Pong!").await?;
Ok(())
}

1
src/commands/mod.rs Normal file
View File

@@ -0,0 +1 @@
pub mod general;