mirror of
				https://github.com/miaowware/qrm2.git
				synced 2025-10-26 01:40:20 -04:00 
			
		
		
		
	Merge pull request #314 from miaowware/fixgl
Addded a "nonce" to the greyline URL to force discord to reload the c…
This commit is contained in:
		
						commit
						2ae11058b2
					
				| @ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). | ||||
| 
 | ||||
| 
 | ||||
| ## [Unreleased] | ||||
| ### Fixed | ||||
| - The result of `?greyline` was cached by discord and would get out of date. | ||||
| 
 | ||||
| 
 | ||||
| ## [2.5.0] - 2020-10-31 | ||||
|  | ||||
| @ -86,7 +86,9 @@ class ImageCog(commands.Cog): | ||||
|         embed = cmn.embed_factory(ctx) | ||||
|         embed.title = "Current Greyline Conditions" | ||||
|         embed.colour = cmn.colours.good | ||||
|         embed.set_image(url=self.gl_url) | ||||
|         # 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=self.gl_url + f"&cachenonce={cachenonce}") | ||||
|         await ctx.send(embed=embed) | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user