Skip to content

Repository files navigation

SPb Python Bot

spbpython bot statustag

The Zen of SPb Python Chat

importthis

Read Zen of SPb Python Chat

Help with this

help(this)
>>>fromthisimporthi# hello, introShortintroductionofyourselfisbetterthan"hello".
>>>fromthisimportgist# sourceLinktogistisbetterthansourcepaste.
>>>fromthisimportspam# long_betterOnelongmessageisbetterthanmanyshort.
>>>fromthisimportedit# correctEditingthemessageisbetterthancorrectingviaanotherone.
>>>fromthisimporttopic# offtopicStayingontopicisbetterthanofftopic.
Goodtopicisworthdiscussingthough.
UnlessitisstartedbyalinktoHabrahabr.
>>>fromthisimportaskDon'tasktoaskjustask.

Hello world

import__hello__

Let me google for you

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

/google query
/g query
/wiki query
/w query

PEPs link

Match peps in messages and send links for them.

Chats

Показывает чаты и ссылки

/chats
/links
/about

Other commands

/version — show current bot version
/ping — moderator-only ping/pong check
/rules — show all chat rules (also: /zen, import this)

Environment variables

BOT_TOKEN # telegram bot token (required)
BOT_LOGGING_LEVEL # logging level: DEBUG, INFO, WARNING, ERROR (default: DEBUG)
MODERATORS # moderator Telegram user IDs separated by spaces
HEALTHCHECKIO_TOKEN # healthcheck.io ping token (optional)

See .env.example for a ready-to-use template.

Run with Docker

Build and run locally:

cp .env.example .env
# edit .env and set BOT_TOKEN
docker compose up --build

Deploy to a remote server:

The image is built and pushed to GitHub Container Registry on every push to master.

# Copy deploy/docker-compose.yml and .env to the server, then:
DEPLOY_HOST=user@yourserver ./deploy/deploy.sh

Or manually on the server:

docker compose pull
docker compose up -d

About

Telegram bot for SPb Python Chat

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages