Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created March 23, 2020 14:53
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/e55f0fde02e9be5cf72c958d3b0851f7 to your computer and use it in GitHub Desktop.
Save BetterProgramming/e55f0fde02e9be5cf72c958d3b0851f7 to your computer and use it in GitHub Desktop.
#[command]
fn cat(ctx: &mut Context, msg: Message) -> CommandResult {
if let Err(why) = msg.channel_id.send_message(&ctx.http, |m | {
m.embed(|e | {
e.title("This is a cat!");
e.description("This is a description of the cat!");
return e;
});
return m;
}) {
println!("Error sending embed: {}", why);
}
return Ok(());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment