diff options
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,5 @@ from os import getenv +import sys import asyncio from commands import answer, await_n, bot_commands @@ -64,7 +65,7 @@ class Cupido(commands.Bot): def get_pair_channels_no_cache(self, ctx, meta_channel): return sorted((channel for channel in ctx.guild.voice_channels if channel.category == meta_channel - and channel.name.isdigit()), + and channel.name.isdigit()), key=lambda c: c.name) def get_pair_channels(self, ctx, meta_channel): @@ -104,7 +105,7 @@ def main(): token = getenv(config.TOKEN_ENV_VAR) if token is None: print('error: no token was given') - exit(1) + sys.exit(1) bot = Cupido(activity=discord.Game(name=config.GAME_STATUS), command_prefix=config.COMMAND_PREFIX, case_insensitive=True) bot.remove_command('help') for cmd in bot_commands: |