im trying to find a way to send a message to a channel upon launch of the discord bot. I've tried using
client.on('message', (message) => {
client.on('ready', () => {
channel = client.channels.cache.get('744630121213722696');
channel.send('bot is up and running!');
})});
but no success, I get no error messages just no response from the bot
on('ready')handler from theon('message')handler. Consider: It is not possible to check for a bot's launch from inside any other kind of handler, since the bot's launch is the first handler. Don't nest event handlers. - Allister