Telegram/Mastodon bot for forwarding messages.
- Create a telegram bot
-
- Recieve telegram's access token
- Create a mastodon bot
-
- Give it the rights to write statuses
-
- Save mastodon's access token
- Add your Telegram bot to the channels you need as admin
- Clone the repo
- Install
Docker
anddocker-compose
- Add a
.env
file with this env vars:MASTODON_TOKEN=Your_Mastodon_access_token
TELEGRAM_TOKEN=Your_Telegram_token
MASTODON_INSTANCE=https://yourinstance.social
MASTODON_VISIBILITY=public
MASTODON_CHARACTER_LIMIT=500
- Run the bot:
docker-compose up --build -d
- Bot will start forwarding posts
- Only reposts plain text(mastodon limitation), images, and videos
- Image galleries are published as separate posts(telebot library limitation)