https://github.com/tehgm/telecord
A simple .NET 5 bot for bridging messages between Telegram and Discord
https://github.com/tehgm/telecord
bridge discord discord-bot discord-net relay telegram telegram-bot
Last synced: about 2 months ago
JSON representation
A simple .NET 5 bot for bridging messages between Telegram and Discord
- Host: GitHub
- URL: https://github.com/tehgm/telecord
- Owner: TehGM
- License: agpl-3.0
- Created: 2021-04-18T08:58:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T09:08:11.000Z (about 5 years ago)
- Last Synced: 2025-02-12T19:45:46.573Z (over 1 year ago)
- Topics: bridge, discord, discord-bot, discord-net, relay, telegram, telegram-bot
- Language: C#
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Telecord - a Telegram and Discord bridge bot
[](https://github.com/TehGM/Telecord) [](LICENSE) [](https://github.com/TehGM/Telecord/actions) [](https://github.com/TehGM/Telecord/issues)
A simple and configurable .NET 5 bot for bridging messages between Telegram and Discord channels.
## Configuration
### Tokens
The bot needs bot tokens for both Discord and Telegram. You can create them on [Discord Developer Portal](https://discord.com/developers/applications) and by messaging `@BotFather` on Telegram.
One tokens are generated, insert them into a new `appsecrets.json` file (recommended) or existing [`appsettings.json`](Telecord/appsettings.json) (insecure). The example appsecrets file can be seen here: [appsecrets-example.json](Telecord/appsecrets-example.json).
### Telegram privacy mode
You need to contact `@BotFather` to disable privacy mode for your bot if you want to bridge messages from Telegram to Discord.
### Bridge Links
You need to configure your bridge links. Bridge configurations are JSON objects inside `Links` array inside of `Bridges` category. See [appsettings.json](Telecord/appsettings.json) for example.
`DiscordChannelID` and `TelegramChannelID` are mandatory, and represent Discord Channel ID, and Telegram Chat ID respectively.
`Direction` sets what direction the link will function. `ToTelegram` bridges Discord -> Telegram, `ToDiscord` bridges Telegram -> Discord, and `Bidirectional` bridges both ways. This value is optional - if not provided, will default to `Bidirectional`.
### Logging
This bot uses [Serilog](https://serilog.net/) library to do logging, along with [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) for configuration with [appsettings.json](Telecord/appsettings.json) file.
## Usage
### Requirements
An installed [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0) is required for building. Running requires Runtime, which is also included in SDK.
### Building
Run `dotnet build` and `dotnet publish` commands in the repository root folder.
### Running
Once compiled and published, run using `dotnet Telecord.dll` command in the published files folder.
## License
Copyright (c) 2021 TehGM
Licensed under [GNU Affero General Public License v3.0](LICENSE) (GNU AGPL-3.0).