0

I'm trying to create a logic system to kick a username from a private supergroup. But, when function is running I'm returning:

Api error: Body: {
  ok: false,
  error_code: 400,
  description: 'Bad Request: wrong user_id specified'
}


(node:11272) UnhandledPromiseRejectionWarning: #<TelegramApiError>
(node:11272) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11272) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

I'm calling the function inside a handle with: $.kickChatMember(groupid , userid); Thank you!

1 Answers1

1

It's solved! My code was wrong. When we use an scope, it sends automatically the id of chat, so, we just need to send userid as parametre: $.kickChatMember(userid);