From ec3435b22418d36a01c04d2098a70d71844a4c87 Mon Sep 17 00:00:00 2001 From: bmintz Date: Sat, 30 Jun 2018 02:14:05 -0500 Subject: Remove remaining asyncio.coroutine calls. Also remove Client.async_event --- discord/guild.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'discord/guild.py') diff --git a/discord/guild.py b/discord/guild.py index 4c2fc1fa..8f770b19 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -25,7 +25,6 @@ DEALINGS IN THE SOFTWARE. """ import copy -import asyncio from collections import namedtuple, defaultdict @@ -794,8 +793,7 @@ class Guild(Hashable): await http.edit_guild(self.id, reason=reason, **fields) - @asyncio.coroutine - def get_ban(self, user): + async def get_ban(self, user): """|coro| Retrieves the :class:`BanEntry` for a user, which is a namedtuple @@ -824,7 +822,7 @@ class Guild(Hashable): BanEntry The BanEntry object for the specified user. """ - data = yield from self._state.http.get_ban(user.id, self.id) + data = await self._state.http.get_ban(user.id, self.id) return BanEntry( user=User(state=self._state, data=data['user']), reason=data['reason'] -- cgit v1.2.3