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 #28

Merged
merged 63 commits into from
Sep 24, 2022
Merged

Dev #28

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5fac138
Added unverified bots default intent.
AA1999 Sep 6, 2022
ef30a20
Fixed double slash comment to triple
AA1999 Sep 9, 2022
ba6350b
fix discord moment
braindigitalis Sep 10, 2022
2bc16ab
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Sep 10, 2022
d7f9268
fix: adjust wording
braindigitalis Sep 10, 2022
f99ebfd
[bot] VCPKG info update [skip ci]
braindigitalis Sep 10, 2022
43a8637
Merge pull request #25 from brainboxdotcc/dev
Commandserver Sep 11, 2022
3ee6a93
work from tag, not from master
braindigitalis Sep 11, 2022
3df29c1
Merge branch 'dev' of github.com:brainboxdotcc/DPP
braindigitalis Sep 11, 2022
679cb2a
docs
Commandserver Sep 11, 2022
cc75ec3
Merge remote-tracking branch 'origin/dev' into dev
Commandserver Sep 11, 2022
209e0c1
versiom bump
braindigitalis Sep 11, 2022
4b73548
Merge branch 'dev' of github.com:brainboxdotcc/DPP
braindigitalis Sep 11, 2022
2adcb9c
fix firstbot page tables, and improve utterances somewhat
braindigitalis Sep 12, 2022
3bd5f8a
docs (#503)
braindigitalis Sep 12, 2022
32a2a11
some js to hack the utterances box inside the doc content div
braindigitalis Sep 12, 2022
137be56
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Sep 12, 2022
f6f6731
migrate to giscus
braindigitalis Sep 12, 2022
9dcfc0d
[fix] add dummy_container to event_router_t to retain struct size
raxyte Sep 13, 2022
7de589b
[impro] default event_router_t constructor
raxyte Sep 13, 2022
fd2dedd
[fix] rename attach() overload to co_attach()
raxyte Sep 13, 2022
93363fa
build(deps): bump doxygen-awesome-css from `4bc3b30` to `a3c119b`
dependabot[bot] Sep 14, 2022
3746388
Improveeeeeeeeeeemmmmmeeeeeenttttttttttsssssssssssssssss (#504)
braindigitalis Sep 14, 2022
13c63a9
Added unverified bots default intent. (#500)
braindigitalis Sep 14, 2022
993fe3f
build(deps): bump doxygen-awesome-css from `4bc3b30` to `a3c119b` (#505)
braindigitalis Sep 15, 2022
12f25c3
Update README.md
braindigitalis Sep 15, 2022
b343e47
Update README.md
braindigitalis Sep 15, 2022
e479901
updated changelog builder
Commandserver Sep 19, 2022
a84e5e2
merge back master changes (#510)
braindigitalis Sep 20, 2022
b2cfde3
updated changelog builder
Commandserver Sep 20, 2022
43b19df
Merge remote-tracking branch 'origin/dev' into dev
Commandserver Sep 20, 2022
e649288
updated changelog builder
Commandserver Sep 20, 2022
c069052
updated changelog builder
Commandserver Sep 20, 2022
3f49723
updated changelog builder (#509)
braindigitalis Sep 22, 2022
b6c6ef3
docs: updated startpage
Commandserver Sep 22, 2022
6f5d49e
docs: updated docs of dpp::command_value
Commandserver Sep 22, 2022
7f4a5d7
docs: updated docs of dpp::interaction_response_type
Commandserver Sep 22, 2022
cfb794f
feat: added audit_extra::automod_rule_name and audit_extra::automod_r…
Commandserver Sep 22, 2022
218fe62
docs: updated some fields and methods
Commandserver Sep 22, 2022
e527e62
breaking: changed the type of guild::afk_timeout up to `uint16_t` and…
Commandserver Sep 22, 2022
6ac204b
feat: added connection::two_way_link field
Commandserver Sep 22, 2022
7b4c22a
fix: guild flag dpp::g_featureable wasn't parsed correctly
Commandserver Sep 22, 2022
9314799
feat: added guild flag dpp::g_invites_disabled
Commandserver Sep 22, 2022
1066a1b
breaking: changed the type of guild::afk_timeout to enum dpp::guild_a…
Commandserver Sep 22, 2022
1fa83e7
feat: added connection::two_way_link field
Commandserver Sep 22, 2022
446e2c5
fix: guild flag dpp::g_featureable wasn't parsed correctly
Commandserver Sep 22, 2022
01eb999
feat: added guild flag dpp::g_invites_disabled
Commandserver Sep 22, 2022
cbff6e5
.
Commandserver Sep 22, 2022
add7452
Merge remote-tracking branch 'origin/dev' into dev
Commandserver Sep 22, 2022
b2a4a85
.
Commandserver Sep 22, 2022
b64c026
docs: moved raspberry pi to its own section
Commandserver Sep 22, 2022
7f614e0
.
Commandserver Sep 22, 2022
5eba78b
its a pr (#512)
braindigitalis Sep 22, 2022
aa9402b
docs: fixed whoopsy in an example program
Commandserver Sep 22, 2022
3848845
docs: fixed whoopsy in an example program (#513)
braindigitalis Sep 22, 2022
192bc3f
fix portfile generation
braindigitalis Sep 23, 2022
d713ca8
docs: updated clion tutorial
Commandserver Sep 23, 2022
0d3fd1e
docs: updated clion tutorial (#514)
braindigitalis Sep 23, 2022
989e748
fix weird port version in master
braindigitalis Sep 23, 2022
65de12a
fix hash in vcpkg
braindigitalis Sep 23, 2022
4761ab6
Merge branch 'dev' of github.com:brainboxdotcc/DPP into dev
braindigitalis Sep 23, 2022
6a826bc
Add markdown logo
braindigitalis Sep 23, 2022
dc6c9ab
docs: Improve readme
braindigitalis Sep 23, 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 .github/workflows/construct-vcpkg-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
sudo touch ./cmake/Raw-Files/Portfile-The-Second.cmake &&
sudo touch ./vcpkg/ports/dpp/vcpkg.json &&
sudo bash -c "cat ./cmake/Raw-Files/Top-Of-Portfile.cmake >> ./cmake/Raw-Files/Portfile-The-First.cmake" &&
sudo git rev-parse HEAD | sudo tee ./cmake/Raw-Files/Portfile-The-First.cmake -a &&
sudo git rev-parse v$(grep DPP_VERSION_TEXT ./include/dpp/version.h | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/') | sudo tee ./cmake/Raw-Files/Portfile-The-First.cmake -a &&
sudo bash -c "cat ./cmake/Raw-Files/Middle-Of-Portfile.cmake >> ./cmake/Raw-Files/Portfile-The-First.cmake" &&
sudo bash -c "echo $'0' >> ./cmake/Raw-Files/Portfile-The-First.cmake" &&
sudo bash -c "cat ./cmake/Raw-Files/Bottom-Of-Portfile.cmake >> ./cmake/Raw-Files/Portfile-The-First.cmake" &&
sudo bash -c "perl -p -i -e s/master/v$(grep DPP_VERSION_TEXT ./include/dpp/version.h | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')/ ./cmake/Raw-Files/Portfile-The-First.cmake"
sudo bash -c "cat ./cmake/Raw-Files/Top-Of-Version-File.txt > ./vcpkg/ports/dpp/vcpkg.json" &&
echo \"$(grep DPP_VERSION_TEXT ./include/dpp/version.h | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')\" | sudo tee ./vcpkg/ports/dpp/vcpkg.json -a &&
sudo truncate -s -1 ./vcpkg/ports/dpp/vcpkg.json &&
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

SHOW_HEADERFILE = NO
#SHOW_HEADERFILE = NO

PREDEFINED = _DOXYGEN_ \
DPP_CORO
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# D++
## An incredibly lightweight C++ Discord library
<div align="center"><img src="docpages/DPP-markdown-logo.png" alt="DPP"/>
<h3>An incredibly lightweight C++ Discord library</h3>
<br />

[![Discord](https://img.shields.io/discord/825407338755653642?style=flat)](https://discord.gg/dpp)
![Downloads](https://dl.dpp.dev/dlcount.php?repo=brainboxdotcc/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)

D++ is a lightweight and efficient library for Discord written in modern C++, covering as much of the API specification as possible with an incredibly small memory footprint even when caching large amounts of data.
</div>

<hr />


D++ is a lightweight and efficient library for **Discord** written in **modern C++**, covering as much of the API specification as possible with an **incredibly small memory footprint** even when caching large amounts of data.

### Library features:

Expand All @@ -30,9 +36,9 @@ This library is in use on [TriviaBot](https://triviabot.co.uk/) and [Sporks bot]

## Documentation

The documentation is a work in progress, generated from the code comments and markdown using Doxygen.
The documentation is constantly evolving and improving, generated from the code comments and markdown examples using Doxygen.

#### [View D++ library documentation](https://dpp.dev/)
#### [View the D++ library documentation](https://dpp.dev/)

### Example

Expand Down Expand Up @@ -72,6 +78,8 @@ The library runs ideally on **Linux**.

### Mac OS X and FreeBSD
The library is well-functional and stable on **Mac OS X** and **FreeBSD** too.

### Raspberry Pi
For running your bot on a **Raspberry Pi**, we offer a prebuilt .deb package for ARM64, ARM6, and ARM7 so that you do not have to wait for it to compile.

### Windows
Expand Down
17 changes: 17 additions & 0 deletions buildtools/changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'change' => '♻️ Refactoring',
'changed' => '♻️ Refactoring',
'test' => '🚨 Testing',
'tests' => '🚨 Testing',
'testing' => '🚨 Testing',
'ci' => '👷 Build/CI',
'build' => '👷 Build/CI',
Expand Down Expand Up @@ -60,6 +61,22 @@
// Case insensitive removal of duplicates
$changelog = array_intersect_key($changelog, array_unique(array_map("strtolower", $changelog)));

// remove duplicates where two entries are the same but one ends with a GitHub pull request link
foreach ($changelog as $item) {
$entryWithoutPrLink = preg_replace('/( \(#\d+\))$/', '', $item);
if ($entryWithoutPrLink === $item) {
continue;
}

// if $item ends with (#123)
foreach ($changelog as $key => $change) {
if ($entryWithoutPrLink === $change) {
unset($changelog[$key]);
break;
}
}
}

foreach ($changelog as $change) {

// Wrap anything that looks like a symbol name in backticks
Expand Down
1 change: 1 addition & 0 deletions cmake/Raw-Files/Bottom-Of-Portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
)

vcpkg_cmake_install()
Expand Down
Binary file added docpages/DPP-markdown-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 14 additions & 4 deletions docpages/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following downloads are for the most recent version:
* [ARM7 Linux .deb (32 bit Raspberry Pi 3, 4)](https://dl.dpp.dev/latest/linux-rpi-arm7hf)
* [ARM64 Linux .deb (64 bit Raspberry Pi 4, Smartphones)](https://dl.dpp.dev/latest/linux-rpi-arm64)

You can find further releases in other architectures and formats or the source code on the [GitHub Repository](https://github.com/brainboxdotcc/DPP/releases). For a realtime JSON format list of download all download links, click [here](https://dl.dpp.dev/json)
You can find further releases in other architectures and formats or the source code on the [GitHub Repository](https://github.com/brainboxdotcc/DPP/releases). For a realtime JSON format list of all download links, click [here](https://dl.dpp.dev/json)

## Library features

Expand All @@ -45,10 +45,20 @@ You can find further releases in other architectures and formats or the source c

## Supported Operating Systems

The library runs great on **Linux**. **Windows** is also supported and we offer ready made compiled DLL and LIB files for easy integration into any windows visual studio 2019/2022 project.
**Mac OS X** and **FreeBSD** is also functional and stable, as is running your bot on a **Raspberry Pi** — we offer a prebuilt .deb for ARM64, ARMv6 and ARMv7 to save on having to wait for it to compile.
### Linux
The library runs ideally on **Linux**.

The library may work fine in other operating systems too, if you run a D++ bot on something not listed here please let us know!
### Mac OS X and FreeBSD
The library is well-functional and stable on **Mac OS X** and **FreeBSD** too.

### Raspberry Pi
For running your bot on a **Raspberry Pi**, we offer a prebuilt .deb package for ARM64, ARM6, and ARM7 so that you do not have to wait for it to compile.

### Windows
**Windows** is well-supported with ready-made compiled DLL and LIB files, please check out our [Windows Bot Template repository](https://github.com/brainboxdotcc/windows-bot-template). The Windows Bot repository can be cloned and integrated immediately into any Visual Studio 2019 and 2022 project in a matter of minutes.

### Other OS
The library should work fine on other operating systems as well, and if you run a D++ bot on something not listed here, please let us know!

## Getting started
* [GitHub Repository](https://github.com/brainboxdotcc/DPP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main()
if (dpp::run_once<struct register_bot_commands>()) {

/* Create a new global command on ready event */
dpp::slashcommand newcommand("blep", "Send a random adorable animal photo", bot.me.id)
dpp::slashcommand newcommand("blep", "Send a random adorable animal photo", bot.me.id);
newcommand.add_option(
dpp::command_option(dpp::co_string, "animal", "The type of animal", true).
add_choice(dpp::command_option_choice("Dog", std::string("animal_dog"))).
Expand Down
27 changes: 8 additions & 19 deletions docpages/footer.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<script src="https://utteranc.es/client.js"
repo="brainboxdotcc/dpp-comments"
issue-term="pathname"
theme="preferred-color-scheme"
crossorigin="anonymous"
async>
</script>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
</ul>
<div id="nav-path" class="navpath">
<ul>
$navpath
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<!--END !GENERATE_TREEVIEW-->

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QTH6YHBNG5"></script>
Expand All @@ -35,13 +22,15 @@
$(".fragment").each(function(i,node) {
var $node = $(node);
$node.children(":not(.line)").remove();
$node.html("<pre><code class='stan'>" + $node.text().trim().replaceAll("\<", "&lt;").replaceAll("\>", "&gt;") + "</code></pre>");
$node.html("<pre><code class='stan'>" + $node.text().trim().replaceAll("<", "&lt;").replaceAll(">", "&gt;") + "</code></pre>");
hljs.configure({
languages: ['cpp','diff','cmake','bash','sh','text'],
ignoreUnescapedHTML: true
});
hljs.highlightAll(node);
hljs.initLineNumbersOnLoad(node);
});
$(".fragment").parent().parent().parent().parent().removeClass('doxtable');
});
</script>
<style>
Expand All @@ -59,7 +48,7 @@
.hljs-ln-n::before {
content: attr(data-line-number);
padding-right: 1rem !important;
}
}
</style>
<div style="z-index: -9999; position: absolute; right: 0; top: 0; font-size: 0.0001rem;color:transparent;background:none">
<!-- For crawlability of past versions -->
Expand Down
25 changes: 12 additions & 13 deletions docpages/footer.template.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
</ul>
<div id="nav-path" class="navpath">
<ul>
$navpath
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<!--END !GENERATE_TREEVIEW-->

<!-- utteranc.es -->
<script src="https://utteranc.es/client.js" repo="brainboxdotcc/dpp-comments" issue-term="pathname" theme="preferred-color-scheme"
crossorigin="anonymous" async> </script>

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QTH6YHBNG5"></script>
Expand All @@ -30,13 +22,15 @@
$(".fragment").each(function(i,node) {
var $node = $(node);
$node.children(":not(.line)").remove();
$node.html("<pre><code class='stan'>" + $node.text().trim().replaceAll("\<", "&lt;").replaceAll("\>", "&gt;") + "</code></pre>");
$node.html("<pre><code class='stan'>" + $node.text().trim().replaceAll("<", "&lt;").replaceAll(">", "&gt;") + "</code></pre>");
hljs.configure({
languages: ['cpp','diff','cmake','bash','sh','text'],
ignoreUnescapedHTML: true
});
hljs.highlightAll(node);
hljs.initLineNumbersOnLoad(node);
});
$(".fragment").parent().parent().parent().parent().removeClass('doxtable');
});
</script>
<style>
Expand All @@ -54,6 +48,11 @@
.hljs-ln-n::before {
content: attr(data-line-number);
padding-right: 1rem !important;
}

table.markdownTable code td, table.markdownTable code th, table.fieldtable code td, table.fieldtable code th, table.doxtable code td, table.doxtable code th {
border: 0 !important;
padding: 0 !important;
}
</style>
<div style="z-index: -9999; position: absolute; right: 0; top: 0; font-size: 0.0001rem;color:transparent;background:none">
Expand Down
2 changes: 1 addition & 1 deletion docpages/make_a_bot/clion.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Then open the "File" menu and click on "Reload CMake Project" to reload the CMak

### Add an example program

The next step is to write the bot. Copy and paste the following [example program](https://dpp.dev/firstbot.html) in the `main.cpp` and set your bot token (see [Creating a Bot Token](https://dpp.dev/creating-a-bot-application.html)) and guild ID to the example program:
The next step is to write the bot. Copy and paste the following [example program](https://dpp.dev/firstbot.html) in the `main.cpp` and set your bot token (see [Creating a Bot Token](https://dpp.dev/creating-a-bot-application.html)):


~~~~~~~~~~~~~~~{.cpp}
Expand Down
5 changes: 5 additions & 0 deletions docpages/makedocs-gh-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
mkdir("/home/runner/dpp-web/$tag");
}
chdir("docs");
/* Add giscus inside the actual content as postprocess */
system('perl -p -i -e \'s/(<.div><.-- contents -->)/$1<script src="https:\/\/giscus.app\/client.js" data-repo="brainboxdotcc\/dpp-comments" ' .
'data-repo-id="R_kgDOHOY4xg" data-category="General" data-category-id="DIC_kwDOHOY4xs4CRYtj" data-mapping="pathname" data-strict="1" ' .
'data-reactions-enabled="1" data-emit-metadata="1" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" ' .
'data-loading="lazy" crossorigin="anonymous" async><\/script>/\' *.html');
system("rsync -r --include='*' '.' '/home/runner/dpp-web/".$tag."' >/dev/null");
chdir("/");
system("rm -rf " . sys_get_temp_dir() . "/dpp-old/$tag");
Expand Down
5 changes: 5 additions & 0 deletions docpages/makedocs-gh.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
chdir("..");
shell_exec("/usr/local/bin/doxygen >/dev/null");
chdir("docs");
/* Insert giscus inside actual doc content */
system('perl -p -i -e \'s/(<.div><.-- contents -->)/$1<script src="https:\/\/giscus.app\/client.js" data-repo="brainboxdotcc\/dpp-comments" ' .
'data-repo-id="R_kgDOHOY4xg" data-category="General" data-category-id="DIC_kwDOHOY4xs4CRYtj" data-mapping="pathname" data-strict="1" ' .
'data-reactions-enabled="1" data-emit-metadata="1" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" ' .
'data-loading="lazy" crossorigin="anonymous" async><\/script>/\' *.html');
system("rsync -rv --include='*' '.' '/home/runner/dpp-web' >/dev/null");
chdir("..");

Expand Down
2 changes: 1 addition & 1 deletion doxygen-awesome-css
Submodule doxygen-awesome-css updated 1 files
+1 −1 README.md
17 changes: 9 additions & 8 deletions include/dpp/appcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ enum command_option_type : uint8_t {

/**
* @brief This type is a variant that can hold any of the potential
* native data types represented by the enum above.
* native data types represented by the enum dpp::command_option_type.
* It is used in interactions.
*
* std::monostate indicates an invalid parameter value, e.g. an unfilled optional parameter.
* std::int64_t will be for all integer options, double for decimal numbers and dpp::snowflake for anything ID related.
*
* You can retrieve them with std::get().
*/
typedef std::variant<std::monostate, std::string, int64_t, bool, snowflake, double> command_value;

Expand Down Expand Up @@ -282,14 +285,12 @@ void to_json(nlohmann::json& j, const command_option& opt);

/**
* @brief Response types when responding to an interaction within on_interaction_create.
* Do not use ir_acknowledge or ir::channel_message, as these are deprecated in the
* Discord API spec. They are listed in this enum for completeness.
*/
enum interaction_response_type {
ir_pong = 1, //!< ACK a Ping
ir_pong = 1, //!< Acknowledge a Ping
ir_channel_message_with_source = 4, //!< respond to an interaction with a message
ir_deferred_channel_message_with_source = 5, //!< ACK an interaction and edit a response later, the user sees a loading state
ir_deferred_update_message = 6, //!< for components, ACK an interaction and edit the original message later; the user does not see a loading state
ir_deferred_channel_message_with_source = 5, //!< Acknowledge an interaction and edit a response later, the user sees a loading state
ir_deferred_update_message = 6, //!< for components, acknowledge an interaction and edit the original message later; the user does not see a loading state
ir_update_message = 7, //!< for components, edit the message the component was attached to
ir_autocomplete_reply = 8, //!< Reply to autocomplete interaction. Be sure to do this within 500ms of the interaction!
ir_modal_dialog = 9, //!< A modal dialog box
Expand Down Expand Up @@ -1041,7 +1042,7 @@ class DPP_EXPORT slashcommand : public managed, public json_interface<slashcomma

/**
* @brief The default permissions of this command on a guild.
* D++ defaults this to p_use_application_commands.
* D++ defaults this to dpp::p_use_application_commands.
* @note You can set it to 0 to disable the command for everyone except admins by default
*/
permission default_member_permissions;
Expand Down Expand Up @@ -1093,7 +1094,7 @@ class DPP_EXPORT slashcommand : public managed, public json_interface<slashcomma
/**
* @brief Set the default permissions of the slash command
*
* @param defaults default permissions to set. This is a permission bitmask
* @param defaults default permissions to set. This is a permission bitmask of bits from dpp::permissions
* @note You can set it to 0 to disable the command for everyone except admins by default
*
* @return slashcommand& reference to self
Expand Down
8 changes: 7 additions & 1 deletion include/dpp/auditlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ enum audit_type {
aut_automod_rule_delete = 142,
/// Auto moderation block message
aut_automod_block_message = 143,
/// Message was flagged by AutoMod
aut_automod_flag_to_channel = 144,
/// Member was timed out by AutoMod
aut_automod_user_communication_disabled = 145,
};

/**
Expand All @@ -148,7 +152,7 @@ struct DPP_EXPORT audit_change {
std::string old_value;
/**
* The property name that was changed, e.g. `nick` for nickname changes
* @note For dpp::audit_type::aut_appcommand_permission_update updates the key is the id of the user, channel, role, or a permission constant that was updated instead of an actual property name
* @note For dpp::aut_appcommand_permission_update updates the key is the id of the user, channel, role, or a permission constant that was updated instead of an actual property name
*/
std::string key;
};
Expand All @@ -157,6 +161,8 @@ struct DPP_EXPORT audit_change {
* @brief Extra information for an audit log entry
*/
struct DPP_EXPORT audit_extra {
std::string automod_rule_name; //!< Name of the Auto Moderation rule that was triggered
std::string automod_rule_trigger_type; //!< Trigger type of the Auto Moderation rule that was triggered
std::string delete_member_days; //!< number of days after which inactive members were kicked
std::string members_removed; //!< number of members removed by the prune
snowflake channel_id; //!< channel in which the entities were targeted
Expand Down
2 changes: 1 addition & 1 deletion include/dpp/automod.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ struct DPP_EXPORT automod_metadata : public json_interface<automod_metadata> {
std::vector<std::string> allow_list;

/**
* @brief Total number of mentions (role & user) allowed per message (Maximum of 50)
* @brief Total number of unique role and user mentions allowed per message (Maximum of 50)
*/
uint8_t mention_total_limit;

Expand Down
Loading