Python script#

Contents

Linux

Linux#

Prerequisites:#

  • git

  • python3

  • python3-pip

  • Redis

  • Discord application with bot (create one here)

Setup:#

  1. Clone the repository

    git clone https://github.com/wupasscat/continent-bot.git
    cd continent-bot
    
  2. Install dependencies

    pip install -r requirements.txt
    
  3. Create .env file

    nano .env
    

    Your file should look like this:

    # .env
    DISCORD_TOKEN=your discord bot token
    API_KEY=
    LOG_LEVEL=INFO
    REDIS_HOST=
    REDIS_PORT=
    REDIS_DB=
    REDIS_PASS=
    
    • DISCORD_TOKEN found in the “Bot” section of your Discord application

    • API_KEY Daybreak Games Census API service ID

      Warning

      Do not use s:example! This service ID is heavily rate-limited and will not work. It is recommended that you apply for a service ID here

    • REDIS_HOST IP or hostname of your Redis instance

    • REDIS_PORT the port that Redis listens on

    • REDIS_DB the ID of your redis database

    • REDIS_PASS the password to your Redis instance

  4. Run script

    python3 -m bot.py