Skip to content

Commit 59384e9

Browse files
authored
Merge pull request #3 from dungeon-hub/develop
Added information about warnings.
2 parents 797ebe1 + 63dc716 commit 59384e9

10 files changed

+203
-13
lines changed

Writerside/dhub.tree

+2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
<toc-element topic="Features.md">
1212
<toc-element topic="Embed-Management.md"/>
1313
<toc-element topic="Role-Management.md"/>
14+
<toc-element topic="Server-Property.md"/>
1415
<toc-element topic="Warnings.md"/>
1516
</toc-element>
1617
<toc-element topic="Commands.md">
1718
<toc-element topic="calc-price.topic"/>
19+
<toc-element topic="config.topic"/>
1820
<toc-element topic="leaderboard.topic"/>
1921
<toc-element topic="manage-score.topic">
2022
<toc-element topic="manage-score-add.topic"/>
22.9 KB
Loading
24.1 KB
Loading

Writerside/topics/Dungeon-Hub-API.topic

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
<!DOCTYPE topic SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
33
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
5-
id="Dungeon-Hub-API" title="Dungeon Hub API">
5+
id="Dungeon-Hub-API" title="Dungeon Hub API ✏️">
66
<chapter title="What is the Dungeon Hub API" id="what-is-the-dungeon-hub-api">
77
<p>The Dungeon Hub API hosts all data that is used in the <a href="Dungeon-Hub-Bot.md"/>. <br/>The <a
88
href="Dungeon-Hub-Bot.md"/> itself only serves as a client to interact with the API - it does not have
99
any database access and only persists data through the API. A documentation with all endpoints and their
1010
usage can be found at <a href="https://api.dungeon-hub.net/"/>.</p>
1111
</chapter>
12+
1213
<chapter title="Authentication" id="authentication">
1314
<p>Most endpoints of the Dungeon Hub API require authentication. <br/>The API uses bearer tokens for
1415
authentication, meaning an Authorization header containing the JWT token must be attached
@@ -36,6 +37,7 @@
3637
client secret as password).</p>
3738
</chapter>
3839
</chapter>
40+
3941
<chapter title="Connecting to the API" id="connecting-to-the-api">
4042
<p>All API endpoints are reachable under <a href="https://api.dungeon-hub.net/"/>. A simple documentation of
4143
all endpoints is available there. <br/>To ease the connection to the API, a Kotlin/JVM library containing

Writerside/topics/Server-Property.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Server Property ✏️
2+
3+
The server property is a way to store and manage server-specific settings that are used across multiple commands.
4+
This includes settings like the moderation log channel, the strike log channel, the score management role, and more.
5+
6+
The settings can be changes using the sub-commands of [](config.topic). \
7+
A list of all available server properties can be found below.
8+
9+
## String / Text
10+
11+
- `BAN_MESSAGE`: The message that is sent to a user when they are banned from the server. It can contain some
12+
placeholders:
13+
- `%\server%`: The name of the server
14+
- `%\form%`: The unban form, if present
15+
- `UNBAN_FORM`: The link to the unban form that is sent to a user when they are banned from the server. If it is
16+
present, it will be attached to the message as a link button, so please make sure that it is in a proper link format.
17+
18+
## Number
19+
20+
`currently none`
21+
22+
## Boolean (true/false)
23+
24+
- `PROFILE_MODERATION_BAN`: If set to `true`, the bot will automatically ban users that have a flagged profile, meaning
25+
a suspicious username that might impersonate legitimate bots or users. Otherwise, only a log message is sent into the
26+
`MODERATION_LOGS_CHANNEL`.
27+
28+
## Channel
29+
30+
- `MODERATION_LOGS_CHANNEL`: The channel where moderation logs are sent to. This includes all messages about warnings
31+
and messages when a user is flagged.
32+
- `SCORE_LOGS_CHANNEL`: The channel where special messages about the score system are sent to. This includes messages
33+
when a log was denied by a staff member and when score is managed (using [](manage-score.topic)).
34+
- `STRIKES_LOGS_CHANNEL`: The channel where strike logs are sent to, meaning messages when a warning with [type
35+
`Strike`](Warning-Type.md) is added or edited.
36+
- `LOG_APPROVING_CHANNEL`: `Coming soon`
37+
- `TRANSCRIPTS_CHANNEL`: The channel where transcripts are sent to. If the server uses Ticket Tool, please make sure
38+
that transcripts of all service tickets are sent to this channel. The bot will only listen to ticket transcripts in
39+
this channel, other channels will be ignored.
40+
- `TOTAL_SCORE_LEADERBOARD_CHANNEL`: The channel where the total score leaderboard is sent to. This leaderboard shows
41+
the total score of all users in the server.
42+
- `SERVICE_TEAM_RULES_CHANNEL`: `Coming soon`
43+
- `CNT_MESSAGES_CHANNEL`: `Coming soon`
44+
- `CNT_INFORMATION_CHANNEL`: `Coming soon`
45+
46+
## Category
47+
48+
`currently none`
49+
50+
## Role
51+
52+
- `SCORE_MANAGEMENT_ROLE`: The score management role affect which users are allowed to manage the score of other users
53+
using the [](manage-score.topic) command. If a user does not have this role, they are not allowed to manage the score
54+
of other users, and a warning message will be shown to them when using that command. If this property isn't set, the
55+
user is required to have the `Administrator` permission to manage the score of other users. Additionally, this is
56+
required to discard the `/log` message of other users.

