diff options
| author | seth <[email protected]> | 2023-04-04 23:23:28 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-04-05 20:34:12 -0400 |
| commit | 65d0b7a553f718b1ba34799e604ceb07c062af61 (patch) | |
| tree | 9a6b1c78aa6e79c2201ba124b536a05231b0ae20 /src/commands/ask.rs | |
| parent | ed076bbd6fc22b32ea353ae6bd3cac79d039719a (diff) | |
rewrite in rust :)
Diffstat (limited to 'src/commands/ask.rs')
| -rw-r--r-- | src/commands/ask.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/commands/ask.rs b/src/commands/ask.rs new file mode 100644 index 0000000..6188f43 --- /dev/null +++ b/src/commands/ask.rs @@ -0,0 +1,21 @@ +use crate::utils; +use serenity::builder::CreateApplicationCommand; +use serenity::model::prelude::command::CommandOptionType; +use serenity::model::prelude::interaction::application_command::CommandDataOption; + +pub async fn run(_: &[CommandDataOption]) -> String { + utils::get_random_response().await +} + +pub fn register(command: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand { + command + .name("ask") + .description("ask lord teawie a question and they shall respond") + .create_option(|option| { + option + .name("question") + .description("the question you want to ask teawie") + .kind(CommandOptionType::String) + .required(true) + }) +} |
