Skip to content

Commit

Permalink
fix: 🐛 fix responding with paginator after deferring interaction ephe…
Browse files Browse the repository at this point in the history
…merally (#2661)

* 🐛 Fix error when responding with paginator to an ephemeral deferred interaction

* 📝 CHANGELOG.md

* ✏️ Fix writing

---------

Signed-off-by: Dorukyum <[email protected]>
Co-authored-by: Dorukyum <[email protected]>
  • Loading branch information
Paillat-dev and Dorukyum authored Dec 27, 2024
1 parent 3298cd0 commit 7bd9235
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ These changes are available on the `master` branch, but have not yet been releas
apps. ([#2650](https://github.com/Pycord-Development/pycord/pull/2650))
- Fixed type annotations of cached properties.
([#2635](https://github.com/Pycord-Development/pycord/issues/2635))
- Fixed an error when responding non-ephemerally with a `Paginator` to an ephemerally
deferred interaction.
([#2661](https://github.com/Pycord-Development/pycord/pull/2661))

### Changed

Expand Down
2 changes: 1 addition & 1 deletion discord/ext/pages/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ async def respond(
)
# convert from WebhookMessage to Message reference to bypass
# 15min webhook token timeout (non-ephemeral messages only)
if not ephemeral:
if not ephemeral and not msg.flags.ephemeral:
msg = await msg.channel.fetch_message(msg.id)
else:
msg = await interaction.response.send_message(
Expand Down

0 comments on commit 7bd9235

Please sign in to comment.