如何从外部中断运行的嵌套循环

时间:2019-07-28 21:33:10

标签: node.js discord.js

我有一个不和谐的机器人给有关组合饲料的建议,问题是,如果输入数字太大,它会写出20-30行的字样

我尝试了background: linear-gradient(to top, transparent, url(/myimage.png) repeat, transparent); ,但没有成功,background-size它会完全停止该漫游器,我必须手动将其打开

return;

我的process.exit()函数是这样的,真正的函数只有1-2个循环

const collector = new Discord.MessageCollector(message.channel, 
   m => m.author.id === message.author.id, { time: 10000 });
            message.channel.send("Do you have Expboost? (y/n)")
            message.channel.send("Type `stop` to stop the recommandation")
            collector.on('collect', message => {
                if (message.content == "y") {
                    calculateFodder(expNeed, rarity, 1.1, message);   \\nested loop
                } else if (message.content == "n") {
                    calculateFodder(expNeed, rarity, 1, message);   \\nested loop
                } else if (message.content == "stop")
                    process.exit()
            })

0 个答案:

没有答案