let role = message.guild.roles.find(r => r.name === "Role Name");
// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();
// or the person who made started the command: let member = message.member;
//adds the role
member.roles.add(role)
robot.on('guildMemberAdd', function (member) {
let embed = new Discord.MessageEmbed();
embed.setTitle('Новый пользователь!')
.setColor('#ffffff') //Цвет полоски
.setDescription(member.user.tag + ' присоединился к серверу!')
.setThumbnail(member.user.avatarURL())
.setFooter('Всего пользователей: ' + member.guild.memberCount)
const channel = member.guild.channels.cache.find(ch => ch.name === '774982055519191070');
channel.send(`<@${member.user.id}>${content}`, { embed });
})
robot.on('guildMemberAdd', function (member) {
let embed = new Discord.MessageEmbed();
embed.setTitle('Новый пользователь!')
.setColor('#ffffff') //Цвет полоски
.setDescription(member.user.tag + ' присоединился к серверу!')
.setThumbnail(member.user.avatarURL())
.setFooter('Всего пользователей: ' + member.guild.memberCount)
const channel = message.guild.channels.cache.get('774982055519191070');
channel.send(`<@${member.user.id}>${content}`, { embed });
})
let embed = new MessageEmbed();
let embed = new <b>Discord.</b>MessageEmbed();
robot.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('774982055519191070');
channel.send(`<@${member.user.id}>${content}`, { embed });
})
robot.on('guildMemberAdd', member => {
var embed = new Discord.RichEmbed()
.setColor('#ffffff')
.setTitle('**Hello!**')
.setDescription(`Welcome to ${member.guild}.`)
.setFooter(member.guild.name, member.guild.iconURL);
member.send(embed)
.catch(console.error);
});