Heroku is not letting me start the application as it stays on for a few seconds, and then this happens:
2020-04-07T23:11:35.586817+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-07T23:11:35.597942+00:00 heroku[web.1]: State changed from crashed to starting
After that, Heroku restarts the application, and the above code is displayed one more time (this time there is no restart, just a crash).
2020-04-07T23:12:38.593514+00:00 heroku[web.1]: State changed from starting to crashed
I've searched for problems in my code, and I could not found any, so I deleted everything, and make my main file core.js
a single discord bot, that just send an embed message with a title:
const { Client, MessageEmbed } = require('discord.js')
const client = new Client()
let channel = null
client.on('ready', () => {
console.log(`bot ${client.user.tag} running`)
channel = client.channels.cache.find(ch => /generic_channel_name/.test(ch.name))
const embed = new MessageEmbed()
.setTitle('Commom title')
.setColor('#ffff00');
channel.send(embed)
})
client.login(config.token)
Even a single setInterval causes the Heroku to crash the app:
setInterval(() => {
console.log('Testing')
}, 3000)
I really tried lots of things, but the only thing I did that didn't crash was a simple for loop from 0 to 100.000
Can someone help me?