diff --git a/content/docs/core/command-settings.md b/content/docs/core/command-settings.md index a21acaa..6d98626 100644 --- a/content/docs/core/command-settings.md +++ b/content/docs/core/command-settings.md @@ -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. @@ -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 @@ -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. diff --git a/content/docs/custom-commands/commands.md b/content/docs/custom-commands/commands.md index 64ee8b4..ef48c08 100644 --- a/content/docs/custom-commands/commands.md +++ b/content/docs/custom-commands/commands.md @@ -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. @@ -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. @@ -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. @@ -352,7 +352,7 @@ for the best coding experience. {{< /callout >}} -{{< callout warning >}} +{{< callout caution >}} Custom commands do not autosave. diff --git a/content/docs/getting-started.md b/content/docs/getting-started.md index f957a8d..c33e8c2 100644 --- a/content/docs/getting-started.md +++ b/content/docs/getting-started.md @@ -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. diff --git a/content/docs/moderation/advanced-automoderator/conditions.md b/content/docs/moderation/advanced-automoderator/conditions.md index a62b172..2b5b095 100644 --- a/content/docs/moderation/advanced-automoderator/conditions.md +++ b/content/docs/moderation/advanced-automoderator/conditions.md @@ -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. diff --git a/content/docs/moderation/logging.md b/content/docs/moderation/logging.md index 532a274..c64c1b3 100644 --- a/content/docs/moderation/logging.md +++ b/content/docs/moderation/logging.md @@ -8,7 +8,7 @@ limited number of deleted messages. -{{< callout info >}} +{{< callout note >}} YAGPDB IS NOT A LOGGING BOT. @@ -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. diff --git a/content/docs/moderation/moderation-overview.md b/content/docs/moderation/moderation-overview.md index a94d88f..1347a65 100644 --- a/content/docs/moderation/moderation-overview.md +++ b/content/docs/moderation/moderation-overview.md @@ -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 @@ -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. @@ -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. diff --git a/content/docs/moderation/verification.md b/content/docs/moderation/verification.md index 5ae11bb..3781915 100644 --- a/content/docs/moderation/verification.md +++ b/content/docs/moderation/verification.md @@ -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. @@ -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 @@ -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. diff --git a/content/docs/notifications/reddit.md b/content/docs/notifications/reddit.md index 066754a..e1577e9 100644 --- a/content/docs/notifications/reddit.md +++ b/content/docs/notifications/reddit.md @@ -7,7 +7,7 @@ Get notifications from your favorite subreddits directly in your Discord server. -{{< 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 >}} diff --git a/content/docs/notifications/streaming.md b/content/docs/notifications/streaming.md index 1a79d67..725ac6d 100644 --- a/content/docs/notifications/streaming.md +++ b/content/docs/notifications/streaming.md @@ -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 >}} diff --git a/content/docs/notifications/youtube.md b/content/docs/notifications/youtube.md index 2fbe506..f16f659 100644 --- a/content/docs/notifications/youtube.md +++ b/content/docs/notifications/youtube.md @@ -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. diff --git a/content/docs/premium.md b/content/docs/premium.md index e715709..e4735bb 100644 --- a/content/docs/premium.md +++ b/content/docs/premium.md @@ -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. diff --git a/content/docs/reference/custom-command-examples.md b/content/docs/reference/custom-command-examples.md index da50673..1fdc81b 100644 --- a/content/docs/reference/custom-command-examples.md +++ b/content/docs/reference/custom-command-examples.md @@ -7,7 +7,7 @@ Prebuilt custom commands for use as a learning reference. -{{< 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 diff --git a/content/docs/reference/custom-embeds.md b/content/docs/reference/custom-embeds.md index 3c75ff5..2b1b65a 100644 --- a/content/docs/reference/custom-embeds.md +++ b/content/docs/reference/custom-embeds.md @@ -7,7 +7,7 @@ A guide to creating custom embeds in various contexts across YAGPDB. -{{< callout warning >}} +{{< callout caution >}} Embeds have limits, summarized [here](https://discord.com/developers/docs/resources/channel#embed-object-embed-limits). @@ -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.** @@ -236,7 +236,7 @@ This generates the following embed: You can play around with this command a bit, it's really easy to use. -{{< callout info >}} +{{< callout note >}} Simple embeds can be used in custom commands: diff --git a/content/docs/reference/templates/_index.md b/content/docs/reference/templates/_index.md index a6c9d74..63639d4 100644 --- a/content/docs/reference/templates/_index.md +++ b/content/docs/reference/templates/_index.md @@ -28,7 +28,7 @@ usually denoted by 3-dot `...`ellipsis. 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}}` @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 \ @@ -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: @@ -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 @@ -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 := @@ -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. diff --git a/content/docs/reference/templates/functions.md b/content/docs/reference/templates/functions.md index d82ed25..609cd35 100644 --- a/content/docs/reference/templates/functions.md +++ b/content/docs/reference/templates/functions.md @@ -10,7 +10,7 @@ values you can send in your response or use as arguments for other functions. > Functions are underappreciated. In general, not just in templates. // Rob Pike -{{< callout info >}} +{{< callout note >}} Every function having both cases possible for an argument - ID/name, then this name is handled case insensitive, for example `getRole "yagpdb"` and `getRole "yAgPdB"` would have same responses even if server has both of these roles, so @@ -20,7 +20,7 @@ using IDs is better. ### Channel -{{< callout info >}} +{{< callout note >}} The ratelimit for editing a channel is 2 requests per 10 minutes per channel. @@ -63,7 +63,7 @@ The ratelimit for editing a channel is 2 requests per 10 minutes per channel. Patterns are basic PostgreSQL patterns, not Regexp: An underscore `(_)` matches any single character; a percent sign `(%)` matches any sequence of zero or more characters. -{{< callout info >}} +{{< callout note >}} **Note about saving numbers into database:** As stated above, database stores numbers as type _float64_. If you save a large number into database like an _int64_ (which IDs are), the value will be truncated. To avoid this behavior, you can @@ -76,7 +76,7 @@ convert the number to type _string_ before saving and later back to its original ### ExecCC -{{< callout warning >}} +{{< callout caution >}} `execCC` calls are limited to 1 / CC for non-premium users and 10 / CC for premium users. @@ -109,7 +109,7 @@ convert the number to type _string_ before saving and later back to its original ### Math -{{< callout info >}} +{{< callout note >}} Boolean logic (and, not, or) and comparison operators (eq, gt, lt, etc.) are covered in [conditional branching](/reference/templates#if-conditional-branching). @@ -237,7 +237,7 @@ something nice - you all are doing awesome!" "filename" currentTime.Weekday)}}` ### Miscellaneous -{{< callout info >}} +{{< callout note >}} `if`, `range`, `try-catch`, `while`, `with` actions are all covered [here](/reference/templates#actions). @@ -247,7 +247,7 @@ something nice - you all are doing awesome!" "filename" currentTime.Weekday)}}` ### Role functions -{{< callout info >}} +{{< callout note >}} In all role functions where userID is required as argument to target a user, it can also be full user object. @@ -273,7 +273,7 @@ In all role functions where userID is required as argument to target a user, it ### String manipulation -{{< callout info >}} +{{< callout note >}} All regexp functions are limited to 10 different pattern calls per CC. @@ -298,7 +298,7 @@ All regexp functions are limited to 10 different pattern calls per CC. | `upper` "string" | Converts the string to uppercase. | | `urlescape` "string" | Escapes the _string_ so it can be safely placed inside a URL path segment - e.g. "Hello, YAGPDB!" becomes "Hello%2C%20YAGPDB%21"
There's also predefined template package function `urlquery` which is covered [here](https://pkg.go.dev/text/template#hdr-Functions). | -{{< callout info >}} +{{< callout note >}} Special information we can include in the string is _escape sequences_. Escape sequences are two (or more) characters, the first of which is a backslash `\`, which gives the remaining characters special meaning - let's call them @@ -306,7 +306,7 @@ metacharacters. The most common escape sequence you will encounter is `\n`, whic {{< /callout >}} -{{< callout info >}} +{{< callout note >}} With regular expression patterns - when using quotes you have to "double-escape" metacharacters starting with backslash. You can use backquotes/ticks to simplify this:`{{reFind "\\d+" (toString 42)}}` versus `` {{reFind `\d+` (toString @@ -340,7 +340,7 @@ You can use backquotes/ticks to simplify this:`{{reFind "\\d+" (toString 42)}}` | `timestampToTime` arg | Converts UNIX timestamp to _time.Time_. Example: \{{timestampToTime 1420070400\}} would return same time as `.DiscordEpoch`. | | `weekNumber` time | Returns the week number as _int_ of given argument `time` of type _time.Time_. `{{weekNumber currentTime}}` would return the week number of current time. | -{{< callout info >}} +{{< callout note >}} Discord Timestamp Styles referenced [here](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) can be done using `print` diff --git a/hugo_stats.json b/hugo_stats.json index 869b14f..89f09aa 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -78,13 +78,12 @@ "btn-primary", "callout", "callout-body", + "callout-caution", "callout-content", - "callout-info", "callout-note", "callout-success", "callout-tip", "callout-title", - "callout-warning", "card", "card-body", "card-list",