mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
33 lines
753 B
JavaScript
33 lines
753 B
JavaScript
const { EmbedBuilder } = require("discord.js"),
|
|
BaseEvent = require("../../base/BaseEvent");
|
|
|
|
class guildBanAdd extends BaseEvent {
|
|
constructor() {
|
|
super({
|
|
name: "guildBanAdd",
|
|
once: false,
|
|
});
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param {import("../../base/Client")} client
|
|
* @param {import("discord.js").GuildBan} ban
|
|
*/
|
|
async execute(client, ban) {
|
|
const embed = new EmbedBuilder()
|
|
.setAuthor({
|
|
name: client.user.getUsername(),
|
|
iconURL: ban.guild.iconURL(),
|
|
})
|
|
.setColor(client.config.embed.color)
|
|
.setFooter(client.config.embed.footer)
|
|
.setDescription(`You were banned from **${ban.guild.name}**!\nReason: **${ban.reason || "Not specified"}**`);
|
|
|
|
ban.user.send({
|
|
embeds: [embed],
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = guildBanAdd;
|