removed ctx from dfif2
Browse files
app.py
CHANGED
@@ -411,7 +411,7 @@ async def on_reaction_add(reaction, user): # ctx = await bot.get_context(reac
|
|
411 |
if reaction.message.attachments:
|
412 |
if user.id == reaction.message.mentions[0].id: # if user.id == reaction.message.mentions[0].id:
|
413 |
# magic begins
|
414 |
-
await reaction.message.channel.send("reaction detected")
|
415 |
attachment = reaction.message.attachments[0]
|
416 |
image_name = attachment.filename # named something like: tmpgtv4qjix1111269940599738479.png
|
417 |
# remove .png first
|
@@ -421,7 +421,7 @@ async def on_reaction_add(reaction, user): # ctx = await bot.get_context(reac
|
|
421 |
messageid = partialpathmessageid[11:] # 1111269940599738479
|
422 |
# add /tmp/ to partialpath, save as new variable
|
423 |
fullpath = "/tmp/" + partialpath # should be /tmp/tmpgtv4qjix
|
424 |
-
await reaction.message.channel.send(f"fullpath extracted, {fullpath}")
|
425 |
emoji = reaction.emoji
|
426 |
|
427 |
if emoji == "1️⃣":
|
@@ -433,14 +433,14 @@ async def on_reaction_add(reaction, user): # ctx = await bot.get_context(reac
|
|
433 |
elif emoji == "4️⃣":
|
434 |
index = 3
|
435 |
|
436 |
-
await reaction.message.channel.send(f"index extracted, {index}")
|
437 |
index = index
|
438 |
stage_1_result_path = fullpath
|
439 |
thread = reaction.message.channel
|
440 |
dfif_command_message_id = messageid
|
441 |
ctx = await bot.get_context(reaction.message)
|
442 |
-
await reaction.message.channel.send(f"calling dfif2")
|
443 |
-
await dfif2(
|
444 |
|
445 |
'''
|
446 |
|
|
|
411 |
if reaction.message.attachments:
|
412 |
if user.id == reaction.message.mentions[0].id: # if user.id == reaction.message.mentions[0].id:
|
413 |
# magic begins
|
414 |
+
await reaction.message.channel.send("✅reaction detected")
|
415 |
attachment = reaction.message.attachments[0]
|
416 |
image_name = attachment.filename # named something like: tmpgtv4qjix1111269940599738479.png
|
417 |
# remove .png first
|
|
|
421 |
messageid = partialpathmessageid[11:] # 1111269940599738479
|
422 |
# add /tmp/ to partialpath, save as new variable
|
423 |
fullpath = "/tmp/" + partialpath # should be /tmp/tmpgtv4qjix
|
424 |
+
await reaction.message.channel.send(f"✅fullpath extracted, {fullpath}")
|
425 |
emoji = reaction.emoji
|
426 |
|
427 |
if emoji == "1️⃣":
|
|
|
433 |
elif emoji == "4️⃣":
|
434 |
index = 3
|
435 |
|
436 |
+
await reaction.message.channel.send(f"✅index extracted, {index}")
|
437 |
index = index
|
438 |
stage_1_result_path = fullpath
|
439 |
thread = reaction.message.channel
|
440 |
dfif_command_message_id = messageid
|
441 |
ctx = await bot.get_context(reaction.message)
|
442 |
+
await reaction.message.channel.send(f"✅calling dfif2")
|
443 |
+
await dfif2(index, stage_1_result_path, thread, dfif_command_message_id)
|
444 |
|
445 |
'''
|
446 |
|