Updated Section Telegram (basic) (markdown)

Mark Glasgow 2022-03-18 13:11:11 +00:00
parent 801257b675
commit d526faf712

@ -8,28 +8,6 @@ MessageFormat="HTMLNick"
IgnoreMessages="^/" #Ignore bot command spam
```
Here is an example gateway bridging `Discord`<>`Telegram`
```toml
[[gateway]]
name="YourUniqueGateWayName"
enable=true
[[gateway.inout]]
account="telegram.mytelegram"
channel="-100xxx"
[[gateway.inout]]
account="discord.mydiscord"
channel="channel-name"
```
The easiest way to retrieve your channel id is to navigate to https://web.telegram.org/ and simply copy the numbers at the end of the hyperlink into the `xxx` position in the example snippet above.
To add more nodes to this bridge, you simply need to add additional `[[gateway.inout]]` fields.
## Retrieving your chat number from Matterbridge
### Setup
Matterbridge can output your chat number as debug information. Here's how.
@ -75,3 +53,70 @@ Matterbridge can output your chat number as debug information. Here's how.
(copied from [this stack overflow answer](https://stackoverflow.com/a/45441585))
## Tutorial
This basic example will guide you through getting started on your first Telegram bridge.
### 1. Speak to the BotFather.
Message the [BotFather](https://t.me/BotFather) bot and run the `/newbot` command to get started. Once you pick a name it will provide you with a `token` used to access the HTTP API.
**Set Privacy:**
> **You**: /setprivacy
>
> **BotFather**: Choose a bot to change group messages settings.
>
> **You**: @your_name_bot
>
> **BotFather**: 'Enable' - your bot will only receive messages that either start with the '/' symbol or mention the bot by username.
>
> - 'Disable' - your bot will receive all messages that people send to groups.
> - Current status is: ENABLED
>
> **You**: Disable
>
> **BotFather**: Success! The new status is: DISABLED. /help
### 2. Add your config
Here is an example gateway bridging `Discord`<>`Telegram`
```toml
# /
# SERVERS
# /
[telegram]
[telegram.mytelegram]
Token="token"
RemoteNickFormat="<{NICK}> " # How your message will be bridged.
MessageFormat="HTMLNick :"
QuoteFormat="{MESSAGE} (re @{QUOTENICK}: {QUOTEMESSAGE})"
QuoteLengthLimit=46 # Truncuate long quotes to prevent spammy bridged messages
IgnoreMessages="^/" # Don't bridge bot commands (as the responses will not be bridged)
# /
# GATEWAYS
# /
[[gateway]]
name="YourUniqueGateWayName"
enable=true
[[gateway.inout]]
account="telegram.mytelegram"
channel="-100xxx"
[[gateway.inout]]
account="discord.mydiscord"
channel="channel-name"
```
The easiest way to retrieve your channel id is to navigate to https://web.telegram.org/ and simply copy the numbers at the end of the hyperlink into the `xxx` position in the example snippet above.
To add more nodes to this bridge, you simply need to add additional `[[gateway.inout]]` fields.
Make sure to test your config with the `-debug` flag after each change.