我的 Discord Bot 没有响应命令,也没有输出到控制台...我看到的唯一活动是它在控制台上提示“就绪”时...但之后,没有控制台输出,没有命令响应。 ..我尝试过消除或更改某些内容,我什至注释掉了一个命令,但这些都不起作用...代码如下
先感谢您
const { exception, Console } = require('console');
const Discord = require('discord.js');
const bot = new Discord.Client({ partials: ['msg', 'CHANNEL', 'REACTION'] });
const logChannel = '642465822333468676';
const { prefix, token } = require('./config.json')
const ytdl = require('ytdl-core');
bot.once('ready', () => {
console.log('Ready!');
});
bot.login(token);
async function getID() {
let guild = await bot.guilds.fetch('626772371981991956');
}
bot.on('msg', msg => {
if (msg.content === `beep`) {
msg.channel.send('Boop. :robot:')
}
if (msg.content === `info`) {
const msgInfo = new Discord.msgEmbed()
.setTitle('Credits:')
.setDescription('**Microsoft**\nVisual Studio Code\n**Node.js Team**\nNode.js\n**discord.js Team**\nDiscord.js')
.addFields(
{ name: `Linguaggio e librerie`, value: `.` },
{ name: `Linguaggio:`, value: `JavaScript (Node.js)` },
{ name: `Librerie:`, value: `discord.js (NPM)` },
)
.addFields(
{ name: `Team Programmazione:`, value: `Programmatore:\nTeknoSenpai - Developer#5151\nTesters:\ncixy 🦎#0077\nNightmare-San#6969\nSARABASSO#5478` },
{ name: `Un grazie speciale alla comunity MadHeadz | 🔥 per aver ospitato il BOT in fase Alpha`, value: `Invito: https://discord.gg/4wSMvQj` },
)
msg.channel.send(msgInfo)
}
if (!msg.content.startsWith(prefix) || msg.author.bot) return;
const args = msg.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
if (!args.length) {
return;
console.log("ArgsError")
}
FFIVE
相关分类