The discord bot for our Coding Club IIT Jammu discord(development server) written in Python
- Python 3.7
- Database : Azure Cosmos DB
- Database API - MongoDB API
- Deploy: Azure Pipelines
- Server: Azure Virtual Machine
- Install Python.
- Clone this repository and open terminal, change directory to the repo.
- Run
python -m venv ./venv
to create virtual environment. - Run
venv\Scripts\activate
command to activate virtual environment. - Run
pip install -r reqirements.txt
command to install dependencies. - Create a .env file in the folder, containing
DISCORD_TOKEN = <token>
SERVER = <server_id>
MONGODB = <mongodb_uri>
DEBUG = "True"
DEPARTMENT_CHANNEL = <department_selection_channel_id>
LOG_CHANNEL = <log_channel_id>
DEPARTMENT_MESSAGE = <department_selection_message>
SENDGRID_API_KEY = <sendgrid_key_optional_with_DEBUG>
- For using Google OAuth 2.0 to verify users.
- Register a project on Google Cloud Platform
- Goto API & Services dashboard.
- Configure Consent Screen.
userinfo.email
scope is required to run this application. - Create a new Credential (Oauth Client ID). Select application type
Desktop app
. - Download
client_secret.json
file and place it at the project root.
You can create a demo server and a bot application for testing purpose. Details here.
- Push the changes in a separate branch and create a pull request. After the PR is merged, it will be automatically deployed to Azure VM via Azure Pipelines.