Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Documentation/admin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
admin.py

Function
is_admin, takes in a discord members @
Gets the server's list of roles with admin and compares if the member has one of them.

define, takes in user's role
only works for the server owner to set which roles have and are admins


27 changes: 27 additions & 0 deletions Documentation/dues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
set-dues.py

Functions

set_dues_starters, takes in input amount
Checks for admin role, if the user doesn't have admin ends interaction.
Then select rows named dues/$ and changes column named starter in the database to the new amount. If the rows don't exist then it create them with default value then edits the column starter to the input value


set_dues_substitutes, takes in input amount
Checks for admin role, if the user doesn't have admin ends interaction.
Then select rows named dues/$ and changes column named substitues in the database to the new amount. If the rows don't exist then it create them with default value then edits the column substitues to the input value

set_dues_non_players, takes in input amount
Checks for admin role, if the user doesn't have admin ends interaction.
Then select rows named dues/$ and changes column named substitues in the database to the new amount. If the rows don't exist then it create them with default value then edits the column substitues to the input value


generate.py

Function

generate_dues,
Checks for admin role, if the user doesn't have admin ends interaction
Then checks if dues has been set and if there is an active team.
If both are set then create a workbook with sheets for active team games which record the active team's detail and fees in a preset format style

12 changes: 12 additions & 0 deletions Documentation/unit_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
for set-dues
run the set command fill with # input, modify the database by adding a player run the command again
delete all dues then run command
delete half of dues then run commmand
test multiple roles with and without admin
test if dicord server admin can use set dues, not admin set from admin.py
test if removed admin can still use command

for admin.py
add then remove admin
add admin to a role then remove the role server side, check if when readded it still has admin