add missing help text and redo the existing ones based on CommandHelp.cs

This commit is contained in:
dawn 2026-01-17 11:29:42 +03:00
parent bdf6a6c345
commit e2b354aae1
No known key found for this signature in database
14 changed files with 142 additions and 99 deletions

View file

@ -2,7 +2,8 @@ use super::*;
pub fn cmds() -> impl IntoIterator<Item = Command> { pub fn cmds() -> impl IntoIterator<Item = Command> {
[ [
command!("token" => "token_display"), command!("token" => "token_display").help("Gets your system's API token"),
command!("token", ("refresh", ["renew", "regen", "reroll"]) => "token_refresh"), command!("token", ("refresh", ["renew", "regen", "reroll"]) => "token_refresh")
.help("Generates a new API token and invalidates the old one"),
] ]
} }

View file

@ -10,11 +10,11 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
[ [
command!(ap => "autoproxy_show").help("Shows your current autoproxy settings"), command!(ap => "autoproxy_show").help("Shows your current autoproxy settings"),
command!(ap, ("off", ["stop", "cancel", "no", "disable", "remove"]) => "autoproxy_off") 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") 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") command!(ap, ("front", ["fronter", "switch", "f"]) => "autoproxy_front")
.help("Sets autoproxy to front mode"), .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 autoproxy to a specific member"), command!(ap, MemberRef => "autoproxy_member").help("Sets your system's autoproxy in this server to proxy a specific member"),
] ]
} }

View file

