added {e} to error messages
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ async def commands(ctx):
|
|
66 |
if await safetychecks(ctx):
|
67 |
await ctx.reply(f"Use !deepfloydif [prompt], !jojo !spidey or !sketch. Have fun! π€π")
|
68 |
except Exception as e:
|
69 |
-
print(f"Error: unable to help :(")
|
70 |
#---------------------------------------------------------------------------------------------------------------------------------------------
|
71 |
async def safetychecks(ctx):
|
72 |
failure_emoji = '<:disagree:1098628957521313892>'
|
@@ -125,8 +125,8 @@ async def safetychecks(ctx):
|
|
125 |
|
126 |
# ping lunarflu if any safety check ever fails
|
127 |
except Exception as e:
|
128 |
-
print(f"Error: safetychecks failed somewhere, command will not continue
|
129 |
-
await ctx.message.reply(f"β <@811235357663297546> SC failed somewhere β") # this will always ping, as long as the bot has access to the channel
|
130 |
await ctx.message.add_reaction(failure_emoji)
|
131 |
#----------------------------------------------------------------------------------------------------------------------------------------------
|
132 |
@bot.command()
|
@@ -355,7 +355,7 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
355 |
print(f"Error: {e}")
|
356 |
if thread is None:
|
357 |
thread = await ctx.message.create_thread(name=f'DFIF1 Error')
|
358 |
-
await thread.send(f"{ctx.author.mention} Error
|
359 |
await fullqueue(e, thread)
|
360 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
361 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
@@ -379,7 +379,7 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
379 |
print(f"Error: {e}")
|
380 |
if thread is None:
|
381 |
thread = await ctx.message.create_thread(name=f'Generation Error')
|
382 |
-
await thread.send(f"{ctx.author.mention} Error during stage 1 generation
|
383 |
await fullqueue(e, thread)
|
384 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
385 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
@@ -440,7 +440,7 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
440 |
print(f"Error: {e}")
|
441 |
if thread is None:
|
442 |
thread = await ctx.message.create_thread(name=f'Posting Error')
|
443 |
-
await thread.send(f"{ctx.author.mention} Encountered error while posting combined image in thread
|
444 |
await fullqueue(e, thread)
|
445 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
446 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
@@ -450,7 +450,7 @@ async def deepfloydif(ctx, *, prompt: str):
|
|
450 |
print(f"Error: {e}")
|
451 |
if thread is None:
|
452 |
thread = await ctx.message.create_thread(name=f'deepfloydif Error')
|
453 |
-
await thread.send(f"{ctx.author.mention} Overall error with deepfloydif
|
454 |
await fullqueue(e, thread)
|
455 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
456 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
@@ -481,6 +481,7 @@ async def dfif2(index: int, stage_1_result_path, thread, dfif_command_message_id
|
|
481 |
parent_channel = thread.parent
|
482 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
483 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
|
|
484 |
await dfif_command_message.add_reaction('<:agree:1098629085955113011>')
|
485 |
await thread.edit(archived=True)
|
486 |
|
@@ -490,7 +491,7 @@ async def dfif2(index: int, stage_1_result_path, thread, dfif_command_message_id
|
|
490 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
491 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
492 |
await dfif_command_message.add_reaction('<:disagree:1098628957521313892>')
|
493 |
-
await thread.send(f"Error during stage 2 upscaling
|
494 |
await fullqueue(e, thread)
|
495 |
await thread.edit(archived=True)
|
496 |
#----------------------------------------------------------------------------------------------------------------------------
|
|
|
66 |
if await safetychecks(ctx):
|
67 |
await ctx.reply(f"Use !deepfloydif [prompt], !jojo !spidey or !sketch. Have fun! π€π")
|
68 |
except Exception as e:
|
69 |
+
print(f"Error: unable to help :( {e}")
|
70 |
#---------------------------------------------------------------------------------------------------------------------------------------------
|
71 |
async def safetychecks(ctx):
|
72 |
failure_emoji = '<:disagree:1098628957521313892>'
|
|
|
125 |
|
126 |
# ping lunarflu if any safety check ever fails
|
127 |
except Exception as e:
|
128 |
+
print(f"Error: safetychecks failed somewhere, command will not continue, {e}")
|
129 |
+
await ctx.message.reply(f"β <@811235357663297546> SC failed somewhere β {e}") # this will always ping, as long as the bot has access to the channel
|
130 |
await ctx.message.add_reaction(failure_emoji)
|
131 |
#----------------------------------------------------------------------------------------------------------------------------------------------
|
132 |
@bot.command()
|
|
|
355 |
print(f"Error: {e}")
|
356 |
if thread is None:
|
357 |
thread = await ctx.message.create_thread(name=f'DFIF1 Error')
|
358 |
+
await thread.send(f"{ctx.author.mention} Error before stage 1 generation, {e}")
|
359 |
await fullqueue(e, thread)
|
360 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
361 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
|
|
379 |
print(f"Error: {e}")
|
380 |
if thread is None:
|
381 |
thread = await ctx.message.create_thread(name=f'Generation Error')
|
382 |
+
await thread.send(f"{ctx.author.mention} Error during stage 1 generation, {e}")
|
383 |
await fullqueue(e, thread)
|
384 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
385 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
|
|
440 |
print(f"Error: {e}")
|
441 |
if thread is None:
|
442 |
thread = await ctx.message.create_thread(name=f'Posting Error')
|
443 |
+
await thread.send(f"{ctx.author.mention} Encountered error while posting combined image in thread, {e}")
|
444 |
await fullqueue(e, thread)
|
445 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
446 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
|
|
450 |
print(f"Error: {e}")
|
451 |
if thread is None:
|
452 |
thread = await ctx.message.create_thread(name=f'deepfloydif Error')
|
453 |
+
await thread.send(f"{ctx.author.mention} Overall error with deepfloydif, {e}")
|
454 |
await fullqueue(e, thread)
|
455 |
await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
456 |
await ctx.message.add_reaction('<:disagree:1098628957521313892>')
|
|
|
481 |
parent_channel = thread.parent
|
482 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
483 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
484 |
+
await dfif_command_message.add_reaction('<:disagree:1098628957521313892>') # in case we get the over 100 characters error
|
485 |
await dfif_command_message.add_reaction('<:agree:1098629085955113011>')
|
486 |
await thread.edit(archived=True)
|
487 |
|
|
|
491 |
dfif_command_message = await parent_channel.fetch_message(dfif_command_message_id)
|
492 |
await dfif_command_message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
|
493 |
await dfif_command_message.add_reaction('<:disagree:1098628957521313892>')
|
494 |
+
await thread.send(f"Error during stage 2 upscaling, {e}")
|
495 |
await fullqueue(e, thread)
|
496 |
await thread.edit(archived=True)
|
497 |
#----------------------------------------------------------------------------------------------------------------------------
|