-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telegram群聊无法触发 #787
Comments
我这里没有问题,建议检查下是不是在 BotFather 禁止了接收群消息。 |
已解决,将拉进群的bot设置为admin |
这很正常,你可以设置额度。 |
tg的bot是可以通过代码实现授权的 |
要让您的 Telegram 机器人只与已授权用户聊天,您可以通过添加一些逻辑来实现此功能。下面是一些实现该功能的可能方法:
您可以维护一个包含所有已授权用户 ID 的白名单,并在机器人收到消息时检查发送者是否在白名单中。如果发送者不在白名单中,则可以向其发送一条消息,告知他们没有权限发送消息。 以下是一个示例代码片段,演示如何使用白名单来授权用户:
您可以实现一个认证流程,使未经授权的用户无法与机器人交互。例如,您可以编写一个 以下是一个示例代码片段,演示如何使用认证流程来授权用户:
在此示例中,我们实现了一个 请注意,在此示例中,我们使用了 Telegram 的 Inline Keyboard Markup 来处理授权页面回调。您可以根据需要使用其他方法来实现此功能。 |
你可以修改 platforms/telegram_bot.py 来实现此功能。 |
群组拉入bot,@机器人以后发送消息并没有任何回复,私聊没有问题。
不知道是不是没有支持tg的群组功能
The text was updated successfully, but these errors were encountered: