Browse Source

Update 'Your First Bot'

+ This commit reflects the new changes made to the Discord Application Developer Portal after its major update
pull/1161/head
Still Hsu 7 years ago
parent
commit
e6280ceec5
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
7 changed files with 28 additions and 16 deletions
  1. +28
    -16
      docs/guides/getting_started/first-bot.md
  2. BIN
      docs/guides/getting_started/images/intro-add-bot.png
  3. BIN
      docs/guides/getting_started/images/intro-copy-oauth.png
  4. BIN
      docs/guides/getting_started/images/intro-create-app.png
  5. BIN
      docs/guides/getting_started/images/intro-create-bot.png
  6. BIN
      docs/guides/getting_started/images/intro-generate-oauth.png
  7. BIN
      docs/guides/getting_started/images/intro-token.png

+ 28
- 16
docs/guides/getting_started/first-bot.md View File

@@ -12,25 +12,26 @@ now, it is a good starting point.

## Creating a Discord Bot

Before writing your bot, it is necessary to create a bot account via
Before writing your bot, it is necessary to create a bot account via
the Discord Applications Portal first.

1. Visit the [Discord Applications Portal].
2. Create a New Application.
2. Create a new application.
3. Give the application a name (this will be the bot's initial username).
4. Create the Application.
4. On the left-hand side, under `Settings`, click `Bot`.

![Step 4](images/intro-create-app.png)
![Step 4](images/intro-bot-settings.png)

5. In the application review page, click **Create a Bot User**.
5. Click on `Add Bot`.

![Step 5](images/intro-create-bot.png)
![Step 5](images/intro-add-bot.png)

6. Confirm the popup.
7. (Optional) If this bot will be public, check "Public Bot."
* **Do not tick any other options!**
7. (Optional) If this bot will be public, tick `Public Bot`.

[Discord Applications Portal]: https://discordapp.com/developers/applications/me
![Step 7](images/intro-public-bot.png)

[Discord Applications Portal]: https://discordapp.com/developers/applications/

## Adding your bot to a server

@@ -38,26 +39,31 @@ Bots **cannot** use invite links; they must be explicitly invited
through the OAuth2 flow.

1. Open your bot's application on the [Discord Applications Portal].
2. Navigate to `OAuth2 URL Generator` and click on `Generate OAuth2 URL`.
2. On the left-hand side, under `Settings`, click `OAuth2`.

![Step 2](images/intro-oauth-settings.png)

![Step 2](images/intro-generate-oauth.png)
3. Scroll down to `OAuth2 URL Generator` and under `Scopes` tick `bot`.

3. Select the permissions that you wish to assign your bot with.
![Step 3](images/intro-scopes-bot.png)

4. Scroll down further to `Bot Permissions` and select the
permissions that you wish to assign your bot with.

> [!NOTE]
> This will assign the bot with a special "managed" role that no
> one else can use. The permissions can be changed later in the
> roles settings if you ever change your mind!

4. Open the generated authorization URL in your browser.
5. Select a server.
6. Click on Authorize.
5. Open the generated authorization URL in your browser.
6. Select a server.
7. Click on Authorize.

> [!NOTE]
> Only servers where you have the `MANAGE_SERVER` permission will be
> present in this list.

![Step 6](images/intro-add-bot.png)
![Step 6](images/intro-authorize.png)

## Connecting to Discord

@@ -167,6 +173,12 @@ The following lines can now be added:
At this point, feel free to start your program and see your bot come
online in Discord.

> [!INFO]
> Getting a warning saying `A supplied token was invalid.` and having
> trouble with logging in? Double-check whether you put in the correct
> credentials. Note that a client secret is not the same as a bot
> token!

> [!TIP]
> Encountering a `PlatformNotSupportedException` when starting your bot?
> This means that you are targeting a platform where .NET's default


BIN
docs/guides/getting_started/images/intro-add-bot.png View File

Before After
Width: 500  |  Height: 512  |  Size: 26 kB Width: 985  |  Height: 270  |  Size: 6.4 kB

BIN
docs/guides/getting_started/images/intro-copy-oauth.png View File

Before After
Width: 652  |  Height: 447  |  Size: 20 kB

BIN
docs/guides/getting_started/images/intro-create-app.png View File

Before After
Width: 962  |  Height: 716  |  Size: 24 kB

BIN
docs/guides/getting_started/images/intro-create-bot.png View File

Before After
Width: 763  |  Height: 769  |  Size: 20 kB

BIN
docs/guides/getting_started/images/intro-generate-oauth.png View File

Before After
Width: 686  |  Height: 138  |  Size: 9.0 kB

BIN
docs/guides/getting_started/images/intro-token.png View File

Before After
Width: 700  |  Height: 339  |  Size: 27 kB Width: 766  |  Height: 466  |  Size: 19 kB

Loading…
Cancel
Save