I am finishing creating the discord bot using discord.py
And what I want it to do is send a txt file
Example
User: ff!nitro
Bot: Here are the codes
(SEND FILE)
this is my code
@client.command()
async def nitro(ctx):
archive = "Dirección del Archivo"
await ctx.author.send(Archive)
The problem is that it sends the address and I want it to be sent like a normal user would send the message from a file
I appreciate your help in advance
The solution would be the following
(THE FILE MUST BE IN THE SAME FOLDER AS THE CODE)
Thank you all