[英]How to make a Telegram bot send messages daily? - Node.js
I'm new to JS and I would like to ask for some help.我是 JS 新手,我想寻求帮助。 I'm developing a bot that sends some content daily once a user has it enabled.
我正在开发一个机器人,一旦用户启用它,它就会每天发送一些内容。 I'm using Telegraf library.
我正在使用 Telegraf 库。
Could you please help me on how I can create something like this or maybe share some links or samples?您能否帮助我了解如何创建这样的东西,或者分享一些链接或示例?
Is it possible with setInterval scheduling?是否可以使用 setInterval 调度?
Maybe there are some node plugins that allow this feature?也许有一些节点插件允许这个功能?
Thank you in advance!先感谢您!
Create bot创建机器人
https://medium.com/swlh/build-own-telegram-bot-with-node-js-516b8f233585 https://medium.com/swlh/build-own-telegram-bot-with-node-js-516b8f233585
for the daily message, you can use the Cron package对于每日消息,您可以使用 Cron 包
https://www.npmjs.com/package/cron https://www.npmjs.com/package/cron
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.