aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-03-24 21:50:19 -0400
committerRapptz <[email protected]>2017-03-24 21:50:19 -0400
commitb88658f42fbe1af869745be649a1de579d798f4d (patch)
tree3f0e656ecdaf8fc0a89160e0cc5d0caca91d28ef
parentFix memory leak by holding on to Emoji references weakly. (diff)
downloaddiscord.py-b88658f42fbe1af869745be649a1de579d798f4d.tar.xz
discord.py-b88658f42fbe1af869745be649a1de579d798f4d.zip
Allow Emoji to be used in a weakref.
-rw-r--r--discord/emoji.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/emoji.py b/discord/emoji.py
index ff839c4d..0e2158ec 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')
+ __slots__ = ('require_colons', 'managed', 'id', 'name', 'roles', 'guild', '_state', '__weakref__')
def __init__(self, *, guild, state, data):
self.guild = guild