M
M
Maxim Yumikov2021-04-20 20:47:58
In contact with
Maxim Yumikov, 2021-04-20 20:47:58

How to track the messages of the user and another chatbot to display the id and there was no error [113] Invalid User id?

I'm trying to add a new user to the database (yes, I have a shared database) and when the chatbot writes, I get the error "[113] Invalid User id". I just returned to this area because I lost interest, so I ask me to chew everything in more detail (I will re-read the literature if anything). And I also want to be able to track the messages of chat bots / users in order to enter them into the database (don't ask why)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Antonov, 2021-05-03
@xtonypythonx

Check if it's an id from a group or not in this way:

if event.user_id > 0:
*запись в бд*

User IDs are greater than zero. Therefore, it will not respond to groups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question