Advanced Practices
Do you need certain IDs to use in the command builder?
Last updated
Do you need certain IDs to use in the command builder?
Last updated
Firstly, head over to your settings page in the discord app/site. Here you will want to locate the developer mod setting which can be found via User Settings > Advanced.
Next, head into your server and find the channel in which ID you would like to retrieve. From here simply right click on the channel (PC) to open the action menu. For mobile press and hold on the channel (Mobile).
PC/Desktop
Mobile Users
Simply press 'Copy Channel ID' and you will now have the channels ID saved to your clipboard, you can paste this ID anywhere!
Firstly, head over to your settings page in the discord app/site. Here you will want to locate the developer mod setting which can be found via User Settings > Advanced.
Next, find the user/bot who's ID you wish to get and right click on their username (pc) or press on their username and hit the 3 dots in the users profile (mobile).
PC/Desktop Users
Mobile Users
Next, find the user/bot who's ID you wish to get and right click on their username (pc) or press on their username and hit the 3 dots in the users profile (mobile).
Finally, select 'Copy User ID'. Now you can paste the users/bots ID anywhere you need!
Firstly, add the custom emoji you want to use into your message bar
Move your cursor behind the selected emoji
Add a backslash \ behind the emoji
Send the message
Copy the numbers from the returned format
What might be an essential component for your builds is Discord API. Using this API will allow you to have alternatives in case you are working on more complex functionalities and / or something isn't accessible via the default action blocks or variables. You can send API Requests using the Send an API Request action.
The example above shows an endpoint from the API that creates messages and is found in the Discord API Documentation. Scroll down under the left side to see the list of endpoints / categories. Reading the API is fairly simple, if you would like to create a message using the API then head to the "Message" section of the image above. Once you click on the create message endpoint you can start to implement it into the request block using the steps below.
The first thing you need to setup is the request type and the request URL. The request type you will have to use can be found right before the URL, POST
in this case.
Next you input the request URL. If your using Discord API, the beginning of the URL always starts with https://discord.com/api/v10.
The rest of the URL is the endpoint which is shown in the image above. So in this case the full URL will become: https://discord.com/api/v10/channels/{channel.id}/messages
. You will have to replace {channel.id}
with an actual channel ID or a variable. In general, the starting URL of an API endpoint can be found in the reference page of the documentation you are reading. The reference page of the Discord API Documentation can be found here.
In order to send any API request, Discord needs to know you are authorized to do that (example, the request is being sent by your bot). Go in the HTTP Headers section and set the key field to Authorization
and the value field to Bot {TOKEN_SECRET}
. This simple process authorizes your bot to perform actions and retrieve data from the Discord API. {TOKEN_SECRET} is a variable that contains the token of your bot. For your safety, it can only be used when authorizing a Discord API Request.
Now, you will need to add data to your request. The list of data you can send to a specific endpoint can be found right below the endpoint URL and is usually under a "JSON/Form Params" Section. This means that all data you provide wil have to be specified in the Request Body section of your API Request. Instead, if the title says "Query String Params" (see example below), you will have to add them in the URL Params section.
To add a field to your API Request, fill in the key value with the field name (example content
, see example). Add a value on the value field, and ensure it is an accepted value (see the value type column (for example, a string can be basically anything, an integer must be a number, a boolean can be either true or false. Arrays and objects are more complex data types)).