You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
368 B
8 lines
368 B
const GuildData = require('../models/guild');
|
|
|
|
module.exports = async (client, member) => {
|
|
let tg = await GuildData.findOne({gid: member.guild.id});
|
|
if (tg && tg.joinrole.length && member.guild.roles.cache.has(tg.joinrole)) {
|
|
if (member.guild.members.cache.get(client.user.id).permissions.has("MANAGE_ROLES")) {member.roles.add(tg.joinrole);}
|
|
}
|
|
}; |