summaryrefslogtreecommitdiff
path: root/bot.py
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2020-10-15 19:21:46 +0200
committerDennis Kobert <dennis@kobert.dev>2020-10-15 19:21:46 +0200
commit7a5778de58e371ff7f96f3dc1d2dc58854a3eb1d (patch)
treef4771abc38b2495d3b1bfdc4172dd47f921da2a0 /bot.py
parent47562293ebb8cabc862509c9ba1d62d982bee3c1 (diff)
Fix some linting issues
Diffstat (limited to 'bot.py')
-rw-r--r--bot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot.py b/bot.py
index 7b6e925..bf27e58 100644
--- a/bot.py
+++ b/bot.py
@@ -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: