Urgent.News

What's breaking now, across thousands of outlets.

Tech

Why Most Telegram Store Bots Break at Scale (and How to Fix It)

Telegram is the cheapest storefront on the internet: no app store review, no hosting bill for the storefront itself, and an audience that already lives inside the app. That is why so many sellers in MENA, LATAM, and crypto-first markets run digital stores as Telegram bots. But most of those bots break the moment volume picks up. Here are the failure modes I see over and over, and how to design…

Telegram is an affordable online shop, lacking app store approvals, hosting expenses, and the need to attract users outside the app. Many sellers in regions such as the Middle East and North Africa, Latin America, and crypto-centric markets operate their digital storefronts through Telegram bots. However, these bots often fail once they handle significant traffic. This report outlines common failure patterns and provides strategies to prevent them.

One prevalent issue is storing state in memory rather than a database. A shopping cart, represented as a Python dictionary, vanishes upon deployment. To prevent data loss, it is crucial to record every step of an order in a database before confirming it to the user.

Payment providers retry webhook notifications. Without incorporating an idempotency key for each order, repeated webhooks can result in double-delivering products or marking paid orders as unpaid. To avoid this, store the provider's transaction ID and ignore any duplicates.

The fulfilment process is often intertwined with the bot's operation. If the digital product's delivery occurs within the same process that manages the chat, a slow upload can halt the entire user experience. Implement a queue system for fulfilment, allowing the bot to respond promptly.

A lack of reconciliation is another major issue. Telegram bots may neglect to update orders when webhooks do not arrive, leading to revenue discrepancies. Regular reconciliation jobs that compare the provider's ledger with internal orders can identify and rectify such discrepancies before customers notice.

Finally, Telegram enforces message rate limits per chat. Ignoring these limits by sending a burst of notifications can trigger a bot mute. To prevent this, batch notifications and handle 429 (Too Many Requests) responses by backoff, ensuring a steady and manageable flow of messages.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Custom Web Development vs Templates: A Practical Decision Framework

"Should we build it custom or use a template?" is one of the most common questions in web projects, and it is usually answered with opinions instead of criteria.

  • Templates suitable for brochure sites, blogs, and portfolios
  • Custom development better for complex business logic, integrations, and performance control

A hung test held the only runner allowed to deploy our hotfix

In August a configuration change made our checkout reject one card type, and the fix was a single line. It was merged at twenty past two.

  • Configuration change rejected one card type in August
  • Only self-hosted "deploy" runner could reach cluster API
  • Six-hour default timeout prevented hotfix deployment

Our Tickets Closed Themselves Before the Night Shift Came Back

Our service desk tool closes a ticket automatically when the requester has not replied for three working days. It is the supplier's recommended setting, and for people at head office it works well.

  • Service desk tool automatically closes tickets after three working days without response
  • Night shift supervisor's ticket closed prematurely, requiring new ticket creation
  • Timer now counts requester's shifts instead of calendar days to address issue

Passkey Sign-In for a Small Site Without Storing Emails: The 5 Server Steps

I'm building ClientN, so read this as a founder's walkthrough, not a neutral review. Most small sites keep a users table with an email column only because the login needs one.

  • Server initiates session with POST /api/v1/sessions
  • ClientN provides session id, confirm URL, QR code, match code
  • Server stores pending login with random token in HttpOnly cookie

More from Tuesday 29 September →