From 32d42d5fbab9c74dbe59fbdb94a29112f8766e27 Mon Sep 17 00:00:00 2001 From: seth Date: Fri, 15 Dec 2023 02:04:28 -0500 Subject: commands: improve descriptions --- src/commands/general/ask.rs | 6 +++--- src/commands/general/bing.rs | 2 +- src/commands/general/config.rs | 2 ++ src/commands/general/convert.rs | 16 ++++++++-------- src/commands/general/random.rs | 6 +++--- src/commands/general/version.rs | 2 +- 6 files changed, 18 insertions(+), 16 deletions(-) (limited to 'src/commands/general') diff --git a/src/commands/general/ask.rs b/src/commands/general/ask.rs index e1f008a..3f225bb 100644 --- a/src/commands/general/ask.rs +++ b/src/commands/general/ask.rs @@ -2,12 +2,12 @@ use crate::{consts, utils, Context}; use color_eyre::eyre::{Context as _, Result}; -/// ask teawie a question! +/// Ask teawie a question! #[poise::command(prefix_command, slash_command)] pub async fn ask( ctx: Context<'_>, - #[description = "the question you want to ask teawie"] - #[rename = "question"] + #[description = "The question you want to ask teawie"] + #[rename = "Question"] _question: String, ) -> Result<()> { let resp = utils::random_choice(consts::RESPONSES) diff --git a/src/commands/general/bing.rs b/src/commands/general/bing.rs index b80ebca..93c630b 100644 --- a/src/commands/general/bing.rs +++ b/src/commands/general/bing.rs @@ -2,7 +2,7 @@ use crate::Context; use color_eyre::eyre::Result; -/// make sure the wie is alive +/// Make sure the wie is alive #[poise::command(prefix_command)] pub async fn bing(ctx: Context<'_>) -> Result<()> { ctx.say("bong!").await?; diff --git a/src/commands/general/config.rs b/src/commands/general/config.rs index 64cdb83..f308f31 100644 --- a/src/commands/general/config.rs +++ b/src/commands/general/config.rs @@ -45,6 +45,7 @@ pub async fn config(_ctx: Context<'_>) -> Result<()> { Ok(()) } +// Set a configuration option #[allow(clippy::too_many_arguments)] #[poise::command( slash_command, @@ -135,6 +136,7 @@ pub async fn set( Ok(()) } +// Get a configuration option #[poise::command( slash_command, prefix_command, diff --git a/src/commands/general/convert.rs b/src/commands/general/convert.rs index cbbf8dc..c00b4b8 100644 --- a/src/commands/general/convert.rs +++ b/src/commands/general/convert.rs @@ -11,44 +11,44 @@ pub async fn convert(_ctx: Context<'_>) -> Result<()> { Ok(()) } -/// ask teawie to convert °F to °C +/// 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, + #[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 +/// 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, + #[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 🥺 +/// 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, + #[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 🥸 +/// 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, + #[description = "What teawie will translate from bottom"] message: String, ) -> Result<()> { let decoded = bottom::decode_string(&message)?; ctx.say(decoded).await?; diff --git a/src/commands/general/random.rs b/src/commands/general/random.rs index 9595d09..286d04e 100644 --- a/src/commands/general/random.rs +++ b/src/commands/general/random.rs @@ -7,7 +7,7 @@ pub async fn random(_ctx: Context<'_>) -> Result<()> { Ok(()) } -/// get a random piece of teawie lore! +/// Get a random piece of teawie lore! #[poise::command(prefix_command, slash_command)] pub async fn lore(ctx: Context<'_>) -> Result<()> { let resp = utils::random_choice(consts::LORE)?; @@ -15,14 +15,14 @@ pub async fn lore(ctx: Context<'_>) -> Result<()> { Ok(()) } -/// get a random teawie +/// Get a random teawie #[poise::command(prefix_command, slash_command)] pub async fn teawie(ctx: Context<'_>) -> Result<()> { let url = api::guzzle::get_random_teawie().await?; utils::send_url_as_embed(ctx, url).await } -/// get a random shiggy +/// Get a random shiggy #[poise::command(prefix_command, slash_command)] pub async fn shiggy(ctx: Context<'_>) -> Result<()> { let url = api::shiggy::get_random_shiggy().await?; diff --git a/src/commands/general/version.rs b/src/commands/general/version.rs index 8b8d1f1..20368f2 100644 --- a/src/commands/general/version.rs +++ b/src/commands/general/version.rs @@ -2,7 +2,7 @@ use crate::colors::Colors; use crate::Context; use color_eyre::eyre::Result; -/// get version info +/// Get version info #[poise::command(slash_command)] pub async fn version(ctx: Context<'_>) -> Result<()> { let sha = option_env!("GIT_SHA").unwrap_or("main"); -- cgit v1.2.3