Telegram feed bots for Bitsocial clients. Each bot monitors a specific client's community list and forwards new posts to Telegram channels/groups.
Monitors all 5chan directories (boards) from 5chan-directories.json and posts new content to Telegram. Each post includes buttons to view it on 5chan and Seedit.
Will monitor Seedit communities and post new content to Telegram.
-
Clone the repository:
git clone https://github.com/bitsocialhq/bitsocial-telegram-bots.git cd bitsocial-telegram-bots -
Install dependencies:
yarn install
-
Create a
.envfile in the root directory:# Required: Telegram Bot Token from @BotFather BOT_TOKEN=your_telegram_bot_token_here # Which bot to run (defaults to 5chan-feed) BOT_NAME=5chan-feed # Required: At least one destination must be set FEED_BOT_CHAT=-1001234567890 FEED_BOT_GROUP=-1001234567891
-
Start the bot:
yarn start
Or run a specific bot:
yarn start:5chan-feed
| Variable | Required | Description |
|---|---|---|
BOT_TOKEN |
Yes | Telegram bot token from @BotFather |
BOT_NAME |
No | Which bot config to use (default: 5chan-feed) |
FEED_BOT_CHAT |
Yes* | Primary Telegram chat/channel ID |
FEED_BOT_GROUP |
No | Secondary Telegram group ID |
* At least one of FEED_BOT_CHAT or FEED_BOT_GROUP must be set.
- The bot fetches the community list for the configured client (e.g.
5chan-directories.jsonfor 5chan) - It cycles through each community, checking for new posts via Plebbit
- New posts are formatted and sent to the configured Telegram destinations with inline buttons linking back to the client
- Processed post CIDs are tracked in
history.jsonto avoid duplicates - Cycles repeat every 30 seconds
To add a bot for a different Bitsocial client:
- Add a new config in
src/bot-configs.tswith the client's list URL, community parser, and URL templates - Add a corresponding
start:script inpackage.json - Deploy with a separate
.envpointing to a differentBOT_TOKENandBOT_NAME
GPL-2.0