【问题标题】:Discord. JS bot not starting properly不和谐。 JS 机器人无法正常启动
【发布时间】:2021-02-19 01:18:45
【问题描述】:

我正在尝试使用 discord js 编写 Discord 机器人。但是,当我启动它时,没有错误消息,只是停留在这个屏幕上。

sequelize deprecated 基于字符串的运算符现在已被弃用。请使用基于符号的运算符以获得更好的安全性,在http://docs.sequelizejs.com/manual/tutorial/querying.html#operatorsnode_modules/discord-leveling/node_modules/sequelize/lib/sequelize.js:245:13 阅读更多内容 ═[Discord-Leveling Database Loaded -V1.1.0]═[支持服务器:https://discord.gg/eBFKDbx]=

我无法从互联网或其他支持服务器获得任何帮助,所以如果有人可以帮助我,将不胜感激。

这是我的启动代码。

client.once('ready', () => {
  (async function(){
  const storedBalances = await Users.findAll();
  storedBalances.forEach(b => currency.set(b.user_id, b));

  console.log('Nintendo Musicians Bot is online!');
  client.user.setActivity('with your mind', {type: 'PLAYING'}).catch(console.error);
});




client.on('message', async message =>{
  client.guilds.cache.get('701787671244046366').emojis.cache.forEach(emoji => console.log(emoji.animated ? '<a:' + emoji.name + ':' + emoji.id + '>' : '<:' + emoji.name + ':' + emoji.id + '>'));
  if (message.author.bot) return;
  currency.add(message.author.id, 1);


   const args = message.content.slice(prefix.length).trim().split(/ +/);
   const command = args.shift().toLowerCase();
   
   const input = message.content.slice(prefix.length).trim().split(' ');
   const commandArgs = input.join(' ');

【问题讨论】:

    标签: discord discord.js bots


    【解决方案1】:

    看起来您正在使用 Discord.JS v11。此版本不再受支持

    【讨论】:

      【解决方案2】:

      如果您安装了最新版本的 discord js,请将您的 node js 更新到最新版本,discord.js v13 只需在 node 16+ 上运行

      【讨论】:

        猜你喜欢
        • 2021-11-26
        • 1970-01-01
        • 2019-02-14
        • 2020-06-23
        • 1970-01-01
        • 2021-05-25
        • 2018-03-20
        • 2019-08-03
        • 2021-02-12
        相关资源
        最近更新 更多