tavla_best_bot

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

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.

Repository

tavla_best_bot

Owner
Statistic
  • 1
  • 0
  • 1
  • 0
  • 7
  • about 3 years ago
  • July 8, 2021
License

Links
Synced at

Wed, 06 Nov 2024 20:35:44 GMT

Languages