From 0025ad5ea8d412aacc3184d18063fd5ff3de0175 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 2 Dec 2023 07:00:24 -0500 Subject: feat: add per guild configuration --- src/commands/convert.rs | 56 ------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 src/commands/convert.rs (limited to 'src/commands/convert.rs') diff --git a/src/commands/convert.rs b/src/commands/convert.rs deleted file mode 100644 index cbbf8dc..0000000 --- a/src/commands/convert.rs +++ /dev/null @@ -1,56 +0,0 @@ -use crate::Context; - -use bottomify::bottom; -use color_eyre::eyre::Result; - -#[poise::command( - slash_command, - subcommands("to_fahrenheit", "to_celsius", "to_bottom", "from_bottom") -)] -pub async fn convert(_ctx: Context<'_>) -> Result<()> { - Ok(()) -} - -/// ask teawie to convert °F to °C -#[poise::command(slash_command)] -pub async fn to_celsius( - ctx: Context<'_>, - #[description = "what teawie will convert"] degrees_fahrenheit: f32, -) -> Result<()> { - let temp = (degrees_fahrenheit - 32.0) * (5.0 / 9.0); - ctx.say(temp.to_string()).await?; - Ok(()) -} - -/// ask teawie to convert °C to °F -#[poise::command(slash_command)] -pub async fn to_fahrenheit( - ctx: Context<'_>, - #[description = "what teawie will convert"] degrees_celsius: f32, -) -> Result<()> { - let temp = (degrees_celsius * (9.0 / 5.0)) + 32.0; - ctx.say(temp.to_string()).await?; - Ok(()) -} - -/// teawie will translate to bottom 🥺 -#[poise::command(slash_command)] -pub async fn to_bottom( - ctx: Context<'_>, - #[description = "what teawie will translate into bottom"] message: String, -) -> Result<()> { - let encoded = bottom::encode_string(&message); - ctx.say(encoded).await?; - Ok(()) -} - -/// teawie will translate from bottom 🥸 -#[poise::command(slash_command)] -pub async fn from_bottom( - ctx: Context<'_>, - #[description = "what teawie will translate from bottom"] message: String, -) -> Result<()> { - let decoded = bottom::decode_string(&message)?; - ctx.say(decoded).await?; - Ok(()) -} -- cgit v1.2.3