Created
December 4, 2019 02:16
-
-
Save TheNoobWar/16b638d31f7d313a2ade8fc7dcf5ca4e to your computer and use it in GitHub Desktop.
Discord.js send a message in every channel of a guild ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
client.once('ready', () => { | |
console.log('Ready!'); | |
client.on("message", function(message) { | |
var server = client.guilds.get('Server ID here'); | |
for (var i = 0; i < server.channels.array().length; i++) { | |
message.channel.send('Message you want sent here') | |
} | |
}); | |
console.log('Done!'); | |
}); | |
client.login('Token ID here'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment