Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Dev #41

Merged
merged 131 commits into from
Dec 17, 2022
Merged

Dev #41

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
7f82300
Merge pull request #3 from brainboxdotcc/master
Commandserver May 26, 2022
2d85639
Merge pull request #13 from brainboxdotcc/dev
Commandserver Jul 4, 2022
800f2b0
Merge pull request #15 from brainboxdotcc/dev
Commandserver Jul 17, 2022
5485ef3
updated comments on component::min_length and component::max_length
Commandserver Jul 17, 2022
4bb460e
Merge remote-tracking branch 'origin/master'
Commandserver Jul 17, 2022
dc8ad48
nope
Commandserver Jul 17, 2022
943cc30
Merge pull request #19 from brainboxdotcc/master
Commandserver Aug 7, 2022
072e17e
Merge pull request #23 from brainboxdotcc/dev
Commandserver Aug 30, 2022
40dca3d
Merge pull request #26 from brainboxdotcc/dev
Commandserver Sep 10, 2022
eead8fd
Merge pull request #28 from brainboxdotcc/dev
Commandserver Sep 24, 2022
7febcf9
Merge pull request #31 from brainboxdotcc/dev
Commandserver Oct 16, 2022
91acf4f
feat: added new select menu types & new field component::channel_types
Commandserver Oct 16, 2022
f97cf91
feat: added new select menu types & new field component::channel_types
Commandserver Oct 16, 2022
d50adcc
misc: added mentionables to cspell
Commandserver Oct 26, 2022
2d4a3a3
breaking: removed dpp::component_type_t. dpp::component_type should b…
Commandserver Oct 28, 2022
6873013
misc: removed todo
Commandserver Oct 28, 2022
96b09f7
Merge pull request #32 from brainboxdotcc/dev
Commandserver Oct 29, 2022
8dc04b0
feat: added dpp::g_developer_support_server guild flag
Commandserver Oct 29, 2022
9113307
feat: added dpp::g_developer_support_server guild flag
Commandserver Oct 29, 2022
33fdb77
feat: added new select menu types & new field component::channel_type…
braindigitalis Oct 29, 2022
6d0e33f
feat: added dpp::g_developer_support_server guild flag (#533)
braindigitalis Oct 29, 2022
af5407f
feat: added user flag for nitro basic (#534)
braindigitalis Oct 29, 2022
1981fbd
Add missing fields for new select menu types
UltimateSppy765 Oct 29, 2022
bb37699
Add missing fields for new select menu types (#535)
braindigitalis Oct 29, 2022
b86963a
fix(sslclient.c): stabilize tick rate
Anotra Oct 30, 2022
3afbc3f
Merge pull request #34 from brainboxdotcc/dev
Commandserver Oct 30, 2022
02438e7
Fixed various C++23 issues
WerWolv Oct 30, 2022
e4f0ff5
Stabilize Tick Rate in sslclient (#536)
braindigitalis Oct 30, 2022
1273e14
Update LICENSE
braindigitalis Oct 30, 2022
510b1cd
Merge branch 'master' of github.com:brainboxdotcc/DPP into dev
braindigitalis Oct 30, 2022
02fc985
Fixed various C++23 issues (#537)
braindigitalis Oct 30, 2022
81069d4
feat: added channel flag dpp::c_require_tag for forum channels. dpp::…
Commandserver Oct 30, 2022
a18078b
feat: added channel flag dpp::c_require_tag for forum channels. dpp::…
braindigitalis Oct 30, 2022
309c7be
fix potential rare race condition
braindigitalis Oct 30, 2022
fa5b498
Document add_row()
niansa Oct 31, 2022
2465cd0
"embed" -> "modal"
niansa Oct 31, 2022
22ca035
Document add_row() (#539)
braindigitalis Oct 31, 2022
8e057ab
Meson build instructions
SirObby Oct 31, 2022
75cc641
Add meson
SirObby Oct 31, 2022
0d631cb
Forgot the building steps
SirObby Oct 31, 2022
cee27e0
Add meson instructions to docs. (#541)
braindigitalis Oct 31, 2022
22bea16
[bot] VCPKG info update [skip ci]
braindigitalis Nov 1, 2022
4e621b5
Updating the DiscordVoiceClient.
RealTimeChris Nov 1, 2022
b7533cd
Updating the DiscordVoiceClient. (#543)
RealTimeChris Nov 1, 2022
1172292
version bump
braindigitalis Nov 1, 2022
a0b8a6f
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Nov 1, 2022
902ebbf
test: report stats in soak test
braindigitalis Nov 1, 2022
51e74ec
fix non-compiling soak test
braindigitalis Nov 1, 2022
eafe937
print status message from find_package(PkgConfig)
tuokri Nov 8, 2022
98a2c7f
feat: added automod regex support
Commandserver Nov 8, 2022
b93caf9
Print status message from find_package(PkgConfig) (#546)
braindigitalis Nov 9, 2022
3f91506
feat: added automod regex support (#547)
braindigitalis Nov 9, 2022
0973d3b
feat: added dpp::u_active_developer user flag
Commandserver Nov 11, 2022
7c6111c
feat: added dpp::u_active_developer user flag (#548)
braindigitalis Nov 12, 2022
aa242d9
Merge branch 'master' of github.com:brainboxdotcc/DPP into dev
braindigitalis Nov 12, 2022
d4b74da
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Nov 12, 2022
74b9abb
move contributor covenant button and fix it
braindigitalis Nov 13, 2022
b0a138a
build(deps): bump doxygen-awesome-css from `8a34f70` to `e829184`
dependabot[bot] Nov 14, 2022
bdb8af3
fix voice support for vcpkg
ilightwas Nov 14, 2022
a582598
fix voice support for vcpkg (#553)
braindigitalis Nov 15, 2022
5e15b77
Fix compiler warning
jameyboor Nov 16, 2022
4b9a737
Fix compiler warning (#556)
braindigitalis Nov 16, 2022
dfa229c
build(deps): bump doxygen-awesome-css from `8a34f70` to `e829184` (#552)
braindigitalis Nov 16, 2022
29fb245
Fix missing semicolon in example
NaJager Nov 23, 2022
6845ca4
Fix missing semicolon in example (#557)
raxyte Nov 23, 2022
a8ef89c
Adding a new send_audio_type to handle audio gaps and stutters on win…
Nov 23, 2022
df1d09c
Adding a new send_audio_type to handle audio gaps and stutters on win…
braindigitalis Nov 23, 2022
7fff4d3
Small fix in satype_overlap_audio
Nov 23, 2022
c3761f4
Small fix in satype_overlap_audio (#559)
braindigitalis Nov 24, 2022
11424e0
Update user.cpp
24rr Nov 26, 2022
d2da4bc
fix(issue #560): The bot does not return the entire user badge. (#561)
braindigitalis Nov 26, 2022
5bf61a3
Merge pull request #36 from brainboxdotcc/dev
Commandserver Nov 26, 2022
185f994
Revert "fix(issue #560): The bot does not return the entire user badge."
braindigitalis Nov 26, 2022
e303162
Revert "fix(issue #560): The bot does not return the entire user badg…
braindigitalis Nov 26, 2022
2db82ed
Merge pull request #37 from brainboxdotcc/dev
Commandserver Nov 27, 2022
49c4123
deprecated dpp::g_private_threads guild flag and mark as removed
Commandserver Nov 27, 2022
98d850c
deprecated dpp::g_private_threads guild flag and mark as removed (#563)
braindigitalis Nov 27, 2022
0f59820
docs: updated automod docs according to discord's changes
Commandserver Nov 27, 2022
ee7ee7b
Merge pull request #38 from brainboxdotcc/dev
Commandserver Nov 27, 2022
70184e2
tests: added unit tests for role cluster methods, cluster::guild_get_…
Commandserver Nov 27, 2022
7a05a25
docs: updated automod docs according to discord's changes (#564)
braindigitalis Nov 27, 2022
addaefb
fix: array of error parsing
Hadopire Nov 28, 2022
3a3d5bf
fix: array of error parsing (#567)
braindigitalis Nov 28, 2022
7910cb7
updated unit tests for role cluster
Commandserver Nov 28, 2022
bd4778e
fix channel bitrate calculation
Commandserver Nov 28, 2022
0fb3fbe
tests: added unit tests for role cluster methods, cluster::guild_get_…
braindigitalis Nov 28, 2022
0050456
fix channel bitrate calculation (#568)
braindigitalis Dec 2, 2022
69d8a51
Mention convertions for role user channel and emoji in dpp::utility, …
ruslan-ilesik Dec 2, 2022
c36675f
Mention convertions for role user channel and emoji in dpp::utility, …
ruslan-ilesik Dec 2, 2022
039abc0
Merge branch 'dev' into master
ruslan-ilesik Dec 2, 2022
e5b342c
Mention convertions for role user channel and emoji in dpp::utility, …
braindigitalis Dec 3, 2022
febf68a
docs: updated the descriptions of dpp::voicestate_flags
Commandserver Dec 7, 2022
cb5341b
Merge pull request #39 from brainboxdotcc/dev
Commandserver Dec 8, 2022
f11b0ac
tests: added unit tests for the new mention for `channel_mention`, `u…
Commandserver Dec 9, 2022
5573ffc
updated unit test USER_GET_FLAGS
Commandserver Dec 9, 2022
0e5a7bc
docs: updated the descriptions of dpp::voicestate_flags (#575)
braindigitalis Dec 9, 2022
e90bf88
revert commit updating the USER_GET_FLAGS unit test
Commandserver Dec 9, 2022
572f41b
tests: added unit tests for the new mention for `channel_mention`, `u…
braindigitalis Dec 10, 2022
243dae6
fix: dpp::cluster::thread_create_in_forum() crashes the bot without a…
Commandserver Dec 10, 2022
d47ec8a
fix: dpp::cluster::thread_create_in_forum() crashes the bot without a…
Commandserver Dec 10, 2022
be0b3a1
feat: added guild_member::set_pending
Commandserver Dec 11, 2022
c2eaff1
fix: `on_voice_state_update` event hasn't updated the guild member in…
Commandserver Dec 11, 2022
54b75f2
feat: added guild_member::set_pending (#579)
Commandserver Dec 11, 2022
13a29b1
added convertions from hex and cmyk colors to decimal value to use in…
ruslan-ilesik Dec 13, 2022
144d75f
added convertions from hex and cmyk colors to decimal value to use in…
ruslan-ilesik Dec 13, 2022
cd535f6
added convertions from hex and cmyk colors to decimal value to use in…
ruslan-ilesik Dec 13, 2022
990631e
added convertions from hex and cmyk colors to decimal value to use in…
ruslan-ilesik Dec 13, 2022
ad19c09
.
ruslan-ilesik Dec 13, 2022
641d722
.
ruslan-ilesik Dec 13, 2022
b79d857
.
ruslan-ilesik Dec 13, 2022
757cb8d
.
ruslan-ilesik Dec 13, 2022
ced9b0b
.
ruslan-ilesik Dec 13, 2022
986cc04
fixing regex issue
ruslan-ilesik Dec 13, 2022
82474d8
removed hex convertion
ruslan-ilesik Dec 13, 2022
f3ebada
removed hex convertion
ruslan-ilesik Dec 13, 2022
68c5cbf
fix: `on_voice_state_update` event hasn't updated the guild member in…
braindigitalis Dec 13, 2022
aef61c0
fix: spacing
braindigitalis Dec 14, 2022
0530679
fix: spacing and add comment
braindigitalis Dec 14, 2022
f71cd97
fix: rgb uses float not double, make this match
braindigitalis Dec 14, 2022
02e9bbd
update: change to float not double
braindigitalis Dec 14, 2022
7b31813
changing cmyk and rbg float functions to double
ruslan-ilesik Dec 14, 2022
696120f
added convertions from hex and cmyk colors to decimal value (#581)
braindigitalis Dec 14, 2022
dc452ed
Update discordvoiceclient.cpp
RealTimeChris Dec 14, 2022
3434868
Implementing a "UDP-keepalive". (#582)
RealTimeChris Dec 14, 2022
6de9889
fix: exclude single word commits from changelog (after conventional c…
braindigitalis Dec 14, 2022
3ea7775
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Dec 14, 2022
fc21d28
build(deps): bump doxygen-awesome-css from `8a34f70` to `e829184`
dependabot[bot] Dec 14, 2022
894c9e2
Merge pull request #40 from brainboxdotcc/dev
Commandserver Dec 15, 2022
94cf40f
remove guild::set_pending again
Commandserver Dec 15, 2022
c964d08
remove guild::set_pending again (#585)
Commandserver Dec 15, 2022
deb80b9
build(deps): bump doxygen-awesome-css from `8a34f70` to `e829184` (#583)
braindigitalis Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"cplusplus",
"xmake",
"CORO",
"cback"
"cback",
"mentionables"
],
"flagWords": [
"hte"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2021 Craig Edwards and D++ Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
<h3>An incredibly lightweight C++ Discord library</h3>
<br />

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![Discord](https://img.shields.io/discord/825407338755653642?style=flat)](https://discord.gg/dpp)
![Downloads](https://dl.dpp.dev/dlcount.php)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/39b054c38bba411d9b25b39524016c9e)](https://www.codacy.com/gh/brainboxdotcc/DPP/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=brainboxdotcc/DPP&amp;utm_campaign=Badge_Grade)
![Lines of code](https://img.shields.io/tokei/lines/github/brainboxdotcc/DPP)
[![D++ CI](https://github.com/brainboxdotcc/DPP/actions/workflows/ci.yml/badge.svg)](https://github.com/brainboxdotcc/DPP/actions/workflows/ci.yml)
[![AUR version](https://img.shields.io/aur/version/dpp)](https://aur.archlinux.org/packages/dpp)
[![AUR version](https://img.shields.io/aur/version/dpp)](https://aur.archlinux.org/packages/dpp) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)

</div>

Expand Down
8 changes: 4 additions & 4 deletions buildtools/changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@
// Match keywords against categories
$matched = false;
foreach ($categories as $cat => $header) {
// Purposefully ignored
if (preg_match("/^Merge (branch|pull request|remote-tracking branch) /", $change) or preg_match("/version bump/i", $change)) {
// Purposefully ignored: comments that are one word, merge commits, and version bumps
if (strpos($change, ' ') === false || preg_match("/^Merge (branch|pull request|remote-tracking branch) /", $change) || preg_match("/version bump/i", $change)) {
$matched = true;
continue;
}
// Groupings
if ((preg_match("/^" . $cat . ":/i", $change)) or (preg_match("/^\[" . $cat . "\//i", $change)) or (preg_match("/^\[" . $cat . "\]/i", $change)) or (preg_match("/^\[" . $cat . ":/i", $change)) or (preg_match("/^" . $cat . "\//i", $change)) or (preg_match("/^" . $cat . ":/i", $change))) {
if ((preg_match("/^" . $cat . ":/i", $change)) || (preg_match("/^\[" . $cat . "\//i", $change)) || (preg_match("/^\[" . $cat . "\]/i", $change)) || (preg_match("/^\[" . $cat . ":/i", $change)) || (preg_match("/^" . $cat . "\//i", $change)) || (preg_match("/^" . $cat . ":/i", $change))) {
if (!isset($catgroup[$header])) {
$catgroup[$header] = [];
}
Expand All @@ -124,7 +124,7 @@
echo "\n" . ($githubstyle ? '## ' : '__**') . $cat . ($githubstyle ? '' : '**__') . "\n";
foreach ($list as $item) {
// Exclude bad commit messages like 'typo fix', 'test push' etc by pattern
if (!preg_match("/^(typo|test|fix)\s\w+$/", $item)) {
if (!preg_match("/^(typo|test|fix)\s\w+$/", $item) && strpos($item, ' ') !== false) {
echo ($githubstyle ? '-' : '•') . ' ' . ucfirst(str_replace('@', '', $item)) . "\n";
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSodium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ endif()
# UNIX
if(UNIX)
# import pkg-config
find_package(PkgConfig QUIET)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(sodium_PKG QUIET libsodium)
endif()
Expand Down
1 change: 1 addition & 0 deletions docpages/02_building_a_bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Click on a link below for a guide specifically for your system:
* \subpage build-a-discord-bot-windows-wsl "Building a discord bot in Windows using WSL (Windows Subsystem for Linux)"
* \subpage build-a-discord-bot-linux-clion "Building a discord bot in Linux using CLion"
* \subpage buildcmake "Building a Discord Bot using CMake/UNIX"
* \subpage buildmeson "Building a Discord Bot using Meson"
* \subpage building-a-cpp-discord-bot-in-repl "Creating a Discord bot in Repl.it"

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ int main(int argc, char const *argv[])
/* Add a text component */
modal.add_component(
dpp::component().
set_label("Type rammel").
set_label("Short type rammel").
set_id("field_id").
set_type(dpp::cot_text).
set_placeholder("gumd").
set_min_length(5).
set_max_length(50).
set_text_style(dpp::text_short)
);
/* Add another text component in the next row, as required by Discord */
modal.add_row();
modal.add_component(
dpp::component().
set_label("Type rammel").
set_id("field_id2").
set_type(dpp::cot_text).
set_placeholder("gumf").
set_min_length(1).
set_max_length(2000).
Expand Down
2 changes: 1 addition & 1 deletion docpages/example_programs/misc/eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int main()
* the shared object could not be loaded. The user probably
* did something odd with the symbols inside their eval.
*/
std::string dl = std::string(getenv("PWD")) + std::to_string(event.msg.author.id) + "_" + std::to_string(event.msg.id) + ".so",
std::string dl = std::string(getenv("PWD")) + std::to_string(event.msg.author.id) + "_" + std::to_string(event.msg.id) + ".so";
auto shared_object_handle = dlopen(dl.c_str(), RTLD_NOW);
if (!shared_object_handle) {
const char *dlsym_error = dlerror();
Expand Down
57 changes: 57 additions & 0 deletions docpages/make_a_bot/meson.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
\page buildmeson Build a Discord Bot using Meson

## 1. Toolchain

Before compiling, you will need to install `meson` on your system.
To be sure that `meson` is installed, you can type the following command:

$ meson --version
0.63.2

## 2. Create a Meson project

In an empty directory.

- your project/

run the command

$ meson init -l cpp

## 3. Configuring your Meson project

add the following line after the project() line in your meson.build file.

dpp = dependency('dpp')

add the following line in the executable section of your meson.build file.

dependencies: [dpp]

change the cpp_std value in the project() to c++17

your meson.build should look like this.
~~~~~~~~~~~~~~
project('discord-bot', 'cpp',
version : '0.1',
default_options : ['warning_level=3',
'cpp_std=c++14'])

dpp = dependency('dpp')


exe = executable('discord', 'discord_bot.cpp',
install : true, dependencies: [dpp])

test('basic', exe)

~~~~~~~~~~~~~~

Meson automatically generates a cpp for your project. And a test suite.

## 4. Building

To build a meson project run

$ meson setup builddir
$ meson compile -C builddir
20 changes: 3 additions & 17 deletions include/dpp/appcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ void from_json(const nlohmann::json& j, command_data_option& cdo);
enum interaction_type {
it_ping = 1, //!< ping
it_application_command = 2, //!< application command (slash command)
it_component_button = 3, //!< button click (component interaction)
it_component_button = 3, //!< button click or select menu chosen (component interaction)
it_autocomplete = 4, //!< Autocomplete interaction
it_modal_submit = 5, //!< Modal form submission
};
Expand Down Expand Up @@ -609,26 +609,12 @@ struct DPP_EXPORT command_interaction {
*/
void from_json(const nlohmann::json& j, command_interaction& ci);

/**
* @brief Component type, either button or select
*/
enum component_type_t {
/**
* @brief Button
*/
cotype_button = 2,
/**
* @brief Option select list (drop-down)
*/
cotype_select = 3
};

/**
* @brief A button click for a button component
*/
struct DPP_EXPORT component_interaction {
/**
* @brief Component type
* @brief Component type (dpp::component_type)
*/
uint8_t component_type;
/**
Expand Down Expand Up @@ -695,7 +681,7 @@ class DPP_EXPORT interaction : public managed, public json_interface<interaction

public:
snowflake application_id; //!< id of the application this interaction is for
uint8_t type; //!< the type of interaction
uint8_t type; //!< the type of interaction (dpp::interaction_type)
std::variant<command_interaction, component_interaction, autocomplete_interaction> data; //!< Optional: the command data payload
snowflake guild_id; //!< Optional: the guild it was sent from
snowflake channel_id; //!< Optional: the channel it was sent from
Expand Down
6 changes: 3 additions & 3 deletions include/dpp/auditlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ enum audit_type {
aut_automod_rule_update = 141,
/// Auto moderation rule deletion
aut_automod_rule_delete = 142,
/// Auto moderation block message
/// Message was blocked by Auto Moderation
aut_automod_block_message = 143,
/// Message was flagged by AutoMod
/// Message was flagged by Auto Moderation
aut_automod_flag_to_channel = 144,
/// Member was timed out by AutoMod
/// Member was timed out by Auto Moderation
aut_automod_user_communication_disabled = 145,
};

Expand Down
51 changes: 47 additions & 4 deletions include/dpp/automod.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ enum automod_trigger_type : uint8_t {
*/
struct DPP_EXPORT automod_metadata : public json_interface<automod_metadata> {
/**
* @brief @brief Substrings which will be searched for in content.
* @brief @brief Substrings which will be searched for in content (Maximum of 1000).
*
* Each keyword can be a phrase which contains multiple words. All keywords are case insensitive.
* Each keyword can be a phrase which contains multiple words.
* All keywords are case insensitive and can be up to 30 characters.
*
* Wildcard symbols (`*`) can be used to customize how each keyword will be matched.
*
Expand Down Expand Up @@ -146,16 +147,58 @@ struct DPP_EXPORT automod_metadata : public json_interface<automod_metadata> {
*/
std::vector<std::string> keywords;

/**
* @brief Regular expression patterns which will be matched against content (Maximum of 10).
*
* Only Rust flavored regex is currently supported, which can be tested in online editors such as [Rustexp](https://rustexp.lpil.uk/).
* Each regex pattern can be up to 260 characters.
*/
std::vector<std::string> regex_patterns;

/**
* @brief Preset keyword list types to moderate
* @see automod_preset_type
*/
std::vector<automod_preset_type> presets;

/**
* @brief Substrings which will be exempt from triggering the automod_metadata::presets trigger type.
* @brief Substrings which should not trigger the rule.
*
* Each keyword can be a phrase which contains multiple words.
* All keywords are case insensitive and can be up to 30 characters.
*
* Each keyword can be a phrase which contains multiple words. All keywords are case insensitive.
* Wildcard symbols (`*`) can be used to customize how each keyword will be matched.
*
* **Examples for the `*` wildcard symbol:**
*
* Prefix - word must start with the keyword
*
* | keyword | matches |
* |----------|-------------------------------------|
* | cat* | <u><b>cat</b></u>ch, <u><b>Cat</b></u>apult, <u><b>CAt</b></u>tLE |
* | the mat* | <u><b>the mat</b></u>rix |
*
* Suffix - word must end with the keyword
*
* | keyword | matches |
* |----------|--------------------------|
* | *cat | wild<u><b>cat</b></u>, copy<u><b>Cat</b></u> |
* | *the mat | brea<u><b>the mat</b></u> |
*
* Anywhere - keyword can appear anywhere in the content
*
* | keyword | matches |
* |-----------|-----------------------------|
* | \*cat* | lo<u><b>cat</b></u>ion, edu<u><b>Cat</b></u>ion |
* | \*the mat* | brea<u><b>the mat</b></u>ter |
*
* Whole Word - keyword is a full word or phrase and must be surrounded by whitespace at the beginning and end
*
* | keyword | matches |
* |---------|-------------|
* | cat | <u><b>Cat</b></u> |
* | the mat | <u><b>the mat</b></u> |
*
*/
std::vector<std::string> allow_list;

Expand Down
Loading