Skip to content
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

Fixed: Bug #196 permissions reset when creating rfr #239

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jplam123
Copy link

@jplam123 jplam123 commented Aug 4, 2021

Signed-off-by: Jonathan [email protected]

Summary

fixes bug where it would default permissions if a rfr is created close #196

Checklist

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

  • Have you tested the changes? (pytest & dpytest)
  • Have you followed PEP-8 for naming and styling?
  • Has your code been properly documented with RestructuredText docstrings?
  • Have you added your changes to CHANGELOG.md under the [Unreleased] heading?
  • If your code added new bot commands, have you updated documentation.json?

  • All of this code is your own, or follows the author repo's licence.

@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #239 (781bcde) into master (baf65a6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   83.48%   83.48%           
=======================================
  Files          27       27           
  Lines        6671     6672    +1     
=======================================
+ Hits         5569     5570    +1     
  Misses       1102     1102           
Flag Coverage Δ
unittests 83.48% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cogs/ReactForRole.py 54.10% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update baf65a6...781bcde. Read the comment docs.

@jplam123 jplam123 marked this pull request as ready for review August 4, 2021 12:52
@jplam123 jplam123 requested a review from Kaspiaan August 4, 2021 12:53
@jplam123 jplam123 self-assigned this Aug 4, 2021
Copy link
Member

@Kaspiaan Kaspiaan left a comment

Choose a reason for hiding this comment

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

Please change changelog to show this is an update to the rfr cog

Copy link
Member

@JayDwee JayDwee left a comment

Choose a reason for hiding this comment

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

Just one change, and what Kieran has already mentioned

Comment on lines 939 to +940
role: discord.Role = discord.utils.get(guild.roles, id=guild.id)
overwrite: discord.PermissionOverwrite = discord.PermissionOverwrite()
overwrite.update(add_reactions=False)
await channel.set_permissions(role, overwrite=overwrite)
perms = channel.overwrites_for(role)
Copy link
Member

Choose a reason for hiding this comment

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

All current roles should have the add_reactions perm set to false, not just everyone. (although this successfully doesn't screw with other perms, as mentioned in issue, gj!)

@JayDwee
Copy link
Member

JayDwee commented Aug 18, 2021

Looks like @jplam123 won't be continuing with us, please reassign @Kaspiaan

@VirajShah18 VirajShah18 marked this pull request as draft November 9, 2021 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permissions reset
3 participants