You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Discord Bot setup requires a few environment variables to function properly. These include:
PORT (Consider 8999 as default)
DISCORD_PUBLIC_KEY
GUILD_ID
BOT_TOKEN
NOTE
These variables are essential for the bot to function correctly. You can configure them in your preferred way, such as in a .env file, Docker Compose file, or directly in your deployment environment. Ensure these variables are properly set up before running the service.
Getting Started
To set up a discord you first need to create an application (basically a bot), here are the steps to follow:
How to Deploy Discord Service?
Deployment Process
The deployment process is divided into two main steps:
Setting Up Queue Variables
2 env variables (required) depend upon deployment of discord-message-broker
Discord Bot Setup
The Discord Bot setup requires a few environment variables to function properly. These include:
Getting Started
To set up a discord you first need to create an application (basically a bot), here are the steps to follow:
Visit Discord Application
Click on the "New Application" Button

Fill in your Application Name

Now here you will see your newly created application, click on it, and this should open "General Information"
If you scroll down, you will se PUBLIC KEY, copy it and place it in
environment
as DISCORD_PUBLIC_KEYNow to create BOT_TOKEN, click on BOT > Reset Token

Once you have the token, place it against BOT_TOKEN in the
environment
Now, we will be creating an invite URL and for that, you need to click on OAuth2 > bot

Now as soon as you click on the bot, a section to choose bot permission from, will show up

Check the following options
Once you select all the bot permissions, scroll a bit down and you will see "Generated URL"

Copy and paste that URL into the browser, and a prompt will come up that will ask you to select your own "Discord Server"

Once you add the Bot to your server, copy the "Server Id", by right-clicking on the server avatar. Now place this id in
environment
against GUILD_IDRunning Discord Service using Docker
You can run the project using the
Docker
, using the following stepsCompose the Image
d here is to run the command in detach mode
Remove the Image (Extra)
If you are done with running the docker image and want to remove the image, run the command below
Running Discord Service using Docker
Once your Discord service is up and running, let’s assume it is accessible via one of the following URLs:
https://<subdomain>.<domain>.com
https://<host>:<port>
Steps to Configure the Interactions Endpoint
Copy the URL of your running service (e.g.,
https://<subdomain>.<domain>.com
orhttps://<host>:<port>
).Open the General Information section of your bot in the Discord Developer Portal by clicking on bot's avatar or on name.
Paste the copied URL into the Interactions Endpoint URL field and hit on save button.
That’s it! 🚀 Your bot is ready to handle interactions. Try running a
/hello
command to test it out!The text was updated successfully, but these errors were encountered: