In this repository, you will find the source code for a Discord bot that is capable of hosting multiplayer chess games and Chess.com player information wrapper. Enjoy!
In the case you are interested in just using the bot, you can invite the bot to your server by following this link.
You can download or modify the program by Cloning or Downloading the project or by saving it as a ".zip" file. Once the downloaded file is extracted into a separate folder, follow these instructions:
- Use the command
pip install Discordin cmd or terminal to installDiscord.py 1.6.1or the latest version. - Use the command
pip install chess.comin cmd or terminal to installChess.com Wrapper 1.2.1or the latest version. - Use the command
pip install chessin cmd or terminal to installpython-chess 1.4.1or the latest version. - Use the command
pip install cairosvgin cmd or terminal to installCairoSVG 1.1or the latest version. - Documentation for Discord.py could be found here.
- Documentation for Chess.com Wrapper could be found here and here.
- Documentation for CairoSVG could be found here.
- Open
token.txtand copy and paste the Discord Token so that the corresponding Discord bot is able to run the given program.
In the case
- Open cmd and navigate to the directory where the source code for this project can be found.
- Once on the root directory of this project, run
python filepath/local-bot.py
- Log onto Heroku.
- Create a new application or open an existing application. Note the name of the application.
- Go to
Settings > Add Build path > Python - Install the Heroku CLI by following this link.
- Navigate to the directory of the bot.
- Create two files named
Procfileandrequirements.txt - Initialize and commit all of the files in your discord bot directory into a git repository. Sign into heroku via the command line and push the git repository to heroku.
heroku login heroku git:clone -a "NAME_OF_HEROKU_APPLICATION_GOES_HERE" git add . git commit -am “whatever commit text you want here” git push heroku master - Turn our bot on from heroku dashboard.
- Navigate to the Bot Directory run
echo > Procfilein that directory - Edit
requirements.txtto include the following: git+https://github.com/Rapptz/discord.py dnspython==1.16.0 PyNaCl==1.3.0 async-timeout==3.0.1 - Go to Heroku.com and go to
Resources. PressEdit, and hit the sliding button so that it is on and hitConfirm. - The bot should be active after a few minutes, and enjoy!
- Log onto Heroku.
- Create a new application or open an existing application.
- Go to
Deploy > Deployment method > Connect with GitHuband add this repository. You must have access to this repository on a Github account for this to work, or create your own and include all of the files found in this repository. - Go to
Deploy > Deploy Branch > Main Branchto depoly the recent version of the Main branch. - Repeat steps 2-4 whenever the Main Branch is updated to have access the latest features of the bot.
- Go to
Resources. PressEdit, and hit the sliding button so that it is on and hitConfirm. - The bot should be active after a few minutes. Enjoy!
Contributions are always welcome! Please create a PR and include a description of how your PR will improve the overall program and what it does. Making Contributions to a project guide.
This project is licensed under MIT license.
Give this repo a ⭐️ if you found this project helpful!
