🤖 USC Telegram Bot

I have been climbing at the NUS USC boulder wall very frequently. It is a pretty decent spray wall that’s reset once every semester. Friends would share images of nice routes they had come up with, and so I wanted to build something to allow everyone to share their routes + view routes others had come up with.

Initial solution

It turns out that there was already an existing Telegram Bot maintained by members of the NUS Climbing Club. It was relatively simple to submit routes, however viewing routes was troublesome, as the bot would spam you with an array of images whenever you sent in a request. I approached them with the idea to build a web-based route viewer because it was hard to view a list of climbing routes via chat UI.

They stored user-submitted routes in a google sheets document for the ease of moderation, so I wrote a simple Svelte web app that retrieves routes from this document with the Google Sheets API.

Initial prototype

User-ship of the website was quite consistent throughout the semester despite the numerous bugs (I didn’t have a lot of time to work on it), so I continued to work on improving the service:

  • Rewrote the Telegram bot with Telegraf.js and migrated away from an older Python script.
  • Experimented with route-logging:
    • Users could sign in with Telegram and log routes they have done.
    • This feature was eventually removed due to a lack of use.

Migrating from web to Telegram mini-app

More recently, I moved the entire web application onto Telegram by turning it into a Telegram Mini App.

New Telegram mini app that launches directly from the bot

This was a good way to explore the capabilities of Telegram Mini Apps, which was something I’ve been meaning to do.

I feel like this boulder wall has been one of the best resources for my climbing training as it’s free to use and accessible to me as an NUS student. I hope this initiative helps to build and grow the community around the boulder wall!

The Telegram bot is live at t.me/USCTelebot and all the source code is open sourced in this Github Repository. Feel free to send in any pull requests as I won’t be actively working on it.