chr-1x / hmh_bot

Python modules for the Willie IRC bot used in the Handmade Hero twitch chat.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limited what commands show in !list that do the same thing

dspecht opened this issue · comments

so talking with @mvandevander and @abnercoimbre on irc and we thought it would be nice to not have the !list command show all the aliases for the same command.

I mentioned maybe doing a manual list command. but that would require us to update it when we add new commands.

since we already have hide=true. maybe we could use that in a way to say hide all but the first alias. then we could only show 1 command.

This actually should already happen -- notice the code that produces it (from modules/handmade.py):

visibleCommands = [c.main for c in commands if not(c.hide==True)]

Each "command" is actually an object representing a function mapped to a set of aliases, one of which is the "main" alias. There should not be any duplicates unless they are actually registered as separate commands.

If this is not the case, reopen the issue as a bug.