This commit is contained in:
1tzEmerald committed 2024-10-10 19:14:45 +01:00
1 parent 4f14722e14
commit ac0daf5fe7
28 files changed
+929 -550

No files matched your search

+16 -16
View File
@@ -19,32 +19,32 @@ const msgconfig = yaml.load(
module.exports = new Event("guildMemberRemove", async (client, member, interaction, guild) => {
if (supportbot.Leave.Enabled) {
const LeaveChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.Leave.Channel)
const LeaveChannel = member.guild.channels.cache.get(supportbot.Leave.Channel) ||
member.guild.channels.cache.find(channel => channel.name === supportbot.Leave.Channel);
const LeaveEmbed = new Discord.EmbedBuilder()
.setColor(msgconfig.Leave.Embed.Colour)
.setTitle(msgconfig.Leave.Embed.Title)
.setDescription(msgconfig.Leave.Embed.Message.replace(/%joined_user%/g, member.user))
.setDescription(msgconfig.Leave.Embed.Message.replace(/%left_user%/g, member.user))
.setTimestamp();
if (msgconfig.Leave.Embed.Thumbnail === "BOT") {
LeaveEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (msgconfig.Leave.Embed.Thumbnail === "BOT") {
LeaveEmbed.setThumbnail(client.user.displayAvatarURL());
} else if (msgconfig.Leave.Embed.Thumbnail === "USER") {
LeaveEmbed.setThumbnail(member.user.displayAvatarURL());
}
if (msgconfig.Leave.Embed.Thumbnail === "USER") {
LeaveEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (msgconfig.Leave.Embed.ImageEnabled) {
LeaveEmbed.setImage(msgconfig.Leave.Embed.ImageURL)
}
if (msgconfig.Leave.Embed.ImageEnabled) {
LeaveEmbed.setImage(msgconfig.Leave.Embed.ImageURL);
}
if (LeaveChannel) {
LeaveChannel.send({
embeds: [LeaveEmbed]
})
});
}
console.log(`\u001b[31m`, `[-]`, `\u001b[33m`, `${member.user.username} left the server!`)
console.log(`\u001b[31m`, `[-]`, `\u001b[33m`, `${member.user.username} left the server!`);
}
});
});