@ -14,13 +14,13 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(ap_account => "cfg_ap_account_show") command!(ap_account => "cfg_ap_account_show")
.help("Shows autoproxy status for the account"), .help("Shows autoproxy status for the account"),
command!(ap_account, Toggle => "cfg_ap_account_update") 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 => "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, RESET => "cfg_ap_timeout_reset").help("Resets the autoproxy timeout"),
command!(ap_timeout, parameter::Toggle::Off => "cfg_ap_timeout_off") command!(ap_timeout, parameter::Toggle::Off => "cfg_ap_timeout_off")
.help("Disables the autoproxy timeout"), .help("Disables the autoproxy timeout"),
command!(ap_timeout, ("timeout", OpaqueString) => "cfg_ap_timeout_update") 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"])); let timezone_tokens = tokens!(cfg, ("timezone", ["zone", "tz"]));
@ -28,13 +28,14 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(timezone_tokens => "cfg_timezone_show").help("Shows the system timezone"), 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, RESET => "cfg_timezone_reset").help("Resets the system timezone"),
command!(timezone_tokens, ("timezone", OpaqueString) => "cfg_timezone_update") 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_tokens = tokens!(cfg, "ping");
let ping = [ let ping = [
command!(ping_tokens => "cfg_ping_show").help("Shows the ping setting"), command!(ping_tokens => "cfg_ping_show").help("Shows ping preferences"),
command!(ping_tokens, Toggle => "cfg_ping_update").help("Updates the ping setting"), command!(ping_tokens, Toggle => "cfg_ping_update")
.help("Changes your system's ping preferences"),
]; ];
let priv_ = ("private", ["priv"]); let priv_ = ("private", ["priv"]);
@ -46,19 +47,19 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(member_privacy => "cfg_member_privacy_show") command!(member_privacy => "cfg_member_privacy_show")
.help("Shows the default privacy for new members"), .help("Shows the default privacy for new members"),
command!(member_privacy, Toggle => "cfg_member_privacy_update") 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") command!(member_privacy_short => "cfg_member_privacy_show")
.help("Shows the default privacy for new members"), .help("Shows the default privacy for new members"),
command!(member_privacy_short, Toggle => "cfg_member_privacy_update") 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") command!(group_privacy => "cfg_group_privacy_show")
.help("Shows the default privacy for new groups"), .help("Shows the default privacy for new groups"),
command!(group_privacy, Toggle => "cfg_group_privacy_update") 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") command!(group_privacy_short => "cfg_group_privacy_show")
.help("Shows the default privacy for new groups"), .help("Shows the default privacy for new groups"),
command!(group_privacy_short, Toggle => "cfg_group_privacy_update") 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"; let show = "show";
@ -68,11 +69,11 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(show_private => "cfg_show_private_info_show") command!(show_private => "cfg_show_private_info_show")
.help("Shows whether private info is shown"), .help("Shows whether private info is shown"),
command!(show_private, Toggle => "cfg_show_private_info_update") 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") command!(show_private_short => "cfg_show_private_info_show")
.help("Shows whether private info is shown"), .help("Shows whether private info is shown"),
command!(show_private_short, Toggle => "cfg_show_private_info_update") 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"]); let proxy = ("proxy", ["px"]);
@ -96,11 +97,11 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
.help("Toggles proxy error messages"), .help("Toggles proxy error messages"),
command!(proxy_switch => "cfg_proxy_switch_show").help("Shows the proxy switch behavior"), command!(proxy_switch => "cfg_proxy_switch_show").help("Shows the proxy switch behavior"),
command!(proxy_switch, ProxySwitchAction => "cfg_proxy_switch_update") 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") command!(proxy_switch_short => "cfg_proxy_switch_show")
.help("Shows the proxy switch behavior"), .help("Shows the proxy switch behavior"),
command!(proxy_switch_short, ProxySwitchAction => "cfg_proxy_switch_update") 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"]); let id = ("id", ["ids"]);
@ -169,12 +170,12 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(name_format => "cfg_name_format_show").help("Shows the name format"), 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, RESET => "cfg_name_format_reset").help("Resets the name format"),
command!(name_format, ("format", OpaqueString) => "cfg_name_format_update") 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 => "cfg_name_format_show").help("Shows the name format"),
command!(name_format_short, RESET => "cfg_name_format_reset") command!(name_format_short, RESET => "cfg_name_format_reset")
.help("Resets the name format"), .help("Resets the name format"),
command!(name_format_short, ("format", OpaqueString) => "cfg_name_format_update") 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"; let server = "server";
@ -194,19 +195,19 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
command!(server_name_format, RESET => "cfg_server_name_format_reset") command!(server_name_format, RESET => "cfg_server_name_format_reset")
.help("Resets the server name format"), .help("Resets the server name format"),
command!(server_name_format, ("format", OpaqueString) => "cfg_server_name_format_update") 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") command!(server_format => "cfg_server_name_format_show")
.help("Shows the server name format"), .help("Shows the server name format"),
command!(server_format, RESET => "cfg_server_name_format_reset") command!(server_format, RESET => "cfg_server_name_format_reset")
.help("Resets the server name format"), .help("Resets the server name format"),
command!(server_format, ("format", OpaqueString) => "cfg_server_name_format_update") 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") command!(server_format_short => "cfg_server_name_format_show")
.help("Shows the server name format"), .help("Shows the server name format"),
command!(server_format_short, RESET => "cfg_server_name_format_reset") command!(server_format_short, RESET => "cfg_server_name_format_reset")
.help("Resets the server name format"), .help("Resets the server name format"),
command!(server_format_short, ("format", OpaqueString) => "cfg_server_name_format_update") 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"]); let limit_ = ("limit", ["lim"]);

View file

@ -8,8 +8,11 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
let debug = debug(); let debug = debug();
let perms = ("permissions", ["perms", "permcheck"]); let perms = ("permissions", ["perms", "permcheck"]);
[ [
command!(debug, perms, ("channel", ["ch"]), ChannelRef => "permcheck_channel"), command!(debug, perms, ("channel", ["ch"]), ChannelRef => "permcheck_channel")
command!(debug, perms, ("guild", ["g"]), GuildRef => "permcheck_guild"), .help("Checks if PluralKit has the required permissions in a channel"),
command!(debug, ("proxy", ["proxying", "proxycheck"]), MessageRef => "message_proxy_check"), 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"),
] ]
} }

View file

