/telegram-wbcnbot

Telegram bot to generate link preview for Sina Weibo.

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

telegram-wbcnbot

Generate OGP link preview and Instant View for Sina Weibo.

Usage

Inline bot @wbcnbot on Telegram.

input

Preview

Link Preview

Link Preview

Instant View

Instant View

Deploy

Requirements

  • A public server
  • A domain points to the server

Steps

  1. Clone the repo, and install dependencies by npm ci.
  2. Setup necessary environment variables, then run this bot by node idnex.js.
  3. Create a bot following instructions given by @BotFather, and enable Inline Mode for this bot.
  4. Submit this as Instant View template of your domain here, to get your iv_hash

Environment variables

  • WEBHOOK_PATH Optional. Use Webhook instead of long polling for receiving updates. See here for more info.
  • BOT_TOKEN Telegram bot token from @BotFather.
  • IV_RHASH Instant view template hash.
  • DOMAIN Domain for webpage serving.
  • HOST and PORT Host and port to listen. Default to 127.0.0.1:2233.