Add nonce to band conditions image

To force-load image
This commit is contained in:
IvanGirderboot 2020-12-13 19:11:49 -07:00
parent 39531fd2b0
commit da67ce78dc
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ class WeatherCog(commands.Cog):
embed = cmn.embed_factory(ctx)
embed.title = "Current Solar Conditions"
embed.colour = cmn.colours.good
embed.set_image(url="http://www.hamqsl.com/solarsun.php")
# Generate a nonce to force discord to recache this
cachenonce = (ctx.message.id >> 22) // 1000 // 600 # nonce will stay the same for ~10min
embed.set_image(url="http://www.hamqsl.com/solarsun.php" + f"&cachenonce={cachenonce}")
await ctx.send(embed=embed)
@commands.group(name="weather", aliases=["wttr"], case_insensitive=True, category=cmn.cat.weather)