BOTA

BOT-A is a free Discord Dota 2 bot which provides comprehensive Information of every Dota 2 characters and exciting features for the community. Pull request are welcome and report any issues you find. The Bot is still in beta so I don't expect it to be perfect.

Commands & Screenshots

Commands List: !help
commands
Screenshots:

  1. Command: !counter morphling
    counter
  2. Command: !item storm
    item

Pre-Requirements:

Before setting up the environment we first need to get:

  1. Discord Token
  2. Discord Client ID
  3. Dota2 API key
  4. Twitch Client ID
  5. Discord User (Optional)
  • To get Discord Token and Discord Client ID you can check this
  • You can get your Dota2 API key from here
  • To get Twitch Client ID you need to register an application in Twitch developer. You can follow this
  • You can get your Discord User by clicking on your profile in discord. It will look like YourName#1234 eg: bendang#3278

Once this is done you can assign all this key values in bota/private_constant.py.

Setup Bota

  1. Clone repo and Setup postgres DB

    # clone repo
    git clone https://github.com/bendangnuksung/bota.git
    cd bota
    
    # Install and setup PSQL
    # default password given, please check db_setup.sh to change password
    sh db_setup.sh
    
  2. Run the independent flask server which handles the log process.

    sh run_flask.sh
    
  3. Run the bot. There are two ways to run BOTA

    1. Run using Docker. (RECOMMENDED)
    2. Run directly from the Repository

1. Run using Docker (RECOMMENDED)

  1. Download the docker image from DockerHub or download directly using:
    docker pull bendang/bota:latest
    
  2. Run the docker image with the credentials which you got from Pre-Requirements:
    # docker run --rm -i -t --net=host --entrypoint=/bota/run_bota_docker.sh bendang/bota:latest "DISCORD_TOKEN" "DISCORD_CLIENT_ID" "DOTA2_API_KEY" "ADMIN_ID" "TWITCH_CLIENT_IDS" "LOG_PROCESS_IP_ADDRESS"
    docker run --rm -i -t --net=host --entrypoint=/bota/run_bota_docker.sh bendang/bota:latest 1234 ABCD 6789 YOU#67 FGHI http://0.0.0.0:5000
    

2. Run directly from Repository

  1. Install requirements

    sudo sh setup.sh
    
  2. Create two Screen.

    1. Screen 1: Run the scrap process
      sh run_scrap.sh
      
      Detach
    2. Screen 2: Run the BOT process
      sh run_bota.sh
      
      Detach

CAUTION : While running directly from repository if you are using chrome it will automatically close as the scrap process uses it and it kills once the scraping is done.

GitHub

https://github.com/bendangnuksung/bota