Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/my-telegram-bots/hitokoto_bot
A Telegram bot hosted in cloudflare workers
https://github.com/my-telegram-bots/hitokoto_bot
cloudflare telegram-bot workers
Last synced: 18 days ago
JSON representation
A Telegram bot hosted in cloudflare workers
- Host: GitHub
- URL: https://github.com/my-telegram-bots/hitokoto_bot
- Owner: my-telegram-bots
- License: mit
- Created: 2020-07-12T09:45:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-27T14:06:13.000Z (over 3 years ago)
- Last Synced: 2024-08-01T00:46:25.552Z (3 months ago)
- Topics: cloudflare, telegram-bot, workers
- Language: JavaScript
- Homepage: https://t.me/hitokoto_bot
- Size: 236 KB
- Stars: 39
- Watchers: 1
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
important alert: Cloudflare workers free plan only run script 10ms, So only simple message handling functions can be done.
# hitokoto_bot (cloudflare workers version)
This bot is an attempt to run on cloudflare workers, you can edit the function handlemessage and handleinline to easily create your own bot.
You can use `starter.js` to create the bot you own quickly.![demo](/img/demo-1.jpeg)
# Tutorial
1. Go to ask t.me/botfather that he can tell you some infomation about your bot(token)
2. Create a worker in cloudflare and paste hitokoto_bot.js
3. Use the information above to edit the first 3 lines
4. set your bot's webhook (browser or curl)
curl https://api.telegram.org/bot[token]/setwebhook?url=[workersurl]
workersurl: ![webhook_url.jpg](/img/webhook_url.jpg)
5. Enjoy yourself and do some magic edit to build you own bot ~
If you still have problems you can create a issue, I can help you.# Docments
1. [Cloudflare workers](https://developers.cloudflare.com/workers/)
2. [Telegram bots](https://core.telegram.org/bots/api)# Thanks
1. hitokoto local data https://github.com/kokororin/hitokoto
2. seed-shuffle https://github.com/yixizhang/seed-shuffle/
3. cloudflare
## License
MIT
## Made with ♥