[英]How would I send a message to all discord servers my bot is in v14 discord.js?
[英]How can i send a file attachment in discord.js v14
我希望能够让用户发送一个文件,然后我将对文本进行处理,并将更改后的文本作为附件发送一条消息。
我用这个得到了文字
request(url, {json: false}, (err, res, body) => {
if (err) {return msg.reply("There was an error getting the file")}
})
但我不知道如何发送文件附件
对于你的例子:
await msg.reply({
content:
`Text`,
files: ["path to file"]
}).catch((err) => {
console.log("Error during Export File " + err);
});;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.