Skip to content

Commit

Permalink
all: replace old callout types with new doks equivalents
Browse files Browse the repository at this point in the history
  • Loading branch information
jo3-l committed Jun 13, 2024
1 parent 119141c commit 35a6e3d
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 48 deletions.
6 changes: 3 additions & 3 deletions content/docs/core/command-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ is helpful if you forget your prefix, as sending `@YAGPDB.xyz prefix` will recal

{{< /callout >}}

{{< callout context="warning" title="Flags and Switches" >}}
{{< callout context="caution" title="Flags and Switches" >}}

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

Expand All @@ -59,7 +59,7 @@ Command overrides are considered in the following order, with settings applied a
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="info" title="Example" >}}
{{< callout context="note" title="Example" >}}

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
Expand Down Expand Up @@ -102,7 +102,7 @@ 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 warning >}}
{{< callout caution >}}

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

Expand Down
8 changes: 4 additions & 4 deletions content/docs/custom-commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This is a relatively common trip-hazard, so take great care when you set up both

{{< /callout >}}

{{< callout info >}}
{{< callout note >}}

Role restrictions are unrelated to member permissions. Having `Administrator` permissions will not override these
restrictions.
Expand Down Expand Up @@ -126,7 +126,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 warning >}}
{{< callout caution >}}

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 @@ -233,7 +233,7 @@ 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 info >}}
{{< callout note >}}

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

Expand Down Expand Up @@ -352,7 +352,7 @@ for the best coding experience.

{{< /callout >}}

{{< callout warning >}}
{{< callout caution >}}

Custom commands do not autosave.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight = 1
## Adding The Bot

{{< callout info >}}
{{< callout note >}}

You need to have the **Manage Server** permission to add the bot to your server.

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 warning >}}
{{< callout caution >}}

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 @@ -8,7 +8,7 @@ limited number of deleted messages.

<!--more-->

{{< callout info >}}
{{< callout note >}}

YAGPDB IS NOT A LOGGING BOT.

Expand All @@ -23,7 +23,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 warning >}}
{{< callout caution >}}

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

Expand Down
6 changes: 3 additions & 3 deletions content/docs/moderation/moderation-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ mute tab on the control panel.

[Unmute Command Syntax](/commands#unmute)

{{< callout warning >}}
{{< callout caution >}}

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 @@ -200,7 +200,7 @@ when configuring other roles' permission overrides.

{{< /callout >}}

{{< callout info >}}
{{< callout note >}}

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 @@ -238,7 +238,7 @@ field in the ban tab on the control panel which enables automatic deletion when

[Unban Command Syntax](/commands#unban)

{{< callout info >}}
{{< callout note >}}

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
6 changes: 3 additions & 3 deletions content/docs/moderation/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 info >}}
{{< callout note >}}

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 @@ -47,7 +47,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 warning >}}
{{< callout caution >}}

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 @@ -75,7 +75,7 @@ Logged events are:

## Alt Detection

{{< callout info >}}
{{< callout note >}}

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/reddit.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Get notifications from your favorite subreddits directly in your Discord server.

<!--more-->

{{< callout warning >}}
{{< callout caution >}}
Fast Reddit feeds to the **top 10 subreddits** are disabled, due to being too spammy for YAGPDB's current system.
{{< /callout >}}

Expand Down
2 changes: 1 addition & 1 deletion content/docs/notifications/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There are currently some issues with the streaming announcement, and it may not
however, always assign the streamer role.
{{< /callout >}}

{{< callout warning >}}
{{< callout caution >}}
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.
{{< /callout >}}
Expand Down
2 changes: 1 addition & 1 deletion content/docs/notifications/youtube.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Get notifications from your favorite YouTubers directly in your Discord server.

## YouTube Feed

{{< callout warning >}}
{{< callout caution >}}

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

Expand Down
2 changes: 1 addition & 1 deletion content/docs/premium.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ A premium server unlocks the following benefits:

- Increase maximum YouTube feeds per guild from 50 to 250 (`GuildMaxFeedsPremium`).

{{< callout warning >}}
{{< callout caution >}}

Some features enhanced or enabled by premium have been disabled on Botlabs' publicly hosted instance, often due to
ratelimits with 3rd party APIs YAGPDB relies on.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/custom-command-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Prebuilt custom commands for use as a learning reference.

<!--more-->

{{< callout warning >}}
{{< callout caution >}}

