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

fix: proeperly remove alias for prefixed cmd's remove_command #574

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion naff/models/naff/prefixed_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,11 @@ def remove_command(self, name: str) -> None:
"""
command = self.subcommands.pop(name, None)

if command is None or name in command.aliases:
if command is None:
return

if name in command.aliases:
command.aliases.remove(name)
return

for alias in command.aliases:
Expand Down