First pass at boss spawn monitoring
This commit is contained in:
parent
74729a101f
commit
5d8d96213b
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user