| D++ (DPP) C++ Discord API Bot Library

Search
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:
[legend]

## 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< snowflake > | author_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< snowflake > | channel_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_has > | has
| 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< snowflake > | mentions
| Filter messages that mention these users (max 100).
std::vector< snowflake > | mentions_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< snowflake > | replied_to_message_id
| Filter messages that reply to these messages (max 100).
std::vector< snowflake > | replied_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_sort > | sort_by
| Sorting algorithm to use (default: sort_timestamp).
std::optional< message_search_order > | sort_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.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0