aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-05-25 20:53:44 -0400
committerRapptz <[email protected]>2021-05-25 20:53:44 -0400
commitf56543df15a17434689542f227f466608739e865 (patch)
treed24ab5b369964cbc696020e05cdbd15f428cefcb
parentRemove VerificationLevel aliases (diff)
downloaddiscord.py-f56543df15a17434689542f227f466608739e865.tar.xz
discord.py-f56543df15a17434689542f227f466608739e865.zip
[commands] Remove function call indirection when checking author
-rw-r--r--discord/ext/commands/bot.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 62491669..cba7d1e0 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)