summaryrefslogtreecommitdiff
path: root/bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot.py')
-rw-r--r--bot.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot.py b/bot.py
index 71635cb..22ebbe6 100644
--- a/bot.py
+++ b/bot.py
@@ -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