From 693638983f052dc0490b56bbcf0465b8f9b79aac Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 17 Jan 2024 06:33:30 +0200 Subject: [PATCH] force integer type of live_channel_id --- src/discordbot/discordbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/discordbot/discordbot.py b/src/discordbot/discordbot.py index b8e7a4f..0620972 100644 --- a/src/discordbot/discordbot.py +++ b/src/discordbot/discordbot.py @@ -107,13 +107,13 @@ async def update_database(): scheduler.remove_job('announce_live_channel') logger_discord.info(f'Live stream is offline.') if live_channel_id != 0: - live_channel = bot.get_channel(live_channel_id) + live_channel = bot.get_channel(int(live_channel_id)) await live_channel.send('Live stream is offline.') async def announce_live_channel(stream_name): logger_discord.info(f'{stream_name} is live!') if live_channel_id != 0: - live_channel = bot.get_channel(live_channel_id) + live_channel = bot.get_channel(int(live_channel_id)) await live_channel.send(f'{stream_name} is live!') # Run the bot with your token