diff options
author | 2018-07-02 20:23:23 +0000 | |
---|---|---|
committer | 2018-07-02 20:23:23 +0000 | |
commit | 5257f84d3dd507cb86db4e910889b28688bcda60 (patch) | |
tree | 3d66273d60e2bd51ddac710c2b4a95e936cfab69 | |
parent | [OTName] Dammit volcyy (diff) | |
parent | Fix the parser not invoking the `otname.add` command. (diff) |
Merge branch 'fix-parser-not-invoking-the-command' into 'master'
Fix the parser not invoking the `otname.add` command.
See merge request python-discord/projects/bot!7
-rw-r--r-- | bot/cogs/off_topic_names.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bot/cogs/off_topic_names.py b/bot/cogs/off_topic_names.py index ff6513f98..2a3cb2aa7 100644 --- a/bot/cogs/off_topic_names.py +++ b/bot/cogs/off_topic_names.py @@ -2,7 +2,7 @@ import asyncio import logging from datetime import datetime, timedelta -from discord.ext.commands import BadArgument, Bot, Context, Converter, group +from discord.ext.commands import BadArgument, Bot, Context, Converter, command from bot.constants import Channels, Keys, Roles, URLs from bot.decorators import with_role @@ -81,11 +81,7 @@ class OffTopicNames: coro = update_names(self.bot, self.headers) self.updater_task = await self.bot.loop.create_task(coro) - @group(invoke_without_command=True, name='otname', hidden=True) - async def otname_group(self, ctx: Context): - """Contains subcommands to manage the off-topic category names.""" - - @otname_group.command(name='add') + @command(name='otname.add()', aliases=['otname.add']) @with_role(Roles.owner, Roles.admin, Roles.moderator) async def otname_add(self, ctx, name: OffTopicName): """Adds a new off-topic name to the rotation.""" |