Saphire-API
Credits by Developers
- Rody#1000 - 451619591320371213 - Reviewer and Refatoring
- NewLayer#0333 - 732954224090021920 - Login System, Routers Designer and Database Login Documents
- Gorniaky#2023 - 395669252121821227 - Initing and Maintenence
Routes and Methods
Base URL:
https://ways.discloud.app
/commands
GET - Return an object array containing all Saphire Bot's Commands with name, category and description.
@returns [{}] Object Array
[
{
"name": "admin",
"category": "admin",
"description": "[admin] Comandos administrativos"
},
{
"name": "invite",
"category": "bot",
"description": "[bot] Um link rápido para me colocar no seu servidor"
}
]
The key called "authorization" in headers is required
/phrases
GET - Return a random phrase to show at site's home page.
@returns String
"O brilho de uma lua"
The key called "authorization" in headers is required
/topgg
POST - Receive the Saphire Bot's Votes from Top.gg.
@returns "OK" - String | Status 200 "OK"
{
"status": 200,
"message": "OK"
}
The key called "authorization" in headers is required
/sender
POST - Send a webhook message request to Discord API by URL
@returns "OK" - String | Status 200 "OK"
{
"status": 200,
"message": "OK"
}
The key called "authorization" in headers is required
Body Constructor: webhookUrl: string, content: string, embeds: DiscordApiEmbed array, avatarURL: string, files: DiscordApiFiles, username: string
async function sendWebhook() {
return await axios.post(
"https://ways.discloud.app/sender",
{
webhookUrl,
...BodyConstructorShowAbove
},
{
headers: {
authorization: process.env.WEBHOOK_SENDER_AUTHORIZATION
}
}
)
}