Writerside/topics/Warnings.md

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
# Warnings
22

3-
Warnings are an easy way to log wrongful behavior of users, together with an automated way of punishing them based on the amount of warnings received.
3+
Warnings are an easy way to log wrongful behavior of users, together with an automated way of punishing them based on
4+
the amount of warnings received.
45

56
## Displaying your warnings
7+
68
To display the active warns you currently have, you can use the command [](warns.topic).
79
> You need to have the `Moderate Members` permission to be able to see warns of other users through this command.
8-
{style="note"}
10+
> {style="note"}
911
10-
To display all warns, even if they [were deactivated](warn-deactivate.topic), you can use the command [](warn-list-all.topic).
12+
To display all warns, even if they [were deactivated](warn-deactivate.topic), you can use the
13+
command [](warn-list-all.topic).
1114

1215
## Managing warnings
13-
It's possible to manage warns using the command [](warn.topic). All warnings that are created have a unique numerical id that is used across all commands. \
14-
When a warning is [given to a server member](warn-add.topic), [punishments](Warning-Punishment.md) can be automatically applied to the user.
15-
> Currently, configuration of punishments is unavailable to server admins. If you wish to use them, please contact [the development team](mailto:[email protected])
16-
{style="warning"}
1716

18-
[Punishments](Warning-Punishment.md) aren't updated/lifted when a warning is [deactivated](warn-deactivate.topic) or updated by an [evidence being added](warn-add-evidence.topic).
17+
It's possible to manage warns using the command [](warn.topic). All warnings that are created have a unique numerical id
18+
that is used across all commands. \
19+
When a warning is [given to a server member](warn-add.topic), [punishments](Warning-Punishment.md) can be automatically
20+
applied to the user.
21+
> Currently, configuration of punishments is unavailable to server admins. If you wish to use them, please
22+
> contact [the development team](mailto:[email protected])
23+
> {style="warning"}
24+
25+
[Punishments](Warning-Punishment.md) aren't updated/lifted when a warning is [deactivated](warn-deactivate.topic) or
26+
updated by an [evidence being added](warn-add-evidence.topic).
27+
28+
When warnings are edited, either by them being created, when an evidence is added or when they are deactivated, the
29+
change is logged in the [respective channel](#log-channel).
30+
31+
## Log-Channel
32+
33+
When warnings are managed successfully, a log message containing the relevant information is sent into the log
34+
channel. \
35+
The log channel depends on the [](Warning-Type.md):
36+
If the [warning type](Warning-Type.md) is either `Serious`, `Major` or `Minor`, the message is sent into the channel of
37+
the [server property `MODERATION_LOGS_CHANNEL`](Server-Property.md), otherwise it's sent into the
38+
[`STRIKES_LOGS_CHANNEL`](Server-Property.md).

Writerside/topics/config.topic

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE topic
3+
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
4+
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
6+
title="/config ✏️" id="config">
7+
8+
<code>Coming soon</code>
9+
</topic>

Writerside/topics/warn-add-evidence.topic

+56-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,61 @@
33
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
44
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
6-
title="/warn add-evidence ✏️" id="warn-add-evidence">
6+
title="/warn add-evidence" id="warn-add-evidence">
77

8-
<code>Coming soon</code>
8+
<tldr>
9+
<p>
10+
<format style="italic">Adds evidence to a warning.</format>
11+
</p>
12+
</tldr>
13+
14+
<chapter title="Examples" id="examples" collapsible="true">
15+
<img alt="warn-add-evidence-1.png" src="warn-add-evidence-1.png" width="325" style="inline"
16+
border-effect="rounded"/>
17+
</chapter>
18+
19+
<chapter title="Description" id="description">
20+
<p>This command adds evidence to a warning.</p>
21+
<p>Please note that you should only supply either an attachment or a text, not both. If you supply both, only
22+
the attachment will be added as an evidence, the text will be ignored.</p>
23+
<p>You can read more about managing warnings <a href="Warnings.md" anchor="managing-warnings">here</a>.</p>
24+
</chapter>
25+
26+
<chapter title="Arguments" id="arguments" collapsible="true">
27+
<table style="header-row">
28+
<tr>
29+
<td>Name</td>
30+
<td>Type</td>
31+
<td>Description</td>
32+
<td>Optional?</td>
33+
<td>Additional</td>
34+
</tr>
35+
36+
<tr>
37+
<td><code>id</code></td>
38+
<td>Number (long)</td>
39+
<td>The id of the warning.</td>
40+
<td>:x: No</td>
41+
<td>
42+
<list>
43+
<li>Min value: 1</li>
44+
</list>
45+
</td>
46+
</tr>
47+
48+
<tr>
49+
<td><code>attachment</code></td>
50+
<td>Attachment</td>
51+
<td>Add an attachment (image or similar) as evidence.</td>
52+
<td>:white_check_mark: Yes</td>
53+
</tr>
54+
55+
<tr>
56+
<td><code>text</code></td>
57+
<td>String</td>
58+
<td>Add a text (or link) as evidence.</td>
59+
<td>:white_check_mark: Yes</td>
60+
</tr>
61+
</table>
62+
</chapter>
963
</topic>

Writerside/topics/warn-add.topic

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
<img alt="warn-add-dm.png" src="warn-add-dm.png" width="325" style="inline" border-effect="rounded"/>
1919
</chapter>
2020

21+
<chapter title="Description" id="description">
22+
<p>This command adds a warning to the given user. It also applies all available <a href="Warning-Punishment.md">punishments</a> to the user.</p>
23+
<p>You can read more about managing warnings <a href="Warnings.md" anchor="managing-warnings">here</a>.</p>
24+
</chapter>
25+
2126
<chapter title="Arguments" id="arguments" collapsible="true">
2227
<table style="header-row">
2328
<tr>

Writerside/topics/warn-deactivate.topic

+44-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,49 @@
33
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
44
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
6-
title="/warn deactivate ✏️" id="warn-deactivate">
6+
title="/warn deactivate" id="warn-deactivate">
77

8-
<code>Coming soon</code>
8+
<tldr>
9+
<p>
10+
<format style="italic">Deactivate a given warning.</format>
11+
</p>
12+
</tldr>
13+
14+
<chapter title="Examples" id="examples" collapsible="true">
15+
<img alt="warn-deactivate-1.png" src="warn-deactivate-1.png" width="325" style="inline"
16+
border-effect="rounded"/>
17+
<img alt="warn-deactivate-not-found.png" src="warn-deactivate-not-found.png" width="325" style="inline"
18+
border-effect="rounded"/>
19+
</chapter>
20+
21+
<chapter title="Description" id="description">
22+
<p>This command deactivates a given warning.</p>
23+
<p>This will mean that the warning will no longer be shown in <a href="warns.topic"/> and will no longer have an
24+
effect when <a href="Warning-Punishment.md">punishments</a> are calculated.</p>
25+
<p>You can read more about managing warnings <a href="Warnings.md" anchor="managing-warnings">here</a>.</p>
26+
</chapter>
27+
28+
<chapter title="Arguments" id="arguments" collapsible="true">
29+
<table style="header-row">
30+
<tr>
31+
<td>Name</td>
32+
<td>Type</td>
33+
<td>Description</td>
34+
<td>Optional?</td>
35+
<td>Additional</td>
36+
</tr>
37+
38+
<tr>
39+
<td><code>id</code></td>
40+
<td>Number (long)</td>
41+
<td>The id of the warning.</td>
42+
<td>:x: No</td>
43+
<td>
44+
<list>
45+
<li>Min value: 1</li>
46+
</list>
47+
</td>
48+
</tr>
49+
</table>
50+
</chapter>
951
</topic>

0 commit comments

Comments
 (0)