Skip to content

Commit 16ec640

Browse files
committed
Add log channel id to config on setup
1 parent 746662a commit 16ec640

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cogs/modmail.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ async def setup(self, ctx):
3737

3838
await categ.edit(position=0)
3939

40-
c = await self.bot.modmail_guild.create_text_channel(name='bot-logs', category=categ)
41-
await c.edit(topic='You can delete this channel if you set up your own log channel.')
42-
await c.send('Use the `config set log_channel_id` command to set up a custom log channel.')
40+
log_channel = await self.bot.modmail_guild.create_text_channel(name='bot-logs', category=categ)
41+
await log_channel.edit(topic='You can delete this channel if you set up your own log channel.')
42+
await log_channel.send('Use the `config set log_channel_id` command to set up a custom log channel.')
43+
4344
self.bot.config['main_category_id'] = categ.id
45+
self.bot.config['log_channel_id'] = log_channel.id
46+
4447
await self.bot.config.update()
4548

4649
await ctx.send('Successfully set up server.')

0 commit comments

Comments
 (0)