readded reaction to first stage command, combined first stage reply + image, changed upscaling to reply + changed text
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
55 |
def check_reaction(reaction, user):
|
56 |
return user == ctx.author and str(reaction.emoji) in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
|
57 |
|
58 |
-
|
59 |
|
60 |
number_of_images = 4
|
61 |
current_time = int(time.time())
|
@@ -95,7 +95,10 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
95 |
|
96 |
message = await ctx.reply('Here is the combined image. React with the image you want to upscale!')
|
97 |
with open(combined_image_path, 'rb') as f:
|
98 |
-
sent_message = await ctx.send(file=discord.File(f, 'combined_image.png'))
|
|
|
|
|
|
|
99 |
|
100 |
# bot reacts with appropriate emojis to the post, both showing the user what options they have,
|
101 |
# as well as showing which post to react to.
|
@@ -104,19 +107,19 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
104 |
|
105 |
reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
|
106 |
if str(reaction.emoji) == '1️⃣':
|
107 |
-
await ctx.
|
108 |
index = 0
|
109 |
await dfif2(ctx, index, stage_1_result_path)
|
110 |
elif str(reaction.emoji) == '2️⃣':
|
111 |
-
await ctx.
|
112 |
index = 1
|
113 |
await dfif2(ctx, index, stage_1_result_path)
|
114 |
elif str(reaction.emoji) == '3️⃣':
|
115 |
-
await ctx.
|
116 |
index = 2
|
117 |
await dfif2(ctx, index, stage_1_result_path)
|
118 |
elif str(reaction.emoji) == '4️⃣':
|
119 |
-
await ctx.
|
120 |
index = 3
|
121 |
await dfif2(ctx, index, stage_1_result_path)
|
122 |
|
|
|
55 |
def check_reaction(reaction, user):
|
56 |
return user == ctx.author and str(reaction.emoji) in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
|
57 |
|
58 |
+
await ctx.message.add_reaction('👍')
|
59 |
|
60 |
number_of_images = 4
|
61 |
current_time = int(time.time())
|
|
|
95 |
|
96 |
message = await ctx.reply('Here is the combined image. React with the image you want to upscale!')
|
97 |
with open(combined_image_path, 'rb') as f:
|
98 |
+
sent_message = await ctx.send(file=discord.File(f, 'combined_image.png'))
|
99 |
+
|
100 |
+
with open(combined_image_path, 'rb') as f:
|
101 |
+
sent_message = await ctx.reply('Here is the combined image. React with the image number you want to upscale!', file=discord.File(f, 'combined_image.png'))
|
102 |
|
103 |
# bot reacts with appropriate emojis to the post, both showing the user what options they have,
|
104 |
# as well as showing which post to react to.
|
|
|
107 |
|
108 |
reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
|
109 |
if str(reaction.emoji) == '1️⃣':
|
110 |
+
await ctx.reply("Upscaling the first image...")
|
111 |
index = 0
|
112 |
await dfif2(ctx, index, stage_1_result_path)
|
113 |
elif str(reaction.emoji) == '2️⃣':
|
114 |
+
await ctx.reply("Upscaling the second image...")
|
115 |
index = 1
|
116 |
await dfif2(ctx, index, stage_1_result_path)
|
117 |
elif str(reaction.emoji) == '3️⃣':
|
118 |
+
await ctx.reply("Upscaling the third image...")
|
119 |
index = 2
|
120 |
await dfif2(ctx, index, stage_1_result_path)
|
121 |
elif str(reaction.emoji) == '4️⃣':
|
122 |
+
await ctx.reply("Upscaling the fourth image...")
|
123 |
index = 3
|
124 |
await dfif2(ctx, index, stage_1_result_path)
|
125 |
|