Browse Source

Some minor documentation fixes.

Make examples all mention where to put it for the unaware.
pull/5870/head
Rapptz 5 years ago
parent
commit
1518790c87
  1. 16
      docs/intents.rst

16
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>`_

Loading…
Cancel
Save