Fix a bug in the Telegram bot (PHP)
Hello!
There is a custom Telegram bot in PHP.
There is one file where all the bot's code is located. The bug, or rather the error, is that if the bot was open for the user (the dialogue with it was active and the bot was not blacklisted) for a long time and the user did not use this bot for a long time, then when pressing the bot's menu buttons, the bot duplicates the message with the menu and sends it as a new message. I don't understand why this happens. I was once told that maybe in my code, the exit is not set everywhere...
Relevant today. Need it for today.
-
22 I already have an idea of what the problem is, I'm ready to fix it, there are literally up to 10 lines of code to add at most )
-
9897 67 0 Hello! I will complete your task quickly and efficiently.
My portfolio: https://freelancehunt.com/ua/freelancer/romas6ka.html#portfolio
Write to me, I will start working today. I will be happy to collaborate with you!
-
309 Good day.
I understand that dealing with such bugs is always unpleasant.
The error with the menu duplication upon repeated pressing is often related to the script continuing to execute and sending the message multiple times.
You mentioned exit — yes, often in PHP bots, after sending a response, it is necessary to stop further script execution to avoid repeated actions.
To help more accurately, can we take a look at the code?
Or, if it's difficult to provide the code right now, could you describe how your message processing loop is generally structured and where exactly the menu is sent?
-
646 7 1 Good day. I am ready to fix the project. I have experience, I will complete it very quickly.
-
307 Hello.
I have extensive experience in developing and debugging bots for Telegram in PHP, including working with long sessions and edge cases. Judging by your description, the duplication issue is likely related to the lack of proper exit/return operators or incomplete stream handling in your single-file logic. I will be able to quickly analyze this and fix it. I will carefully refactor the code to ensure correct execution flow, prevent response duplication, and improve support without changing the current functionality of the bot. With my experience in creating and stabilizing user bots, I can offer you a clear and reliable solution.
-
93808 1266 1 10 Hello. I have extensive experience in developing Telegram bots. I am ready to fix the problem.
-
4182 198 2 5 Ready to help figure things out today, write.
Ready to help figure things out today, write.
-
612 8 0 Good day!
I have experience in developing Telegram bots in PHP. Write me a private message, and I will figure out what the problem is.
-
1786 19 0 1 Hello!
We are working on the development of software, websites, automation systems, and more.
We take on projects "from scratch" as well as technical refinements.
We work with a wide stack: WordPress, Opencart, Shopify, WIX, Python, JavaScript, C++, C#, Unity 3D, SQL, MSSQL, WPF, WinForms.
We have practical experience in:
– system and application programming
– business process automation
… – information security
– technical project management
After project delivery — we provide free technical support for 14 days.
We work quickly, clearly, and results-oriented.
We look forward to collaborating!
-
12761 600 0 Hello, feel free to reach out, I will help solve this problem..................
-
656 9 0 Good evening, Yuri!
In general, the task is clear, but for an accurate answer regarding the deadlines and price, I would like to clarify some questions that arose after analyzing your task.
Please write in private messages — we will discuss the details and your wishes.
-
1263 2 1 Hello!
I will be happy to help with editing/improving the current bot code.
Thank you for your response.
-
841 26 4 1 I would like to take a look at the bot's code.
-
601 24 0 Hello, Yuri!
Write to me. I can check your mess right now )
-
1423 46 0 Hello, I am ready to help with the bot. Please write in private messages to discuss the details. I will be happy to collaborate!
-
1267 35 1 Good day. I have written many bots for Telegram. Feel free to contact me, I will study the code, find the error, and fix it.
Current freelance projects in the category Web Programming
Support with Landing Page, subscription store, email collectionHello, I am looking for someone to provide technical support for launching a website: a landing page with a store and a newsletter system. The scope of work includes: creating a landing page / simple website, launching a store with the ability to sell products and subscriptions,… Web Programming ∙ 4 hours 43 minutes back ∙ 36 proposals |
Creation of a plugin for integration with the POS system Syrve, C#Develop a plugin for the Syrve POS system (on-premise), which is installed on the establishment's server. The plugin must: (1) transmit data to our server in real-time — orders, table statuses, payments, receipts; (2) receive commands from Reservble — booking confirmations,… C#, Web Programming ∙ 5 hours 38 minutes back ∙ 9 proposals |
Data on expenses, clicks, and campaigns from Google Ads is not transferred to Google Analytics 4 (in GA4 Ads co
45 USD
Fixing URL routing, redirects, and restoring parameter transmission (GCLID / UTM) in GA4 Context of the problem: Data on expenses, clicks, and campaigns from Google Ads is not being transmitted to Google Analytics 4 (in GA4 Ads cost = 0, conversions in Google Ads = 0).… Web Programming, Contextual Advertising ∙ 8 hours 16 minutes back ∙ 15 proposals |
Development of a single project based on the refinement and integration of 4 scriptsHello. I need to combine 4 scripts from different authors into a single environment. The composition includes a forum, a video portal, an article portal, and a classifieds board. I will provide the scripts. Detailed specifications are in the attached files. Please think about… PHP, Web Programming ∙ 9 hours 1 minute back ∙ 22 proposals |
No applications are coming to TG ocStore (OpenCart)Requests from the online store to Telegram have stopped coming. There are 5 websites hosted on the same server, the version of the engine and modules is the same, but a few weeks ago, requests stopped coming to TG from all sites (the TG bots and groups are different). Requests… Content Management Systems, Web Programming ∙ 9 hours 26 minutes back ∙ 53 proposals |