verification: include user's email address in the admin log chnnael upon successful verification

Tento commit je obsažen v:
Ayden Jahola 2024-09-29 02:37:01 +01:00
rodič c06a7cd73e
revize 56c778d108
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID klíče GPG: 71DD90AE4AE92742
4 změnil soubory, kde provedl 6 přidání a 6 odebrání

Zobrazit soubor

@ -26,7 +26,7 @@ module.exports = {
)
.setTimestamp()
.setFooter({
text: `${serverName} || Made with ❤️ by Ayden`,
text: `${serverName} | Made with ❤️ by Ayden`,
iconURL: client.user.displayAvatarURL(),
});

Zobrazit soubor

@ -26,7 +26,7 @@ module.exports = {
)
.setTimestamp()
.setFooter({
text: `${serverName} || Made with ❤️ by Ayden`,
text: `${serverName} | Made with ❤️ by Ayden`,
iconURL: client.user.displayAvatarURL(),
});

Zobrazit soubor

@ -28,7 +28,7 @@ module.exports = {
)
.setTimestamp()
.setFooter({
text: `${serverName} || Made with ❤️ by Ayden`,
text: `${serverName} | Made with ❤️ by Ayden`,
iconURL: client.user.displayAvatarURL(),
});

Zobrazit soubor

@ -47,7 +47,7 @@ module.exports = {
}
try {
// Find the verification code in the database
// Find the verification code and user email in the database
const verificationEntry = await VerificationCode.findOne({
userId: interaction.user.id,
code,
@ -104,13 +104,13 @@ module.exports = {
// Delete the verification code entry
await VerificationCode.deleteOne({ userId: interaction.user.id, code });
// Get the log channel and send a log message
// Get the log channel and send a log message, including the user's email
const adminLogChannel = client.channels.cache.get(
serverSettings.logChannelId
);
if (adminLogChannel) {
await adminLogChannel.send({
content: `🎉 **Verification Success**\nUser: <@${interaction.user.id}> (${interaction.user.tag})\nRole: ${role.name}`,
content: `🎉 **Verification Success**\nUser: <@${interaction.user.id}> (${interaction.user.tag})\nEmail: ${verificationEntry.email}\nRole: ${role.name}`,
});
} else {
console.error("Admin log channel not found.");