aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-09-28 21:42:32 -0400
committerRapptz <[email protected]>2020-09-28 21:42:32 -0400
commit1518790c87ccbdda0093b9ae0bb66a47382b261f (patch)
tree71551510346d02bda545de2f1817e9236980f984
parentVersion bump to v1.5.0 (diff)
downloaddiscord.py-1518790c87ccbdda0093b9ae0bb66a47382b261f.tar.xz
discord.py-1518790c87ccbdda0093b9ae0bb66a47382b261f.zip
Some minor documentation fixes.
Make examples all mention where to put it for the unaware.
-rw-r--r--docs/intents.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/intents.rst b/docs/intents.rst
index 17c43592..cda81380 100644
--- a/docs/intents.rst
+++ b/docs/intents.rst
@@ -25,6 +25,12 @@ For example, if you want a bot that functions without spammy events like presenc
intents.typing = False
intents.presences = False
+ # Somewhere else:
+ # client = discord.Client(intents=intents)
+ # or
+ # from discord.ext import commands
+ # bot = commands.Bot(command_prefix='!', intents=intents)
+
Note that this doesn't enable :attr:`Intents.members` since it's a privileged intent.
Another example showing a bot that only deals with messages and guild information:
@@ -36,6 +42,12 @@ Another example showing a bot that only deals with messages and guild informatio
# If you also want reaction events enable the following:
# intents.reactions = True
+ # Somewhere else:
+ # client = discord.Client(intents=intents)
+ # or
+ # from discord.ext import commands
+ # bot = commands.Bot(command_prefix='!', intents=intents)
+
.. _privileged_intents:
Privileged Intents
@@ -152,7 +164,7 @@ For example:
# client = discord.Client(intents=intents)
# or
# from discord.ext import commands
- # bot = commands.Bot(command_prefix="!", intents=intents)
+ # bot = commands.Bot(command_prefix='!', intents=intents)
Why does ``on_ready`` take so long to fire?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -186,6 +198,6 @@ On Windows use ``py -3`` instead of ``python3``.
.. warning::
- There is no date in which the old gateway will stop working so it is recommended to update your code instead.
+ There is no currently set date in which the old gateway will stop working so it is recommended to update your code instead.
If you truly dislike the direction Discord is going with their API, you can contact them via `support <https://dis.gd/contact>`_