Fix permission settings for QOTW submissions channel in QOTW jobs #514
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
@everyone
and 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_THREADS
andMESSAGE_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_SEND
permission 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_THREADS
CREATE_PUBLIC_THREADS
MESSAGE_ADD_REACTION