From 7f58853e3a2df34bf2fe77121fbb57cf3054f5ab Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 29 Mar 2017 04:35:06 -0400 Subject: Keep track of Emoji instances myself. WeakValueDictionary cleans up too late and brings too little benefit. Also clean up the state when the first READY is encountered for AutoShardedClient and when any READY is encountered in regular Client. --- discord/emoji.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/emoji.py') diff --git a/discord/emoji.py b/discord/emoji.py index 0e2158ec..ff839c4d 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -73,7 +73,7 @@ class Emoji(Hashable): A list of :class:`Role` that is allowed to use this emoji. If roles is empty, the emoji is unrestricted. """ - __slots__ = ('require_colons', 'managed', 'id', 'name', 'roles', 'guild', '_state', '__weakref__') + __slots__ = ('require_colons', 'managed', 'id', 'name', 'roles', 'guild', '_state') def __init__(self, *, guild, state, data): self.guild = guild -- cgit v1.2.3