如何使用node.js node-telegram-bot-api订阅和订阅用户订阅用户?
我正在编写一个程序来使用node.js和node-telegram-bot-api模块开发电报聊天机器人。我想设置命令,以便在接收 /取消订阅后,应从机器人中取消订阅。我阅读了该模块的GitHub文档,但找不到实现此目的的方法。 https://github.com/yagop/ Node-Telegram-bot-api/blob/master/doc/api.md
在此DOC中,有一个方法DeleteChat可用,但是我不确定它是否可以与模块一起使用。 https://core..telegram.telegram.telegram.telegram.org/methods#working-working-working-working-working-working-working-working-workssssssssssssupergroupsschannels
感谢任何建议或帮助,谢谢!
I'm writing a program to develop a telegram chatbot using Node.js and node-telegram-bot-api module. I want to set command such that when received /unsubscribe the user should be unsubscribed from the bot. I read the github document for the module but couldn't find a method to achieve this.
https://github.com/yagop/node-telegram-bot-api/blob/master/doc/api.md
In this doc, there's a method deleteChat available, but I'm not sure it will work with the module.
https://core.telegram.org/methods#working-with-chatssupergroupschannels
Any advice or help is appreciated, Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要一个数据库将用户设置为“订阅”或“未取消”
。软件包/存储“ rel =“ nofollow noreferrer”>商店软件包
您将需要以下包:
下面给出的代码时,可能会重置您的想法,它只能创建订阅和退出的功能,您可以使用循环方法将新闻发送给“数组”中的用户
You'd need a database to set user as 'subscribed' or 'unsubscribed' for that.
I'll give you an example with store package
You'll need the following packages:
The code given below may give you an idea, it just enables you to create the functionality of Subscribe and Unsubscribe, you may use loop methods to send news to users in 'array'