Skip to content

AI Assistant for WhatsApp, Telegram, Discord: A Builder’s Guide

How to deploy one AI assistant across WhatsApp, Telegram, and Discord - with the real platform gotchas tutorials skip: WhatsApp's July 2025 per-message billing, Telegram's 30 msg/sec wall, and Discord's privileged intents.

9 min readBeginner

Here’s the choice no tutorial bothers to frame clearly: do you build three separate AI bots – one for WhatsApp, one for Telegram, one for Discord – or one bot with three connectors?

Three bots means three codebases, three sets of credentials to rotate, three conversation histories that don’t talk to each other. One bot with platform adapters means a single brain and three mouths. That’s the path this guide takes. The part most tutorials skip isn’t the setup – it’s why each platform breaks differently once you’re live.

Why one AI assistant for WhatsApp, Telegram, and Discord beats three

The architectural pattern is simple: a core LLM call sits in the middle, and each messaging platform plugs in through a thin adapter that normalizes inbound messages and serializes outbound ones. Libraries like python-telegram-bot, discord.py, and the Twilio WhatsApp SDK follow this shape naturally – you end up writing one handler that receives a normalized message object regardless of where it came from.

The payoff isn’t really about code reuse. It’s about state. When a user pings your assistant on Telegram in the morning and follows up on Discord in the afternoon, a unified bot can carry the same memory across both. Three siloed bots cannot. That’s the actual feature.

The hands-on build: three platforms, three traps

Platform order here is easiest to hardest. Skipping ahead is fine if you only need one, but the gotchas compound.

1. Telegram – start here

Open Telegram, search for @BotFather, send /newbot, give it a name, copy the HTTP API token. No verification, no business account, no card on file. Credentials in under two minutes.

The catch shows up the moment you scale. Per Telegram’s official Bot FAQ, bots can’t broadcast more than about 30 messages per second – exceed that and you get HTTP 429 with a retry_after field telling you how long to wait. For bulk sends, there is a paid broadcasts feature (enabled in @BotFather) that raises the ceiling to 1,000 messages per second, but that’s a separate paid add-on.

Three separate sub-limits apply simultaneously:

  • ~1 message/second per individual chat
  • 20 messages/minute per group
  • 30 messages/second global, across your entire bot

One nuance community testing has surfaced – and the official docs don’t spell out explicitly – is that sendMediaGroup (a multi-photo message) appears to decrement your rate quota per asset, not per API call. So a 10-photo album may count as 10 against your global quota, not 1. Treat this as community-reported behavior rather than guaranteed spec, but if your assistant generates image carousels, it’s worth testing before you hit the wall.

2. Discord – the intent trap

Create an application at the Discord Developer Portal, hit the Bot tab, copy the token. Add the bot to a server via OAuth2 with the bot scope. Standard steps.

Then your bot joins the server, you send it a message, and it sees nothing. Empty content field. Every time.

This is the most common pitfall in Discord bot development right now, caused by a 2022 policy change that never went away. MESSAGE_CONTENT is a privileged gateway intent – without it, Discord’s gateway documentation is explicit that your bot only reads message text in DMs, mentions, and its own messages. Everything else arrives with an empty content field and no error.

// discord.js - the minimum intents an AI assistant needs
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
 intents: [
 GatewayIntentBits.Guilds,
 GatewayIntentBits.GuildMessages,
 GatewayIntentBits.MessageContent, // privileged - toggle in Portal too
 GatewayIntentBits.DirectMessages,
 ],
});

You have to enable it in two places: the Developer Portal (Bot tab → Privileged Gateway Intents) and in your client code. Miss either and you debug for an hour.

There’s a second timer running. As of 2025, per Discord’s Message Content Intent Review Policy, apps in fewer than 100 servers can toggle privileged intents freely from the Developer Portal. Cross that threshold and Discord requires verification plus per-intent approval. If your assistant takes off quickly, plan for a paperwork pause before it can keep reading messages.

3. WhatsApp – where the money goes

WhatsApp is the hardest of the three, and it stopped being meaningfully free in mid-2025.

You need a Meta Business account, a verified phone number, and either the WhatsApp Cloud API directly or a Business Solution Provider like Twilio. One important detail: the on-premises API was officially sunsetted on October 23, 2025 – Cloud API is now the only supported path. If a tutorial instructs you to install the on-prem API, close that tab.

Per Meta’s July 2025 pricing change, the platform switched from conversation-based billing (one fee per 24-hour window, regardless of message count) to per-message billing – each delivered template message now costs individually. The 24-hour customer service window is still valuable: non-template replies and utility templates sent inside it remain free. The cheapest WhatsApp AI assistant is one that waits for the user to message first, then operates inside that free window.

