[commands] Raise appropriate exception for no guild found

This commit is contained in:
Rapptz
2022-04-04 21:49:11 -04:00
parent 8b50ac8a31
commit dbcdf69eb1
2 changed files with 3 additions and 3 deletions

View File

@ -454,7 +454,7 @@ Defaults
.. data:: discord.ext.commands.CurrentGuild
A default :class:`.Parameter` which returns the :attr:`~.Context.guild` for this context. This will never be ``None``.
A default :class:`.Parameter` which returns the :attr:`~.Context.guild` for this context. This will never be ``None``. If the command is called in a DM context then :exc:`~discord.ext.commands.NoPrivateMessage` is raised to the error handlers.
.. versionadded:: 2.0