The bot replaces regular links with ones that display embed media, so you can watch it directly in Telegram.
I'm not the author of the embed services themselves, the bot just creates a link to them. If you run into a problem with embeds, you can report it to the original author.
@bot_username <post link>
Write this in any chat, you don't need to add the bot to any chat or start chat with it
You don't need to install anything on your PC, and you can run this bot entirely for free.
Fast way if you have a Github account
- Configure secrets in Github project settings:
CLOUDFLARE_ACCOUNT_ID
- secret, found on Cloudflare -> Workers & Pages -> OverviewCLOUDFLARE_API_TOKEN
- secret, createEdit Workers
hereENV_BOT_SECRET
- secret for setWebhook, allowed symbols: A-Z, a-z, 0-9, _ and -ENV_BOT_TOKEN
- secret, you've got this after creating a bot with BotFather
- Adjust
wrangler.toml
according to your needs (for example, link to your own JSON replacement map inENV_LIST_URL
). See here - Paste the Worker address into a browser address bar, add
/registerWebhook
at the end and press Enter- You can find the Worker address if you go to Cloudflare -> Workers & Pages -> media-embedder-bot -> Right click on "Visit" button -> Copy link
- By default, it should look something like
https://media-embedder-bot.<USERNAME>.workers.dev/registerWebhook
- If it says Ok, your bot is ready!
Fast way if you don't want to bother
- Register a new bot with BotFather, set inline mode by
/setinline
- Create Cloudflare Worker "media-embedder-bot" (free plan doesn't require a card)
- Set secrets and variables in worker settings:
ENV_BOT_SECRET
- secret for setWebhook, allowed symbols: A-Z, a-z, 0-9, _ and -ENV_BOT_TOKEN
- secret, you've got this after creating a bot with BotFatherENV_LIST_URL
- text, use this value:https://raw.githubusercontent.com/kerivin/media-embedder-bot/refs/heads/main/list.json
- Press
Edit Code
on your worker page, copy the content ofworker.js
, paste it into the editor and pressDeploy
- Paste the Worker address into a browser address bar, add
/registerWebhook
at the end and press Enter- You can find the Worker address if you go to Cloudflare -> Workers & Pages -> media-embedder-bot -> Right click on "Visit" button -> Copy link
- By default, it should look something like
https://media-embedder-bot.<USERNAME>.workers.dev/registerWebhook
- If it says Ok, your bot is ready!
Manual Github way
- Register a new bot with BotFather, set inline mode by
/setinline
- Create Cloudflare Worker "media-embedder-bot" (free plan doesn't require a card)
- Fork this repo and add secrets in Github project settings:
CLOUDFLARE_ACCOUNT_ID
- secret, found on Cloudflare -> Workers & Pages -> OverviewCLOUDFLARE_API_TOKEN
- secret, createEdit Workers
hereENV_BOT_SECRET
- secret for setWebhook, allowed symbols: A-Z, a-z, 0-9, _ and -ENV_BOT_TOKEN
- secret, you've got this after creating a bot with BotFather
- Adjust
wrangler.toml
according to your needs (for example, link to your own JSON replacement map inENV_LIST_URL
). See here - Deploy (trigger Github Actions, for example by push in
main
branch) - Paste the Worker address into a browser address bar, add
/registerWebhook
at the end and press Enter- You can find the Worker address if you go to Cloudflare -> Workers & Pages -> media-embedder-bot -> Right click on "Visit" button -> Copy link
- By default, it should look something like
https://media-embedder-bot.<USERNAME>.workers.dev/registerWebhook
- If it says Ok, your bot is ready!