44 template<
typename value_type>
using object_filter = std::function<bool(value_type)>;
50 struct object_collector_return_data {
51 jsonifier::vector<value_type> objects{};
54 static unordered_map<jsonifier::string, unbounded_message_block<value_type>*> objectsBuffersMap;
63 co_routine<object_collector_return_data, false>
collectObjects(int32_t quantityToCollect, int32_t msToCollectForNew, object_filter<value_type> filteringFunctionNew);
65 void run(std::coroutine_handle<
66 typename discord_core_api::co_routine<
typename discord_core_api::object_collector<value_type>::object_collector_return_data,
false>::promise_type>& coroHandle);
71 unbounded_message_block<value_type> objectsBuffer{};
72 object_collector_return_data objectReturnData{};
73 object_filter<value_type> filteringFunction{};
74 int32_t quantityOfObjectsToCollect{};
75 jsonifier::string collectorId{};
76 int32_t msToCollectFor{};
99 template<
typename value_type>
friend struct jsonifier::core;
100 friend class input_events;
101 friend class messages;
103 create_message_data(
const snowflake channelIdNew);
105 create_message_data(respond_to_input_event_data dataPackage);
107 create_message_data(input_event_data dataPackage);
109 create_message_data(message_data dataPackage);
111 snowflake channelId{};
113 create_message_data() =
default;
116 jsonifier::vector<attachment_data> attachments{};
117 message_reference_data messageReference{};
118 jsonifier::vector<jsonifier::string> stickerIds{};
124 friend class input_events;
126 send_dmdata(respond_to_input_event_data dataPackage);
129 snowflake targetUserId{};
141 template<
typename value_type>
friend struct jsonifier::core;
142 friend class input_events;
143 friend class messages;
145 edit_message_data(input_event_data dataPackage);
147 edit_message_data(respond_to_input_event_data dataPackage);
150 jsonifier::vector<attachment_data> attachments{};
151 snowflake channelId{};
152 snowflake messageId{};
155 edit_message_data() =
default;
161 delete_message_data(
const message_data& messageToDelete);
162 time_stamp timeStamp{};
163 snowflake channelId{};
164 snowflake messageId{};
165 jsonifier::string reason{};
204 static void initialize(discord_core_internal::https_client*);
209 static co_routine<jsonifier::vector<message_data>> getMessagesAsync(get_messages_data dataPackage);
214 static co_routine<message_data> getMessageAsync(get_message_data dataPackage);
219 static co_routine<message_data> createMessageAsync(create_message_data dataPackage);
224 static co_routine<message_data> crosspostMessageAsync(crosspost_message_data dataPackage);
229 static co_routine<message_data> editMessageAsync(edit_message_data dataPackage);
234 static co_routine<void> deleteMessageAsync(delete_message_data dataPackage);
239 static co_routine<void> deleteMessagesBulkAsync(delete_messages_bulk_data dataPackage);
244 static co_routine<jsonifier::vector<message_data>> getPinnedMessagesAsync(get_pinned_messages_data dataPackage);
249 static co_routine<void> pinMessageAsync(pin_message_data dataPackage);
254 static co_routine<void> unpinMessageAsync(unpin_message_data dataPackage);
257 static discord_core_internal::https_client* httpsClient;
Message response base, for responding to messages.
An interface class for the message_data related discord endpoints.
Object collector, for collecting objects from a channel.
co_routine< object_collector_return_data, false > collectObjects(int32_t quantityToCollect, int32_t msToCollectForNew, object_filter< value_type > filteringFunctionNew)
Begin waiting for objects.
For sending a direct-message.
std::function< bool(value_type)> object_filter
Typedef for the message filter.
The main namespace for the forward-facing interfaces.
For crossposting a message.
snowflake messageId
snowflake of the message to be crossposted.
snowflake channelId
channel_data within which to crosspost the message from.
For deleting a bulk of messages.
jsonifier::vector< snowflake > messageIds
Array of message ids to delete.
snowflake channelId
channel_data within which to delete the messages.
jsonifier::string reason
The reason for deleting the messages.
snowflake channelId
The channel_data from which to collect the message_data.
For getting a collection of messages.
snowflake aroundThisId
Around this id.
snowflake afterThisId
After this id.
snowflake beforeThisId
Before this id.
int32_t limit
Limit of messages to collect.
snowflake channelId
channel_data from which to collect the messages.
For getting a collection of pinned messages.
snowflake channelId
The channel_data from which to collect pinned messages.
For pinning a single message_data.
snowflake messageId
The message which you would like to pin.
snowflake channelId
The channel_data within which to pin the message_data.
jsonifier::string reason
Reason for pinning this message_data.
For unpinning a single message_data.
jsonifier::string reason
Reason for pinning this message_data.
snowflake channelId
The channel_data within which to unpin the message_data.
snowflake messageId
The message which you would like to unpin.