ready.js (779B)
1 const config = require("../config/config.js"); 2 3 4 const startup = (client) => { 5 6 client.on('ready', ()=>{ 7 8 console.log('connected as ' + client.user.tag) 9 client.user.setActivity('Node.js vids', { type: 'Watching' }); 10 client.guilds.cache.forEach((guild)=>{ 11 console.log(guild.name) 12 guild.channels.cache.forEach((channel)=>{ 13 console.log(` ~ ${channel.name} ${channel.type} ${channel.id}`) 14 }) 15 }) 16 let genchannel = client.channels.cache.get(config.discordkey.genchan) 17 //const attachment = new discord.Attachment("") 18 genchannel.send( 'back online!') 19 20 }) 21 22 } 23 24 module.exports = {startup}