Watch out: Every proactive message your bot sends outside the customer service window – notifications, reminders, daily digests – is a billable template. Tutorials show you how to send the message. They don’t show you the invoice the following month.

The pricing math nobody actually shows you

Telegram and Discord are free at the platform layer – you pay only for LLM tokens. WhatsApp is not. Here’s what a marketing template costs in major markets, based on Meta’s 2026 rate card via engagelab:

Recipient country Marketing template (per message) Notes
India ~$0.0094 Cheapest tier-1 market
United Kingdom ~£0.0382 Roughly 5× India
Brazil ~$0.0625 ~7× India
Germany / Netherlands €0.11+ Highest tier globally

Meta rates are applied per recipient country, not your business location – Germany and the Netherlands sit at the top of the pricing tiers. If you route through Twilio as a BSP, their flat $0.005 per-message fee (inbound or outbound) stacks on top of that. Discord caps its gateway at 120 events per connection per 60 seconds (as of 2025) – exceed it and the connection drops immediately, no warning.

Stepping back for a moment: none of these limits are unusual by the standards of production messaging infrastructure. What makes them trip up AI assistants specifically is that LLM latency – a few hundred milliseconds to several seconds per response – means your bot is constantly fighting against timeouts, window closures, and quota resets at the same time the model is still thinking. The rate limits aren’t the hard part. The coordination is.

Production failure modes

Treating Telegram’s 429 as a one-time pause. The escalation pattern, documented in community references, is: first offense triggers roughly a 30-second pause; the next offense jumps to 120 seconds. A 120-second timeout in an authentication flow means a failed login – the token has expired before the user gets the code. If your assistant handles anything time-sensitive, build a proper queue with backoff rather than sleeping on 429.

Sharing a single LLM context across users. Easy to do, hard to debug. Each platform’s adapter must pass a stable per-user ID – Telegram chat_id, Discord user ID, WhatsApp phone number – into your memory layer. Skip this and User A starts seeing fragments of User B’s conversation. The 24-hour window billing issue is covered above in the WhatsApp section; see there for the fix.

When NOT to build this

If your only need is a personal AI chat accessible from your phone, a multi-channel build is overkill. The official ChatGPT or Claude mobile apps serve that better, and they have voice modes the messenger bots don’t.

Small businesses sending fewer than roughly 500 messages a month total will find WhatsApp Business API’s setup overhead – verification, BSP contracts, template approvals – isn’t worth it. A Telegram-only bot or the regular WhatsApp Business app with a human in the loop is the better call.

Regulated use cases are the sharpest edge. The moment you let a model auto-respond on a public channel, you’ve inherited the platform’s data policy. Discord stores messages on its servers. Telegram cloud chats too. WhatsApp Business API’s end-to-end encryption is broken by design for API traffic – the API must read the messages to deliver them to your bot. For medical, legal, or anything regulated, that gap matters before you build anything.

FAQ

Can I really run one AI assistant on all three platforms with the same memory?

Yes – but the memory layer has to live in your app, not the platforms. Store conversation history in your own database keyed by a canonical user ID, and look it up from whichever adapter received the message. The platforms themselves have no shared state.

What’s the cheapest way to deploy across WhatsApp, Telegram, and Discord for a hobby project?

Skip WhatsApp until you actually need it. Telegram + Discord costs nothing at the platform layer – your only bill is LLM tokens. A working setup: a $5/month VPS, OpenRouter or Gemini’s free tier for the model, one Node.js or Python process running both connectors. Add WhatsApp later via Cloud API when a real user base demands it – routing through Twilio while you’re learning keeps surprises manageable at low volume, since that $0.005 flat fee is predictable even if Meta’s template rates aren’t.

My Discord bot can’t see messages even though I set the intent. What’s wrong?

You enabled it in your code but not in the Developer Portal, or vice versa – both are required. Open the portal, go to your application → Bot → Privileged Gateway Intents, toggle MESSAGE CONTENT INTENT on, save, restart your bot. The flag in your Client constructor does nothing if the portal switch is off. Discord silently returns empty content fields rather than throwing an error, which is what makes this so annoying to diagnose.

Next step: Pick the platform with the lowest friction for your use case – Telegram if you’re learning, Discord if you have a community, WhatsApp only if your users insist – spin up the adapter alone, and get one round-trip message working before you add the second platform. Multi-channel only makes sense once single-channel is boring.