Your run
function needs to be inside of the module.exports
, as this is the easiest way.
For example:
module.exports = {
name: "",
aliases: [],
run(client, message, args) {
// Code here
}
}
Then this will allow you to call cmd.run(client, message, args);
. You can read more about command handling in this guide here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…