Fix permission settings for QOTW submissions channel in QOTW jobs#514
Merged
danthe1st merged 1 commit intoJava-Discord:mainfrom Apr 14, 2025
Defective4:main
Merged
Fix permission settings for QOTW submissions channel in QOTW jobs#514danthe1st merged 1 commit intoJava-Discord:mainfrom Defective4:main
danthe1st merged 1 commit intoJava-Discord:mainfrom
Defective4:main
Conversation
danthe1st
approved these changes
Apr 14, 2025
Member
danthe1st
left a comment
There was a problem hiding this comment.
LGTM and it works in my tests.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
JavaBot is meant to revoke users' permissions to send messages in threads in QOTW submissions channel after the QOTW submission period ends.
Currently after the submission period ends the bot resets all of the channel's role overrides for
@everyoneand doesn't deny theMESSAGE_SEND(and other) permissions until the next submission period starts, meaning that all members are allowed to send messages in the submissions channel during that short window of time.Also since the bot resets the channel permissions at the start and end of submission period and does NOT set other permissions such as
CREATE_PRIVATE_THREADSandMESSAGE_ADD_REACTION, all members are allowed to create new threads manually and add message reactions at all times.This pull request fixes both of these issues by ensuring that
MESSAGE_SENDpermission is set to denied at the end of the submission period, and by denying the following permissions at both start and end of the period:CREATE_PRIVATE_THREADSCREATE_PUBLIC_THREADSMESSAGE_ADD_REACTION