From e2b354aae1f53ed86b7ceca26ae189f08b4f7fc5 Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Sat, 17 Jan 2026 11:29:42 +0300 Subject: [PATCH] add missing help text and redo the existing ones based on CommandHelp.cs --- crates/command_definitions/src/api.rs | 5 ++- crates/command_definitions/src/autoproxy.rs | 8 ++-- crates/command_definitions/src/config.rs | 37 ++++++++++--------- crates/command_definitions/src/debug.rs | 9 +++-- crates/command_definitions/src/fun.rs | 21 ++++++----- crates/command_definitions/src/group.rs | 19 ++++++---- crates/command_definitions/src/help.rs | 8 ++-- .../command_definitions/src/import_export.rs | 6 ++- crates/command_definitions/src/member.rs | 23 ++++++------ crates/command_definitions/src/message.rs | 4 +- crates/command_definitions/src/random.rs | 22 ++++++++--- .../command_definitions/src/server_config.rs | 32 ++++++++-------- crates/command_definitions/src/switch.rs | 26 +++++++++---- crates/command_definitions/src/system.rs | 21 ++++++++--- 14 files changed, 142 insertions(+), 99 deletions(-) diff --git a/crates/command_definitions/src/api.rs b/crates/command_definitions/src/api.rs index d2e669b9..82fca08b 100644 --- a/crates/command_definitions/src/api.rs +++ b/crates/command_definitions/src/api.rs @@ -2,7 +2,8 @@ use super::*; pub fn cmds() -> impl IntoIterator { [ - command!("token" => "token_display"), - command!("token", ("refresh", ["renew", "regen", "reroll"]) => "token_refresh"), + command!("token" => "token_display").help("Gets your system's API token"), + command!("token", ("refresh", ["renew", "regen", "reroll"]) => "token_refresh") + .help("Generates a new API token and invalidates the old one"), ] } diff --git a/crates/command_definitions/src/autoproxy.rs b/crates/command_definitions/src/autoproxy.rs index f7d4e5dc..fd65be01 100644 --- a/crates/command_definitions/src/autoproxy.rs +++ b/crates/command_definitions/src/autoproxy.rs @@ -10,11 +10,11 @@ pub fn cmds() -> impl IntoIterator { [ command!(ap => "autoproxy_show").help("Shows your current autoproxy settings"), command!(ap, ("off", ["stop", "cancel", "no", "disable", "remove"]) => "autoproxy_off") - .help("Disables autoproxy"), + .help("Disables autoproxying for your system in the current server"), command!(ap, ("latch", ["last", "proxy", "stick", "sticky", "l"]) => "autoproxy_latch") - .help("Sets autoproxy to latch mode"), + .help("Sets your system's autoproxy in this server to proxy the last manually proxied member"), command!(ap, ("front", ["fronter", "switch", "f"]) => "autoproxy_front") - .help("Sets autoproxy to front mode"), - command!(ap, MemberRef => "autoproxy_member").help("Sets autoproxy to a specific member"), + .help("Sets your system's autoproxy in this server to proxy the first member currently registered as front"), + command!(ap, MemberRef => "autoproxy_member").help("Sets your system's autoproxy in this server to proxy a specific member"), ] } diff --git a/crates/command_definitions/src/config.rs b/crates/command_definitions/src/config.rs index 68723301..68bd245f 100644 --- a/crates/command_definitions/src/config.rs +++ b/crates/command_definitions/src/config.rs @@ -14,13 +14,13 @@ pub fn cmds() -> impl IntoIterator { command!(ap_account => "cfg_ap_account_show") .help("Shows autoproxy status for the account"), command!(ap_account, Toggle => "cfg_ap_account_update") - .help("Toggles autoproxy for the account"), + .help("Toggles autoproxy globally for the current account"), command!(ap_timeout => "cfg_ap_timeout_show").help("Shows the autoproxy timeout"), command!(ap_timeout, RESET => "cfg_ap_timeout_reset").help("Resets the autoproxy timeout"), command!(ap_timeout, parameter::Toggle::Off => "cfg_ap_timeout_off") .help("Disables the autoproxy timeout"), command!(ap_timeout, ("timeout", OpaqueString) => "cfg_ap_timeout_update") - .help("Sets the autoproxy timeout"), + .help("Sets the latch timeout duration for your system"), ]; let timezone_tokens = tokens!(cfg, ("timezone", ["zone", "tz"])); @@ -28,13 +28,14 @@ pub fn cmds() -> impl IntoIterator { command!(timezone_tokens => "cfg_timezone_show").help("Shows the system timezone"), command!(timezone_tokens, RESET => "cfg_timezone_reset").help("Resets the system timezone"), command!(timezone_tokens, ("timezone", OpaqueString) => "cfg_timezone_update") - .help("Sets the system timezone"), + .help("Changes your system's time zone"), ]; let ping_tokens = tokens!(cfg, "ping"); let ping = [ - command!(ping_tokens => "cfg_ping_show").help("Shows the ping setting"), - command!(ping_tokens, Toggle => "cfg_ping_update").help("Updates the ping setting"), + command!(ping_tokens => "cfg_ping_show").help("Shows ping preferences"), + command!(ping_tokens, Toggle => "cfg_ping_update") + .help("Changes your system's ping preferences"), ]; let priv_ = ("private", ["priv"]); @@ -46,19 +47,19 @@ pub fn cmds() -> impl IntoIterator { command!(member_privacy => "cfg_member_privacy_show") .help("Shows the default privacy for new members"), command!(member_privacy, Toggle => "cfg_member_privacy_update") - .help("Sets the default privacy for new members"), + .help("Sets whether member privacy is automatically set to private when creating a new member"), command!(member_privacy_short => "cfg_member_privacy_show") .help("Shows the default privacy for new members"), command!(member_privacy_short, Toggle => "cfg_member_privacy_update") - .help("Sets the default privacy for new members"), + .help("Sets whether member privacy is automatically set to private when creating a new member"), command!(group_privacy => "cfg_group_privacy_show") .help("Shows the default privacy for new groups"), command!(group_privacy, Toggle => "cfg_group_privacy_update") - .help("Sets the default privacy for new groups"), + .help("Sets whether group privacy is automatically set to private when creating a new group"), command!(group_privacy_short => "cfg_group_privacy_show") .help("Shows the default privacy for new groups"), command!(group_privacy_short, Toggle => "cfg_group_privacy_update") - .help("Sets the default privacy for new groups"), + .help("Sets whether group privacy is automatically set to private when creating a new group"), ]; let show = "show"; @@ -68,11 +69,11 @@ pub fn cmds() -> impl IntoIterator { command!(show_private => "cfg_show_private_info_show") .help("Shows whether private info is shown"), command!(show_private, Toggle => "cfg_show_private_info_update") - .help("Toggles showing private info"), + .help("Sets whether private information is shown to linked accounts by default"), command!(show_private_short => "cfg_show_private_info_show") .help("Shows whether private info is shown"), command!(show_private_short, Toggle => "cfg_show_private_info_update") - .help("Toggles showing private info"), + .help("Sets whether private information is shown to linked accounts by default"), ]; let proxy = ("proxy", ["px"]); @@ -96,11 +97,11 @@ pub fn cmds() -> impl IntoIterator { .help("Toggles proxy error messages"), command!(proxy_switch => "cfg_proxy_switch_show").help("Shows the proxy switch behavior"), command!(proxy_switch, ProxySwitchAction => "cfg_proxy_switch_update") - .help("Sets the proxy switch behavior"), + .help("Sets the switching behavior when proxy tags are used"), command!(proxy_switch_short => "cfg_proxy_switch_show") .help("Shows the proxy switch behavior"), command!(proxy_switch_short, ProxySwitchAction => "cfg_proxy_switch_update") - .help("Sets the proxy switch behavior"), + .help("Sets the switching behavior when proxy tags are used"), ]; let id = ("id", ["ids"]); @@ -169,12 +170,12 @@ pub fn cmds() -> impl IntoIterator { command!(name_format => "cfg_name_format_show").help("Shows the name format"), command!(name_format, RESET => "cfg_name_format_reset").help("Resets the name format"), command!(name_format, ("format", OpaqueString) => "cfg_name_format_update") - .help("Sets the name format"), + .help("Changes your system's username formatting"), command!(name_format_short => "cfg_name_format_show").help("Shows the name format"), command!(name_format_short, RESET => "cfg_name_format_reset") .help("Resets the name format"), command!(name_format_short, ("format", OpaqueString) => "cfg_name_format_update") - .help("Sets the name format"), + .help("Changes your system's username formatting"), ]; let server = "server"; @@ -194,19 +195,19 @@ pub fn cmds() -> impl IntoIterator { command!(server_name_format, RESET => "cfg_server_name_format_reset") .help("Resets the server name format"), command!(server_name_format, ("format", OpaqueString) => "cfg_server_name_format_update") - .help("Sets the server name format"), + .help("Changes your system's username formatting in the current server"), command!(server_format => "cfg_server_name_format_show") .help("Shows the server name format"), command!(server_format, RESET => "cfg_server_name_format_reset") .help("Resets the server name format"), command!(server_format, ("format", OpaqueString) => "cfg_server_name_format_update") - .help("Sets the server name format"), + .help("Changes your system's username formatting in the current server"), command!(server_format_short => "cfg_server_name_format_show") .help("Shows the server name format"), command!(server_format_short, RESET => "cfg_server_name_format_reset") .help("Resets the server name format"), command!(server_format_short, ("format", OpaqueString) => "cfg_server_name_format_update") - .help("Sets the server name format"), + .help("Changes your system's username formatting in the current server"), ]; let limit_ = ("limit", ["lim"]); diff --git a/crates/command_definitions/src/debug.rs b/crates/command_definitions/src/debug.rs index afd204e4..ac449eb3 100644 --- a/crates/command_definitions/src/debug.rs +++ b/crates/command_definitions/src/debug.rs @@ -8,8 +8,11 @@ pub fn cmds() -> impl IntoIterator { let debug = debug(); let perms = ("permissions", ["perms", "permcheck"]); [ - command!(debug, perms, ("channel", ["ch"]), ChannelRef => "permcheck_channel"), - command!(debug, perms, ("guild", ["g"]), GuildRef => "permcheck_guild"), - command!(debug, ("proxy", ["proxying", "proxycheck"]), MessageRef => "message_proxy_check"), + command!(debug, perms, ("channel", ["ch"]), ChannelRef => "permcheck_channel") + .help("Checks if PluralKit has the required permissions in a channel"), + command!(debug, perms, ("guild", ["g"]), GuildRef => "permcheck_guild") + .help("Checks whether a server's permission setup is correct"), + command!(debug, ("proxy", ["proxying", "proxycheck"]), MessageRef => "message_proxy_check") + .help("Checks why a message has not been proxied"), ] } diff --git a/crates/command_definitions/src/fun.rs b/crates/command_definitions/src/fun.rs index 9c0e80e4..99423269 100644 --- a/crates/command_definitions/src/fun.rs +++ b/crates/command_definitions/src/fun.rs @@ -2,15 +2,16 @@ use super::*; pub fn cmds() -> impl IntoIterator { [ - command!("thunder" => "fun_thunder"), - command!("meow" => "fun_meow"), - command!("mn" => "fun_pokemon"), - command!("fire" => "fun_fire"), - command!("freeze" => "fun_freeze"), - command!("starstorm" => "fun_starstorm"), - command!("flash" => "fun_flash"), - command!("rool" => "fun_rool"), - command!("sus" => "amogus"), - command!("error" => "fun_error"), + command!("thunder" => "fun_thunder").help("Vanquishes your opponent with a lightning bolt"), + command!("meow" => "fun_meow").help("mrrp :3"), + command!("mn" => "fun_pokemon").help("Gotta catch 'em all!"), + command!("fire" => "fun_fire").help("Engulfs your opponent in a pillar of fire"), + command!("freeze" => "fun_freeze").help("Freezes your opponent solid"), + command!("starstorm" => "fun_starstorm") + .help("Summons a storm of meteors to strike your opponent"), + command!("flash" => "fun_flash").help("Explodes your opponent with a ball of green light"), + command!("rool" => "fun_rool").help("\"What the fuck is a Pokémon?\""), + command!("sus" => "amogus").help("ඞ"), + command!("error" => "fun_error").help("Shows a fake error message"), ] } diff --git a/crates/command_definitions/src/group.rs b/crates/command_definitions/src/group.rs index 3d845b90..2de9883c 100644 --- a/crates/command_definitions/src/group.rs +++ b/crates/command_definitions/src/group.rs @@ -27,7 +27,7 @@ pub fn cmds() -> impl Iterator { let group_info_cmd = once( command!(group_target => "group_info") .flag(ALL) - .help("Shows information about a group"), + .help("Looks up information about a group"), ); let group_name = tokens!( @@ -40,7 +40,7 @@ pub fn cmds() -> impl Iterator { .flag(YES) .help("Clears the group's name"), command!(group_name, Remainder(("name", OpaqueString)) => "group_rename") - .help("Renames the group"), + .help("Renames a group"), ]; let group_display_name = tokens!(group_target, ("displayname", ["dn", "nick", "nickname"])); @@ -81,17 +81,17 @@ pub fn cmds() -> impl Iterator { .flag(YES) .help("Clears the group's icon"), command!(group_icon, ("icon", Avatar) => "group_change_icon") - .help("Changes the group's icon"), + .help("Changes a group's icon"), ]; let group_banner = tokens!(group_target, ("banner", ["splash", "cover"])); let group_banner_cmd = [ - command!(group_banner => "group_show_banner").help("Shows the group's banner"), + command!(group_banner => "group_show_banner").help("Sets the group's banner image"), command!(group_banner, CLEAR => "group_clear_banner") .flag(YES) .help("Clears the group's banner"), command!(group_banner, ("banner", Avatar) => "group_change_banner") - .help("Changes the group's banner"), + .help("Sets the group's banner image"), ]; let group_color = tokens!(group_target, ("color", ["colour"])); @@ -101,7 +101,7 @@ pub fn cmds() -> impl Iterator { .flag(YES) .help("Clears the group's color"), command!(group_color, ("color", OpaqueString) => "group_change_color") - .help("Changes the group's color"), + .help("Changes a group's color"), ]; let group_privacy = tokens!(group_target, ("privacy", ["priv"])); @@ -127,14 +127,15 @@ pub fn cmds() -> impl Iterator { let group_delete_cmd = [ command!(group_target, ("delete", ["destroy", "erase", "yeet"]) => "group_delete") .flag(YES) - .help("Deletes the group"), + .help("Deletes a group"), ]; - let group_id_cmd = [command!(group_target, "id" => "group_id").help("Shows the group's ID")]; + let group_id_cmd = [command!(group_target, "id" => "group_id").help("Prints a group's ID")]; let group_front = tokens!(group_target, ("front", ["fronter", "fronters", "f"])); let group_front_cmd = [ command!(group_front, ("percent", ["p", "%"]) => "group_fronter_percent") + .help("Shows a group's front breakdown") .flag(("duration", OpaqueString)) .flag(("fronters-only", ["fo"])) .flag("flat"), @@ -149,8 +150,10 @@ pub fn cmds() -> impl Iterator { let group_modify_members_cmd = [ command!(group_target, "add", Optional(MemberRefs) => "group_add_member") + .help("Adds one or more members to a group") .flag(ALL).flag(YES), command!(group_target, ("remove", ["rem", "rm"]), Optional(MemberRefs) => "group_remove_member") + .help("Removes one or more members from a group") .flag(ALL).flag(YES), ]; diff --git a/crates/command_definitions/src/help.rs b/crates/command_definitions/src/help.rs index 793934db..0f32658e 100644 --- a/crates/command_definitions/src/help.rs +++ b/crates/command_definitions/src/help.rs @@ -3,9 +3,11 @@ use super::*; pub fn cmds() -> impl IntoIterator { let help = ("help", ["h"]); [ - command!(("commands", ["cmd", "c"]), ("subject", OpaqueString) => "commands_list"), - command!(("dashboard", ["dash"]) => "dashboard"), - command!("explain" => "explain"), + command!(("commands", ["cmd", "c"]), ("subject", OpaqueString) => "commands_list") + .help("Lists all commands or commands in a specific category"), + command!(("dashboard", ["dash"]) => "dashboard") + .help("Gets a link to the PluralKit web dashboard"), + command!("explain" => "explain").help("Explains the basics of systems and proxying"), command!(help => "help").help("Shows the help command"), command!(help, "commands" => "help_commands").help("help commands"), command!(help, "proxy" => "help_proxy").help("help proxy"), diff --git a/crates/command_definitions/src/import_export.rs b/crates/command_definitions/src/import_export.rs index bf095263..9a73e7a2 100644 --- a/crates/command_definitions/src/import_export.rs +++ b/crates/command_definitions/src/import_export.rs @@ -2,7 +2,9 @@ use super::*; pub fn cmds() -> impl IntoIterator { [ - command!("import", Optional(Remainder(("url", OpaqueString))) => "import").flag(YES), - command!("export" => "export"), + command!("import", Optional(Remainder(("url", OpaqueString))) => "import") + .help("Imports system information from a data file") + .flag(YES), + command!("export" => "export").help("Exports system information to a file"), ] } diff --git a/crates/command_definitions/src/member.rs b/crates/command_definitions/src/member.rs index e466a26a..4b140edf 100644 --- a/crates/command_definitions/src/member.rs +++ b/crates/command_definitions/src/member.rs @@ -36,14 +36,13 @@ pub fn cmds() -> impl Iterator { let delete = ("delete", ["del", "remove"]); let member_new_cmd = once( - command!(member, new, ("name", OpaqueString) => "member_new") - .help("Creates a new system member"), + command!(member, new, ("name", OpaqueString) => "member_new").help("Creates a new member"), ); let member_info_cmd = once( command!(member_target => "member_show") .flag("pt") - .help("Shows information about a member"), + .help("Looks up information about a member"), ); let member_name_cmd = { @@ -52,7 +51,7 @@ pub fn cmds() -> impl Iterator { command!(member_name => "member_name_show").help("Shows a member's name"), command!(member_name, Remainder(("name", OpaqueString)) => "member_name_update") .flag(YES) - .help("Changes a member's name"), + .help("Renames a member"), ] }; @@ -99,7 +98,7 @@ pub fn cmds() -> impl Iterator { [ command!(member_banner => "member_banner_show").help("Shows a member's banner image"), command!(member_banner, ("banner", Avatar) => "member_banner_update") - .help("Changes a member's banner image"), + .help("Sets the member's banner image"), command!(member_banner, CLEAR => "member_banner_clear") .flag(YES) .help("Clears a member's banner image"), @@ -149,7 +148,7 @@ pub fn cmds() -> impl Iterator { command!(member_server_name => "member_servername_show") .help("Shows a member's server name"), command!(member_server_name, Remainder(("name", OpaqueString)) => "member_servername_update") - .help("Changes a member's server name"), + .help("Changes a member's display name in the current server"), command!(member_server_name, CLEAR => "member_servername_clear") .flag(YES) .help("Clears a member's server name"), @@ -180,14 +179,14 @@ pub fn cmds() -> impl Iterator { command!(member_keep_proxy => "member_keepproxy_show") .help("Shows a member's keep-proxy setting"), command!(member_keep_proxy, ("value", Toggle) => "member_keepproxy_update") - .help("Changes a member's keep-proxy setting"), + .help("Sets whether to include a member's proxy tags when proxying"), command!(member_server_keep_proxy => "member_server_keepproxy_show") .help("Shows a member's server-specific keep-proxy setting"), command!(member_server_keep_proxy, CLEAR => "member_server_keepproxy_clear") .flag(YES) .help("Clears a member's server-specific keep-proxy setting"), command!(member_server_keep_proxy, ("value", Toggle) => "member_server_keepproxy_update") - .help("Changes a member's server-specific keep-proxy setting"), + .help("Sets whether to include a member's proxy tags when proxying in the current server"), ] }; @@ -198,11 +197,11 @@ pub fn cmds() -> impl Iterator { command!(member_tts => "member_tts_show") .help("Shows whether a member's messages are sent as TTS"), command!(member_tts, ("value", Toggle) => "member_tts_update") - .help("Changes whether a member's messages are sent as TTS"), + .help("Sets whether to send a member's messages as text-to-speech messages"), command!(member_autoproxy => "member_autoproxy_show") .help("Shows whether a member can be autoproxied"), command!(member_autoproxy, ("value", Toggle) => "member_autoproxy_update") - .help("Changes whether a member can be autoproxied"), + .help("Sets whether a member will be autoproxied when autoproxy is set to latch or front mode"), ] }; @@ -275,7 +274,7 @@ pub fn cmds() -> impl Iterator { command!(member_server_avatar => "member_server_avatar_show") .help("Shows a member's server-specific avatar"), command!(member_server_avatar, ("avatar", Avatar) => "member_server_avatar_update") - .help("Changes a member's server-specific avatar"), + .help("Changes a member's avatar in the current server"), command!(member_server_avatar, CLEAR => "member_server_avatar_clear") .flag(YES) .help("Clears a member's server-specific avatar"), @@ -295,7 +294,7 @@ pub fn cmds() -> impl Iterator { ]; let member_display_id_cmd = - [command!(member_target, "id" => "member_id").help("Displays a member's ID")]; + [command!(member_target, "id" => "member_id").help("Prints a member's ID")]; let member_delete_cmd = [command!(member_target, delete => "member_delete").help("Deletes a member")]; diff --git a/crates/command_definitions/src/message.rs b/crates/command_definitions/src/message.rs index 812b059d..9c930e4d 100644 --- a/crates/command_definitions/src/message.rs +++ b/crates/command_definitions/src/message.rs @@ -16,13 +16,13 @@ pub fn cmds() -> impl IntoIterator { .flag(("no-space", ["nospace", "ns"])) .flag(("clear-embeds", ["clear-embed", "ce"])) .flag(("clear-attachments", ["clear-attachment", "ca"])) - .help("Edits a proxied message") + .help("Edits a previously proxied message") }; [ apply_edit(command!(edit, Optional(MessageRef), new_content_param => "message_edit")), command!(reproxy, Optional(("msg", MessageRef)), ("member", MemberRef) => "message_reproxy") - .help("Reproxies a message with a different member"), + .help("Reproxies a previously proxied message with a different member"), command!(message, author => "message_author").help("Shows the author of a proxied message"), command!(message, delete => "message_delete").help("Deletes a proxied message"), apply_edit(command!(message, edit, new_content_param => "message_edit")), diff --git a/crates/command_definitions/src/random.rs b/crates/command_definitions/src/random.rs index a5892cc9..e24df15c 100644 --- a/crates/command_definitions/src/random.rs +++ b/crates/command_definitions/src/random.rs @@ -7,12 +7,22 @@ pub fn cmds() -> impl Iterator { let group = group::group(); [ - command!(random => "random_self").flag(group), - command!(random, group => "random_group_self"), - command!(random, group::targeted() => "random_group_member_self").flags(get_list_flags()), - command!(system::targeted(), random => "system_random").flag(group), - command!(system::targeted(), random, group => "system_random_group"), - command!(group::targeted(), random => "group_random_member").flags(get_list_flags()), + command!(random => "random_self") + .help("Shows the info card of a randomly selected member in your system") + .flag(group), + command!(random, group => "random_group_self") + .help("Shows the info card of a randomly selected group in your system"), + command!(random, group::targeted() => "random_group_member_self") + .help("Shows the info card of a randomly selected member in a group in your system") + .flags(get_list_flags()), + command!(system::targeted(), random => "system_random") + .help("Shows the info card of a randomly selected member in a system") + .flag(group), + command!(system::targeted(), random, group => "system_random_group") + .help("Shows the info card of a randomly selected group in a system"), + command!(group::targeted(), random => "group_random_member") + .help("Shows the info card of a randomly selected member in a group") + .flags(get_list_flags()), ] .into_iter() .map(|cmd| cmd.flag(ALL)) diff --git a/crates/command_definitions/src/server_config.rs b/crates/command_definitions/src/server_config.rs index 366b1236..ceca4db9 100644 --- a/crates/command_definitions/src/server_config.rs +++ b/crates/command_definitions/src/server_config.rs @@ -50,7 +50,7 @@ pub fn cmds() -> impl Iterator { command!(log_channel => "server_config_log_channel_show") .help("Shows the current log channel"), command!(log_channel, ("channel", ChannelRef) => "server_config_log_channel_set") - .help("Sets the log channel"), + .help("Designates a channel to post proxied messages to"), command!(log_channel, CLEAR => "server_config_log_channel_clear") .flag(YES) .help("Clears the log channel"), @@ -60,11 +60,11 @@ pub fn cmds() -> impl Iterator { command!(log_cleanup => "server_config_log_cleanup_show") .help("Shows whether log cleanup is enabled"), command!(log_cleanup, Toggle => "server_config_log_cleanup_set") - .help("Enables or disables log cleanup"), + .help("Toggles whether to clean up other bots' log channels"), command!(log_cleanup_short => "server_config_log_cleanup_show") .help("Shows whether log cleanup is enabled"), command!(log_cleanup_short, Toggle => "server_config_log_cleanup_set") - .help("Enables or disables log cleanup"), + .help("Toggles whether to clean up other bots' log channels"), ]; let log_blacklist_cmds = [ @@ -72,10 +72,10 @@ pub fn cmds() -> impl Iterator { .help("Shows channels where logging is disabled"), command!(log_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_log_blacklist_add") .flag(ALL) - .help("Adds a channel (or all channels with --all) to the log blacklist"), + .help("Disables message logging in certain channels"), command!(log_blacklist, remove, Optional(("channel", ChannelRef)) => "server_config_log_blacklist_remove") .flag(ALL) - .help("Removes a channel (or all channels with --all) from the log blacklist"), + .help("Enables message logging in certain channels"), ]; let proxy_blacklist_cmds = [ @@ -83,43 +83,45 @@ pub fn cmds() -> impl Iterator { .help("Shows channels where proxying is disabled"), command!(proxy_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_proxy_blacklist_add") .flag(ALL) - .help("Adds a channel (or all channels with --all) to the proxy blacklist"), + .help("Disables message proxying in certain channels"), command!(proxy_blacklist, remove, Optional(("channel", ChannelRef)) => "server_config_proxy_blacklist_remove") .flag(ALL) - .help("Removes a channel (or all channels with --all) from the proxy blacklist"), + .help("Enables message proxying in certain channels"), ]; let invalid_cmds = [ command!(invalid => "server_config_invalid_command_response_show") .help("Shows whether error responses for invalid commands are enabled"), command!(invalid, Toggle => "server_config_invalid_command_response_set") - .help("Enables or disables error responses for invalid commands"), + .help("Sets whether to show an error message when an unknown command is sent"), command!(invalid_short => "server_config_invalid_command_response_show") .help("Shows whether error responses for invalid commands are enabled"), command!(invalid_short, Toggle => "server_config_invalid_command_response_set") - .help("Enables or disables error responses for invalid commands"), + .help("Sets whether to show an error message when an unknown command is sent"), ]; let require_tag_cmds = [ command!(require_tag => "server_config_require_system_tag_show") .help("Shows whether system tags are required"), - command!(require_tag, Toggle => "server_config_require_system_tag_set") - .help("Requires or unrequires system tags for proxied messages"), + command!(require_tag, Toggle => "server_config_require_system_tag_set").help( + "Sets whether server users are required to have a system tag on proxied messages", + ), command!(require_tag_short => "server_config_require_system_tag_show") .help("Shows whether system tags are required"), - command!(require_tag_short, Toggle => "server_config_require_system_tag_set") - .help("Requires or unrequires system tags for proxied messages"), + command!(require_tag_short, Toggle => "server_config_require_system_tag_set").help( + "Sets whether server users are required to have a system tag on proxied messages", + ), ]; let suppress_cmds = [ command!(suppress => "server_config_suppress_notifications_show") .help("Shows whether notifications are suppressed for proxied messages"), command!(suppress, Toggle => "server_config_suppress_notifications_set") - .help("Enables or disables notification suppression for proxied messages"), + .help("Sets whether all proxied messages will have notifications suppressed (sent as `@silent` messages)"), command!(suppress_short => "server_config_suppress_notifications_show") .help("Shows whether notifications are suppressed for proxied messages"), command!(suppress_short, Toggle => "server_config_suppress_notifications_set") - .help("Enables or disables notification suppression for proxied messages"), + .help("Sets whether all proxied messages will have notifications suppressed (sent as `@silent` messages)"), ]; let main_cmd = once( diff --git a/crates/command_definitions/src/switch.rs b/crates/command_definitions/src/switch.rs index c52525ad..ab87c6ec 100644 --- a/crates/command_definitions/src/switch.rs +++ b/crates/command_definitions/src/switch.rs @@ -17,13 +17,23 @@ pub fn cmds() -> impl IntoIterator { ]; [ - command!(switch, ("commands", ["help"]) => "switch_commands"), - command!(switch, out => "switch_out"), - command!(switch, delete => "switch_delete").flag(("all", ["clear", "c"])), - command!(switch, r#move, Remainder(OpaqueString) => "switch_move"), // TODO: datetime parsing - command!(switch, edit, out => "switch_edit_out").flag(YES), - command!(switch, edit, Optional(MemberRefs) => "switch_edit").flags(edit_flags), - command!(switch, copy, Optional(MemberRefs) => "switch_copy").flags(edit_flags), - command!(switch, MemberRefs => "switch_do"), + command!(switch, ("commands", ["help"]) => "switch_commands") + .help("Shows help for switch commands"), + command!(switch, out => "switch_out").help("Registers a switch with no members"), + command!(switch, delete => "switch_delete") + .help("Deletes the latest switch") + .flag(("all", ["clear", "c"])), + command!(switch, r#move, Remainder(OpaqueString) => "switch_move") + .help("Moves the latest switch in time"), // TODO: datetime parsing + command!(switch, edit, out => "switch_edit_out") + .help("Turns the latest switch into a switch-out") + .flag(YES), + command!(switch, edit, Optional(MemberRefs) => "switch_edit") + .help("Edits the members in the latest switch") + .flags(edit_flags), + command!(switch, copy, Optional(MemberRefs) => "switch_copy") + .help("Makes a new switch with the listed members added") + .flags(edit_flags), + command!(switch, MemberRefs => "switch_do").help("Registers a switch"), ] } diff --git a/crates/command_definitions/src/system.rs b/crates/command_definitions/src/system.rs index ec25f7db..6938bd56 100644 --- a/crates/command_definitions/src/system.rs +++ b/crates/command_definitions/src/system.rs @@ -215,16 +215,20 @@ pub fn edit() -> impl Iterator { let front = ("front", ["fronter", "fronters", "f"]); let make_front_history = |subcmd: TokensIterator| { - command!(system, Optional(SystemRef), subcmd => "system_fronter_history").flag(CLEAR) + command!(system, Optional(SystemRef), subcmd => "system_fronter_history") + .help("Shows a system's front history") + .flag(CLEAR) }; let make_front_percent = |subcmd: TokensIterator| { command!(system, Optional(SystemRef), subcmd => "system_fronter_percent") + .help("Shows a system's front breakdown") .flag(("duration", OpaqueString)) .flag(("fronters-only", ["fo"])) .flag("flat") }; let system_front_cmd = [ - command!(system, Optional(SystemRef), front => "system_fronter"), + command!(system, Optional(SystemRef), front => "system_fronter") + .help("Shows a system's fronter(s)"), make_front_history(tokens!(front, ("history", ["h"]))), make_front_history(tokens!(("fronthistory", ["fh"]))), make_front_percent(tokens!(front, ("percent", ["p", "%"]))), @@ -243,8 +247,10 @@ pub fn edit() -> impl Iterator { once(command!(system, Optional(SystemRef), "groups", search_param => "system_groups")) .map(apply_list_opts); - let system_display_id_cmd = - once(command!(system, Optional(SystemRef), "id" => "system_display_id")); + let system_display_id_cmd = once( + command!(system, Optional(SystemRef), "id" => "system_display_id") + .help("Prints a system's ID"), + ); let system_delete = once( command!(system, ("delete", ["erase", "remove", "yeet"]) => "system_delete") @@ -253,8 +259,11 @@ pub fn edit() -> impl Iterator { ); let system_link = [ - command!("link", ("account", UserRef) => "system_link"), - command!("unlink", ("account", OpaqueString) => "system_unlink").flag(YES), + command!("link", ("account", UserRef) => "system_link") + .help("Links another Discord account to your system"), + command!("unlink", ("account", OpaqueString) => "system_unlink") + .help("Unlinks a Discord account from your system") + .flag(YES), ]; system_new_cmd