This commit is contained in:
Tutur33
2024-02-16 23:05:01 +01:00
4 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ const { Events, InteractionType } = require("discord.js");
module.exports = {
name: Events.InteractionCreate,
async run(client, interaction) {
async execute(client, interaction) {
if (interaction.type === InteractionType.ApplicationCommand) {
const command = client.commands.get(interaction.commandName);
await command.execute(interaction, client);
+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) {
}
}
},
};
+1 -3
View File
@@ -1,11 +1,9 @@
module.exports = {
name: 'messageDelete',
once: false,
execute(message, client) {
// Ignore les messages de bots
async execute(message, client) {
if (message.author.bot) return;
// Enregistre le message supprimé dans la collection snipes
client.snipes.set(message.channel.id, {
content: message.content,
author: message.author.id,