Git Product home page Git Product logo

blackjack-game's Introduction

♣️♥️ BlackJack ♦️♠️

Just a simple card game telegram bot.

How to launch this bot in your PC

Using Docker

You can use docker to easily run that repository.

docker pull codi999/blackjack-game-app

Or follow instructions below, if you wanna launch it manually.

Manually

If you decided to launch this bot in your local machine, you should necessairly posess a PostgreSQL database and telegram bot token. To get token you should create bot via @BotFather bot. Don't loose this token.

In accordance with the above you can't go on until you create bot and postgreSQL database. So, if you done with it, you can follow steps below.

Step 1

Clone this repository via https git clone https://github.com/pureweb-creator/BlackJack-Game.git
or ssh [email protected]:pureweb-creator/BlackJack-Game.git

Step 2

Go to config.py file and replace constants by yours.

DATABASE = "dbname" # database  name
HOST = "hostname" # for localhost is 127.0.0.1
PORT = "port" # default for postgresql is 5432
API_TOKEN = "BOT TOKEN" # telegram bot token
DBUSER = "db_user_name" # database user name
PASSWORD = "db_user_password" # database password

Step 3

Use db/create.sql This command creates a table.

Step 4

Install dependencies required to run bot

pip install -r requirements.txt

If command prompt says you to install some other packages, just install it.

Step 5

Now you can run bot

python bot.py to run the bot in you local machine.

If you see somehing like

INFO:aiogram:Bot: 21 (Black Jack) [@blackjack_test_bot]
WARNING:aiogram:Updates were skipped successfully.
INFO:aiogram.dispatcher.dispatcher:Start polling.

in your console, it is regarded to success, bot works correctly.

That's all!

Credits info

Technologies used:

  • Python
  • Aiogram
  • PostgreSQL

Check issues for more information

blackjack-game's People

Contributors

pureweb-creator avatar dependabot[bot] 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.