Note: This page is no longer updated with the latest versions of codes/commands. If you plan to copy paste codes for
your server, see [this website](https://yagpdb-cc.github.io) which is frequently updated with new community-contributed
Expand Down
6 changes: 3 additions & 3 deletions content/docs/reference/custom-embeds.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A guide to creating custom embeds in various contexts across YAGPDB.

<!--more-->

{{< callout warning >}}
{{< callout caution >}}

Embeds have limits, summarized [here](https://discord.com/developers/docs/resources/channel#embed-object-embed-limits).

Expand Down Expand Up @@ -83,7 +83,7 @@ and the last curly brace (`}`). After this you can just copy and paste it into D

## Embeds in Custom Commands

{{< callout warning >}}
{{< callout caution >}}

Embeds in custom commands are a little more difficult. Also, there is no generator that you could use for this. **Please only proceed if you have a good amount of knowledge about custom commands and templates in general.**

Expand Down Expand Up @@ -236,7 +236,7 @@ This generates the following embed:

You can play around with this command a bit, it's really easy to use.&#x20;
{{< callout info >}}
{{< callout note >}}
Simple embeds can be used in custom commands:
Expand Down
20 changes: 10 additions & 10 deletions content/docs/reference/templates/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ usually denoted by 3-dot `...`ellipsis.&#x20;
If functions or methods are denoted with an accent, tilde \~, they are not yet deployed in actual YAGPDB bot or have
been disabled in main bot, but are in master code branch.

{{< callout warning >}}
{{< callout caution >}}

**Always put curly brackets around the data and "actions you perform" you want to formulate as a template** like
this:`{{.User.Username}}`
Expand All @@ -38,7 +38,7 @@ structure also known as an action with methods and functions stated below.

{{< /callout >}}

{{< callout info >}}
{{< callout note >}}

Templating system uses standard ASCII quotation marks:\
0x22 > `"` for straight double quotes, 0x27 > `'`for apostrophes and 0x60 `` ` `` for backticks/back quotes; so make
Expand Down Expand Up @@ -98,7 +98,7 @@ would be `{{ add 2 (randInt 41) }}`. Same pipeline but using a variable is also
not return anything as printout, 40 still goes through pipeline to addition and 42 is stored to variable `$x` whereas
`{{($x:=40)| add 2}}` would return 42 and store 40 to `$x`.

{{< callout warning >}}
{{< callout caution >}}

Pipes are useful in select cases to shorten code and in some cases improve readability, but they **should not be
overused**. In most cases, pipes are unnecessary and cause a dip in readability that helps nobody.
Expand Down Expand Up @@ -319,7 +319,7 @@ to `eq`.

{{< /callout >}}

{{< callout info >}}
{{< callout note >}}

Comparison operators always require the same type: i.e comparing `1.23` and `1` would throw **`incompatible types for
comparison`** error as they are not the same type (one is float, the other int). To fix this, you should convert both to
Expand All @@ -339,7 +339,7 @@ the same type -> for example, `toFloat 1`.
channels. The dot `.` is set to successive elements of those data structures and output will follow execution. If the
value of pipeline has zero length, nothing is output or if an `{{else}}` action is used, that section will be executed.

{{< callout info >}}
{{< callout note >}}

To skip execution of a single iteration and jump to the next iteration, the `{{continue}}` action may be used. Likewise,
if one wishes to skip all remaining iterations, the `{{break}}` action may be used. These both are usable also inside
Expand Down Expand Up @@ -374,7 +374,7 @@ Like `if`, `range`is concluded with`{{end}}`action and declared variable scope i
{{ $x := 42 }} {{ range $x := seq 2 4 }} {{ $x }} {{ end }} {{ $x }}
```

{{< callout warning >}}
{{< callout caution >}}

**Custom command response was longer than 2k (contact an admin on the server...)**\
or \
Expand Down Expand Up @@ -505,7 +505,7 @@ To define an associated template, use the `define` action. It has the following
{{ end }}
```

{{< callout warning >}}
{{< callout caution >}}

**Warning:** Template definitions must be at the top level of the custom command program; in other words, they cannot be
nested in other actions (for example, an if action.) That is, the following custom command is invalid:
Expand Down Expand Up @@ -575,7 +575,7 @@ To execute a custom command, one of three methods may be used: `template`, `bloc
value. Note that the name of the template to execute must be a string constant; similar to `define` actions, a variable
referencing a value of string type is invalid. Data to use as the context may optionally be provided following the name.

{{< callout info >}}
{{< callout note >}}

While `template` is function-like, it is not an actual function, leading to certain quirks; notably, it must be used
alone, not part of another action (like a variable declaration), and the data argument need not be parenthesized. Due to
Expand Down Expand Up @@ -651,7 +651,7 @@ _templates.SDict_ (abridged to _sdict_) types and their methods. Both types hand
called an empty interface which allows a value to be of any type. So any argument of any type given is handled. (In
"custom commands"-wise mainly primitive data types, but _slices_ as well.)

{{< callout warning >}}
{{< callout caution >}}

**Reference type-like behavior:** Slices and dictionaries in CCs exhibit reference-type like behavior, which may be
undesirable in certain situations. That is, if you have a variable `$x` that holds a slice/dictionary, writing `$y :=
Expand Down Expand Up @@ -802,7 +802,7 @@ Learning resources covers database [more in-depth](https://learn.yagpdb.xyz/inte

## Tickets

{{< callout warning >}}
{{< callout caution >}}

Ticket functions are limited to 1 call per custom command for both normal and premium guilds and limited to max 10 open
tickets per user.
Expand Down
Loading

0 comments on commit 35a6e3d

Please sign in to comment.