-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roleboard #46
Open
gmcaguilar
wants to merge
108
commits into
master
Choose a base branch
from
roleboard
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Roleboard #46
Changes from 4 commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
2a006d2
get_role_by_name and generalized exceptions for that and get_channel_…
Chovin 5a726ed
Merge branch 'master' into roleboard
Chovin ee7e78a
made get_or_create method
gmcaguilar ea2bbbd
added UI Specification and appended missing await keyword for async f…
gmcaguilar 08ffe37
removed redundant .lower() call
gmcaguilar 3a77e99
Merge branch 'master' into roleboard
gmcaguilar 6bab6b4
change loop in get_or_create to discord.utils.get
gmcaguilar c8ab930
fix indentation
gmcaguilar 3c41795
add a try-except in case role is not found in the list
gmcaguilar d10669e
add try except blocks in case user has no privileges to create a role…
gmcaguilar f760ee4
add comments to get_or_create
gmcaguilar 1803c2e
added create_channel functionality if channel specified does not exist
gmcaguilar aa0051e
added description for get_or_create method
gmcaguilar 641d8b0
added reaction argument
gmcaguilar c92f6e3
fixed case-sensitive bug for channel names
gmcaguilar 6328964
implemented check if the user is trying to create a channel or add a …
gmcaguilar cef629b
created make_entry function for constructing roleboard entries
gmcaguilar 2ae8cc2
fix un-awaited coro function call
gmcaguilar ab35a95
made some changes on the expected UI
gmcaguilar 3bb1914
transferred create channel feature to the 2nd channel argument
gmcaguilar 369ee69
added .gitignore for sample screenshots
gmcaguilar 2c70697
initial entries data structure draft
gmcaguilar fb08ef2
updated default JSON format
gmcaguilar aeb15b8
use raw_channel_mentions instead to account for repeated channel ment…
gmcaguilar 256481d
use get_channel since raw_channel_mentions return a list of channel I…
gmcaguilar b02be32
updated description for add command
gmcaguilar ef29123
additional updates to add command description
gmcaguilar 4e145ec
removed embed option and added feature that adds a role to an existin…
gmcaguilar fe9f92a
wrote post_role function
gmcaguilar a0b5088
no need to list the roles since it hinders freedom for message to be …
gmcaguilar ad1310d
removed debugging tests
gmcaguilar ccb29d3
modified post_role to get message object then post role reaction to it
gmcaguilar 0ce6bb7
fixed consistency check because it was duplicating keys
gmcaguilar 4c1af98
change function name to _record_entry
gmcaguilar c234f3d
updated description since it doesn't really "construct" anything
gmcaguilar e0b33c9
updated description again--simplified previous description
gmcaguilar 5630ca0
updated descriptions again to be more accurate
gmcaguilar fd514cf
updated comments to reflect actual process
gmcaguilar a915104
updated structure of settings file
gmcaguilar 9923a0b
wrote Entry class constructor
gmcaguilar d8685e6
make Entry object and pass it to _record_entry() instead
gmcaguilar c72bb83
save changes to file
gmcaguilar 6b1c564
moved _save() to correct location(placed it incorrectly in the previo…
gmcaguilar ca7fc59
corrected variable name mismatch
gmcaguilar 609a783
changed default settings structure
gmcaguilar 9f5005d
modified _record_entry() caused by changed structure of settings file
gmcaguilar 62b74b4
fixed incorrect dict key
gmcaguilar dab4a2f
forgot to include channel id with the keyring
gmcaguilar 6ec53db
updated default structure of settings file
gmcaguilar 63b3014
make role and reaction optional for Entry constructor
gmcaguilar 6f9d741
simplified structure of settings file
gmcaguilar 367008e
initial blueprint of on_socket_raw_receive
gmcaguilar 8feb3d5
wrote _check_entry() which checks if passed entry exists in settings …
gmcaguilar 878464b
check if reaction add entry exists in the settings file
gmcaguilar 8203fc9
record role name too
gmcaguilar 9043b15
changed settings structure since an entry can contain multiple roles
gmcaguilar f8f04c5
wrote _get_role_from_entry to retrieve a role from the settings file …
gmcaguilar 73b0a50
completed on_socket_raw_receive tasks
gmcaguilar c1d1313
prevent bots from gaining roles so roles are not assigned to the bot …
gmcaguilar 43e3392
fixed circular reference in _record_entry()
gmcaguilar 3f05fab
changed shallow copy to deep copy since it overwrites previous record…
gmcaguilar 8a7c32a
refined the description and the attribute names of an Entry object to…
gmcaguilar bce1fb5
entry object accepts content or message id now instead of message object
gmcaguilar f9fd841
an Entry object is now passed to post_entry() and post_role() to make…
gmcaguilar f35cdbb
updated _record_entry() because of changes made to the attributes of …
gmcaguilar 266821e
assign message id to content_or_message_id after a post_entry instanc…
gmcaguilar bac7d53
pass entry object to post_role() and post_entry() since that's the on…
gmcaguilar 1fb8f7d
pass message id instead since Entry does not accept message object an…
gmcaguilar eca8bb8
fixed functions that still contained references to old message object…
gmcaguilar 52bf96b
fixed overlooked unmodified attribute assignments in the Entry constr…
gmcaguilar 0fb5ea1
fixed another unchanged attribute assignment statement
gmcaguilar d8d1b76
fixed unchanged old attribute name references
gmcaguilar 5f7fd10
fixed more unchanged Entry attribute references
gmcaguilar 8122b8d
refined broleboard add description and option names. Also, rearranged…
gmcaguilar 11411b7
added feature that unassigns role from user if he removes his reaction
gmcaguilar 4edec6b
queued reaction events but spamming problem is not fixed yet. Also, f…
gmcaguilar a94ba3d
implemented random role color generator
gmcaguilar 6eb51a5
implemented option to create a personal channel for the role
gmcaguilar f9f01ca
updated roleboard add description
gmcaguilar 32a1ad9
added try-catch blocks for potential errors caused by passing in exis…
gmcaguilar 6b8e922
added fix for spamming
gmcaguilar 132cad3
modified to accept both unicode and custom emojis for flexibility
gmcaguilar dbf01c3
added functionality for providing both existing and non-existing role…
gmcaguilar 065a7c4
cleaned up spacing and comments for readability and maintenance
gmcaguilar 159cf7e
removed roleboard channel command
gmcaguilar dce5f35
delete outdated UI specification file
gmcaguilar 2b04f76
updated descriptions of add command and create_or_edit_role_channel
gmcaguilar f9785fd
updated info.json
gmcaguilar 6608e9f
changed "roleboard" to "rolecall" to avoid confusion for the users
gmcaguilar 2b8c959
revamped the add command's argument names to be more intuitive. Also,…
gmcaguilar 11a3c04
fixed unchanged "roleboard" keyword
gmcaguilar 3323b97
updated description of add command to be more readable
gmcaguilar 850d393
allow user to either mention the role or specify its name
gmcaguilar fadf7e9
applied fix for acceptance of both unicode and custom emojis #47
gmcaguilar 707ad4b
used isinstance instead for type checking to allow support for parent…
gmcaguilar 47f7037
applied fix for the case when roles or channels are mentioned in the …
gmcaguilar 34af3cf
added fix for spam prevention issue by splitting up the reaction set #48
gmcaguilar 56f59ed
added a duplicate role prevention feature to avoid linking the same r…
gmcaguilar 5a676e1
created isduplicate() to check if emoji or role has been used in the …
gmcaguilar c670fcf
remove redundant .png ignore
gmcaguilar 6d7ebd4
remove unused import of threading module
gmcaguilar 37d82d4
fixed accidental comment indentation
gmcaguilar fb26927
fixed incorrect logic on role creation that could cause the role_obje…
gmcaguilar 62a7e2c
added permission checking to avoid creation of entries that are non-f…
gmcaguilar 336c2f1
created __unload method for cancelling looped task
gmcaguilar be67606
used specific Exception classes instead of catch-all exceptions to av…
gmcaguilar 2b9b585
added check for mod status if command is invoked
gmcaguilar c11ed06
create a separate method for checking if a role was mentioned
gmcaguilar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
rolecall/**/*.png | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whhhhhat?
you're getting or creating a role, but then if it already exists, you're deleting the role and then trying to get it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Check if the passed argument contains a role id(AKA a role mention) and if it does, delete the role that was created earlier and just get the role associated with the id found