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

[Highlight] Stop caching the wordfilter cog #647

Open
Injabie3 opened this issue May 30, 2023 · 1 comment
Open

[Highlight] Stop caching the wordfilter cog #647

Injabie3 opened this issue May 30, 2023 · 1 comment

Comments

@Injabie3
Copy link
Member

Injabie3 commented May 30, 2023

Reloads of the wordfilter cog do not reload it for highlight because it's holding on to the previous reference of the wordfilter cog.

We can either:

  1. Always try to fetch the wordfilter cog using the get_cog API.
  2. Periodically try to fetch the wordfilter cog (on a timer of some sorts).

1 is preferred.

@quachtridat
Copy link
Member

I'm not sure how expensive a get_cog() call can be. If it is expensive and it is called every on_message() event handler call, IMO the 2nd approach is better.

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

No branches or pull requests

2 participants