🚄 Slight optimization

This commit is contained in:
NikolajDanger
2020-08-02 13:52:51 +02:00
parent 4aaa19472f
commit 2b147ad4ae
+7 -14
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: