Skip to content

Adds Member Checks Before Changing Voice#1313

Merged
Senjan21 merged 5 commits into
python-discord:masterfrom
HassanAbouelela:fix-voiceban-member-bug
Feb 3, 2021
Merged

Adds Member Checks Before Changing Voice#1313
Senjan21 merged 5 commits into
python-discord:masterfrom
HassanAbouelela:fix-voiceban-member-bug

Conversation

@HassanAbouelela
Copy link
Copy Markdown
Contributor

@HassanAbouelela HassanAbouelela commented Nov 30, 2020

Closes #1309, closes #1370.

Checks is a user is a guild member, before performing guild operations (such as kicking from voice or removing roles) when using voice mute or general mute.

Adds a check that checks if the user object is an instance of guild
member, before performing guild operations. Adds tests.

Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com>
@HassanAbouelela HassanAbouelela added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: moderation Related to community moderation functionality: (moderation, defcon, verification) p: 2 - normal Normal Priority labels Nov 30, 2020
@ghost
Copy link
Copy Markdown

ghost commented Nov 30, 2020

Thank you for contributing to Python Discord!

Please check out the following documents:

@ghost ghost added the needs 2 approvals label Nov 30, 2020
@coveralls
Copy link
Copy Markdown

coveralls commented Nov 30, 2020

Coverage Status

Coverage increased (+0.06%) to 56.807% when pulling a41b932 on HassanAbouelela:fix-voiceban-member-bug into 9e1dd9d on python-discord:master.

@ks129
Copy link
Copy Markdown
Contributor

ks129 commented Nov 30, 2020

I think this is related with #1016

@HassanAbouelela
Copy link
Copy Markdown
Contributor Author

Ah, you're right, I didn't see that other issue.

@HassanAbouelela
Copy link
Copy Markdown
Contributor Author

Reopening, as this isn't actually a duplicate of #1016, and has been reported again in #1370. This handles a different error at a different stage from the one fixed in the other PR.

Comment thread bot/exts/moderation/infraction/infractions.py Outdated
Comment thread bot/exts/moderation/infraction/infractions.py Outdated
Updates the voice ban action so the infraction pardoning is always run,
and so all operations are handled in the _scheduler. Updates tests.
Copy link
Copy Markdown
Contributor

@Senjan21 Senjan21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks.

@Senjan21 Senjan21 merged commit de0afa3 into python-discord:master Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: moderation Related to community moderation functionality: (moderation, defcon, verification) p: 2 - normal Normal Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gracefully handle user not being present in voice ban Voice ban bug for non-members

5 participants