Skip to content

Commit

Permalink
all: callout titles, text reflow, remove dupe / confusing text
Browse files Browse the repository at this point in the history
Add meaningful titles to all callouts of the format `Type: Title`.
If no appropriate title can be found, especially for single sentences, I
elected to remove the callout entirely (but keep the sentence).

Reflow some text that grossly exceeded 120 columns and get rid of some
GitBook generator artifacts like ` `- and `\`-spam.

Remove some confusing / outdated / now incorrect text, primarily the
"Legend" on the functions reference. I have made a mental note to rework
the introduction on Syntax and Data as well as Functions.

Signed-off-by: Luca Zeuch <[email protected]>
  • Loading branch information
l-zeuch committed Oct 11, 2024
1 parent 243514a commit 8678013
Show file tree
Hide file tree
Showing 27 changed files with 249 additions and 307 deletions.
23 changes: 7 additions & 16 deletions content/docs/core/command-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ prefix was instead `?`, one would use `?remindme ...`, and so on.

Slash commands are always triggered using the `/` character and hence do not depend on the prefix configured here.

{{< callout context="tip" title="Tip" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Mention as a Command Prefix" icon="outline/rocket" >}}

In addition to the command prefix, you can trigger YAGPDB commands by pinging the bot at the start of your message. This
is helpful if you forget your prefix, as sending `@YAGPDB.xyz prefix` will recall it.

{{< /callout >}}

{{< callout context="caution" title="Flags and Switches" icon="outline/alert-triangle" >}}
{{< callout context="caution" title="Caution: Flags and Switches" icon="outline/alert-triangle" >}}

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

Expand All @@ -52,21 +52,18 @@ where the `raw` switch is still spelled `-raw`, not `?raw`.
Command overrides are considered in the following order, with settings applied at later steps overwriting earlier ones:

1. If the _All commands enabled_ setting is not checked, all commands are initially disabled (otherwise enabled.)
2. General restrictions configured in _Global Settings_ are then applied, base restrictions before command-specific restrictions.
2. General restrictions configured in _Global Settings_ are then applied, base restrictions before command-specific
restrictions.
3. Channel-specific restrictions (_Override #1_, _Override #2_, ...) are applied analogously.

The order above trickles down from least specific to most specific, prioritizing the most specific setting -- an analogy
The order above trickles down from least specific to most specific, prioritizing the most specific setting---an analogy
for developers would be CSS's cascading rules.

{{< callout context="note" title="Example" icon="outline/info-circle" >}}

Though perhaps confusing at first, the priority order above is designed to make common configurations trivial. For
instance, to disable all but a specific command -- say the `remindme` command -- one can simply disable the _All
instance, to disable all but a specific command---say the `remindme` command---one can simply disable the _All
commands enabled_ option and then create a command override that enables only `remindme`. This is possible as command
overrides are applied after the _All commands enabled_ setting.

{{< /callout >}}

## Options

### Common Options
Expand All @@ -80,13 +77,11 @@ Clicking on either of these options (**3**,**4**) opens a drop-down menu with al
Select as many as you wish. YAGPDB will then either require all members to have any of these roles in order to run
commands, or completely ignore members with any of the ignored roles, server admins and owners included.

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Priority of Ignored vs. Required Roles" icon="outline/info-circle" >}}

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.

{{< /callout >}}

#### Autodelete Trigger / Response Interval
Expand All @@ -101,12 +96,8 @@ If 10 seconds are not enough, or too long, feel free to adjust as you see fit; t
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.

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}

You must select at least one channel or category; otherwise, the settings of the override will not be applied.

{{< /callout >}}

#### Channels

With this setting, you can select individual channels to apply the override to. Select as many as you wish.
Expand Down
37 changes: 9 additions & 28 deletions content/docs/custom-commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Edit this to change the output of the custom command {{.CCID}}!

Each custom command is assigned a unique incrementing ID, which cannot be modified after creation.

{{< callout context="tip" title="Troubleshooting" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Troubleshooting" icon="outline/rocket" >}}

![Empty CC Discord Messages](empty_cc_1.png)

Expand Down Expand Up @@ -79,21 +79,13 @@ Selecting a group allows you to edit it. Changes must be saved (**11**) to take
Using role/channel restrictions, it is possible to set conditions on which users can trigger a custom command.

Specifically, whitelisted roles or channels are required to run the command, whereas blacklisted roles or channels
cannot use the command at all.
cannot use the command at all. These role restrictions are unrelated to member permissions. Having `Administrator`
permissions will not override these restrictions.

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Priority of Ignored vs. Required Roles" icon="outline/info-circle" >}}

YAGPDB was raised well and honors a "no" when told "no". In other words, blacklists take precedence over whitelists.

This is a relatively common trip-hazard, so take great care when you set up both whitelists and blacklists.

{{< /callout >}}

{{< callout context="note" title="Note" icon="outline/info-circle" >}}

Role restrictions are unrelated to member permissions. Having `Administrator` permissions will not override these
restrictions.

{{< /callout >}}

## Editing a Custom Command
Expand Down Expand Up @@ -125,7 +117,7 @@ commands like `customcommands` accept a CC ID as an argument.

Within a command response, the ID may be retrieved using the `{{ .CCID }}` template.

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Deleting is Irreversible" icon="outline/alert-octagon" >}}

Deleting a custom command does not allow its ID to be reassigned. If you delete a CC, its ID is lost forever.

Expand Down Expand Up @@ -187,7 +179,7 @@ Reactions to a message will trigger the command.

Can specify **Added Only**, **Removed Only**, or **Both** to restrict which types of Reactions will trigger the command.

{{< callout context="tip" title="Filtering Emojis" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Filtering Emojis" icon="outline/rocket" >}}

You cannot specify which emojis the command will trigger on. If you'd like to limit which emojis run the code, you will
need to write that code yourself in the response.
Expand Down Expand Up @@ -232,12 +224,8 @@ When editing an interval command, a **Run Now** button appears at the bottom of
long as the command is not disabled and a channel is selected. Running an interval command using this button reschedules
all subsequent runs based off the current time.

{{< callout context="note" title="Note" icon="outline/info-circle" >}}

You must specify a channel to run interval commands in even if the command doesn't output a message.

{{< /callout >}}

##### Component

[In-depth Interactions Guide](/docs/reference/custom-interactions)
Expand Down Expand Up @@ -282,13 +270,6 @@ getting data from users, sending messages to other channels, and more. Visit the

{{< link-card href="/docs/reference/templates/syntax-and-data" description="Templates" target="_blank" >}}

{{< callout context="tip" title="Keeping your code safe" icon="outline/rocket" >}}

It is recommended to save local copies of your custom commands. There is no way to recover deleted or overwritten CCs.
Use an editor like **Vim**, **VS Code**, or **Notepad++** for the best coding experience.

{{< /callout >}}

### Custom Command Group

Dropdown selection (**9**) to change which command group the command is in. Select `None` to ungroup the command.
Expand Down Expand Up @@ -319,7 +300,7 @@ not send a response. It also increases if the command is run via `execCC`.

The run count will not increase if the user who ran the command did not pass the restrictions.

{{< callout context="tip" title="Troubleshooting" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Troubleshooting" icon="outline/rocket" >}}

If your command fails to run, check the run count. If the run count increases when you attempt to run the command, the
issue is with your code. Otherwise, the issue may be with YAGPDB's permissions in your server, or improperly configured
Expand Down Expand Up @@ -359,15 +340,15 @@ A custom command **will not save** if there is an error in your input. Examples

If you save a command with an interval trigger which has never been run, it will run immediately upon saving.

{{< callout context="tip" title="Keeping your code safe" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Keeping Your Code Safe" icon="outline/rocket" >}}

It is recommended to code your custom command using a local editor on your device. You will not be able to save your
code on the dashboard if there are syntax errors in your code. Use an editor like **Vim**, **VS Code**, or **Notepad++**
for the best coding experience.

{{< /callout >}}

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Remember to Save" icon="outline/alert-octagon" >}}

Custom commands do not autosave.

Expand Down
22 changes: 9 additions & 13 deletions content/docs/fun/soundboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,35 @@ Choose to require users to have a role in order to play this sound.

### Upload file

{{< callout context="tip" title="Tip" icon="outline/rocket" >}}
{{< callout context="note" title="Note: Choose Either URL or File Upload" icon="outline/info-circle" >}}

Do **not** fill in the URL if you are going uploaded from local files, and vice versa.

{{< /callout >}}


You have two options to upload sounds:

- Upload with local files
- Specify a URL

#### Upload with local files

Click on _Choose file_ and \_\_ select an audio file to upload. All types of sound files, including videos with sound
tracks, are supported.
Click on _Choose file_ and select an audio file to upload. All types of sound files, including videos with soundtracks,
are supported.

#### Specify a URL

You can also specify a sound URL instead of uploading one.&#x20;

{{< callout context="tip" title="Tip" icon="outline/rocket" >}}
You can also specify a sound URL instead of uploading one.

This has to be the direct link to the media file, and not a YouTube link. A direct link should end with`.mp3`(or other
relevant audio/video type), such as
[http://soundboard.panictank.net/AIRHORN.mp3](http://soundboard.panictank.net/AIRHORN.mp3).&#x20;

{{< /callout >}}
This has to be the direct link to the media file, and not, for example, a YouTube Video link. A direct link should end
with `.mp3` (or other relevant audio/video type), such as <https://soundboard.panictank.net/AIRHORN.mp3>.

### Finish

Click on _Upload/Download_ after you are done with the previous steps. You should see a _Success_ notification when the
upload is completed. Check the status of the sound under _Existing sounds_. \__ Wait for several minutes, and press
\_Save_ again if the status does not show _Ready_.
upload is completed. Check the status of the sound under _Existing sounds_. Wait for several minutes, and press
_Save_ again if the status does not show _Ready_.

![An example of a successfully uploaded sound](example_soundboard.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ By extension, these conditions are also available as ruleset scoped conditions.
All conditions have to be met in order for a rule to execute — that is, the conditions are combined according to the
logical AND operator.

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Mutual Exclusivity" icon="outline/alert-octagon" >}}

Ensure that the conditions you set are not in conflict or mutually exclusive, as this will cause your rule to never
trigger.
Expand Down
4 changes: 2 additions & 2 deletions content/docs/moderation/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ limited number of deleted messages.

<!--more-->

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Not a Logging Bot" icon="outline/info-circle" >}}

YAGPDB IS NOT A LOGGING BOT.

Expand All @@ -24,7 +24,7 @@ The log is accessible on YAGPDB's website for later viewing. It saves message ti
User ID, and the message itself. If a message contains an attachment, the attachment URL is logged. If a message
contains an embed, it is serialized and saved in JSON format.

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Maximum Log Retention" icon="outline/alert-octagon" >}}

Message logs on the official YAGPDB instance will be automatically deleted after 30 days of their creation.

Expand Down
8 changes: 4 additions & 4 deletions content/docs/moderation/moderation-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ mute tab on the control panel.

[Unmute Command Syntax](/docs/core/all-commands#unmute)

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Discord Permission Precedence" icon="outline/alert-octagon" >}}

Within a server channel's permission overrides, allowing a permission to a specific role or user supersedes disallowing
a permission to a specific role. This means if you grant Role X the permission to send messages in a channel and
Expand All @@ -199,7 +199,7 @@ when configuring other roles' permission overrides.

{{< /callout >}}

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Unmute Author After Duration Expired" icon="outline/info-circle" >}}

If you set a duration for the mute, the bot will unmute the user after the specified duration. When this occurs, it
appears as an unmute action taken by YAGPDB in your mod log, regardless of which moderator initially muted the user.
Expand Down Expand Up @@ -237,7 +237,7 @@ field in the ban tab on the control panel which enables automatic deletion when

[Unban Command Syntax](/docs/core/all-commands#unban)

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Unban Author After Duration Expired" icon="outline/info-circle" >}}

If you set a duration for the ban, the bot will unban the user after the specified duration. When this occurs, it
appears as an unban action taken by YAGPDB in your mod log, regardless of which moderator initially banned the user.
Expand Down Expand Up @@ -276,7 +276,7 @@ You may optionally send warnings to the mod log, this is enabled in the warnings
[TopWarnings Command Syntax](/docs/core/all-commands#topwarnings) - Shows ranked list of warnings on the server, allowing you to turn
misbehavior into a fun minigame for your server members.

{{< callout context="tip" title="Taking Action on Warn Count" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Taking Action on Warn Count" icon="outline/rocket" >}}

Some users prescribe an "x warnings => mute/kick/ban" rule for their servers. To have YAGPDB automatically take action
based on warning count, you can take advantage of the template scripting within the warning DM.
Expand Down
6 changes: 3 additions & 3 deletions content/docs/moderation/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is accomplished by sending new members a customizable DM (which employs [te
containing a unique link to verify, tied to their User ID. This link takes them to a customizable verification page with
a CAPTCHA challenge. Once completed, the User ID is assigned the verified role.

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Verified Role" icon="outline/info-circle" >}}

You must assign a "Verified Role" on the Verification page in the control panel. The plugin will not function if no role
is selected.
Expand Down Expand Up @@ -46,7 +46,7 @@ You can customize both messages in the Verification page on the control panel.
Verification scripts provide `.Link` as additional dot context data. This is the unique verification link the user must
visit to verify.

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: DMs may not be Received" icon="outline/alert-octagon" >}}

If a user has disabled DMs from server members by default, upon joining your server YAGPDB will fail to send a
verification DM to the user. It is recommended that you inform your new members about this possibility and how to fix it
Expand Down Expand Up @@ -74,7 +74,7 @@ Logged events are:

## Alt Detection

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Disabled on Official Instance" icon="outline/info-circle" >}}

Alt Detection is currently disabled on the official instance of YAGPDB hosted by Botlabs. These features will not
function on the official bot.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/notifications/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Write a message that you want the bot to send to the user via DM whenever someon
Choose what channel you want the bot to announce the topic change from a specific channel or the channel that the topic
was changed in.

{{< callout context="tip" title="Tip" icon="outline/rocket" >}}
{{< callout context="tip" title="Tip: Custom Command Syntax" icon="outline/rocket" >}}

Custom command templates are supported for usage in all the notification feeds provided.

Expand Down
6 changes: 0 additions & 6 deletions content/docs/notifications/reddit.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ Get notifications from your favorite subreddits directly in your Discord server.

<!--more-->

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}

Fast Reddit feeds to the **top 10 subreddits** are disabled, due to being too spammy for YAGPDB's current system.

{{< /callout >}}

## Reddit Feed

![Small showcase of the Reddit feeds interface.](./reddit.png)
Expand Down
4 changes: 2 additions & 2 deletions content/docs/notifications/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Let everyone know that someone is currently streaming.

### Streaming Feed

{{< callout context="note" title="Note" icon="outline/info-circle" >}}
{{< callout context="note" title="Note: Announcements may not Post" icon="outline/info-circle" >}}

There are currently some issues with the streaming announcement, and it may not always give the announcement. It will
however, always assign the streamer role.

{{< /callout >}}

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}
{{< callout context="danger" title="Danger: Automatic Role Removal" icon="outline/alert-octagon" >}}

The streaming role will be **automatically removed** from a member that is not streaming if it is given manually, so be
careful! If YAGPDB is removing member's roles without apparent reason, this may well be the cause.
Expand Down
24 changes: 8 additions & 16 deletions content/docs/notifications/youtube.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,21 @@ Get notifications from your favorite YouTubers directly in your Discord server.

## YouTube Feed

{{< callout context="danger" title="Danger" icon="outline/alert-octagon" >}}

Do **NOT** fill in both the Channel ID and the Channel URL.

- There may be up to 5-15 minutes of delay for the bot to announce the video after it gets posted.
- The bot will only announce the video if it's public.

{{< /callout >}}

![Showcase of the YouTube feed interface.](./youtube.png)

To get notifications from a YouTube channel, simply go to the YouTuber's channel and input either the ID or the Username in their respective field of the followings:

- YouTube Channel ID

- YouTube Channel Username
Fill in either the YouTube Channel ID, or a Channel URL, not both. The bot will automatically extract the Channel ID
from the URL.

If your channel looks like this `youtube.com/user/h3h3Productions` then you would go into the username line and type
in h3h3Productions.

If your channel looks like this `youtube.com/channel/UCt-ERbX-2yA6cAqfdKOlUwQ` then you would go into the ID line and
type in UCt-ERbX-2yA6cAqfdKOlUwQ.

There may be up to 5--15 minutes of delay for the bot to announce the video after it gets posted, if and only if it is
publicly available. Should you publish your videos as "Members first", the bot will post an announcement once it is
available to the public.

![Showcase of the YouTube feed interface.](./youtube.png)

You can change the channel that the notifications are posted to via the dropdown menu.

You can also mention everyone by clicking the checkbox under the dropdown menu that says Mention everyone.
Loading

0 comments on commit 8678013

Please sign in to comment.