Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/core: document core section #13

Merged
merged 10 commits into from
Mar 2, 2024
1 change: 1 addition & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = 'Introduction'
weight = 1
+++

> Documentation is for users. - Rob Pike
Expand Down
10 changes: 10 additions & 0 deletions content/core/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
archetype = "chapter"
title = "Core"
weight = 2
+++

This chapter covers everything under the **Core** category on the control panel, probably one of the most important
categories — especially during your initial setup.

{{%children containerstyle="div" style="h2" description="true" %}}
124 changes: 124 additions & 0 deletions content/core/command-settings.md
l-zeuch marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
+++
title = 'Command Settings'
weight = 3
+++

Fine-grained control over all of YAGPDB's inbuilt commands.

<!--more-->

## Overview

Command overrides enable you to impose fine-grained control over all of YAGPDB's inbuilt commands. Before we go into
greater detail, a quick overview of that page below.

![Overview of the Command Settings page.](/images/core/command_settings_overview.png)

<center>

**1** Command prefix, default `-` **2** *All commands enabled* setting **3** Required roles **4** Ignored roles
**5** Autodelete trigger interval **6** Autodelete response interval **7** Command overrides **8** Channel overrides tabs

</center>

The prefix setting (**1**) should be relatively straight-forward; whatever you type in that text-box, that becomes your
prefix. Slash commands, which use Discord's API to add them to your client's interface, are obviously still prefixed
by a slash `/`.

As a small bonus, YAGPDB will also consider a ping at the start of a message as a command prefix, which is quite helpful
when you forgot it, as simply sending `@YAGPDB.xyz prefix` will help you remember it.

Commands will not work when *All commands enabled* (**2**) is not checked.

{{% notice style="tip" title="Flags and Switches" %}}

Flags and switches are ***not*** affected by your prefix setting.

For example, if your prefix is `?`, a command usage with flags and/or switches would look like the following:

```
?wouldyourather -raw
```

{{% /notice %}}

### Command Override Priority

Command overrides and related settings are checked and applied in a very specific order, later settings completely
overwriting earlier ones.

First, the bot checks whether all commands are enabled. After that, overrides found in *Global Settings* are applied,
which can enable or disable specific commands.

The penultimate step is applying *Channel Overrides*, if applicable. Finally, command overrides found in there are applied.

Admittedly, this is at first relatively confusing, however there is a system to this madness. Essentially it trickles
down from least specific to most specific, giving the most specific setting priority. If you know about CSS's cascading
rules, this should be somewhat familiar.

## Options

### Common Options

These options are common across all three sub-settings: global settings, channel overrides, and individual command
overrides.

#### Required and Ignored Roles

Clicking on either of these options (**3**,**4**) opens a drop-down menu with all the roles present on your server.
Select as many as you wish. YAGPDB will then either require any and all members to have any of these roles, or
completely ignore members with any of the ignored roles, server admins and owners included.

{{% notice style="note" %}}

YAGPDB was raised well and honors a "no" when told "no". In other words, ignored roles take precedence over required
roles.

This is a relatively common trip-hazard, so take great care when you set up both required and ignored roles, and
subsequently give those roles to your members.

{{% /notice %}}

#### Autodelete Trigger / Response Interval

This setting makes YAGPDB automatically delete the triggering message and/or the response from the bot after that many
seconds have passed. To activate it, make sure to click the checkbox next to the respective input field (**5**,**6**).

If 10 seconds are not enough, or too long, feel free to adjust as you see fit; the intervals need not be equal.

### Channel Override Options

These options are only available for channel overrides (**8**). To add a new one, head to the *New channel override*
tab on the command settings page.

#### Channels

With this setting, you can select individual channels this override should apply to. Select as many as you wish. When
there is no channel selected, it may not apply its settings, assuming you also did not select categories.

You find this setting in the top-left corner of any channel override.

#### Categories

