currently I'm working on a event-bot and that bot is used on a few groups in Discord.
So right now I have this code:

```
if (command === "init")
  {
    //var d = new Date();
    //var n = d.getHours();
    message.channel.send("BunnBot starting...");
    var interval = setInterval (function () {
  message.channel.send("123")
  //message.channel.send(n);
}, 30 * 1000);
  }

```

The Problem is, that this command only works for the current group, means that in any other group I would have to use the init command as well.

How can I solve it? How can I make that my Bot send a message to every group?

Edit:
Okay, I changed the code a bit and I'm now using this:
Okay, here's my new code and now I'm stuck with an error message, that send is not a function

```
client.on("ready", () => {
console.log('Logged in as BunnyBot');
setInterval (function () {
    client.guilds.forEach(() => { //for each guild the bot is in
        let defaultChannel = "";
        client.guilds.forEach((channel) => {
            if(channel.type == "text" && defaultChannel == "") {
           if(channel.permissionsFor(guild.me).has("SEND_MESSAGES")) {
               defaultChannel = channel;
           }
            }
        })
        message.defaultChannel.send("Message here"); //send it to whatever channel the bot has permissions to send on
        console.log("Sending Messages");
   })
}, 1 * 1000);
})

```

Problem: Now I get an error message, that send is not a function.