[commands] Remove Bot.self_bot
This commit is contained in:
parent
3b55573777
commit
36cf3c94b4
@ -110,6 +110,7 @@ class BotBase(GroupMixin):
|
|||||||
self._before_invoke = None
|
self._before_invoke = None
|
||||||
self._after_invoke = None
|
self._after_invoke = None
|
||||||
self._help_command = None
|
self._help_command = None
|
||||||
|
self._skip_check = lambda x, y: x != y
|
||||||
self.description = inspect.cleandoc(description) if description else ''
|
self.description = inspect.cleandoc(description) if description else ''
|
||||||
self.owner_id = options.get('owner_id')
|
self.owner_id = options.get('owner_id')
|
||||||
self.owner_ids = options.get('owner_ids', set())
|
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):
|
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}')
|
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:
|
if help_command is _default:
|
||||||
self.help_command = DefaultHelpCommand()
|
self.help_command = DefaultHelpCommand()
|
||||||
else:
|
else:
|
||||||
@ -1051,10 +1047,6 @@ class Bot(BotBase, discord.Client):
|
|||||||
you require group commands to be case insensitive as well.
|
you require group commands to be case insensitive as well.
|
||||||
description: :class:`str`
|
description: :class:`str`
|
||||||
The content prefixed into the default help message.
|
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`]
|
help_command: Optional[:class:`.HelpCommand`]
|
||||||
The help command implementation to use. This can be dynamically
|
The help command implementation to use. This can be dynamically
|
||||||
set at runtime. To remove the help command pass ``None``. For more
|
set at runtime. To remove the help command pass ``None``. For more
|
||||||
|
Loading…
x
Reference in New Issue
Block a user