Answer the question
In order to leave comments, you need to log in
New user notification on discord.js server?
Either I google so badly, or something else. I did not find any sensible information on this issue ..
How can I do this so that a notification pops up in a certain channel, etc.?
Answer the question
In order to leave comments, you need to log in
There is a lot of information on the net about this. However, here is the implementation on discord.js V12.
Also, in order for this event to work, you need to enable the Server Members Intent option in the bot's settings on the developer portal .
bot.on('guildMemberAdd', function (member) {
let embed = new MessageEmbed();
embed.setTitle('Новый пользователь!')
.setColor('#ffffff') //Цвет полоски
.setDescription(member.user.tag + ' присоединился к серверу!')
.setThumbnail(member.user.avatarURL())
.setFooter('Всего пользователей: ' + member.guild.memberCount)
const channel = guild.channels.cache.get('ID канала куда отправляется сообщение');
channel.send(`<@${member.user.id}>${content}`, { embed });
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question