user1man / telegram-mastodon-bridge

Forward messages from telegram channels to mastodon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telebridge

demonstration

Telegram/Mastodon bot for forwarding messages.

Usage

  • 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 and docker-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

Limitations

  • Only reposts plain text(mastodon limitation), images, and videos
  • Image galleries are published as separate posts(telebot library limitation)

References

About

Forward messages from telegram channels to mastodon

License:MIT License


Languages

Language:Python 91.4%Language:Dockerfile 8.6%