https://api.botforge.org/v1/validate
curl -X POST "https://api.botforge.org/v1/validate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "<string>",
"package": "<string>",
"branch": "<string>",
"strict": "<boolean>"
}'
const res = await fetch("https://api.botforge.org/v1/validate", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"code": "<string>",
"package": "<string>",
"branch": "<string>",
"strict": "<boolean>"
}),
});
const data = await res.json();
{
"success": true,
"code": "$sendMessage[$channelID;Hello!]",
"cleanCode": "$sendMessage[$channelID;Hello!]",
"isCodeBlock": false,
"totalIssues": 0,
"errorsCount": 0,
"warningsCount": 0,
"hintsCount": 0,
"hasIssues": false,
"headerText": "### <:bf_check:1574414039407136789> ForgeScript Code is Valid",
"summaryText": "No syntax errors or issues detected across 1 line.",
"issuesText": "",
"functionsText": "",
"hasFunctions": false,
"color": "#57f287",
"diagnostics": [],
"functionsDetected": [
{
"name": "$sendMessage",
"package": "forgescript",
"version": "1.0.0"
},
{
"name": "$channelID",
"package": "forgescript",
"version": "1.0.0"
}
],
"endpoint": "/v1/validate",
"strict": false,
"total_issues": 0
}