Tavla is a Turkish Backammon game for Telegram
This code partially described in my topic on Habr (russian lang)
This is a project written using Lucky. Enjoy!
Setting up the project
- Install required dependencies
- Update database settings in
config/database.cr
- Run
script/setup
- Run
lucky dev
to start the app
Create .env file
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
Setup Heroku deploy
Use this Lucky Guide for setup deploy on Heroku.
Register Webhook
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.
Learning Lucky
Lucky uses the Crystal programming language. You can learn about Lucky from the Lucky Guides.