This code partially described in my topic on Habr (russian lang)
This is a project written using Lucky. Enjoy!
- Install required dependencies
- Update database settings in
config/database.cr
- Run
script/setup
- Run
lucky dev
to start the app
After creating you own bot and adding game to him make .env file in root foler of project.
DB_USERNAME="tavls"
GAME_KEY_SECRET="Ahcahth0"
BOT_ID=YOU_BOT_ID
BOT_TOKEN="YOU_BOT_TOKEN"
If you use different game name, not "tavla" change constant GAME_NAME or move it to .env same as BOT_ID
Use this Lucky Guide for setup deploy on Heroku.
After deploy app on Heroku set Webhook for getting updates from Telegram api server using setwebhook api method or use Tourmaline method for that action.
Lucky uses the Crystal programming language. You can learn about Lucky from the Lucky Guides.