Make a creature appear in the channel after every 30 messages: the first member to type its name catches it, and /pokedex shows how many of each they have caught Use an editable list of creatures (name, emoji, rarity) with the existing creatures as defaults. Use the emoji setting type for each Unicode emoji, with a list of emoji rows when there are several.
A creature-catching game where creatures spawn in the chat after every 30 messages.
How it works:
Commands:
/pokedex - View your collection (or another member's)/top-catchers - See the leaderboardSetup: Set the spawn channel in the dashboard settings, or creatures will spawn in whichever channel they're chatting in.
Made by MEE6. Remix it to get a copy of your own and change anything you like.
Type its name to catch it!
Hint: It's a uncommon creature.
Alex caught Moony!
This is their #1 Moony (1 total creatures).
1 total creatures caught
Not caught
Not caught
Not caught
Not caught
1 caught
Not caught
Not caught
Not caught
🥇 Alex — 1 creatures
// Creature list with their rarity
const CREATURES = [
{ name: 'Sparkle', emoji: '✨', rarity: 'common' },
{ name: 'Fluffy', emoji: '☁️', rarity: 'common' },
{ name: 'Bubbles', emoji: '🫧', rarity: 'common' },
{ name: 'Sunny', emoji: '☀️', rarity: 'uncommon' },
{ name: 'Moony', emoji: '🌙', rarity: 'uncommon' },
{ name: 'Starlight', emoji: '⭐', rarity: 'rare' },
{ name: 'Phoenix', emoji: '🔥', rarity: 'rare' },
{ name: 'Dragon', emoji: '🐉', rarity: 'legendary' },
];
const MESSAGE_THRESHOLD = 30;
// Settings for spawn channel
mee6.settings({
spawn_channel: {
type: 'channel',
label: 'Creature spawn channel',
required: false,
sample: 'general',
},
creatures: {
type: 'list',
label: 'Creatures',
maxItems: 25,
fields: {
name: { type: 'string', label: 'Name', required: true },
emoji: { type: 'emoji', label: 'Emoji', required: true },
rarity: {
type: 'string',
label: 'Rarity',
required: true,
choices: ['common', 'uncommon', 'rare', 'legendary'],
default: 'common',
},
},
default: CREATURES,
},
});
// Track messages and spawn creatures
mee6.on('message', async (ctx) => {
const spawnChannel = ctx.settings.spawn_channel || ctx.channelId;
// Only count messages in the spawn channel
if (ctx.channelId !== spawnChannel) return;
// Increment message counter
const count = await mee6.store.incr('message_count');
// Check if a creature is already active
const activeCreature = await mee6.store.get('active_creature');
if (activeCreature) {
// Check if message content matches the active creature name (case-insensitive)
const creature = activeCreature as { name: string; emoji: string; rarity: string };
if (ctx.message.content.toLowerCase() === creature.name.toLowerCase()) {
// Member caught it!
const m = mee6.store.member(ctx.author.id);
const caught = await m.incr(`caught_${creature.name}`, 1);
const total = await m.incr('total_caught', 1);
// Clear the active creature
await mee6.store.delete('active_creature');
await ctx.reply({
embed: {
title: `${creature.emoji} Creature Caught!`,
description: `**${ctx.author.displayName}** caught **${creature.name}**!\n\nThis is their **#${caught}** ${creature.name} (${total} total creatures).`,
color:
creature.rarity === 'legendary'
? '#FFD700'
: creature.rarity === 'rare'
? '#9B59B6'
: creature.rarity === 'uncommon'
? '#3498DB'
: '#95A5A6',
},
});
}
return;
}
// Spawn a creature every 30 messages
if (count >= MESSAGE_THRESHOLD) {
await mee6.store.set('message_count', 0);
// Pick a random creature with weighted rarity
const weights = { common: 50, uncommon: 30, rare: 15, legendary: 5 };
const pool: typeof CREATURES = [];
for (const creature of ctx.settings.creatures as typeof CREATURES) {
const weight = weights[creature.rarity as keyof typeof weights];
for (let i = 0; i < weight; i++) {
pool.push(creature);
}
}
if (!pool.length) return;
const creature = pool[Math.floor(Math.random() * pool.length)];
// Store the active creature
await mee6.store.set('active_creature', creature, { ttl: 300 }); // 5 min timeout
await ctx.send(spawnChannel, {
embed: {
title: `${creature.emoji} A wild creature appeared!`,
description: `Type its name to catch it!\n\n*Hint: It's a ${creature.rarity} creature.*`,
color:
creature.rarity === 'legendary'
? '#FFD700'
: creature.rarity === 'rare'
? '#9B59B6'
: creature.rarity === 'uncommon'
? '#3498DB'
: '#95A5A6',
footer: { text: 'Be the first to type the name!' },
},
});
}
});
// Show member's collection
mee6.command(
'pokedex',
{
description: 'View your creature collection',
options: [{ name: 'user', type: 'user', description: "View another member's collection" }],
ephemeral: true,
},
async (ctx) => {
const targetId = ctx.option<string>('user') || ctx.author.id;
const target = targetId === ctx.author.id ? ctx.author : await mee6.getMember(targetId);
if (!target) {
await ctx.reply('Member not found.');
return;
}
const m = mee6.store.member(targetId);
const data = await m.all();
const total = (data['total_caught'] as number) || 0;
if (total === 0) {
await ctx.reply({
embed: {
title: `📖 ${target.displayName}'s Pokedex`,
description: 'No creatures caught yet! Keep an eye out for spawns in the chat.',
color: '#95A5A6',
},
});
return;
}
// Build collection display
const configured = ctx.settings.creatures as typeof CREATURES;
const retired = Object.keys(data)
.filter((key) => key.startsWith('caught_') && !configured.some((c) => key === `caught_${c.name}`))
.map((key) => ({ name: key.slice(7), emoji: '📦', rarity: 'common' }));
const fields = [...configured, ...retired].slice(0, 25).map((creature) => {
const caught = (data[`caught_${creature.name}`] as number) || 0;
return {
name: `${creature.emoji} ${creature.name}`,
value: caught > 0 ? `**${caught}** caught` : 'Not caught',
inline: true,
};
});
await ctx.reply({
embed: {
title: `📖 ${target.displayName}'s Pokedex`,
description: `**${total}** total creatures caught`,
color: '#3498DB',
fields,
},
});
}
);
// Leaderboard
mee6.command(
'top-catchers',
{
description: 'View the top creature catchers',
},
async (ctx) => {
const top = await mee6.store.memberTop('total_caught', 10);
if (top.length === 0) {
await ctx.reply('No one has caught any creatures yet!');
return;
}
const lines = await Promise.all(
top.map(async (entry, i) => {
const member = await mee6.getMember(entry.user_id);
const name = member ? member.displayName : 'Unknown';
const medal = i === 0 ? '🥇' : i === 1 ? '🥈' : i === 2 ? '🥉' : `${i + 1}.`;
return `${medal} **${name}** — ${entry.value} creatures`;
})
);
await ctx.reply({
embed: {
title: '🏆 Top Creature Catchers',
description: lines.join('\n'),
color: '#F39C12',
},
});
}
);