A discord bot made with interactions.py. Visit the official website to get started.
Click to expand
You can either use a local mongodb instance or use mongodb atlas.
- Clone this repository and, if needed, check out the appropriate feature branch.
0.1. You will need your own Discord bot account with a token. See here.
-
Create a virtual environment
-
Install packages using either poetry or pip
poetry install
orpip install -r requirements.txt
-
Change the name of
src/example_config.py
tosrc/config.py
and fill in the required fields (Mandatory fields below)- DEV_GUILD_ID
- DEV_CHANNEL_ID
- DEV_USER_ID
- MONGO_MODE (see below)
-
Change the name of
.env.example
to.env
and fill in the required fields (Mandatory fields below)- PROJECT_NAME
- DISCORD_TOKEN
- MONGO_LOCAL_URI or MONGO_URI and MONGO_CERT_PATH (see below)
-
[Option 1] If you want to use mongo db locally.
- Set MONGO_LOCAL_URI in
.env
. (Add db name at the end example:mongodb://localhost:27017/DATABASE_NAME
) - Set MONGO_MODE = 'localhost' in
src/config.py
.
- Set MONGO_LOCAL_URI in
-
[Option 2] If you want to use mongodb atlas
- Set in
.env
:- MONGO_URI (Add db name at the end
example:
mongodb+srv://<cluster-url>/DATABASE_NAME?authSource=%24external&authMechanism=MONGODB-X509&retryWrites=true&w=majority
) - MONGO_CERT_PATH
- MONGO_URI (Add db name at the end
example:
- Set in
src/config.py
:- MONGO_MODE = "atlas" (from localhost to atlas)
- Set in
-
Start the bot. Be in the repository root directory.
python src/main.py
Additionally, this comes with a pre-made pre-commit config to keep your code clean.
It is recommended that you set this up by running:
pip install pre-commit
pre-commit install
- Birthday Event extension
- Add Mongo DB for persistence
- Meeting Scheduler
- create event while creating the object