Reputation: 21
I would like to get help with making code so that I can send a message to all servers when I want too? All the previous posts are discord.py or older versions of discord.js
Upvotes: 0
Views: 618
Reputation: 41
Assuming you meant "all channels on all servers", you can recurse Client#channels
.
client.channels.cache.forEach(ch => ch.send("message"));
If you meant "specified channel(s) on all servers", use filter
before forEach.
Upvotes: 1