A
A
ArtZor802021-03-20 20:24:03
Bots
ArtZor80, 2021-03-20 20:24:03

Error in the work of the Telegram bot on php. How to fix?

According to this article, I made a telegram bot https://aftamat4ik.ru/pishem-bota-dlya-telegram-na-php/ everything works, everything is fine. I keep track of the commands for the bot on a regular basis - if there is a match, I either write something to the database or read it.
The bot is added to the group, admin rights are registered, reads messages.

Example:
When you enter the message del 123 , the bot deletes the record with id 123 from the database.

Problem: If you enter the del123 command (the bot does not respond), and then edit it to the correct del 123 , the bot stops responding to queries entered from the group. If you write to him directly - everything works, it turns out that the bot itself is "alive" ... It also "hangs" if a similar action is carried out in a personal message to the bot ...

In order for the bot to work again in the group, I delete the bot (to the botfaser), create a new one, and again direct it to my script...

What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SHADRIN, 2021-03-22
@shadrin_ss

I think you uploaded the bot to the server for free and it breaks there. Try wrapping the error with a del123 request and see what happens.

A
ArtZor80, 2021-03-24
@ArtZor80

The issue is resolved... An error in the code on the page from which I took the example...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question