🚄 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:
|
||||
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:
|
||||
|
Reference in New Issue
Block a user