|
|
|
@ -1295,13 +1295,13 @@ class Strikes
|
|
|
|
|
}
|
|
|
|
|
handleStroked(user, guild)
|
|
|
|
|
{
|
|
|
|
|
strikesM.deleteMany({ guildID: guild, strokedID: user }, (err, res) => {
|
|
|
|
|
if (!err) return console.log('Lib: Strikes: Deleted: From User:', user, 'on Guild:', guild)
|
|
|
|
|
});
|
|
|
|
|
// strikesM.deleteMany({ guildID: guild, strokedID: user }, (err, res) => {
|
|
|
|
|
// if (!err) return console.log('Lib: Strikes: Deleted: From User:', user, 'on Guild:', guild)
|
|
|
|
|
// });
|
|
|
|
|
// If the user is found, kick them from the server
|
|
|
|
|
const member = this.client.guilds.cache.get(guild).members.cache.get(user);
|
|
|
|
|
if (!member) return console.log('Lib:Strikes: Handle Struck: Member not valid')
|
|
|
|
|
console.log(member.user.username)
|
|
|
|
|
// const member = this.client.guilds.cache.get(guild).members.cache.get(user);
|
|
|
|
|
// if (!member) return console.log('Lib:Strikes: Handle Struck: Member not valid')
|
|
|
|
|
// console.log(member.user.username)
|
|
|
|
|
// member.kick('Optional reason that will be displayed in the audit logs')
|
|
|
|
|
// .then(() => console.log(`Successfully kicked ${user.user.username}`))
|
|
|
|
|
// .catch(err => console.log(`Unable to kick ${user.user.username}: ${err}`));
|
|
|
|
|