A Cloudflare Worker Driven Telegram Bot Designed to Fetch NGA Previews
Send the bot a link of NGABBS, it will reply you with a link preview
Or add the bot to a group, it will reply any message with a vaild NGA link with a link preview
-
Install wrangler or use npx to run wrangler
-
Clone this repo
git clone https://github.com/sakarie9/telegram-nga-preview-worker
-
Add Telegram bot token to cloudflare workers
wrangler secret put TELEGRAM_BOT_TOKEN
copy-paste whole line and wrangler will promot you to input the sercet
-
Get NGA UID and CID
this step is needed if the default guest mode not work
get your nga
ngaPassportUid
andngaPassportCid
from cookiethen
wrangler secret put NGA_UID
and inputngaPassportUid
wrangler secret put NGA_CID
and inputngaPassportCid
-
Deploy
wrangler deploy
-
Active webhook
get the url of the worker in cloudflare dashboard and append
/registerWebhook
to the url. For example:https://telegram-nga-preview.username.workers.dev/registerWebhook
open the url in a browser, you will see a 'Ok'
-
Done
now you can send the bot some link to see if it works