Update log channels
curl --request PATCH \
--url https://quark.bot/api/servers/{guild_id}/config/logging/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"main_channel": "<string>",
"category_modlog": "<string>",
"category_members": "<string>",
"category_actions": "<string>",
"category_text": "<string>",
"category_voice": "<string>",
"category_files": "<string>",
"category_server": "<string>",
"category_roles": "<string>",
"category_channels": "<string>",
"category_quark": "<string>"
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/config/logging/channels"
payload = {
"main_channel": "<string>",
"category_modlog": "<string>",
"category_members": "<string>",
"category_actions": "<string>",
"category_text": "<string>",
"category_voice": "<string>",
"category_files": "<string>",
"category_server": "<string>",
"category_roles": "<string>",
"category_channels": "<string>",
"category_quark": "<string>"
}
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({
main_channel: '<string>',
category_modlog: '<string>',
category_members: '<string>',
category_actions: '<string>',
category_text: '<string>',
category_voice: '<string>',
category_files: '<string>',
category_server: '<string>',
category_roles: '<string>',
category_channels: '<string>',
category_quark: '<string>'
})
};
fetch('https://quark.bot/api/servers/{guild_id}/config/logging/channels', 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/channels",
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([
'main_channel' => '<string>',
'category_modlog' => '<string>',
'category_members' => '<string>',
'category_actions' => '<string>',
'category_text' => '<string>',
'category_voice' => '<string>',
'category_files' => '<string>',
'category_server' => '<string>',
'category_roles' => '<string>',
'category_channels' => '<string>',
'category_quark' => '<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}/config/logging/channels"
payload := strings.NewReader("{\n \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\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/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/config/logging/channels")
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 \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "<string>"
}{}{}{}{}Log channels
Update log channels
Sets the main log channel or the channel for one or more categories. Include only the fields you want to change.
Set a field to a channel ID to send that category there, or to null to make it follow the main channel again. Quark registers its webhook in each channel you set, so it needs Manage Webhooks there.
PATCH
/
servers
/
{guild_id}
/
config
/
logging
/
channels
Update log channels
curl --request PATCH \
--url https://quark.bot/api/servers/{guild_id}/config/logging/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"main_channel": "<string>",
"category_modlog": "<string>",
"category_members": "<string>",
"category_actions": "<string>",
"category_text": "<string>",
"category_voice": "<string>",
"category_files": "<string>",
"category_server": "<string>",
"category_roles": "<string>",
"category_channels": "<string>",
"category_quark": "<string>"
}
'import requests
url = "https://quark.bot/api/servers/{guild_id}/config/logging/channels"
payload = {
"main_channel": "<string>",
"category_modlog": "<string>",
"category_members": "<string>",
"category_actions": "<string>",
"category_text": "<string>",
"category_voice": "<string>",
"category_files": "<string>",
"category_server": "<string>",
"category_roles": "<string>",
"category_channels": "<string>",
"category_quark": "<string>"
}
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({
main_channel: '<string>',
category_modlog: '<string>',
category_members: '<string>',
category_actions: '<string>',
category_text: '<string>',
category_voice: '<string>',
category_files: '<string>',
category_server: '<string>',
category_roles: '<string>',
category_channels: '<string>',
category_quark: '<string>'
})
};
fetch('https://quark.bot/api/servers/{guild_id}/config/logging/channels', 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/channels",
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([
'main_channel' => '<string>',
'category_modlog' => '<string>',
'category_members' => '<string>',
'category_actions' => '<string>',
'category_text' => '<string>',
'category_voice' => '<string>',
'category_files' => '<string>',
'category_server' => '<string>',
'category_roles' => '<string>',
'category_channels' => '<string>',
'category_quark' => '<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}/config/logging/channels"
payload := strings.NewReader("{\n \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\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/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/config/logging/channels")
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 \"main_channel\": \"<string>\",\n \"category_modlog\": \"<string>\",\n \"category_members\": \"<string>\",\n \"category_actions\": \"<string>\",\n \"category_text\": \"<string>\",\n \"category_voice\": \"<string>\",\n \"category_files\": \"<string>\",\n \"category_server\": \"<string>\",\n \"category_roles\": \"<string>\",\n \"category_channels\": \"<string>\",\n \"category_quark\": \"<string>\"\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.
Pattern:
^\d{17,20}$Example:
"301655085954367490"
Query Parameters
Set to pro to act on the Quark Pro bot's configuration. Leave out for the main Quark bot.
Available options:
pro Body
application/json
The main log channel.
Modlogs.
Members.
Actions.
Messages.
Voice.
Files (deleted attachments).
Server.
Roles.
Channels.
Quark Events.
Response
Accepted.
An empty object.
Was this page helpful?

