From 36cf3c94b4e1d93bbdd495b8d37a07b885351722 Mon Sep 17 00:00:00 2001 From: Tari <65512380+Tari-dev@users.noreply.github.com> Date: Wed, 26 May 2021 03:46:26 +0300 Subject: [PATCH] [commands] Remove Bot.self_bot --- discord/ext/commands/bot.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 1d5cd7bc6..624916693 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -110,6 +110,7 @@ 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()) @@ -121,11 +122,6 @@ class BotBase(GroupMixin): if self.owner_ids and not isinstance(self.owner_ids, collections.abc.Collection): raise TypeError(f'owner_ids must be a collection not {self.owner_ids.__class__!r}') - if options.pop('self_bot', False): - self._skip_check = lambda x, y: x != y - else: - self._skip_check = lambda x, y: x == y - if help_command is _default: self.help_command = DefaultHelpCommand() else: @@ -1051,10 +1047,6 @@ class Bot(BotBase, discord.Client): you require group commands to be case insensitive as well. description: :class:`str` The content prefixed into the default help message. - self_bot: :class:`bool` - If ``True``, the bot will only listen to commands invoked by itself rather - than ignoring itself. If ``False`` (the default) then the bot will ignore - itself. This cannot be changed once initialised. help_command: Optional[:class:`.HelpCommand`] The help command implementation to use. This can be dynamically set at runtime. To remove the help command pass ``None``. For more