Discord Integration
Discord Integration makes it easy for your AI Assistant to connect with Discord, a popular messaging app.
Once set up, people can chat with your AI Assistant by sending messages on a discord channel on your server or sending direct messages to your AI Assistant
Prerequisites
To setup Discord Integration you will need 2 pieces of information from the Discord Developer Portal:
Discord Client ID
Client ID is a unique snowflake identifier for your application in the developer portal.
Discord App Token
App Token is an authorization token allows Botstacks to control your Discord App (sending messages, listening to user messages etc..)
Setting up the Discord integration
1) Create an App
Visit discord.com/developers/applications and create your app by clicking the New Application
button
Enter a Name for your App and click on create
2) Customize your App
Customize your App by giving it a description
and profile picture
3) Obtain your App Token
Obtain your App Token by going to the Bot
page from the left sidebar.
Discord won’t show the token for the first time so you have to click on Reset Token
to access your token
After you have reset your token, discord will show the app token.
Copy the token
and keep it somewhere safe because discord only shows the token one time after you reset.
4) Add your App Token to Botstacks
Paste your App Token
on Botstacks Dashboard Integrations page.
5) Obtain your Client ID
Copy your Client ID
by going to the OAuth2
page from the left sidebar.
6) Add your Client ID to Botstacks
Paste your Client ID
on Botstacks Dashboard Integrations page.
7) Enable Privileged Gateway Intents
On Bot
page, enable all 3 intents shown on the Privileged Gateway Intents
8) Generate your OAuth2 URL
On OAuth2
page, enable the option Bot
on the category OAuth2 URL Generator
Enable the following options on the category Bot Permissions
Send Messages
Send Messages in Threads
Embed Links
Attach Files
Read Message History
Use External Emojis
Use External Stickers
Add Reactions
You can simply enable the Administrator
option instead of manually enabling the options mentioned above, but this is not recommended as it may cause more damage to your server if your app gets compromised
9) Invite your App to your Server
On OAuth2
page, copy the Generated URL
and paste it on a new tab on your browser. This is the invite link to your App.
Choose the server you want to add your App and click on Continue
Enable all the options shown on the popup and click on Authorize
After you click on Authorize
, your App will join your server and anyone can interact with your App (your AI Assistant) by pinging it or sending a Direct message.