Git Product home page Git Product logo

boom-pugbot's Introduction

G5 Bot

A Discord bot to manage CS:GO PUGs. Connects to G5API. This is a modified version of csgo-league-bot

Setup

  1. First you must have a bot instance to run this script on. Follow Discord's tutorial here on how to set one up.

    • The required permissions is 1360292944.
    • Enable the "server members intent" for your bot, as shown here.
  2. Install libpq-dev (Linux only?). This is needed to install the psycopg2 Python package.

    • Linux command is sudo apt-get install libpq-dev.
  3. Run pip3 install -r requirements.txt in the repository's root directory to get the necessary libraries.

  4. Install PostgreSQL 9.5 or higher.

    • Linux command is sudo apt-get install postgresql.
    • Windows users can download here.
  5. Run the psql tool with sudo -u postgres psql and create a database by running the following commands:

    CREATE ROLE "g5" WITH LOGIN PASSWORD 'yourpassword';
    CREATE DATABASE "g5" OWNER g5;

    Be sure to replace 'yourpassword' with your own desired password.

    Quit psql with \q

  6. Create an environment file named .env with in the repository's root directory. Fill this template with the requisite information you've gathered...

    DISCORD_BOT_TOKEN= # Bot token from the Discord developer portal
    DISCORD_BOT_LANGUAGE=en # Bot language (key from translations.json)
    DISCORD_BOT_PREFIXES=q! Q! # Bot commands prefixes
    EMOJIS_GUILD_ID= # ID of a discord server to create maps emojis
    
    WEB_PANEL=https://g5v.example.com # G5V url (see https://github.com/PhlexPlexico/G5V)
    API_URL=https://g5v.example.com/api # G5API url (see https://github.com/PhlexPlexico/G5API)
    
    GAMEMODE_COMPETITIVE=1
    GAMEMODE_WINGMAN=2
    GET5_COMPRTITIVE_CFG=live.cfg # match config file in cfg/get5/ for competitive mode
    GET5_WINGMAN_CFG=live_wingman.cfg # match config file in cfg/get5/ for wingman mode
    
    POSTGRESQL_USER=g5 # PostgreSQL user name
    POSTGRESQL_PASSWORD= # PostgreSQL password
    POSTGRESQL_DB=g5 # PostgreSQL Database
    POSTGRESQL_HOST=localhost # PostgreSQL host
  7. Apply the database migrations by running python3 migrate.py up.

  8. Run the launcher Python script by running, python3 launcher.py.

Thanks To

Cameron Shinn for his initial implementation of CSGO League Bot.

boom-pugbot

boom-pugbot's People

Contributors

xervzz avatar

Stargazers

 avatar

Watchers

 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.