Answer the question
In order to leave comments, you need to log in
How can I make the bot send a file that is on my computer?
Is there anything I can do to send a file that is on my computer? I've been looking for a very long time and can't find it. Thanks in advance.
@bot.command()
async def say(ctx, *, text):
img = Image.open('Picture.png')
idraw = ImageDraw.Draw(img)
headline = ImageFont.truetype("arialbi.ttf", size = 43)
idraw.text((27, 754), text, font = headline)
img.save('send.png')
await bot.send_file("send.png")
Answer the question
In order to leave comments, you need to log in
https://discordpy.readthedocs.io/en/stable/api.htm...
await ctx.send(file=discord.File("send.png"))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question