[Plugin] [Beta] Telegram Bridge 3.3.2

Hey there!

I’m at it once again!

Telegram Bridge 3.3.2

This plugin enables Telegram - TeamSpeak cross communication. At least that’s the plan.
For now only TeamSpeak -> Telegram communcation is possible.

Changes

The plugin was already featured on myTeamSpeak but due to the processing halt I am posting this here!

I have fully 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 -> Adons -> 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

For ease of use and the convenience for beginners I integrated a bot to the plugin so there is no one is forced to create their own. Using the integrated bot will disable the response system though as the bot will be used by multiple instances.
The bot token is neither hardcoded nor at any point in the client 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 send by this bot.
I strongly recommend not using this bot especially if you are concerned about security!

Responses

I felt this was not too intuitive so I will explain this here:
When Responses is enabled the plugin will fetch any bot update every ~ 2 seconds.
(This uses some amount of your bandwidth but really slim - I haven’t tested it - keep in mind while on mobile though)
This updates will be processed and if they contain a response to a message and the original message was send from the bot within the current instance the text will be send to the original person.

Installation

Execute the ts3_plugin file and click install.
When first launching TeamSpeak the configuration file will be created and you should modify it to your wishes. When that’s done you need to simply reload the plugin. To be able to recieve messages from a Telegram Bot you need to initialise the conversation first.

Requirements

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

Contact

If you have any problems , feature requests or questions contact me on Telegram @Gamer92000 .
I’m fluent in both German and English.

Download

The newest version will at least as long as myTeamSpeak is not in use be available here (ver 3.3.2 26.08.2020).
Older versions can be found here: https://julianimhof.de/files/old/

Changelog

26.08.2020 v3.3.2

  • added setting to disable The flood timer when using your own bot (Telegram limits might kick in)
  • fixed URL-encoding for some special characters
  • added update checker

13.06.2020 v3.3.1

  • added an integrated Telegram Bot for ease of use
  • significantly improved performance and reliability
  • fixed theme changing while the config window is open

11.06.2020 v3.3

  • added Menu Item for easier access to the settings
  • significantly improved settings window design when using a custom theme

08.06.2020 v3.2.2

  • changed build tools from v142 to v140_xp

28.03.2020 v3.2.1

  • fixed a bug that crashed TS client on startup if greeting were enabled

25.03.2020 v3.2

  • added responses

10.03.2020 v3.1.1

  • added a setting to ignore own actions

10.03.2020 v3.1

  • some minor bugfixes
  • config layout rework

09.03.2020 v3.0

  • initial release
11 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.

1 Like

@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.

1 Like

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

1 Like

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
twitch instagram twitter facebook