summaryrefslogtreecommitdiff
path: root/src/commands/random_lore.rs
blob: 875a35e30f43378be4011ccca80d9c865960ddfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{consts, utils, Context, Error};

/// get a random piece of teawie lore!
#[poise::command(prefix_command, slash_command)]
pub async fn random_lore(ctx: Context<'_>) -> Result<(), Error> {
	match utils::random_choice(consts::LORE) {
		Ok(resp) => {
			ctx.say(resp).await?;
			Ok(())
		}
		Err(why) => {
			ctx.say("i can't think of any right now :(").await?;
			Err(why)
		}
	}
}