Public
Telegram inline bot that generates memes via api.memegen.link
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.

🤖 Telegram Meme Bot

Inline Telegram bot that generates memes from user text via api.memegen.link.

How it works

  1. User types @GPTsuper_coolBot hello | world in any Telegram chat
  2. The bot generates meme images for 20 popular templates using the memegen.link API
  3. User picks a result and the meme is sent to the chat

Usage formats

FormatExampleResult
top text@bot helloTop line only, 20 templates
top | bottom@bot hello | worldBoth lines, 20 templates
template | top | bottom@bot drake | hello | worldSpecific template only

Setup

  1. Create a bot via @BotFather and get the token
  2. Enable inline mode: send /setinline to @BotFather and set a placeholder
  3. Set the TG_TOKEN env var

👉 Add TG_TOKEN here: https://www.val.town/x/as9851605752/telegram-meme-bot/environment-variables?key=TG_TOKEN

  1. Visit the val's HTTP endpoint once to auto-register the webhook
  2. Test by typing @GPTsuper_coolBot hello | world in any chat

Files

  • index.ts — HTTP webhook handler (grammY bot with inline query support)
  • meme.ts — memegen.link URL helpers, text encoding, and template list

Tech