diff --git a/src/commands/accountv2.rs b/src/commands/accountv2.rs index 14b4782..b1d731c 100644 --- a/src/commands/accountv2.rs +++ b/src/commands/accountv2.rs @@ -128,6 +128,7 @@ pub(crate) async fn account(_ctx: Context<'_>) -> Result<(), Error> { interaction_context = "Guild|BotDm|PrivateChannel", ephemeral = "false", )] +/// Verify a Minecraft account on the Zombies MultiPlayer Discord. pub(crate) async fn add<'a>( ctx: Context<'_>, #[description = "Minecraft username"] @@ -230,35 +231,15 @@ pub(crate) async fn add<'a>( slash_command, install_context = "User|Guild", interaction_context = "Guild|BotDm|PrivateChannel", - ephemeral = "false", -)] -pub(crate) async fn list(ctx: Context<'_>, user: Option) -> Result<(), Error> { - ctx.defer().await?; - cooldown(&ctx, 600, 300)?; - let user: User = user.unwrap_or(ctx.author().clone()); - let pool: &Pool = &ctx.data().sqlite_pool; - let s: String = list_string(pool, &user).await?; - let r: CreateReply = CreateReply::default(); - ctx.send( - r.content(s) - .allowed_mentions(CreateAllowedMentions::new().empty_roles().empty_users()), - ) - .await?; - Ok(()) -} - -#[poise::command( - slash_command, - install_context = "User|Guild", - interaction_context = "Guild|PrivateChannel", ephemeral = "true", context_menu_command="Account list" )] -pub(crate) async fn context_list(ctx: Context<'_>, u: User) -> Result<(), Error> { +/// List a users linked minecraft Accounts. +pub(crate) async fn list(ctx: Context<'_>, user: User) -> Result<(), Error> { ctx.defer().await?; cooldown(&ctx, 600, 300)?; let pool: &Pool = &ctx.data().sqlite_pool; - let s: String = list_string(pool, &u).await?; + let s: String = list_string(pool, &user).await?; ctx.send( CreateReply::default() .content(s) diff --git a/src/commands/bots.rs b/src/commands/bots.rs index 128f351..51ec5e5 100644 --- a/src/commands/bots.rs +++ b/src/commands/bots.rs @@ -12,6 +12,7 @@ use crate::error::Error; interaction_context = "Guild|BotDm|PrivateChannel", ephemeral = "false", )] +/// Change how many helpstart bots are online, to limit usage of helpstart pings. pub(crate) async fn bots( ctx: Context<'_>, #[min = 0_u8] diff --git a/src/commands/helpstart.rs b/src/commands/helpstart.rs index 8650a16..95f381b 100644 --- a/src/commands/helpstart.rs +++ b/src/commands/helpstart.rs @@ -11,6 +11,7 @@ use crate::error::Error; interaction_context = "Guild", ephemeral = "false", )] +/// Ping the @helpstart to fill a queue. pub(crate) async fn helpstart( ctx: Context<'_>, #[min = 1_u8] diff --git a/src/commands/lfg.rs b/src/commands/lfg.rs index abb5868..85b1f28 100644 --- a/src/commands/lfg.rs +++ b/src/commands/lfg.rs @@ -49,6 +49,7 @@ pub enum Difficulty { interaction_context = "Guild", ephemeral = "false", )] +/// Find a team for Hypixel Zombies. pub(crate) async fn lfg( ctx: Context<'_>, #[rename = "map"] map: Map, @@ -143,6 +144,7 @@ enum ExpertMap { ephemeral = "false", rename = "lfg-expert" )] +/// Find a team of skilled players. pub(crate) async fn expert( ctx: Context<'_>, #[rename = "map"] mode: ExpertMap, @@ -217,6 +219,7 @@ enum OtherPing { ephemeral = "false", rename = "lfg-other" )] +/// Find people to play other games with. pub(crate) async fn other( ctx: Context<'_>, #[rename = "game"] game: OtherPing, diff --git a/src/commands/xd.rs b/src/commands/xd.rs index 19f5ab2..f33de18 100644 --- a/src/commands/xd.rs +++ b/src/commands/xd.rs @@ -17,6 +17,7 @@ const XD: &str = "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ interaction_context = "Guild|BotDm|PrivateChannel", ephemeral = "false", )] +/// Useless command to check if the bot is online. pub(crate) async fn xd(ctx: Context<'_>) -> Result<(), Error> { ctx.defer_ephemeral().await?; ctx.say(XD).await?; diff --git a/src/main.rs b/src/main.rs index 5f5efb5..6b65eb9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,6 @@ async fn main() { commands::helpstart::helpstart(), commands::bots::bots(), commands::accountv2::account(), - commands::accountv2::context_list(), ], manual_cooldowns: true, prefix_options: poise::PrefixFrameworkOptions {