Answer the question
In order to leave comments, you need to log in
How to use the restrictChatMember Telegraf.js command?
When using the restriceChatMember command, a 400 error occurs, stating that the specified user id is invalid. In the description of the error in the payload property, as I understand it, the passed parameters are chatId and userId.
And so, the userId is the same as the chat ID (although another one was specified, of course).
I take the chat and user IDs from the context object (Telegraf.js), namely ctx.chat.id and ctx.from.id. and the error keeps popping up. It's definitely not about the rights, since the bot has them. Who faced? maybe I'm using it incorrectly?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question