Building a Telegram Bot with Cloudflare Workers, Durable Objects and Grammy

Hydration bot sparks a “keep it simple” vs “serverless everything” smackdown

TLDR: A dev launched a Telegram water-reminder bot using Cloudflare’s serverless tools and needed AI help to fix a snag. Comments exploded into a culture clash: skip wrappers and learn the raw API, and maybe skip serverless too—proof that even a sip-tracker can stir big dev feelings.

A dev built “Drinky,” a Telegram bot that reminds you to drink water, and accidentally triggered a full-on culture war. The bot runs on Cloudflare Workers (code on demand), uses Durable Objects for storage, and the grammY library to talk to Telegram. The dev wrestled with webhooks, finally got replies working after a stateless gotcha, and—confession time—asked an AI coding tool to patch it up fast. Cue the comments turning into a hydration hot tub of takes.

Strongest vibe? “Stop overengineering a water reminder.” One side wants fewer training wheels: koakuma-chan says skip the wrappers (helper toolkits) and learn the raw API, warning that bot menus and state can tangle into spaghetti. The other side throws shade at the cloud parade: gowthamgts12 drops the double dunk—“Not everything has to be AI,” and, even spicier, “not everything has to be workers or serverless :)”. The subtext: do you really need a whole cloud stack and an AI co-pilot to track sips?

The jokes wrote themselves: “0ms latency for a sip,” “I came for water, stayed for the thirst in the comments,” and the eternal dev meme—“is this shipping or overengineering?” In short, a tiny hydration bot became a splashy referendum on modern dev culture: wrappers vs raw, AI vs DIY, serverless vs simple.

Key Points

  • The author built “Drinky,” a Telegram bot to track water intake, preferring a bot over web or Android apps for ease of sharing.
  • The bot is deployed on Cloudflare Workers and uses Durable Objects for per-user storage to minimize latency and avoid external DB calls.
  • grammY was chosen over telegraf.js due to active maintenance and documentation; additional tools include oxc, Vitest, Drizzle ORM (beta), wrangler, Cloudflare Tunnel, and Gemini CLI.
  • Receiving messages required setting a Telegram webhook; exposing localhost for testing was done via Cloudflare Tunnel.
  • In a serverless environment, bot.handleUpdate(update) must be called, and commands can be registered dynamically via bot.api.setMyCommands before handling updates.

Hottest takes

“not use wrappers... learn how it actually works” — koakuma-chan
“Not everything has to be AI” — gowthamgts12
“not everything has to be workers or serverless :)” — gowthamgts12
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.