curl --request PATCH \
--url https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"log_channel": "<string>",
"color": 123,
"ignore_bot_executors": true,
"ignore_bot_targets": true
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}"
payload = {
"enabled": True,
"log_channel": "<string>",
"color": 123,
"ignore_bot_executors": True,
"ignore_bot_targets": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
log_channel: '<string>',
color: 123,
ignore_bot_executors: true,
ignore_bot_targets: true
})
};
fetch('https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}', 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}/config/logging/settings/{log_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'log_channel' => '<string>',
'color' => 123,
'ignore_bot_executors' => true,
'ignore_bot_targets' => true
]),
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}/config/logging/settings/{log_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}"
response = http.request(request)
puts response.read_body{}{}{
"error": "<string>"
}{}Update settings for a log type
Changes the settings of one log type.
On the free plan only enabled can be changed. The other fields need Quark Pro or Pro Lite.
Send log_channel in a request of its own. When it is present, only the channel is changed and the other fields in the same request are ignored. A 202 for log_channel does not confirm that the channel was accepted. Read the settings back, or run the troubleshooter, to check.
curl --request PATCH \
--url https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"log_channel": "<string>",
"color": 123,
"ignore_bot_executors": true,
"ignore_bot_targets": true
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}"
payload = {
"enabled": True,
"log_channel": "<string>",
"color": 123,
"ignore_bot_executors": True,
"ignore_bot_targets": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
log_channel: '<string>',
color: 123,
ignore_bot_executors: true,
ignore_bot_targets: true
})
};
fetch('https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}', 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}/config/logging/settings/{log_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'log_channel' => '<string>',
'color' => 123,
'ignore_bot_executors' => true,
'ignore_bot_targets' => true
]),
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}/config/logging/settings/{log_id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/config/logging/settings/{log_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"log_channel\": \"<string>\",\n \"color\": 123,\n \"ignore_bot_executors\": true,\n \"ignore_bot_targets\": true\n}"
response = http.request(request)
puts response.read_body{}{}{
"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"
A log type ID. See the log types page.
0 <= x <= 100Query Parameters
Set to pro to act on the Quark Pro bot's configuration. Leave out for the main Quark bot.
pro Body
Switch this log type on or off.
A channel for this log type alone, or null to follow its category. Needs Quark Pro or Pro Lite.
Embed colour as an integer RGB value, or null for the default. Needs Quark Pro or Pro Lite.
Format for this log type, or null to use the server-wide format. Needs Quark Pro or Pro Lite.
0, 2, null Do not log this type when a bot did it. Needs Quark Pro or Pro Lite.
Do not log this type when it was done to a bot. Needs Quark Pro or Pro Lite.
Response
Accepted.
An empty object.
Was this page helpful?

