Skip to main content

Create a Discord application

A Discord bot lives inside an application you register in the Discord Developer Portal.

1

Sign in to Discord

2

Create a new app

On the Applications page, click New Application.

  • Name: e.g. StackOne Integration - any name works, it is only a label for your app
  • Select the checkbox agreeing to the Discord Developer Terms of Service and Developer Policy.
  • Click Create.
The Create a new app dialog with the Name field, the terms checkbox and the Create button highlighted

Generate the bot token

The bot token is the credential StackOne uses to call the Discord API as the bot user.

1

Open the Bot page

In the sidebar, under Overview, click Bot.

The Bot page with Bot highlighted in the sidebar
2

Generate a new token

In the Token section, click Reset Token.

  • Confirm with Yes, do it! in the Reset Bot’s Token? dialog.
  • Enter your Discord password when the Multi-Factor Authentication dialog appears.
The Token section of the Bot page with the Reset Token button highlighted
3

Copy the bot token

Click Copy under the generated token, then paste the value into the Bot Token field in StackOne Hub.

  • The token is only displayed once and cannot be retrieved later, so store it securely for use later.
  • Resetting the token again invalidates the previous one and breaks any existing connection that uses it.
The Token section after the token is generated, with the value masked and the Copy button highlighted

Enable the privileged gateway intents

Discord restricts member and message content data behind privileged intents, so the bot needs them enabled to read that data through the API.

1

Turn on the required intents

In the Privileged Gateway Intents section of the Bot page, enable the intents the integration needs.

  • Enable Server Members Intent to read the members of a server.
  • Enable Message Content Intent to read the content of messages.
  • Note: Once your bot reaches 10,000 or more users, these intents require review by Discord.
  • Click Save Changes.
The Privileged Gateway Intents section with Server Members Intent and Message Content Intent enabled and the Save Changes button highlighted

Add the bot to your server

A bot can only read or act on servers it has been added to, so install it on every Discord server you want StackOne to cover.

1

Add the bot scope

Open Installation in the sidebar, and in Default Install Settings under Guild Install, add bot to Scopes.

  • Click Save Changes.
The Guild Install scopes selector on the Installation page with the bot option highlighted
2

Open the install link

In the Install Link section, keep Discord Provided Link selected and click the copy icon to copy the link.

  • Open the copied link in a browser, choose the server to add the bot to, and complete the authorization.
  • You need the Manage Server permission on a Discord server to add a bot to it.
The Install Link section of the Installation page with the copy icon highlighted

Linking the Account from the Hub

1

Navigate to the Hub

Use one of the three Linking Account Methods to access the Hub.
2

Fill out the fields

Fill out the following fields using details from your provider:
  • Bot Token
3

Connect

  • Click Connect
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup

If the account linking is successful, you will see the newly linked account in your Accounts page.