blob: e509a7147034beda6a4d76bb8af2f2dc629b84a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use crate::api::shiggy::get_random_shiggy;
use crate::{Context, Error};
/// get a random shiggy
#[poise::command(prefix_command, slash_command)]
pub async fn random_shiggy(ctx: Context<'_>) -> Result<(), Error> {
match get_random_shiggy().await {
Ok(resp) => {
ctx.say(resp).await?;
Ok(())
}
Err(why) => {
ctx.say("i can't get a shiggy right now :(").await?;
Err(why)
}
}
}
|