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 some cache links #934

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Fix some cache links #934

merged 3 commits into from
Apr 12, 2024

Conversation

lukellmann
Copy link
Member

@lukellmann lukellmann commented Apr 11, 2024

Links are supposed to go from the primary data to the data that should be removed on deletion of the primary data (e.g. guild -> member, members should be removed when a guild is deleted).

The link from UserData to WebhookData was removed, the webhook shouldn't be deleted if the user that created it is deleted.

More links were added:

  • from ChannelData to MessageData, ThreadMemberData, WebhookData and VoiceStateData
  • from GuildData to EmojiData
  • from UserData to ThreadMemberData

See https://github.com/kordlib/cache/blob/024dedd2b866d4098df5d3f885636c7eb6a22a8f/README.md#cascading

Links are supposed to go from the primary data to the data that should
be removed on deletion of the primary data (e.g. guild -> member,
members should be removed when a guild is deleted).

See https://github.com/kordlib/cache/blob/024dedd2b866d4098df5d3f885636c7eb6a22a8f/README.md#cascading
The webhook shouldn't be deleted if the user that created it is deleted.
* from ChannelData to MessageData, ThreadMemberData, WebhookData and
  VoiceStateData

* from GuildData to EmojiData

* from UserData to ThreadMemberData
@lukellmann lukellmann merged commit 2a0d3f8 into main Apr 12, 2024
8 of 9 checks passed
@lukellmann lukellmann deleted the fix/cache-links branch April 12, 2024 15:11
@lukellmann lukellmann removed the request for review from HopeBaron April 12, 2024 15:13
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.

2 participants