bot.getBots() fix i guess

This commit is contained in:
ChomeNS 2022-12-02 19:35:08 +07:00
parent c36d3fdca3
commit d6a8133c2b
2 changed files with 2 additions and 4 deletions

View file

@ -11,7 +11,7 @@ module.exports = {
usage: '<ownerhash> <code>',
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
try {
bot.tellraw(selector, { text: util.inspect(eval(args.slice(1).join(' ')), { stylize }).substring(0, 32766) })
bot.tellraw(selector, { text: util.inspect(eval(args.slice(1).join(' ')), { stylize }).substring(0, 32700) })
} catch (err) {
bot.tellraw(selector, { text: util.inspect(err).replaceAll('runner', 'chayapak1'), color: 'red' })
}

View file

@ -23,9 +23,7 @@ dcclient.on('ready', () => {
bots.push(bot)
}
// await is important cuz the function is async
// VVVVV
const bot = await createBot(server, config, getBots, setNewBot, dcclient, rl)
bots.push(bot)
await createBot(server, config, getBots, setNewBot, dcclient, rl)
})
})