summaryrefslogtreecommitdiff
path: root/src/commands/random_lore.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-07 19:59:19 -0400
committerseth <[email protected]>2023-04-07 20:00:57 -0400
commitbb3df7e6ab9de4c52fbe81b589ac5d1add6d281d (patch)
treed0642d24fe96e8ea6d98969a20975b611ec11d53 /src/commands/random_lore.rs
parent83f885ee8d762551a6c5d8ea5ab3719cde76464a (diff)
add random lore command
Diffstat (limited to 'src/commands/random_lore.rs')
-rw-r--r--src/commands/random_lore.rs13
1 files changed, 13 insertions, 0 deletions
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!")
+}