Telegram Bot based on http://db.chgk.info questions database.
Chgk bot supports next commands:
/start- starts bot and shows help/help- shows help/question- sends random question to chat/round- starts round of game/stop- stops round of game/score- shows results
You need either Docker and make, or go in order to build binary.
GOOS=linux GOARCH=amd64 go build -o bin/chgk-telegram-bot cmd/telegram/main.goGOOS=linux GOARCH=amd64 go build -o bin/chgk-icq-bot cmd/icq/main.goor
make compiledocker build -f build/Dockerfile.telegram -t zetraison/chgk-telegram-bot .docker build -f build/Dockerfile.icq -t zetraison/chgk-icq-bot .or
make docker_buildYou need setup ENV variables $(TELEGRAM_BOT_TOKEN) and $(ICQ_BOT_TOKEN) in .env file or in your environment to run binaries.
export TELEGRAM_BOT_TOKEN=$(TELEGRAM_BOT_TOKEN) go run cmd/telegram/main.goexport ICQ_BOT_TOKEN=$(ICQ_BOT_TOKEN) go run cmd/icq/main.goor
make docker_run_telegram_bot
make docker_run_icq_botdocker run -it --rm -e TELEGRAM_BOT_TOKEN=$(TELEGRAM_BOT_TOKEN) zetraison/chgk-telegram-botdocker run -it --rm -e ICQ_BOT_TOKEN=$(ICQ_BOT_TOKEN) zetraison/chgk-icq-botor
make docker_run_telegram_bot
make docker_run_icq_bot