-4

i am making a bot that downloads the text files sent from users to gather some data is it possible to download those files or save them? i am using Pycharm

AX EL
  • 3
  • 1
  • 5

1 Answers1

0

You could go by using message.attachments and using save():

await message.attachments[0].save()

Then reading the file which can be done by using open(message.attachments[0].filename, "r") unless you use another file name then you can read it and store it in a JSON file or even a database.

Axisnix
  • 2,822
  • 5
  • 19
  • 41