This repository is a basic roadmap to setup bot in your local system in a efficient way for everyone.
If you need some help for something, do join our discord community here.
Want to reach us directly? You can reach us here.
-
Clone Repository
$ git clone https://github.com/devs-nest/discord-bot.git
-
Create a virtual environment
$ virtualenv venv -p python3 $ source venv/bin/activate
-
Install packages
$ pip install -r requirements.txt or pip3 install -r requirements.txt
-
Add values in .env
refer to sample.env
-
Run server
$ python main.py or python3 main.py
Brief overview of some basic things...
Variable | What it is |
---|---|
BOT_PREFIX | The prefix(es) of your bot |
TOKEN | The token of your bot |
APPLICATION_ID | The application ID of your bot |
OWNERS | The user ID of all the bot owners |
BLACKLIST | The user ID of all the users who can't use the bot |
STARTUP_COGS | The cogs that should be automatically loaded when you start the bot |
Commands | Purpose of command |
---|---|
dn-help | To get all commands with its functionality |
dn-fetch | To get list of questions |
dn-mark-done | To mark question done |
dn-mark-undone | To mark question undone |
dn-mark-doubt | To get mark question as doubt |
dn-report | To get progress report |
dn-leaderboard | To get list of top 10 students of week |
How can you contribute?
- Clone the repo.
- Create a virtualenv and activate it.
$ virtualenv -p python3 venv $ venv/bin/activate
- Install dependencies.
$ pip install -r requirements-dev.txt
- Run
$ pre-commit install
- Create a new branch
$ git checkout -b feature/<your-feature-name>
- Commit your changes and push it on github
$ git commit -am "<what changes you have made>" && git push origin feature/<your-feature-name>
- Create a PR, and get it reviewed, that's it.
- Run the following command, it will autofix the errors in the files.
$ black . && isort .
- Run the following command and fix the errors.
$ flake8 .
Main is our holy grail, never push anything directly to main.
- Devsnest - The community of some gems.