JaBa/events/Guild/guildBanAdd.js
Jonny_Bro (Nikita) 50fc315d38 oi
2023-03-26 18:39:37 +05:00

32 lines
No EOL
718 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { EmbedBuilder } = require("discord.js"),
BaseEvent = require("../../base/BaseEvent");
class guildBanAdd extends BaseEvent {
constructor() {
super({
name: "guildBanAdd",
once: false,
});
}
/**
*
* @param {import("../../base/JaBa")} client
* @param {import("discord.js").GuildBan} ban
*/
async execute(client, ban) {
const embed = new EmbedBuilder()
.setAuthor({
name: client.user.username,
iconURL: ban.guild.iconURL(),
})
.setColor("#FF0000")
.setDescription(`Вы были забанены на **${ban.guild.name}** по причине **${ban.reason || "Не указана"}**`);
ban.user.send({
embeds: [embed],
});
}
}
module.exports = guildBanAdd;