Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: remove member from guild/cache on remove #603

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

AstreaTSS
Copy link
Contributor

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

This PR ensures that guild members are properly removed from the cache and from the guild when they are removed.

Changes

  • Use the delete_member method on the _on_raw_guild_member_remove processor. This also changes around the logic a bit so that the member is gotten before deletion.
  • Make delete_member in the cache also remove the member's ID from the internal list of member IDs for the guild.

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@AstreaTSS AstreaTSS merged commit 448828d into NAFTeam:dev Aug 15, 2022
@AstreaTSS AstreaTSS deleted the member-remove-fix branch August 15, 2022 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants