aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands
diff options
context:
space:
mode:
Diffstat (limited to 'discord/ext/commands')
-rw-r--r--discord/ext/commands/bot.py8
-rw-r--r--discord/ext/commands/context.py6
-rw-r--r--discord/ext/commands/core.py6
-rw-r--r--discord/ext/commands/errors.py2
4 files changed, 11 insertions, 11 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index e7257bbd..b90f5dce 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -234,7 +234,7 @@ class BotBase(GroupMixin):
# global check registration
def check(self, func):
- """A decorator that adds a global check to the bot.
+ r"""A decorator that adds a global check to the bot.
A global check is similar to a :func:`.check` that is applied
on a per command basis except it is run before any command checks
@@ -302,7 +302,7 @@ class BotBase(GroupMixin):
pass
def check_once(self, func):
- """A decorator that adds a "call once" global check to the bot.
+ r"""A decorator that adds a "call once" global check to the bot.
Unlike regular global checks, this one is called only once
per :meth:`.Command.invoke` call.
@@ -393,7 +393,7 @@ class BotBase(GroupMixin):
return coro
def after_invoke(self, coro):
- """A decorator that registers a coroutine as a post-invoke hook.
+ r"""A decorator that registers a coroutine as a post-invoke hook.
A post-invoke hook is called directly after the command is
called. This makes it a useful function to clean-up database
@@ -810,7 +810,7 @@ class BotBase(GroupMixin):
return ret
async def get_context(self, message, *, cls=Context):
- """|coro|
+ r"""|coro|
Returns the invocation context from the message.
diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py
index 4beaa7d6..73679e52 100644
--- a/discord/ext/commands/context.py
+++ b/discord/ext/commands/context.py
@@ -28,7 +28,7 @@ import discord.abc
import discord.utils
class Context(discord.abc.Messageable):
- """Represents the context in which a command is being invoked under.
+ r"""Represents the context in which a command is being invoked under.
This class contains a lot of meta data to help you understand more about
the invocation context. This class is not created manually and is instead
@@ -87,7 +87,7 @@ class Context(discord.abc.Messageable):
self._state = self.message._state
async def invoke(self, *args, **kwargs):
- """|coro|
+ r"""|coro|
Calls a command with the arguments given.
@@ -219,6 +219,6 @@ class Context(discord.abc.Messageable):
@property
def voice_client(self):
- """Optional[:class:`VoiceClient`]: A shortcut to :attr:`Guild.voice_client`\, if applicable."""
+ r"""Optional[:class:`VoiceClient`]: A shortcut to :attr:`Guild.voice_client`\, if applicable."""
g = self.guild
return g.voice_client if g else None
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 6d3644ce..5ea2700d 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -102,7 +102,7 @@ class _CaseInsensitiveDict(dict):
super().__setitem__(k.lower(), v)
class Command:
- """A class that implements the protocol for a bot text command.
+ r"""A class that implements the protocol for a bot text command.
These are not created manually, instead they are created via the
decorator or functional interface.
@@ -1078,7 +1078,7 @@ def group(name=None, **attrs):
return command(name=name, cls=Group, **attrs)
def check(predicate):
- """A decorator that adds a check to the :class:`.Command` or its
+ r"""A decorator that adds a check to the :class:`.Command` or its
subclasses. These checks could be accessed via :attr:`.Command.checks`.
These checks should be predicates that take in a single parameter taking
@@ -1169,7 +1169,7 @@ def has_role(name):
return check(predicate)
def has_any_role(*names):
- """A :func:`.check` that is added that checks if the member invoking the
+ r"""A :func:`.check` that is added that checks if the member invoking the
command has **any** of the roles specified. This means that if they have
one out of the three roles specified, then this check will return `True`.
diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py
index 195ca38d..fea81b4a 100644
--- a/discord/ext/commands/errors.py
+++ b/discord/ext/commands/errors.py
@@ -35,7 +35,7 @@ __all__ = ['CommandError', 'MissingRequiredArgument', 'BadArgument',
'BadUnionArgument']
class CommandError(DiscordException):
- """The base exception type for all command related errors.
+ r"""The base exception type for all command related errors.
This inherits from :exc:`discord.DiscordException`.