我正在尝试创建一个逻辑系统来踢私有超组中的用户名。 但是,当函数运行时,我将返回:
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.
我正在使用以下句柄调用函数:$.kickChatMember(groupid , userid);
谢谢!
答案 0 :(得分:0)
已解决!我的代码是错误的。
使用范围时,它会自动发送聊天ID,因此,我们只需要将用户ID发送为参数:$.kickChatMember(userid);