mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-07 05:08:23 +02:00
optimised a bit the code
This commit is contained in:
parent
5f14d0493a
commit
6335514f0c
1 changed files with 4 additions and 6 deletions
|
@ -117,9 +117,8 @@ async def on_ready():
|
|||
image = get_track_minimap(track)
|
||||
image.save(image_binary, "PNG")
|
||||
image_binary.seek(0)
|
||||
|
||||
message_minimap = await data_channel.send(
|
||||
file=discord.File(fp=image_binary, filename="minimap.png"))
|
||||
file=discord.File(fp=image_binary, filename=f"minimap {track.sha1}.png"))
|
||||
embed.set_thumbnail(url=message_minimap.attachments[0].url)
|
||||
|
||||
message = await track_channel.send(embed=embed)
|
||||
|
@ -129,7 +128,6 @@ async def on_ready():
|
|||
await message.add_reaction("❌")
|
||||
|
||||
else:
|
||||
if hasattr(track, "sha1"):
|
||||
message = message_from_sha1[track.sha1]
|
||||
await message.edit(embed=embed)
|
||||
|
||||
|
|
Loading…
Reference in a new issue