This commit is contained in:
NK 2023-04-04 23:06:53 +01:00
parent 47405bb769
commit 6d82a842cf
2 changed files with 63 additions and 57 deletions

View file

@ -226,7 +226,7 @@ module.exports = {
.addFields(fields)
.setURL(client.web)
.setColor(client.color);
interaction.editReply({ embeds: [embed] });
interaction.followUp({ embeds: [embed] });
}
}
},

View file

@ -3,67 +3,73 @@ const { EmbedBuilder } = require("discord.js");
const { Welcome } = require("../config.js");
client.on("guildMemberAdd", async member => {
const channel = member.guild.channels.cache.find(
channel => channel.id === Welcome
channel => channel.id == Welcome
);
if (!channel) return;
const embed = new EmbedBuilder()
.setTitle(
`<:join:897246825122254848> Hello ${member}, Welcome to NYX's Support Server!`
)
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
.addFields(
{
name: "Read Rules",
value: `<#799074874513555496>`,
inline: true,
},
{
name: "Support Channel",
value: `<#837865823225511946>`,
inline: true,
},
{
name: "FAQ",
value: `<#897345265516822558>`,
inline: true,
},
{
name: "Badge",
value: `<#897345265516822558>`,
inline: true,
},
{
name: "User ID:",
value: `\`\`\`\n${member.id}\n\`\`\``,
inline: true,
}
)
.setFooter({
text: `${member.user.tag} joined the server!`,
iconURL: member.user.displayAvatarURL({ dynamic: true }),
})
.setColor(client.color)
.setTimestamp();
channel.send({ embeds: [embed] });
channel.send({
embeds: [
new EmbedBuilder()
.setTitle(
`<:join:897246825122254848> Hello ${member}, Welcome to NYX's Support Server!`
)
.setThumbnail(
member.user.displayAvatarURL({ dynamic: true, size: 512 })
)
.addFields(
{
name: "Read Rules",
value: `<#799074874513555496>`,
inline: true,
},
{
name: "Support Channel",
value: `<#837865823225511946>`,
inline: true,
},
{
name: "FAQ",
value: `<#897345265516822558>`,
inline: true,
},
{
name: "Badge",
value: `<#897345265516822558>`,
inline: true,
},
{
name: "User ID:",
value: `\`\`\`\n${member.id}\n\`\`\``,
inline: true,
}
)
.setFooter({
text: `${member.user.tag} joined the server!`,
iconURL: member.user.displayAvatarURL({ dynamic: true }),
})
.setColor(client.color)
.setTimestamp(),
],
});
});
client.on("guildMemberRemove", async member => {
const channel = member.guild.channels.cache.find(
channel => channel.id === Welcome
channel => channel.id == Welcome
);
if (!channel) return;
const embed = new EmbedBuilder()
.setTitle(
`<:leave:897246828045680640> ${member.user.username} can't handle being cool! `
)
.setThumbnail(member.guild.iconURL({ dynamic: true }))
.setDescription(`We now only have ${member.guild.memberCount} members`)
.setFooter({
text: `${member.user.tag} left the server!`,
iconURL: member.user.displayAvatarURL({ dynamic: true }),
})
.setColor(client.color)
.setTimestamp();
channel.send({ embeds: [embed] });
channel.send({
embeds: [
new EmbedBuilder()
.setTitle(
`<:leave:897246828045680640> ${member.user.username} can't handle being cool! `
)
.setThumbnail(member.guild.iconURL({ dynamic: true }))
.setDescription(`We now only have ${member.guild.memberCount} members`)
.setFooter({
text: `${member.user.tag} left the server!`,
iconURL: member.user.displayAvatarURL({ dynamic: true }),
})
.setColor(client.color)
.setTimestamp(),
],
});
});