This repository contains code contribute by NUSCAS Palette Members.
The project encompasses a Discord Bot which currently supports the following features:
Feature | Description |
---|---|
Birthday Tracker | From an excel sheet on Google Drive, tracks birthday dates and reminds the Discord channel when a date corresponds with a member's birthdate. |
Artwork Image Dumper | From an excel sheet on Google Drive, tracks artwork permissions and dumps artworks from a selected Discord Channel. |
Inktober Tracker | Runs the Inktober minigame for one month. |
Waifu War Tracker | Work in progress. Tracks scores for Waifu Wars. |
- Basic Command Line interface
- Version control with Git and Github
- Discord Library for Python (Google as you go)
- Python Pandas
-
- Python
- Pandas
-
- You don't need to know everything. Just look up what you happen to need to know.
-
Software Engineering @ CS2113/T
- Good place to learn version control
- Learn about Forking Workflow
-
Stack Overflow. Seriously.
- Install Python 3.9.5 as well as Pip.
- Install Git.
- Download an IDE. VSCode is the recommended IDE for this project. You can also look at Pycharm or Sublime.
- Fork the repository to your own repository.
- Open up a new command terminal.
- Clone the repository to your local directory.
git clone https://github.com/yourname/palettebot.git
- Set up a python virtual environment.
python -m venv env
- Start your python virtual environment.
env\Scripts\activate.bat
- Run pip install
pip install -r requirements.txt
- Run the script and verify that it works.
python app.py
-
Procfile
,runtime.txt
- Heroku files. Heroku is a cloud service that we use to run the script 24/7. This means no one needs to leave their computer on forever.
-
config_loader.py
- If script is run from Heroku, then use actual channels for input and output. (#art-gallery, #general)
- Else if script is run from a PC (local environment), then use test channels. (#bot-spam, #exco-chat)
-
controller/
- Main folder for files encompassing feature logic
-
io/
- Main folder for image files, or any other output artifacts that are not required in feature logic
-
utils/
- If alot of features use the same function, then consolidate in this folder.
-
.gitignore
- Some features require automated access to Google Sheet and stuff.
- Since they are mostly sensitive data, we need to protect it with credentials.
- Instead of a login page, verifying credentials in code is provision of a certain file, for instance
credentials.json
- We want our keys in our own pockets (local directory), but we don't wnat them on some random garden bench (Github repository)
- This file is to tell Github which files to not put onto this garden bench.
-
requirements.txt
- To do cooler stuff in python, you need to use other people's code to build your own code. We call them libraries.
- This file contains all libraries that a new developer must download so that the code has what it needs to run.