curl --request POST \
--url https://quark.bot/api/servers/{guild_id}/troubleshoot/fix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automatic": true,
"channelId": "<string>",
"logType": 123,
"ignoreType": 123,
"value": "<string>"
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix"
payload = {
"automatic": True,
"channelId": "<string>",
"logType": 123,
"ignoreType": 123,
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
automatic: true,
channelId: '<string>',
logType: 123,
ignoreType: 123,
value: '<string>'
})
};
fetch('https://quark.bot/api/servers/{guild_id}/troubleshoot/fix', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automatic' => true,
'channelId' => '<string>',
'logType' => 123,
'ignoreType' => 123,
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix"
payload := strings.NewReader("{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quark.bot/api/servers/{guild_id}/troubleshoot/fix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/troubleshoot/fix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"applied": true
}{
"applied": true,
"pending": true
}{
"error": "<string>"
}{}{}{}{}Apply a fix
Applies one of the automatic fixes from a troubleshooting report. Send the finding’s fix object as the request body.
curl --request POST \
--url https://quark.bot/api/servers/{guild_id}/troubleshoot/fix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automatic": true,
"channelId": "<string>",
"logType": 123,
"ignoreType": 123,
"value": "<string>"
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix"
payload = {
"automatic": True,
"channelId": "<string>",
"logType": 123,
"ignoreType": 123,
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
automatic: true,
channelId: '<string>',
logType: 123,
ignoreType: 123,
value: '<string>'
})
};
fetch('https://quark.bot/api/servers/{guild_id}/troubleshoot/fix', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automatic' => true,
'channelId' => '<string>',
'logType' => 123,
'ignoreType' => 123,
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quark.bot/api/servers/{guild_id}/troubleshoot/fix"
payload := strings.NewReader("{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quark.bot/api/servers/{guild_id}/troubleshoot/fix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/troubleshoot/fix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"automatic\": true,\n \"channelId\": \"<string>\",\n \"logType\": 123,\n \"ignoreType\": 123,\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"applied": true
}{
"applied": true,
"pending": true
}{
"error": "<string>"
}{}{}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The server's ID. Must be the server the token was created for.
^\d{17,20}$"301655085954367490"
Query Parameters
Set to pro to act on the Quark Pro bot's configuration. Leave out for the main Quark bot.
pro Body
An automatic fix. Take it from the fix field of a finding in the troubleshooting report.
initialise_guild, register_webhook, clear_log_channel, enable_log_type, remove_ignore, disable_bot_ignore True if this endpoint can apply the fix. A fix with automatic: false has to be done by hand and is rejected.
For register_webhook and clear_log_channel.
mainChannel, modlogCategory, membersCategory, actionsCategory, textCategory, voiceCategory, filesCategory, serverCategory, rolesCategory, channelsCategory, quarkCategory For register_webhook.
For enable_log_type.
For remove_ignore.
For remove_ignore.
For disable_bot_ignore.
executors, targets Response
The fix was applied.
Was this page helpful?

