Skip to content

Commit

Permalink
Fix #160 (timeout property on View in 2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarletcafe committed Apr 1, 2022
1 parent 046189f commit ae236f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jishaku/shim/paginator_200.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, bot: commands.Bot, paginator: commands.Paginator, **kwargs):

self.owner = kwargs.pop('owner', None)
self.emojis = kwargs.pop('emoji', EMOJI_DEFAULT)
self.timeout = kwargs.pop('timeout', 7200)
self.timeout_length = kwargs.pop('timeout', 7200)
self.delete_message = kwargs.pop('delete_message', False)

self.sent_page_reactions = False
Expand All @@ -86,7 +86,7 @@ def __init__(self, bot: commands.Bot, paginator: commands.Paginator, **kwargs):
f'({self.page_size} > {self.max_page_size})'
)

super().__init__(timeout=self.timeout)
super().__init__(timeout=self.timeout_length)

@property
def pages(self):
Expand Down Expand Up @@ -233,7 +233,7 @@ async def wait_loop(self):

try: # pylint: disable=too-many-nested-blocks
while not self.bot.is_closed():
await asyncio.wait_for(self.send_lock_delayed(), timeout=self.timeout)
await asyncio.wait_for(self.send_lock_delayed(), timeout=self.timeout_length)

self.update_view()

Expand Down

0 comments on commit ae236f9

Please sign in to comment.