lunarflu HF Staff commited on
Commit
24a87cb
·
1 Parent(s): 476cf97

removed duplicates

Browse files
Files changed (1) hide show
  1. app.py +4 -10
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 want the first image!")
110
  elif str(reaction.emoji) == '2️⃣':
111
- await ctx.send("You want the second image!")
112
  elif str(reaction.emoji) == '3️⃣':
113
- await ctx.send("You want the third image!")
114
  elif str(reaction.emoji) == '4️⃣':
115
- await ctx.send("You want the fourth image!")
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}")