New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cached messages to channel_delete event handler #2194
Conversation
CI fails if the cache is disabled. The code should only get the messages from cache if it is enabled. For consistency, this should happen in the CacheUpdate implementation for ChannelDeleteEvent, like already done for member/guild/role/thread deletes. That also takes care of only running the code when cache is enabled |
I'm confused, do I have to do something or is this alright now? |
You'll have to rebase your PR on top of next. I recommend doing |
Co-authored-by: Michael Krasnitski <42564254+mkrasnitski@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If a maintainer could run CI that'd be great
I always forget to format with nightly haha |
Co-authored-by: Alex M. M. <acdenissk69@gmail.com>
The Reason I'm making this PR is issue #2180
If there is a better way to do this I'd be happy to implement that instead (especially if it doesn't introduce a breaking change).
Updating the cache after the event is handled is not possible without having to clone
event.channel
which I didn't wanna do.Closes #2180