From bb3df7e6ab9de4c52fbe81b589ac5d1add6d281d Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 7 Apr 2023 19:59:19 -0400 Subject: add random lore command --- src/commands/mod.rs | 1 + src/commands/random_lore.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/commands/random_lore.rs (limited to 'src/commands') diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 7005ae2..afe1e39 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -2,4 +2,5 @@ pub mod ask; pub mod bottom_decode; pub mod bottom_encode; pub mod copypasta; +pub mod random_lore; pub mod random_teawie; diff --git a/src/commands/random_lore.rs b/src/commands/random_lore.rs new file mode 100644 index 0000000..345f753 --- /dev/null +++ b/src/commands/random_lore.rs @@ -0,0 +1,13 @@ +use crate::utils::get_random_lore; +use serenity::builder::CreateApplicationCommand; +use serenity::model::prelude::interaction::application_command::CommandDataOption; + +pub async fn run(_: &[CommandDataOption]) -> String { + get_random_lore().await +} + +pub fn register(command: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand { + command + .name("random_lore") + .description("get a random piece of teawie lore!") +} -- cgit v1.2.3