aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2019-10-11 21:18:38 +0800
committerGravatar kosayoda <[email protected]>2019-10-11 21:18:38 +0800
commitfedf5bbdb326ba193a6bc1ab679049c22d21f4b4 (patch)
tree505ca9125a18f1c9311f9536ba278e3392cb3763
parentAdd check to !otn add to prevent too similar names. (diff)
Add !otn forceadd command.
-rw-r--r--bot/cogs/off_topic_names.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/cogs/off_topic_names.py b/bot/cogs/off_topic_names.py
index 362aa1b6d..8cde22240 100644
--- a/bot/cogs/off_topic_names.py
+++ b/bot/cogs/off_topic_names.py
@@ -120,6 +120,14 @@ class OffTopicNames(Cog):
else:
await self._add_name(ctx, name)
+ @otname_group.command(name='forceadd', aliases=('fa',))
+ @with_role(*MODERATION_ROLES)
+ async def force_add_command(self, ctx: Context, *names: OffTopicName) -> None:
+ """Forcefully adds a new off-topic name to the rotation."""
+ # Chain multiple words to a single one
+ name = "-".join(names)
+ await self._add_name(ctx, name)
+
async def _add_name(self, ctx: Context, name: str) -> None:
"""Adds an off-topic channel name to the site storage."""
await self.bot.api_client.post(f'bot/off-topic-channel-names', params={'name': name})