diff options
| author | 2018-02-13 16:02:07 +0000 | |
|---|---|---|
| committer | 2018-02-13 16:02:07 +0000 | |
| commit | 5e66d20ac64f0a69a6a18132795e00caeeae11db (patch) | |
| tree | 77eb7d7333e68c8768d0f84ed99b79a6fb508f7b | |
| parent | added help for specific commands (diff) | |
fixed imports and added new constant
| -rw-r--r-- | bot/cogs/formatter.py | 6 | ||||
| -rw-r--r-- | bot/constants.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bot/cogs/formatter.py b/bot/cogs/formatter.py index 5999e891b..1cb33680c 100644 --- a/bot/cogs/formatter.py +++ b/bot/cogs/formatter.py @@ -8,7 +8,9 @@ Which falls under The MIT License. import itertools -from discord.ext.commands import HelpFormatter, Paginator +from discord.ext.commands import HelpFormatter, Paginator, Command +from inspect import getfullargspec, formatargspec +from constants import HELP_PREFIX class Formatter(HelpFormatter): def __init__(self, *args, **kwargs): @@ -41,7 +43,7 @@ class Formatter(HelpFormatter): # await do_<command>(ctx, <args>) # strip the command of bot. and () - stripped_command = self.command.name.replace(PREFIX, "").replace("()", "") + stripped_command = self.command.name.replace(HELP_PREFIX, "").replace("()", "") # getting args using the handy inspect module argspec = getfullargspec(self.command.callback) arguments = formatargspec(*argspec) diff --git a/bot/constants.py b/bot/constants.py index e11a625ac..d6c94511a 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -9,3 +9,5 @@ ADMIN_ROLE = 267628507062992896 MODERATOR_ROLE = 267629731250176001 VERIFIED_ROLE = 352427296948486144 OWNER_ROLE = 267627879762755584 + +HELP_PREFIX = "bot."
\ No newline at end of file |