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.
Inline Telegram bot that generates memes from user text via api.memegen.link.
- User types
@GPTsuper_coolBot hello | worldin any Telegram chat - The bot generates meme images for 20 popular templates using the memegen.link API
- User picks a result and the meme is sent to the chat
| Format | Example | Result |
|---|---|---|
top text | @bot hello | Top line only, 20 templates |
top | bottom | @bot hello | world | Both lines, 20 templates |
template | top | bottom | @bot drake | hello | world | Specific template only |
- Create a bot via @BotFather and get the token
- Enable inline mode: send
/setinlineto @BotFather and set a placeholder - Set the
TG_TOKENenv var
👉 Add TG_TOKEN here: https://www.val.town/x/as9851605752/telegram-meme-bot/environment-variables?key=TG_TOKEN
- Visit the val's HTTP endpoint once to auto-register the webhook
- Test by typing
@GPTsuper_coolBot hello | worldin any chat
index.ts— HTTP webhook handler (grammY bot with inline query support)meme.ts— memegen.link URL helpers, text encoding, and template list
- grammY — Telegram bot framework
- api.memegen.link — meme image generation API