refraction/src/commands/general/joke.rs
2024-01-08 14:56:37 -05:00

13 lines
270 B
Rust

use crate::api::dadjoke;
use crate::Context;
use color_eyre::eyre::Result;
/// It's a joke
#[poise::command(slash_command, prefix_command)]
pub async fn joke(ctx: Context<'_>) -> Result<()> {
let joke = dadjoke::get_joke().await?;
ctx.reply(joke).await?;
Ok(())
}