Skip to content

Python Discord bot that is capable of hosting multiplayer chess games and Chess.com player information wrapper.

License

Notifications You must be signed in to change notification settings

vf-solutions/Discord-Chess-Bot

Repository files navigation

Discord-Chess-Bot

Chess-Bot Logo

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors License Badge

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!


How to Use the Bot

Method 1: Invite Link:

In the case you are interested in just using the bot, you can invite the bot to your server by following this link.

Method 2: Running it Independently

Installation Instructions

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:

Discord.py + Other Dependencies Setup

  1. Use the command pip install Discord in cmd or terminal to install Discord.py 1.6.1 or the latest version.
  2. Use the command pip install chess.com in cmd or terminal to install Chess.com Wrapper 1.2.1 or the latest version.
  3. Use the command pip install chess in cmd or terminal to install python-chess 1.4.1 or the latest version.
  4. Use the command pip install cairosvg in cmd or terminal to install CairoSVG 1.1 or the latest version.
  5. Documentation for Discord.py could be found here.
  6. Documentation for Chess.com Wrapper could be found here and here.
  7. Documentation for CairoSVG could be found here.

Before Running

  1. Open token.txt and copy and paste the Discord Token so that the corresponding Discord bot is able to run the given program.

Running locally

In the case

  1. Open cmd and navigate to the directory where the source code for this project can be found.
  2. Once on the root directory of this project, run python filepath/local-bot.py

Hosting via Heroku

Via Heroku Git

  1. Log onto Heroku.
  2. Create a new application or open an existing application. Note the name of the application.
  3. Go to Settings > Add Build path > Python
  4. Install the Heroku CLI by following this link.
  5. Navigate to the directory of the bot.
  6. Create two files named Procfile and requirements.txt
  7. 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
    
  8. Turn our bot on from heroku dashboard.
  9. Navigate to the Bot Directory run echo > Procfile in that directory
  10. Edit requirements.txt to include the following: git+https://github.com/Rapptz/discord.py dnspython==1.16.0 PyNaCl==1.3.0 async-timeout==3.0.1
  11. Go to Heroku.com and go to Resources. Press Edit, and hit the sliding button so that it is on and hit Confirm.
  12. The bot should be active after a few minutes, and enjoy!

Via Heroku Website

  1. Log onto Heroku.
  2. Create a new application or open an existing application.
  3. Go to Deploy > Deployment method > Connect with GitHub and 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.
  4. Go to Deploy > Deploy Branch > Main Branch to depoly the recent version of the Main branch.
  5. Repeat steps 2-4 whenever the Main Branch is updated to have access the latest features of the bot.
  6. Go to Resources. Press Edit, and hit the sliding button so that it is on and hit Confirm.
  7. The bot should be active after a few minutes. Enjoy!

Contribute

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.

License

This project is licensed under MIT license.

Support Us!

Give this repo a ⭐️ if you found this project helpful!

About

Python Discord bot that is capable of hosting multiplayer chess games and Chess.com player information wrapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages