This is a new version of MeBridgeBot, rewritten in C#
Make a bridge between VK and Telegram conversations!
Add @MeBridgeBot to your conversations in Telegram and VK, allow them to read your messages (in VK you should make it in conversation settings, you must be Administrator to do this)
To connect chats, enter /token
command in first chat to get a special command with secret key.
Enter this special command in another chat (it looks like /connect $mbb2$1!9d8xxxxx00ca
) and your chats are connected now!
You can run bot by creating docker container:
docker run --name bridge-bot \
-e BOT_VK__ACCESSTOKEN=abcdef \
-e BOT_VK__GROUPID=123456 \
-e BOT_TG__BOTTOKEN="1235467:abcdefg" \
-v ./bridge-bot-data:/data \
maksimkurb/bridge-bot-next:1.0
You can deploy bot to Heroku with 1-click button:
For Linux, make sure you have insalled libfontconfig:
apt-get install -y libfontconfig1
Then, just download latest release, create appsettings.json, configure it and run BridgeBotNext
executable.
You can configure bot via the following environment variables:
Key (notice double underscore) | Sample value | Description |
---|---|---|
BOT_VK__ACCESSTOKEN | abcdefg | Access token of VK bot |
BOT_VK__GROUPID | 1235467 | VK group id |
BOT_TG__BOTTOKEN | 1234567:abcdefg | Access token of Telegram bot |
BOT_AUTH__ENABLED | true | Is bot settings protected with password (prevents 3rd parties from usage of your bot instance) |
BOT_AUTH__PASSWORD | pa$$w0rd | Bot password, if enabled |
BOT_DBPROVIDER | sqlite | Database provider (sqlite/postgres) |
BOT_CONNECTIONSTRINGS_SQLITE | Data Source=./mydatabase.db | Path to the bot database |
BOT_CONNECTIONSTRINGS_POSTGRES | Host=localhost;Database=postgres;Username=postgres;Password=postgres | Connection string for postgres |
You can create appsettings.json
configuration file, place it in the folder with BridgeBotNext:
{
"Vk": {
"AccessToken": "abcdef",
"GroupId": 170046687
},
"Tg": {
"BotToken": "1234567:asdadasdasdasd"
},
"Auth": {
"Enabled": true,
"Password": "pa$$w0rd"
},
"DbProvider": "sqlite",
"ConnectionStrings": {
"sqlite": "Data Source=mydatabase.db",
"postgres": "Host=localhost;Database=postgres;Username=postgres;Password=postgres"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
},
"Console": {
"IncludeScopes": true
}
}
}