From e9c9afb7a1522e66d0098c7aec909c33521260b3 Mon Sep 17 00:00:00 2001 From: Jia Rong Yee Date: Sun, 8 Oct 2017 21:34:34 +0800 Subject: [PATCH] make setup role thing allow multi-worded things, renamed modmail to Mod Mail --- bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index c180d21156..f3d259bfb9 100644 --- a/bot.py +++ b/bot.py @@ -155,13 +155,13 @@ def help_embed(self): @commands.command() @commands.has_permissions(administrator=True) - async def setup(self, ctx, modrole: discord.Role=None): + async def setup(self, ctx, *, modrole: discord.Role=None): '''Sets up a server for modmail''' if discord.utils.get(ctx.guild.categories, name='modmail'): return await ctx.send('This server is already set up.') categ = await ctx.guild.create_category( - name='modmail', + name='Mod Mail', overwrites=self.overwrites(ctx, modrole=modrole) ) await categ.edit(position=0) @@ -173,7 +173,7 @@ async def setup(self, ctx, modrole: discord.Role=None): @commands.has_permissions(administrator=True) async def disable(self, ctx): '''Close all threads and disable modmail.''' - categ = discord.utils.get(ctx.guild.categories, name='modmail') + categ = discord.utils.get(ctx.guild.categories, name='Mod Mail') if not categ: return await ctx.send('This server is not set up.') for category, channels in ctx.guild.by_category(): @@ -311,7 +311,7 @@ async def on_message(self, message): async def reply(self, ctx, *, msg): categ = discord.utils.get(ctx.guild.categories, id=ctx.channel.category_id) if categ is not None: - if categ.name == 'modmail': + if categ.name == 'Mod Mail': if 'User ID:' in ctx.channel.topic: ctx.message.content = msg await self.process_reply(ctx.message)