Skip to content
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 missing cache cleanup for news/stage/thread channels #2029

Merged
merged 2 commits into from
Feb 19, 2022

Conversation

Mitmocc
Copy link
Contributor

@Mitmocc Mitmocc commented Feb 19, 2022

Pull Request Etiquette

  • I have checked the PRs for upcoming features/bug fixes.
  • I have read the [contributing guidelines][contributing].

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

There is a bug where if you kick a bot from a guild and then re-invite it, news channels would return null if fetched from the jda instance. I don't understand it fully but there might be objects of the newsChannel left when the bot is kicked because the GuildDeleteHandler wasn't cleaning the global cache from the news channels. This change fixes that bug.

Edit: Same thing applied to stage channels and thread channels, so I added those too.

@V-Play-Games
Copy link
Contributor

V-Play-Games commented Feb 19, 2022

With that logic, stage channels should behave the same way too

@Mitmocc
Copy link
Contributor Author

Mitmocc commented Feb 19, 2022

With that logic, stage channels should behave the same way too

You are right, didn't notice that

@Mitmocc Mitmocc changed the title Add missing cache cleanup for news channels Add missing cache cleanup for news/stage/thread channels Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants