From f1e4be2016bbabf068ec27e55067a5a61e44efe7 Mon Sep 17 00:00:00 2001 From: Dorukyum Date: Mon, 25 Dec 2023 12:03:47 +0300 Subject: [PATCH] fix: ApplicationCommand.__eq__ --- discord/commands/core.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/discord/commands/core.py b/discord/commands/core.py index c7bd4efd40..bb61a00eeb 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -235,15 +235,9 @@ def __repr__(self) -> str: return f"" def __eq__(self, other) -> bool: - if ( - getattr(self, "id", None) is not None - and getattr(other, "id", None) is not None - ): - check = self.id == other.id - else: - check = self.name == other.name and self.guild_ids == other.guild_ids return ( - isinstance(other, self.__class__) and self.parent == other.parent and check + isinstance(other, self.__class__) + and self.to_dict() == other.to_dict() ) async def __call__(self, ctx, *args, **kwargs):