Skip to content

birlug/WiseAssBot

Repository files navigation

WiseAssBot

WiseAssBot (AKA MrKnowItAll) is a serverless telegram bot designed to manage the group with more ease.

Quick Start

  1. Create an API token from the cloudflare dashboard.
  2. Create a .env file based on .env.example and 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.

  1. Prepare your developing environment by:
$ make prepare
  1. Upload the config on KV storage

NOTE: Skip this step if you uploaded your config before

$ make config-upload
  1. Deploy
$ make deploy

Run Locally

To run the bot locally, first:

  1. you need to write a local configuration file by using:
$ make dev-config name=config-example.toml
  1. to run wiseass locally:
$ make dev
  1. install cloudflared and run the following command to expose your local wiseass instance to the internet.
$ cloudflared tunnel --url http://localhost:8780
  1. set a telegram webhook:
https://api.telegram.org/bot{YOUR_BOT_TOKEN}/setWebhook?url=https://{CLOUDFLARED_EXPOSED_BASE_URL}/updates 

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •