summaryrefslogtreecommitdiff
path: root/src/commands/bottom_encode.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-07 22:59:35 -0400
committerseth <[email protected]>2023-04-07 23:13:40 -0400
commit0d0e68fec058b7a8b8e9a4768a183ec08ffad770 (patch)
tree6f78cde40cf569a360b7dcce285417e9072e69dc /src/commands/bottom_encode.rs
parent065ac97194b7640ca350b4770b404d855bf98b17 (diff)
add bottom subcommands
Diffstat (limited to 'src/commands/bottom_encode.rs')
-rw-r--r--src/commands/bottom_encode.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/commands/bottom_encode.rs b/src/commands/bottom_encode.rs
deleted file mode 100644
index 741adc7..0000000
--- a/src/commands/bottom_encode.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-use crate::utils;
-use serenity::builder::CreateApplicationCommand;
-use serenity::model::prelude::command::CommandOptionType;
-use serenity::model::prelude::interaction::application_command::{
- CommandDataOption, CommandDataOptionValue,
-};
-
-pub async fn run(options: &[CommandDataOption]) -> String {
- let err_msg = "expected a copyasta";
- let option = options
- .get(0)
- .expect(err_msg)
- .resolved
- .as_ref()
- .expect(err_msg);
-
- if let CommandDataOptionValue::String(msg) = option {
- return utils::bottom_encode(msg).await;
- }
-
- "did you forget to enter a message?".to_string()
-}
-
-pub fn register(command: &mut CreateApplicationCommand) -> &mut CreateApplicationCommand {
- command
- .name("bottom_encode")
- .description("teawie will translate something to bottom for you 🥺")
- .create_option(|option| {
- option
- .name("message")
- .description("what you want teawie to translate")
- .kind(CommandOptionType::String)
- .required(true)
- })
-}