hide disabled commands

This commit is contained in:
wish
2023-11-28 23:41:22 +11:00
parent 8d02c9f907
commit 1cd60eb5ae

View File

@@ -325,8 +325,10 @@ func parseChatCommand(s *Session, command string) {
case commands["Help"].Prefix: case commands["Help"].Prefix:
if commands["Help"].Enabled { if commands["Help"].Enabled {
for _, command := range commands { for _, command := range commands {
if command.Enabled {
sendServerChatMessage(s, fmt.Sprintf("%s%s: %s", s.server.erupeConfig.CommandPrefix, command.Prefix, command.Description)) sendServerChatMessage(s, fmt.Sprintf("%s%s: %s", s.server.erupeConfig.CommandPrefix, command.Prefix, command.Description))
} }
}
} else { } else {
sendDisabledCommandMessage(s, commands["Help"]) sendDisabledCommandMessage(s, commands["Help"])
} }