WiseAssBot (AKA MrKnowItAll) is a serverless telegram bot designed to manage the group with more ease.
- Create an API token from the cloudflare dashboard.
- Create a
.envfile based on.env.exampleand fill the values based on your tokens
| Variable | Description |
|---|---|
| CLOUDFLARE_API_TOKEN | The API key retrieved from Cloudflare dashboard |
| TOKEN | Telegram bot token |
| KV_BINDING | KV namespace binding |
| KV_ID | KV namespace ID |
Read more about KV bindings here.
- Prepare your developing environment by:
$ make prepare- Upload the config on KV storage
NOTE: Skip this step if you uploaded your config before
$ make config-upload- Deploy
$ make deployTo run the bot locally, first:
- you need to write a local configuration file by using:
$ make dev-config name=config-example.toml- to run wiseass locally:
$ make dev- install cloudflared and run the following command to expose your local wiseass instance to the internet.
$ cloudflared tunnel --url http://localhost:8780- set a telegram webhook:
https://api.telegram.org/bot{YOUR_BOT_TOKEN}/setWebhook?url=https://{CLOUDFLARED_EXPOSED_BASE_URL}/updates
