发布于 2021-04-06 23:26:00
bot常量只存在于主文件中,因此需要一种将其传递给命令文件的方法。可以使用bot作为参数从命令文件导出函数。
const Permissions = require('eris').Constants.Permissions;
module.exports = function(bot){
// paste in the rest of the commands code
};然后在主文件中运行该函数。
require('../src/commands/loader')(bot);https://stackoverflow.com/questions/65432816
复制相似问题