Fix broken error handling

This commit is contained in:
2021-01-17 16:06:53 +01:00
parent 90577e7b9d
commit c60ef5e298

2
bot.py
View File

@@ -78,7 +78,7 @@ async def on_message(message: discord.Message):
loeh = await get_loeh(message.guild) loeh = await get_loeh(message.guild)
if loeh is None: if loeh is None:
await message.channel.send('404: Löh not found!') await message.channel.send('404: Löh not found!')
if loeh.voice is None: elif loeh.voice is None:
await message.channel.send('400: Löh not connected!') await message.channel.send('400: Löh not connected!')
else: else:
voice: discord.VoiceState = loeh.voice voice: discord.VoiceState = loeh.voice