🚄 Slight optimization

This commit is contained in:
NikolajDanger
2020-08-02 13:52:51 +02:00
parent 4aaa19472f
commit 2b147ad4ae

View File

@ -53,13 +53,10 @@ async def fiar(channel,command,user):
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
f.write(str(oldImage.id))
try:
await oldImage.add_reaction("1")
await oldImage.add_reaction("2")
await oldImage.add_reaction("3")
await oldImage.add_reaction("4")
await oldImage.add_reaction("5")
await oldImage.add_reaction("6")
await oldImage.add_reaction("7")
reactions = ["1","2","3","4","5","6","7"]
for reaction in reactions:
await oldImage.add_reaction(reaction)
except:
logThis("Image deleted before I could react to all of them")
@ -67,13 +64,9 @@ async def fiar(channel,command,user):
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
f.write(str(oldImage.id))
try:
await oldImage.add_reaction("1")
await oldImage.add_reaction("2")
await oldImage.add_reaction("3")
await oldImage.add_reaction("4")
await oldImage.add_reaction("5")
await oldImage.add_reaction("6")
await oldImage.add_reaction("7")
reactions = ["1","2","3","4","5","6","7"]
for reaction in reactions:
await oldImage.add_reaction(reaction)
except:
logThis("Image deleted before I could react to all of them")
# else: