Skip to content

gbtami/pychess-lobby-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pychess-lobby-bot

A discord bot that connects Pychess to discord using discord.py. The Bot is hosted on Heroku's worker dynos. Check 'Environments' to view hosted app (though only the app name can be seen as it runs on worker dynos not web dynos).

Local Installation

Setup

Get a Discord Bot Token from the Developer Portal.

# Install Dependencies
pip install -r requirements.txt

# Linux
export DISCORD_TOKEN='xxxxxxxxx' # Add your discord token in place of xxxxxxxxx. The quotes must be kept.
export PYCHESS=https://www.pychess.org # url to which your bot must communicate. Don't add a '/' at the end of the url.

# Windows
setx DISCORD_TOKEN 'xxxxxxxxx' # Add your discord token in place of xxxxxxxxx. The quotes must be kept.
setx PYCHESS https://www.pychess.org # url to which your bot must communicate. Don't add a '/' at the end of the url.

Run

python3 bot.py

# List of supported commands
python3 bot.py --help

Heroku Installation

Setup

Create a Heroku app (both app name and region do not really matter). Then go to the Deploys tab in Heroku UI and select Connect to GitHub and click to search and select your fork of pychess-lobby-bot. Once that is done click on deploy (you could also select automatic deploy if you want heroku to automatically publish changes to your Dev instance).

In Heroku UI set config var DISCORD_TOKEN to the Token of your Discord Bot (which you can get from here) and set PYCHESS to the url to which your bot must communicate. Don't add a '/' at the end of the url (example, https://www.pychess.org).

Run

To start your heroku instance go to the Resources tab and enable the worker dyno. This will automatically start your discord bot.

About

Discord-Relay bot to send messages between pychess and https://discord.gg/aPs8RKr back and forth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •