Skip to content

Commit d6dd59d

Browse files
authored
Merge pull request #6 from fourjr/patch-2
make setup role thing allow multi-worded things, renamed modmail to Mod Mail
2 parents d9f1bae + e9c9afb commit d6dd59d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ def help_embed(self):
155155

156156
@commands.command()
157157
@commands.has_permissions(administrator=True)
158-
async def setup(self, ctx, modrole: discord.Role=None):
158+
async def setup(self, ctx, *, modrole: discord.Role=None):
159159
'''Sets up a server for modmail'''
160160
if discord.utils.get(ctx.guild.categories, name='modmail'):
161161
return await ctx.send('This server is already set up.')
162162

163163
categ = await ctx.guild.create_category(
164-
name='modmail',
164+
name='Mod Mail',
165165
overwrites=self.overwrites(ctx, modrole=modrole)
166166
)
167167
await categ.edit(position=0)
@@ -173,7 +173,7 @@ async def setup(self, ctx, modrole: discord.Role=None):
173173
@commands.has_permissions(administrator=True)
174174
async def disable(self, ctx):
175175
'''Close all threads and disable modmail.'''
176-
categ = discord.utils.get(ctx.guild.categories, name='modmail')
176+
categ = discord.utils.get(ctx.guild.categories, name='Mod Mail')
177177
if not categ:
178178
return await ctx.send('This server is not set up.')
179179
for category, channels in ctx.guild.by_category():
@@ -311,7 +311,7 @@ async def on_message(self, message):
311311
async def reply(self, ctx, *, msg):
312312
categ = discord.utils.get(ctx.guild.categories, id=ctx.channel.category_id)
313313
if categ is not None:
314-
if categ.name == 'modmail':
314+
if categ.name == 'Mod Mail':
315315
if 'User ID:' in ctx.channel.topic:
316316
ctx.message.content = msg
317317
await self.process_reply(ctx.message)

0 commit comments

Comments
 (0)