Just like channels, this setting will make the override apply its settings to any channels (including future ones) in
the selected category. If there is no category selected, settings might not apply, given that you also did not select
any channels to apply to.

You find this setting in the top-right corner of any channel override, adjacent to its channels setting.

### Command Override Options

These options are only available for individual command overrides (**7**). To add a new one, go to either your
global settings or any channel override and click on *New command override*.

#### Commands

This setting allows you to select specific commands to apply the command override to. Select as many as you wish to
apply an override to. You cannot have two (or more) overrides for the same command in the same tab, i.e. global settings
or a specific channel override.

#### Enable Specified Commands

Toggling this option simply tells YAGPDB whether the commands you selected are enabled or disabled. This allows you to
disable some specific commands if, for example, you have a custom command that replaces an inbuilt one, thus
necessitating disabling said inbuilt command.
39 changes: 39 additions & 0 deletions content/core/control-panel-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
+++
title = 'Control Panel Access'
weight = 1
+++

Select who can view or edit your control panel.

<!--more-->

This page is relatively simple, yet very powerful. To start with, a quick overview of what it looks like:

![Overview of the control panel access configuration page.](/images/core/control_panel_access.png)

We'll go over the options you have from top to bottom. As usual, make sure you hit save when you change any of the
following settings.

### Read Access

#### Allow people with the following roles

The very top option is to allow people with certain roles read access to the control panel. Simply open the drop-down
select menu and select the roles you wish to grant read access.

#### Allow all members read access

This switch is fairly straight forward, when enabled any and all members of your server are granted read access. For
reference, this is enabled on the support server, but it may be a good idea to keep it disabled.

#### Allow users not part of your server read access

Taking the above one step further, this toggle lets any and all users, even not logged in ones, to view your control
panel. In general, it is a very good idea to have this disabled, unless you have good reasons not to. For the record,
this option is enabled on the support server's control panel.

### Write Access

Quite simple, but moderately dangerous. Anyone with these roles can edit anything on your control panel, so do handle
this with care. To make things easier to configure, members with **Manage Server** permissions can always edit the
control panel.
17 changes: 17 additions & 0 deletions content/core/control-panel-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
title = 'Control Panel Logs'
weight = 2
+++

See what happened on your control panel.

<!--more-->

This page simply lists in a very general way who edited what on the control panel, not much else going on.
Fairly useful to audit who may be responsible if things go haywire, but other than that you're probably unlikely to use
this page much.

Please don't be confused when you see someone with `destroy_0001` and the ID `598900258579283976`, as that is the bot
owner of the officially hosted instance and he may at times change things to ensure proper operation.

![Screenshot of some example control panel logs.](/images/core/control_panel_logs.png)
7 changes: 5 additions & 2 deletions content/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You need to have the **Manage Server** permission to add the bot to your server.
{{% /notice %}}

1. Go to <https://yagpdb.xyz/manage>
2. Click on *Login with Discord* in the top-left corner
2. Click on *Login with Discord* in the top-right corner
3. Authorize the application to know what servers you are in
4. Select the server you want to add the bot to in the dropdown menu

Expand All @@ -27,7 +27,7 @@ the navigation and layout.
<!-- Yes, this is hacky. No, I don't know of a better way. -->
<div style="float: right; margin-left: 7px; margin-top: -10px;">

![Visual reference when all commands are enabled.](images/getting-started/all_commands_enabled.png?classes=right)
![Visual reference when all commands are enabled.](/images/getting-started/all_commands_enabled.png?classes=right)

</div>

Expand All @@ -41,3 +41,6 @@ If those did not work, please read the FAQ on the support server.

This documentation aims to go through all of YAGPDB's features as they appear in the order on the control panel.
Reference material, or miscellaneous topics are in their own category as to not bloat things up with unnecessary detail.

We recommend reading this document in its entirety, from start to finish, exempting reference material, before or during
setup.
Binary file added static/images/core/command_settings_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/core/control_panel_access.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/core/control_panel_logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading