summaryrefslogtreecommitdiff
path: root/src/commands/random_teawie.rs
blob: 8dcc76bdf15d3cb305e9125a9df5a0b2f5ee0f61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::api::guzzle::get_random_teawie;
use crate::{Context, Error};

/// get a random teawie
#[poise::command(prefix_command, slash_command)]
pub async fn random_teawie(ctx: Context<'_>) -> Result<(), Error> {
	match get_random_teawie().await {
		Ok(resp) => {
			ctx.say(resp).await?;
			Ok(())
		}
		Err(why) => {
			ctx.say("i'm too lazy to send a selfie").await?;
			Err(why)
		}
	}
}