Compare commits

..

2 Commits

Author SHA1 Message Date
72d3432d44 Documentation Updates 2021-08-06 12:26:15 +01:00
27ab3bde67 Rebuilt to use python:slim instead of buster
Reduced footprint of the image to less than a quarter from before.
Compatibility with Opus and Numpy still maintained as it is Debian based
2021-08-06 12:20:25 +01:00
3 changed files with 14 additions and 106 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## Minor Updates in Version 3.1
- Re-builds the Docker image to use a `python:slim` base instead of `python:buster`, reducing the footprint of the image to a quarter of its previous size.
## Major Changes in Version 3
- Discards the database engine in favour of data storage in `.yml` files

108
TODO.md
View File

@ -1,107 +1,11 @@
# To Do
# To Do for Version 3.1
- [ ] Testing
- [x] Dockerise
- [ ] Infer/Transfer data from old bot
- [ ] Deploy
## Docker
## Bot Architecture
- [x] Simplify directory tree
- [x] Split event listeners into individual cogs.
- [x] Update with re-organised data and config structure
- [x] Correct references to data in existing cogs.
- [x] Setup minimally functioning configs of guild on startup
- [x] Synchronise core configuration `/commands` on startup
- [ ] ~~Synchronise secondary `/commands` on complete configuration~~ ``(see below)``
- [x] Re-build using `python:slim` as base image
## Bot Functionality and Processes
- [ ] ~~'Delete Commands' Function~~
- [ ] ~~'Register Commands' Function~~
- [x] Infer Permissions from Config
- [x] Dynamic Command Prefixes
- [ ] Infer current games from Server Structure
`Create a separate cog to do this instead of having a migrate command, install the cog temporarily and remove the cog once migration is done.`
- [ ] Re-enable logging
- [x] Delete Dev/Test Functions
- [x] Error handlers
- [x] Debug Features
- [ ] ~~Command Installer/Uninstaller~~
- [x] Help Channel Event Listener
- [x] Add Config key for Help Channel
- [ ] ~~Slash Command Buttons or~~ `This kind of got subsumed into other features.`
- [ ] ~~Reaction listener selectors~~ `So did this.`
- [x] Member Verification
- [x] Add Config key membership signup channels
- [x] Add config keys: Membership Category Roles
- [x] Message Receive listener
- [x] ~~Message React listener~~ or buttons `Used buttons waiting within the same command thread. Possibly update to global listener if performance is affected.`
- [x] Membership Restriction
- [x] Message Receive Listener
- [x] Membership Validation Listener
- [x] Re-synchronise commands after any relevant config changes `(See from above)`
- [ ] Role Delete (~~member~~, ~~admin~~, ~~game~~) `Admin role missing won't cause any issues as server role will still remain in control`
`Deleting membership roles will also trigger a mess. Event listener will trigger and attempt to execute simultaneously with the command to delete the role, which will cascade into several errors. In order to make this work, it is best to have the commands interact solely with the roles, and then subsequently the listeners to sync with the data.`
- [ ] ~~Channel delete (notifications, logs, game text channel)~~ `There aren't any critical settings that depend on this just yet, and it is hard to set this up without circularity`
- [ ] ~~Category delete (games)~~ `Circularity problem: if the category delete event listener is set up, it will react to the bot deleting categories when managing games.`
- [x] Flag for checking completeness of configuration for a guild.
- [x] Function for checking configs for completeness
- [ ] ~~Synchronise game channel on role updates~~
- [ ] ~~Exception to event listener to prevent circularity~~ ~~`unsure what this means`~~
`I remember what this is now: if you have a listener for when roles get deleted, and if the bot deletes a role, then it triggers the listener. It might be worth restructuring this such that the Bot command only deletes the role, which then triggers the listener that deletes the categories and synchronises data. That way, the roles can be deleted manually or via the command. Otherwise, it is not possible in the Discord API to have this exception, as the Bot only responds to the 'Guild' deleting the role, not the user or bot or admin that issued the command.`
## Event Listeners
## Review Configs When
- [x] Guild Changing Ownership
- [x] Roles Modified
- [x] Mod Channel Deleted
## Commands
- [x] Configure Bot function and sub commands
- [x] botrole (role group)
- [x] committeerole (role group)
- [x] modchannel (channel group)
- [x] help channel (channel group)
- [x] signup channel (channel group)
- [x] newcomer role (role group)
- [x] returning player role (role group)
- [x] student role (role group)
- [x] help notifications (notification group)
- [x] signup notifications (notification group)
- [x] Set up timeslots
- [x] Delete timeslots
- [x] Base command
- [x] ~~Delete all games with the timeslot~~
Do the opposite: block deleting timeslots with existing games.
- [x] List timeslots
- [x] Set up command permissions
- [x] Slash Commands
- [x] Admin Commands
- [x] Game Management Commands
- [x] Native Bot Commands
- [x] Migrate existing bot commands
- [x] setupgame
- [x] ~~definebotrole~~ config
- [x] deletegame
- [x] ~~reset~~ purge
- [ ] ~~migrate~~ `See above`
- [x] ~~kickplayer~~ `/player remove`
- [x] ~~addplayer~~ `/player add`
- [x] ~~leavegame~~ `/player leave`
- [x] Pitch command and sub-commands
- [ ] ~~run~~ `Combined both sub-commands into single command and prompt response.`
- [ ] ~~clear~~
## Misc
- [x] Review documentation
- [x] Finalise README.md
- [x] CHANGELOG.md
- [x] COMMANDS.md
- [x] resources.md
- [x] Make sure to document `not using discord_components and staying with discord-py-slash-commands library alone`.
- [ ] Add support for Discord Threads following Discord Py library update
- [ ] Update permission settings for GMs on game channels to support threads
- [ ] Change component response architecture to use dynamic callback functions instead of global listeners.

View File

@ -1,7 +1,7 @@
FROM python:3.9.6-slim
RUN apt-get update -y && apt-get upgrade -y && apt-get install libopus0 -y
FROM python:slim
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN apt-get update -y && apt-get upgrade -y && apt-get install libopus0 -y && \
pip install --upgrade pip && pip install -r requirements.txt && \
apt-get autoremove -y
CMD python3 -u ./bot.py