From 693999ae21eee59c5e9f50364a120833ee15eab1 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sat, 17 Dec 2022 22:47:16 -0500 Subject: [PATCH] Reply to sender --- src/memes.py | 8 ++++---- src/on_message.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/memes.py b/src/memes.py index c7fc258..d7d0ba3 100644 --- a/src/memes.py +++ b/src/memes.py @@ -255,9 +255,9 @@ async def allMemes(command, message, client): for meme in close_memes: ready_meme = getDiscordReadyObjectFromS3(meme) if isinstance(ready_meme, str): - await message.channel.send(ready_meme) + await message.channel.send(ready_meme, reference=message) else: - await message.channel.send(file=ready_meme) + await message.channel.send(file=ready_meme, reference=message) return "Enjoy your memes :)" else: return "I need a query!" @@ -274,9 +274,9 @@ async def memeDump(command, message, client): meme = getRandomMeme() ready_meme = getDiscordReadyObjectFromS3(meme) if isinstance(ready_meme, str): - await message.channel.send(ready_meme) + await message.channel.send(ready_meme, reference=message) else: - await message.channel.send(file=ready_meme) + await message.channel.send(file=ready_meme, reference=message) return "Enjoy your memes :)" # get an uploaded meme and save it diff --git a/src/on_message.py b/src/on_message.py index 91ba84f..ca45243 100644 --- a/src/on_message.py +++ b/src/on_message.py @@ -48,9 +48,9 @@ async def parse_message(client, message): result = await calldict[cmd_input](command, message, client) if isinstance(result, discord.File): print(f'{client.user} is replying with a file ({result.filename})') - return await message.channel.send(file=result) + return await message.channel.send(file=result, reference=message) else: print(f'{client.user} is replying with the string ({result})') - return await message.channel.send(result) + return await message.channel.send(result, reference=message) pass