From e824c7a3392a37f3aeec17bf333deaf293cafef0 Mon Sep 17 00:00:00 2001 From: folospior Date: Mon, 12 Feb 2024 19:27:47 +0100 Subject: [PATCH] [feat] alter set_allowed_mentions This allows the developer to use only one parameter if they only require to change the first parameter and leave the others as default. Altered comments. --- include/dpp/message.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/dpp/message.h b/include/dpp/message.h index 1c274b3ae8..d6def6a0d0 100644 --- a/include/dpp/message.h +++ b/include/dpp/message.h @@ -2074,15 +2074,15 @@ struct DPP_EXPORT message : public managed, json_interface { /** * @brief Set the allowed mentions object for pings on the message * - * @param _parse_users whether or not to parse users in the message content or embeds - * @param _parse_roles whether or not to parse roles in the message content or embeds - * @param _parse_everyone whether or not to parse everyone/here in the message content or embeds - * @param _replied_user if set to true and this is a reply, then ping the user we reply to - * @param users list of user ids to allow pings for - * @param roles list of role ids to allow pings for + * @param _parse_users whether or not to parse users in the message content or embeds, default false + * @param _parse_roles whether or not to parse roles in the message content or embeds, default false + * @param _parse_everyone whether or not to parse everyone/here in the message content or embeds, default false + * @param _replied_user if set to true and this is a reply, then ping the user we reply to, default false + * @param users list of user ids to allow pings for, default an empty vector + * @param roles list of role ids to allow pings for, default an empty vector * @return message& reference to self */ - message& set_allowed_mentions(bool _parse_users, bool _parse_roles, bool _parse_everyone, bool _replied_user, const std::vector &users, const std::vector &roles); + message& set_allowed_mentions(bool _parse_users = false, bool _parse_roles = false, bool _parse_everyone = false, bool _replied_user = false, const std::vector &users = {}, const std::vector &roles = {}); using json_interface::fill_from_json; using json_interface::to_json;