-4

I wanna know if there is a way to make a discord.js bot send a message on startup to a certain text channel.

Marko
  • 1
  • 2

1 Answers1

2

Yeah, this is possible by using the ready event. Any code here will be executed when the bot is ready"

client.on("ready", () => {
    client.channels.cache.get("channel-id-here")
          .send(`I'm online!`)
})
Static
  • 776
  • 4
  • 14