@ -2,15 +2,16 @@ use super::*;
pub fn cmds() -> impl IntoIterator<Item = Command> { pub fn cmds() -> impl IntoIterator<Item = Command> {
[ [
command!("thunder" => "fun_thunder"), command!("thunder" => "fun_thunder").help("Vanquishes your opponent with a lightning bolt"),
command!("meow" => "fun_meow"), command!("meow" => "fun_meow").help("mrrp :3"),
command!("mn" => "fun_pokemon"), command!("mn" => "fun_pokemon").help("Gotta catch 'em all!"),
command!("fire" => "fun_fire"), command!("fire" => "fun_fire").help("Engulfs your opponent in a pillar of fire"),
command!("freeze" => "fun_freeze"), command!("freeze" => "fun_freeze").help("Freezes your opponent solid"),
command!("starstorm" => "fun_starstorm"), command!("starstorm" => "fun_starstorm")
command!("flash" => "fun_flash"), .help("Summons a storm of meteors to strike your opponent"),
command!("rool" => "fun_rool"), command!("flash" => "fun_flash").help("Explodes your opponent with a ball of green light"),
command!("sus" => "amogus"), command!("rool" => "fun_rool").help("\"What the fuck is a Pokémon?\""),
command!("error" => "fun_error"), command!("sus" => "amogus").help(""),
command!("error" => "fun_error").help("Shows a fake error message"),
] ]
} }

View file

