force integer type of live_channel_id

This commit is contained in:
deflax 2024-01-17 06:33:30 +02:00
parent 5d899c1aa2
commit 693638983f

View file

@ -107,13 +107,13 @@ async def update_database():
scheduler.remove_job('announce_live_channel') scheduler.remove_job('announce_live_channel')
logger_discord.info(f'Live stream is offline.') logger_discord.info(f'Live stream is offline.')
if live_channel_id != 0: 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.') await live_channel.send('Live stream is offline.')
async def announce_live_channel(stream_name): async def announce_live_channel(stream_name):
logger_discord.info(f'{stream_name} is live!') logger_discord.info(f'{stream_name} is live!')
if live_channel_id != 0: 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!') await live_channel.send(f'{stream_name} is live!')
# Run the bot with your token # Run the bot with your token