aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-25 21:38:50 -0500
committerRapptz <[email protected]>2017-01-25 21:38:50 -0500
commitb876133e87b29a6959eb766d006fa6b57db1037e (patch)
tree420643e1d71aaefc460f36ffe421c1a8108d54a3 /discord/state.py
parentRemove unused ChannelPermissions namedtuple. (diff)
downloaddiscord.py-b876133e87b29a6959eb766d006fa6b57db1037e.tar.xz
discord.py-b876133e87b29a6959eb766d006fa6b57db1037e.zip
Add compatibility shim for asyncio.Future creation.
Should provide better support for uvloop.
Diffstat (limited to 'discord/state.py')
-rw-r--r--discord/state.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py
index 6b6a8fc6..1a511161 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -739,7 +739,7 @@ class ConnectionState:
return Message(state=self, channel=channel, data=data)
def receive_chunk(self, guild_id):
- future = asyncio.Future(loop=self.loop)
+ future = compat.create_future(self.loop)
listener = Listener(ListenerType.chunk, future, lambda s: s.id == guild_id)
self._listeners.append(listener)
return future