强制订阅通道以使用bot [aiogram]

发布于 2025-02-03 00:54:19 字数 76 浏览 3 评论 0原文

我有一个简单的聊天机器人,其中包含用于接收用户消息并回答他们的aigraph。我想确保用户在使用我的机器人之前订阅特定频道。我该如何实施?

I have a simple chat-bot writed with aiogram for receiving messages from users and answering to them. I want to make sure that user is subscribed to a particular channel before he can use my bot. How can I implement that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

白龙吟 2025-02-10 00:54:19

使用 getchatmember 方法,然后检查状态>状态> < a href =“ https://core.telegram.org/bots/api#chatmember” rel =“ nofollow noreferrer”> chatmember

Use getChatMember method and then check status field of the ChatMember

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文