aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/ext/commands/bot.py8
-rw-r--r--discord/ext/commands/core.py8
-rw-r--r--discord/guild.py4
-rw-r--r--discord/member.py2
-rw-r--r--discord/user.py2
-rw-r--r--discord/utils.py6
6 files changed, 15 insertions, 15 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 9a7c5023..01ea05dc 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -49,7 +49,7 @@ def when_mentioned_or(*prefixes):
Example
--------
- .. code-block:: python
+ .. code-block:: python3
bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'))
@@ -227,7 +227,7 @@ class BotBase(GroupMixin):
Example
---------
- .. code-block:: python
+ .. code-block:: python3
@bot.check
def whitelist(ctx):
@@ -373,7 +373,7 @@ class BotBase(GroupMixin):
Example
--------
- .. code-block:: python
+ .. code-block:: python3
async def on_ready(): pass
async def my_message(message): pass
@@ -422,7 +422,7 @@ class BotBase(GroupMixin):
Example
--------
- .. code-block:: python
+ .. code-block:: python3
@bot.listen()
async def on_message(message):
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index 2662a31b..3655deaf 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -998,7 +998,7 @@ def check(predicate):
Creating a basic check to see if the command invoker is you.
- .. code-block:: python
+ .. code-block:: python3
def check_if_it_is_me(ctx):
return ctx.message.author.id == 85309593344815104
@@ -1010,7 +1010,7 @@ def check(predicate):
Transforming common checks into its own decorator:
- .. code-block:: python
+ .. code-block:: python3
def is_me():
def predicate(ctx):
@@ -1076,7 +1076,7 @@ def has_any_role(*names):
Example
--------
- .. code-block:: python
+ .. code-block:: python3
@bot.command()
@commands.has_any_role('Library Devs', 'Moderators')
@@ -1106,7 +1106,7 @@ def has_permissions(**perms):
Example
---------
- .. code-block:: python
+ .. code-block:: python3
@bot.command()
@commands.has_permissions(manage_messages=True)
diff --git a/discord/guild.py b/discord/guild.py
index 1ce331d3..bea3456a 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -476,13 +476,13 @@ class Guild(Hashable):
Creating a basic channel:
- .. code-block:: python
+ .. code-block:: python3
channel = await guild.create_text_channel('cool-channel')
Creating a "secret" channel:
- .. code-block:: python
+ .. code-block:: python3
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
diff --git a/discord/member.py b/discord/member.py
index 1fb4b492..7b969869 100644
--- a/discord/member.py
+++ b/discord/member.py
@@ -293,7 +293,7 @@ class Member(discord.abc.Messageable, _BaseUser):
Basically equivalent to:
- .. code-block:: python
+ .. code-block:: python3
channel.permissions_for(self)
diff --git a/discord/user.py b/discord/user.py
index 7d95d239..634e821c 100644
--- a/discord/user.py
+++ b/discord/user.py
@@ -128,7 +128,7 @@ class BaseUser(_BaseUser):
Basically equivalent to:
- .. code-block:: python
+ .. code-block:: python3
channel.permissions_for(self)
diff --git a/discord/utils.py b/discord/utils.py
index 2f9f61f9..35044836 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -188,19 +188,19 @@ def get(iterable, **attrs):
Basic usage:
- .. code-block:: python
+ .. code-block:: python3
member = discord.utils.get(message.guild.members, name='Foo')
Multiple attribute matching:
- .. code-block:: python
+ .. code-block:: python3
channel = discord.utils.get(guild.channels, name='Foo', type=ChannelType.voice)
Nested attribute matching:
- .. code-block:: python
+ .. code-block:: python3
channel = discord.utils.get(client.get_all_channels(), guild__name='Cool', name='general')