reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
1.01k stars 246 forks source link

BUG: bot sending message many times #276

Open miannoodle01 opened 1 year ago

miannoodle01 commented 1 year ago

Hello! It's me again! I wrote a bot using the api but it turned out to be bugged; The issue is that the bot sending one message rapidly to specific chat ( that i hadn't told the bot to send a message to a chat at all! ). i took screen shot from both admin and user part for you that you can understand my words better, i wrote this bot in purpose of transfer a message from a channel subscriber to the admin of the channel. This is my code which i posted it in my github: https://github.com/yourAnonDH/telegramAdminMessageReceiver

the reason i didn't pasted my code here is that the github didn't marked all of my code AS A CODE so i had to write my github link, my apologies. I will be glad if you help me with this thing out! thanks! i will give you some screenshots below: admin this is admin part which you can see everything is normal. user and this is the user part which the bug appears here, in the link i wrote above ( which is my code of this bot there ), there is no part to command the bot to send users message to him/herself, but the bot doing it in on its own! And of course sending it multiple times!

reo7sp commented 1 year ago

Please try again now with version from commit 36a7f0798728482ddaaaecd5e86b64039d6d1175

miannoodle01 commented 1 year ago

@reo7sp Hello! Okay sure, now that im writing this message its midnight here, will try tomorrow ASAP, thanks for your care!💙

miannoodle01 commented 1 year ago

@reo7sp btw can you please add deep linking feature to bot please?

miannoodle01 commented 1 year ago

@reo7sp I tried the solution you introduced, and it is not working and the same bug is appearing. what i did is i downloaded your latest repo update then built and installed it, the output showed some of codes are updated, then i tried again, i ran the bot on a debian 11 up-to-date vps, the same bug occurred so am posting screenshots of both admin and user side here: admin ( which everything is normal ): Screenshot_2023-06-07_13-46-12 Screenshot_2023-06-07_13-46-36

and the user side where the bug appears: photo_2023-06-07_13-56-30

dmikushin commented 4 days ago

Hi @reo7sp , is there any investigation ever done regarding relation of https://github.com/reo7sp/tgbot-cpp/pull/262 to https://github.com/reo7sp/tgbot-cpp/issues/276 and https://github.com/reo7sp/tgbot-cpp/issues/279 ? I don't see any techncal discussion or even success confirmation after reverting in both tickets. Do you have any further details?

reo7sp commented 4 days ago

@dmikushin, I tried reverting #262 (commit 36a7f0798728482ddaaaecd5e86b64039d6d1175), then @miannoodle01 answered that his error is not because #262, so I reapplied #262 again (commit 782596206764e663b9b45401b447871f21ce62b2)

dmikushin commented 4 days ago

Ah-oh, I see it now, thanks :+1: