mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
pyrofork: Fix IndexError error in Client.get_stories
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
7a9ffa2506
commit
d863655769
1 changed files with 1 additions and 1 deletions
|
|
@ -74,4 +74,4 @@ class GetStories:
|
|||
|
||||
if is_iterable:
|
||||
return types.List([await types.Story._parse(self, story, peer) for story in r.stories])
|
||||
return await types.Story._parse(self, r.stories[0], peer)
|
||||
return await types.Story._parse(self, r.stories[0], peer) if r.stories and len(r.stories) > 0 else None
|
||||
|
|
|
|||
Loading…
Reference in a new issue