目前,我已经按此设置
const Discord = require("discord.js");
const ms = require("ms");
module.exports.run = async (bot, message, args) => {
pan1 = "./pans/pan1.jpg"; pan2 = "./pans/pan2,jpg"; pan3 = "./pans/pan3.png"
var msg = message.content.toLowerCase();
if (msg.include (`cook`)); {
number = 3
}
var random = Math.floor (Math.random() * (number - 1 + 1)) + 1;
switch (random) {
case 1: message.channel.send({files: [pan1]}); break;
case 2: message.channel.send({files: [pan2]}); break;
case 3: message.channel.send({files: [pan3]}); break;
}
}
module.exports.help = {
name: "pan"
}
我想做的是拥有它,所以每当有人执行命令/ pan时,它将从列表中发送图像,但是我一直在收到此错误
https://gyazo.com/d9aa615eb4e76db8c68cf608c490a460
如果我第一次在这里发帖不佳,并对此表示为巨型菜鸟,请道歉。