Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created March 23, 2020 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/dc54bf5dcb4791a82aaf70954c3fb8be to your computer and use it in GitHub Desktop.
Save BetterProgramming/dc54bf5dcb4791a82aaf70954c3fb8be to your computer and use it in GitHub Desktop.
use serenity::{
prelude::*,
model::prelude::*,
framework::standard::{
CommandResult, macros::command,
},
};
#[command]
fn ping(ctx: &mut Context, msg: Message) -> CommandResult {
if let Err(why) = msg.channel_id.say(&ctx.http, "Pong!") {
println!("Error sending message: {}", why);
}
return Ok(());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment