a13xg0 / vldc-bot

The official VLDC telegram group bot

Home Page:https://vldc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VLDC nyan bot ^_^

The official VLDC telegram group bot.

nyan

Build Status docker_hub Maintainability

Skills

Smile Mode

Inspired by Twitch SmileMode this bot may bring you a remarkable new way to conversation ;)

If you an admin of Telegram Group just send /smile_mode_on to set SmileMode ON, and /smile_mode_off to turn it off.

Keep it in mind, you should make bot an admin and allow delete and pin messages

On SmileMode all messages exclude stickers of GIFs will be deleted.

Towel Mode

By default any new guests of the group will receive message from the Bot. User should reply the Bot message in the next hour otherwise user would be blacklisted.

Usage

Setup your env vars in example.env and rename it to .env. Don't push .env to public repos!

docker-compose up -d && docker-compose logs -f --tail=10

Build local image

docker-compose -f docker-compose-dev.yml build

Developing

Create test Telegram bot, and store TOKEN and chat id, you will need it for developing.

In VENV:

Create venv and install dependencies

make dev

Run tests

make test

Run linters

make lint

Run bot (required vars should be in ENV)

make start

In Docker:

Build local container

make dev_build

Run local dev bot (with mongo)

dev_start

Run tests

make dev_test

Setting Up Debugger in VS Code

Create launch.json under your .vscode directory in project, add the following content onto it:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Docker Python",
            "type": "python",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "/app"
                }
            ],
        }
    ]
}

Also, put DEBUGGER=True into your .env file. After that you can do debugging with VS Code, by running containerized application and hitting Run -> Start Debugging or F5 button.

Contributing

Bug reports, bug fixes and new features are always welcome. Please open issues and submit pull requests for any new code.

About

The official VLDC telegram group bot

https://vldc.org

License:MIT License


Languages

Language:Python 97.9%Language:Makefile 1.4%Language:Dockerfile 0.6%