aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-07-05 21:32:46 -0400
committerRapptz <[email protected]>2021-07-07 20:19:17 -0400
commit99b8ae35ba88d21391f12d2f9964a623435dc7c5 (patch)
tree88a7a696d2a04f28ad412d4633f6ded70c1fc61b
parentMove global user storage from WeakValueDictionary to dict (diff)
downloaddiscord.py-99b8ae35ba88d21391f12d2f9964a623435dc7c5.tar.xz
discord.py-99b8ae35ba88d21391f12d2f9964a623435dc7c5.zip
Change _Overwrite to get dict entries rather than mutate
-rw-r--r--discord/abc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/abc.py b/discord/abc.py
index 92a66701..6efb2cd7 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -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 {