发布作者: 王小艾
百度收录: 正在检测是否收录...
作品采用: 《 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 》许可协议授权
部署此项目并一劳永逸非常简单,您只需要完成几个步骤即可。
使用 Cloudflare Workers 定时脚本实现将 Bing Wallpaper 自动发送到 Telegram 频道中。
您需要有一个 Cloudflare 账号和 Telegram 账号,如果没有则需要先注册,
他们都有免费的服务提供,并且使用也无需绑定银行卡。
登陆您的 Telegram 账号,然后搜索 @BotFather 机器人并添加点击 /start,
这是 Telegram 官方的机器人账户,用于创建和管理用户的机器人。
输入命令 /newbot,开始创建一个机器人,按照提示创建即可,
最后直到看到类似提示信息:
Done! Congratulations on your new bot. You will find it at t.me/123Bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API:
xxxx:xxxxxx
Keep your token secure and store it safely, it can be used by anyone to control your bot.
For a description of the Bot API, see this page: https://core.telegram.org/bots/api
复制 Use this token to access the HTTP API: 那一行下方的字符串,这是您的 Telegram Bot Token。
推荐您使用 Telegram 的频道来存储每日必应壁纸。
直接发送消息给Bot,Bot会返回用户详细信息;
查询频道ID,请转发频道的一条消息给Bot!
10 16 * * *
即可,这代表了会在 UTC+8 时区的每天凌晨0点10分自动执行脚本,
您也可以根据需要来修改表达式,注意 Cloudflare Workers Cron 定时器使用的时区为 UTC 时间。
—— 评论区 ——