diff options
author | NatrixAeria <upezu@student.kit.edu> | 2020-10-20 03:52:05 +0200 |
---|---|---|
committer | NatrixAeria <upezu@student.kit.edu> | 2020-10-20 03:52:05 +0200 |
commit | 55344487c4889c51edb6209657f6ffbb1799c919 (patch) | |
tree | 4870c429d447c164e77b901f9f62e03124710a95 /bot.py | |
parent | d25246962ff3ae1d269411e8ceb4ba4f539405d5 (diff) |
Fix wrong category
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -67,7 +67,7 @@ class Cupido(commands.Bot): async def create_voice_channel(self, ctx, name, category=None): channel = await ctx.guild.create_voice_channel( name, - category=self.meta_channel, + category=category, ) await channel.set_permissions(ctx.guild.default_role, **config.CHANNEL_PERMISSIONS) await channel.set_permissions(self.user, **config.BOT_PERMISSIONS) @@ -159,11 +159,12 @@ class Cupido(commands.Bot): futures.append(self.create_voice_channel(ctx, str(i), category=meta_channel)) return await await_n(futures) - async def get_channels(self, ctx): + async def get_channels(self, ctx, msg=True): meta_channel = self.get_meta_channel(ctx) lobby_channel = self.get_lobby_channel(ctx, meta_channel) if meta_channel is None or lobby_channel is None: - await answer(ctx, 'error: cannot start shuffling, you need to initialize channels') + if msg: + await answer(ctx, 'error: cannot start shuffling, you need to initialize channels') return None return meta_channel, lobby_channel |