Channel id when bot joins a guild

Hi, I am trying to send a message to a channel when the bot joins a guild. I know how to send it to a system channel, but how can I handle the situation if a system channel is not set? Is there way to get the channel id the bot joined to, or do I just send the message to a random channel?
Was this page helpful?