Бот видит команды, но не реагирует на них.
fs.readdir('./commands', (err, files) => {
if (err) console.log(err)
let jsfile = files.filter(f => f.split('.').pop() === 'js')
if (jsfile.length <= 0) return console.log('Команды не найдены!')
console.log(`Loaded ${jsfile.length} commands`)
jsfile.forEach((f, i) => {
let props = require(`./commands/${f}`)
robot.commands.get(props.help.name, props)
})
})
robot.on('message', async message => {
let p = config.prefix
let messageArray = message.content.split(' ')
let command = messageArray[0]
let args = messageArray.slice(1)
let command_file = robot.commands.get(command.slice(p.length))
if (command_file) command_file.run(robot, message, args)