I want my bot interact with the image that attached to the message to it. It will get the image and store it to itself. How to write code like that?
here the part of current code :
@bot.command()
async def hello(ctx):
await ctx.send(embeds)
that's all, i hope you can and may help me
You can resend images like that:
@bot.command()
async def hello(ctx):
files = []
for file in ctx.message.attachments:
fp = BytesIO()
await file.save(fp)
files.append(discord.File(fp, filename=file.filename, spoiler=file.is_spoiler()))
await ctx.send(files=files)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With