diff --git a/Documentation/admin.md b/Documentation/admin.md new file mode 100644 index 0000000..4ecc780 --- /dev/null +++ b/Documentation/admin.md @@ -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 + + \ No newline at end of file diff --git a/Documentation/dues.md b/Documentation/dues.md new file mode 100644 index 0000000..5f02c44 --- /dev/null +++ b/Documentation/dues.md @@ -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 + \ No newline at end of file diff --git a/Documentation/unit_test.md b/Documentation/unit_test.md new file mode 100644 index 0000000..6d53317 --- /dev/null +++ b/Documentation/unit_test.md @@ -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 + \ No newline at end of file