summaryrefslogtreecommitdiff
path: root/src/commands/general/ask.rs
blob: 1300e97b0232e7439f8ff38c518873eeb74683c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::{client::Context, consts, utils};

use eyre::{Context as _, Result};

/// Ask teawie a question!
#[poise::command(prefix_command, slash_command)]
#[allow(clippy::no_effect_underscore_binding)]
pub async fn ask(
	ctx: Context<'_>,
	#[rename = "question"]
	#[description = "The question you want to ask teawie"]
	_question: String,
) -> Result<()> {
	let resp = utils::random_choice(consts::RESPONSES)
		.wrap_err("Couldn't choose from random responses!")?;

	ctx.say(resp).await?;
	Ok(())
}