Skip to content

Commit f501ab0

Browse files
committed
Cleanup
1 parent 36b474c commit f501ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,6 @@ async def pins(self, *, before: Optional[datetime] = None, limit: Optional[int]
17491749
List[:class:`~discord.Message`]
17501750
The messages that are currently pinned.
17511751
"""
1752-
state = self._state
17531752
if before is not None:
17541753
if not isinstance(before, datetime):
17551754
raise TypeError(f'before must be a datetime object, not {before.__class__!r}')
@@ -1758,6 +1757,7 @@ async def pins(self, *, before: Optional[datetime] = None, limit: Optional[int]
17581757
'before must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.'
17591758
)
17601759

1760+
state = self._state
17611761
channel = await self._get_channel()
17621762
data = await state.http.pins_from(channel.id, before=before.isoformat() if before else None, limit=limit)
17631763
ret: List[Message] = []

0 commit comments

Comments
 (0)