[Plugin] [Beta] Telegram Bridge 3.4.1

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

Let’s see.

  1. This is currently pretty simple. The first message wins!

  2. Yes the Telegram Bot are limited by design.

My bot is hitting limits, how do I avoid this?
When sending messages inside a particular chat, avoid sending more than one message per second. We may allow short bursts that go over this limit, but eventually you’ll begin receiving 429 errors.
If you’re sending bulk notifications to multiple users, the API will not allow more than 30 messages per second or so. Consider spreading out notifications over large intervals of 8—12 hours for best results.
Also note that your bot will not be able to send more than 20 messages per minute to the same group.

(I hit those limits quite a lot so I implemented that only one message every 3 seconds will be send.)
If you actually need all messages to be send I will add a queue again that buffers every message and sends them like 1 message a second until the queue is empty again. However I will not make this by default as I personally don’t like receiving messages long after they were actually send to me.

  1. I think the char limit is pretty big atm. I’ll see if I can increase it to the maximum chat limit.

  2. Not quite sure what you mean with this.

1 Like

All groups got negative IDs.
Users got positive IDs.
Both work just fine!

1 Like