mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-25 14:18:47 +02:00
finished bl system
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const { Events } = require("discord.js");
|
||||
const db = require('quick.db');
|
||||
const GestionDb = new db.table('gestion')
|
||||
module.exports = {
|
||||
name: Events.GuildMemberAdd,
|
||||
once: false,
|
||||
async execute(member, client) {
|
||||
const userId = member.user.id;
|
||||
const bl = await GestionDb.get(`${client.user.id}.bl`);
|
||||
|
||||
if (bl && bl[userId]) {
|
||||
try {
|
||||
await member.ban({ reason: 'Blacklisted' });
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user