removed duplicates
Browse files
app.py
CHANGED
@@ -49,9 +49,6 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
49 |
prompt = prompt.strip()[:100] # Limit the prompt length to 100 characters
|
50 |
prompt = re.sub(r'[^\w\s]', '', prompt) # Remove special characters
|
51 |
|
52 |
-
def check_reaction(reaction, user):
|
53 |
-
return str(reaction.emoji) == '👍' and user == ctx.author
|
54 |
-
|
55 |
def check_reaction(reaction, user):
|
56 |
return user == ctx.author and str(reaction.emoji) in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
|
57 |
|
@@ -101,18 +98,15 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
101 |
for emoji in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']:
|
102 |
await sent_message.add_reaction(emoji)
|
103 |
|
104 |
-
reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
|
105 |
-
await ctx.send(f"{user.mention} reacted with a thumbs-up!")
|
106 |
-
|
107 |
reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
|
108 |
if str(reaction.emoji) == '1️⃣':
|
109 |
-
await ctx.send("You
|
110 |
elif str(reaction.emoji) == '2️⃣':
|
111 |
-
await ctx.send("You
|
112 |
elif str(reaction.emoji) == '3️⃣':
|
113 |
-
await ctx.send("You
|
114 |
elif str(reaction.emoji) == '4️⃣':
|
115 |
-
await ctx.send("You
|
116 |
|
117 |
except Exception as e:
|
118 |
print(f"Error: {e}")
|
|
|
49 |
prompt = prompt.strip()[:100] # Limit the prompt length to 100 characters
|
50 |
prompt = re.sub(r'[^\w\s]', '', prompt) # Remove special characters
|
51 |
|
|
|
|
|
|
|
52 |
def check_reaction(reaction, user):
|
53 |
return user == ctx.author and str(reaction.emoji) in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
|
54 |
|
|
|
98 |
for emoji in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']:
|
99 |
await sent_message.add_reaction(emoji)
|
100 |
|
|
|
|
|
|
|
101 |
reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
|
102 |
if str(reaction.emoji) == '1️⃣':
|
103 |
+
await ctx.send("You chose the first image!")
|
104 |
elif str(reaction.emoji) == '2️⃣':
|
105 |
+
await ctx.send("You chose the second image!")
|
106 |
elif str(reaction.emoji) == '3️⃣':
|
107 |
+
await ctx.send("You chose the third image!")
|
108 |
elif str(reaction.emoji) == '4️⃣':
|
109 |
+
await ctx.send("You chose the fourth image!")
|
110 |
|
111 |
except Exception as e:
|
112 |
print(f"Error: {e}")
|