From f501ab0c5b5f4b88e541bcebd1ceb355c8d5557b Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Sat, 14 Jun 2025 15:48:08 +0200 Subject: [PATCH] Cleanup --- discord/abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/abc.py b/discord/abc.py index f083e0db4..ab70ff01b 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -1749,7 +1749,6 @@ class Messageable: List[:class:`~discord.Message`] The messages that are currently pinned. """ - state = self._state if before is not None: if not isinstance(before, datetime): raise TypeError(f'before must be a datetime object, not {before.__class__!r}') @@ -1758,6 +1757,7 @@ class Messageable: 'before must be an aware datetime. Consider using discord.utils.utcnow() or datetime.datetime.now().astimezone() for local time.' ) + state = self._state channel = await self._get_channel() data = await state.http.pins_from(channel.id, before=before.isoformat() if before else None, limit=limit) ret: List[Message] = []