🚄 Slight optimization
This commit is contained in:
21
Gwendolyn.py
21
Gwendolyn.py
@ -53,13 +53,10 @@ async def fiar(channel,command,user):
|
|||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
||||||
f.write(str(oldImage.id))
|
f.write(str(oldImage.id))
|
||||||
try:
|
try:
|
||||||
await oldImage.add_reaction("1️⃣")
|
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
||||||
await oldImage.add_reaction("2️⃣")
|
for reaction in reactions:
|
||||||
await oldImage.add_reaction("3️⃣")
|
await oldImage.add_reaction(reaction)
|
||||||
await oldImage.add_reaction("4️⃣")
|
|
||||||
await oldImage.add_reaction("5️⃣")
|
|
||||||
await oldImage.add_reaction("6️⃣")
|
|
||||||
await oldImage.add_reaction("7️⃣")
|
|
||||||
except:
|
except:
|
||||||
logThis("Image deleted before I could react to all of them")
|
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:
|
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
||||||
f.write(str(oldImage.id))
|
f.write(str(oldImage.id))
|
||||||
try:
|
try:
|
||||||
await oldImage.add_reaction("1️⃣")
|
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
||||||
await oldImage.add_reaction("2️⃣")
|
for reaction in reactions:
|
||||||
await oldImage.add_reaction("3️⃣")
|
await oldImage.add_reaction(reaction)
|
||||||
await oldImage.add_reaction("4️⃣")
|
|
||||||
await oldImage.add_reaction("5️⃣")
|
|
||||||
await oldImage.add_reaction("6️⃣")
|
|
||||||
await oldImage.add_reaction("7️⃣")
|
|
||||||
except:
|
except:
|
||||||
logThis("Image deleted before I could react to all of them")
|
logThis("Image deleted before I could react to all of them")
|
||||||
# else:
|
# else:
|
||||||
|
Reference in New Issue
Block a user