Crate telecord [] [src]

Telecord: A bot to link Discord channels to Telegram Channels

Telecord currently sends text messages between Telegram and Discord, and media messages from Telegram to Discord. Media messages from Discord to Telegram are in the works, but are currently blocked on issue#11 for the Telebot crate

In order to run this crate, a few environment variables must be set - DISCORD_BOT_TOKEN must contain the token for your discord bot - TELEGRAM_BOT_TOKEN must contain the token for your telegram bot - CHAT_MAPPINGS must be a comma-separated list of colon-separated tuples. What this means is for each discord channel and telegram chat you wish to connect, you must specify the telegram chat's ID and the discord channel's ID in the following format: telegram_chat_id:discord_channel_id. You can have as many connected chats and channels as you would like by adding more to the mapping: tg_id:dc_id,tg_id2:dc_id2,tg_id3,dc_id3.

Once your environment variables are set, you can run the crate with cargo run

This is the library for Telebot.

It may not be incredibly useful outside the context of the associated main.rs

Modules

dc

This module contains types and functions related to Discord and Serenity

tg

This module contains types and functions related to Telegram and Telebot

Structs

Config

The Config type contains four values, the Discord Bot's Token, the Telegram Bot's token, a HashMap for quickly getting a Telegram Chat ID from a Discord Channel ID, and a HashMap for quickly getting a Discord Channel ID from a Telegram Chat ID.