gpt4 book ai didi

javascript - Node.js Telegram 机器人无法将用户从 super 组中踢出

转载 作者:行者123 更新时间:2023-12-02 22:28:30 24 4
gpt4 key购买 nike

我正在尝试创建一个逻辑系统来从私有(private) super 组中踢出用户名。但是,当函数运行时我返回:

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);
谢谢!

最佳答案

已经解决了!我的代码是错误的。当我们使用作用域时,它会自动发送聊天的 id,因此,我们只需发送 userid 作为参数即可: $.kickChatMember(userid);

关于javascript - Node.js Telegram 机器人无法将用户从 super 组中踢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58987795/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com