dammer / tavla_best_bot

Tavla game on Crystal + Lucky + Tourmaline + Telegram Bot Gaming Platform + Heroky

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Install required dependencies
  2. Update database settings in config/database.cr
  3. Run script/setup
  4. 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.

About

Tavla game on Crystal + Lucky + Tourmaline + Telegram Bot Gaming Platform + Heroky


Languages

Language:Crystal 80.8%Language:JavaScript 9.8%Language:SCSS 6.0%Language:Shell 3.3%