Skip to content

Commit 39102fc

Browse files
authored
fix: properly initialise private attributes in iterators (#1114)
1 parent 03dfc20 commit 39102fc

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

interactions/api/models/channel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ def __init__(
138138
):
139139
super().__init__(obj, _client, maximum=maximum, start_at=start_at, check=check)
140140

141+
self.__stop: bool = False
142+
141143
from .message import Message
142144

143145
if reverse and start_at is MISSING:

interactions/api/models/guild.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ def __init__(
241241
start_at: Optional[Union[int, str, Snowflake, Member]] = MISSING,
242242
check: Optional[Callable[[Member], bool]] = None,
243243
):
244+
245+
self.__stop: bool = False
246+
244247
super().__init__(obj, _client, maximum=maximum, start_at=start_at, check=check)
245248

246249
self.after = self.start_at

interactions/utils/abc/base_iterators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def __init__(
5656
if not hasattr(start_at, "id")
5757
else int(start_at.id)
5858
)
59-
self.__stop: bool = False
6059
self.objects: Optional[List[_O]] = None
6160

6261

0 commit comments

Comments
 (0)