client.on("guildCreate", guild => {
const channels = guild.channels.cache.filter(channel => channel.type == "text");
channels.first().send("Worked!").catch(e => console.log(e));
});
GUILDS
в опциях клиента.client.on("guildCreate", guild => {
const channel = guild.channels.cache.find(channel => channel.isText() && channel.permissionsFor(client.user).has(["VIEW_CHANNEL", "SEND_MESSAGES"]));
if (!channel) return;
channel.send("Worked!");
});