Skip to content

Asutorufa/telegram-workers-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deploy

need tinygo, npm

cd  cmd/ai
npm install
vim wrangler.toml

create wrangler.toml with

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

make deploy

register telegram bot webhook

curl https://tg-workers-ai.xxxxxx.workers.dev/tgbot/register

image

About

telegram bot by cloudflare workers AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published