Black Metal Cat Bot for Telegram
- Telegram Bot
- Written in Python 3
- you can ask me for some new black metal album via "BM!" message
- I will search the YouTube channels (Black Metal Promotion and Atmospheric Black Metal)
- ... and I will paste the link to the new black metal album into Telegram Channel
- ... together with a funny random Black Metal quote, like "The problem with most Norwigian bands is that their singers sound like Popay" - Cronos from Venom shared his thoughts in 1999, see more here
Just add BM-Cat bot into your chat and start a private conversation with him via @.
If you want to deploy your own Black Metal bot, use the instruction below.
python
version 3.7+pip3
version 18.1+docker
version 18.06.1-ce+
Name | Description |
---|---|
BM_CAT_SSL_CERTIFICATE_PATH | The path to a SSL certificate inside of a container (for example: /etc/ssl/certs/public.pem ) |
BM_CAT_PRIVATE_KEY_PATH | The path to a private key (for example: /etc/ssl/private/privkey.pem ) |
PORT | The port on which container should run (container port), (for example: 5000 ) |
BM_CAT_HOST | The name of the host on which BM-cat bot is running (for example: example.com ) |
BM_CAT_PORT | The host port (for example: 8443 ) |
BM_CAT_API_KEY | Telegram API KEY (see more here) |
BM_YOUTUBE_API_KEY | YouTube API KEY (see more here) |
-
Clone this repository and change the current directory to
bm-cat
git clone https://github.com/Evalle/bm-cat.git
-
Install all python dependencies via:
pip install -r requirements.txt
-
Generate self-signed certificate pair, (see more here)
openssl req -newkey rsa:2048 -sha256 -nodes -keyout private.key -x509 -days 365 \ -out public.pem \ -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=YOURDOMAIN.EXAMPLE"
-
Build docker image
docker build --build-arg BM_CAT_SSL_CERTIFICATE_PATH=/etc/ssl/certs/public.pem \ --build-arg BM_CAT_PRIVATE_KEY_PATH=/etc/ssl/private/privkey.pem \ --build-arg PORT=5000 --build-arg BM_CAT_HOST=example.com \ --build-arg BM_CAT_PORT=8443 \ --build-arg BM_CAT_API_KEY=<your_telegram_api_key> \ --build-arg BM_YOUTUBE_API_KEY=<your_youtube_api_key> \ -t bm-cat:0.0.1 .
-
Finally, run docker container
docker run -d --restart=always --privileged -p 8443:5000/tcp bm-cat:0.0.1