@ -27,7 +27,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let group_info_cmd = once( let group_info_cmd = once(
command!(group_target => "group_info") command!(group_target => "group_info")
.flag(ALL) .flag(ALL)
.help("Shows information about a group"), .help("Looks up information about a group"),
); );
let group_name = tokens!( let group_name = tokens!(
@ -40,7 +40,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
.flag(YES) .flag(YES)
.help("Clears the group's name"), .help("Clears the group's name"),
command!(group_name, Remainder(("name", OpaqueString)) => "group_rename") 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"])); let group_display_name = tokens!(group_target, ("displayname", ["dn", "nick", "nickname"]));
@ -81,17 +81,17 @@ pub fn cmds() -> impl Iterator<Item = Command> {
.flag(YES) .flag(YES)
.help("Clears the group's icon"), .help("Clears the group's icon"),
command!(group_icon, ("icon", Avatar) => "group_change_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 = tokens!(group_target, ("banner", ["splash", "cover"]));
let group_banner_cmd = [ 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") command!(group_banner, CLEAR => "group_clear_banner")
.flag(YES) .flag(YES)
.help("Clears the group's banner"), .help("Clears the group's banner"),
command!(group_banner, ("banner", Avatar) => "group_change_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"])); let group_color = tokens!(group_target, ("color", ["colour"]));
@ -101,7 +101,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
.flag(YES) .flag(YES)
.help("Clears the group's color"), .help("Clears the group's color"),
command!(group_color, ("color", OpaqueString) => "group_change_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"])); let group_privacy = tokens!(group_target, ("privacy", ["priv"]));
@ -127,14 +127,15 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let group_delete_cmd = [ let group_delete_cmd = [
command!(group_target, ("delete", ["destroy", "erase", "yeet"]) => "group_delete") command!(group_target, ("delete", ["destroy", "erase", "yeet"]) => "group_delete")
.flag(YES) .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 = tokens!(group_target, ("front", ["fronter", "fronters", "f"]));
let group_front_cmd = [ let group_front_cmd = [
command!(group_front, ("percent", ["p", "%"]) => "group_fronter_percent") command!(group_front, ("percent", ["p", "%"]) => "group_fronter_percent")
.help("Shows a group's front breakdown")
.flag(("duration", OpaqueString)) .flag(("duration", OpaqueString))
.flag(("fronters-only", ["fo"])) .flag(("fronters-only", ["fo"]))
.flag("flat"), .flag("flat"),
@ -149,8 +150,10 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let group_modify_members_cmd = [ let group_modify_members_cmd = [
command!(group_target, "add", Optional(MemberRefs) => "group_add_member") command!(group_target, "add", Optional(MemberRefs) => "group_add_member")
.help("Adds one or more members to a group")
.flag(ALL).flag(YES), .flag(ALL).flag(YES),
command!(group_target, ("remove", ["rem", "rm"]), Optional(MemberRefs) => "group_remove_member") command!(group_target, ("remove", ["rem", "rm"]), Optional(MemberRefs) => "group_remove_member")
.help("Removes one or more members from a group")
.flag(ALL).flag(YES), .flag(ALL).flag(YES),
]; ];

View file

@ -3,9 +3,11 @@ use super::*;
pub fn cmds() -> impl IntoIterator<Item = Command> { pub fn cmds() -> impl IntoIterator<Item = Command> {
let help = ("help", ["h"]); let help = ("help", ["h"]);
[ [
command!(("commands", ["cmd", "c"]), ("subject", OpaqueString) => "commands_list"), command!(("commands", ["cmd", "c"]), ("subject", OpaqueString) => "commands_list")
command!(("dashboard", ["dash"]) => "dashboard"), .help("Lists all commands or commands in a specific category"),
command!("explain" => "explain"), 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 => "help").help("Shows the help command"),
command!(help, "commands" => "help_commands").help("help commands"), command!(help, "commands" => "help_commands").help("help commands"),
command!(help, "proxy" => "help_proxy").help("help proxy"), command!(help, "proxy" => "help_proxy").help("help proxy"),

View file

@ -2,7 +2,9 @@ use super::*;
pub fn cmds() -> impl IntoIterator<Item = Command> { pub fn cmds() -> impl IntoIterator<Item = Command> {
[ [
command!("import", Optional(Remainder(("url", OpaqueString))) => "import").flag(YES), command!("import", Optional(Remainder(("url", OpaqueString))) => "import")
command!("export" => "export"), .help("Imports system information from a data file")
.flag(YES),
command!("export" => "export").help("Exports system information to a file"),
] ]
} }

View file

@ -36,14 +36,13 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let delete = ("delete", ["del", "remove"]); let delete = ("delete", ["del", "remove"]);
let member_new_cmd = once( let member_new_cmd = once(
command!(member, new, ("name", OpaqueString) => "member_new") command!(member, new, ("name", OpaqueString) => "member_new").help("Creates a new member"),
.help("Creates a new system member"),
); );
let member_info_cmd = once( let member_info_cmd = once(
command!(member_target => "member_show") command!(member_target => "member_show")
.flag("pt") .flag("pt")
.help("Shows information about a member"), .help("Looks up information about a member"),
); );
let member_name_cmd = { let member_name_cmd = {
@ -52,7 +51,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
command!(member_name => "member_name_show").help("Shows a member's name"), command!(member_name => "member_name_show").help("Shows a member's name"),
command!(member_name, Remainder(("name", OpaqueString)) => "member_name_update") command!(member_name, Remainder(("name", OpaqueString)) => "member_name_update")
.flag(YES) .flag(YES)
.help("Changes a member's name"), .help("Renames a member"),
] ]
}; };
@ -99,7 +98,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
[ [
command!(member_banner => "member_banner_show").help("Shows a member's banner image"), command!(member_banner => "member_banner_show").help("Shows a member's banner image"),
command!(member_banner, ("banner", Avatar) => "member_banner_update") 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") command!(member_banner, CLEAR => "member_banner_clear")
.flag(YES) .flag(YES)
.help("Clears a member's banner image"), .help("Clears a member's banner image"),
@ -149,7 +148,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
command!(member_server_name => "member_servername_show") command!(member_server_name => "member_servername_show")
.help("Shows a member's server name"), .help("Shows a member's server name"),
command!(member_server_name, Remainder(("name", OpaqueString)) => "member_servername_update") 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") command!(member_server_name, CLEAR => "member_servername_clear")
.flag(YES) .flag(YES)
.help("Clears a member's server name"), .help("Clears a member's server name"),
@ -180,14 +179,14 @@ pub fn cmds() -> impl Iterator<Item = Command> {
command!(member_keep_proxy => "member_keepproxy_show") command!(member_keep_proxy => "member_keepproxy_show")
.help("Shows a member's keep-proxy setting"), .help("Shows a member's keep-proxy setting"),
command!(member_keep_proxy, ("value", Toggle) => "member_keepproxy_update") 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") command!(member_server_keep_proxy => "member_server_keepproxy_show")
.help("Shows a member's server-specific keep-proxy setting"), .help("Shows a member's server-specific keep-proxy setting"),
command!(member_server_keep_proxy, CLEAR => "member_server_keepproxy_clear") command!(member_server_keep_proxy, CLEAR => "member_server_keepproxy_clear")
.flag(YES) .flag(YES)
.help("Clears a member's server-specific keep-proxy setting"), .help("Clears a member's server-specific keep-proxy setting"),
command!(member_server_keep_proxy, ("value", Toggle) => "member_server_keepproxy_update") 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<Item = Command> {
command!(member_tts => "member_tts_show") command!(member_tts => "member_tts_show")
.help("Shows whether a member's messages are sent as TTS"), .help("Shows whether a member's messages are sent as TTS"),
command!(member_tts, ("value", Toggle) => "member_tts_update") 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") command!(member_autoproxy => "member_autoproxy_show")
.help("Shows whether a member can be autoproxied"), .help("Shows whether a member can be autoproxied"),
command!(member_autoproxy, ("value", Toggle) => "member_autoproxy_update") 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<Item = Command> {
command!(member_server_avatar => "member_server_avatar_show") command!(member_server_avatar => "member_server_avatar_show")
.help("Shows a member's server-specific avatar"), .help("Shows a member's server-specific avatar"),
command!(member_server_avatar, ("avatar", Avatar) => "member_server_avatar_update") 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") command!(member_server_avatar, CLEAR => "member_server_avatar_clear")
.flag(YES) .flag(YES)
.help("Clears a member's server-specific avatar"), .help("Clears a member's server-specific avatar"),
@ -295,7 +294,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
]; ];
let member_display_id_cmd = 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 = let member_delete_cmd =
[command!(member_target, delete => "member_delete").help("Deletes a member")]; [command!(member_target, delete => "member_delete").help("Deletes a member")];

View file

@ -16,13 +16,13 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
.flag(("no-space", ["nospace", "ns"])) .flag(("no-space", ["nospace", "ns"]))
.flag(("clear-embeds", ["clear-embed", "ce"])) .flag(("clear-embeds", ["clear-embed", "ce"]))
.flag(("clear-attachments", ["clear-attachment", "ca"])) .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")), apply_edit(command!(edit, Optional(MessageRef), new_content_param => "message_edit")),
command!(reproxy, Optional(("msg", MessageRef)), ("member", MemberRef) => "message_reproxy") 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, author => "message_author").help("Shows the author of a proxied message"),
command!(message, delete => "message_delete").help("Deletes a proxied message"), command!(message, delete => "message_delete").help("Deletes a proxied message"),
apply_edit(command!(message, edit, new_content_param => "message_edit")), apply_edit(command!(message, edit, new_content_param => "message_edit")),

View file

@ -7,12 +7,22 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let group = group::group(); let group = group::group();
[ [
command!(random => "random_self").flag(group), command!(random => "random_self")
command!(random, group => "random_group_self"), .help("Shows the info card of a randomly selected member in your system")
command!(random, group::targeted() => "random_group_member_self").flags(get_list_flags()), .flag(group),
command!(system::targeted(), random => "system_random").flag(group), command!(random, group => "random_group_self")
command!(system::targeted(), random, group => "system_random_group"), .help("Shows the info card of a randomly selected group in your system"),
command!(group::targeted(), random => "group_random_member").flags(get_list_flags()), 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() .into_iter()
.map(|cmd| cmd.flag(ALL)) .map(|cmd| cmd.flag(ALL))

View file

@ -50,7 +50,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
command!(log_channel => "server_config_log_channel_show") command!(log_channel => "server_config_log_channel_show")
.help("Shows the current log channel"), .help("Shows the current log channel"),
command!(log_channel, ("channel", ChannelRef) => "server_config_log_channel_set") 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") command!(log_channel, CLEAR => "server_config_log_channel_clear")
.flag(YES) .flag(YES)
.help("Clears the log channel"), .help("Clears the log channel"),
@ -60,11 +60,11 @@ pub fn cmds() -> impl Iterator<Item = Command> {
command!(log_cleanup => "server_config_log_cleanup_show") command!(log_cleanup => "server_config_log_cleanup_show")
.help("Shows whether log cleanup is enabled"), .help("Shows whether log cleanup is enabled"),
command!(log_cleanup, Toggle => "server_config_log_cleanup_set") 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") command!(log_cleanup_short => "server_config_log_cleanup_show")
.help("Shows whether log cleanup is enabled"), .help("Shows whether log cleanup is enabled"),
command!(log_cleanup_short, Toggle => "server_config_log_cleanup_set") 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 = [ let log_blacklist_cmds = [
@ -72,10 +72,10 @@ pub fn cmds() -> impl Iterator<Item = Command> {
.help("Shows channels where logging is disabled"), .help("Shows channels where logging is disabled"),
command!(log_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_log_blacklist_add") command!(log_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_log_blacklist_add")
.flag(ALL) .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") command!(log_blacklist, remove, Optional(("channel", ChannelRef)) => "server_config_log_blacklist_remove")
.flag(ALL) .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 = [ let proxy_blacklist_cmds = [
@ -83,43 +83,45 @@ pub fn cmds() -> impl Iterator<Item = Command> {
.help("Shows channels where proxying is disabled"), .help("Shows channels where proxying is disabled"),
command!(proxy_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_proxy_blacklist_add") command!(proxy_blacklist, add, Optional(("channel", ChannelRef)) => "server_config_proxy_blacklist_add")
.flag(ALL) .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") command!(proxy_blacklist, remove, Optional(("channel", ChannelRef)) => "server_config_proxy_blacklist_remove")
.flag(ALL) .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 = [ let invalid_cmds = [
command!(invalid => "server_config_invalid_command_response_show") command!(invalid => "server_config_invalid_command_response_show")
.help("Shows whether error responses for invalid commands are enabled"), .help("Shows whether error responses for invalid commands are enabled"),
command!(invalid, Toggle => "server_config_invalid_command_response_set") 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") command!(invalid_short => "server_config_invalid_command_response_show")
.help("Shows whether error responses for invalid commands are enabled"), .help("Shows whether error responses for invalid commands are enabled"),
command!(invalid_short, Toggle => "server_config_invalid_command_response_set") 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 = [ let require_tag_cmds = [
command!(require_tag => "server_config_require_system_tag_show") command!(require_tag => "server_config_require_system_tag_show")
.help("Shows whether system tags are required"), .help("Shows whether system tags are required"),
command!(require_tag, Toggle => "server_config_require_system_tag_set") command!(require_tag, Toggle => "server_config_require_system_tag_set").help(
.help("Requires or unrequires system tags for proxied messages"), "Sets whether server users are required to have a system tag on proxied messages",
),
command!(require_tag_short => "server_config_require_system_tag_show") command!(require_tag_short => "server_config_require_system_tag_show")
.help("Shows whether system tags are required"), .help("Shows whether system tags are required"),
command!(require_tag_short, Toggle => "server_config_require_system_tag_set") command!(require_tag_short, Toggle => "server_config_require_system_tag_set").help(
.help("Requires or unrequires system tags for proxied messages"), "Sets whether server users are required to have a system tag on proxied messages",
),
]; ];
let suppress_cmds = [ let suppress_cmds = [
command!(suppress => "server_config_suppress_notifications_show") command!(suppress => "server_config_suppress_notifications_show")
.help("Shows whether notifications are suppressed for proxied messages"), .help("Shows whether notifications are suppressed for proxied messages"),
command!(suppress, Toggle => "server_config_suppress_notifications_set") 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") command!(suppress_short => "server_config_suppress_notifications_show")
.help("Shows whether notifications are suppressed for proxied messages"), .help("Shows whether notifications are suppressed for proxied messages"),
command!(suppress_short, Toggle => "server_config_suppress_notifications_set") 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( let main_cmd = once(

View file

@ -17,13 +17,23 @@ pub fn cmds() -> impl IntoIterator<Item = Command> {
]; ];
[ [
command!(switch, ("commands", ["help"]) => "switch_commands"), command!(switch, ("commands", ["help"]) => "switch_commands")
command!(switch, out => "switch_out"), .help("Shows help for switch commands"),
command!(switch, delete => "switch_delete").flag(("all", ["clear", "c"])), command!(switch, out => "switch_out").help("Registers a switch with no members"),
command!(switch, r#move, Remainder(OpaqueString) => "switch_move"), // TODO: datetime parsing command!(switch, delete => "switch_delete")
command!(switch, edit, out => "switch_edit_out").flag(YES), .help("Deletes the latest switch")
command!(switch, edit, Optional(MemberRefs) => "switch_edit").flags(edit_flags), .flag(("all", ["clear", "c"])),
command!(switch, copy, Optional(MemberRefs) => "switch_copy").flags(edit_flags), command!(switch, r#move, Remainder(OpaqueString) => "switch_move")
command!(switch, MemberRefs => "switch_do"), .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"),
] ]
} }

View file

@ -215,16 +215,20 @@ pub fn edit() -> impl Iterator<Item = Command> {
let front = ("front", ["fronter", "fronters", "f"]); let front = ("front", ["fronter", "fronters", "f"]);
let make_front_history = |subcmd: TokensIterator| { 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| { let make_front_percent = |subcmd: TokensIterator| {
command!(system, Optional(SystemRef), subcmd => "system_fronter_percent") command!(system, Optional(SystemRef), subcmd => "system_fronter_percent")
.help("Shows a system's front breakdown")
.flag(("duration", OpaqueString)) .flag(("duration", OpaqueString))
.flag(("fronters-only", ["fo"])) .flag(("fronters-only", ["fo"]))
.flag("flat") .flag("flat")
}; };
let system_front_cmd = [ 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!(front, ("history", ["h"]))),
make_front_history(tokens!(("fronthistory", ["fh"]))), make_front_history(tokens!(("fronthistory", ["fh"]))),
make_front_percent(tokens!(front, ("percent", ["p", "%"]))), make_front_percent(tokens!(front, ("percent", ["p", "%"]))),
@ -243,8 +247,10 @@ pub fn edit() -> impl Iterator<Item = Command> {
once(command!(system, Optional(SystemRef), "groups", search_param => "system_groups")) once(command!(system, Optional(SystemRef), "groups", search_param => "system_groups"))
.map(apply_list_opts); .map(apply_list_opts);
let system_display_id_cmd = let system_display_id_cmd = once(
once(command!(system, Optional(SystemRef), "id" => "system_display_id")); command!(system, Optional(SystemRef), "id" => "system_display_id")
.help("Prints a system's ID"),
);
let system_delete = once( let system_delete = once(
command!(system, ("delete", ["erase", "remove", "yeet"]) => "system_delete") command!(system, ("delete", ["erase", "remove", "yeet"]) => "system_delete")
@ -253,8 +259,11 @@ pub fn edit() -> impl Iterator<Item = Command> {
); );
let system_link = [ let system_link = [
command!("link", ("account", UserRef) => "system_link"), command!("link", ("account", UserRef) => "system_link")
command!("unlink", ("account", OpaqueString) => "system_unlink").flag(YES), .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 system_new_cmd