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

Search
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:
[legend]
Collaboration diagram for dpp::message_search_result:
[legend]

## Public Member Functions

| message_search_result ()=default
std::string | build_json (bool with_id=false) const
| Convert object to json string.
message_search_result & | fill_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_result & | fill_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

inline inherited

Convert object to json string.

Parameters

  with_id | Whether 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 | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::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

  j | JSON data

Returns
  Reference to self

## ◆ to_json()

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

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether 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

## Friends And Related Symbol Documentation

## ◆ 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.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