Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

🤖 Berya Fellowship Registration Bot (ቤርያ ፌሎሺፕ)

A Telegram bot that registers servants for the ቤርያ ፌሎሺፕ የዓመት ማጠቃለያ ፕሮግራም (year-end ceremony). It collects each person's name, phone, and chosen service stream, takes a Telebirr payment screenshot, then lets an admin verify or reject the payment and sends a digital entry ticket.

This runs 24/7 on Val Town via a Telegram webhook — no always-on server needed.

Registration flow

Rendering mermaid diagram...

Setup

  1. Create the bot with @BotFather (/newbot) and copy the token.
  2. Set the TELEGRAM_TOKEN environment variable to that token.
  3. Set the ADMIN_ID environment variable to your Telegram numeric user ID (the only account allowed to verify/reject). You can get it from @userinfobot.
  4. Visit the val's HTTP endpoint once — this auto-registers the webhook with Telegram.
  5. Message your bot /start to test.

Files

FilePurpose
main.tsHTTP webhook entry point; registers the webhook and routes updates
bot.tsConversation logic (name → phone → stream → payment) + admin verify/reject
db.tsSQLite storage for registrations (replaces the old CSV file)
config.tsEvent details, Telebirr info, and service streams

Data

Registrations are stored in this val's SQLite database in a registrations table — including status (PENDING / VERIFIED / REJECTED). Nothing is lost when the bot restarts.