Clearing logs

master
masterhc 1 year ago
parent bfce334a82
commit a797906107

@ -220,12 +220,13 @@ class _Client extends Client
{ {
this.on('messageReactionAdd', (reaction, user)=> this.on('messageReactionAdd', (reaction, user)=>
{ {
console.log('Lib: Message: Reaction: Added');
(async ()=> (async ()=>
{ {
const rule = await roleRulesM.findOne({mID:reaction.message.id,roleEmoji:reaction._emoji.id}).then(rule =>{return rule}).catch(err=>{return null}) const rule = await roleRulesM.findOne({mID:reaction.message.id,roleEmoji:reaction._emoji.id}).then(rule =>{return rule}).catch(err=>{return null})
if(rule) if(rule)
{ {
console.log(`RoleAssignment: Guild:${this.guilds.cache.get(rule.gID)} Role ${rule.roleName} given to ${user.username}`) console.log(`RoleAssignment: Guild:${this.guilds.cache.get(rule.gID)}: Adding role ${rule.roleName} given to ${user.username}`)
this.channels.cache.get(reaction.message.channelId).members.get(user.id).roles.add(rule.roleID) this.channels.cache.get(reaction.message.channelId).members.get(user.id).roles.add(rule.roleID)
} }
})() })()
@ -237,7 +238,7 @@ class _Client extends Client
const rule = await roleRulesM.findOne({mID:reaction.message.id,roleEmoji:reaction._emoji.id}).then(rule =>{return rule}).catch(err=>{return null}) const rule = await roleRulesM.findOne({mID:reaction.message.id,roleEmoji:reaction._emoji.id}).then(rule =>{return rule}).catch(err=>{return null})
if(rule) if(rule)
{ {
console.log(`RoleAssignment: Guild:${this.guilds.cache.get(rule.gID)}: Removing, ${user.username}'s ${rule.roleName} role. `) console.log(`RoleAssignment: Guild:${this.guilds.cache.get(rule.gID)}: Removing ${user.username}'s ${rule.roleName} role. `)
this.channels.cache.get(reaction.message.channelId).members.get(user.id).roles.remove(rule.roleID) this.channels.cache.get(reaction.message.channelId).members.get(user.id).roles.remove(rule.roleID)
} }
})() })()

Loading…
Cancel
Save