Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.

Commit a0dd227

Browse files
authoredNov 3, 2019
Fix cancel bug in session
Fixes a bug where certain parts of session were passing `ctx` to cancel when not required.
1 parent ffa9ba6 commit a0dd227

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎discord/ext/buttons/buttons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async def _session_loop(self, ctx):
115115
future.cancel()
116116

117117
if not done:
118-
return ctx.bot.loop.create_task(self.cancel(ctx))
118+
return ctx.bot.loop.create_task(self.cancel())
119119

120120
try:
121121
result = done.pop()
@@ -126,7 +126,7 @@ async def _session_loop(self, ctx):
126126
else:
127127
action = False
128128
except Exception:
129-
return ctx.bot.loop.create_task(self.cancel(ctx))
129+
return ctx.bot.loop.create_task(self.cancel())
130130

131131
emoji = self.get_emoji_as_string(payload.emoji)
132132
button = self.buttons[emoji]

0 commit comments

Comments
 (0)
This repository has been archived.