Telegram Bridge Bot

Last Updated: Sun Dec 24 2023


The Telegram Bridge allows you to log in to your Telegram with your Matrix Account, bridging all your chats. Once this link is established, group discussions and your most recent conversations will appear on your matrix account.

Warning: If you leave a group discussion that is bridged through your Telegram, it will remove you from it on Telegram as well.

How To Setup Bridge

  • Start a direct message with @telegrambot:cyberfurz.chat
  • Send the message “login” to the bot
  • Login to your Telegram
  • Give the bridge a few minutes to sync your latest conversations, and keep in mind that any conversations not synced right away will sync the next time something is said.

Help Docs

General

  • cancel - Cancel an ongoing action.
  • version - Get the bridge version.
  • help - Show this help message.

Authentication

  • login-matrix - Replace your Telegram account’s Matrix puppet with your own Matrix account.
  • logout-matrix - Disable double puppeting.
  • ping-matrix - Pings the Matrix server with the double puppet.
  • clear-cache-matrix - Clear the Matrix sync token stored for your double puppet.
  • username <new username> - Change your Telegram username.
  • about <new about> - Change your Telegram about section.
  • displayname <new displayname> - Change your Telegram displayname.
  • session <list|terminate> [hash] - View or delete other Telegram sessions.
  • ping - Check if you’re logged into Telegram.
  • ping-bot - Get the info of the message relay Telegram bot.
  • login-qr - Log in by scanning a QR code.
  • login - Get instructions on how to log in.
  • logout - Log out from Telegram.

Creating portals

  • bridge [id] - Bridge the current Matrix room to the Telegram chat with the given ID. The ID must be the prefixed version that you get with the /id command of the Telegram-side bot.
  • create [type] - Create a Telegram chat of the given type for the current Matrix room. The type is either group, supergroup or channel (defaults to supergroup).
  • pm <username> - Open a private chat with the given Telegram user. You can also use a phone number instead of username, but you must have the number in your Telegram contacts for that to work.
  • join <link> - Join a chat with an invite link.

Portal management

  • delete-portal - Remove all users from the current portal room and forget the portal. Only works for group chats; to delete a private chat portal, simply leave the room.
  • unbridge - Remove puppets from the current portal room and forget the portal.
  • config <help|subcommand> [...] - View or change per-portal settings.
  • invite-link [--uses=<amount>] [--expire=<time delta, e.g. 1d>] [--request-needed] -- [title] - Get a Telegram invite link to the current chat.
  • list-invite-links [creator] - List existing Telegram invite links to the current chat.
  • upgrade - Upgrade a normal Telegram group to a supergroup.
  • group-name <name|-> - Change the username of a supergroup/channel. To disable, use a dash (-) as the name.
  • backfill [limit] - Backfill messages from Telegram history.

Miscellaneous

  • sync-state - Fetch Matrix room state to ensure the bridge has up-to-date info.
  • id - Get the ID of the Telegram chat where this room is bridged.
  • caption <caption> - Set a caption for the next image you send
  • search [-r|--remote] <query> - Search your contacts or the Telegram servers for users.
  • sync [chats|contacts|me] - Synchronize your chat portals, contacts and/or own info.
  • play <play ID> - Play a Telegram game.
  • vote <poll ID> <choice number> - Vote in a Telegram poll.
  • random <emoji> - Roll a dice (🎲), kick a football (⚽️) or throw a dart (🎯) or basketball (🏀) on the Telegram servers.