diff --git a/.editorconfig b/.editorconfig
index 712ceaf7..aa0674ec 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,9 +4,7 @@ root = true
charset = utf-8
indent_style = space
indent_size = 2
+spelling_language = en-US
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
-
-[*.md]
-max_line_length = 120
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 79451d1f..00000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Lint
-
-on:
- pull_request:
-
-jobs:
- markdown:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Lint markdown files
- uses: DavidAnson/markdownlint-cli2-action@v19
- continue-on-error: true
- with:
- globs: |
- content/**/*.md
- !content/docs/core/all-commands.md
- config: config/.markdownlint.yaml
diff --git a/README.md b/README.md
index cf811284..acf90f30 100644
--- a/README.md
+++ b/README.md
@@ -2,33 +2,29 @@
Experimental / proof of concept page to replace the current documentation which is built with GitBook.
-This documentation is built with [Hugo](https://gohugo.io) in conjunction with the [Doks theme](https://getdoks.org/) as
-an experiment to see if it is a viable alternative.
+This documentation is built with [Hugo](https://gohugo.io) in conjunction with the [Doks theme](https://getdoks.org/) as an experiment to see if it is a viable alternative.
## Contributing / Building
-Install [Node.js](https://nodejs.org/en), clone this repository, install the dependencies with `npm install`, and run
-`npm run dev` to start a local server. The server will automatically rebuild the page when you make changes.
+Install [Node.js](https://nodejs.org/en), clone this repository, install the dependencies with `npm install`, and run `npm run dev` to start a local server.
+The server will automatically rebuild the page when you make changes.
-To build the page in release mode, use `HUGO_BASEURL=... npm run build`, then serve the generated `public/` directory
-with your webserver of choice.
+To build the page in release mode, use `HUGO_BASEURL=... npm run build`, then serve the generated `public/` directory with your webserver of choice.
For more information, please view our [Contributing Guidelines](.github/CONTRIBUTING.md).
### Editor Setup
-As this project uses the [EditorConfig](https://editorconfig.org/) standard, you will have to make sure that your
-editor supports it. Most modern editors do, but if you are unsure, check the EditorConfig page.
+As this project uses the [EditorConfig](https://editorconfig.org/) standard, you will have to make sure that your editor supports it.
+Most modern editors do, but if you are unsure, check the EditorConfig page.
### Authoring Content
-Pages are written in Markdown with additional shortcodes provided by the Doks theme; refer to [its
-documentation](<(https://getdoks.org/docs/start-here/getting-started/)>) for a complete list of features.
+Pages are written in Markdown with additional shortcodes provided by the Doks theme; refer to [its documentation](<(https://getdoks.org/docs/start-here/getting-started/)>) for a complete list of features.
-If you are editing pages related to custom commands, note that codeblocks support a custom `yag` language for accurate
-syntax highlighting—do not use `go`. However, this feature is only enabled in production builds for performance, so
-`npm run dev` will _not_ highlight `yag` codeblocks. Use `npm run build` followed by `npm run preview` instead if you
-need to verify that code is highlighted correctly.
+If you are editing pages related to custom commands, note that codeblocks support a custom `yag` language for accurate syntax highlighting—do not use `go`.
+However, this feature is only enabled in production builds for performance, so `npm run dev` will _not_ highlight `yag` codeblocks.
+Use `npm run build` followed by `npm run preview` instead if you need to verify that code is highlighted correctly.
> [!TIP]
> If you use VSCode, this project provides custom workspace snippets to insert callouts, which you can activate in
@@ -36,5 +32,5 @@ need to verify that code is highlighted correctly.
## License
-This documentation's text is distributed under the terms of the Creative Commons Attribution ShareAlike 4.0 license
-(SPDX-indentifer `CC-BY-SA`). Please view the [LICENSE](LICENSE) file for more information.
+This documentation's text is distributed under the terms of the Creative Commons Attribution ShareAlike 4.0 license (SPDX-indentifer `CC-BY-SA`).
+Please view the [LICENSE](LICENSE) file for more information.
diff --git a/config/.markdownlint.yaml b/config/.markdownlint.yaml
deleted file mode 100644
index 245c4605..00000000
--- a/config/.markdownlint.yaml
+++ /dev/null
@@ -1,96 +0,0 @@
-# Enable all rules; we'll configure some of them below.
-default: true
-
-# MD001: Header levels should only increment by one level at a time.
-# Normally, this is a fair rule, but it does not quite work for our cases,
-# especially in our humongous functions list. So disable it.
-MD001: false
-
-# MD002: First header should be a top level header.
-# Some files do not have a top-level header, because it doesn't make sense for
-# them, or just looks incredibly stupid on the rendered page. So disable this
-# entire rule.
-MD002: false
-
-# MD004: Unordered list style.
-# Use dashes for unordered lists. All lists. Even sublists.
-MD004:
- style: "dash"
-
-# MD010: Hard tabs.
-# ALlow hard tabs in code blocks, but not in normal text.
-MD010:
- code_blocks: false
-
-# MD013: Line length.
-# Allow lines to be up to 120 characters long, see the .editorconfig file.
-# We also ignore code blocks, because they are often long and should not be
-# wrapped at all. Same goes for tables.
-MD013:
- line_length: 120
- code_blocks: false
- tables: false
-
-# MD024: Multiple headers with the same content.
-# Allow multiple headers with the same content so long they are under different
-# parent headers.
-MD024:
- siblings_only: true
-
-# MD026: Trailling punctuation in header.
-# Allow question marks (FAQ-style).
-MD026:
- punctuation: ".,;:!"
-
-# MD029: Ordered list item prefix.
-# Should increase in numerical order.
-MD029:
- style: "ordered"
-
-# MD033: Inline HTML.
-# Allow certain HTML elements, because we use them for nicer page layout.
-MD033:
- allowed_elements: ["center", "div", "sup", "br", "kbd"]
-
-# MD037: Spaces inside emphasis markers.
-# This rule is broken. See https://github.com/markdownlint/markdownlint/issues/84
-MD037: false
-
-# MD041: First line in file should be a top-level header.
-# See comment to MD002. It makes no sense to set this to H2 for similar reasons,
-# we have TOML frontmatter with an automatic h1 in the rendered page.
-MD041: false
-
-# MD048: Code fence style.
-# Use backticks for code fences.
-MD048:
- style: "backtick"
-
-# MD049: Emphasis style. (Italics)
-# Use asterisks for italics.
-# MD049:
-# style: "asterisk"
-# FIXME: Re-enable this rule once we have fixed all the italics in the docs.
-MD049: false
-
-# MD050: Strong style.
-# Use double asterisks for bold text.
-MD050:
- style: "asterisk"
-
-# MD051: Link fragments should be valid.
-# Disable this rule, because Hugo already checks for (potentially) broken links.
-MD051: false
-
-# MD052: Reference links and images should use a label that is defined.
-# Similar reasons as MD051, Hugo already checks for broken links.
-MD052: false
-
-# MD053: Link and image reference definitions should be needed.
-# Similar reasons as MD051, Hugo already checks for broken links.
-MD053: false
-
-# MD054: Link and image style.
-# Disable this rule, because it is very extensive and thus painful to configure.
-# By extension, also very painful to fix.
-MD054: false
diff --git a/content/docs/core/command-settings.md b/content/docs/core/command-settings.md
index fe9766d0..bcb4ab8d 100644
--- a/content/docs/core/command-settings.md
+++ b/content/docs/core/command-settings.md
@@ -8,28 +8,33 @@ Fine-grained control over all of YAGPDB's inbuild commands.
## Overview
-Command overrides allow you to restrict access to YAGPDB's inbuilt commands and optionally configure intervals after
-which the command trigger and response will be autodeleted. The key features of the page are as follows:
-
-
+Command overrides allow you to restrict access to YAGPDB's inbuilt commands and optionally configure intervals after which the command trigger and response will be autodeleted.
+The key features of the page are shown below.
-The prefix (**1**) is a short sequence of characters that trigger YAGPDB commands. By default, the prefix is `-`. Thus,
-for instance, the `remindme` command is invoked by prefixing the command name with a hyphen: `-remindme ...`. If the
-prefix was instead `?`, one would use `?remindme ...`, and so on.
+The prefix (**1**) is a short sequence of characters that trigger YAGPDB commands.
+By default, the prefix is `-`.
+Thus, for instance, the `remindme` command is invoked by prefixing the command name with a hyphen: `-remindme ...`.
+If the 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: 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.
+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 >}}
@@ -56,56 +61,54 @@ Command overrides are considered in the following order, with settings applied a
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
-for developers would be CSS's cascading rules.
+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.
-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
-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.
+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 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.
## Options
### Common Options
-These options are common across all three sub-settings: global settings, channel overrides, and individual command
-overrides.
+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 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.
+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 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: 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.
+YAGPDB was raised well and honors a "no" when told "no".
+In other words, ignored roles take precedence over required roles.
{{< /callout >}}
#### Autodelete Trigger / Response Interval
-This setting makes YAGPDB automatically delete the triggering message and/or its response after the configured duration
-has passed. To activate it, make sure to click the checkbox next to the respective input field (**5**,**6**).
+This setting makes YAGPDB automatically delete the triggering message and/or its response after the configured duration has 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.
#### Slash command response always ephemeral
-Toggling this setting on will make YAGPDB always respond to slash commands with an ephemeral message. This means that
-only the user who triggered the command will be able to see the response.
+Toggling this setting on will make YAGPDB always respond to slash commands with an ephemeral message.
+This means that only the user who triggered the command will be able to see the response.
### 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.
+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.
You must select at least one channel or category; otherwise, the settings of the override will not be applied.
#### Channels
-With this setting, you can select individual channels to apply the override to. Select as many as you wish.
+With this setting, you can select individual channels to apply the override to.
+Select as many as you wish.
You find this setting in the top-left corner of any channel override.
@@ -117,17 +120,16 @@ You find this setting in the top-right corner of any channel override, adjacent
### 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_.
+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.
+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, which may be useful if -- for example -- you have created a custom command that
-completely replaces an inbuilt one.
+Toggling this option simply tells YAGPDB whether the commands you selected are enabled or disabled.
+This allows you to disable some specific commands, which may be useful if -- for example -- you have created a custom command that completely replaces an inbuilt one.
diff --git a/content/docs/core/control-panel-access.md b/content/docs/core/control-panel-access.md
index e394e072..e5f002aa 100644
--- a/content/docs/core/control-panel-access.md
+++ b/content/docs/core/control-panel-access.md
@@ -4,7 +4,8 @@ weight = 210
description = "Select who can view or edit your control panel."
+++
-This page is relatively simple, yet very powerful. An overview of the settings follows.
+This page is relatively simple, yet very powerful.
+An overview of the settings follows.

@@ -12,22 +13,22 @@ This page is relatively simple, yet very powerful. An overview of the settings f
#### 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.
+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.
+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.
+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.
+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.
diff --git a/content/docs/core/control-panel-logs.md b/content/docs/core/control-panel-logs.md
index 10f86d72..d9432edb 100644
--- a/content/docs/core/control-panel-logs.md
+++ b/content/docs/core/control-panel-logs.md
@@ -4,11 +4,9 @@ weight = 220
description = "View a list of recent changes to your YAGPDB configuration."
+++
-This page is the analogue of the audit log built in to Discord for YAGPDB settings and summarizes recent edits on the
-control panel, listing the time, action, and responsible user for each. It is useful to audit who may be responsible if
-things go haywire, but other than that this page is unlikely to be of use.
+This page is the analogue of the audit log built in to Discord for YAGPDB settings and summarizes recent edits on the control panel, listing the time, action, and responsible user for each.
+It is useful to audit who may be responsible if things go haywire, but other than that this page is unlikely to be of use.
-Please do not be confused if you see changes from the user `destroy_0001` (ID `598900258579283976`), as that is the bot
-developer and he may at times need to change certain settings to ensure proper operation.
+Please do not be confused if you see changes from the user `destroy_0001` (ID `598900258579283976`), as that is the bot developer and he may at times need to change certain settings to ensure proper operation.

diff --git a/content/docs/custom-commands/commands.md b/content/docs/custom-commands/commands.md
index f1b9c705..8be03b75 100644
--- a/content/docs/custom-commands/commands.md
+++ b/content/docs/custom-commands/commands.md
@@ -4,23 +4,29 @@ weight = 310
description = "Custom command settings and editor."
+++
-The commands page displays all custom commands and allows you to add, delete, or edit custom commands and custom command
-groups.
+The commands page displays all custom commands and allows you to add, delete, or edit custom commands and custom command groups.

-**1** Create Custom Command **2** List of Commands in Selected Group **3** Edit this Custom Command **4** Delete this
-Custom Command **5** Run this Command Now **6** Selected Group **7** Group Tabs **8** Name of Selected Group **9**
-Delete Selected Group **10** Channel and Role Restrictions **11** Save group settings
+**1** Create Custom Command.
+**2** List of Commands in Selected Group.
+**3** Edit this Custom Command.
+**4** Delete this Custom Command.
+**5** Run this Command Now.
+**6** Selected Group.
+**7** Group Tabs.
+**8** Name of Selected Group.
+**9** Delete Selected Group.
+**10** Channel and Role Restrictions.
+**11** Save group settings.
## Creating a Custom Command
-Clicking the Create Custom Command (**1**) creates a new command within the selected group (**6**) and redirects you to
-a page to edit it.
+Clicking the Create Custom Command (**1**) creates a new command within the selected group (**6**) and redirects you to a page to edit it.
A new custom command has the default response:
@@ -34,8 +40,8 @@ Each custom command is assigned a unique incrementing ID, which cannot be modifi

-If the bot is sending messages such as this in your server, you are likely accidentally triggering CCs with the default
-response. Check the commands page to find any CCs with empty responses.
+If the bot is sending messages such as this in your server, you are likely accidentally triggering CCs with the default response.
+Check the commands page to find any CCs with empty responses.

@@ -43,18 +49,19 @@ response. Check the commands page to find any CCs with empty responses.
## Command List
-The commands page lists the commands (**2**) in the selected group (**6**). They are ordered by [ID](#id-and-name) and
-display their name (if set), [trigger type](#trigger-types), and trigger text (if applicable). You can expand the
-command by clicking on it, which displays the full command response.
+The commands page lists the commands (**2**) in the selected group (**6**).
+They are ordered by [ID](#id-and-name) and display their name (if set), [trigger type](#trigger-types), and trigger text (if applicable).
+You can expand the command by clicking on it, which displays the full command response.
### Delete a Command
-Deleting a custom command (**4**) will **permanently** delete the command after confirmation. This cannot be undone.
+Deleting a custom command (**4**) will **permanently** delete the command after confirmation.
+This cannot be undone.
### Run Now
-The Run now button (**5**) appears on [interval trigger](#hourlyminute-interval) commands. When clicked, it executes the
-command immediately as long as the command isn't disabled and a channel is selected.
+The Run now button (**5**) appears on [interval trigger](#hourlyminute-interval) commands.
+When clicked, it executes the command immediately as long as the command isn't disabled and a channel is selected.
Running an interval command using this button reschedules all subsequent runs based off the current time.
@@ -62,12 +69,13 @@ Running an interval command using this button reschedules all subsequent runs ba
Command groups allow you to organize your custom commands and apply role and channel restrictions to multiple commands.
-The group tabs at the top of the page (**7**) allow you to switch to any of your created groups. The **+** button allows
-you to create a new group.
+The group tabs at the top of the page (**7**) allow you to switch to any of your created groups.
+The **+** button allows you to create a new group.
### Editing a Group
-Selecting a group allows you to edit it. Changes must be saved (**11**) to take effect.
+Selecting a group allows you to edit it.
+Changes must be saved (**11**) to take effect.
- **Name** (**8**): Name your custom command group (100 characters max).
- **Delete group** (**9**): Permanently delete the group after confirmation.
@@ -78,13 +86,14 @@ 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, allowed roles or channels are required to run the command, whereas denied roles or channels
-cannot use the command at all. These role restrictions are unrelated to member permissions. Having `Administrator`
-permissions will not override these restrictions.
+Specifically, allowed roles or channels are required to run the command, whereas denied roles or channels 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: Priority of Ignored vs. Required Roles" icon="outline/info-circle" >}}
-YAGPDB was raised well and honors a "no" when told "no". In other words, a denylist takes precedence over an allowlist.
+YAGPDB was raised well and honors a "no" when told "no".
+In other words, a denylist takes precedence over an allowlist.
{{< /callout >}}
@@ -96,10 +105,21 @@ Editing a custom command (**3**) opens a separate page for configuration.
-**1** ID **2** Name **3** Trigger Type **4** Trigger Text **5** Case Sensitivity Toggle **6** Message Edits Trigger
-Toggle **7** Response **8** Add Response **9** Custom Command Group **10** Channel and Role Restrictions
-**11** Execution Statistics **12** Error Output Toggle **13** Enable Command Toggle **14** Save Command **15**
-Delete command button
+**1** ID
+**2** Name
+**3** Trigger Type
+**4** Trigger Text
+**5** Case Sensitivity Toggle
+**6** Message Edits Trigger Toggle
+**7** Response
+**8** Add Response
+**9** Custom Command Group
+**10** Channel and Role Restrictions
+**11** Execution Statistics
+**12** Error Output Toggle
+**13** Enable Command Toggle
+**14** Save Command
+**15** Delete command button
@@ -107,37 +127,39 @@ Delete command button
Custom commands are identified by either their ID or their name.
-When a custom command is created, it is assigned a numeric **ID** (**1**) starting at `1`. The number increases with
-each custom command created on your server. It is not based on the _current_ number of custom commands, but the total
-commands that have ever been created on the server. IDs cannot be changed by the user.
+When a custom command is created, it is assigned a numeric **ID** (**1**) starting at `1`.
+The number increases with each custom command created on your server.
+It is not based on the _current_ number of custom commands, but the total commands that have ever been created on the server.
+IDs cannot be changed by the user.
-The ID uniquely identifies a custom command, and is therefore used in a variety of contexts where one needs to supply a
-specific custom command. For instance, the `execCC` custom command function targets a specific CC ID, and some built-in
-commands like `customcommands` accept a CC ID as an argument.
+The ID uniquely identifies a custom command, and is therefore used in a variety of contexts where one needs to supply a specific custom command.
+For instance, the `execCC` custom command function targets a specific CC ID, and some built-in 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: 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.
+Deleting a custom command does not allow its ID to be reassigned.
+If you delete a CC, its ID is lost forever.
{{< /callout >}}
-A Custom Command's **name** (**2**), conversely, is defined by the user. It is an optional argument that can be used to
-identify the command in the control panel and with the `CustomCommands` command. Max 100 characters.
+A Custom Command's **name** (**2**), conversely, is defined by the user.
+It is an optional argument that can be used to identify the command in the control panel and with the `CustomCommands` command.
+Max 100 characters.
### Triggers
-A trigger (**3**) defines conditions under which the command will be executed. Depending on the type of trigger, you may
-also need to specify additional configuration. For example, most trigger types require a **Trigger** (**4**) field
-defining the text the command should match against new messages. Max 1000 characters.
+A trigger (**3**) defines conditions under which the command will be executed.
+Depending on the type of trigger, you may also need to specify additional configuration.
+For example, most trigger types require a **Trigger** (**4**) field defining the text the command should match against new messages.
+Max 1000 characters.
#### Trigger types
##### Command
-Messages **starting with the prefix** for your server (- by default) _OR_ by mentioning the bot followed by the trigger
-text (**4**) will trigger the command.
+Messages **starting with the prefix** for your server (- by default) _OR_ by mentioning the bot followed by the trigger text (**4**) will trigger the command.
###### Example
@@ -181,8 +203,8 @@ Can specify **Added Only**, **Removed Only**, or **Both** to restrict which type
{{< 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.
+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.
Example:
@@ -199,11 +221,10 @@ Example:
##### Hourly/Minute Interval
-These triggers will run the command at a regular interval of time -- for instance, every 2 hours -- in the selected
-channel.
+These triggers will run the command at a regular interval of time -- for instance, every 2 hours -- in the selected channel.
-When using a time-based trigger, the custom command does not receive any user or member context. Thus, `{{ .User.ID }}`
-and similar templates will result in no value and member-dependent functions such as `addRoleID` will fail.
+When using a time-based trigger, the custom command does not receive any user or member context.
+Thus, `{{ .User.ID }}` and similar templates will result in no value and member-dependent functions such as `addRoleID` will fail.

@@ -217,21 +238,21 @@ Interval (**1**) sets how often the command will run in **hours** or **minutes**
{{< callout context="caution" title="Warning: Interval duration limits" icon="outline/info-circle" >}}
-The minimum interval is 5 minutes, and the max is 1 month. Up to 5 interval triggers may have an interval of 10 minutes
-or shorter.
+The minimum interval is 5 minutes, and the max is 1 month.
+Up to 5 interval triggers may have an interval of 10 minutes or shorter.
{{< /callout >}}
-Channel (**2**) specifies a channel to run the command in. The response, if any, will be sent to this channel.
+Channel (**2**) specifies a channel to run the command in.
+The response, if any, will be sent to this channel.
You must specify a channel to run time-based commands in even if the command doesn't output a message.
-Excluding hours and/or weekdays (**3**) prevents the command from triggering during those hours or weekdays. **This uses
-UTC time**, not your local timezone.
+Excluding hours and/or weekdays (**3**) prevents the command from triggering during those hours or weekdays. **This uses UTC time**, not your local timezone.
-When editing an interval command, a **Run Now** button appears at the bottom of the page. It executes the command as
-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.
+When editing an interval command, a **Run Now** button appears at the bottom of the page.
+It executes the command as 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.
##### Component
@@ -252,12 +273,11 @@ The trigger is matched using [RegEx](/docs/reference/regex).
##### Crontab
This trigger will run the command periodically using [Cron Syntax](https://en.wikipedia.org/wiki/Cron) to schedule runs.
-In contrast to interval triggers, which run a command with a fixed delay but unknown time, cron triggers can be made to
-execute periodically at fixed times, dates, and/or intervals. For instance, you could schedule execution for 23:45 every
-Saturday.
+In contrast to interval triggers, which run a command with a fixed delay but unknown time, cron triggers can be made to execute periodically at fixed times, dates, and/or intervals.
+For instance, you could schedule execution for 23:45 every Saturday.
-When using a time-based trigger, the custom command does not receive any user or member context. Thus, `{{ .User.ID }}`
-and similar templates will result in no value and member-dependent functions such as `addRoleID` will fail.
+When using a time-based trigger, the custom command does not receive any user or member context.
+Thus, `{{ .User.ID }}` and similar templates will result in no value and member-dependent functions such as `addRoleID` will fail.

@@ -267,15 +287,17 @@ and similar templates will result in no value and member-dependent functions suc
-Cron Expression (**1**) defines the expression used to schedule the cron job. It uses the standard expression format
-(see below). It does not support predefined schedules such as `@hourly`. The cron scheduler uses UTC always.
+Cron Expression (**1**) defines the expression used to schedule the cron job.
+It uses the standard expression format (see below).
+It does not support predefined schedules such as `@hourly`.
+The cron scheduler uses UTC always.
Read more on [Cron Expressions](#cron-expressions) below.
-Channel (**2**) specifies a channel to run the command in. The response, if any, will be sent to this channel.
+Channel (**2**) specifies a channel to run the command in.
+The response, if any, will be sent to this channel.
-Excluding hours and/or weekdays (**3**) prevents the command from triggering during those hours or weekdays. **This uses
-UTC time**, not your local timezone.
+Excluding hours and/or weekdays (**3**) prevents the command from triggering during those hours or weekdays. **This uses UTC time**, not your local timezone.
You must specify a channel to run time-based commands in even if the command doesn't output a message.
@@ -291,14 +313,12 @@ A cron expression represents a set of times, using 5 space-separated fields.
| Month | Yes | 1-12 or JAN-DEC | * / , - |
| Day of week (DOW)| Yes | 0-6 or SUN-SAT | * / , - ? |
-To read more about the supported format of cron expressions, visit [Robfig's Cron package documentation - Expression
-Format](https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format).
+To read more about the supported format of cron expressions, visit [Robfig's Cron package documentation - Expression Format](https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format).
{{< callout context="tip" title="Tip: Debugging Cron Expressions" icon="outline/rocket" >}}
-To help build and debug cron expressions, we recommend using [Cronitor's Crontab Guru](https://crontab.guru/) or a
-similar site. Note that predefined schedules such as `@hourly`, and the use of `7` in the DOW field may parse correctly
-on Corntab Guru, but are not supported with YAGPDB.
+To help build and debug cron expressions, we recommend using [Cronitor's Crontab Guru](https://crontab.guru/) or a similar site.
+Note that predefined schedules such as `@hourly`, and the use of `7` in the DOW field may parse correctly on Corntab Guru, but are not supported with YAGPDB.
{{< /callout >}}
@@ -306,24 +326,25 @@ on Corntab Guru, but are not supported with YAGPDB.
- Asterisk ( * )
-The asterisk indicates that the cron expression will match for all values of the field; e.g., using an asterisk in the
-5th field (month) would indicate every month.
+The asterisk indicates that the cron expression will match for all values of the field; e.g., using an asterisk in the 5th field (month) would indicate every month.
- Slash ( / )
-Slashes are used to describe increments of ranges. For example 3-59/15 in the 1st field (minutes) would indicate the 3rd
-minute of the hour and every 15 minutes thereafter. The form "*\/..." is equivalent to the form "first-last/...", that
-is, an increment over the largest possible range of the field. The form "N/..." is accepted as meaning "N-MAX/...", that
-is, starting at N, use the increment until the end of that specific range. It does not wrap around.
+Slashes are used to describe increments of ranges.
+For example 3-59/15 in the 1st field (minutes) would indicate the 3rd minute of the hour and every 15 minutes thereafter.
+The form "*\/..." is equivalent to the form "first-last/...", that is, an increment over the largest possible range of the field.
+The form "N/..." is accepted as meaning "N-MAX/...", that is, starting at N, use the increment until the end of that specific range.
+It does not wrap around.
- Comma ( , )
-Commas are used to separate items of a list. For example, using "MON,WED,FRI" in the 5th field (day of week) would mean
-Mondays, Wednesdays and Fridays.
+Commas are used to separate items of a list.
+For example, using "MON,WED,FRI" in the 5th field (day of week) would mean Mondays, Wednesdays and Fridays.
- Hyphen ( - )
-Hyphens are used to define ranges. For example, 9-17 would indicate every hour between 9am and 5pm inclusive.
+Hyphens are used to define ranges.
+For example, 9-17 would indicate every hour between 9am and 5pm inclusive.
- Question mark ( ? )
@@ -359,35 +380,35 @@ Your cron expression must schedule jobs with greater than a 10 minute interval b
#### Case Sensitivity
-Any commands which allow you to specify trigger text (command, regex, exact match, and so on) have a **Case
-sensitivity** toggle (**5**) which is off by default. A case-sensitive trigger `yagPDB` will trigger on "yagPDB" but not
-"yagpdb" or "YAGPDB".
+Any commands which allow you to specify trigger text (command, regex, exact match, and so on) have a **Case sensitivity** toggle (**5**) which is off by default.
+A case-sensitive trigger `yagPDB` will trigger on "yagPDB" but not "yagpdb" or "YAGPDB".
#### Edit Message Trigger
This feature is [premium only](/docs/welcome/premium).
-Commands which trigger on messages have a **Trigger on message edits** toggle (**6**) which is off by default. If a
-message is edited and matches the trigger text, it will trigger the command.
+Commands which trigger on messages have a **Trigger on message edits** toggle (**6**) which is off by default.
+If a message is edited and matches the trigger text, it will trigger the command.
-The edited message toggle is an _additional_ trigger to the normal message trigger. If you'd like to _only_ trigger on
-message edits, you will need to use a conditional branch on `{{ .IsMessageEdit }}` in the custom command response.
+The edited message toggle is an _additional_ trigger to the normal message trigger.
+If you'd like to _only_ trigger on message edits, you will need to use a conditional branch on `{{ .IsMessageEdit }}` in the custom command response.
### Response
The response (**7**) defines the message the bot will send once the command is triggered.
-Optionally define multiple responses which the bot will randomly select from when the command is run. Add a response
-with the plus button on the right of the response (**8**).
+Optionally define multiple responses which the bot will randomly select from when the command is run.
+Add a response with the plus button on the right of the response (**8**).
-The response supports the custom template script, allowing for more complex functionality such as assigning roles,
-getting data from users, sending messages to other channels, and more. Visit the Templates reference page to learn more.
+The response supports the custom template script, allowing for more complex functionality such as assigning roles, getting data from users, sending messages to other channels, and more.
+Visit the Templates reference page to learn more.
{{< link-card href="/docs/reference/templates/syntax-and-data" description="Templates" target="_blank" >}}
### Custom Command Group
-Dropdown selection (**9**) to change which command group the command is in. Select `None` to ungroup the command.
+Dropdown selection (**9**) to change which command group the command is in.
+Select `None` to ungroup the command.
### Channel and Role Restrictions
@@ -400,26 +421,27 @@ Command-specific allowlists will _not_ override the group restrictions.
### Execution Statistics
-The execution statistics (**11**) show details about the custom command's executions. It is updated after each command
-run.
+The execution statistics (**11**) show details about the custom command's executions.
+It is updated after each command run.
#### Last Error
-The most recent error which occurred running the command, UTC timestamped. The error display is not cleared when the
-command runs successfully.
+The most recent error which occurred running the command, UTC timestamped.
+The error display is not cleared when the command runs successfully.
#### Run Count
-A count of how many times the command executed the response. This counter increases even if the command errors, or does
-not send a response. It also increases if the command is run via `execCC`.
+A count of how many times the command executed the response.
+This counter increases even if the command errors, or does 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="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
-role/channel restrictions in the command and/or command group.
+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 role/channel restrictions in the command and/or command group.
{{< /callout >}}
@@ -429,17 +451,18 @@ A UTC timestamp of the last time the command executed the response.
#### Next Scheduled Run
-Only shown on Interval type commands. A UTC timestamp of the next time the command is scheduled to run.
+Only shown on Interval type commands.
+A UTC timestamp of the next time the command is scheduled to run.
### Output errors as command response
-This toggle (**12**) determines whether errors during command execution are sent in the command response after the
-command fails. Does not affect logging of Last Error to the statistics.
+This toggle (**12**) determines whether errors during command execution are sent in the command response after the command fails.
+Does not affect logging of Last Error to the statistics.
### Command Enabled
-This toggle (**13**) enables the command. A disabled command will never run (not even with `execCC`) or count against
-the trigger limit.
+This toggle (**13**) enables the command.
+A disabled command will never run (not even with `execCC`) or count against the trigger limit.
### Saving Your Command
@@ -447,7 +470,8 @@ Saving (**14**) the command updates it with the new values if there are no error
Alt + Shift + S also saves the custom command.
-A custom command **will not save** if there is an error in your input. Examples of errors which prevent you from saving:
+A custom command **will not save** if there is an error in your input.
+Examples of errors which prevent you from saving:
- There is a syntax error in the response
- You have reached the maximum CC limit
@@ -457,9 +481,9 @@ If you save a command with an interval trigger which has never been run, it will
{{< 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.
+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 >}}
@@ -471,4 +495,5 @@ Custom commands do not autosave.
### Delete Current Command
-Deleting the custom command (**15**) will **permanently** delete the command after confirmation. This cannot be undone.
+Deleting the custom command (**15**) will **permanently** delete the command after confirmation.
+This cannot be undone.
diff --git a/content/docs/custom-commands/database.md b/content/docs/custom-commands/database.md
index 56685517..09302972 100644
--- a/content/docs/custom-commands/database.md
+++ b/content/docs/custom-commands/database.md
@@ -4,15 +4,25 @@ weight = 320
description = "See what's in your custom command database."
+++
-The Custom Command Database is used for persistent storage between custom command executions. The database page displays
-all database entries created by custom commands, allowing you to view details on or delete individual entries.
+The Custom Command Database is used for persistent storage between custom command executions.
+The database page displays all database entries created by custom commands, allowing you to view details on or delete individual entries.

-**1** Entry ID **2** Created Timestamp **3** Updated Timestamp **4** Expiry Timestamp **5** User ID **6** Key **7**
-Value **8** Size of Value **9** Delete Entry **10** Page Navigation **11** Search Query **12** Search Bar
+**1** Entry ID
+**2** Created Timestamp
+**3** Updated Timestamp
+**4** Expiry Timestamp
+**5** User ID
+**6** Key
+**7** Value
+**8** Size of Value
+**9** Delete Entry
+**10** Page Navigation
+**11** Search Query
+**12** Search Bar
@@ -20,8 +30,9 @@ Value **8** Size of Value **9** Delete Entry **10** Page Navigation **11** Searc
### Entry ID
-The ID is assigned by the system and unique within YAGPDB's database. The database page is sorted by descending ID. You
-may search for a specific ID using the **Search Bar** (**11**) with ID **Query** (**10**).
+The ID is assigned by the system and unique within YAGPDB's database.
+The database page is sorted by descending ID.
+You may search for a specific ID using the **Search Bar** (**11**) with ID **Query** (**10**).
### Created Timestamp
@@ -29,22 +40,24 @@ UTC timestamp of when the entry was created.
### Updated Timestamp
-UTC timestamp of when the entry was updated. Increasing or setting a database value updates this timestamp.
+UTC timestamp of when the entry was updated.
+Increasing or setting a database value updates this timestamp.
### Expiry Timestamp
-UTC timestamp of when the entry will expire. An expired entry will not be retrieved by database functions, but **will**
-appear on the database page.
+UTC timestamp of when the entry will expire.
+An expired entry will not be retrieved by database functions, but **will** appear on the database page.
### User ID
-The user-defined ID of the entry (does not have to be a user's ID, accepts any int64). You may search for a specific ID
-using the **Search Bar** (**11**) with User ID **Query** (**10**).
+The user-defined ID of the entry (does not have to be a user's ID, accepts any int64).
+You may search for a specific ID using the **Search Bar** (**11**) with User ID **Query** (**10**).
### Key
-The user-defined key of the entry. A key is a string, max 256 characters. You may search for a specific key using the
-**Search Bar** (**11**) with Key **Query** (**10**).
+The user-defined key of the entry.
+A key is a string, max 256 characters.
+You may search for a specific key using the **Search Bar** (**11**) with Key **Query** (**10**).
### Value
@@ -52,24 +65,28 @@ The serialized value of the database entry.
### Size of Value
-Size of the value in bytes. YAGPDB database entries have a max value size of 100 kB.
+Size of the value in bytes.
+YAGPDB database entries have a max value size of 100 kB.
### Delete Entry
-Deletes the individual entry after confirmation. You may only delete one entry at a time.
+Deletes the individual entry after confirmation.
+You may only delete one entry at a time.
## Page Navigation
-Navigates to the next or previous page of entries. Each page lists 100 entries at a time.
+Navigates to the next or previous page of entries.
+Each page lists 100 entries at a time.
## Search Query
-Dropdown selection of the type of value to search by. Available options are ID, User ID, and Key.
+Dropdown selection of the type of value to search by.
+Available options are ID, User ID, and Key.
## Search Bar
-Number or Text to match against database entries. Results will only include entries that exactly match the search
-pattern.
+Number or Text to match against database entries.
+Results will only include entries that exactly match the search pattern.
When searching for a Key, the search query supports PostgreSQL patterns.
diff --git a/content/docs/fun/reputation.md b/content/docs/fun/reputation.md
index d4baaaf6..9a062a20 100644
--- a/content/docs/fun/reputation.md
+++ b/content/docs/fun/reputation.md
@@ -4,15 +4,14 @@ weight = 910
description = "Track and manage reputation points for users."
+++
-The reputation system tracks each user's reputation score, and allows users to add or remove reputation points from
-other users.
+The reputation system tracks each user's reputation score, and allows users to add or remove reputation points from other users.
## Setup

-Reputation is not enabled by default. To enable it, please go to the [control panel](https://yagpdb.xyz/manage) and
-check _Reputation enabled._
+Reputation is not enabled by default.
+To enable it, please go to the [control panel](https://yagpdb.xyz/manage) and check _Reputation enabled._
### Enable giving rep when someone says "thanks @user"?
@@ -20,17 +19,18 @@ This is an alternative way of `-giverep`.
### Name for reputation points
-This will be displayed in the `-rep` command. By default, it is _Rep_.
+This will be displayed in the `-rep` command.
+By default, it is _Rep_.
### Rep cooldown in seconds
-This is the cooldown for the `-giverep` and `-takerep` commands. It does not affect the `-setrep` command. No one can
-bypass this cooldown, including admins.
+This is the cooldown for the `-giverep` and `-takerep` commands.
+It does not affect the `-setrep` command.
+No one can bypass this cooldown, including admins.
### Maximum amount of rep that can be given/taken away in one command
-This affects the `-giverep` and `-takrep` commands which users can choose to specify the number of points to be
-given/taken away.
+This affects the `-giverep` and `-takrep` commands which users can choose to specify the number of points to be given/taken away.
### Admin role
@@ -38,29 +38,30 @@ Users with this role have access to the `-setrep` command and can freely change
### Required role to give/remove points
-Users with this role have access to the `-giverep` and `-takerep` commands which is affected by the _Rep cool down in
-seconds_ and the _Maximum amount of rep that can be given/taken away in one command_. If set to none, everyone will be
-able to use these commands.
+Users with this role have access to the `-giverep` and `-takerep` commands which is affected by the _Rep cool down in seconds_ and the _Maximum amount of rep that can be given/taken away in one command_.
+If set to none, everyone will be able to use these commands.
### Required role to receive/being taken away points from
-Users with this role participates in the point system which they can be given/taken away points from. If set to none,
-everyone will be participating.
+Users with this role participates in the point system which they can be given/taken away points from.
+If set to none, everyone will be participating.
### Disallowed role for giving/taking away points
-Users with this role cannot use the `-giverep` and `-takerep` commands. This also overrides the _Required role to
-give/remove points._
+Users with this role cannot use the `-giverep` and `-takerep` commands.
+This also overrides the _Required role to give/remove points._
### Disallowed role for receiving/being taken away points from
-Users with this role cannot participate in the point system which they can be given/taken away points from. This also
-overrides the _Required role to receive/being taken away points from_.
+Users with this role cannot participate in the point system which they can be given/taken away points from.
+This also overrides the _Required role to receive/being taken away points from_.
## Reputation roles
-You can set up role rewards for reaching certain reputation amounts. Up to 5 rewards on free, 25 for premium. This system
-is basic and offers little customization. For more advanced setups, custom commands are recommended.
+You can set up role rewards for reaching certain reputation amounts.
+Up to 5 rewards on free, 25 for premium.
+This system is basic and offers little customization.
+For more advanced setups, custom commands are recommended.

@@ -74,8 +75,8 @@ A listing of all your existing reputation roles with their respective threshold.
## Reputation logs
-Besides using the command `-replog` , you can also check the logs from the control panel. Specify a user ID to check the
-logs affecting the points of the user.
+Besides using the command `-replog` , you can also check the logs from the control panel.
+Specify a user ID to check the logs affecting the points of the user.
## Reset all user's reputation
diff --git a/content/docs/fun/soundboard.md b/content/docs/fun/soundboard.md
index 5ceed249..ae836c43 100644
--- a/content/docs/fun/soundboard.md
+++ b/content/docs/fun/soundboard.md
@@ -8,13 +8,14 @@ The soundboard system allows the bot to join a voice channel, and play sounds tr
## Uploading New Sounds
-The settings listed below only apply to that specific sound, and not the entire soundboard. Use a [command
-override](/docs/core/command-settings) to restrict access to the soundboard system as a whole.
+The settings listed below only apply to that specific sound, and not the entire soundboard.
+Use a [command override](/docs/core/command-settings) to restrict access to the soundboard system as a whole.
### Name
-Give the sound a name. This name will be shown in the list to play later on. Avoid giving duplicated names for easier
-reference.
+Give the sound a name.
+This name will be shown in the list to play later on.
+Avoid giving duplicated names for easier reference.
### Allowed roles
@@ -39,30 +40,32 @@ You have two options to upload sounds:
#### Upload with local files
-Click on _Choose file_ and select an audio file to upload. All types of sound files, including videos with soundtracks,
-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.
-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 .
+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 .
### 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_.
+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_.

## Playing sounds
-You can check for an available list of sounds with the `-soundboard` command. Then, play it with the `-sb `
-command. Make sure that YAGPDB has the right permissions (i.e. connect to and speak in the voice channel).
+You can check for an available list of sounds with the `-soundboard` command.
+Then, play it with the `-sb ` command.
+Make sure that YAGPDB has the right permissions (i.e. connect to and speak in the voice channel).
## Deleting sounds
-You can delete sounds from the control panel. Look for the desired sound name under _Existing sounds_ and press _Delete_
-to remove it from the list.
+You can delete sounds from the control panel.
+Look for the desired sound name under _Existing sounds_ and press _Delete_ to remove it from the list.
diff --git a/content/docs/moderation/advanced-automoderator/conditions.md b/content/docs/moderation/advanced-automoderator/conditions.md
index 68451bd7..d8e88167 100644
--- a/content/docs/moderation/advanced-automoderator/conditions.md
+++ b/content/docs/moderation/advanced-automoderator/conditions.md
@@ -3,40 +3,38 @@ title = 'Conditions'
weight = 433
+++
-Conditions impose more fine-grained control on Advanced Automoderator rules. This page will cover the different types
-of conditions and how to use them.
+Conditions impose more fine-grained control on Advanced Automoderator rules.
+This page will cover the different types of conditions and how to use them.
## Quick Intro
-This page lists all the available conditions in the order as they appear on the control panel. Use the Table of Contents
-in the top left corner of this page alongside your browser's search function to quickly navigate to the condition you're
-looking for.
+This page lists all the available conditions in the order as they appear on the control panel.
+Use the Table of Contents in the top left corner of this page alongside your browser's search function to quickly navigate to the condition you're looking for.
By extension, these conditions are also available as ruleset scoped conditions.
### Condition Logic
-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.
+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: 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.
+Ensure that the conditions you set are not in conflict or mutually exclusive, as this will cause your rule to never trigger.
-A common example of this is setting both _[Edited message](#edited-message)_ and _[New message](#new-message)_
-conditions in the same rule. Since a message can't be both new and edited at the same time, the rule will never trigger.
+A common example of this is setting both _ [Edited message](#edited-message)_ and _ [New message](#new-message)_ conditions in the same rule.
+Since a message can't be both new and edited at the same time, the rule will never trigger.
{{< /callout >}}
#### Ignored Roles
-Have the rule ignore users with selected roles. This is useful for excluding moderators or bots from the rule.
+Have the rule ignore users with selected roles.
+This is useful for excluding moderators or bots from the rule.
-- **Roles**
- The roles to ignore. Select as many as you like. (Default: None)
+- **Roles** The roles to ignore.
+ Select as many as you like. (Default: None)
#### Require Roles
@@ -49,8 +47,8 @@ Like [Ignored Roles](#ignored-roles), with following optional setting:
Have the rule ignore messages from selected channels, for example, to exclude a bot channel.
-- **Channels**
- The channels to ignore. Select as many as you like. (Default: None)
+- **Channels** The channels to ignore.
+ Select as many as you like. (Default: None)
#### Active in channels
@@ -81,38 +79,41 @@ This condition directly conflicts with the _[New Member](./triggers#new-member)_
#### Server Member duration below
-Like [Server Member duration above](#server-member-duration-above), but only apply this rule if the user has been a
-member of the server for less than the specified duration in minutes.
+Like [Server Member duration above](#server-member-duration-above), but only apply this rule if the user has been a member of the server for less than the specified duration in minutes.
#### Ignore Bots
-Have the rule ignore messages from bots. This conflicts with the _[Only Bots](#only-bots)_ condition.
+Have the rule ignore messages from bots.
+This conflicts with the _ [Only Bots](#only-bots)_ condition.
#### Only Bots
-Only apply this rule to messages from bots. This conflicts with the _[Ignore Bots](#ignore-bots)_ condition.
+Only apply this rule to messages from bots.
+This conflicts with the _ [Ignore Bots](#ignore-bots)_ condition.
#### Ignore Categories
Have the rule ignore messages from channels in selected categories.
-- **Categories**
- The categories to ignore. Select as many as you like. (Default: None)
+- **Categories** The categories to ignore.
+ Select as many as you like. (Default: None)
#### Active in Categories
Only apply this rule if it was triggered in one of the selected categories.
-- **Categories**
- The categories to apply this rule to. Select as many as you like. (Default: None)
+- **Categories** The categories to apply this rule to.
+ Select as many as you like. (Default: None)
#### New message
-Only apply this rule to a newly sent message. This condition is mutually exclusive with _[Edited message](#edited-message)_.
+Only apply this rule to a newly sent message.
+This condition is mutually exclusive with _ [Edited message](#edited-message)_.
#### Edited message
-Only apply this rule to an edited message. This condition is mutually exclusive with _[New message](#new-message)_.
+Only apply this rule to an edited message.
+This condition is mutually exclusive with _ [New message](#new-message)_.
#### Active in threads
diff --git a/content/docs/moderation/advanced-automoderator/effects.md b/content/docs/moderation/advanced-automoderator/effects.md
index a6409356..abf7f69a 100644
--- a/content/docs/moderation/advanced-automoderator/effects.md
+++ b/content/docs/moderation/advanced-automoderator/effects.md
@@ -3,21 +3,19 @@ title = 'Effects'
weight = 434
+++
-Effects define what happens when a rule is triggered and all conditions are met. This page will cover the different
-kinds of effects available to you in Advanced Automoderator.
+Effects define what happens when a rule is triggered and all conditions are met.
+This page will cover the different kinds of effects available to you in Advanced Automoderator.
## Quick Intro
-This page lists all the available effects in the order as they appear on the control panel. Use the Table of Contents
-in the top left corner of this page alongside your browser's search function to quickly navigate to the effect you're
-looking for.
+This page lists all the available effects in the order as they appear on the control panel.
+Use the Table of Contents in the top left corner of this page alongside your browser's search function to quickly navigate to the effect you're looking for.
### Effect Logic
-All effects will be executed once all prior checks are met — that is, the effects are combined according to the logical
-AND operator.
+All effects will be executed once all prior checks are met — that is, the effects are combined according to the logical AND operator.
#### Delete Message
@@ -25,7 +23,8 @@ Delete the message that triggered the rule.
#### +Violation
-Add a violation to the user's record. This is useful for tracking user behavior over time.
+Add a violation to the user's record.
+This is useful for tracking user behavior over time.
- **Name**
The name of the violation. (Default: None)
@@ -68,8 +67,8 @@ Warn the user that triggered the rule.
Set the nickname of the user that triggered the rule.
-- **New Nickname**
- The new nickname for the user. Empty for removal. (Default: None)
+- **New Nickname** The new nickname for the user.
+ Empty for removal. (Default: None)
#### Reset violations
@@ -118,10 +117,10 @@ Remove a role from the user that triggered the rule.
Send a custom message.
-- **Custom message**
- The message to send. Max 280 characters. (Default: (empty))
-- **Delete after**
- The duration in seconds after which to delete the message. 0 for never. Max 3600 seconds. (Default: 0)
+- **Custom message** The message to send.
+ Max 280 characters. (Default: (empty))
+- **Delete after** The duration in seconds after which to delete the message. 0 for never.
+ Max 3600 seconds. (Default: 0)
- **Ping user**
Whether to ping the user that triggered the rule. (Default: false)
- **Channel to send to**
@@ -129,8 +128,8 @@ Send a custom message.
#### Timeout user
-Timeout the user that triggered the rule. This is different from [Mute user](#mute-user) as it uses Discord's timeout
-functionality instead of applying a muted role.
+Timeout the user that triggered the rule.
+This is different from [Mute user](#mute-user) as it uses Discord's timeout functionality instead of applying a muted role.
- **Duration**
The duration of the timeout in minutes. (Default: 0)
@@ -139,10 +138,9 @@ functionality instead of applying a muted role.
#### Send Alert
-Sends an embed to the specified channel with some information about the triggered rule, similar to Discord's inbuilt
-automoderator alerts.
+Sends an embed to the specified channel with some information about the triggered rule, similar to Discord's inbuilt automoderator alerts.
-- **Custom message**
- The message to send. Max 280 characters. (Default: (empty))
+- **Custom message** The message to send.
+ Max 280 characters. (Default: (empty))
- **Channel to send alert embed in**
The channel to send the alert to. (Default: same channel as the rule was triggered in)
diff --git a/content/docs/moderation/advanced-automoderator/overview.md b/content/docs/moderation/advanced-automoderator/overview.md
index f1560e48..e4801148 100644
--- a/content/docs/moderation/advanced-automoderator/overview.md
+++ b/content/docs/moderation/advanced-automoderator/overview.md
@@ -10,11 +10,10 @@ A sophisticated automoderator system, allowing for more complex configurations t
## Intro
Advanced Automoderator is (quite obviously) a more detailed system than [Basic Automoderator](/docs/moderation/basic-automoderator).
-It allows for more flexibility and complex configurations, but the trade-off is that some time investment is required
-to set it up.
+It allows for more flexibility and complex configurations, but the trade-off is that some time investment is required to set it up.
-Advanced automoderator operates on the basis of user-configurable rules, which trigger on specific actions and
-conditions to produce certain effects. Collections of rules are referred to as rulesets.
+Advanced automoderator operates on the basis of user-configurable rules, which trigger on specific actions and conditions to produce certain effects.
+Collections of rules are referred to as rulesets.
Finally, there are lists you can create, which can be used to denylist or allowlist words or domains.
@@ -24,17 +23,18 @@ First, let us explore the available tabs on the main page.
### Global Settings
-This tab is your first stop when starting with Advanced Automoderator, as it is where you create new rulesets. Give it a
-telling name and click the **Create** button. This will create a new tab with that name.
+This tab is your first stop when starting with Advanced Automoderator, as it is where you create new rulesets.
+Give it a telling name and click the **Create** button.
+This will create a new tab with that name.
-Furthermore, this is also the place to create and manage your lists. Lists are used to store words or domains that you
-want to use as black- or allowlist triggers in your rules. More on that under [Lists](#lists).
+Furthermore, this is also the place to create and manage your lists.
+Lists are used to store words or domains that you want to use as black- or allowlist triggers in your rules.
+More on that under [Lists](#lists).
### Logs
-This tab can be useful when troubleshooting or testing your configuration, as it shows who fired what rule in what
-ruleset, at what time, with which trigger. However, it is not a full log of messages, nor does it log moderation
-actions.
+This tab can be useful when troubleshooting or testing your configuration, as it shows who fired what rule in what ruleset, at what time, with which trigger.
+However, it is not a full log of messages, nor does it log moderation actions.
## Configuration
@@ -42,15 +42,14 @@ With that out of the way, we'll go through how to _actually_ make Advanced Autom
### Lists
-As mentioned above, lists are used to store words or domains that you want to use as black- or allowlist triggers in your
-rules.
+As mentioned above, lists are used to store words or domains that you want to use as black- or allowlist triggers in your rules.
-Multiple entries in word lists are separated by either a newline or a space. Entries in word lists must be single words
-containing no spaces; to denylist complete phrases, use a regex trigger instead.
+Multiple entries in word lists are separated by either a newline or a space.
+Entries in word lists must be single words containing no spaces; to denylist complete phrases, use a regex trigger instead.
-For website / link lists, specify _just_ the site's domain, without any protocol or path. Subdomains will be
-automatically included. Logically, if you want to _only_ check against some specific subdomain (and its sub-subdomains),
-you will have to specify just that subdomain.
+For website / link lists, specify _just_ the site's domain, without any protocol or path.
+Subdomains will be automatically included.
+Logically, if you want to _only_ check against some specific subdomain (and its sub-subdomains), you will have to specify just that subdomain.
#### Limitations
@@ -58,8 +57,8 @@ You cannot have more than 5 (premium: 25) lists, and each list may not have more
### Rulesets
-Rulesets are the overarching structure of your automoderator configuration. They are the containers for your rules, and
-can be toggled on or off on the control panel, or with the `automod toggle ` command.
+Rulesets are the overarching structure of your automoderator configuration.
+They are the containers for your rules, and can be toggled on or off on the control panel, or with the `automod toggle ` command.
Several configuration options are available for each ruleset:
@@ -70,25 +69,25 @@ Several configuration options are available for each ruleset:
#### Limitations
-You cannot have more than 10 (premium: 25) rulesets. If you run into that limit, consider merging some rulesets
-together, or removing some that are no longer needed.
+You cannot have more than 10 (premium: 25) rulesets.
+If you run into that limit, consider merging some rulesets together, or removing some that are no longer needed.
### Rules
-Rules are the actual meat of your automoderator configuration. They consist of triggers, conditions, and effects. We
-will call those three things collectively [_rule parts_](#rule-parts).
+Rules are the actual meat of your automoderator configuration.
+They consist of triggers, conditions, and effects.
+We will call those three things collectively [_rule parts_](#rule-parts).
-A rule can have multiple triggers, conditions, and effects. All of them are optional, but a rule without at least one
-trigger and effect is pointless.
+A rule can have multiple triggers, conditions, and effects.
+All of them are optional, but a rule without at least one trigger and effect is pointless.
When checking whether a rule applies, triggers follow the OR logic, while conditions and effects follow the AND logic.
-That means for a rule to apply, _only one_ trigger has to be true, whilst _all_ conditions need be met, which
-then fires _all_ effects.
+That means for a rule to apply, _only one_ trigger has to be true, whilst _all_ conditions need be met, which then fires _all_ effects.
#### Limitations
-Across all rulesets, you cannot have more than 25 (premium: 150) rules. A rule may not consist of more than 25 rule
-parts.
+Across all rulesets, you cannot have more than 25 (premium: 150) rules.
+A rule may not consist of more than 25 rule parts.
### Rule Parts
diff --git a/content/docs/moderation/advanced-automoderator/triggers.md b/content/docs/moderation/advanced-automoderator/triggers.md
index debe8c13..2f2998f1 100644
--- a/content/docs/moderation/advanced-automoderator/triggers.md
+++ b/content/docs/moderation/advanced-automoderator/triggers.md
@@ -3,21 +3,19 @@ title = 'Triggers'
weight = 432
+++
-Triggers define when a rule should be checked. This page will explain the available triggers and their configuration
-options.
+Triggers define when a rule should be checked.
+This page will explain the available triggers and their configuration options.
## Quick Intro
-This page lists all the available triggers in the order as they appear on the control panel. Use the Table of Contents
-in the top left corner of this page alongside your browser's search function to quickly navigate to the trigger you're
-looking for.
+This page lists all the available triggers in the order as they appear on the control panel.
+Use the Table of Contents in the top left corner of this page alongside your browser's search function to quickly navigate to the trigger you're looking for.
### Trigger Logic
-Only one trigger has to be met for a rule to trigger — that is, the triggers are combined according to the logical OR
-operator.
+Only one trigger has to be met for a rule to trigger — that is, the triggers are combined according to the logical OR operator.
### List of Triggers
@@ -25,8 +23,8 @@ Following is a list of all available triggers, in the order they appear on the c
#### All caps
-This trigger fires when a message exceeds a certain percentage of uppercase characters. Following parameters are
-available:
+This trigger fires when a message exceeds a certain percentage of uppercase characters.
+Following parameters are available:
- **Min number of all caps**
The minimum number of uppercase characters in the message for the trigger to fire. (Default: 3)
@@ -50,8 +48,7 @@ This trigger will fire when a message exceeds the configured threshold for *uniq
This trigger will fire when a message contains *any* valid link.[^1]
-For more fine-grained control, consider using the [Website denylist](#website-denylist) or
-[Website allowlist](#website-allowlist) trigger.
+For more fine-grained control, consider using the [Website denylist](#website-denylist) or [Website allowlist](#website-allowlist) trigger.
#### X Violations in y minutes
@@ -81,8 +78,8 @@ This trigger will fire when a message contains any word from the specified list.
#### Word allowlist
-Triggers when a message contains words **not** in the specified list. See [Word denylist](#word-denylist) for
-configuration.
+Triggers when a message contains words **not** in the specified list.
+See [Word denylist](#word-denylist) for configuration.
#### Website denylist
@@ -93,7 +90,8 @@ This trigger will fire when a message contains any link to a domain from the spe
#### Website allowlist
-Triggers when a message contains links **not** in the specified list. See [Website denylist](#website-denylist).
+Triggers when a message contains links **not** in the specified list.
+See [Website denylist](#website-denylist).
Depending on your use-case, it may be more time-efficient to use a allowlist instead of a denylist.
@@ -101,8 +99,7 @@ Depending on your use-case, it may be more time-efficient to use a allowlist ins
This trigger will fire when a message contains a server invite link, not counting invites to the current server.
-Also includes some third-party websites, namely `discord.me`, `invite.gg`, `discord.io`, `discord.li`, `disboard.org`,
-and `discordy.com`, these however will not ignore the current server.
+Also includes some third-party websites, namely `discord.me`, `invite.gg`, `discord.io`, `discord.li`, `disboard.org`, and `discordy.com`, these however will not ignore the current server.
#### Google flagged bad links
@@ -130,8 +127,7 @@ This trigger will fire when the channel has received x messages in y seconds.
#### user: x mentions within y seconds
-This trigger will fire when the offending user has mentioned x users in y seconds across several messages in one
-channel.[^2]
+This trigger will fire when the offending user has mentioned x users in y seconds across several messages in one channel. [^2]
- **Mentions**
The number of mentions in the specified time frame for the trigger to fire. (Default: 20)
@@ -144,8 +140,7 @@ channel.[^2]
#### channel: x mentions within y seconds
-See [user: x mentions within y seconds](#user-x-mentions-within-y-seconds), but now applied to the channel as a
-whole, instead of a single user.
+See [user: x mentions within y seconds](#user-x-mentions-within-y-seconds), but now applied to the channel as a whole, instead of a single user.
#### Message matches Regex
@@ -158,12 +153,14 @@ This trigger will fire when a message matches the specified regular expression.[
#### Message not matching Regex
-The inverse of [Message matches Regex](#message-matches-regex). See there for configuration.
+The inverse of [Message matches Regex](#message-matches-regex).
+See there for configuration.
#### X consecutive identical messages
-This trigger will fire when the offending user has sent x identical messages in a row. Messages sent by other users
-in-between are ignored.[^2]
+This trigger will fire when the offending user has sent x identical messages in a row.
+Messages sent by other users in-between are ignored.
+[^2]
- **Threshold**
The number of identical messages in a row for the trigger to fire. (Default: 4)
@@ -183,7 +180,8 @@ This trigger will fire when the nickname of the user matches the specified regul
#### Nickname not matching regex
-The inverse of [Nickname matches regex](#nickname-matches-regex). See there for configuration.
+The inverse of [Nickname matches regex](#nickname-matches-regex).
+See there for configuration.
#### Nickname word allowlist
@@ -217,8 +215,7 @@ This trigger will fire when the offending user has sent x attachments in y secon
#### X channel attachments in Y seconds
-See [X user attachments in Y seconds](#x-user-attachments-in-y-seconds), but now applied to the channel as a whole,
-instead of a single user.
+See [X user attachments in Y seconds](#x-user-attachments-in-y-seconds), but now applied to the channel as a whole, instead of a single user.
#### Join username word allowlist
@@ -231,8 +228,8 @@ This trigger will fire when the username of a user joining the server contains w
#### Join username word denylist
-This trigger will fire when the username of a user joining the server contains any word from the specified list. See
-[Join username word allowlist](#join-username-word-allowlist) for configuration.
+This trigger will fire when the username of a user joining the server contains any word from the specified list.
+See [Join username word allowlist](#join-username-word-allowlist) for configuration.
#### Join username matches regex
@@ -245,7 +242,8 @@ This trigger will fire when the username of a user joining the server matches th
#### Join username not matching regex
-The inverse of [Join username matches regex](#join-username-matches-regex). See there for configuration.
+The inverse of [Join username matches regex](#join-username-matches-regex).
+See there for configuration.
#### Join username invite
@@ -292,23 +290,22 @@ This trigger will fire when the offending user has sent x links in y seconds, in
#### X channel links in Y seconds
-See [X user links in Y seconds](#x-user-links-in-y-seconds), but now applied to the channel as a whole, instead of a
-single user.
+See [X user links in Y seconds](#x-user-links-in-y-seconds), but now applied to the channel as a whole, instead of a single user.
#### Message triggers Discord Automod
This trigger will fire when a message triggers Discord's Automod.
-- **Rule ID**
- The ID of the Automod rule to watch out for. Leave blank for all. (Default: (blank))
+- **Rule ID** The ID of the Automod rule to watch out for.
+ Leave blank for all. (Default: (blank))
-[^1]: The regular expression used to match links is the following:
-``(?i)([a-z\d]+:[//])([\w-._~:/?#\[\]@!$&'()*+,;%=]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])``
+[^1]: The regular expression used to match links is the following: : The regular expression used to match links is the following: ``(?i)([a-z\d]+: [//])([\w-._~:/?#\[\]@!$&'()*+,;%=]+(?:(?:\. [\w_-]+)+))([\w.,@?^=%&:/~+#-]* [\w@?^=%&/~+#-]) ``
-[^2]: Under the hood, the bot will only check the last 1000 messages in the channel. If you have a high-traffic channel
-in combination with an extremely long time frame, the bot could (theoretically) miss some messages.
+[^2]: Under the hood, the bot will only check the last 1000 messages in the channel.
+If you have a high-traffic channel in combination with an extremely long time frame, the bot could (theoretically) miss some messages.
-[^3]: The RegEx engine used in YAGPDB is RE2. Some features are not supported, like lookaheads and lookbehinds. See
- [regex101](https://regex101.com/?flavor=golang) for some help with writing RE2-compatible regular expressions.
+[^3]: The RegEx engine used in YAGPDB is RE2.
+Some features are not supported, like lookaheads and lookbehinds.
+See [regex101](https://regex101.com/?flavor=golang) for some help with writing RE2-compatible regular expressions.
diff --git a/content/docs/moderation/basic-automoderator.md b/content/docs/moderation/basic-automoderator.md
index 38657096..c0417f8b 100644
--- a/content/docs/moderation/basic-automoderator.md
+++ b/content/docs/moderation/basic-automoderator.md
@@ -6,82 +6,78 @@ description = "A very basic automoderator to get things done quickly."
## Intro
-Basic Automoderator lets you quickly set up _basic_ automoderation, without much fuss. For that reason, its
-overall customizability is quite limited. If you would like a more detailed configuration, please use the
-[Advanced Automoderator](/docs/moderation/advanced-automoderator/overview).
+Basic Automoderator lets you quickly set up _basic_ automoderation, without much fuss.
+For that reason, its overall customizability is quite limited.
+If you would like a more detailed configuration, please use the [Advanced Automoderator](/docs/moderation/advanced-automoderator/overview).
-You configure violation thresholds and their expiry for predefined rules. These thresholds define when an offending user
-will be muted, kicked, or banned; a warning and a subsequent deletion of the offending message are always issued.
+You configure violation thresholds and their expiry for predefined rules.
+These thresholds define when an offending user will be muted, kicked, or banned; a warning and a subsequent deletion of the offending message are always issued.
## Configuration
-You can turn on individual rules as needed, however for them to work at all you must enable Basic Automoderator as a
-whole in the **General** tab.
+You can turn on individual rules as needed, however for them to work at all you must enable Basic Automoderator as a whole in the **General** tab.
### Violations
-Each rule has its own violation counter and expiry, granting you some control over how many times a user can break a
-specific rule. The expiry time of a violation is between 0 ("never") and 44640 minutes (31 days).
+Each rule has its own violation counter and expiry, granting you some control over how many times a user can break a specific rule.
+The expiry time of a violation is between 0 ("never") and 44640 minutes (31 days).
-Within each rule, you can configure after how many violations a given punishment will be issued, be that a mute, kick,
-or ban. Setting a threshold to 0 will disable that punishment.
+Within each rule, you can configure after how many violations a given punishment will be issued, be that a mute, kick, or ban.
+Setting a threshold to 0 will disable that punishment.
### Ignored Role
-You can specify one role on a per-rule basis that will be ignored by that rule. This is useful for exempting moderators
-from certain rules, for example. If you do not specify an ignored role, the rule will apply to all users, including
-admins and the server owner.
+You can specify one role on a per-rule basis that will be ignored by that rule.
+This is useful for exempting moderators from certain rules, for example.
+If you do not specify an ignored role, the rule will apply to all users, including admins and the server owner.
### Ignored Channels
-Just like the ignored role, you can specify multiple channels that will be ignored by a rule. This may be useful for
-e.g. a testing channel where you want to allow certain behavior that would otherwise be disallowed.
+Just like the ignored role, you can specify multiple channels that will be ignored by a rule.
+This may be useful for e.g. a testing channel where you want to allow certain behavior that would otherwise be disallowed.
### Rules
-Basic Automoderator comes with the following set of rules that should cover most basic needs. To reiterate, a warning
-and a deletion of the offending message will always be issued, regardless of other configured thresholds.
+Basic Automoderator comes with the following set of rules that should cover most basic needs.
+To reiterate, a warning and a deletion of the offending message will always be issued, regardless of other configured thresholds.
#### Slowmode
-This rule will trigger when a user sends more than the configured amount of messages within the configured time frame in
-seconds. It does not consider general spam across channels.
+This rule will trigger when a user sends more than the configured amount of messages within the configured time frame in seconds.
+It does not consider general spam across channels.
-Something decent to just protect from raw spam could be five messages within two seconds. Normal users won't
-easily come near that, and it would target actual spammers.
+Something decent to just protect from raw spam could be five messages within two seconds.
+Normal users won't easily come near that, and it would target actual spammers.
#### Mass Mention
-This rule will trigger when a user mentions more than the configured amount of users in a single message. It does
-not trigger for multiple mentions to the same user, nor does it apply cross-channel checks.
+This rule will trigger when a user mentions more than the configured amount of users in a single message.
+It does not trigger for multiple mentions to the same user, nor does it apply cross-channel checks.
#### Server Invites
-This rule will trigger when a user sends a message containing a server invite link. It does not trigger for invites
-pointing to the same server the message is sent in.
+This rule will trigger when a user sends a message containing a server invite link.
+It does not trigger for invites pointing to the same server the message is sent in.
#### Links
This rule will trigger when a user sends a message containing _any_ link, GIFs from Discord's GIF-Picker included.
-Unless you have a very specific use-case, and know what you're doing, we recommend using
-[Banned Websites](#banned-websites) instead.
+Unless you have a very specific use-case, and know what you're doing, we recommend using [Banned Websites](#banned-websites) instead.
#### Banned Words
-This rule will trigger when a user sends a message containing any of the configured banned words; you can enable a
-pre-defined list of words generally considered bad, or define your own list of words, or both.
+This rule will trigger when a user sends a message containing any of the configured banned words; you can enable a pre-defined list of words generally considered bad, or define your own list of words, or both.
-It is case-insensitive and does not trigger for words that are part of other words. See also the [Scunthorpe
-Problem](https://en.wikipedia.org/wiki/Scunthorpe_problem).
+It is case-insensitive and does not trigger for words that are part of other words.
+See also the [Scunthorpe Problem](https://en.wikipedia.org/wiki/Scunthorpe_problem).
To add your own words, scroll to the bottom of the rule's configuration page and add one word per line.
#### Banned Websites
This rule will trigger when a user sends a message containing a link to any of the configured banned websites.
-Additionally, you can enable the Google Safe Browsing integration to check links against Google's database of known
-unsafe links, as well as another separately enabled integration to check links against a list of known phishing sites.
+Additionally, you can enable the Google Safe Browsing integration to check links against Google's database of known unsafe links, as well as another separately enabled integration to check links against a list of known phishing sites.
-To add your own websites, scroll to the bottom of the rule's configuration page and add one domain per line. For
-example, if you were to block Google, you'd enter `google.com`, **_not_** `https://google.com`. The rule will also
-consider subdomains.
+To add your own websites, scroll to the bottom of the rule's configuration page and add one domain per line.
+For example, if you were to block Google, you'd enter `google.com`, **_not_** `https://google.com`.
+The rule will also consider subdomains.
diff --git a/content/docs/moderation/logging.md b/content/docs/moderation/logging.md
index 7496f670..778f6b3f 100644
--- a/content/docs/moderation/logging.md
+++ b/content/docs/moderation/logging.md
@@ -4,8 +4,7 @@ weight = 440
description = "On-demand message logging."
+++
-Capture a moment in time with message logging of the last messages in a channel when the log is created, including a
-limited number of deleted messages.
+Capture a moment in time with message logging of the last messages in a channel when the log is created, including a limited number of deleted messages.
@@ -17,12 +16,12 @@ YAGPDB IS NOT A LOGGING BOT.

-Message logs capture X amount of messages from a channel, including any deleted messages cached by YAGPDB (the last
-1 hour of deleted messages, or last 12 hours with [premium](/docs/welcome/premium), are recorded by YAGPDB).
+Message logs capture X amount of messages from a channel, including any deleted messages cached by YAGPDB (the last 1 hour of deleted messages, or last 12 hours with [premium](/docs/welcome/premium), are recorded by YAGPDB).
-The log is accessible on YAGPDB's website for later viewing. It saves message timestamps, message author's Username and
-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.
+The log is accessible on YAGPDB's website for later viewing.
+It saves message timestamps, message author's Username and 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: Maximum Log Retention" icon="outline/alert-octagon" >}}
@@ -36,16 +35,15 @@ If you're self-hosting, see [Message Log Purge](#message-log-purge) for more inf
### Logs Command
-By default, any member can run the logs command for any channel in which they have permission to Read Messages, Send
-Messages, and Read Message History. Members will be permitted to create logs regardless of their permission to view
-them.
+By default, any member can run the logs command for any channel in which they have permission to Read Messages, Send Messages, and Read Message History.
+Members will be permitted to create logs regardless of their permission to view them.
[Logs Command Syntax](/docs/core/all-commands#logs)
### Moderation Actions
-Select moderation actions will generate message logs when used, and other actions allow you to enable logging if
-desired. A link for these logs is included in the mod log if mod log is enabled.
+Select moderation actions will generate message logs when used, and other actions allow you to enable logging if desired.
+A link for these logs is included in the mod log if mod log is enabled.
#### Actions Generating Logs
@@ -65,61 +63,58 @@ These actions require logging to be enabled on their control panel.
## Viewing Logs
-To view a message log after it has been created, you'll need to visit its link in a browser. YAGPDB cannot send message
-logs to a Discord channel; they are only accessible online.
+To view a message log after it has been created, you'll need to visit its link in a browser.
+YAGPDB cannot send message logs to a Discord channel; they are only accessible online.
-- When a log is created, the link to view it follows the pattern `/public//log/`. Note that this
- makes it easy to scrape through all the logs created on a server. Assume any member that can view a specific log can
- also view every other log on your server.
+- When a log is created, the link to view it follows the pattern `/public//log/`.
+ Note that this makes it easy to scrape through all the logs created on a server.
+ Assume any member that can view a specific log can also view every other log on your server.
- You can view a list of all message logs created on your server on the Logging page of the control panel.
- When the `logs` command is executed, a link to the message log is sent as the response.
- When a moderation action creates a log, a link is included in the mod log entry if enabled.
-When viewing a log, YAGPDB colors the usernames of each message author based on their roles at the time of log
-_viewing_, similarly to how they would appear on your server.
+When viewing a log, YAGPDB colors the usernames of each message author based on their roles at the time of log _viewing_, similarly to how they would appear on your server.
## Access Control
### Members can view message logs
-Selecting this mode on the control panel allows all members of your server to view any message logs created. Users will
-need to log in with their Discord account to view the message logs.
+Selecting this mode on the control panel allows all members of your server to view any message logs created.
+Users will need to log in with their Discord account to view the message logs.
#### Roles
-You may additionally choose to require roles for members to have in order to view message logs. Members with _one or
-more_ of these roles will be permitted to view message logs.
+You may additionally choose to require roles for members to have in order to view message logs.
+Members with _one or more_ of these roles will be permitted to view message logs.
### Everyone can view message logs
-Selecting this mode on the control panel allows anyone with a link to a log to view all the logs on your server without
-needing to log in.
+Selecting this mode on the control panel allows anyone with a link to a log to view all the logs on your server without needing to log in.
## Deleted Messages
-A log contains any messages cached at the time of log creation. Deleted messages are cached for `1` hour before being
-removed. On [premium](/docs/welcome/premium) servers, they are cached for `12` hours.
+A log contains any messages cached at the time of log creation.
+Deleted messages are cached for `1` hour before being removed.
+On [premium](/docs/welcome/premium) servers, they are cached for `12` hours.
-In a message log, deleted messages are shown to users permitted to view them. If a user is not permitted to view deleted
-messages, they will not be able to see deleted messages, or that a message was deleted at all.
+In a message log, deleted messages are shown to users permitted to view them.
+If a user is not permitted to view deleted messages, they will not be able to see deleted messages, or that a message was deleted at all.
## Disallowed Channels
-Under the Logging page on the control panel you may exclude certain channels from log creation. Using the logs command
-in a disallowed channel will return an error message. Moderation actions will also not generate or attach logs in such
-channels.
+Under the Logging page on the control panel you may exclude certain channels from log creation.
+Using the logs command in a disallowed channel will return an error message.
+Moderation actions will also not generate or attach logs in such channels.
## Deleting Logs
-Users with write access to the control panel may delete individual logs or delete all logs on the server using the
-control panel.
+Users with write access to the control panel may delete individual logs or delete all logs on the server using the control panel.
{{< selfhosting >}}
## Message Log Purge
-If you are self-hosting your own instance of YAGPDB, you can set `enable_message_log_purge=true` to automatically purge
-message logs older than 30 days. This option is enabled on the official instance of YAGPDB hosted by Botlabs but is
-disabled by default on a fresh self-host.
+If you are self-hosting your own instance of YAGPDB, you can set `enable_message_log_purge=true` to automatically purge message logs older than 30 days.
+This option is enabled on the official instance of YAGPDB hosted by Botlabs but is disabled by default on a fresh self-host.
{{< /selfhosting >}}
diff --git a/content/docs/moderation/moderation-tools.md b/content/docs/moderation/moderation-tools.md
index 54cdf738..b311f256 100644
--- a/content/docs/moderation/moderation-tools.md
+++ b/content/docs/moderation/moderation-tools.md
@@ -10,10 +10,20 @@ Everything in moderation, including moderation.
@@ -23,19 +33,18 @@ The moderation page allows configuration of common settings.
### Mod Channels
-1. **Mod Log** - The mod log is the channel YAGPDB will send log messages to when most moderation commands are used. Log
- entries include username and user ID of both the moderator, and the moderated user. They additionally include the
- reason for relevant commands (defaults to `` when not provided), and a [log](/docs/moderation/logging)
- of the channel where the command was run.
-2. **Report** - The channel for YAGPDB to send report messages to when users use the report command. Similar to the mod
- log, report entries include username and user ID of the user reporting, and the user reported, as well as the reason
- and message log of the channel.
+1. **Mod Log** - The mod log is the channel YAGPDB will send log messages to when most moderation commands are used.
+ Log entries include username and user ID of both the moderator, and the moderated user.
+ They additionally include the reason for relevant commands (defaults to `` when not provided), and a [log](/docs/moderation/logging) of the channel where the command was run.
+2. **Report** - The channel for YAGPDB to send report messages to when users use the report command.
+ Similar to the mod log, report entries include username and user ID of the user reporting, and the user reported, as well as the reason and message log of the channel.
3. **Moderation DM Error** - The channel where YAGPDB will send error messages from executing template script within
[moderation DMs](#moderation-dms).
### Command Toggles
-Certain potentially destructive moderation commands are disabled by default. These commands are:
+Certain potentially destructive moderation commands are disabled by default.
+These commands are:
- The **clean command** (**4**) toggles the [clean command](/docs/core/all-commands#clean).
- The **report command** (**5**) toggles the [report command](/docs/core/all-commands#report).
@@ -44,13 +53,11 @@ Certain potentially destructive moderation commands are disabled by default. The
### Unban/Unmute Logging
-When the `unban`/`unmute` commands are used, YAGPDB will log their usage to the [mod log](#mod-channels) similarly to
-the other moderation commands.
+When the `unban`/ `unmute` commands are used, YAGPDB will log their usage to the [mod log](#mod-channels) similarly to the other moderation commands.
-When using the `ban` and `mute` commands with a duration, YAGPDB will automatically undo the punishment after the
-specified duration. For instance, if you execute `ban @user 1d`, YAGPDB will ban the user, and 1 day later YAGPDB will
-execute the `unban` command with reason "Timed ban expired." This action appears in the mod log as YAGPDB being the
-moderator.
+When using the `ban` and `mute` commands with a duration, YAGPDB will automatically undo the punishment after the specified duration.
+For instance, if you execute `ban @user 1d`, YAGPDB will ban the user, and 1 day later YAGPDB will execute the `unban` command with reason "Timed ban expired".
+This action appears in the mod log as YAGPDB being the moderator.
Toggling Unban Logging (**6**) allows you to enable or disable the logging of Unmute events.
@@ -58,27 +65,26 @@ Toggling Give/Takerole Logging (**9**) allows you to enable or disable the loggi
### External Logging
-By default, only actions performed through YAGPDB will be recorded in the mod-log. Hence, kicking a user using YAGPDB's
-`kick` command will result in a log entry, whereas kicking the user directly through Discord's context menu will not be
-recorded. Enabling external logging for different moderation actions (**10**), (**11**), (**12**) allows the bot to use
-the server Audit Log to retrieve moderation actions taken by other bots or other users.
+By default, only actions performed through YAGPDB will be recorded in the mod-log.
+Hence, kicking a user using YAGPDB's `kick` command will result in a log entry, whereas kicking the user directly through Discord's context menu will not be recorded.
+Enabling external logging for different moderation actions (**10**), (**11**), (**12**) allows the bot to use the server Audit Log to retrieve moderation actions taken by other bots or other users.
YAGPDB must have View Audit Log permissions to use this feature.
## Permissions Notice
-The moderation plugin requires additional permissions to function properly. The notice at the top of the screen (**14**)
-will inform you of the required permissions for the plugin and alert you if the bot is missing permissions.
+The moderation plugin requires additional permissions to function properly.
+The notice at the top of the screen (**14**) will inform you of the required permissions for the plugin and alert you if the bot is missing permissions.
## Moderation Tools
-Moderation tools are used to prevent members on your server from being abusive. They can be used via command or triggered
-by automoderator. Like all inbuilt commands, they may also be triggered within template script using
-[exec/execAdmin](/docs/reference/templates/functions#miscellaneous).
+Moderation tools are used to prevent members on your server from being abusive.
+They can be used via command or triggered by automoderator.
+Like all inbuilt commands, they may also be triggered within template script using [exec/execAdmin](/docs/reference/templates/functions#miscellaneous).
-Most moderation tools allow you to specify a reason for the mod action. This is included when the action is logged in
-the [mod log](#mod-channels) and is also, by default, DM'd to the offending user when using [certain
-commands](#moderation-dms). This reason may be retroactively edited using the [Reason Command](/docs/core/all-commands#reason).
+Most moderation tools allow you to specify a reason for the mod action.
+This is included when the action is logged in the [mod log](#mod-channels) and is also, by default, DM'd to the offending user when using [certain commands](#moderation-dms).
+This reason may be retroactively edited using the [Reason Command](/docs/core/all-commands#reason).
Each of the main moderation tools have individual configuration pages, accessible through the tabs (**13**).
@@ -88,7 +94,9 @@ Each of the main moderation tools have individual configuration pages, accessibl
@@ -96,24 +104,22 @@ There are common configuration options worth mentioning.
#### Permitted Roles
-By default, any user with the relevant Discord permission in your server (timeout members for the timeout command, kick
-members for the kick command, etc.) are able to run the corresponding moderation command. Selecting permitted roles
-(**1**) will allow said roles to run the moderation commands **even if** they do not have required Discord permissions.
+By default, any user with the relevant Discord permission in your server (timeout members for the timeout command, kick members for the kick command, etc.) are able to run the corresponding moderation command.
+Selecting permitted roles (**1**) will allow said roles to run the moderation commands **even if** they do not have required Discord permissions.
Give/Takerole Permitted Roles (**8**) operate in the same way.
#### Reason Optional
-By default, Timeout, (Un)Mute, Kick, and Ban tools require the moderator to specify a reason. This forces your staff
-(and yourself, no exceptions!) to specify a reason for taking mod action for the mod logs, and also by default to be
-DM'd to the offending user.
+By default, Timeout, (Un)Mute, Kick, and Ban tools require the moderator to specify a reason.
+This forces your staff (and yourself, no exceptions!) to specify a reason for taking mod action for the mod logs, and also by default to be DM'd to the offending user.
To remove the requirement and make the reason optional, you may toggle this on (**2**).
#### Moderation DMs
-Moderation DMs are template scripts (**3**) which are executed within the offending user's DM. Text output to the
-response will be directly sent to the offending user.
+Moderation DMs are template scripts (**3**) which are executed within the offending user's DM.
+Text output to the response will be directly sent to the offending user.
{{< link-card href="/docs/reference/templates/syntax-and-data" description="Templates Reference" target="_blank" >}}
@@ -130,9 +136,9 @@ Additional template dot context data is available for Moderation Actions:
{{< callout context="danger" title="Danger: Template Execution Errors" icon="outline/alert-octagon" >}}
-Any errors which occur in the template execution will not be logged by default. The offending user will only receive a
-DM from your server saying **Failed executing template.** Setting a [Moderation DM Error channel](#mod-channels) allows
-for the more detailed errors to be captured.
+Any errors which occur in the template execution will not be logged by default.
+The offending user will only receive a DM from your server saying **Failed executing template**.
+Setting a [Moderation DM Error channel](#mod-channels) allows for the more detailed errors to be captured.
{{< /callout >}}
@@ -146,47 +152,44 @@ Moderation actions which send DMs are:
### Timeout
-Timing a member out employs Discord's timeout feature to prevent users from interacting with your server, temporarily
-removing all permissions except to read messages. Owners and admin users with the _Administrator_ permission are exempt.
+Timing a member out employs Discord's timeout feature to prevent users from interacting with your server, temporarily removing all permissions except to read messages.
+Owners and admin users with the _Administrator_ permission are exempt.
#### Timeout Default Duration
-Similarly to mute and ban, the timeout command has an optional duration. Unlike the mute and ban commands, the timeout
-tool requires a duration between 60 seconds and 4 weeks. This is a requirement by Discord. For this reason the timeout
-command has a default duration which is applied if the duration argument is omitted when running the command. By
-default, this default duration is set to 10 minutes, but can be changed via the timeout tab on the control panel.
+Similarly to mute and ban, the timeout command has an optional duration.
+Unlike the mute and ban commands, the timeout tool requires a duration between 60 seconds and 4 weeks.
+This is a requirement by Discord.
+For this reason the timeout command has a default duration which is applied if the duration argument is omitted when running the command.
+By default, this default duration is set to 10 minutes, but can be changed via the timeout tab on the control panel.
[Timeout Command Syntax](/docs/core/all-commands#timeout)
### Mute
-Muting a member assigns them the designated "Mute role" as specified in the Mute tab on the control panel. This allows
-for you to remove permissions from this role in all or specific channels on your server, effectively removing the user's
-ability to send messages on your server when muted. You may optionally specify a duration for the mute, after which the
-user will be unmuted.
+Muting a member assigns them the designated "Mute role" as specified in the Mute tab on the control panel.
+This allows for you to remove permissions from this role in all or specific channels on your server, effectively removing the user's ability to send messages on your server when muted.
+You may optionally specify a duration for the mute, after which the user will be unmuted.
#### Manage Mute Role
-By default, the mute command will only assign the mute role to the user when they are muted. This allows you to fully
-customize the permissions granted to or removed from your mute role. Alternatively, enable the "Have the bot manage the
-mute role" toggle to allow the bot to automatically alter the permissions of your channels to prevent the muted role
-from sending messages.
+By default, the mute command will only assign the mute role to the user when they are muted.
+This allows you to fully customize the permissions granted to or removed from your mute role.
+Alternatively, enable the "Have the bot manage the mute role" toggle to allow the bot to automatically alter the permissions of your channels to prevent the muted role from sending messages.
-You may also allow the bot to remove the muted role's "Add Reactions" permission automatically by toggling on "Disallow
-Adding Reactions when muted" in the mute tab on the control panel. The bot must be automatically managing the mute role
-for this to work.
+You may also allow the bot to remove the muted role's "Add Reactions" permission automatically by toggling on "Disallow Adding Reactions when muted" in the mute tab on the control panel.
+The bot must be automatically managing the mute role for this to work.
#### Remove Roles Whilst Muted
-You may specify roles for YAGPDB to remove from a user whilst muted and give back after they are unmuted. This will let
-the bot log which of the selected roles the member has at the time of the mute, then return them to said member at the
-time of unmute.
+You may specify roles for YAGPDB to remove from a user whilst muted and give back after they are unmuted.
+This will let the bot log which of the selected roles the member has at the time of the mute, then return them to said member at the time of unmute.
#### Mute Default Duration
-The mute command has an optional duration argument. By default, if no duration is provided, the mute is permanent (or
-until manually unmuted). To override this, you may set a default duration with the "Default mute duration" field in the
-mute tab on the control panel.
+The mute command has an optional duration argument.
+By default, if no duration is provided, the mute is permanent (or until manually unmuted).
+To override this, you may set a default duration with the "Default mute duration" field in the mute tab on the control panel.
[Mute Command Syntax](/docs/core/all-commands#mute)
@@ -194,13 +197,10 @@ mute tab on the control panel.
{{< 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
-disallow the Muted role the same permission, a user with both Role X _and_ Muted role **will** be allowed to send
-messages in the channel.
+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 disallow the Muted role the same permission, a user with both Role X _and_ Muted role **will** be allowed to send messages in the channel.
-To solve this issue and allow the mute role to properly remove permissions, select the `/` instead of the checkmark
-when configuring other roles' permission overrides.
+To solve this issue and allow the mute role to properly remove permissions, select the `/` instead of the checkmark when configuring other roles' permission overrides.

@@ -208,37 +208,35 @@ when configuring other roles' permission overrides.
{{< 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.
+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.
{{< /callout >}}
### Kick
-Kicking a user immediately removes them from your server. They may still join back if they use a valid invite link or
-code.
+Kicking a user immediately removes them from your server.
+They may still join back if they use a valid invite link or code.
#### Delete User's Last Messages on Kick
-YAGPDB's kick tool optionally allows you to delete the X most recent messages sent by that user within the channel the
-kick action takes place in. This can be done by specifying a number of messages to delete with the `-cl` flag when
-running the kick command. There is also a "Delete the user's last 100 messages" toggle in the kick tab on the control
-panel which enables automatic deletion when the kick tool is used.
+YAGPDB's kick tool optionally allows you to delete the X most recent messages sent by that user within the channel the kick action takes place in.
+This can be done by specifying a number of messages to delete with the `-cl` flag when running the kick command.
+There is also a "Delete the user's last 100 messages" toggle in the kick tab on the control panel which enables automatic deletion when the kick tool is used.
[Kick Command Syntax](/docs/core/all-commands#kick)
### Ban
-Banning a user uses Discord's native ban feature to remove a user from your server, and prevent that user from joining
-your server again with any invite code or link. You may optionally specify a duration for the ban, after which the
-user will be unbanned.
+Banning a user uses Discord's native ban feature to remove a user from your server, and prevent that user from joining your server again with any invite code or link.
+You may optionally specify a duration for the ban, after which the user will be unbanned.
#### Delete User's Last Messages on Ban
-Discord natively allows you to delete a set amount of the offending user's most recent messages upon banning them. This
-is measured by days' worth of messages. This can be done by specifying a number of days' worth of messages to delete
-with the `-ddays` flag when running the ban command. There is also a "Default number of days of messages to delete"
-field in the ban tab on the control panel which enables automatic deletion when the kick tool is used.
+Discord natively allows you to delete a set amount of the offending user's most recent messages upon banning them.
+This is measured by days' worth of messages.
+This can be done by specifying a number of days' worth of messages to delete with the `-ddays` flag when running the ban command.
+There is also a "Default number of days of messages to delete" field in the ban tab on the control panel which enables automatic deletion when the kick tool is used.
[Ban Command Syntax](/docs/core/all-commands#ban)
@@ -246,23 +244,22 @@ field in the ban tab on the control panel which enables automatic deletion when
{{< 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.
+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.
{{< /callout >}}
### Warnings
Warning a user adds an entry to the user's warning log on the server, and optionally appears in the mod log as well.
-This can be used to better inform future moderation actions based on the user's past behavior. Additionally, it sends a
-DM to the user with the warning reason, which can be used to dissuade a user from continuing harmful actions without
-needing to remove their access to your server.
+This can be used to better inform future moderation actions based on the user's past behavior.
+Additionally, it sends a DM to the user with the warning reason, which can be used to dissuade a user from continuing harmful actions without needing to remove their access to your server.
#### Message Logs
-You may optionally allow YAGPDB to create a [message log](/docs/moderation/logging) of the last 100 messages from all users
-in the channel a warning was issued in. This can help provide context for past warnings and further inform future mod
-actions. This is enabled in the warnings tab on the control panel.
+You may optionally allow YAGPDB to create a [message log](/docs/moderation/logging) of the last 100 messages from all users in the channel a warning was issued in.
+This can help provide context for past warnings and further inform future mod actions.
+This is enabled in the warnings tab on the control panel.
#### Warning Mod Log
@@ -280,13 +277,12 @@ You may optionally send warnings to the mod log, this is enabled in the warnings
[ClearWarnings Command Syntax](/docs/core/all-commands#clearwarnings) - Clears the warnings of a user.
-[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.
+[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="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.
+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.
Example:
diff --git a/content/docs/moderation/verification.md b/content/docs/moderation/verification.md
index 08814c8e..b7b91646 100644
--- a/content/docs/moderation/verification.md
+++ b/content/docs/moderation/verification.md
@@ -8,61 +8,60 @@ Use Google reCAPTCHA v2 to verify your members before permitting them access to

-The verification plugin assigns a specified role to new members after they successfully complete Google reCAPTCHA v2
-verification. This allows you to further verify new members as humans rather than bots before granting them access to
-your server.
+The verification plugin assigns a specified role to new members after they successfully complete Google reCAPTCHA v2 verification.
+This allows you to further verify new members as humans rather than bots before granting them access to your server.
-This is accomplished by sending new members a customizable DM (which employs [template scripting](/docs/reference/templates))
-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.
+This is accomplished by sending new members a customizable DM (which employs [template scripting](/docs/reference/templates)) 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: 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.
+You must assign a "Verified Role" on the Verification page in the control panel.
+The plugin will not function if no role is selected.
{{< /callout >}}
## Verify Page
-The verification page uses markdown format to render the page. The CAPTCHA challenge and confirmation button are
-suffixed below the page content. A success message is displayed upon CAPTCHA completion. You can customize the page
-content in the Verification page on the control panel.
+The verification page uses markdown format to render the page.
+The CAPTCHA challenge and confirmation button are suffixed below the page content.
+A success message is displayed upon CAPTCHA completion.
+You can customize the page content in the Verification page on the control panel.
## Verification DMs

-The verification DM is a template script executed in the new member's DM immediately upon joining. Text output to the
-response is sent in the member's DM.
+The verification DM is a template script executed in the new member's DM immediately upon joining.
+Text output to the response is sent in the member's DM.
-You may optionally send a re-notification message in the member's DMs if they do not verify after X minutes. This
-message uses template script as well.
+You may optionally send a re-notification message in the member's DMs if they do not verify after X minutes.
+This message uses template script as well.
You can customize both messages in the Verification page on the control panel.
[Template Reference](/docs/reference/templates/syntax-and-data)
-Verification scripts provide `.Link` as additional dot context data. This is the unique verification link the user must
-visit to verify.
+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: 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
-if they do not receive a DM from YAGPDB.
+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 if they do not receive a DM from YAGPDB.
{{< /callout >}}
## Kick After Unverified
-You may optionally configure YAGPDB to kick users who haven't verified after X minutes. This is configured in the
-Verification page on the control panel.
+You may optionally configure YAGPDB to kick users who haven't verified after X minutes.
+This is configured in the Verification page on the control panel.
## Logs
-You may optionally configure a channel to send verification logs to. This is done on the Verification page in the
-control panel.
+You may optionally configure a channel to send verification logs to.
+This is done on the Verification page in the control panel.
Logged events are:
@@ -76,34 +75,30 @@ Logged events are:
{{< 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.
+Alt Detection is currently disabled on the official instance of YAGPDB hosted by Botlabs.
+These features will not function on the official bot.
{{< /callout >}}
-By default, upon successful verification YAGPDB will check the user's IP (as captured by the verification page) against
-other users who have verified using YAGPDB.
+By default, upon successful verification YAGPDB will check the user's IP (as captured by the verification page) against other users who have verified using YAGPDB.
### Alt Banning
-When a user is banned for any reason (including bans made outside the bot), YAGPDB will automatically ban any alt
-accounts detected for that user.
+When a user is banned for any reason (including bans made outside the bot), YAGPDB will automatically ban any alt accounts detected for that user.
If a new user verifies who shares an IP with a previously banned user, they will be banned as well.
### Alt Reporting
-If a new user who verifies is detected as an alt but none of their associated accounts have been banned, YAGPDB will
-send a log to the verification log channel if specified, identifying the new user as an alt and listing other users who
-verified at the same IP address.
+If a new user who verifies is detected as an alt but none of their associated accounts have been banned, YAGPDB will send a log to the verification log channel if specified, identifying the new user as an alt and listing other users who verified at the same IP address.
{{< selfhosting >}}
### Disable Alt Detection Globally
-For self hosters, the environment variable to enable this feature is `verification.track_ips`. It is `true` by default.
-Disabling IP tracking will also disable alt detection, but the CAPTCHA segment of the verification plugin will be
-unaffected.
+For self hosters, the environment variable to enable this feature is `verification.track_ips`.
+It is `true` by default.
+Disabling IP tracking will also disable alt detection, but the CAPTCHA segment of the verification plugin will be unaffected.
## Self Hosting YAGPDB
@@ -111,8 +106,7 @@ Do not proceed unless you are hosting your own version of the YAGPDB codebase.
### Enabling Verification
-Verification requires the `google.recaptcha_secret` and `google.recaptcha_site_key` env variables to be configured and
-valid. To get a reCAPTCHA secret and site key, [register a site on
-reCAPTCHA](https://www.google.com/recaptcha/admin/create) and copy the generated secret and key.
+Verification requires the `google.recaptcha_secret` and `google.recaptcha_site_key` env variables to be configured and valid.
+To get a reCAPTCHA secret and site key, [register a site on reCAPTCHA](https://www.google.com/recaptcha/admin/create) and copy the generated secret and key.
{{< /selfhosting >}}
diff --git a/content/docs/notifications/general.md b/content/docs/notifications/general.md
index d5bc0fda..d8f98846 100644
--- a/content/docs/notifications/general.md
+++ b/content/docs/notifications/general.md
@@ -4,8 +4,7 @@ weight = 510
description = "Welcome new users, announce when users leave, and more."
+++
-General notifications such as a welcoming direct message, a message in the server when users join or leave, as well as a
-simple message announcing when a channel's topic has changed.
+General notifications such as a welcoming direct message, a message in the server when users join or leave, as well as a simple message announcing when a channel's topic has changed.

@@ -27,8 +26,7 @@ Write a message that you want the bot to send to the user via DM whenever someon
### Topic Change Message
-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.
+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: Custom Command Syntax" icon="outline/rocket" >}}
diff --git a/content/docs/notifications/reddit.md b/content/docs/notifications/reddit.md
index f4088759..f7c4a945 100644
--- a/content/docs/notifications/reddit.md
+++ b/content/docs/notifications/reddit.md
@@ -12,9 +12,8 @@ Get notifications from your favorite subreddits directly in your Discord server.

-To get notifications from a subreddit, simply enter the name of the subreddit in the subreddit field without the `r/` in
-front (for example, to add a feed for the `r/jonas747`, you would put "jonas747" as the subreddit name). Then, specify
-which channel you would like the bot to post the feed in.
+To get notifications from a subreddit, simply enter the name of the subreddit in the subreddit field without the `r/` in front (for example, to add a feed for the `r/jonas747`, you would put "jonas747" as the subreddit name).
+Then, specify which channel you would like the bot to post the feed in.
-You can toggle whether to post using embeds or without using them. With embeds, the feed will look nicer but videos and
-such will not be attached but just linked.
+You can toggle whether to post using embeds or without using them.
+With embeds, the feed will look nicer but videos and such will not be attached but just linked.
diff --git a/content/docs/notifications/streaming.md b/content/docs/notifications/streaming.md
index fab96116..13b32733 100644
--- a/content/docs/notifications/streaming.md
+++ b/content/docs/notifications/streaming.md
@@ -10,22 +10,22 @@ Let everyone know that someone is currently streaming.
{{< 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.
+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: 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.
+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 >}}

-Steaming notification is triggered based on your Discord streaming status (When you go purple, AKA streaming). You can
-either have announcements, be assigned the streaming role or both.
+Steaming notification is triggered based on your Discord streaming status (When you go purple, AKA streaming).
+You can either have announcements, be assigned the streaming role or both.
### **Announce Channel**
@@ -33,8 +33,8 @@ Choose the Channel that you want to bot to post the announcement in.
### Announcement Message
-Write the message that you want the announcement to say. The streaming announcements accept most templates, but have
-some additional special ones:
+Write the message that you want the announcement to say.
+The streaming announcements accept most templates, but have some additional special ones:
- `{{ .URL }}` outputs the URL of the stream.
- `{{ .Game }}` outputs the current game.
diff --git a/content/docs/notifications/youtube.md b/content/docs/notifications/youtube.md
index 5a6b241f..7e6f2511 100644
--- a/content/docs/notifications/youtube.md
+++ b/content/docs/notifications/youtube.md
@@ -8,15 +8,14 @@ Get notifications from your favorite YouTubers directly in your Discord server.
{{< callout context="note" title="Note: Required Bot Permissions" icon="outline/info-circle" >}}
-The bot requires at least the "Read Messages" and "Send Messages" permissions in the channel you want to post the feed
-in.
+The bot requires at least the "Read Messages" and "Send Messages" permissions in the channel you want to post the feed in.
{{< /callout >}}
## Adding a YouTube Feed
-To add a new feed simply copy the channel URL from YouTube and paste it into the "Link" field under "Add New Feed" (you
-may need to scroll down a bit); then select a channel to post it to. For a visual reference, please see the image below.
+To add a new feed simply copy the channel URL from YouTube and paste it into the "Link" field under "Add New Feed" (you may need to scroll down a bit), then select a channel to post it to.
+For a visual reference, please see the image below.
@@ -24,8 +23,7 @@ may need to scroll down a bit); then select a channel to post it to. For a visua
-If you are unable to obtain a direct channel URL, similar to
-**, we also support the following URLs:
+If you are unable to obtain a direct channel URL, similar to , we also support the following URLs:
- Video links ()
- Shorts links ()
@@ -33,19 +31,20 @@ If you are unable to obtain a direct channel URL, similar to
- Live links ()
- Playlist links ()
-Although we make an attempt at extracting the channel from usernames (),
-custom links (), and handles (), these are not as
-reliable as the links listed above, as we use the first result of a YouTube search to determine the channel via these
-URLs.
+Less reliable, but also supported are
-If you find yourself having trouble adding a feed using these kinds of URLs, please try to use one of the links listed
-above before asking for help in the [support server](/discord).
+- usernames ()
+- custom links ()
+- handles ()
+
+as we use the first result of a YouTube search to determine the channel via these URLs.
+If you find yourself having trouble adding a feed using these kinds of URLs, please try to use one of the links listed above before asking for help in the [support server](/discord).
{{< callout context="caution" title="Warning: Maximum Number of Feeds" icon="outline/info-circle" >}}
-You cannot have more than 10 active YouTube feeds at a time (250 with [Premium](/docs/welcome/premium)). If you have
-that many feeds active, you cannot add more until you disable at least one of those. That disabled excess feed will be
-deleted once you add a new one.
+You cannot have more than 10 active YouTube feeds at a time (250 with [Premium](/docs/welcome/premium)).
+If you have that many feeds active, you cannot add more until you disable at least one of those.
+Disabled excess feeds will be deleted once you add a new one.
{{< /callout >}}
@@ -60,8 +59,7 @@ During setup of a feed there are four more options you can configure, namely:
{{< callout context="note" title="Note: Required Bot Permissions" icon="outline/info-circle" >}}
-The bot needs mention `@everyone` or "mention this role" permissions if you wish to mention everyone or a specific role
-of your choosing.
+The bot needs mention `@everyone` or "mention this role" permissions if you wish to mention everyone or a specific role of your choosing.
{{< /callout >}}
@@ -69,8 +67,8 @@ You need not configure any of these ahead of time, you can always [edit the feed
## Editing a YouTube Feed
-To edit a feed, scroll down further until you reach the "Current subscribed channels" section. There you will find a
-list of all the feeds you have added.
+To edit a feed, scroll down further until you reach the "Current subscribed channels" section.
+There you will find a list of all the feeds you have added.

@@ -83,37 +81,34 @@ Going from left to right of the editable options, you can change the following:
- Also publish shorts
- Disable the feed until you enable it again
-Once you have made your changes, click the "Save" button on the far right to save your changes. If you instead wish to
-delete the feed, click the "Delete" button just below the "Save" button. None of these options need to be equal across
-all your feeds, you can have different settings for each feed.
+Once you have made your changes, click the "Save" button on the far right to save your changes.
+If you instead wish to delete the feed, click the "Delete" button just below the "Save" button.
+None of these options need to be equal across all your feeds, you can have different settings for each feed.
-You can only save changes to a feed one at a time, so if there are multiple feeds you wish to edit, you have to do so
-separately, saving after each feed you edited.
+You can only save changes to a feed one at a time, so if there are multiple feeds you wish to edit, you have to do so separately, saving after each feed you edited.
## Custom Announcement
-If you take a look at the top-right of the configuration page, you'll see a field for custom command templates for usage
-in the announcement message provided for YouTube feeds. The default response is the following code:
+If you take a look at the top-right of the configuration page, you'll see a field for custom command templates for usage in the announcement message provided for YouTube feeds.
+The default response is the following code:
```yag
{{.ChannelName}} published a new video! {{.URL}}
```
-You can customize this message to your liking, but bear in mind that using a custom announcement message will override
-the default announcement's mention settings *for all channels*, therefore you will have to implement this logic by
-yourself. Refer to the [mentions functions](https://help.yagpdb.xyz/docs/reference/templates/functions/#mentions) for
-more information.
+You can customize this message to your liking, but bear in mind that using a custom announcement message will override the default announcement's mention settings *for all channels*, therefore you will have to implement this logic by yourself.
+Refer to the [mentions functions](https://help.yagpdb.xyz/docs/reference/templates/functions/#mentions) for more information.
{{< callout context="danger" title="Danger: Custom Announcement Overrides Settings" icon="outline/alert-octagon" >}}
-Using a custom announcement message will override the default announcement's mention settings for all channels. Really.
+Using a custom announcement message will override the default announcement's mention settings for all channels.
+Really.
{{< /callout >}}
### Additional Context Data
-In addition to the standard context data available to all custom commands, we provide the following additional context
-data:
+In addition to the standard context data available to all custom commands, we provide the following additional context data:
- `{{ .ChannelID }}`: ID of the YouTube Channel.
- `{{ .ChannelName }}`: Name of the YouTube Channel.
diff --git a/content/docs/reference/components-v2.md b/content/docs/reference/components-v2.md
index 5992b6bf..86de8774 100644
--- a/content/docs/reference/components-v2.md
+++ b/content/docs/reference/components-v2.md
@@ -6,7 +6,7 @@ description = "Be fancier, use components!"
## componentBuilder
-`componentBuilder` is a helper for building Discord’s new Components V2 (sections, buttons, menus, galleries).
+The `componentBuilder` is a helper for building Discord’s new Components V2 (sections, buttons, menus, galleries).
It provides a simple template-based way to assemble complex message layouts without needing to write raw JSON.
You describe components with key–value pairs and `componentBuilder` handles conversion and validation for you.
@@ -19,7 +19,8 @@ This makes it easier to:
### Text
-Displays plain text content, supporting markdown. Can be a string or a slice of strings.
+Displays plain text content, supporting markdown.
+Can be a string or a slice of strings.
```yag
{{ $text := componentBuilder
@@ -52,8 +53,7 @@ A layout block that shows text with one mandatory accessory: either a button a t
###### Example
-For brevity, this example shows both a button and a thumbnail within a single section, but only one of those accessories
-must be used per section.
+For brevity, this example shows both a button and a thumbnail within a single section, but only one of those accessories must be used per section.
```yag
{{ $section := componentBuilder
@@ -161,7 +161,8 @@ Groups multiple components with optional styling.
### Buttons
-Interactive buttons users can click. Can be single or multiple. see [cbutton](/docs/reference/templates/functions#cbutton).
+Interactive buttons users can click.
+Can be single or multiple. see [cbutton](/docs/reference/templates/functions#cbutton).
- Maximum 25 buttons total (5 rows \* 5 buttons)
@@ -204,8 +205,7 @@ Select menus for user options. see [cmenu](/docs/reference/templates/functions#c
### Interactive Components
-Mix of buttons and menus, auto-distributed. see [cbutton](/docs/reference/templates/functions#cbutton) and
-[cmenu](/docs/reference/templates/functions#cmenu), respectively.
+Mix of buttons and menus, auto-distributed. see [cbutton](/docs/reference/templates/functions#cbutton) and [cmenu](/docs/reference/templates/functions#cmenu), respectively.
Accepts:
diff --git a/content/docs/reference/custom-command-examples.md b/content/docs/reference/custom-command-examples.md
index e924d410..485b9123 100644
--- a/content/docs/reference/custom-command-examples.md
+++ b/content/docs/reference/custom-command-examples.md
@@ -10,21 +10,24 @@ Prebuilt custom commands for use as a learning reference.
{{< callout context="danger" title="Danger: Out of Date" icon="outline/alert-octagon" >}}
-Note: This page is no longer updated with the latest versions of codes/commands. If you plan to copy paste codes for
-your server, please see the [community-ran repository](https://yagpdb-cc.github.io) of custom commands, which is
-frequently updated with newly contributed commands.
+Note: This page is no longer updated with the latest versions of codes/commands.
+If you plan to copy paste codes for your server, please see the [community-ran repository](https://yagpdb-cc.github.io) of custom commands, which is frequently updated with newly contributed commands.
{{< /callout >}}
-This isn't the actual page about custom commands. A brief overview about custom commands can be found in the
-[Custom Commands documentation](/docs/custom-commands/commands). Please take notice, some of examples presented here are
-not up to date with current capabilities of YAGPDB. Please visit our [support server](/discord) for newer solutions.
+This isn't the actual page about custom commands.
+A brief overview about custom commands can be found in the [Custom Commands documentation](/docs/custom-commands/commands).
+Please take notice, some of examples presented here are not up to date with current capabilities of YAGPDB.
+Please visit our [support server](/discord) for newer solutions.
### Controlled randomizer example
-YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for
-certain responses to occur. You can do this by creating a singular response and creating a variable with randInt. Then
-use an if-else-if statement like this to print out your desired output.
+YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for certain responses to occur.
+You can do this by creating a singular response and creating a variable with randInt.
+Then use an if-else-if statement like this to print out your desired output.
+YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for certain responses to occur.
+You can do this by creating a singular response and creating a variable with randInt.
+Then use an if-else-if statement like this to print out your desired output.
```yag
{{$var := randInt 100}}
@@ -40,11 +43,11 @@ This has a 65% chance of being triggered
### Silent execution of commands or storage in a variable
-This command is to be placed in the welcome message. It filters out people with invites in their name. Make sure that
-the checkbox **Censor server invites in usernames?** and the ban command are enabled on your server.
-
-You might not want the response for the executed command to show. You can suppress the response of a command like the
-following:
+This command is to be placed in the welcome message.
+It filters out people with invites in their name.
+Make sure that the checkbox **Censor server invites in usernames?** and the ban command are enabled on your server.
+You might not want the response for the executed command to show.
+You can suppress the response of a command like the following:
Trigger type: `Join message in server channel`
@@ -58,8 +61,8 @@ Trigger type: `Join message in server channel`
### Range example
-This command will teach you on how the range function works. It can iterate over many items including but not limited to
-a `cslice`, slice, `sdict`, and `dict`
+This command will teach you on how the range function works.
+It can iterate over many items including but not limited to a `cslice`, slice, `sdict`, and `dict`
This particular command loops over a cslice and a sdict.
@@ -79,11 +82,8 @@ Trigger type: `Command` Trigger: `range`
{{- end }}
```
-`$k` is the index for arrays / cslices (starting at 0) or the key for maps and sdicts, while `$v` is the current word in
-your input that you are on.
-
-Range will work on any kind of slice/array. for example. If we wanted to look for all the entries in our database we can
-use range and index through them all in the following.
+`$k` is the index for arrays / cslices (starting at 0) or the key for maps and sdicts, while `$v` is the current word in your input that you are on.
+Range will work on any kind of slice/array, so if we wanted to look for all the entries in our database we can use range and index through them all in the following.
```yag
{{$lb := dbTopEntries "%" 100 0}}
@@ -96,9 +96,8 @@ Note that we can go through everything that is in $lb with range.
### Dictionary example
-A dictionary does not currently have a lot of practical use, because YAGPDB has a data type more suited for most use
-cases - `sdict`. However, sdict only supports string keys, which means that in the case you want non-string keys, you
-will have to use `dict`.
+A dictionary does not currently have a lot of practical use, because YAGPDB has a data type more suited for most use cases - `sdict`.
+However, sdict only supports string keys, which means that in the case you want non-string keys, you will have to use `dict`.
Trigger type: `Command` Trigger: `dict`
@@ -112,9 +111,10 @@ hello - {{ $dict.hello }}
### parseArgs example
-The `parseArgs` template can check if specific arguments are given. If not, it will return a custom error message. It
-also checks if specific args are of a specific type and simplifies the argument management. Available types for `carg`
-are:
+The `parseArgs` template can check if specific arguments are given.
+If not, it will return a custom error message.
+It also checks if specific args are of a specific type and simplifies the argument management.
+Available types for `carg` are:
- `int` (whole number)
- `string` (text)
@@ -137,9 +137,8 @@ Trigger type: `Command` Trigger: `send`
### Countdown example (Exec CC)
-This example consists of two custom commands, and after copy/paste `REPLACE-WITH-...` arguments need to be replaced by
-actual custom command ID's in your system. This custom command is very complex, uses very many advanced functions, all
-it does, constructs a 10 second countdown timer command-system for given starting time.
+This example consists of two custom commands, and after copy/paste `REPLACE-WITH-...` arguments need to be replaced by actual custom command ID's in your system.
+This custom command is very complex, uses very many advanced functions, all it does, constructs a 10 second countdown timer command-system for given starting time.
```yag
{{$args := parseArgs 2 ""
@@ -151,9 +150,8 @@ it does, constructs a 10 second countdown timer command-system for given startin
{{execCC REPLACE-WITH-NEXT-CC-ID nil 0 (sdict "MessageID" $mID "T" $t "Message" ($args.Get 1)) }}
```
-Second part of the custom commands, here we see, how `data`-part of exeCC was made in previous custom command as
-`sdict`and now we are calling those keys with `.ExecData` - for example `.ExecData.MessageID` sets new variable the same
-as stated in previous code.
+Second part of the custom commands, here we see, how `data`-part of exeCC was made in previous custom command as `sdict`and now we are calling those keys with `.ExecData`.
+For example `.ExecData.MessageID` sets new variable the same as stated in previous code.
```yag
{{$timeLeft := .ExecData.T.Sub currentTime}}
@@ -181,8 +179,8 @@ as stated in previous code.
### Database example
-This is a simple note taking system containing 3 separate custom commands. Also note that the actual name of the key
-inserted to database begins with "notes\_".
+This is a simple note taking system containing 3 separate custom commands.
+Also note that the actual name of the key inserted to database begins with "notes\_".
#### Save note
@@ -223,8 +221,8 @@ You don't have any notes :(
### Cooldown Example
-With YAGPDB's database system, you can now add cooldowns to you custom commands. You can either make them global
-cooldowns or a per user cooldown.
+With YAGPDB's database system, you can now add cooldowns to you custom commands.
+You can either make them global cooldowns or a per user cooldown.
```yag
{{/* CONFIGURATION HERE CHANGE VALUES AS NEEDED */}}
@@ -261,11 +259,11 @@ cooldowns or a per user cooldown.
> By **Timcampy#5636**
With YAGPDB's database system, I made a command to have users count from 0 and keep counting to the next number.
-Relatively simple command that involves database and type conversion.
+Relatively simple command that involves database and type conversion.
Trigger type: `Regex` Trigger: `\A`
-`BE SURE TO RESTRICT THE COMMAND TO A SINGLE CHANNEL`
+`BE SURE TO RESTRICT THE COMMAND TO A SINGLE CHANNEL`
```yag
{{/* If you are not doing (no twice msg in a row) or (role assignment for latest user) you can remove counter_user and by extension everything to do with $lastUser*/}}
@@ -326,12 +324,11 @@ Trigger type: `Regex` Trigger: `\A`
> By **GryTrean#8957**
-This command will allow you to give a role to someone, making sure that the role given is in a list of allowed roles. We
-use the `{{giveRoleName }}` template which allows us to give a user a role by name. We also make sure that
-the command has the correct number of arguments and if not, we give a response with the correct usage of the command. To
-add a new exception to the roles that can be given, you simply add another role in line 2. You could also make the
-command take away roles from someone instead of giving them by simply using the `{{takeRoleName}}` template instead of
-`{{giveRoleName}}`.
+This command will allow you to give a role to someone, making sure that the role given is in a list of allowed roles.
+We use the `{{giveRoleName }}` template which allows us to give a user a role by name.
+We also make sure that the command has the correct number of arguments and if not, we give a response with the correct usage of the command.
+To add a new exception to the roles that can be given, you simply add another role in line 2.
+You could also make the command take away roles from someone instead of giving them by simply using the `{{takeRoleName}}` template instead of `{{giveRoleName}}`.
Trigger type: `Command` Trigger: `giveRoleName`
@@ -353,11 +350,11 @@ Trigger type: `Command` Trigger: `giveRoleName`
### Broadcast command
-> By **GryTrean#8957** \
+> By **GryTrean#8957**
> Updated by: **Timcampy#5636**
-This command lets the bot send a message to another channel. It uses embeds so you can see `sdict`(dictionary but with
-only string keys), `sendMessage`, and `cembed`in action.
+This command lets the bot send a message to another channel.
+It uses embeds so you can see `sdict`(dictionary but with only string keys), `sendMessage`, and `cembed`in action.
Trigger type: `Command` Trigger: `bc`
@@ -387,10 +384,9 @@ Trigger type: `Command` Trigger: `bc`
> By: **L-z#7749**
-This command does a good job at using a little bit of everything. Which include but is not limited to, `conditional
-statement`, `assigning values to variable`, `getting command arguments`, `using template code`, and `creating embeds`.
-If you are able to understand everything in this command, you are at a very good place in being able to make advanced
-custom commands.
+This command does a good job at using a little bit of everything.
+Which include but is not limited to, `conditional statement`, `assigning values to variable`, `getting command arguments`, `using template code`, and `creating embeds`.
+If you are able to understand everything in this command, you are at a very good place in being able to make advanced custom commands.
Trigger type: `Command` Trigger: `avatar`
@@ -448,7 +444,8 @@ Trigger type: `Command` Trigger: `avatar`
> By: **Michdi#1602**
-This command is used to replace suggestion bots. You can adapt it to your needs.
+This command is used to replace suggestion bots.
+You can adapt it to your needs.
Trigger type: `Command` Trigger: `suggest`
@@ -477,9 +474,8 @@ Correct usage: `-suggest `
> By: **CHamburr#2591**\
> \***\*Updated by: **Joe\_#2447\*\*
-This command uses the `reFindAllSubmatches` template as well as the `printf` template, and will enlarge custom emotes,
-whether still or animated. This will also work for emotes that are from the servers YAGPDB is not in, as it gets the
-emote file directly from Discord's database.
+This command uses the `reFindAllSubmatches` template as well as the `printf` template, and will enlarge custom emotes, whether still or animated.
+This will also work for emotes that are from the servers YAGPDB is not in, as it gets the emote file directly from Discord's database.
Trigger type: `Command` Trigger: `bigemote`
diff --git a/content/docs/reference/custom-commands-limits.md b/content/docs/reference/custom-commands-limits.md
index ad91c70f..7de448b0 100644
--- a/content/docs/reference/custom-commands-limits.md
+++ b/content/docs/reference/custom-commands-limits.md
@@ -42,14 +42,14 @@ Various limits in YAGPDB custom commands (CC) for smooth functioning of the bot
- **joinStr max string length:** 1000kB
- **sendDM:** 1 call per CC -> counter key "send_dm"
- **sendTemplate/sendTemplateDM:** 3 calls per CC -> counter key "exec_child"
-- **addReactions:** 20 calls per CC -> counter key "add_reaction_trigger". Each reaction added counts towards the
- limit.
-- **addResponseReactions:** 20 calls per CC -> counter key "add_reaction_response". Each reaction added counts towards
- the limit.
-- **addMessageReactions:** 20 calls per CC -> counter key "add_reaction_message". Each reaction added counts towards
- the limit.
-- **deleteMessageReaction:** 10 calls per CC -> counter key "del_reaction_message". Each reaction removed counts towards
- the limit.
+- **addReactions:** 20 calls per CC -> counter key "add_reaction_trigger".
+ Each reaction added counts towards the limit.
+- **addResponseReactions:** 20 calls per CC -> counter key "add_reaction_response".
+ Each reaction added counts towards the limit.
+- **addMessageReactions:** 20 calls per CC -> counter key "add_reaction_message".
+ Each reaction added counts towards the limit.
+- **deleteMessageReaction:** 10 calls per CC -> counter key "del_reaction_message".
+ Each reaction removed counts towards the limit.
- **editChannelName/Topic:** 10 calls per CC -> counter key "edit_channel"
- **regex cache limit:** 10 (this means you cant have more than 10 different regexes on a CC)
- **onlineCount:** 1 call per cc -> counter key "online_users"
diff --git a/content/docs/reference/custom-embeds.md b/content/docs/reference/custom-embeds.md
index f5a34ba8..bf92a321 100644
--- a/content/docs/reference/custom-embeds.md
+++ b/content/docs/reference/custom-embeds.md
@@ -10,15 +10,14 @@ A guide to creating custom embeds in various contexts across YAGPDB.
{{< callout context="danger" title="Danger: Embed Limitations" icon="outline/alert-octagon" >}}
-Embeds have limits, summarized in [Discord channel
-documentation](https://discord.com/developers/docs/resources/channel#embed-object-embed-limits).
+Embeds have limits, summarized in [Discord channel documentation](https://discord.com/developers/docs/resources/channel#embed-object-embed-limits).
{{< /callout >}}
{{< callout context="note" title="Note: Custom Commands use Custom Syntax" icon="outline/info-circle" >}}
-Custom Embeds with the `customembed` command don't work in custom commands. If you want to know how you can use embeds
-in custom commands, scroll down to [Embeds in Custom Commands](#embeds-in-custom-commands).
+Custom Embeds with the `customembed` command don't work in custom commands.
+If you want to know how you can use embeds in custom commands, scroll down to [Embeds in Custom Commands](#embeds-in-custom-commands).
{{< /callout >}}
@@ -39,21 +38,21 @@ YAGPDB accepts embeds in JSON or YAML following the rules of Discord's [Embed Ob
```yaml
title: This is my title
footer:
- text: This is my footer text.
+ text: This is my footer text.
```
-YAML input is formatted as a list of names with associated values for each part of the embed. In this example I start
-with a name (title) and the associated value (This is my title) after a semicolon. On a new line, we have another name
-(footer), this time with another list of name-value pairs as the value. An indent indicates that the name-value pair
-(text: This is ...) is part of the value of the footer.
+YAML input is formatted as a list of names with associated values for each part of the embed.
+In this example I start with a name (title) and the associated value (This is my title) after a semicolon.
+On a new line, we have another name (footer), this time with another list of name-value pairs as the value.
+An indent indicates that the name-value pair (text: This is ...) is part of the value of the footer.
##### The syntax of YAML
-[YAML] has an intuitive, lenient syntax. Most parts of the embed are simple name-value pairs (or nested name-value
-maps like in the footer shown above). New lines separate each pair, unless the next line is indented to indicate that
-that line is the value. Strings (text) can be included as-is without quotes, unless the text contains special characters
-like `:`, in which case single quotes (`'`) or double quotes (`"`) may be used. Double quotes allow backslash-escapes to
-add newlines, double quotes, and more.
+[YAML] has an intuitive, lenient syntax.
+Most parts of the embed are simple name-value pairs (or nested name-value maps like in the footer shown above).
+New lines separate each pair, unless the next line is indented to indicate that that line is the value.
+Strings (text) can be included as-is without quotes, unless the text contains special characters like `:`, in which case single quotes (`'`) or double quotes (`"`) may be used.
+Double quotes allow backslash-escapes to add newlines, double quotes, and more.
[YAML]: https://en.wikipedia.org/wiki/YAML#Syntax
@@ -63,20 +62,23 @@ add newlines, double quotes, and more.
{ "title": "This is my title", "footer": { "text": "This is my footer text." } }
```
-As shown in the example above, I start my object (the embed) with a curly brace. Like YAML, we then have a name (title)
-and the value for that name (This is my title). We separate each name-value pair with a comma. Then we have something
-similar, but with another object as the value. Within that object we have a name-value pair with the same format as the
-title, this time for the footer text. In the end we close the objects (footer and embed) with more curly braces.
+As shown in the example above, I start my object (the embed) with a curly brace.
+Like YAML, we then have a name (title) and the value for that name (This is my title).
+We separate each name-value pair with a comma.
+Then we have something similar, but with another object as the value.
+Within that object we have a name-value pair with the same format as the title, this time for the footer text.
+In the end we close the objects (footer and embed) with more curly braces.
##### The syntax of JSON
-[JSON]'s syntax is also quite simple. Objects start with an opening curly brace (`{`) and end with a closing curly brace
-(`}`). Between these, you can add names and their associated values. Each name-value pair is separated by a comma (`,`).
-Around strings (text) you wrap two quotation marks (`""`), but nothing around integers (whole numbers) or booleans
-(`true` or `false` values). You can play around with this a bit.
+[JSON]'s syntax is also quite simple.
+Objects start with an opening curly brace (`{`) and end with a closing curly brace (`}`).
+Between these, you can add names and their associated values.
+Each name-value pair is separated by a comma (`,`).
+Around strings (text) you wrap two quotation marks (`""`), but nothing around integers (whole numbers) or booleans (`true` or `false` values).
+You can play around with this a bit.
-Some special characters need to be prefixed with a backslash in strings to indicate that they aren't part of the JSON
-syntax:
+Some special characters need to be prefixed with a backslash in strings to indicate that they aren't part of the JSON syntax:
| Special character | Escaped input |
| ------------------ | ------------- |
@@ -95,43 +97,45 @@ syntax:
### Create embeds with a generator
-Creating embeds with a generator can be more difficult if you don't need any difficult features. If you want your embed
-to be super shiny, you can use [an embed generator](https://leovoel.github.io/embed-visualizer/). The customembed
-command only sends an embed, so you'll need to remove everything around it:
+Creating embeds with a generator can be more difficult if you don't need any difficult features.
+If you want your embed to be super shiny, you can use [an embed generator](https://leovoel.github.io/embed-visualizer/).
+The customembed command only sends an embed, so you'll need to remove everything around it:
-````javascript
+```javascript
{
"content": "...",
"embed":
-````
+```
-and the last curly brace (`}`). After this you can copy and paste it after the `ce` command:
+and the last curly brace (`}`).
+After this you can copy and paste it after the `ce` command:

## Embeds in Custom Commands
-Embeds in custom commands are a little more involved. To start off, we'll take a look at this example and break it down:
+Embeds in custom commands are a little more involved.
+To start off, we'll take a look at this example and break it down:
```yag
{{ $embed := cembed "title" "This is my title" "description" "This is my description." }}
{{ sendMessage nil $embed }}
```
-First off, I start creating my embed by defining it in a variable called `embed` in the well-known templating curly
-braces. This makes it a bit clearer as your embed can get difficult to read. After this I start my embed object with
-`cembed` (custom embed) to indicate what the following strings mean. We don't follow the json syntax here and only
-define everything one after the other ("`name`" "`value`" et cetera). Now we use the objects for discord embeds from the
-[developer page](https://discordapp.com/developers/docs/resources/channel#embed-object) again. So far, so good. In the
-end we send our embed with the sendMessage template. `nil` sends it in the same channel, but you could also replace it
-with a channel name or ID (or send the embed with sendDM as a direct message).
+First off, I start creating my embed by defining it in a variable called `embed` in the well-known templating curly braces.
+This makes it a bit clearer as your embed can get difficult to read.
+After this I start my embed object with `cembed` (custom embed) to indicate what the following strings mean.
+We don't follow the json syntax here and only define everything one after the other (" `name`" " `value`" et cetera).
+Now we use the objects for discord embeds from the [developer page](https://discordapp.com/developers/docs/resources/channel#embed-object) again.
+So far, so good.
+In the end we send our embed with the sendMessage template.
+`nil` sends it in the same channel, but you could also replace it with a channel name or ID (or send the embed with sendDM as a direct message).
Next, we'll take a look at this more lavish example:
{{< callout context="note" title="Note: Indentation is Your Friend" icon="outline/info-circle" >}}
-To make your code readable, especially for large embeds, **indents** may be used, as YAGPDB's templating system allows
-this sort of formatting.
+To make your code readable, especially for large embeds, **indents** may be used, as YAGPDB's templating system allows this sort of formatting.
{{< /callout >}}
@@ -175,17 +179,21 @@ this sort of formatting.
{{< /callout >}}
-In this example, we can ignore lines 1 to 5. I'm just defining some variables there which I am later using in my embed.
-One thing to notice is the two ways of getting user's avatar URL for variables `$avatar` and `$botAvatar`. Line 7 starts
-with our already known definition of the embed. Then I start with the first object, the title. Notice how I use `print`
-to join two strings (text snippets) together.
+In this example, we can ignore lines 1 to 5.
+I'm just defining some variables there which I am later using in my embed.
+One thing to notice is the two ways of getting user's avatar URL for variables `$avatar` and `$botAvatar`.
+Line 7 starts with our already known definition of the embed.
+Then I start with the first object, the title.
+Notice how I use `print` to join two strings (text snippets) together.
-Next, we have the description. We can use markdown of Discord in here. After that object, I define the color. The color
-is given as integer and you can convert a hex color to it using
-[BinaryHex Converter](https://www.binaryhexconverter.com/hex-to-decimal-converter), for example.
+Next, we have the description.
+We can use markdown of Discord in here.
+After that object, I define the color.
+The color is given as integer and you can convert a hex color to it using [BinaryHex Converter](https://www.binaryhexconverter.com/hex-to-decimal-converter), for example.
-Up next, I have added some fields. This is a bit more difficult, but doable if you have understood it once. Let's break
-it down in this example:
+Up next, I have added some fields.
+This is a bit more difficult, but doable if you have understood it once.
+Let's break it down in this example:
```yag
"fields" (cslice
@@ -194,20 +202,24 @@ it down in this example:
)
```
-This would add two fields being displayed under each other. If you set inline to true, they would try to get displayed
-next to each other. You can add multiple fields with sdict.
+This would add two fields being displayed under each other.
+If you set inline to true, they would try to get displayed next to each other.
+You can add multiple fields with sdict.
-Following the fields I have added the author. Again the author object is nested and can have up to four fields. For
-this, we use sdict again. I define the name, the url and the icon url for it. The same applies to the avatar and footer.
-In the end I use `.Guild.JoinedAt` as timestamp to display when the first person joined this server and close the
-template. After this we just have to send the embed using `SendMessage` or `SendDM`. Here is our result:
+Following the fields I have added the author.
+Again the author object is nested and can have up to four fields.
+For this, we use sdict again.
+I define the name, the url and the icon url for it.
+The same applies to the avatar and footer.
+In the end I use `.Guild.JoinedAt` as timestamp to display when the first person joined this server and close the template.
+After this we just have to send the embed using `SendMessage` or `SendDM`.
+Here is our result:

### Display an image
-You can display an image by simply pasting the link to it in the response, or by doing it fancy this way
-(make sure to replace the link with your own image):
+You can display an image by simply pasting the link to it in the response, or by doing it fancy this way (make sure to replace the link with your own image):
Trigger type: command trigger: `imageembed`
@@ -224,9 +236,9 @@ Discord uses color decimal. [SpyColor](https://www.spycolor.com) is a good tool
## The `simpleembed` command
-Simple embeds are easier to use than custom embeds as they do not require any knowledge of json. Their downside is that
-they don't support all Discord embed fields from the embed structure, for example fields. You can create a simple embed
-with the `simpleembed` command, `se` for short.
+Simple embeds are easier to use than custom embeds as they do not require any knowledge of json.
+Their downside is that they don't support all Discord embed fields from the embed structure, for example fields.
+You can create a simple embed with the `simpleembed` command, `se` for short.
Simple embeds work with switches, here is a list of them all:
diff --git a/content/docs/reference/custom-interactions.md b/content/docs/reference/custom-interactions.md
index d09b1b01..a015962d 100644
--- a/content/docs/reference/custom-interactions.md
+++ b/content/docs/reference/custom-interactions.md
@@ -6,19 +6,17 @@ description = "Even better than embeds!"
{{< callout context="note" title="Note" icon="outline/info-circle" >}}
-This page is just an overview about the most important core concepts of custom interactions. We have included some code
-samples for quick reference, but this is by no means a complete guide from the grounds up. For an in-depth guide,
-please refer to our [learning resources](/learn/advanced/custom-interactions/introduction).
+This page is just an overview about the most important core concepts of custom interactions.
+We have included some code samples for quick reference, but this is by no means a complete guide from the grounds up.
+For an in-depth guide, please refer to our [learning resources](/learn/advanced/custom-interactions/introduction).
{{< /callout >}}
## The Basics
-Interactions within Discord allow server members to use alternative, built-in features to trigger bots to take action
-other than messages or reactions. These features include builtin buttons, dropdown selection menus, or submitting a
-modal (basically a pop-up form). Within custom commands it is possible to not only create and customize these new
-interactive features, but respond to them as well, opening up new possibilities for ephemeral message responses, modals,
-and more.
+Interactions within Discord allow server members to use alternative, built-in features to trigger bots to take action other than messages or reactions.
+These features include builtin buttons, dropdown selection menus, or submitting a modal (basically a pop-up form).
+Within custom commands it is possible to not only create and customize these new interactive features, but respond to them as well, opening up new possibilities for ephemeral message responses, modals, and more.
### Interaction Lifetime
@@ -26,9 +24,8 @@ An interaction's lifetime starts with the initial *interaction* with an *interac
1. A server member clicks on a *button*, uses a *menu*, or submits a *modal* after filling it out.
2. This interaction is sent to YAGPDB, and becomes available to trigger any custom commands which match it.
-3. Within the triggered custom command(s), YAGPDB should then *respond* once to the interaction, sending a message,
- updating the triggering message, or sending a modal. This may only be done within the CC which was triggered by the
- interaction.
+3. Within the triggered custom command(s), YAGPDB should then *respond* once to the interaction, sending a message, updating the triggering message, or sending a modal.
+ This may only be done within the CC which was triggered by the interaction.
4. (optional) Continue to send followup responses for up to 15 minutes until the interaction token expires.
```mermaid
@@ -46,20 +43,19 @@ H -.-> F
## Custom IDs
-Custom IDs are used to identify the respective element a user interacted with. You use them to trigger custom commands
-with the `message component` or `modal submission` trigger. Custom IDs must be unique for every component attached to
-the message.
+Custom IDs are used to identify the respective element a user interacted with.
+You use them to trigger custom commands with the `message component` or `modal submission` trigger.
+Custom IDs must be unique for every component attached to the message.
## Components
### Buttons
-See also the [Discord API documentation](https://discord.com/developers/docs/components/reference#button) on button
-objects.
+See also the [Discord API documentation](https://discord.com/developers/docs/components/reference#button) on button objects.
-Buttons can be created as either an `sdict` or via [`cbutton`]. In custom commands they can have five different styles,
-listed in the table below. For your convenience, YAGPDB also accepts the style as a string-alias, so you can use
-`"primary"` instead of `1`, `"secondary"` instead of `2`, and so on.
+Buttons can be created as either an `sdict` or via [`cbutton`].
+In custom commands they can have five different styles, listed in the table below.
+For your convenience, YAGPDB also accepts the style as a string-alias, so you can use `"primary"` instead of `1`, `"secondary"` instead of `2`, and so on.
[`cbutton`]: /docs/reference/templates/functions#cbutton
@@ -71,9 +67,8 @@ listed in the table below. For your convenience, YAGPDB also accepts the style a
| 4 | danger | Danger button, red color, used for negative actions. |
| 5 | link | Link button, opens a URL when clicked. |
-A button is structured according to the following table; `label`, `emoji` and `disabled` are optional fields.
-`style` will default to `1` (primary) if not specified. Link style buttons cannot have a custom ID and must have a URL
-specified.
+A button is structured according to the following table; `label`, `emoji` and `disabled` are optional fields. `style` will default to `1` (primary) if not specified.
+Link style buttons cannot have a custom ID and must have a URL specified.
| Field | Description |
| ---------- | ------------------------------------------------------------------------------------------------ |
@@ -96,16 +91,15 @@ The below code will send a message with multiple buttons attached to it.
### Select Menus
-Select menus allow users to select one or more options from a dropdown list. They can be created as either an `sdict` or
-using the [`cmenu`] function.
+Select menus allow users to select one or more options from a dropdown list.
+They can be created as either an `sdict` or using the [`cmenu`] function.
[`cmenu`]: /docs/reference/templates/functions#cmenu
#### Select Menu Types
-Select menus can have one of the types listed in the table below. The `channel` type can be
-further customized to only show certain channel types using the `channel_types` field, which accepts a slice of integers
-representing allowed channel types.
+Select menus can have one of the types listed in the table below.
+The `channel` type can be further customized to only show certain channel types using the `channel_types` field, which accepts a slice of integers representing allowed channel types.
| Type | Description |
| ----------- | ------------------------------------------------------------------------------------ |
@@ -117,8 +111,8 @@ representing allowed channel types.
#### Select Menu Option
-A select menu option for the `text` type has the structure as outlined in the table below. A text menu may not have more
-than 25 options.
+A select menu option for the `text` type has the structure as outlined in the table below.
+A text menu may not have more than 25 options.
| Field | Description |
| ------------ | --------------------------------------------------------------------------------- |
@@ -130,7 +124,7 @@ than 25 options.
#### Default Value Structure
-The user, role, and channel type allow for a slice of `default_values` to be specified. Below is their structure.
+The user, role, and channel type allow for a slice of `default_values` to be specified.
| Field | Description |
| ----- | ------------------------------------------------------------------- |
@@ -139,8 +133,9 @@ The user, role, and channel type allow for a slice of `default_values` to be spe
#### Select Menu Structure
-A select menu is structured according to the table below. The `custom_id` field is required for all select menus. Text
-type menus must have at least one option, while all other types cannot have any options.
+A select menu is structured according to the table below.
+The `custom_id` field is required for all select menus.
+Text type menus must have at least one option, while all other types cannot have any options.
| Field | Description |
| --------------- | ----------------------------------------------------------------------------------------------- |
@@ -154,8 +149,7 @@ type menus must have at least one option, while all other types cannot have any
| options? | A slice of select menu options, as outlined above. |
| placeholder? | An optional placeholder text displayed when no option is selected. |
-Putting it all together, a text select menu with three options, one of which is selected by default, could look
-something like this.
+Putting it all together, a text select menu with three options, one of which is selected by default, could look something like this.
```yag
{{ $menu := cmenu
@@ -171,8 +165,7 @@ something like this.
{{ sendMessage nil (complexMessage "menus" $menu) }}
```
-Similarly, a channel select menu that allows users to select at most two channels, and only allows forum and
-announcement channels could be created with the following code.
+Similarly, a channel select menu that allows users to select at most two channels, and only allows forum and announcement channels could be created with the following code.
```yag
{{ $issuesChannel := "1210135699135926312" }}
@@ -194,9 +187,10 @@ announcement channels could be created with the following code.
## Modals
-Modals can be created as either an `sdict` or a `cmodal`. After being created they are subsequently sent with
-`sendModal`. Sending a modal is a _response_ to an interaction, meaning it can only be sent once after a user clicks a
-button or uses a select menu. You cannot send a modal as a response to a user submitting a modal.
+Modals can be created as either an `sdict` or a `cmodal`.
+After being created they are subsequently sent with `sendModal`.
+Sending a modal is a _response_ to an interaction, meaning it can only be sent once after a user clicks a button or uses a select menu.
+You cannot send a modal as a response to a user submitting a modal.
### Modal Input Fields
@@ -233,9 +227,8 @@ Modals can have multiple text input fields, which allow users to input text in a
## Parsing an Interaction
-Custom Commands with the [Message Component](/docs/custom-commands/commands#component) or [Modal
-Submission](/docs/custom-commands/commands#modal) trigger allow you to take action upon the press of a button, use of a
-select menu, or completion of a modal form. Interaction triggers provide new context data for templating.
+Custom Commands with the [Message Component](/docs/custom-commands/commands#component) or [Modal Submission](/docs/custom-commands/commands#modal) trigger allow you to take action upon the press of a button, use of a select menu, or completion of a modal form.
+Interaction triggers provide new context data for templating.
| **Field** | **Description** |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -246,20 +239,18 @@ select menu, or completion of a modal form. Interaction triggers provide new con
[Interaction object and context data](/docs/reference/templates/syntax-and-data#interaction)
-`.Interaction.Token` must be provided to any [followup](#following-up) functions you decide to use later. If you are
-using these in subsequent script executions, it's a good idea to save this to database when the interaction occurs.
+`.Interaction.Token` must be provided to any [followup](#following-up) functions you decide to use later.
+If you are using these in subsequent script executions, it's a good idea to save this to database when the interaction occurs.
-`.CustomID` can be used to identify which component or modal triggered the command. `.StrippedID` can be used to quickly
-parse out arguments in your custom ID, and use them in your response.
+`.CustomID` can be used to identify which component or modal triggered the command. `.StrippedID` can be used to quickly parse out arguments in your custom ID, and use them in your response.
-`.Values` is used to capture values a user selected in a select menu or submitted to a modal. When creating a select
-menu and defining the options, the `"value"` field for each option defines which values will show up in this slice if
-chosen, in the order the user selected them. A modal's values are simply the values of each field in order.
+`.Values` is used to capture values a user selected in a select menu or submitted to a modal.
+When creating a select menu and defining the options, the `"value"` field for each option defines which values will show up in this slice if chosen, in the order the user selected them.
+A modal's values are simply the values of each field in order.
{{< callout context="note" title="Note: Values Order" icon="outline/info-circle" >}}
-Because the `.Values` slice when interacting with select menus is ordered by the order the user selected the
-options, you generally cannot simply index into the slice; you'll have to search for the value you want to use.
+Because the `.Values` slice when interacting with select menus is ordered by the order the user selected the options, you generally cannot simply index into the slice; you'll have to search for the value you want to use.
{{< /callout >}}
@@ -267,47 +258,45 @@ options, you generally cannot simply index into the slice; you'll have to search
### Initial Response
-While technically not required, responding to an interaction with one of Discord's allotted initial responses is crucial
-if you don't want your users to see an error after interacting. An interaction may be responded to only once.
+While technically not required, responding to an interaction with one of Discord's allotted initial responses is crucial if you don't want your users to see an error after interacting.
+An interaction may be responded to only once.
-You can only respond to an interaction within the custom command triggered by said interaction, with the exception that
-a CC executed with `execCC` by the triggered CC will be able to send initial responses to the triggering interaction as
-well.
+You can only respond to an interaction within the custom command triggered by said interaction, with the exception that a CC executed with `execCC` by the triggered CC will be able to send initial responses to the triggering interaction as well.
Possible initial responses:
-- Output text in your script response field. This text will be sent as an interaction response.
+- Output text in your script response field.
+ This text will be sent as an interaction response.
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
- Use the `sendResponse` function to send a response as soon as the function runs.
- You can also use this to send `embeds` or `complexMessages`.
- You'll need to send a `complexMessage` and pass it `"ephemeral" true` as an argument to send _ephemeral_ messages.
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
- When sending an initial response, `sendResponse` does not need an interaction token, `nil` can be used.
-- Use the `sendModal` function to show the user a modal. You cannot respond to a user submitting a modal by sending them
- another modal.
-- Use the `updateMessage` function to edit the message the command triggered from. This works the same way as editing a
- message, however because it automatically targets the triggering message, the only argument required is the new
- message.
+- Use the `sendModal` function to show the user a modal.
+ You cannot respond to a user submitting a modal by sending them another modal.
+- Use the `updateMessage` function to edit the message the command triggered from.
+ This works the same way as editing a message, however because it automatically targets the triggering message, the only argument required is the new message.
[Interaction Function documentation](/docs/reference/templates/functions#interactions)
### Following Up
-Followups allow you to continue responding to an interaction after the initial response has been made. You can followup
-for up to 15 minutes after the user interacts, and you can follow up as many times as you'd like. Followups require the
-interaction token of the interaction they should be following up on.
+Followups allow you to continue responding to an interaction after the initial response has been made.
+You can followup for up to 15 minutes after the user interacts, and you can follow up as many times as you'd like.
+Followups require the interaction token of the interaction they should be following up on.
Possible followups:
-- Output text in your script response field. This text will be sent as an interaction followup.
+- Output text in your script response field.
+ This text will be sent as an interaction followup.
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
-- Use the `sendResponse` function to send a followup as soon as the function runs. Note that this function morphs into
- sending followups if an initial response has already been made.
+- Use the `sendResponse` function to send a followup as soon as the function runs.
+ Note that this function morphs into sending followups if an initial response has already been made.
- You can also use this to send `embeds` or `complexMessages`.
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
- - It's important to capture the message ID of any
- followups you'll want to edit or retrieve later, especially if you follow up ephemerally. If you follow up
- ephemerally without saving the message ID, you'll never be able to interface with that message again.
+ - It's important to capture the message ID of any followups you'll want to edit or retrieve later, especially if you follow up ephemerally.
+ If you follow up ephemerally without saving the message ID, you'll never be able to interface with that message again.
- Use the `editResponse` function to edit an initial response or a followup message.
- When editing an initial response, the `messageID` argument should be `nil`.
- When editing a followup message, the `messageID` argument is required.
@@ -323,11 +312,12 @@ Possible followups:
## Action Rows
-Action rows are a way to group multiple components together, such as buttons or select menus, into a single row. This
-allows for better organization and layout of interactive elements in a message. Action rows are not a separate type of
-interaction, but rather a structured approach to handling components.
+Action rows are a way to group multiple components together, such as buttons or select menus, into a single row.
+This allows for better organization and layout of interactive elements in a message.
+Action rows are not a separate type of interaction, but rather a structured approach to handling components.
-Action rows are simply a slice of components, which can be buttons or select menus. Consider the following example:
+Action rows are simply a slice of components, which can be buttons or select menus.
+Consider the following example:
```yag
{{ $row1 := cslice (cbutton "label" "Row 1 - Button 1") (cbutton "label" "Row 1 - Button 2") (cbutton "label" "Row 1 - Button 3") (cbutton "label" "Row 1 - Button 4") }}
diff --git a/content/docs/reference/how-to-get-ids.md b/content/docs/reference/how-to-get-ids.md
index f1c26308..dc72aa81 100644
--- a/content/docs/reference/how-to-get-ids.md
+++ b/content/docs/reference/how-to-get-ids.md
@@ -8,15 +8,16 @@ Details on obtaining IDs for users, channels, roles, etc. for use within YAGPDB.
### User IDs
-Can be found by mentioning the user then adding a \ such as `\@YAGPDB.xyz#8760`. Alternatively if you have
-developer mode on, you can right-click and select Copy ID. [How to enable developer mode in Discord][devmode]
+Can be found by mentioning the user then adding a \ such as `\@YAGPDB.xyz#8760`.
+Alternatively if you have developer mode on, you can right-click and select Copy ID.
+[How to enable developer mode in Discord][devmode]
[devmode]: https://support.discordapp.com/hc/en-us/articles/206346498
### Channel IDs
-Can be found by mentioning the channel then adding a \ such as `\#announcements`. Alternatively if you
-have developer mode on, you can right-click on the channel and select Copy ID.
+Can be found by mentioning the channel then adding a \ such as `\#announcements`.
+Alternatively if you have developer mode on, you can right-click on the channel and select Copy ID.
### Role IDs
@@ -24,12 +25,12 @@ Use the `listroles` command.
### Emoji IDs
-If it is a **custom emoji**, adding a \ in front of the emoji such as `\:yag:` will display the name along with the ID
-such as `<:yag:277569741932068864>`. On an Android device remove backslash and enclose `:yag:` inside backticks
-`` `:yag:`. ``
+If it is a **custom emoji**, adding a \ in front of the emoji such as `\:yag:` will display the name along with the ID such as `<:yag:277569741932068864>`.
+On an Android device remove backslash and enclose `:yag:` inside backticks `` `:yag:`. ``
-If it is an **animated emoji**, do the same steps as a normal emoji. If you do not have Discord Nitro, you can have a
-friend or a bot use the emoji and right-click on the emoji to open its link. The ID will be a part of the URL.
+If it is an **animated emoji**, do the same steps as a normal emoji.
+If you do not have Discord Nitro, you can have a friend or a bot use the emoji and right-click on the emoji to open its link.
+The ID will be a part of the URL.
-If it is a **default emoji**, look up the Unicode for the emoji on Google. Note that some of the more customized default
-emojis such as some of the family emojis will not work in any of the YAGPDB commands.
+If it is a **default emoji**, look up the Unicode for the emoji on Google.
+Note that some of the more customized default emojis such as some of the family emojis will not work in any of the YAGPDB commands.
diff --git a/content/docs/reference/regex.md b/content/docs/reference/regex.md
index 274866bc..14c93b42 100644
--- a/content/docs/reference/regex.md
+++ b/content/docs/reference/regex.md
@@ -24,8 +24,8 @@ _As example, this will only match the word "Dinosaur":_ `(Dinosaur)`
#### Don't match
-Using `?:` after opening parenthesis of a capturing group creates a non-capturing group. Useful for example with
-template function `reFindAllSubmatches`.
+Using `?:` after opening parenthesis of a capturing group creates a non-capturing group.
+Useful for example with template function `reFindAllSubmatches`.
_This will not sub-match the words "red, blue, green":_ \
``{{ reFindAllSubmatches `(?:color=)(red|blue|green)` "color=red beautiful" }}``
@@ -35,8 +35,7 @@ To clarify more - it will not show `dateid,` because it's a whole match:\
#### Match A or B
-You may also want to catch multiple options, for that we use a _"Vertical bar"_ or also known as a _"Pipe"_ between
-Linux users.
+You may also want to catch multiple options, for that we use a _"Vertical bar"_ or also known as a _"Pipe"_ between Linux users.
_As example, this will match if either "Cat" or "Dog" is present:_ `(Cat|Dog)`
@@ -66,14 +65,15 @@ This will match every number: `([0-9])`
#### Special Characters
-Sometimes you have to use special characters but it may cause conflicts. In this case, you will have to use an escape
-character.
+Sometimes you have to use special characters but it may cause conflicts.
+In this case, you will have to use an escape character.
For example, this is a star that doesn't interfere with other matches `\*`.
## Understanding Regex
-If you still do not know what Regex are or want to know more. Check out the cheat sheet on the site below.
+If you still do not know what Regex are or want to know more.
+Check out the cheat sheet on the site below.
[computerhope.com](https://www.computerhope.com/jargon/r/regex.htm)
diff --git a/content/docs/reference/templates/functions.md b/content/docs/reference/templates/functions.md
index 8b13f2d5..07abed7a 100644
--- a/content/docs/reference/templates/functions.md
+++ b/content/docs/reference/templates/functions.md
@@ -4,8 +4,8 @@ weight = 1012
description = "A list of all available functions in YAGPDB's custom command templates."
+++
-Functions are used to take action within template scripts. Some functions accept arguments, and some functions return
-values you can send in your response or use as arguments for other functions.
+Functions are used to take action within template scripts.
+Some functions accept arguments, and some functions return values you can send in your response or use as arguments for other functions.
---
@@ -25,7 +25,8 @@ Unless specified otherwise, these functions accept an ID, name, or `nil` for the
{{ addThreadMember }}
```
-Adds a member to an existing thread. Does nothing if either argument is invalid.
+Adds a member to an existing thread.
+Does nothing if either argument is invalid.
#### closeThread
@@ -33,9 +34,11 @@ Adds a member to an existing thread. Does nothing if either argument is invalid.
{{ closeThread }}
```
-Closes or locks the given thread. You cannot lock a closed thread, but you can close a locked thread.
+Closes or locks the given thread.
+You cannot lock a closed thread, but you can close a locked thread.
-- `lock`: whether to lock the thread instead. Default `false`.
+- `lock`: whether to lock the thread instead.
+ Default `false`.
#### createForumPost
@@ -43,14 +46,20 @@ Closes or locks the given thread. You cannot lock a closed thread, but you can c
{{ $post := createForumPost [values] }}
```
-Creates a new forum post. Returns a channel object on success.
+Creates a new forum post.
+Returns a channel object on success.
- `channel`: the forum channel to post to.
-- `name`: The post title. May not be empty. Must be a string.
-- `content`: the initial message's content; may be a string, an embed, or a complex message. May not be empty.
-- `values` (optional): Additional options for the post. May include:
+- `name`: The post title.
+ May not be empty.
+ Must be a string.
+- `content`: the initial message's content; may be a string, an embed, or a complex message.
+ May not be empty.
+- `values` (optional): Additional options for the post.
+ May include:
- `"slowmode"`: The thread's slowmode in seconds.
- - `"tags"`: One or more forum tag name or ID. Duplicate and invalid tags are ignored.
+ - `"tags"`: One or more forum tag name or ID.
+ Duplicate and invalid tags are ignored.
#### createThread
@@ -58,20 +67,22 @@ Creates a new forum post. Returns a channel object on success.
{{ $thread := createThread [private] [auto_archive_duration] [invitable] }}
```
-Creates a new thread in the specified channel. Returns a channel object on success.
+Creates a new thread in the specified channel.
+Returns a channel object on success.
- `channel`: the parent channel to create the thread in.
- `message`: either `nil` to create a channel thread, or a message ID to create a message thread.
-- `private`: whether the thread is private. Default `false`.
-- `auto_archive_duration`: how long the thread will show in the channel list after inactivity.
- Valid values are 60, 1440, 4320, and 10080 minutes. Defaults to 10080 (7 days).
+- `private`: whether the thread is private.
+ Default `false`.
+- `auto_archive_duration`: how long the thread will show in the channel list after inactivity.
+ Valid values are 60, 1440, 4320, and 10080 minutes.
+ Defaults to 10080 (7 days).
- `invitable`: whether non-moderators can add other members to the thread. (true/false)
Note: There is no functional difference between a channel thread and a message thread.
-Because the optional arguments are positional, you must provide the preceding ones if you wish to override a later
-option. Consider the following example to create a public thread in the current channel with no message reference that
-is archived after an hour and allows non-moderators to add others:
+Because the optional arguments are positional, you must provide the preceding ones if you wish to override a later option.
+Consider the following example to create a public thread in the current channel with no message reference that is archived after an hour and allows non-moderators to add others:
```yag
{{ createThread nil nil "new thread" false 60 true }}
@@ -107,7 +118,8 @@ Use whichever function is semantically more meaningful in the context of your cu
Edits the name of the given channel.
-- `newName`: the new name for the channel. Must be a string.
+- `newName`: the new name for the channel.
+ Must be a string.
This function is, together with [editChannelTopic](#editchanneltopic), limited to 10 calls per custom command execution.
In addition to this, Discord limits the number of channel modifications to 2 per 10 minutes.
@@ -120,7 +132,9 @@ In addition to this, Discord limits the number of channel modifications to 2 per
Edits the topic of the given channel.
-- `newTopic`: the channel's new topic. Must be a string. Discord markdown is supported.
+- `newTopic`: the channel's new topic.
+ Must be a string.
+ Discord markdown is supported.
This function is, together with [editChannelName](#editchannelname), limited to 10 calls per custom command execution.
In addition to this, Discord limits the number of channel modifications to 2 per 10 minutes.
@@ -135,9 +149,11 @@ Edits the specified thread.
- `opts`: a sdict containing the thread parameters to edit, supporting the following keys (all optional):
- `slowmode`: the thread's slowmode in seconds.
- - `tags`: one or more forum tag name or ID. Duplicate and invalid tags are ignored.
+ - `tags`: one or more forum tag name or ID.
+ Duplicate and invalid tags are ignored.
- `auto_archive_duration`: how long the thread will show in the channel list after inactivity.
- - `invitable`: whether non-moderators can add other members to the thread. Defaults to false.
+ - `invitable`: whether non-moderators can add other members to the thread.
+ Defaults to false.
#### getChannelOrThread
@@ -163,7 +179,8 @@ Rate-limited to 2 (premium: 4) calls per custom command execution.
{{ $channel := getChannel }}
```
-Returns the full channel object for the given channel. Will not work for threads.
+Returns the full channel object for the given channel.
+Will not work for threads.
#### getPinCount
@@ -179,7 +196,8 @@ Returns the number of pinned messages in given channel.
{{ $thread := getThread }}
```
-Returns the full thread object for the given thread. Will not work for channels.
+Returns the full thread object for the given thread.
+Will not work for channels.
#### openThread
@@ -244,8 +262,10 @@ The argument must be one of the following:
- `userID`: count entries for the given user ID.
- `pattern`: count only entries with keys matching the given pattern.
- `query`: an sdict with the following (all optional) keys:
- - `userID`: only count entries with a matching UserID field. Defaults to all UserIDs.
- - `pattern`: only counts entries with keys matching the given pattern. Defaults to all keys.
+ - `userID`: only count entries with a matching UserID field.
+ Defaults to all UserIDs.
+ - `pattern`: only counts entries with keys matching the given pattern.
+ Defaults to all keys.
#### dbDelByID
@@ -261,12 +281,16 @@ Deletes a database entry under the given `userID` by its `ID`.
{{ $numDeleted := dbDelMultiple }}
```
-Deletes up to `amount` entries from the database matching the given criteria. Returns the number of deleted entries.
+Deletes up to `amount` entries from the database matching the given criteria.
+Returns the number of deleted entries.
- `query`: an sdict with the following (all optional) keys:
- - `userID`: only delete entries with a matching UserID field. Defaults to all UserIDs.
- - `pattern`: only delete entries with keys matching the given pattern. Defaults to all keys.
- - `reverse`: whether to delete entries with the lowest value first. Default is `false` (highest value first).
+ - `userID`: only delete entries with a matching UserID field.
+ Defaults to all UserIDs.
+ - `pattern`: only delete entries with keys matching the given pattern.
+ Defaults to all keys.
+ - `reverse`: whether to delete entries with the lowest value first.
+ Default is `false` (highest value first).
- `amount`: the maximum number of entries to delete, capped at 100.
- `nSkip`: the number of entries to skip before deleting.
@@ -322,9 +346,11 @@ Returns the specified database entry.
{{ $newValue := dbIncr }}
```
-Increments the value of the specified database entry by `incrBy`. Returns the new value as a floating-point number.
+Increments the value of the specified database entry by `incrBy`.
+Returns the new value as a floating-point number.
-- `incrBy`: the amount to increment the value by. Must be a valid number.
+- `incrBy`: the amount to increment the value by.
+ Must be a valid number.
#### dbRank
@@ -337,7 +363,8 @@ Returns the rank of the specified entry in the set of entries as defined by `que
- `query`: an sdict with the following (all optional) keys:
- `userID`: only include entries with the given user ID.
- `pattern`: only include entries with keys matching the given pattern.
- - `reverse`: if `true`, entries with lower values have higher ranks. Default is `false`.
+ - `reverse`: if `true`, entries with lower values have higher ranks.
+ Default is `false`.
#### dbSetExpire
@@ -371,11 +398,11 @@ Returns up to `amount` entries from the database, sorted in descending order by
{{< callout context="caution" title="Caution: Storing Numerical Values" icon="outline/alert-triangle" >}}
-Numerical values are stored as floating-point numbers in the database; large numbers such as user IDs will lose
-precision. To avoid this, convert them to a string before writing to the database.
+Numerical values are stored as floating-point numbers in the database; large numbers such as user IDs will lose precision.
+To avoid this, convert them to a string before writing to the database.
-Numerical `dict` keys are retrieved as an `int64`, therefore you'd have to write
-`{{ $dict.Get (toInt64 N)}}` to retrieve the value associated with the numerical key `N`.
+Because numerical `dict` keys are retrieved as an `int64`, you have to first convert to `int64` when retrieving such values.
+So, to retrieve the value associated with the numerical key `N`: `{{ $dict.Get (toInt64 N)}}`.
{{< /callout >}}
@@ -389,8 +416,7 @@ Numerical `dict` keys are retrieved as an `int64`, therefore you'd have to write
{{ $decoded := decodeBase64 }}
```
-Undoes the transformation performed by [`encodeBase64`](#encodebase64), converting the base64-encoded `string` back to
-its original form.
+Undoes the transformation performed by [`encodeBase64`](#encodebase64), converting the base64-encoded `string` back to its original form.
#### encodeBase64
@@ -414,7 +440,8 @@ Generates the SHA256 hash of the input string.
{{ $json := json [indent] }}
```
-Encodes `value` as JSON. If the `indent` flag is `true`, the output is pretty-printed with appropriate indentation.
+Encodes `value` as JSON.
+If the `indent` flag is `true`, the output is pretty-printed with appropriate indentation.
#### jsonToSdict
@@ -430,8 +457,7 @@ Parses the JSON-encoded data into a string-dictionary, returning an error if the
{{ $result := urlescape }}
```
-Escapes the input `string` such that it can be safely placed inside a URL path segment, replacing special characters
-(including `/`) with `%XX` sequences as needed.
+Escapes the input `string` such that it can be safely placed inside a URL path segment, replacing special characters (including `/`) with `%XX` sequences as needed.
#### urlunescape
@@ -439,8 +465,7 @@ Escapes the input `string` such that it can be safely placed inside a URL path s
{{ $result := urlunescape }}
```
-Undos the transformation performed by [`urlescape`](#urlescape), converting encoded substrings of the form `%AB` to the
-byte `0xAB`.
+Undos the transformation performed by [`urlescape`](#urlescape), converting encoded substrings of the form `%AB` to the byte `0xAB`.
#### urlquery
@@ -448,8 +473,7 @@ byte `0xAB`.
{{ $result := urlquery }}
```
-Returns the escaped value of the textual representation of the arguments in a form suitable for embedding in a URL
-query.
+Returns the escaped value of the textual representation of the arguments in a form suitable for embedding in a URL query.
---
@@ -474,13 +498,14 @@ Cancels a previously scheduled custom command execution using [scheduleUniqueCC]
Executes another custom command specified by `ccID`.
- `ccID`: the ID of the custom command to execute.
-- `channel`: the channel to execute the custom command in. May be `nil`, a channel ID, or a channel name.
+- `channel`: the channel to execute the custom command in.
+ May be `nil`, a channel ID, or a channel name.
- `delay`: the delay in seconds before executing the custom command.
- `data`: some arbitrary data to pass to the executed custom command.
Calling `execCC` with 0 delay sets `.StackDepth` to the current recursion depth and limits it to 2.
-`execCC` is rate-limited strictly to a maximum of 10 delayed custom commands executed per channel per minute. Executions
-beyond this number will be dropped.
+`execCC` is rate-limited strictly to a maximum of 10 delayed custom commands executed per channel per minute.
+Executions beyond this number will be dropped.
##### Example
@@ -505,7 +530,8 @@ The following example showcases a custom command executing itself.
Schedules a custom command execution to occur in the future, identified by `key`.
- `ccID`: the ID of the custom command to execute.
-- `channel`: the channel to execute the custom command in. May be `nil`, a channel ID, or a channel name.
+- `channel`: the channel to execute the custom command in.
+ May be `nil`, a channel ID, or a channel name.
- `delay`: the delay in seconds before executing the custom command.
- `key`: a unique key to identify the scheduled custom command.
- `data`: some arbitrary data to pass to the executed custom command.
@@ -516,8 +542,8 @@ To cancel such a scheduled custom command before it runs, use [cancelScheduledUn
## Interactions
-Use of interactions within YAGPDB is an advanced topic; the documentation should be used only as reference. To learn
-about using interactions, [see here](/docs/reference/custom-interactions).
+Use of interactions within YAGPDB is an advanced topic; the documentation should be used only as reference.
+To learn about using interactions, [see here](/docs/reference/custom-interactions).
### Interaction Responses
@@ -572,7 +598,8 @@ Alternatively, you can create a modal object using the [`cmodal`](#cmodal) funct
Edits the message on which the button, select menu, or modal was triggered on.
-- `newMessage`: the new message content. May be a string, an embed, or a complex message.
+- `newMessage`: the new message content.
+ May be a string, an embed, or a complex message.
##### Example
@@ -642,9 +669,8 @@ Same as [editResponse](#editresponse), plus it does not escape mentions.
#### Interaction Response/Followup Hybrids
-Hybrid functions will send an interaction response if the interaction has not already been responded to, otherwise
-they will send the equivalent followup function. See [editResponse](#editresponse) for an example using
-`sendResponse*` functions.
+Hybrid functions will send an interaction response if the interaction has not already been responded to, otherwise they will send the equivalent followup function.
+See [editResponse](#editresponse) for an example using `sendResponse*` functions.
#### sendResponse
@@ -652,7 +678,8 @@ they will send the equivalent followup function. See [editResponse](#editrespons
{{ sendResponse }}
```
-Sends a message in response to an interaction. Supports the `ephemeral` flag in `complexMessage`.
+Sends a message in response to an interaction.
+Supports the `ephemeral` flag in `complexMessage`.
#### sendResponseNoEscape
@@ -686,11 +713,11 @@ Same as [sendResponse](#sendresponse), but also returns the message ID.
{{ $button := cbutton "list of button values" }}
```
-Creates a [button object](https://discord.com/developers/docs/interactions/message-components#button-object) for use in
-interactions.
+Creates a [button object](https://discord.com/developers/docs/interactions/message-components#button-object) for use in interactions.
-A link style button _must_ have a URL and may not have a Custom ID. All other styles _must_ have a Custom ID and cannot
-have a URL. All buttons must have either a label or an emoji.
+A link style button _must_ have a URL and may not have a Custom ID.
+All other styles _must_ have a Custom ID and cannot have a URL.
+All buttons must have either a label or an emoji.
##### Example
@@ -706,11 +733,10 @@ have a URL. All buttons must have either a label or an emoji.
{{ $menu := cmenu "list of select menu values" }}
```
-Creates a [select menu object](https://discord.com/developers/docs/interactions/message-components#select-menu-object)
-for use in interactions.
+Creates a [select menu object](https://discord.com/developers/docs/interactions/message-components#select-menu-object) for use in interactions.
-The type should be provided as a string: `"text"`, `"user"`, `"role"`, `"mentionable"`, or `"channel"`. Text type menus
-_must_ have `options`, while all other types cannot.
+The type should be provided as a string: `"text"`, `"user"`, `"role"`, `"mentionable"`, or `"channel"`.
+Text type menus _must_ have `options`, while all other types cannot.
##### Example
@@ -734,7 +760,8 @@ _must_ have `options`, while all other types cannot.
{{ $modal := cmodal "list of modal values" }}
```
-Creates a [modal object][modals] for use in interactions. See [`sendModal`](#sendmodal) for more detail.
+Creates a [modal object][modals] for use in interactions.
+See [`sendModal`](#sendmodal) for more detail.
[modals]: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
@@ -748,10 +775,10 @@ Deletes the specified response or follow-up message.
- `interactionToken`: a valid interaction token or `nil` for the triggering interaction.
- `messageID`: valid message ID of a follow-up, or `nil` for the original interaction response.
-- `delay`: an optional delay in seconds, max 10 seconds. Default: 10 seconds.
+- `delay`: an optional delay in seconds, max 10 seconds.
+ Default: 10 seconds.
-If you require a delay of more than 10 seconds, consider using `execCC` for deletion of an ephemeral response, or
-`deleteMessage` to delete a regular interaction response.
+If you require a delay of more than 10 seconds, consider using `execCC` for deletion of an ephemeral response, or `deleteMessage` to delete a regular interaction response.
#### ephemeralResponse
@@ -759,8 +786,9 @@ If you require a delay of more than 10 seconds, consider using `execCC` for dele
{{ ephemeralResponse }}
```
-Tells the bot to send the response text as an ephemeral message. Only works when triggered by an interaction. Works on
-responses and follow-ups.
+Tells the bot to send the response text as an ephemeral message.
+Only works when triggered by an interaction.
+Works on responses and follow-ups.
##### Example
@@ -776,15 +804,14 @@ This text is invisible to others!
{{ $response := getResponse }}
```
-Returns the response or follow-up with the specified message ID belonging to the given interaction as a [message
-object](/docs/reference/templates/syntax-and-data#message). Is also valid for ephemeral messages.
+Returns the response or follow-up with the specified message ID belonging to the given interaction as a [message object](/docs/reference/templates/syntax-and-data#message).
+Is also valid for ephemeral messages.
---
## Component V2
-Components V2 provides a new way to create interactive and visually appealing message layouts in Discord applications,
-making it easier to control message formatting and user interaction while maintaining line length under 120 characters.
+Components V2 provides a new way to create interactive and visually appealing message layouts in Discord applications, making it easier to control message formatting and user interaction while maintaining line length under 120 characters.
### componentBuilder
@@ -816,13 +843,19 @@ All keys are optional, but the Discord API will reject completey empty messages,
- `separator`: Adds spacing between components with the following keys:
- `true`: large separator
- `false` or `nil`: small separator
-- `container`: Top-level layout. Containers offer the ability to visually encapsulate a collection of components,
- and have an optional customizable accent color bar. Contains the following keys:
+- `container`: Top-level layout.
+ Containers offer the ability to visually encapsulate a collection of components,
+and have an optional customizable accent color bar.
+
+Contains the following keys:
+
- `components`: A [componentBuilder](#componentbuilder) or a slice thereof.
- `color`: hex accent color (optional).
- `spoiler`: hides content until revealed (optional).
-- `buttons`: Interactive [buttons](#cbutton) users can click. Can be single or multiple.
-- `menus`: Interactive [menus](#cmenu)s users can select from. Can be single or multiple.
+- `buttons`: Interactive [buttons](#cbutton) users can click.
+ Can be single or multiple.
+- `menus`: Interactive [menus](#cmenu)s users can select from.
+ Can be single or multiple.
- `interactive_components`: Mix of buttons and menus, auto-distributed.
- `allowed_mentions`: A sdict with the following keys:
- `users`: A slice of user IDs.
@@ -838,8 +871,7 @@ All keys are optional, but the Discord API will reject completey empty messages,
### Component Builder Functions
The `ComponentBuilder` simplifies building Discord's V2 components, allowing complex layouts to be built incrementally.
-It provides methods for constructing, manipulating, and exporting components in a format Discord understands,
-ensuring line length doesn't exceed 120 characters.
+It provides methods for constructing, manipulating, and exporting components in a format Discord understands, ensuring line length doesn't exceed 120 characters.
#### ComponentBuilder.Add
@@ -903,7 +935,8 @@ Returns the absolute value of the provided number.
{{ $sum := add x y [...] }}
```
-Returns the sum of the provided numbers. Detects the first number's type and performs the operation accordingly.
+Returns the sum of the provided numbers.
+Detects the first number's type and performs the operation accordingly.
#### bitwiseAnd
@@ -975,7 +1008,8 @@ Returns the cube root of the provided number.
{{ $result := div x y [...] }}
```
-Performs division on the provided numbers. Detects the first number's type and performs the operation accordingly.
+Performs division on the provided numbers.
+Detects the first number's type and performs the operation accordingly.
If you need a floating-point number as a result of integer division, use [fdiv](#fdiv).
#### fdiv
@@ -992,7 +1026,8 @@ Special case of [div](#div); always returns a floating-point number as result.
{{ $result := log x [base] }}
```
-Returns the logarithm of X with the given base. If no base is provided, the natural logarithm is used.
+Returns the logarithm of X with the given base.
+If no base is provided, the natural logarithm is used.
#### mathConst
@@ -1000,7 +1035,8 @@ Returns the logarithm of X with the given base. If no base is provided, the natu
{{ $result := mathConst "constant" }}
```
-Returns the value of the specified math constant. See the [math constants list](https://pkg.go.dev/math#pkg-constants).
+Returns the value of the specified math constant.
+See the [math constants list](https://pkg.go.dev/math#pkg-constants).
#### max
@@ -1026,8 +1062,8 @@ Returns the smaller of the two provided numbers.
Returns the floating-point remainder of the division of X by Y.
-Takes the sign of X, so `mod -5 3` results in `-2`, not `1`. To ensure a non-negative result, use `mod` twice:
-`{{ mod (add (mod x y) y) y }}`.
+Takes the sign of X, so `mod -5 3` results in `-2`, not `1`.
+To ensure a non-negative result, use `mod` twice: `{{ mod (add (mod x y) y) y }}`.
#### mult
@@ -1035,7 +1071,8 @@ Takes the sign of X, so `mod -5 3` results in `-2`, not `1`. To ensure a non-neg
{{ $result := mult x y [...] }}
```
-Performs multiplication on the provided numbers. Detects the first number's type and returns the result accordingly.
+Performs multiplication on the provided numbers.
+Detects the first number's type and returns the result accordingly.
#### pow
@@ -1060,7 +1097,8 @@ That is, the result is always greater than or equal to `start` and strictly less
{{ $result := round x }}
```
-Returns the nearest integer to X as float. Normal rounding rules apply.
+Returns the nearest integer to X as float.
+Normal rounding rules apply.
#### roundCeil
@@ -1068,7 +1106,8 @@ Returns the nearest integer to X as float. Normal rounding rules apply.
{{ $result := roundCeil x }}
```
-Returns the smallest integer greater than or equal to X. Put simply, always round up.
+Returns the smallest integer greater than or equal to X.
+Put simply, always round up.
#### roundEven
@@ -1084,7 +1123,8 @@ Returns the nearest integer to X, rounding ties (x.5) to the nearest even intege
{{ $result := roundFloor x }}
```
-Returns the largest integer less than or equal to X. Put simply, always round down.
+Returns the largest integer less than or equal to X.
+Put simply, always round down.
#### sqrt
@@ -1100,7 +1140,8 @@ Returns the square root of X as a floating-point number.
{{ $result := sub x y [...] }}
```
-Subtracts the provided numbers from each other. Detects the first number's type and returns the result accordingly.
+Subtracts the provided numbers from each other.
+Detects the first number's type and returns the result accordingly.
---
@@ -1112,8 +1153,9 @@ Subtracts the provided numbers from each other. Detects the first number's type
{{ editNickname "newNick" }}
```
-Edits the nickname of the member who triggered the command. The bot must have the `MANAGE_NICKNAMES` permission and be
-higher in the role hierarchy than the member. The bot cannot change the nickname of the server owner.
+Edits the nickname of the member who triggered the command.
+The bot must have the `MANAGE_NICKNAMES` permission and be higher in the role hierarchy than the member.
+The bot cannot change the nickname of the server owner.
#### getMember
@@ -1143,9 +1185,7 @@ Returns the permissions of the specified member in the given channel as a [permi
##### Example
-To calculate the permission in a channel other than the current channel, for which we could just use the
-[hasPermissions](#haspermissions) or [targetHasPermissions](#targethaspermissions) function, we will have to use bitwise
-operations:
+To calculate the permission in a channel other than the current channel, for which we could just use the [hasPermissions](#haspermissions) or [targetHasPermissions](#targethaspermissions) function, we will have to use bitwise operations:
```yag
{{ $perms := getTargetPermissionsIn .User.ID $someChannel }}
@@ -1196,8 +1236,8 @@ Returns whether the specified member has the specified permission bit.
## Mentions
-Certain mentions are escaped by default, such that they don't ping. These functions help you actually _pinging_ these
-special mentions.
+Certain mentions are escaped by default, such that they don't ping.
+These functions help you actually _pinging_ these special mentions.
#### mentionEveryone
@@ -1237,7 +1277,8 @@ Mentions the given role without escaping it.
{{ mentionRoleName }}
```
-Mentions the role with the given name without escaping it. Searches for first case-insensitive match.
+Mentions the role with the given name without escaping it.
+Searches for first case-insensitive match.
Prefer [mentionRoleID](#mentionroleid), as IDs are guaranteed to be unique and do not change with role edits.
@@ -1253,10 +1294,12 @@ Prefer [mentionRoleID](#mentionroleid), as IDs are guaranteed to be unique and d
Adds reactions to a message with the given ID.
-- `emojis...`: a list of emojis to add as reactions. May also be a slice of emojis.
+- `emojis...`: a list of emojis to add as reactions.
+ May also be a slice of emojis.
-Default emojis are best used in the Unicode format for these purposes. Custom emojis follow a specific format in these
-functions. Please see the example below.
+Default emojis are best used in the Unicode format for these purposes.
+Custom emojis follow a specific format in these functions.
+Please see the example below.
##### Example
@@ -1272,7 +1315,8 @@ functions. Please see the example below.
Adds reactions to the message that triggered the command.
-- `emojis...`: a list of emojis to add as reactions. May also be a slice of emojis.
+- `emojis...`: a list of emojis to add as reactions.
+ May also be a slice of emojis.
#### addResponseReactions
@@ -1282,10 +1326,10 @@ Adds reactions to the message that triggered the command.
Adds reactions to the response message.
-- `emojis...`: a list of emojis to add as reactions. May also be a slice of emojis.
+- `emojis...`: a list of emojis to add as reactions.
+ May also be a slice of emojis.
-Note that a message sent via [sendMessage](#sendmessage) is not the response---use
-[addMessageReactions](#addmessagereactions) for that.
+Note that a message sent via [sendMessage](#sendmessage) is not the response---use [addMessageReactions](#addmessagereactions) for that.
#### complexMessageEdit
@@ -1296,7 +1340,8 @@ Note that a message sent via [sendMessage](#sendmessage) is not the response---u
Creates a complex message object for use in [editMessage](#editmessage) or [editMessageNoEscape](#editmessagenoescape).
- `allowed_mentions`: an sdict with the following keys:
- - `parse`: a slice of accepted values for mentions. May include `users`, `roles`, and `everyone`.
+ - `parse`: a slice of accepted values for mentions.
+ May include `users`, `roles`, and `everyone`.
- `users`: a slice of user IDs to mention.
- `roles`: a slice of role IDs to mention.
- `replied_user`: whether to mention the replied user.
@@ -1304,10 +1349,11 @@ Creates a complex message object for use in [editMessage](#editmessage) or [edit
- `embed`: an embed object or a slice of up to 10 embed objects.
- `silent`: whether to suppress push and desktop notifications.
- `suppress_embeds`: whether to suppress embeds in the message.
-- `is_components_v2`: whether the message uses components v2. Irreversibly switches the message to use components v2.
+- `is_components_v2`: whether the message uses components v2.
+ Irreversibly switches the message to use components v2.
-All of these keys are optional, but providing none of them will have no effect. See [complexMessage](#complexmessage)
-for an example.
+All of these keys are optional, but providing none of them will have no effect.
+See [complexMessage](#complexmessage) for an example.
Setting `suppress_embeds` to `false` on a message with already suppressed embeds will not re-enable them.
@@ -1320,7 +1366,8 @@ Setting `suppress_embeds` to `false` on a message with already suppressed embeds
Creates a complex message object for use in [sendMessage](#sendmessage) functions.
- `allowed_mentions`: an sdict with the following keys:
- - `parse`: a slice of accepted values for mentions. May include `users`, `roles`, and `everyone`.
+ - `parse`: a slice of accepted values for mentions.
+ May include `users`, `roles`, and `everyone`.
- `users`: a slice of user IDs to mention.
- `roles`: a slice of role IDs to mention.
- `replied_user`: whether to mention the replied user.
@@ -1335,14 +1382,15 @@ Creates a complex message object for use in [sendMessage](#sendmessage) function
- `sticker`: single sticker ID or a slice of sticker IDs
- `forward`: an sdict containing `channel` and `message` keys specifying the message to forward
- `suppress_embeds`: whether to suppress embeds in the message.
-- `is_components_v2`: whether the message uses components v2. Irreversibly switches the message to use components v2.
+- `is_components_v2`: whether the message uses components v2.
+ Irreversibly switches the message to use components v2.
All of these keys are optional, but providing an empty content, file, or no embeds will result in no message being sent.
##### Example
-The following example will output a message with an embed, some content, and a file attachment. It will also reply to
-the triggering message and ping the author of that message, but suppress the resulting notification.
+The following example will output a message with an embed, some content, and a file attachment.
+It will also reply to the triggering message and ping the author of that message, but suppress the resulting notification.
```yag
{{ $message := complexMessage
@@ -1398,7 +1446,9 @@ Example of a message forward:
Deletes all reactions from a message, optionally constrained to specific emojis.
-- `emojis`: the emojis to delete. May also be a slice. Not providing this argument will delete any and all reactions.
+- `emojis`: the emojis to delete.
+ May also be a slice.
+ Not providing this argument will delete any and all reactions.
#### deleteMessageReaction
@@ -1409,7 +1459,8 @@ Deletes all reactions from a message, optionally constrained to specific emojis.
Deletes a specific user's reaction from a message.
- `userID`: the ID of the user whose reaction to delete.
-- `emojis...`: the emojis to delete. May also be a slice.
+- `emojis...`: the emojis to delete.
+ May also be a slice.
#### deleteMessage
@@ -1419,7 +1470,9 @@ Deletes a specific user's reaction from a message.
Deletes the specified message.
-- `delay`: an optional delay in seconds to delete the message after. Defaults to 10 seconds. Max 86400 seconds (1 day).
+- `delay`: an optional delay in seconds to delete the message after.
+ Defaults to 10 seconds.
+ Max 86400 seconds (1 day).
#### deleteResponse
@@ -1429,7 +1482,9 @@ Deletes the specified message.
Deletes the response message.
-- `delay`: an optional delay in seconds to delete after. Defaults to 10 seconds. Max 86400 seconds (1 day).
+- `delay`: an optional delay in seconds to delete after.
+ Defaults to 10 seconds.
+ Max 86400 seconds (1 day).
#### deleteTrigger
@@ -1439,7 +1494,9 @@ Deletes the response message.
Deletes the triggering message.
-- `delay`: an optional delay in seconds to delete after. Defaults to 10 seconds. Max 86400 seconds (1 day).
+- `delay`: an optional delay in seconds to delete after.
+ Defaults to 10 seconds.
+ Max 86400 seconds (1 day).
#### editMessageNoEscape
@@ -1449,8 +1506,8 @@ Deletes the triggering message.
Edits the given message without escaping mentions.
-- `newMessageContent`: the new content for the message. May also be the result from
- [complexMessageEdit](#complexmessageedit).
+- `newMessageContent`: the new content for the message.
+ May also be the result from [complexMessageEdit](#complexmessageedit).
#### editMessage
@@ -1460,8 +1517,8 @@ Edits the given message without escaping mentions.
Edits the given message with escaping mentions.
-- `newMessageContent`: the new content for the message. May also be the result from
- [complexMessageEdit](#complexmessageedit).
+- `newMessageContent`: the new content for the message.
+ May also be the result from [complexMessageEdit](#complexmessageedit).
#### getMessage
@@ -1469,8 +1526,7 @@ Edits the given message with escaping mentions.
{{ $message := getMessage }}
```
-Returns the [message object](/docs/reference/templates/syntax-and-data#message) for the given message ID in the
-specified channel.
+Returns the [message object](/docs/reference/templates/syntax-and-data#message) for the given message ID in the specified channel.
#### pinMessage
@@ -1506,7 +1562,8 @@ For this to work, the custom command must be running in such an announcement cha
Sends a direct message to the triggering user.
-- `message`: the message to send. May also be the result from a [complexMessage](#complexmessage) call.
+- `message`: the message to send.
+ May also be the result from a [complexMessage](#complexmessage) call.
#### sendMessageNoEscapeRetID
@@ -1540,7 +1597,8 @@ Same as [sendMessage](#sendmessage), but also returns the message ID.
Sends a message in the specified channel.
-- `message`: the message to send. May also be the result from a [complexMessage](#complexmessage) call.
+- `message`: the message to send.
+ May also be the result from a [complexMessage](#complexmessage) call.
#### unpinMessage
@@ -1560,8 +1618,7 @@ Unpins the specified message.
{{ $result := reFind }}
```
-Returns the first match of the regular expression `regex` in `text`, or the empty string if the pattern did not match
-anywhere.
+Returns the first match of the regular expression `regex` in `text`, or the empty string if the pattern did not match anywhere.
#### reFindAll
@@ -1569,8 +1626,8 @@ anywhere.
{{ $result := reFindAll [count] }}
```
-Returns a slice of successive matches of `regex` in `text`. If `count` is provided, the number of matches is limited to
-that amount; otherwise, all matches are returned.
+Returns a slice of successive matches of `regex` in `text`.
+If `count` is provided, the number of matches is limited to that amount; otherwise, all matches are returned.
#### reFindAllSubmatches
@@ -1578,9 +1635,9 @@ that amount; otherwise, all matches are returned.
{{ $result := reFindAllSubmatches [count] }}
```
-Returns a slice of successive submatches of `regex` in `text`. Each submatch is itself a slice containing the match of
-the entire expression, followed by any matches of capturing groups. If `count` is provided, the number of submatches is
-limited to that amount; otherwise, all submatches are returned.
+Returns a slice of successive submatches of `regex` in `text`.
+Each submatch is itself a slice containing the match of the entire expression, followed by any matches of capturing groups.
+If `count` is provided, the number of submatches is limited to that amount; otherwise, all submatches are returned.
#### reQuoteMeta
@@ -1588,8 +1645,7 @@ limited to that amount; otherwise, all submatches are returned.
{{ $result := reQuoteMeta }}
```
-Escapes all regular expression metacharacters in the input `string`; the result is a regular expression matching the
-literal input string.
+Escapes all regular expression metacharacters in the input `string`; the result is a regular expression matching the literal input string.
#### reReplace
@@ -1654,8 +1710,7 @@ Adds the first case-insensitive matching role name to the triggering member.
{{ $role := getRole }}
```
-Returns a [role object](https://discord.com/developers/docs/topics/permissions#role-object).
-`role` may either be an ID or a name to match against (ignoring case).
+Returns a [role object](https://discord.com/developers/docs/topics/permissions#role-object). `role` may either be an ID or a name to match against (ignoring case).
#### getRoleID
@@ -1671,8 +1726,7 @@ Returns a [role object](https://discord.com/developers/docs/topics/permissions#r
{{ $role := getRoleName }}
```
-Returns a [role object](https://discord.com/developers/docs/topics/permissions#role-object) by its name
-(case-insensitive).
+Returns a [role object](https://discord.com/developers/docs/topics/permissions#role-object) by its name (case-insensitive).
#### giveRole
@@ -1693,7 +1747,8 @@ Gives the specified role to the target member.
Gives the role specified by its ID to the target member.
-- `member`: the member to target. Either an ID, mention, or user object, but must be part of the server.
+- `member`: the member to target.
+ Either an ID, mention, or user object, but must be part of the server.
- `delay`: an optional delay in seconds.
#### giveRoleName
@@ -1765,8 +1820,8 @@ Removes the first case-insensitive matching role name from the triggering member
{{ $result := roleAbove }}
```
-Reports whether `role1` is above `role2` in the role hierarchy. Both arguments must be a
-[role object](https://discord.com/developers/docs/topics/permissions#role-object).
+Reports whether `role1` is above `role2` in the role hierarchy.
+Both arguments must be a [role object](https://discord.com/developers/docs/topics/permissions#role-object).
#### setRoles
@@ -1774,9 +1829,9 @@ Reports whether `role1` is above `role2` in the role hierarchy. Both arguments m
{{ setRoles }}
```
-Sets the roles of the specified user to the provided list of role IDs. The roles are overwritten, so any existing roles
-are removed if not included in the new list. `newRoles` must be a slice. `target` may be a user ID, mention, or user
-object, but must be a member of the server.
+Sets the roles of the specified user to the provided list of role IDs.
+The roles are overwritten, so any existing roles are removed if not included in the new list.
+`newRoles` must be a slice. `target` may be a user ID, mention, or user object, but must be a member of the server.
#### takeRole
@@ -1786,7 +1841,8 @@ object, but must be a member of the server.
Removes the specified role from the target member.
-- `target`: a user ID, mention, or user object. The target must be part of the server.
+- `target`: a user ID, mention, or user object.
+ The target must be part of the server.
- `role`: a role ID, mention, name or role object.
- `delay`: an optional delay in seconds.
@@ -1796,8 +1852,7 @@ Removes the specified role from the target member.
{{ takeRoleID [delay] }}
```
-Removes the specified role from `target`. `target` may be a user ID, mention, or user object, but must be a member of
-the server.
+Removes the specified role from `target`. `target` may be a user ID, mention, or user object, but must be a member of the server.
- `delay`: an optional delay in seconds.
@@ -1807,8 +1862,7 @@ the server.
{{ takeRoleName [delay] }}
```
-Removes the first case-insensitive matching role name from `target` with an optional delay in seconds.
-`target` may be a user ID, mention, or user object, but must be a member of the server.
+Removes the first case-insensitive matching role name from `target` with an optional delay in seconds. `target` may be a user ID, mention, or user object, but must be a member of the server.
#### targetHasRole
@@ -1826,8 +1880,7 @@ Reports whether the target member has the specified role.
{{ $result := targetHasRoleID }}
```
-Reports whether the specified target has the specified role ID.
-`target` may be a user ID, mention, or user object, but must be a member of the server.
+Reports whether the specified target has the specified role ID. `target` may be a user ID, mention, or user object, but must be a member of the server.
#### targetHasRoleName
@@ -1835,8 +1888,7 @@ Reports whether the specified target has the specified role ID.
{{ $result := targetHasRoleName }}
```
-Reports whether the specified target has the specified role name (case-insensitive).
-`target` may be a user ID, mention, or user object, but must be a member of the server.
+Reports whether the specified target has the specified role name (case-insensitive). `target` may be a user ID, mention, or user object, but must be a member of the server.
---
@@ -1903,8 +1955,7 @@ Concatenates the arguments in order, adding spaces between arguments when neithe
{{ $result := println }}
```
-Concatenates the arguments in order, adding spaces between arguments and inserting a newline at
-the end.
+Concatenates the arguments in order, adding spaces between arguments and inserting a newline at the end.
#### printf
@@ -1912,7 +1963,8 @@ the end.
{{ $result := printf }}
```
-Interpolates `args...` according to `format`. See the [Go `fmt` package documentation](https://pkg.go.dev/fmt).
+Interpolates `args...` according to `format`.
+See the [Go `fmt` package documentation](https://pkg.go.dev/fmt).
#### sanitizeText
@@ -1972,9 +2024,9 @@ Returns the current time in UTC.
{{ $formatted := formatTime