Skip to content

Commit 4193e86

Browse files
Fix object is not iterable
1 parent 5ded51b commit 4193e86

File tree

3 files changed

+27
-21
lines changed

3 files changed

+27
-21
lines changed

pyrogram/types/messages_and_media/gifted_premium.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ async def _parse(
113113
month_count=action.months,
114114
sticker=random.choice(
115115
types.List(
116-
await types.Sticker._parse(
117-
client,
118-
doc,
119-
{
120-
type(i): i for i in doc.attributes
121-
}
122-
) for doc in raw_stickers.documents
116+
[
117+
await types.Sticker._parse(
118+
client,
119+
doc,
120+
{
121+
type(i): i for i in doc.attributes
122+
}
123+
) for doc in raw_stickers.documents
124+
]
123125
)
124126
),
125127
caption=caption,

pyrogram/types/messages_and_media/gifted_stars.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,15 @@ async def _parse(
106106
transaction_id=getattr(action, "transaction_id", None),
107107
sticker=random.choice(
108108
types.List(
109-
await types.Sticker._parse(
110-
client,
111-
doc,
112-
{
113-
type(i): i for i in doc.attributes
114-
}
115-
) for doc in raw_stickers.documents
109+
[
110+
await types.Sticker._parse(
111+
client,
112+
doc,
113+
{
114+
type(i): i for i in doc.attributes
115+
}
116+
) for doc in raw_stickers.documents
117+
]
116118
)
117119
)
118120
)

pyrogram/types/messages_and_media/giveaway_prize_stars.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ async def _parse(
105105
giveaway_message=parsed_message,
106106
sticker=random.choice(
107107
types.List(
108-
await types.Sticker._parse(
109-
client,
110-
doc,
111-
{
112-
type(i): i for i in doc.attributes
113-
}
114-
) for doc in raw_stickers.documents
108+
[
109+
await types.Sticker._parse(
110+
client,
111+
doc,
112+
{
113+
type(i): i for i in doc.attributes
114+
}
115+
) for doc in raw_stickers.documents
116+
]
115117
)
116118
)
117119
)

0 commit comments

Comments
 (0)