/bot-discord

Fully Autonomous Discord Bot for a Server

Primary LanguagePython

Bot Orientador UPRM

Fully Autonomous Discord Bot for a Server

Creators: Team MADE

Configuration

The project needs a `.env` file with the appropriate values. If a required value is not present the application will not start.

The application environment variables to be assigned into a .env file are in .env.examples

Activating Virtual Environments
  • For users to properly install dependencies for this application, a Virtual Environment is needed so all packages can be used properly
  • For Windows 10 users:
    1. Enter in the Command Prompt: python -m venv venv/
    2. To activate Virtual Environed, type in the Command Prompt: venv\Scripts\activate
    3. To install project dependencies, type in the Command Prompt: pip install -r requirements.txt
    4. To deactivate Virtual Environment, type in the Command Prompt: deactivate
  • For macOS & Linux users:
    1. Enter in the Terminal: python -m venv venv/
    2. To activate Virtual Environment, type in the Terminal: source venv/bin/activate
    3. To install project dependencies, type in the Terminal: pip install -r requirements.txt
    4. To deactivate Virtual Environment, type in the Terminal : deactivate

Testing

Run: python -m unittest discover -s tests -t . from the top level directory

For mocking the MongoDB Database for testing create a .env.development file and change the connection string to any of your choosing. The one I use is

MONGO_CONNECTION_STRING=mongodb://test.db