The Crafter Station community bot. A small, always-on Gateway bot (discord.js + Bun) that:
- 👋 Welcomes new members in
👋・bienvenida - 🎭 Assigns self-service reaction roles from the pinned
🎭・rolesmessage - 🏓 Serves slash commands (
/ping)
Spanish-first (LATAM).
Bun · TypeScript · discord.js v14 · tsdown · Docker · Railway
src/
index.ts # entry — Gateway client + intents
env.ts # zod-validated environment
constants.ts # channel IDs, brand color
config.ts # loads reaction-roles.json
commands/ # slash commands (one file each) + registry
handlers/ # Gateway event handlers (one file each)
lib/embeds.ts # pure, reusable embed builders
scripts/
register-commands.ts # publish slash commands (run manually)
reaction-roles.json # emoji → role map for the get-roles message
bun install
bun run register # publish slash commands to the guild (one-time / on change)
bun run dev # start with hot reloadRequires a .env (see .env.example).
- Privileged intent — Developer Portal → your app → Bot → enable Server Members Intent (needed for the welcome-on-join event).
- Permissions — the bot's role needs Manage Roles (reaction roles) and Send Messages / View Channel in the welcome channel. Its role must sit above the self-assign roles in the hierarchy.
Deployed as an always-on service (not serverless — a bot must hold its Gateway
connection 24/7). Set the env vars from .env.example in the Railway service,
then deploy. The Dockerfile builds and runs dist/index.mjs.