mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-21 16:25:55 +00:00
verification: include user's email address in the admin log chnnael upon successful verification
This commit is contained in:
parent
c06a7cd73e
commit
56c778d108
4 changed files with 6 additions and 6 deletions
|
@ -26,7 +26,7 @@ module.exports = {
|
|||
)
|
||||
.setTimestamp()
|
||||
.setFooter({
|
||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
||||
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||
iconURL: client.user.displayAvatarURL(),
|
||||
});
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = {
|
|||
)
|
||||
.setTimestamp()
|
||||
.setFooter({
|
||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
||||
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||
iconURL: client.user.displayAvatarURL(),
|
||||
});
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module.exports = {
|
|||
)
|
||||
.setTimestamp()
|
||||
.setFooter({
|
||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
||||
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||
iconURL: client.user.displayAvatarURL(),
|
||||
});
|
||||
|
||||
|
|
|
@ -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.");
|
||||
|
|
Loading…
Reference in a new issue