diff --git a/docs/.resources/bot-guide/discord_bot_tab.png b/docs/.resources/bot-guide/discord_bot_tab.png new file mode 100644 index 000000000..835682448 Binary files /dev/null and b/docs/.resources/bot-guide/discord_bot_tab.png differ diff --git a/docs/.resources/bot-guide/discord_bot_user_options.png b/docs/.resources/bot-guide/discord_bot_user_options.png new file mode 100644 index 000000000..4091bd88e Binary files /dev/null and b/docs/.resources/bot-guide/discord_bot_user_options.png differ diff --git a/docs/.resources/bot-guide/discord_create_app_button.png b/docs/.resources/bot-guide/discord_create_app_button.png new file mode 100644 index 000000000..e6d06a7a2 Binary files /dev/null and b/docs/.resources/bot-guide/discord_create_app_button.png differ diff --git a/docs/.resources/bot-guide/discord_create_app_form.png b/docs/.resources/bot-guide/discord_create_app_form.png new file mode 100644 index 000000000..482084eba Binary files /dev/null and b/docs/.resources/bot-guide/discord_create_app_form.png differ diff --git a/docs/.resources/bot-guide/discord_create_bot_user.png b/docs/.resources/bot-guide/discord_create_bot_user.png new file mode 100644 index 000000000..2d0a3a033 Binary files /dev/null and b/docs/.resources/bot-guide/discord_create_bot_user.png differ diff --git a/docs/.resources/bot-guide/discord_privileged_intents.png b/docs/.resources/bot-guide/discord_privileged_intents.png new file mode 100644 index 000000000..77227d1bd Binary files /dev/null and b/docs/.resources/bot-guide/discord_privileged_intents.png differ diff --git a/docs/bot_application_guide.rst b/docs/bot_application_guide.rst new file mode 100644 index 000000000..26655c5a3 --- /dev/null +++ b/docs/bot_application_guide.rst @@ -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 `_. +2. Navigate to the `application page `_ +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 `_. +2. Navigate to the `application page `_ +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 `_ which is not covered in this guide. + +*Parts of this guide have been adapted from* `discord.py intro `_ *and* `discord.py privileged intents `_. diff --git a/docs/index.rst b/docs/index.rst index 379d3089d..665211f8c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,6 +14,7 @@ Welcome to Red - Discord Bot's documentation! install_windows install_linux_mac + bot_application_guide update_red about_venv autostart_systemd diff --git a/docs/install_linux_mac.rst b/docs/install_linux_mac.rst index e4ecee458..f11472813 100644 --- a/docs/install_linux_mac.rst +++ b/docs/install_linux_mac.rst @@ -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. You can find out how to obtain a token with -:dpy_docs:`this guide `, -section "Creating a Bot Account". +`this guide `. .. tip:: If it's the first time you're using Red, you should check our `getting-started` guide diff --git a/docs/install_windows.rst b/docs/install_windows.rst index fc2ed4f47..d1d01f21a 100644 --- a/docs/install_windows.rst +++ b/docs/install_windows.rst @@ -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. You can find out how to obtain a token with -:dpy_docs:`this guide `, -section "Creating a Bot Account". +`this guide `. .. tip:: If it's the first time you're using Red, you should check our `getting-started` guide diff --git a/redbot/core/cli.py b/redbot/core/cli.py index 5fc1adf36..85b13d7bd 100644 --- a/redbot/core/cli.py +++ b/redbot/core/cli.py @@ -42,9 +42,8 @@ async def interactive_config(red, token_set, prefix_set, *, print_header=True): if not token_set: print( "Please enter a valid token.\n" - "You can find out how to obtain a token with this guide" - ' (section "Creating a Bot Account"):\n' - f"https://discordpy.readthedocs.io/en/v{discord_version}/discord.html#creating-a-bot-account" + "You can find out how to obtain a token with this guide:\n" + "https://docs.discord.red/en/stable/bot_application_guide.html#creating-a-bot-account" ) while not token: token = input("> ")