Skip to content

Commit 36b474c

Browse files
committed
Fix Messageable.pins
1 parent 7d7b2f5 commit 36b474c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discord/abc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,12 @@ async def pins(self, *, before: Optional[datetime] = None, limit: Optional[int]
17601760

17611761
channel = await self._get_channel()
17621762
data = await state.http.pins_from(channel.id, before=before.isoformat() if before else None, limit=limit)
1763+
ret: List[Message] = []
1764+
for m in data["items"]:
1765+
message = state.create_message(channel=channel, data=m["message"])
1766+
message._pinned_at = utils.parse_time(m.get("pinned_at"))
1767+
ret.append(message)
1768+
return ret
17631769

17641770
async def history(
17651771
self,

0 commit comments

Comments
 (0)