0
我试图创建一个不和谐的机器人使用下面的代码共享一些文件,并不理解的东西。当使用sendFile
命令时,如果我没有new Buffer
参数,则在调用僵尸程序时,它会在调用时没有错误地关闭,但发送文件时发送的文件的大小等于缓冲区的大小且不可用。SendFile in Discord.js不发送整个文件
"files": {
description: "Replies with required files for setup",
process: function(bot, msg, suffix){
bot.sendFile(msg.channel, new Buffer("Not sure what this is"), "My\file\path")
}
}
添加最小,完整和可验证示例:http://stackoverflow.com/help/mcve – 2016-08-04 04:26:07