tavla

Version, currently master branch1 version
  • master branchlatestSep 8, 2021

github.com/dammer/tavla_best_bot

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

2 stars
0 dependents
License: not declared

Installation

# Add this to your shard.yml
dependencies:
  tavla:
    github: dammer/tavla_best_bot
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.36.1
Author
Damir Sharipov
Target
  • tavla from src/tavla.cr

Dependencies

Runtime Dependencies

  • i18n~> 0.1.1github: vladfaust/i18n.cr
  • lucky~> 0.26.0github: luckyframework/lucky
  • carbon~> 0.1.2github: luckyframework/carbon
  • dotenv~> 0.7.0github: gdotdesign/cr-dotenv
  • authentic~> 0.7.2github: luckyframework/authentic
  • lucky_flow~> 0.7.2github: luckyframework/lucky_flow
  • tourmaline*github: protoncr/tourmaline, branch: master

README

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.