Skip to content

pvcodes/pi_bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi Bot - β

Welcome to π bot, it is the will be an all-purpose bot for competative programming, github and other stuff.

NOTE- For now the github integration is at hold, mainly focus is on codeforces.

To know more about bot commands visit Command Docs

How to test the bot before running it on your server

To test the bot join the Support Server. And head over to the #playground

How to run the bot on your own server

Invite the bot to your server [NOTE- While uing the bot if you find any issue or bug please head over to the issue and create an new issue elaborating the issue]

[NOTE- The music cog is not yet setup in the hosted bot]

Hosting the bot locally:

NOTE: To replicate this bot, you will need a bot token. Go get yours at https://discord.com/developers/ (If you need help with this step, feel free to ask for help in our Support Server.

For Database, It is implemented on MongoDB, created a cluster and a collection named server_config

  • Clone this repo using git clone
  • cd into the bot folder.
  • Add the token in a .env file in the project root as follows:
DISCORD_TOKEN=<your token>
DB_CLUSTER=<cluster name>
DB_NAME=<db name>
DB_UNAME=<user who has access to db's username>
DB_PSWRD=<DB_UNAME's password>

  • Install the pipenv via pip install pipenv an d then run:
pipenv install

[Optional] For having contest reminder command working locally, you will need a login in Google Cloud Platform and perform these steps:

  • Get an Google Calander API
  • Get the credentials.json from   APIs and services -> Credentials   click on CREATE CREDENTIALS and follow required steps
  • Copy and paste credentials.json file to src folder

How to contribute

Before contributing, here is some information that might help your PR (Pull Request) get merged.

How to set up the development environment

Requirements:

  • git
  • pip
  • python 3.8.6 or higher
  1. Fork and clone the repository with git clone https://github.com/<your-username>/pi_bot

  2. Get to the clone directory using the command cd pi_bot

  3. Copy the contents of the .env.sample file into a new file - .env and add your DISCORD bot token in there.

  4. Now follow these steps

    (Requires pipenv) - Install pipenv
    - Run pipenv sync --dev to install project dependencies and development dependencies
    - Run pipenv run start to run the bot.
    - For downloading more libraries, use pipenv install <package-name>
    - If you're adding any development-dependencies, use-> pipenv install <package-name> --dev\

To contribute changes follow these steps:

Note: Make sure you have been assigned the issue to which you are making a PR. If you make PR before being assigned, It will be labeled invalid and closed without merging.

  1. Add a upstream link to main branch in your cloned repo
git remote add upstream https://github.com/pvcodes/pi_bot.git
  1. Keep your cloned repo upto date by pulling from upstream (this will also avoid any merge conflicts while committing new changes)
git pull upstream master
  1. Create your feature branch
git checkout -b <feature-name>
  1. Commit all the changes
git commit -am "Meaningful commit message"
  1. Push the changes for review
git push origin <branch-name>
  1. Create a PR from our repo on Github.

How to report a bug

Submit an issue on GitHub and add as much information as you can about the bug, with screenshots of inputs to the bot and bot response if possible (if the issue is regarding bugs).

Note: For more detailed information about how to contribute, please refere to the CONTRIBUTING.md file.

Requirements:

  • python 3
  • discord(rewrite branch)
  • python-dotenv
  • requests
  • wavelink

MIT license discord.py version

Wandering why all the repos are forked from pvcodes-zz. Read here

Packages

No packages published

Languages

  • Python 100.0%