@shieldy_bot Telegram bot code
This is the code for the anti-spam Telegram bot I've built. Enjoy and feel free to reuse!
Installation
Local launch
- Clone this repo:
git clone https://github.com/backmeupplz/shieldy
- Launch the mongo database locally
- Create
.env
with the environment variables listed below - Run
yarn install
in the root folder - Run
yarn distribute
And you should be good to go! Feel free to fork and submit pull requests. Thanks!
Docker
- Clone this repo:
git clone https://github.com/backmeupplz/shieldy
- Replace the dummy environment variables in
docker-compose.yml
with the ones listed below - Run
docker-compose up -d
Environment variables
TOKEN
β Telegram bot tokenMONGO
β URL of the mongo databaseADMIN
β Telegram user ID of the bot administratorREPORT_CHAT_ID
β Telegram chat ID of the channel where the bot should report errorsPREMIUM
β Whether the bot should be premium or notSTRIPE_SECRET_KEY
β Stripe secret keySTRIPE_SIGNING_SECRET
β Stripe signing secretMONTHLY_PRICE
β Monthly Stripe price id of the premiumYEARLY_PRICE
β Yearly Stripe price id of the premiumLIFETIME_PRICE
β Lifetime Stripe price id of the premium
Also, please, consider looking at .env.sample
.
Continuous integration
Any commit pushed to master gets deployed to @shieldy_bot via CI Ninja.
License
MIT β use for any purpose. Would be great if you could leave a note about the original developers. Thanks!