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

Represents the result of a guild message search. More...

#include <message.h>

Inheritance diagram for dpp::message_search_result:
Collaboration diagram for dpp::message_search_result:

Public Member Functions

 message_search_result ()=default
std::string build_json (bool with_id=false) const
 Convert object to json string.
message_search_resultfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json.
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json.

Public Attributes

std::optional< uint32_t > documents_indexed
 Number of documents indexed so far (only present during deep indexing).
bool doing_deep_historical_index {false}
 Whether a deep historical index is being performed.
std::vector< std::vector< message > > messages
 Matched messages grouped by context. Each inner vector contains the matched message followed by context messages.
uint32_t total_results {0}
 Total number of results matching the query.

Protected Member Functions

message_search_resultfill_from_json_impl (nlohmann::json *j)
 Fill from JSON.

Friends

struct json_interface< message_search_result >

Detailed Description

Represents the result of a guild message search.

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

Constructor & Destructor Documentation

◆ message_search_result()

dpp::message_search_result::message_search_result ( )
default

Member Function Documentation

◆ build_json()

std::string dpp::json_interface< message_search_result >::build_json ( bool with_id = false) const
inlineinherited

Convert object to json string.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
std::string Json built from the structure

◆ fill_from_json()

message_search_result & dpp::json_interface< message_search_result >::fill_from_json ( nlohmann::json * j)
inlineinherited

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

◆ fill_from_json_impl()

message_search_result & dpp::message_search_result::fill_from_json_impl ( nlohmann::json * j)
protected

Fill from JSON.

Parameters
jJSON data
Returns
Reference to self

◆ to_json()

auto dpp::json_interface< message_search_result >::to_json ( bool with_id = false) const
inlineinherited

Convert object to nlohmann::json.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
json Json built from the structure

◆ json_interface< message_search_result >

friend struct json_interface< message_search_result >
friend

Member Data Documentation

◆ documents_indexed

std::optional<uint32_t> dpp::message_search_result::documents_indexed

Number of documents indexed so far (only present during deep indexing).

◆ doing_deep_historical_index

bool dpp::message_search_result::doing_deep_historical_index {false}

Whether a deep historical index is being performed.

◆ messages

std::vector<std::vector<message> > dpp::message_search_result::messages

Matched messages grouped by context. Each inner vector contains the matched message followed by context messages.

◆ total_results

uint32_t dpp::message_search_result::total_results {0}

Total number of results matching the query.

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