fix: Prevent crashes from View.refresh#3059
fix: Prevent crashes from View.refresh#3059NeloBlivion wants to merge 11 commits intoPycord-Development:masterfrom
View.refresh#3059Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3059/head:pr-3059
git checkout pr-3059This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3059/head |
Paillat-dev
left a comment
There was a problem hiding this comment.
(I am nitpicking, pr lgtm di per se)
|
Oh and changelog |
|
@Lumabots Can you run your test bot on this pr for some time or something like that ? |
yep |
|
@Lumabots You tested using views and stuff ? |
Yep, using view, timeout, persistent view replace item add item remove item etc |
|
In case you missed it @NeloBlivion I left a couple comments here |
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com>
Signed-off-by: Nelo <41271523+NeloBlivion@users.noreply.github.com>
Lulalaby
left a comment
There was a problem hiding this comment.
We probably need a changelog here
Summary
Pycord currently has an issue with race conditions in views - sometimes when editing a message or interaction response, the gateway will receive said message's
MESSAGE_UPDATEfrom Discord and attempt to internallyrefreshthe view beforeViewStorehas updated.This is meant to be circumvented through
remove_message_tracking, but this is not possible in response edit scenarios where the library may not have knowledge of the relevantmessage_idbeforehand.This PR:
_original_responsethat's now returned from all interactionslogging.warningI'm not certain if the first change is entirely appropriate - if this happens to target the wrong message, I will instead revert that specfic change.
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.