diff options
| author | Fuwn <[email protected]> | 2025-10-01 21:11:16 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-10-01 21:11:16 -0700 |
| commit | eba0d406f1fc414784528fb25805d9a6e3593690 (patch) | |
| tree | 5ecc548b0cccf0c4c86881b01924b51fedbec5bf /packages/interactions/discord/embeds.ts | |
| parent | feat(interactions): Support GIFs in audit logs (diff) | |
| download | umabotdiscord-eba0d406f1fc414784528fb25805d9a6e3593690.tar.xz umabotdiscord-eba0d406f1fc414784528fb25805d9a6e3593690.zip | |
feat(interactions): Add age-verify audit log
Diffstat (limited to 'packages/interactions/discord/embeds.ts')
| -rw-r--r-- | packages/interactions/discord/embeds.ts | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/interactions/discord/embeds.ts b/packages/interactions/discord/embeds.ts index 2d2dfe9..38dfc00 100644 --- a/packages/interactions/discord/embeds.ts +++ b/packages/interactions/discord/embeds.ts @@ -214,3 +214,41 @@ export const createNSFWApplicationEmbed = ( }, }; }; + +export const createAgeVerificationLogEmbed = ( + action: string, + targetUser: { username: string; id: string; avatar?: string }, + accessType: string, + reason: string, + moderator: { username: string; id: string; avatar?: string }, + timestamp: number, +): DiscordEmbed => { + return { + title: "🔞 Age Verification Log", + description: `**Action:** ${action}\n**Access Type:** ${accessType}\n**Reason:** ${reason}`, + color: 0x00ff00, + timestamp: new Date(timestamp).toISOString(), + fields: [ + { + name: "Target User", + value: `<@${targetUser.id}>`, + inline: true, + }, + { + name: "Moderator", + value: `<@${moderator.id}>`, + inline: true, + }, + { + name: "Timestamp", + value: `<t:${Math.floor(timestamp / 1000)}:F>`, + inline: true, + }, + ], + thumbnail: targetUser.avatar + ? { + url: `https://cdn.discordapp.com/avatars/${targetUser.id}/${targetUser.avatar}${targetUser.avatar.startsWith("a_") ? ".gif" : ".png"}?size=256`, + } + : undefined, + }; +}; |