Skip to content

crafter-station/discord

Repository files navigation

Crafternauta 🛠️

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 🎭・roles message
  • 🏓 Serves slash commands (/ping)

Spanish-first (LATAM).

Stack

Bun · TypeScript · discord.js v14 · tsdown · Docker · Railway

Structure

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

Local development

bun install
bun run register   # publish slash commands to the guild (one-time / on change)
bun run dev        # start with hot reload

Requires a .env (see .env.example).

⚠️ Required Discord settings

  1. Privileged intent — Developer Portal → your app → Bot → enable Server Members Intent (needed for the welcome-on-join event).
  2. 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.

Deploy (Railway)

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.

About

No description, website, or topics provided.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors