Creating bot account and enabling intents guide (#4502)

* Test

* Docs

* Fixes

* Nesting

* grammar fixes

* Update docs/bot_application_guide.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update docs/bot_application_guide.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update docs/bot_application_guide.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update docs/bot_application_guide.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/cli.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* More clear

* remove double `and`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Stonedestroyer 2020-10-18 01:52:11 +02:00 committed by GitHub
parent 9ae733181b
commit 152ca39719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 81 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,76 @@
===========================================
Creating a bot account
===========================================
To use Red you will require a bot account and to enable privileged intents. Both these steps will be covered below.
-------------------------------
Creating the bot application
-------------------------------
In order to use Red, we must first create a Discord Bot account.
Creating a Bot account is a pretty straightforward process.
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on the "New Application" button.
.. image:: /.resources/bot-guide/discord_create_app_button.png
:alt: The new application button.
4. Give the application a name and click "Create".
.. image:: /.resources/bot-guide/discord_create_app_form.png
:alt: The new application form filled in.
5. Create a Bot User by navigating to the "Bot" tab and clicking "Add Bot".
- Click "Yes, do it!" to continue.
.. image:: /.resources/bot-guide/discord_create_bot_user.png
:alt: The Add Bot button.
6. If you want others to be able to invite your bot tick the **Public Bot**. Keeping it unticked will prevent others from inviting your bot to their servers and only you will be able to add the bot to servers (provided that you have needed permissions in the server you want to add the bot to).
- Make sure **Require OAuth2 Code Grant** is unchecked.
.. image:: /.resources/bot-guide/discord_bot_user_options.png
:alt: How the Bot User options should look like for most people.
7. Copy the token using the "Copy" button.
- **This is not the Client Secret at the General Information page**
.. warning::
Do not share your token as it is like your password.
If you shared your token you can regenerate it.
Continue to the next section to enable privileged intents.
-------------------------------
Enabling Privileged Intents
-------------------------------
.. warning::
Due to Discord API changes, Red Bot requires all intents.
\This section is required.
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on the bot you want to enable privileged intents for.
4. Navigate to the bot tab on the left side of the screen.
.. image:: /.resources/bot-guide/discord_bot_tab.png
:alt: The bot tab in the application page.
5. Scroll down to the "Privileged Gateway Intents" section, enable both privileged intents and save your changes.
.. image:: /.resources/bot-guide/discord_privileged_intents.png
:alt: The privileged gateway intents selector.
.. warning::
Red bots with over 100 servers require `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ which is not covered in this guide.
*Parts of this guide have been adapted from* `discord.py intro <https://discordpy.readthedocs.io/en/stable/discord.html#discord-intro>`_ *and* `discord.py privileged intents <https://discordpy.readthedocs.io/en/stable/intents.html#privileged-intents>`_.

View File

@ -14,6 +14,7 @@ Welcome to Red - Discord Bot's documentation!
install_windows install_windows
install_linux_mac install_linux_mac
bot_application_guide
update_red update_red
about_venv about_venv
autostart_systemd autostart_systemd

View File

@ -520,8 +520,7 @@ Once done setting up the instance, run the following command to run Red:
It will walk through the initial setup, asking for your token and a prefix. It will walk through the initial setup, asking for your token and a prefix.
You can find out how to obtain a token with You can find out how to obtain a token with
:dpy_docs:`this guide <discord.html#creating-a-bot-account>`, `this guide <bot_application_guide>`.
section "Creating a Bot Account".
.. tip:: .. tip::
If it's the first time you're using Red, you should check our `getting-started` guide If it's the first time you're using Red, you should check our `getting-started` guide

View File

@ -172,8 +172,7 @@ Once done setting up the instance, run the following command to run Red:
It will walk through the initial setup, asking for your token and a prefix. It will walk through the initial setup, asking for your token and a prefix.
You can find out how to obtain a token with You can find out how to obtain a token with
:dpy_docs:`this guide <discord.html#creating-a-bot-account>`, `this guide <bot_application_guide>`.
section "Creating a Bot Account".
.. tip:: .. tip::
If it's the first time you're using Red, you should check our `getting-started` guide If it's the first time you're using Red, you should check our `getting-started` guide

View File

@ -42,9 +42,8 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True):
if not token_set: if not token_set:
print( print(
"Please enter a valid token.\n" "Please enter a valid token.\n"
"You can find out how to obtain a token with this guide" "You can find out how to obtain a token with this guide:\n"
' (section "Creating a Bot Account"):\n' "https://docs.discord.red/en/stable/bot_application_guide.html#creating-a-bot-account"
f"https://discordpy.readthedocs.io/en/v{discord_version}/discord.html#creating-a-bot-account"
) )
while not token: while not token:
token = input("> ") token = input("> ")