[Plugin] [Beta] Telegram Bridge 3.4.1

Telegram Bridge 3.4.1

This plugin enables Telegram - TeamSpeak cross-communication. It redirects messages from TeamSpeak to Telegram and allows to send responses from Telegram to TeamSpeak.

:warning: Warning :warning:

Since Version 3.4 the targeted Qt version is 5.15.2. This means that the plugin may not work with versions of TeamSpeak older than 3.6.0!

Changes

The plugin was already featured on myTeamSpeak but I am posting this here due to the processing halt! I have entirely redesigned the backend and switched from boost to QT! This also means the config is now accessible via the GUI. No need to access any files anymore!

image

Configuration

The configuration is pretty straightforward.
Just go to Plugins -> Telegram Bridge -> Settings or alternatively Tools -> Options -> Addons -> Plugins -> Telegram Bridge -> Settings.
The first column of tick boxes is used to generally dis/enable events.
The other columns are used to subscribe under different conditions.
Only one of the selected conditions must be met in order to receive a message.

The integrated BOT

:warning: Warning :warning:

The integrated bot will be removed in future versions!

For ease of use and convenience for beginners I integrated a bot into the plugin so there is no one is forced to create their own. Using the integrated bot will disable the response system though as multiple instances will use the bot. The bot token is neither hardcoded nor at any point in the client’s memory. If you want to use this feature all requests are routed through my server that holds the bot token. This also means that I can technically access the logs that will include any encoded but not encrypted text and the chat ID sent by this bot.
I strongly recommend not using this bot especially if you are concerned about security!

Responses

I still think this is not really intuitive so I will explain it here:
When Responses is enabled the plugin will fetch all messages sent to the bot roughly every 2 seconds. This of course has some bandwidth usage, but should be negligible - I haven’t tested it though. So keep this in mind while using mobile data! All messages will be processed and if they contain a response and the original message was sent from the bot within the current instance the text will be sent to the original person.

Installation

Execute the ts3_plugin file and click install.
Before you can use this plugin you need to configure it. For more information see below.


More Instructions

Installation

2r1HXhZDh4

Settings

Tooltips

W65RkWu5GX

Replies


Requirements

For now, the plugin only works with Windows 32bit and 64bit!

Contact

If you have any problems, feature requests or questions feel free to open an issue on GitHub or contact me on Telegram: @Gamer92000
I’m fluent in both German and English.

Download

While no updates are processed on myTeamSpeak, you can download the latest version on GitHub.
Older versions can be found here: Releases · Gamer92000/TeamSpeak-3-Telegram-Bridge · GitHub
While some even older versions are currently archived here: Index of /files/old/

Changelog

Latest version: 3.4.1

🐛 Fix displayed update download URL
✨ Add minimal BBCode support
♻️ Rework Telegram message template

View the full changelog on GitHub.

15 Likes

Heyo,
I really like that bot.
The text is just not displayed completely and the window can’t be dragged largerScreenshot_15

3 Likes

Thanks for reporting!
This should theoretically not happen as font size and pixel size are fixed, but I guess skins can break it.
I’ll look into this!

Update (including 32 bit support) coming later today.

2 Likes

@enno123 Could you tell me which Theme you are using?

I use this

2 Likes

This problem is indeed highlighted by skins that alter the font size. However, it’s not caused by it.

Default skin

1cf334087ccf6d650e4f5cefde7f190d33565249

I dabbled around in QT Creator (unsuccessfully) a couple of years ago, to find out what exactly the problem with add ons is, because TeamSpeak itself scales everything very nicely, no matter what you throw at it, while plugins do not (at least I haven’t found one yet).

