AlemOyunBot

command module
v0.0.0-...-9403975 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2025 License: GPL-3.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

AlemOyun Game Bot

This is a AlemOyun Game bot for Telegram. I'm not sure that such game is called "AlemOyun" in English, but in Russian it's called that way. ¯\_(ツ)_/¯

The main bot instance is here: https://t.me/AlemOyunBot

⚠️ This repo is no longer maintained

We've migrated to a private repository.

Installation

go get -u github.com/AdanaliMuhendis/AlemOyunBot

Running

  1. Copy .env.example to .env and fill variables
cp .env{.example,}                               # Copy
vim .env                                         # Edit
source <(cat .env | awk '{print "export", $1}')  # Set variables
  1. Run redis and postgresql
docker-compose up -d redis
docker-compose up -d postgresql
  1. Apply migrations — see "Database Migrations" section
make migrate-up
  1. Run application
make run

Testing

Execute this command:

make test

Database Migrations

We use https://github.com/golang-migrate/migrate to perform migrations. Them are stored in ./migrations/ folder.

To apply migrations to your database do the following:

  1. Install migrate tool: https://github.com/golang-migrate/migrate/tree/master/cmd/migrate
  2. Apply migrations
migrate -source file://migrations -database 'postgres://user:pass@localhost:5432/postgres?sslmode=disable' up

If you need to downgrade the database schema, run this command

migrate -source file://migrations -database 'postgres://user:pass@localhost:5432/postgres?sslmode=disable' down

Just down instead of up in the end of the command.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址