Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
Update pincer/commands/interactable.py
Browse files Browse the repository at this point in the history
Co-authored-by: trag1c <77130613+trag1c@users.noreply.github.com>
  • Loading branch information
Lunarmagpie and trag1c committed Feb 19, 2022
1 parent f4e302e commit 9fe7bab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pincer/commands/interactable.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ def unassign(self):
ComponentHandler and removes loaded events from the client.
"""
for value in vars(type(self)).values():
if isinstance(value, InteractableStructure):
if isinstance(value.metadata, AppCommand):
for key, _value in INTERACTION_REGISTERS.items():
if value is _value:
INTERACTION_REGISTERS.pop(key)
if (
isinstance(value, InteractableStructure)
and isinstance(value.metadata, AppCommand)
):
for key, _value in INTERACTION_REGISTERS.items():
if value is _value:
INTERACTION_REGISTERS.pop(key)

key = value.call.__name__.lower()

Expand Down

0 comments on commit 9fe7bab

Please sign in to comment.