Management commands

These commands can be used to interact with the bridge and Telegram in ways not supported by native Matrix actions.

Management commands only work if the bridge bot is in the room. This means that private chat portals do not currently support management commands.

If the room you send the command to does not have users other than you and the bridge bot, you do not have to prefix commands, i.e. you can literally write help to get the help message. If the room has more users, you must use the command prefix (!tg by default). For example: !tg help. The command prefix is always allowed even if it's not required.

Generic bridge commands

CommandUsage
helpShow this help message.
cancelCancel an ongoing action (such as login).
versionView the bridge name and version.

Authentication

Commands to authenticate with Telegram.

CommandUsage
login [mxid]Get instructions on how to log in. Admins can use the mxid parameter to log in as another user.
logoutLog out from Telegram.
login-matrixReplace your Telegram account's Matrix ghost with your own Matrix account.
ping-matrixPings the server with the stored matrix authentication.
pingCheck if you're logged into Telegram.
ping-botGet info of the message relay Telegram bot.
username <new username>Change your Telegram username.
session <list|terminate> [hash]View or delete other Telegram sessions.

Creating portals

Commands to make connections to Telegram chats.

CommandUsage
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. type is either group, supergroup or channel. Defaults to group
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. link is a complete t.me invite link, e.g. https://t.me/telegram

Portal management

Commands to manage the Telegram chats linked to portals. These can only be used in portal rooms and will directly affect the Telegram chat linked to the portal.

Most of these commands require some admin privileges in the Telegram chat: The bot will inform you if you do not have sufficient permissions.

CommandUsage
invite-linkGet a Telegram invite link to the current chat.
upgradeUpgrade 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.
delete-portalRemove 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.
unbridgeRemove ghosts from the current portal room and forget the portal.

Portal configuration

Some bridge settings can be set on a per-portal basis. The !tg config command is used for that.

CommandUsage
helpView this help text.
viewView the current config data.
defaultsView the default config values.
set <key> <value>Set a config value.
unset <key>Remove a config value.
add <key> <value>Add a value to an array.
del <key> <value>Remove a value from an array.

Miscellaneous things

CommandUsage
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.
sync-stateFetch Matrix room state to ensure the bridge has up-to-date info.
idGet the ID of the Telegram chat where this room is bridged.
play <play ID>Play a Telegram game.
caption <caption>Set a caption for the next image or file you send.

Administration

Bridge admin commands that do advanced things.

CommandUsage
filter-mode <whitelist|blacklist>Change whether the bridge will allow or disallow bridging rooms by default.
filter <whitelist|blacklist> <chat ID>Allow or disallow bridging a specific chat.
clean-roomsClean up unused portal/management rooms.
set-pl <level> [mxid]Set a temporary power level without affecting Telegram.
clear-db-cache <portal|puppet|user>Clear internal database caches
reload-user [mxid]Reload and reconnect a user