finished bl system

This commit is contained in:
VALOU3336
2024-02-16 22:26:19 +01:00
parent 0a424aaf54
commit 42ef595e0c
5 changed files with 20 additions and 39 deletions
+18
View File
@@ -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) {
}
}
},
};