diff options
| author | Fuwn <[email protected]> | 2021-06-24 15:06:43 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-24 15:06:43 -0700 |
| commit | 2bccd50b7a11dda0ae239ce13efcdac118bfee92 (patch) | |
| tree | 28f665461bb9746d70878071b11537d784a59842 /src/commands.rs | |
| download | dos-bot-2bccd50b7a11dda0ae239ce13efcdac118bfee92.tar.xz dos-bot-2bccd50b7a11dda0ae239ce13efcdac118bfee92.zip | |
feat(dos-bot): :star:
Diffstat (limited to 'src/commands.rs')
| -rw-r--r-- | src/commands.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/commands.rs b/src/commands.rs new file mode 100644 index 0000000..086b6c3 --- /dev/null +++ b/src/commands.rs @@ -0,0 +1,40 @@ +// Copyright (C) 2021-2021 Fuwn +// SPDX-License-Identifier: GPL-3.0-only + +use serenity::{ + framework::standard::{macros::command, CommandResult}, + model::prelude::*, + prelude::*, +}; + +#[command] +pub async fn ping(ctx: &Context, msg: &Message) -> CommandResult { + msg.channel_id.say(&ctx.http, "Pong!").await?; + + Ok(()) +} + +#[command] +pub async fn help(ctx: &Context, msg: &Message) -> CommandResult { + msg + .channel_id + .say( + &ctx.http, + r#"``` + commands + ======== + +help - you are here +ping - pong! + + information + =========== + +- https://github.com/fuwn/dos-bot +- https://discord.io/assembly +```"#, + ) + .await?; + + Ok(()) +} |