Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asutorufa/telegram-workers-ai
telegram bot by cloudflare workers AI
https://github.com/asutorufa/telegram-workers-ai
Last synced: 5 days ago
JSON representation
telegram bot by cloudflare workers AI
- Host: GitHub
- URL: https://github.com/asutorufa/telegram-workers-ai
- Owner: Asutorufa
- License: other
- Created: 2024-07-31T13:07:41.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T03:02:01.000Z (3 months ago)
- Last Synced: 2024-10-24T04:49:00.775Z (21 days ago)
- Language: Go
- Size: 630 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
## deploy
need `tinygo`, `npm````shell
cd cmd/ai
npm install
vim wrangler.toml
```create wrangler.toml with
```yaml
name = "tg-workers-ai" # your worker name
main = "./build/worker.mjs"
compatibility_date = "2024-07-31"[build]
command = "make build"[vars]
telegram_token = "telegram_bot_token" # telegram bot token
worker_url = "https://tg-workers-ai.xxxxxx.workers.dev" # your cloudflare worker url
telegram_ids = "10********,293********" # who can access bot, can get by /user_id command, separated by comma[ai]
binding = "AI"
```deploy
```shell
make deploy
```register telegram bot webhook
```shell
curl https://tg-workers-ai.xxxxxx.workers.dev/tgbot/register
```![image](https://raw.githubusercontent.com/Asutorufa/telegram-workers-ai/main/assets/screenshot.png)