diff options
author | Dennis Kobert <dennis@kobert.dev> | 2020-10-15 19:21:46 +0200 |
---|---|---|
committer | Dennis Kobert <dennis@kobert.dev> | 2020-10-15 19:21:46 +0200 |
commit | 7a5778de58e371ff7f96f3dc1d2dc58854a3eb1d (patch) | |
tree | f4771abc38b2495d3b1bfdc4172dd47f921da2a0 /bot.py | |
parent | 47562293ebb8cabc862509c9ba1d62d982bee3c1 (diff) |
Fix some linting issues
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: |