mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-22 08:45: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()
|
.setTimestamp()
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||||
iconURL: client.user.displayAvatarURL(),
|
iconURL: client.user.displayAvatarURL(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = {
|
||||||
)
|
)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||||
iconURL: client.user.displayAvatarURL(),
|
iconURL: client.user.displayAvatarURL(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ module.exports = {
|
||||||
)
|
)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: `${serverName} || Made with ❤️ by Ayden`,
|
text: `${serverName} | Made with ❤️ by Ayden`,
|
||||||
iconURL: client.user.displayAvatarURL(),
|
iconURL: client.user.displayAvatarURL(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Find the verification code in the database
|
// Find the verification code and user email in the database
|
||||||
const verificationEntry = await VerificationCode.findOne({
|
const verificationEntry = await VerificationCode.findOne({
|
||||||
userId: interaction.user.id,
|
userId: interaction.user.id,
|
||||||
code,
|
code,
|
||||||
|
@ -104,13 +104,13 @@ module.exports = {
|
||||||
// Delete the verification code entry
|
// Delete the verification code entry
|
||||||
await VerificationCode.deleteOne({ userId: interaction.user.id, code });
|
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(
|
const adminLogChannel = client.channels.cache.get(
|
||||||
serverSettings.logChannelId
|
serverSettings.logChannelId
|
||||||
);
|
);
|
||||||
if (adminLogChannel) {
|
if (adminLogChannel) {
|
||||||
await adminLogChannel.send({
|
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 {
|
} else {
|
||||||
console.error("Admin log channel not found.");
|
console.error("Admin log channel not found.");
|
||||||
|
|
Loading…
Reference in a new issue