Scaling (compare TeamSpeak 'Connect' to Telegram Bridge 'OK' (font-size 100px)

There are one or two cases where I manually added addon configurations into my files, but this is not ideal. There must be a settings that allows a scaling of sorts.


Any way, that’s to the styling problem. I have three suggestions for your addon.

  • Make the settings menu accessible via the “Plugins” menu in the menu bar.
  • The links in the tooltips are not clickable, because the tooltips close too fast. Add maybe a “Help” or “About” button to the interface.
  • The link colour will be editable via QPalette::Link by style creators with the next TeamSpeak client release. It would be nice if you could make use of this.

Edit: You should be able to update your myTS addon: Regarding the hosting of addons

3 Likes

Thanks!

I’ve just redesigned the whole QDialog stuff. It still is by all means not perfect but should handle a lot better now!
The first problem even with the default skin was a compiler mistake on my end…
Not shure if 100px fonts now scale correct but tbh who tf changes font size so much
Regarding the other stuff you said:

  • Not planned for now - might add later
  • yes! you are so right! I planned to include fully functional tooltips in the initial release but couln’t get it to work for now. This will follow eventually. For now this has no priority though.
  • No idea what exactly you are talking about…

Ok, so I will submit the new versions on myTS so you can handle this thread as the beta releases. Once the new version get’s approved I will link it as release version in the initial post. for now I will leave this as is because I really don’t want anyone to download the old release as it is so bad and often even crashes the client. - I have no idea how this even got approved.

2 Likes

Ok, I just submitted!
image
Let’s see what the staff thinks!

2 Likes

Perfectly perfect not, but it works very nicely now. 100px was indeed just an extreme example. Thanks!

The default blue link colour is badly readable on darker background. That’s why the new client will add the option for theme creators to change the link colour. It doesn’t really matter too much in your case, it just affects 4 links in tooltips.

""

455_WBC0tGRcHAmeg0jJ6qku 456_Gg1KTXXIae0ElmP2w0Xu

Not very important, but for the sake of if: Idiscovered 4 slips of the pen in the Notification matrix tooltip.
coumn → column
metter → matter
disables → disabled
comapred → compared

2 Likes

Thanks! Fixed it - will be part of next version.

This should happen even without any work on my end I guess. Just like any theme element.

1 Like

Bug?:
When I send a message to someone I also get a message in telegram. I guess that shouldn’t happen

1 Like

Thanks, fixed in new version.
(There is a new setting now)

1 Like

Heyo,

In the telegram message the BB Code Tags are displayed

as an example:
XY need support

It is not a real Bug but it looks not so nice

Currently I am using Telegram html encoding and every text gets put in a <pre> block.
I’m not really sure whether I wanna change this in the future.
Maybe I’ll add an option to format the text how you want it.

1 Like

New version now available:
I added a response system (back). This was part of the old boost system.
However I didn’t really like it ever.
So now with the new system you can answer to any message that was send from the current instance.
Disabling it in the settings will only save bandwidth and very little ram. The thread will still be running but not actually do anything.

If you encounter any problem, please let me know. (crashdumps are always helpful).
If the client crashed without even telling you that it crashed the plugin probably created a stack overflow. I hope it should never happen in the new version - I cannot give any guarantee though.

I fully tested it over the course of this afternoon and everything worked just fine!

Download in the original post

1 Like

crashes with latest version
3.5.1

https://anonfiles.com/d3l7g9k1o7/ts3dump_1585404109994_telegramapi_with_3.5.1_zip

it crashes after first time we apply values and restart teamspeak

plugin is working fine
i get message in telegram but crashes after first restart

1 Like

Ok
I’ll look into it right now!
By now I found the error is occurring within the sendGreetings function.
I simply forgot to test it in the current release - my bad!
For now disabling greeting in the settings file should make it work again.
Your settings file should be located here:
C:\Users\cptma\AppData\Roaming\TS3Client\TelegramBridge.ini

Fix coming later today!

1 Like

Ok, I got it.
New version 3.2.1 with this fix is released now!
As always download in original post.

Just a quick tip for all fellow cpp devs: do NOT do this: std::string(0)!

1 Like

thanks, @Gamer92000
it works fine now
but I have some questions

  1. how does the bot prioritize the messages ( say 2-3 people message you at once, usually happens in TeamSpeak server with lots of bots ) so which one is chosen first.

  2. I have noticed that sometimes some messages are not shown back by telegram bot.
    maybe its because how fast they come and bot can’t react to that.

  3. if in a message, a big paragraph is used then it will skip that message
    I think it because the passing variable you using could be small maybe?

  4. what kind of logic you use over who will ger prioritize first in any sort of activity in the server .
    Does it do first come first on the server sort of thing? or is it the one which was actually readable by the bot ( readable as in how fast the bot captured the message and sends back )

1 Like

also for people who dont know how to get bot api token and chat id

for bot token api
go to @botfather and type /token
the token will be something like this 1212121:ASOUSADHAS23912

for chat id
add @rawdatabot to your group and type something then the bot will message a block
check for this json syntax value

Telegram Bot Raw, [28.03.20 19:20]
{
“update_id”: 123123123,
“message”: {
“message_id”: 12313123,
“from”: {
“id”: :123123123,
“is_bot”: false,
“first_name”: “xxxx”,
“username”: “xcxx”
},
“chat”: {
“id”: "THIS IS YOUR CHAT ID ",
“title”: “XXXXXX”,
“type”: “group”,
“all_members_are_administrators”: true
},
“date”: 12321321312,
“text”: “HI”
}
}

so look here -->

“chat”: {
“id”: "THIS IS YOUR CHAT ID ",

it could start from -ve value also so make sure to add that minus sign also.
good luck

2 Likes