Skip to content

39ma/csgo-league-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HitCount Maintenance GitHub release PRs Welcome Open Source Love svg3

CS:GO League Bot

A Discord bot to manage CS:GO PUGs. Connects to the CS:GO League web API.

Our support discord can be found here.

Author

cameronshinn - Developer / Maintainer

Watch for releases

So as to keep the latest version of the plugin I recommend watching the repository

Watch releases

Share the love

If you appreciate the project then please take the time to star our repository.

Star us

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. Be sure to invite it to a server to use it.

    • The permissions integer necessary is 17067072.
  2. Get an API token for the CS:GO League web API along with the host URL.

  3. Run pip3 install -r requirements.txt in the repository's root directory to get the necessary libraries.

    • Note that python-Levenshtein requires your system to have a C++ compiler (Visual Studio C++ compiler for Windows or g++ for Linux). This library may be replaced in the future to eliminate this requirement.
  4. Add the /bot path to your PYTHONPATH environment variable to be able to import it from anywhere.

  5. Using your bot's Discord token, League web server URL, League API token and Discord Bot List token, run the bot like so...

import leaguebot

DISCORD_TOKEN = 'XXXXXXXX'
API_BASE_URL = 'XXXXXXXX'
API_KEY = 'XXXXXXXX'

bot = leaguebot.LeagueBot(DISCORD_TOKEN, API_BASE_URL, API_KEY)
bot.run()  # Blocking

Now you are ready to start using the CS:GO League Bot! Try out some of the commands to make sure it works.

Note that currently the mdraft command depends on custom emojis to be used as buttons which are hardcoded here. As of right now you will need to make the emojis yourself and replace the emoji code in the map objects there.

Commands

q!help - Display help menu

q!about - Display basic info about this bot

q!join - Join the queue

q!leave - Leave the queue

q!view - Display who is currently in the queue

q!remove <mention> - Remove the mentioned user from the queue (must have server kick perms)

q!empty - Empty the queue (must have server kick perms)

q!cap <integer> - Set the capacity of the queue to the specified value (must have admin perms)

q!tdraft - Start (or restart) a team draft from the last popped queue

q!mdraft - Start (or restart) a map draft

q!setmp {+|-}<map name> ... - Add or remove maps from the mdraft map pool (Must have admin perms)

q!donate - Link the bot's donation link

Contributions

Code Style

This project adheres to the PEP8 style guide with 120 character line limits.

Branches

Create a branch if you're working on an issue with the issue number and name like so: 100_Title-Separated-By-Dashes.

Commit Messages

Phrase commits in the present tense, e.g. Fix bug instead of Fixed bug.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%