diff --git a/discord/abc.py b/discord/abc.py index 75624e18f..0ac87d135 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE. """ import abc +import sys import copy import asyncio @@ -169,7 +170,7 @@ class _Overwrites: self.id = kwargs.pop('id') self.allow = kwargs.pop('allow', 0) self.deny = kwargs.pop('deny', 0) - self.type = kwargs.pop('type') + self.type = sys.intern(kwargs.pop('type')) def _asdict(self): return { diff --git a/discord/member.py b/discord/member.py index 4b8fb8a07..59bd7bda5 100644 --- a/discord/member.py +++ b/discord/member.py @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE. """ import itertools +import sys from operator import attrgetter import discord.abc @@ -221,10 +222,10 @@ class Member(discord.abc.Messageable, _BaseUser): clone = cls(data=data, guild=guild, state=state) to_return = cls(data=data, guild=guild, state=state) to_return._client_status = { - key: value + sys.intern(key): sys.intern(value) for key, value in data.get('client_status', {}).items() } - to_return._client_status[None] = data['status'] + to_return._client_status[None] = sys.intern(data['status']) return to_return, clone @classmethod @@ -266,10 +267,10 @@ class Member(discord.abc.Messageable, _BaseUser): def _presence_update(self, data, user): self.activities = tuple(map(create_activity, data.get('activities', []))) self._client_status = { - key: value + sys.intern(key): sys.intern(value) for key, value in data.get('client_status', {}).items() } - self._client_status[None] = data['status'] + self._client_status[None] = sys.intern(data['status']) if len(user) > 1: return self._update_inner_user(user)