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

fix: handle guild not existing in the cache #615

Merged
merged 1 commit into from
Sep 3, 2022
Merged

Conversation

LordOfPolls
Copy link
Member

What type of pull request is this?

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

Description

Should the guild be not in the in the cache, an attribute error will occur on removal of a member (incld the bot itself), this fixes that.

Changes

  • Check if the guild exists before trying to access it

Checklist

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

@LordOfPolls LordOfPolls added the Bug::Library A bug in the library label Aug 26, 2022
@LordOfPolls LordOfPolls merged commit 97acbb1 into dev Sep 3, 2022
@LordOfPolls LordOfPolls deleted the member-remove-fix branch September 3, 2022 05:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug::Library A bug in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant