Currently, I am using repl.it to host my bot. The main objective was for it to read a txt file from Discord and then upload that to a hastebin using a GitHub repository that my friend recommended to me. Unfortunately, I am facing some difficulty in extracting the content of the file. One possible solution I was considering is:
var attachment = (msg.attachments)
if (attachment){
msg.channel.send(attachment.array()[0].url)
}
This code snippet allows me to retrieve the link of the file attachment from the message, but the challenge lies in transferring this information to the bot as it is not running on my local machine. Therefore, I would greatly appreciate any assistance in figuring out how to extract the contents from the txt file and transfer it to my bot. Thank you in advance for your help, and I hope you have a wonderful day.