Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0xperp authored Feb 2, 2024
1 parent 130314e commit a8bfc40
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
# Adjacent Book Bot

serverless telegram bot on cf workers

The original `worker.js` is the content of Nikhil John's
https://github.com/nikhiljohn10/telegram-bot-worker which is licensed with MIT.
My modifications are licensed under the Apache license.

The first bot configuration is fully featured, and responds to all received
messages with llama2 if a command isn't found.

To get continuous conversation with llama2 working make sure you add a database
to your wrangler.toml and initailize it with the schema.sql

To use the deploy button:

- Click the deploy button
- Navigate to your new **GitHub repository > Settings > Secrets** and add the following secrets:

```yaml
- Name: CF_API_TOKEN (should be added automatically)
- Name: CF_ACCOUNT_ID (should be added automatically)

- Name: SECRET_TELEGRAM_API_TOKEN
- Value: your-telegram-bot-token
```
- Push to `master` to trigger a deploy

To fork this repo and use wrangler:

- Click fork
- `npm i -g wrangler`
- `wrangler secret put SECRET_TELEGRAM_API_TOKEN` and set it to your telegram
bot token
- `wrangler d1 create llama2`
- put the database block from the command in your wrangler.toml
- `wrangler d1 execute llama2 --file ./schema.sql`
- `wrangler deploy`
- Done!
Serverless telegram bot on cf workers

## Getting started with cf-workers-telegram-bot

Expand Down

0 comments on commit a8bfc40

Please sign in to comment.