blob: 7cc82a14ceb9486a3f51434e5758f406cba9d217 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use crate::consts;
use crate::utils;
use crate::{Context, Error};
/// ask teawie a question!
#[poise::command(prefix_command, slash_command)]
pub async fn ask(
ctx: Context<'_>,
#[description = "the question you want to ask teawie"]
#[rename = "question"]
_question: String,
) -> Result<(), Error> {
match utils::random_choice(consts::RESPONSES) {
Ok(resp) => {
ctx.say(resp).await?;
Ok(())
}
Err(why) => {
ctx.say("idk").await?;
Err(why)
}
}
}
|