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

Fix pronouns loading without clicking on profile #2970

Closed

Conversation

outmaneuver
Copy link

Fixes #2967

Implement a caching mechanism for pronouns to load them without the need to click on the user's profile.

  • Caching Mechanism:

    • Implement caching using DataStore in src/plugins/userMessagesPronouns/utils.ts.
    • Add functions to get, set, and fetch pronouns with caching.
    • Modify useDiscordPronouns to check the cache before fetching pronouns.
    • Export fetchAndCachePronouns function.
  • PronounsChatComponent:

    • Update PronounsChatComponent in src/plugins/userMessagesPronouns/PronounsChatComponent.tsx to use cached pronouns if available.
  • Message Events:

    • Add logic in src/plugins/userMessagesPronouns/index.ts to fetch and cache pronouns when a user sends a message.
    • Add export for MessageEvents in src/api/MessageEvents.ts.

Fixes Vendicated#2967

Implement a caching mechanism for pronouns to load them without the need to click on the user's profile.

* **Caching Mechanism**:
  - Implement caching using `DataStore` in `src/plugins/userMessagesPronouns/utils.ts`.
  - Add functions to get, set, and fetch pronouns with caching.
  - Modify `useDiscordPronouns` to check the cache before fetching pronouns.
  - Export `fetchAndCachePronouns` function.

* **PronounsChatComponent**:
  - Update `PronounsChatComponent` in `src/plugins/userMessagesPronouns/PronounsChatComponent.tsx` to use cached pronouns if available.

* **Message Events**:
  - Add logic in `src/plugins/userMessagesPronouns/index.ts` to fetch and cache pronouns when a user sends a message.
  - Add export for `MessageEvents` in `src/api/MessageEvents.ts`.
@Vendicated
Copy link
Owner

AI spam

@Vendicated Vendicated closed this Oct 23, 2024
Repository owner locked as spam and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] UserMessagesPronouns loading of pronouns
2 participants