Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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():
Expand Down Expand Up @@ -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)
Expand Down