Button Routes
These are the API routes to do with the discord buttons on the project.
Create a new button
POST /buttons/add
This will create a new discord button
Headers
Content-Type
application/json
Authorization
<key>
Body
buttonId
UUIDv4
The database Id of the button
discordButtonId
string
The unique id for the discord button
guildId
string
The id of the guild where the button is added
channelId
string
The id of the discord channel for the button
messageId
string
The id of the message for the discord button
buttonType
string
The buttonType used in the buttonInteraction system
buttonJsonExtraData
json as string
This is the extra data that buttons can carry
Response
{
"created": boolean
}{
"error": {
"code": 400,
"message": "Could not create a new button"
},
"catchError": "string"
}If authorization header not provided:
{
"error": {
"code": 403
"message": "Please specify an authorization key!"
}
}If invalid authorization key:
{
"error": {
"code": 403,
"message": "Invalid authorization Key!"
}
}Delete button
POST /buttons/remove
This will delete the button from a id
Headers
Content-Type
application/json
Authorization
<key>
Body
buttonId
UUIDv4
The database id for the button
Response
If authorization header not provided:
If invalid authorization key:
Get Button
GET /buttons/get/[ Discord Button Id ]/[ Discord Channel Id ]/[ Discord Message Id ]/[ Discord Guild Id ]
This will respond with button information
Headers
Content-Type
application/json
Authorization
<key>
Request
Discord Button Id
string
The custom id of the discord button
Discord Channel Id
string
The id from the discord channel
Discord Message Id
string
The id from the discord message
Discord Guild Id
string
The id from the discord guild
Response
If authorization header not provided:
If invalid authorization key:
Does Button Exist
GET /buttons/exist/[ Discord Button Id ]/[ Discord Channel Id ]/[ Message Id ]/[ Discord Guild Id ]
This will respond with button information
Headers
Content-Type
application/json
Authorization
<key>
Request
Discord Button Id
string
The custom id of the discord button
Discord Channel Id
string
The id from the discord channel
Discord Message Id
string
The id from the discord message
Discord Guild Id
string
The id from the discord guild
Response
If authorization header not provided:
If invalid authorization key:
Last updated