aboutsummaryrefslogtreecommitdiffstats
path: root/tests (unfollow)
Commit message (Collapse)AuthorLines
2020-08-22Help: include root aliases in outputGravatar MarkKoz-1/+3
2020-08-22Include root aliases in the command name conflict testGravatar MarkKoz-0/+1
2020-08-22Replace alias command definitions with root_aliasesGravatar MarkKoz-81/+15
The fruits of my labour.
2020-08-22Bot: fix AttributeError for commands which lack root_aliasesGravatar MarkKoz-2/+2
Even if the `command` decorators are patched, there are still some other internal things that need to be patched. For example, the default help command subclasses the original `Command` type. It's more maintainable to exclude root alias support for these objects than to try to patch everything.
2020-08-22Patch d.py decorators to support root aliasesGravatar MarkKoz-0/+10
To avoid explicitly specifying `cls` everywhere, patch the decorators to set the default value of `cls` to the `Command` subclass which supports root aliases.
2020-08-22Bot: add root alias supportGravatar MarkKoz-0/+41
Override `Bot.add_command` and `Bot.remove_command` to add/remove root aliases for a command (and recursively for any subcommands). This has to happen in `Bot` because there's no reliable way to get the `Bot` instance otherwise. Therefore, overriding the methods in `GroupMixin` unfortunately doesn't work. Otherwise, it'd be possible to avoid recursion by processing each subcommand as it got added.