D++ (DPP)
C++ Discord API Bot Library
Loading...
Searching...
No Matches
dpp::message_search_params Struct Reference

Parameters for searching messages within a guild. More...

#include <message.h>

+ Collaboration diagram for dpp::message_search_params:

Public Member Functions

std::string build_url_params () const
 Build the query string for the REST request.
 

Public Attributes

std::vector< std::string > attachment_extension
 Filter messages by attachment extension (max 100)
 
std::vector< std::string > attachment_filename
 Filter messages by attachment filename (max 100)
 
std::vector< snowflakeauthor_id
 Filter by author IDs (max 100)
 
std::vector< std::string > author_type
 Filter by author type (user, bot, webhook; prefix with - to negate)
 
std::vector< snowflakechannel_id
 Filter by channel IDs (max 500)
 
std::string content
 Filter messages by content (max 1024 characters)
 
std::vector< std::string > embed_provider
 Filter messages by embed provider (case-sensitive, max 100)
 
std::vector< std::string > embed_type
 Filter messages by embed type.
 
std::vector< message_search_hashas
 Filter by presence of element types.
 
std::optional< bool > include_nsfw
 Whether to include results from age-restricted channels (default false)
 
std::optional< uint32_t > limit
 Max number of messages to return (1-25, default 25)
 
std::vector< std::string > link_hostname
 Filter messages by link hostname (max 100)
 
snowflake max_id
 Get messages before this message ID.
 
std::optional< bool > mention_everyone
 Filter by @everyone mention presence.
 
std::vector< snowflakementions
 Filter messages that mention these users (max 100)
 
std::vector< snowflakementions_role_id
 Filter messages that mention these roles (max 100)
 
snowflake min_id
 Get messages after this message ID.
 
std::optional< uint32_t > offset
 Pagination offset (max 9975)
 
std::optional< bool > pinned
 Filter messages by whether they are pinned.
 
std::vector< snowflakereplied_to_message_id
 Filter messages that reply to these messages (max 100)
 
std::vector< snowflakereplied_to_user_id
 Filter messages that reply to these users (max 100)
 
std::optional< uint32_t > slop
 Max number of words to skip between matching tokens (max 100, default 2)
 
std::optional< message_search_sortsort_by
 Sorting algorithm to use (default: sort_timestamp)
 
std::optional< message_search_ordersort_order
 Direction to sort (default: sort_desc)
 

Detailed Description

Parameters for searching messages within a guild.

See also
https://discord.com/developers/docs/resources/message#search-guild-messages

Member Function Documentation

◆ build_url_params()

std::string dpp::message_search_params::build_url_params ( ) const

Build the query string for the REST request.

Returns
URL query string starting with '?'

Member Data Documentation

◆ attachment_extension

std::vector<std::string> dpp::message_search_params::attachment_extension

Filter messages by attachment extension (max 100)

◆ attachment_filename

std::vector<std::string> dpp::message_search_params::attachment_filename

Filter messages by attachment filename (max 100)

◆ author_id

std::vector<snowflake> dpp::message_search_params::author_id

Filter by author IDs (max 100)

◆ author_type

std::vector<std::string> dpp::message_search_params::author_type

Filter by author type (user, bot, webhook; prefix with - to negate)

◆ channel_id

std::vector<snowflake> dpp::message_search_params::channel_id

Filter by channel IDs (max 500)

◆ content

std::string dpp::message_search_params::content

Filter messages by content (max 1024 characters)

◆ embed_provider

std::vector<std::string> dpp::message_search_params::embed_provider

Filter messages by embed provider (case-sensitive, max 100)

◆ embed_type

std::vector<std::string> dpp::message_search_params::embed_type

Filter messages by embed type.

◆ has

std::vector<message_search_has> dpp::message_search_params::has

Filter by presence of element types.

◆ include_nsfw

std::optional<bool> dpp::message_search_params::include_nsfw

Whether to include results from age-restricted channels (default false)

◆ limit

std::optional<uint32_t> dpp::message_search_params::limit

Max number of messages to return (1-25, default 25)

◆ link_hostname

std::vector<std::string> dpp::message_search_params::link_hostname

Filter messages by link hostname (max 100)

◆ max_id

snowflake dpp::message_search_params::max_id

Get messages before this message ID.

◆ mention_everyone

std::optional<bool> dpp::message_search_params::mention_everyone

Filter by @everyone mention presence.

◆ mentions

std::vector<snowflake> dpp::message_search_params::mentions

Filter messages that mention these users (max 100)

◆ mentions_role_id

std::vector<snowflake> dpp::message_search_params::mentions_role_id

Filter messages that mention these roles (max 100)

◆ min_id

snowflake dpp::message_search_params::min_id

Get messages after this message ID.

◆ offset

std::optional<uint32_t> dpp::message_search_params::offset

Pagination offset (max 9975)

◆ pinned

std::optional<bool> dpp::message_search_params::pinned

Filter messages by whether they are pinned.

◆ replied_to_message_id

std::vector<snowflake> dpp::message_search_params::replied_to_message_id

Filter messages that reply to these messages (max 100)

◆ replied_to_user_id

std::vector<snowflake> dpp::message_search_params::replied_to_user_id

Filter messages that reply to these users (max 100)

◆ slop

std::optional<uint32_t> dpp::message_search_params::slop

Max number of words to skip between matching tokens (max 100, default 2)

◆ sort_by

std::optional<message_search_sort> dpp::message_search_params::sort_by

Sorting algorithm to use (default: sort_timestamp)

◆ sort_order

std::optional<message_search_order> dpp::message_search_params::sort_order

Direction to sort (default: sort_desc)

D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0