mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
Merge branch 'main' of https://github.com/Tutur33/gestion
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,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,
|
||||
|
||||
@@ -82,4 +82,4 @@ module.exports = (client) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user