From f56543df15a17434689542f227f466608739e865 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 25 May 2021 20:53:44 -0400 Subject: [PATCH] [commands] Remove function call indirection when checking author --- discord/ext/commands/bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 624916693..cba7d1e0a 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -110,7 +110,6 @@ class BotBase(GroupMixin): self._before_invoke = None self._after_invoke = None self._help_command = None - self._skip_check = lambda x, y: x != y self.description = inspect.cleandoc(description) if description else '' self.owner_id = options.get('owner_id') self.owner_ids = options.get('owner_ids', set()) @@ -902,7 +901,7 @@ class BotBase(GroupMixin): view = StringView(message.content) ctx = cls(prefix=None, view=view, bot=self, message=message) - if self._skip_check(message.author.id, self.user.id): + if message.author.id == self.user.id: return ctx prefix = await self.get_prefix(message)