Fix async_generator's and missing awaits

This commit is contained in:
Lonami Exo
2018-06-10 22:00:55 +02:00
parent 8be6adeab4
commit f86f52d960
4 changed files with 22 additions and 10 deletions

View File

@@ -244,7 +244,9 @@ class MessageMethods(UploadMethods, MessageParseMethods):
else:
kwargs['limit'] = 1
msgs = UserList(x async for x in self.iter_messages(*args, **kwargs))
msgs = UserList()
async for x in self.iter_messages(*args, **kwargs):
msgs.append(x)
msgs.total = total[0]
if 'ids' in kwargs and not utils.is_list_like(kwargs['ids']):
return msgs[0]