mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Change _Overwrite to get dict entries rather than mutate
This commit is contained in:
parent
cb2363f0fd
commit
99b8ae35ba
@ -196,10 +196,10 @@ class _Overwrites:
|
||||
MEMBER = 1
|
||||
|
||||
def __init__(self, data: PermissionOverwritePayload):
|
||||
self.id: int = int(data.pop('id'))
|
||||
self.allow: int = int(data.pop('allow', 0))
|
||||
self.deny: int = int(data.pop('deny', 0))
|
||||
self.type: OverwriteType = data.pop('type')
|
||||
self.id: int = int(data['id'])
|
||||
self.allow: int = int(data.get('allow', 0))
|
||||
self.deny: int = int(data.get('deny', 0))
|
||||
self.type: OverwriteType = data['type']
|
||||
|
||||
def _asdict(self) -> PermissionOverwritePayload:
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user