From 5d8d96213bf413c36de1e0c941ed55fc48f20f06 Mon Sep 17 00:00:00 2001 From: Luke R Date: Wed, 6 Nov 2024 10:36:57 -0800 Subject: [PATCH] First pass at boss spawn monitoring --- app/cogs/tarkov.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/cogs/tarkov.py b/app/cogs/tarkov.py index 5678aa47..3b6558ce 100755 --- a/app/cogs/tarkov.py +++ b/app/cogs/tarkov.py @@ -27,20 +27,20 @@ class Tarkov(commands.Cog): # Wait until the bot is ready before we actually start executing code await self.bot.wait_until_ready() - levels = tarkov.tarkov_boss_info() + most_recent_spawns = tarkov.tarkov_boss_info() if os.path.exists("/tmp/boss_spawns.txt"): - current_spawns = eval(open("/tmp/boss_spawns.txt", "r").read()) + spawn_data = eval(open("/tmp/boss_spawns.txt", "r").read()) - if levels != current_spawns: + if most_recent_spawns != spawn_data: print("Boss spawns have changed") embed = discord.Embed( description="-------", color=discord.Color.blue(), type="rich" ) embed.set_author(name="🎲 Boss Spawns have updated 🎲") - for key, value in current_spawns.items(): + for key, value in most_recent_spawns.items(): embed.add_field( name=key, value="\n".join(