mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-02 16:43:12 +00:00
Merge pull request #481 from allthingslinux/Ow0cast-patch-1
feat: defer processing message instead of reply
This commit is contained in:
commit
f446ea6359
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ class ImgEffect(commands.Cog):
|
|||
|
||||
# say that the image is being processed
|
||||
logger.info("Processing image...")
|
||||
await interaction.response.send_message("Processing image...")
|
||||
await interaction.response.defer(ephemeral=True)
|
||||
|
||||
# open url with PIL
|
||||
logger.info("Opening image with PIL and HTTPX...")
|
||||
|
@ -89,8 +89,8 @@ class ImgEffect(commands.Cog):
|
|||
pil_image.save(arr, format="JPEG", quality=1)
|
||||
arr.seek(0)
|
||||
file = discord.File(arr, filename="deepfried.jpg")
|
||||
# edit message with image
|
||||
await interaction.followup.send(content="Here is your deepfried image:", file=file)
|
||||
|
||||
await interaction.followup.send(file=file, ephemeral=True)
|
||||
|
||||
|
||||
async def setup(bot: commands.Bot) -> None:
|
||||
|
|
Loading…
Reference in a new issue