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
Help System: Move dormant faster if help channel is empty #956
Merged
SebastiaanZ
merged 9 commits into
python-discord:master
from
ks129:help-channels-delete
May 24, 2020
Merged
Help System: Move dormant faster if help channel is empty #956
SebastiaanZ
merged 9 commits into
python-discord:master
from
ks129:help-channels-delete
May 24, 2020
Conversation
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
This show how much minutes should this wait before making channel dormant when no messages in channel (original message deleted).
- Created function `is_empty` that check is there any message in channel after bot own available message. - `on_message_delete` that reschedule task when message is on correct channel and is empty. - In `move_idle_channel` function, implemented choosing right cooldown, based on is channel empty or not.
MarkKoz
added
a: help channels
Related to the help channel system
p: 1 - high
High Priority
t: feature
New feature or request
labels
May 21, 2020
MarkKoz
requested changes
May 21, 2020
MarkKoz
added
the
s: waiting for author
Waiting for author to address a review or respond to a comment
label
May 21, 2020
Co-authored-by: Mark <kozlovmark@gmail.com>
- Created function `embed_description_match`. - Implemented this to `is_empty` - Implemented this to `is_dormant_message`
It was being done repeatedly outside the function so let's move it in to reduce redundancy.
At this point, it's just a thin wrapper to call another function. It's redundant.
MarkKoz
approved these changes
May 22, 2020
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.
Fixed missing awaits and also did some refactoring. Tested it locally and it works.
SebastiaanZ
approved these changes
May 24, 2020
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.
Tested locally and it works.
Xithrius
removed
the
s: waiting for author
Waiting for author to address a review or respond to a comment
label
May 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: help channels
Related to the help channel system
p: 1 - high
High Priority
t: feature
New feature or request
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.
Closes #939
on_message_delete
, that reschedule a task, whenis_empty
returnTrue
and channel is insidehelp in-use
category.move_idle_channel
check, is channel empty and when it is, this uses correct (shorter)idle_seconds
.is_empty
request last message and then check, is this bot available message.