Skip to content

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

Draft
jplam123 wants to merge 5 commits intomasterfrom
WESVGBug
Draft

Fixed: Bug #196 permissions reset when creating rfr#239
jplam123 wants to merge 5 commits intomasterfrom
WESVGBug

Conversation

@jplam123
Copy link
Copy Markdown

@jplam123 jplam123 commented Aug 4, 2021

Signed-off-by: Jonathan jplam12345@gmail.com

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.

Signed-off-by: Jonathan <jplam12345@gmail.com>
Signed-off-by: Jonathan <jplam12345@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 4, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.48%. Comparing base (baf65a6) to head (781bcde).
⚠️ Report is 505 commits behind head on master.

Additional details and impacted files
@@           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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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
Comment thread CHANGELOG.md
Copy link
Copy Markdown
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
Copy Markdown
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 thread cogs/ReactForRole.py
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
Copy Markdown
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
Copy Markdown
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