(member, role, guild)
| 562 | } |
| 563 | |
| 564 | async function sendAutoVerifyNotification(member, role, guild) { |
| 565 | try { |
| 566 | const { createEmbed } = await import('../utils/embeds.js'); |
| 567 | |
| 568 | const embed = createEmbed({ |
| 569 | title: "🎉 Welcome to the Server!", |
| 570 | description: `You have been automatically verified in **${guild.name}**!`, |
| 571 | fields: [ |
| 572 | { |
| 573 | name: "✅ Role Assigned", |
| 574 | value: `You now have the ${role} role!`, |
| 575 | inline: false |
| 576 | }, |
| 577 | { |
| 578 | name: "📖 What's Next?", |
| 579 | value: "You now have access to all server channels and features. Welcome!", |
| 580 | inline: false |
| 581 | } |
| 582 | ], |
| 583 | color: 'success' |
| 584 | }); |
| 585 | |
| 586 | await member.send({ embeds: [embed] }); |
| 587 | } catch (error) { |
| 588 | logger.debug('Could not send auto-verify DM notification', { |
| 589 | userId: member.id, |
| 590 | guildId: guild.id, |
| 591 | reason: error.message |
| 592 | }); |
| 593 | |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | function logVerificationAction(client, guildId, userId, action, metadata = {}) { |
| 598 | if (!shouldLogVerifications) { |
no test coverage detected