summaryrefslogtreecommitdiff
path: root/src/commands/random_teawie.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-04 23:23:28 -0400
committerseth <[email protected]>2023-04-05 20:34:12 -0400
commit65d0b7a553f718b1ba34799e604ceb07c062af61 (patch)
tree9a6b1c78aa6e79c2201ba124b536a05231b0ae20 /src/commands/random_teawie.rs
parented076bbd6fc22b32ea353ae6bd3cac79d039719a (diff)
rewrite in rust :)
Diffstat (limited to 'src/commands/random_teawie.rs')
-rw-r--r--src/commands/random_teawie.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commands/random_teawie.rs b/src/commands/random_teawie.rs
new file mode 100644
index 0000000..b3c433d
--- /dev/null
+++ b/src/commands/random_teawie.rs
@@ -0,0 +1,13 @@
+use crate::api::guzzle::get_random_teawie;
+use serenity::builder::CreateApplicationCommand;
+use serenity::model::prelude::interaction::application_command::CommandDataOption;
+
+pub async fn run(_: &[CommandDataOption]) -> String {
+ get_random_teawie().await
+}
+
+pub fn register(command: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand {
+ command
+ .name("random_teawie")
+ .description("get a random teawie!")
+}