Telegram bot for SPb Python Chat
Clone or download
Pull request Compare This branch is 7 commits behind nonamenix:master.
Latest commit ab6b321 Jan 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bot split updates Jan 22, 2018
.gitignore Initial commit Apr 16, 2017
CHANGELOG.md Update changelog Jan 22, 2018
Dockerfile Fix version of aiotg. Update version of python docker image Aug 6, 2017
README.md Convert changelog to md, add link from readme Jan 22, 2018
docker-compose.yml Initial commit Apr 16, 2017

README.md

SPb Python Bot

spbpython bot status tag

The Zen of SPb Python Chat

import __this__
import this

Read Zen of SPb Python Chat

Hello world

import __hello__ 

Let me google for you

Google

Команда разрешена только для модератора

/google query
/g query

Wiki

Команда разрешена только для модератора

/wiki query
/w query

PEPs link

Match peps in messages and send links for them.

Environment variables

BOT_TOKEN  # telegram bot token
BOT_LOGGING_LEVEL  # logging level
MODERATORS  # moderators identifiers splited by space
DEBUG  # bot autoreload on file save

Run with condo

Condo — reliable and simple idempotent supervisor for Docker containers.

{
    :spec {
        :Name "spb_python_bot"
        :Image "nonamenix/spb_python_bot:latest"
        :Env [
            "BOT_TOKEN=339614247:************************************"
            "MODERATORS=132982472 59323058"
            "HEALTHCHECKIO_TOKEN=********-****-****-****-************"
            "BOT_LOGGING_LEVEL=ERROR"
            "MONGO_URL=mongodb://spbpythonbot:Lg2vxjoBT3oRmDd4XnyJ2VD6hJC3jb@ds046677.mlab.com:46677/spb_python_bot"
            "MONGO_HEALTHCHECKIO_TOKEN=fb6c17b8-a64a-41bf-83c7-267ee5124368"
        ]
        :HostConfig {
            :RestartPolicy {:Name "always"}
            :NetworkMode "petprojects_default"
        }
    }

    :health-timeout 45
}