From 76347bfc4842d596fad0344f4321176a93a59fcb Mon Sep 17 00:00:00 2001 From: deflax Date: Tue, 16 Jan 2024 18:38:56 +0200 Subject: [PATCH] disable empty db check --- src/discordbot/discordbot.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index 40717ce..7f5acc0 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -44,16 +44,13 @@ async def epg(ctx): content = response.text await ctx.channel.send('epg:') - if content != {}: - for item in content: - if item['start_at'] == 'now' or item['start_at'] == 'never': - await ctx.channel.send('x') - continue - else: - await ctx.channel.send('y') - await ctx.channel.send(item['start_at']) - else: - await ctx.channel.send('Empty database!') + for item in content: + if item['start_at'] == 'now' or item['start_at'] == 'never': + await ctx.channel.send('x') + continue + else: + await ctx.channel.send('y') + await ctx.channel.send(item['start_at']) except Exception as e: print(e)