Skip to content

Commit a145bcd

Browse files
authored
fix: raise intended exception for ephemeral paginator with >=15min timeout (#2718)
fix: check self.timeout is None before comparing with int
1 parent 95bc457 commit a145bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/ext/pages/pagination.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ async def respond(
11631163
if target is not None and not isinstance(target, discord.abc.Messageable):
11641164
raise TypeError(f"expected abc.Messageable not {target.__class__!r}")
11651165

1166-
if ephemeral and (self.timeout >= 900 or self.timeout is None):
1166+
if ephemeral and (self.timeout is None or self.timeout >= 900):
11671167
raise ValueError(
11681168
"paginator responses cannot be ephemeral if the paginator timeout is 15"
11691169
" minutes or greater"

0 commit comments

Comments
 (0)