Giter Site home page Giter Site logo

annihilatorrrr / telegram-casino-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mastergroosha/telegram-casino-bot

0.0 0.0 0.0 82 KB

[зеркало с GitLab] Демонстрационный бот для работы с дайсом 🎰 в Telegram

Home Page: https://git.groosha.space/shared/telegram-casino-bot

License: MIT License

Dockerfile 3.03% Python 68.17% Fluent 28.80%

telegram-casino-bot's Introduction

(Ru)

🇷🇺 README на русском доступен здесь

Telegram Virtual Casino

In October 2020 Telegram team released yet another update with slot machine dice. Here it is:

slot machine dice

According to Dice type documentation in Bot API, slot machine emits values 1 to 64. In dice_check.py file you can find all the logic regarding matching dice integer value with visual three-icons representation. There is also a test bot @DifichentoBot in Russian to test how it works.
Dice are generated on Telegram server-side, you your bot cannot affect the result.

Technology

  • aiogram — asyncio Telegram Bot API framework;
  • redis — persistent data storage (persistency enabled separately);
  • cachetools — for anti-flood throttling mechanism;
  • Docker and Docker-Compose — quickly deploy bot in containers.
  • Systemd

Installation

Copy env_example file to .env (with leading dot), open and edit it. Create redis_data and redis_config directories, put redis.conf file into the latter (there is example in this repo). Create locales folder with languages subdirs (e.g. locales/en) and put your localization file(s) in those subdirs. Check this directory for samples. Please note that only one language can be active at a time.

Finally, run the bot with docker-compose up -d command.

Alternative way: you can use Systemd services, there is also an example available.

Credits to

  • @Tishka17 for initial inspiration
  • @svinerus for compact dice combination check (f6f42a841d3c1778f0e32)

telegram-casino-bot's People

Contributors

mastergroosha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.