Last updated
How Account Age Checker Bots Work
When a new user joins, the bot:
- Receives the
GUILD_MEMBER_ADDevent from Discord - Extracts the user's Snowflake ID
- Decodes the creation timestamp using Discord's epoch (January 1, 2015)
- Calculates the account age in days
- Compares against the configured minimum age
- Takes action: kick, assign restricted role, or send a warning
Recommended Bot Choices by Use Case
- MEE6 — best for beginners, user-friendly dashboard, widely supported
- Carl-bot — advanced features, popular with larger servers
- Wick — specialized security bot, best for raid protection
- Beemo — anti-raid focused, sophisticated age-based filtering
- Custom bot — best when you need full control over logic and logging
Combine bot-based age checking with Discord's built-in verification levels (Server Settings → Safety Setup) for layered protection that works even when the bot is temporarily offline.
Examples
Example 1: MEE6 Bot Configuration
MEE6 is the most widely used bot for account age enforcement:
- Visit
mee6.xyz/dashboard→ select your server - Go to Moderation → Auto-Moderator
- Enable "New Account" rule
- Set minimum age:
7 days - Action:
Kick - DM message: "Your account must be at least 7 days old to join."
Example 2: Carl-bot Join Gate
!joingate enable
!joingate age 7d
!joingate action kick
!joingate message "Account too new. Please wait {remaining} before joining."
!joingate log #mod-log
Example 3: Building a Custom Bot with Discord.js
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers]
});
const MIN_AGE_DAYS = 7;
const DISCORD_EPOCH = 1420070400000n;
client.on('guildMemberAdd', async (member) => {
const id = BigInt(member.user.id);
const createdAt = new Date(Number((id >> 22n) + DISCORD_EPOCH));
const ageDays = Math.floor((Date.now() - createdAt.getTime()) / 86400000);
if (ageDays < MIN_AGE_DAYS) {
try {
await member.send(
`Your account is ${ageDays} day(s) old. ` +
`This server requires accounts to be at least ${MIN_AGE_DAYS} days old.`
);
await member.kick(`Account too new: ${ageDays} days old`);
} catch (err) {
console.error(`Failed to kick ${member.user.tag}:`, err);
}
}
});
client.login(process.env.BOT_TOKEN);