Add an HTTP endpoint to allow a message to be "Proxied" to Discord
Issue #14
resolved
We require an HTTP(s) endpoint, authenticated via token that accepts a JSON representation of a Discord message to be sent immediately.
Endpoint: /message
Header: Authorization: Bearer YWxhZGRpbjpvcGVuc2VzYW1l
Request: application/json
{
"channel": "680882586242908176",
"message": "This is a test message, it may contain mentions <@192742534022168576>, discuss channels <#680873189106384988>, or mention a <&773860580644749322>",
"embed": {
"url": "https://www.meetup.com/Norfolk-Developers-NorDev/events/274950110/",
"title": "Building a real-time serverless app in Blazor using AWS",
"description": "A dashboard that reacts in real-time to events that happen in the real world. We will connect the Blazor application through to a serverless backend built in .Net.",
"colour": "#abc123",
"image": "https://placekitten.com/1200/675",
"video": "https://www.youtube.com/watch?v=dH9V2fbgBOw",
"fields": [
{
"name": "Date",
"value": "Thursday, February 11, 19:30"
},
{
"name": "Topics",
"value": "C#, Blazor, AWS"
}
]
}
}
Response:
{
"status": "ok",
"id": "809885591041867827"
}
Thank you much!
Comments (2)
-
reporter -
repo owner - changed status to resolved
Fix
#14: Add send endpoint→ <<cset 029da341a100>>
- Log in to comment
I’ve just noted I didn’t detail the fields in the response.
Status, is ashamedly always “ok”, perhaps we can discuss a better format for things like rate limit issues. The id field is the returned message id for the new message.