A general purpose custom Discord bot that adds useful features as well as fun little tricks to keep members entertained.
- discord.py
- A bot token. must authorize here
- .env
- Motor
- pymongo
- Python 3.x
To set up locally, first pull the repo
git clone https://github.com/tscheer100/Dusk-Bot.gitthen create a .env file within the root folder of the repo.
touch .envedit the .env file
nano .envonce in the file, add your discord token with the following syntax
DISCORD_TOKEN="U2OTA3MTQ3ODk5Njkjkz.X2Yqtg.FSGfvEqZILo"
run the bot using python
python3 dusk.py- Tenerary Operators and how to use them to circumnavigate Discord embed's lack of support for regular
if-elsestatements. - Familiarized myself with
.gitignoreas not to leak data to the public. - learned about
.envand how it can be used to seperate data from the rest of the code. - Strengthened knowledge on Discord's API with
discord.py - Dipped my toes in the difference between handling discord specific errors and python errors. the discord specific errors can be found here
- Dealt with SSH and raspberry pi. learned that pi zeros only support 2.4ghz band.
- Learned about embed editing.
- Got more experience integrating JSON into Python.
- Gained more understanding as to when to use the
selfcommand to call other methods within a class. - learned about MongoDB and how it is not good with discord.py and rather to use Motor to stop with blocking
- learned the basics of database manipulation
- learned how to call a method from one cog to another
- learned about the
reversedcommand