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

discord.PermissionOverwite cannot set kwargs or any other attrubute #7118

Closed
3 tasks done
shadeyg56 opened this issue Jun 27, 2021 · 1 comment
Closed
3 tasks done
Labels
no repro Cannot be reproduced.

Comments

@shadeyg56
Copy link

shadeyg56 commented Jun 27, 2021

Summary

I am attempting to use discord.PermissionOverwrite to overwrite permissions for a channel. Upon setting the read_messages or send_messages kwargs or attributes it returns an error AttributeError: PermissionOverwrite' object attribute 'read_messages' is read-only`

Reproduction Steps

  1. create a basic command
  2. assign discord.PermissionOverwrite() to a var
  3. attemp to set read_messages to True
  4. run command and see traceback

Minimal Reproducible Code

@commands.command()
async def test(self, ctx):
    overwrite = discord.PermissionOverwrite()
    overwrite.read_messages = True # this line causes error
    overwrite.set_messages = True # this line also raises error. I have not tried with any other perms
    # discord.PermissionOverwrite(read_messages=True) raises same error

Expected Results

No error should be returned and should be able to set kwargs in constructor or attributes

Actual Results

AttributeError: 'PermissionOverwrite' object attribute 'read_messages' is read-only is raised

Intents

default and reactions

System Information

  • Python v3.9.5-final
  • discord.py v1.7.3-final
  • aiohttp v3.7.4.post0
  • system info: Windows 10 10.0.19041

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@shadeyg56 shadeyg56 added the unconfirmed bug A bug report that needs triaging label Jun 27, 2021
@Rapptz Rapptz added no repro Cannot be reproduced. and removed unconfirmed bug A bug report that needs triaging labels Jun 27, 2021
@Rapptz
Copy link
Owner

Rapptz commented Jun 27, 2021

I cannot reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no repro Cannot be reproduced.
Projects
None yet
Development

No branches or pull requests

2 participants