DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
WebHookEntities.cpp
Go to the documentation of this file.
1/*
2 MIT License
3
4 DiscordCoreAPI, A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
5
6 Copyright 2022, 2023 Chris M. (RealTimeChris)
7
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in all
16 copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 SOFTWARE.
25*/
26/// WebHookEntities.cpp - the source file for web_hook_data relate stuff.
27/// Dec 1, 2021
28/// https://discordcoreapi.com
29/// \file WebHookEntities.cpp
30
36
37namespace jsonifier {
38
39 template<> struct core<discord_core_api::execute_web_hook_data> {
40 using value_type = discord_core_api::execute_web_hook_data;
41 static constexpr auto parseValue = createValue("threadId", &value_type::threadId, "wait", &value_type::wait, "attachments", &value_type::attachments, "components",
42 &value_type::components, "allowedMentions", &value_type::allowedMentions, "embeds", &value_type::embeds, "webhookToken",
43 &value_type::webhookToken, "avatarUrl", &value_type::avatarUrl, "username", &value_type::userName, "customId", &value_type::customId, "webHookId",
44 &value_type::webHookId, "content", &value_type::content, "title", &value_type::title, "flags", &value_type::flags, "tts", &value_type::tts);
45 };
46
47 template<> struct core<discord_core_api::create_web_hook_data> {
48 using value_type = discord_core_api::create_web_hook_data;
49 static constexpr auto parseValue = createValue("channelId", &value_type::channelId, "avatar", &value_type::avatar, "name", &value_type::name);
50 };
51
52 template<> struct core<discord_core_api::modify_web_hook_data> {
53 using value_type = discord_core_api::modify_web_hook_data;
54 static constexpr auto parseValue =
55 createValue("channelId", &value_type::channelId, "webHookId", &value_type::webHookId, "avatar", &value_type::avatar, "name", &value_type::name);
56 };
57
58 template<> struct core<discord_core_api::modify_web_hook_with_token_data> {
59 using value_type = discord_core_api::modify_web_hook_with_token_data;
60 static constexpr auto parseValue = createValue("webhookToken", &value_type::webhookToken, "channelId", &value_type::channelId, "webHookId", &value_type::webHookId,
61 "avatar", &value_type::avatar, "name", &value_type::name);
62 };
63
64 template<> struct core<discord_core_api::edit_web_hook_data> {
65 using value_type = discord_core_api::edit_web_hook_data;
66 static constexpr auto parseValue =
67 createValue("threadId", &value_type::threadId, "wait", &value_type::wait, "attachments", &value_type::attachments, "components", &value_type::components,
68 "allowedMentions", &value_type::allowedMentions, "embeds", &value_type::embeds, "webhookToken", &value_type::webhookToken, "avatarUrl",
69 &value_type::avatarUrl, "username", &value_type::userName, "customId", &value_type::customId, "webHookId", &value_type::webHookId, "content", &value_type::content,
70 "title", &value_type::title, "flags", &value_type::flags, "tts", &value_type::tts, "message_id", &value_type::messageId, "thread_id", &value_type::threadId);
71 };
72}
73
74
75namespace discord_core_api {
76
77 execute_web_hook_data::execute_web_hook_data(const web_hook_data& dataNew) {
78 webhookToken = dataNew.token;
79 webHookId = dataNew.id;
80 }
81
82 execute_web_hook_data& execute_web_hook_data::addButton(bool disabled, jsonifier::string_view customIdNew, jsonifier::string_view buttonLabel, button_style buttonStyle,
83 jsonifier::string_view emojiName, snowflake emojiId, jsonifier::string_view url) {
84 if (components.size() == 0) {
85 action_row_data actionRowData;
86 components.emplace_back(actionRowData);
87 }
88 if (components.size() < 5) {
89 if (components[components.size() - 1].components.size() < 5) {
90 component_data component;
91 component.type = component_type::Button;
92 component.emoji.name = emojiName;
93 component.label = buttonLabel;
94 component.style = static_cast<uint64_t>(buttonStyle);
95 component.customId = customIdNew;
96 component.disabled = disabled;
97 component.emoji.id = emojiId;
98 component.url = url;
99 components[components.size() - 1].components.emplace_back(component);
100 } else if (components[components.size() - 1].components.size() == 5) {
101 action_row_data actionRowData;
102 components.emplace_back(actionRowData);
103 }
104 }
105 return *this;
106 }
107
108 execute_web_hook_data& execute_web_hook_data::addSelectMenu(bool disabled, jsonifier::string_view customIdNew, const jsonifier::vector<select_option_data>& options,
109 jsonifier::string_view placeholder, int32_t maxValues, int32_t minValues, select_menu_type type, const jsonifier::vector<channel_type>& channelTypes) {
110 if (components.size() == 0) {
111 action_row_data actionRowData;
112 components.emplace_back(actionRowData);
113 }
114 if (components.size() < 5) {
115 if (components[components.size() - 1].components.size() < 5) {
116 component_data componentData;
117 componentData.type = static_cast<component_type>(type);
118 componentData.channelTypes = channelTypes;
119 componentData.placeholder = placeholder;
120 componentData.customId = customIdNew;
121 componentData.maxValues = static_cast<uint64_t>(maxValues);
122 componentData.minValues = static_cast<uint64_t>(minValues);
123 componentData.disabled = disabled;
124 componentData.options = options;
125 components[components.size() - 1].components.emplace_back(componentData);
126 } else if (components[components.size() - 1].components.size() == 5) {
127 action_row_data actionRowData;
128 components.emplace_back(actionRowData);
129 }
130 }
131 return *this;
132 }
133
134 execute_web_hook_data& execute_web_hook_data::addModal(jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew,
135 jsonifier::string_view customIdNew, bool required, int32_t minLength, int32_t maxLength, text_input_style inputStyle, jsonifier::string_view label,
136 jsonifier::string_view placeholder) {
137 title = topTitleNew;
138 customId = topCustomIdNew;
139 if (components.size() == 0) {
140 action_row_data actionRowData;
141 components.emplace_back(actionRowData);
142 }
143 if (components.size() < 5) {
144 if (components[components.size() - 1].components.size() < 5) {
145 component_data component{};
146 component.type = component_type::Text_Input;
147 component.customId = customIdNew;
148 component.style = static_cast<uint64_t>(inputStyle);
149 component.title = titleNew;
150 component.maxLength = static_cast<uint64_t>(maxLength);
151 component.minLength = static_cast<uint64_t>(minLength);
152 component.label = label;
153 component.required = required;
154 component.placeholder = placeholder;
155 components[components.size() - 1].components.emplace_back(component);
156 } else if (components[components.size() - 1].components.size() == 5) {
157 action_row_data actionRowData;
158 components.emplace_back(actionRowData);
159 }
160 }
161 return *this;
162 }
163
165 files.emplace_back(theFile);
166 return *this;
167
168 }
170 allowedMentions = dataPackage;
171 return *this;
172 }
173
175 components.emplace_back(dataPackage);
176 return *this;
177 }
178
180 embeds.emplace_back(dataPackage);
181 return *this;
182 }
183
184 execute_web_hook_data& execute_web_hook_data::addContent(jsonifier::string_view dataPackage) {
185 content = dataPackage;
186 return *this;
187 }
188
190 tts = enabledTTs;
191 return *this;
192 }
193
194 edit_web_hook_data::edit_web_hook_data(const web_hook_data& dataNew) {
195 webhookToken = dataNew.token;
196 webHookId = dataNew.id;
197 }
198
199 void execute_web_hook_data::generateExcludedKeys() {
200 if (attachments.size() == 0) {
201 jsonifierExcludedKeys.emplace("attachments");
202 }
203 if (allowedMentions.parse.size() == 0 && allowedMentions.roles.size() == 0 && allowedMentions.users.size() == 0) {
204 jsonifierExcludedKeys.emplace("allowed_mentions");
205 }
206 if (components.size() == 0) {
207 jsonifierExcludedKeys.emplace("components");
208 }
209 for (auto& value: components) {
210 value.generateExcludedKeys();
211 }
212 if (embeds.size() == 0) {
213 jsonifierExcludedKeys.emplace("embeds");
214 }
215 for (auto& value: embeds) {
216 value.generateExcludedKeys();
217 }
218 //if (files.size() == 0) {
219 //jsonifierExcludedKeys.emplace("files");
220 //}
221 if (avatarUrl == "") {
222 jsonifierExcludedKeys.emplace("avatar_url");
223 }
224 if (customId == "") {
225 jsonifierExcludedKeys.emplace("custom_id");
226 }
227 if (userName == "") {
228 jsonifierExcludedKeys.emplace("username");
229 }
230 if (title == "") {
231 jsonifierExcludedKeys.emplace("title");
232 }
233 if (content == "") {
234 jsonifierExcludedKeys.emplace("content");
235 }
236 return;
237 }
238
239
240 void discord_core_api::web_hooks::initialize(discord_core_internal::https_client* client) {
241 discord_core_api::web_hooks::httpsClient = client;
242 }
243
245 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Post_Webhook };
247 workload.workloadClass = discord_core_internal::https_workload_class::Post;
248 workload.relativePath = "/channels/" + dataPackage.channelId + "/webhooks";
249 workload.callStack = "discord_core_api::web_hooks::createWebHookAsync()";
250 parser.serializeJson(dataPackage, workload.content);
251 web_hook_data returnData{};
252 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
253 co_return returnData;
254 }
255
257 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Get_Channel_Webhooks };
259 workload.workloadClass = discord_core_internal::https_workload_class::Get;
260 workload.relativePath = "/channels/" + dataPackage.channelId + "/webhooks";
261 workload.callStack = "discord_core_api::web_hooks::getChannelWebHooksAsync()";
262 jsonifier::vector<web_hook_data> returnData{};
263 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
264 co_return returnData;
265 }
266
268 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Get_Guild_Webhooks };
270 workload.workloadClass = discord_core_internal::https_workload_class::Get;
271 workload.relativePath = "/guilds/" + dataPackage.guildId + "/webhooks";
272 workload.callStack = "discord_core_api::web_hooks::getGuildWebHooksAsync()";
273 jsonifier::vector<web_hook_data> returnData{};
274 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
275 co_return returnData;
276 }
277
279 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Get_Webhook };
281 workload.workloadClass = discord_core_internal::https_workload_class::Get;
282 workload.relativePath = "/webhooks/" + dataPackage.webHookId;
283 workload.callStack = "discord_core_api::web_hooks::getWebHookAsync()";
284 web_hook_data returnData{};
285 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
286 co_return returnData;
287 }
288
290 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Get_Webhook_With_Token };
292 workload.workloadClass = discord_core_internal::https_workload_class::Get;
293 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken;
294 workload.callStack = "discord_core_api::web_hooks::getWebHookWithTokenAsync()";
295 web_hook_data returnData{};
296 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
297 co_return returnData;
298 }
299
301 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Patch_Webhook };
303 workload.workloadClass = discord_core_internal::https_workload_class::Patch;
304 workload.relativePath = "/webhooks/" + dataPackage.webHookId;
305 parser.serializeJson(dataPackage, workload.content);
306 workload.callStack = "discord_core_api::web_hooks::modifyWebHookAsync()";
307 web_hook_data returnData{};
308 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
309 co_return returnData;
310 }
311
313 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Patch_Webhook_With_Token };
315 workload.workloadClass = discord_core_internal::https_workload_class::Patch;
316 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken;
317 parser.serializeJson(dataPackage, workload.content);
318 workload.callStack = "discord_core_api::web_hooks::modifyWebHookWithTokenAsync()";
319 web_hook_data returnData{};
320 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
321 co_return returnData;
322 }
323
325 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Delete_Webhook };
326 co_await newThreadAwaitable<void>();
327 workload.workloadClass = discord_core_internal::https_workload_class::Delete;
328 workload.relativePath = "/webhooks/" + dataPackage.webHookId;
329 workload.callStack = "discord_core_api::web_hooks::deleteWebHookAsync()";
330 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload));
331 co_return;
332 }
333
335 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Delete_Webhook_With_Token };
336 co_await newThreadAwaitable<void>();
337 workload.workloadClass = discord_core_internal::https_workload_class::Delete;
338 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken;
339 workload.callStack = "discord_core_api::web_hooks::deleteWebHookWithTokenAsync()";
340 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload));
341 co_return;
342 }
343
345 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Post_Execute_Webhook };
347 workload.workloadClass = discord_core_internal::https_workload_class::Post;
348 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken;
349 workload.callStack = "discord_core_api::web_hooks::executeWebHookAsync()";
350 if (dataPackage.wait) {
351 workload.relativePath += "?wait=true";
352 if (dataPackage.threadId != 0) {
353 workload.relativePath += "&thread_id=" + dataPackage.threadId;
354 }
355 }
356 if (dataPackage.threadId != 0) {
357 workload.relativePath += "?thread_id=" + dataPackage.threadId;
358 }
359 if (dataPackage.files.size() > 0) {
360 workload.payloadType = discord_core_internal::payload_type::Multipart_Form;
361 parser.serializeJson(dataPackage, workload.content);
362 workload.content = constructMultiPartData(workload.content, dataPackage.files);
363 } else {
364 parser.serializeJson(dataPackage, workload.content);
365 }
366 message_data returnData{};
367 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
368 co_return returnData;
369 }
370
372 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Get_Webhook_Message };
374 workload.workloadClass = discord_core_internal::https_workload_class::Get;
375 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken + "/messages/" + dataPackage.messageId;
376 if (dataPackage.threadId != 0) {
377 workload.relativePath += "?thread_id=" + dataPackage.threadId;
378 }
379 workload.callStack = "discord_core_api::web_hooks::getWebHookMessageAsync()";
380 message_data returnData{};
381 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
382 co_return returnData;
383 }
384
386 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Patch_Webhook_Message };
388 workload.workloadClass = discord_core_internal::https_workload_class::Patch;
389 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken + "/messages/" + dataPackage.messageId;
390 if (dataPackage.threadId != 0) {
391 workload.relativePath += "?thread_id=" + dataPackage.threadId;
392 }
393 if (dataPackage.files.size() > 0) {
394 workload.payloadType = discord_core_internal::payload_type::Multipart_Form;
395 parser.serializeJson(dataPackage, workload.content);
396 workload.content = constructMultiPartData(workload.content, dataPackage.files);
397 } else {
398 parser.serializeJson(dataPackage, workload.content);
399 }
400 workload.callStack = "discord_core_api::web_hooks::editWebHookMessageAsync()";
401 message_data returnData{};
402 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload), returnData);
403 co_return returnData;
404 }
405
407 discord_core_internal::https_workload_data workload{ discord_core_internal::https_workload_type::Delete_Webhook_Message };
408 co_await newThreadAwaitable<void>();
409 workload.workloadClass = discord_core_internal::https_workload_class::Delete;
410 workload.relativePath = "/webhooks/" + dataPackage.webHookId + "/" + dataPackage.webhookToken + "/messages/" + dataPackage.messageId;
411 if (dataPackage.threadId != 0) {
412 workload.relativePath += "?thread_id=" + dataPackage.threadId;
413 }
414 workload.callStack = "discord_core_api::web_hooks::deleteWebHookMessageAsync()";
415 discord_core_api::web_hooks::httpsClient->submitWorkloadAndGetResult(std::move(workload));
416 co_return;
417 }
418
419 discord_core_internal::https_client* discord_core_api::web_hooks::httpsClient{};
420}
Action row data of message components.
Allowable mentions for a message.
A co_routine - representing a potentially asynchronous operation/function.
For editing a web_hook message_data.
snowflake threadId
Send a message to the specified thread within a webhook's channel_data. the thread will automatically...
snowflake messageId
The message snowflake to collect.
allowed_mentions_data allowedMentions
Allowed mention object.
jsonifier::vector< embed_data > embeds
Array of up to 10 embed objects.
jsonifier::string content
The message contents (up to 2000 characters) one of content, file, embeds.
snowflake webHookId
The web_hook_data you would like to execute.
jsonifier::string userName
Override the default username of the webhook.
execute_web_hook_data & addContent(jsonifier::string_view dataPackage)
For setting the content in a response.
jsonifier::string webhookToken
The web_hook_data token you would like to execute.
snowflake threadId
Send a message to the specified thread within a webhook's channel_data. the thread will automatically...
execute_web_hook_data & setTTSStatus(bool enabledTTs)
For setting the tts status of a response.
execute_web_hook_data & addAllowedMentions(const allowed_mentions_data dataPackage)
For setting the allowable mentions in a response.
execute_web_hook_data & addFile(const file &theFile)
Adds a file to the current collection of files for this message response.
jsonifier::string title
Title for the modal.
jsonifier::vector< file > files
File contents the contents of the file being sent.
execute_web_hook_data & addMessageEmbed(const embed_data dataPackage)
For setting the embeds in a response.
execute_web_hook_data & addSelectMenu(bool disabled, jsonifier::string_view customIdNew, const jsonifier::vector< select_option_data > &options, jsonifier::string_view placeholder, int32_t maxValues, int32_t minValues, select_menu_type type, const jsonifier::vector< channel_type > &channelTypes=jsonifier::vector< channel_type >{})
Adds a select-menu to the response message_data.
jsonifier::vector< attachment_data > attachments
Array of partial attachment objects attachment objects with filename and description.
execute_web_hook_data & addComponentRow(const action_row_data dataPackage)
For setting the components in a response.
jsonifier::string customId
custom id for the modal.
bool wait
Waits for server confirmation of message send before response, and returns the created message body.
jsonifier::string avatarUrl
Override the default avatar of the webhook.
execute_web_hook_data & addButton(bool disabled, jsonifier::string_view customIdNew, jsonifier::string_view buttonLabel, button_style buttonStyle, jsonifier::string_view emojiName="", snowflake emojiId=snowflake{}, jsonifier::string_view url="")
Adds a button to the response message_data.
jsonifier::vector< action_row_data > components
Array of message component the components to include with the message.
bool tts
True if this is a tts message.
execute_web_hook_data & addModal(jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew, jsonifier::string_view customIdNew, bool required, int32_t minLength, int32_t maxLength, text_input_style inputStyle, jsonifier::string_view label="", jsonifier::string_view placeholder="")
Adds a modal to the response message_data.
The core of a message's data structure.
jsonifier::string name
What is its name?
A class representing a snowflake identifier with various operations.
Definition Base.hpp:701
jsonifier::string token
Token of the web_hook_data.
static co_routine< web_hook_data > modifyWebHookWithTokenAsync(modify_web_hook_with_token_data dataPackage)
Modifies a single web_hook_data, using its token.
static co_routine< message_data > editWebHookMessageAsync(edit_web_hook_data dataPackage)
Edits a web_hook message_data.
static co_routine< void > deleteWebHookMessageAsync(delete_web_hook_message_data dataPackage)
Deletes a web_hook message_data.
static co_routine< void > deleteWebHookAsync(delete_web_hook_data dataPackage)
Deletes a single web_hook_data.
static co_routine< message_data > getWebHookMessageAsync(get_web_hook_message_data dataPackage)
Collects a web_hook message_data.
static co_routine< message_data > executeWebHookAsync(execute_web_hook_data dataPackage)
Executes a single web_hook_data.
static co_routine< web_hook_data > getWebHookAsync(get_web_hook_data dataPackage)
Collects a single web_hook_data.
static co_routine< void > deleteWebHookWithTokenAsync(delete_web_hook_with_token_data dataPackage)
Deletes a single web_hook_data, using its token.
static co_routine< web_hook_data > modifyWebHookAsync(modify_web_hook_data dataPackage)
Modifies a single web_hook_data.
static co_routine< jsonifier::vector< web_hook_data > > getChannelWebHooksAsync(get_channel_web_hooks_data dataPackage)
Collects a list of web_hooks from a chosen channel_data.
static co_routine< web_hook_data > createWebHookAsync(create_web_hook_data dataPackage)
Creates a new web_hook_data.
static co_routine< jsonifier::vector< web_hook_data > > getGuildWebHooksAsync(get_guild_web_hooks_data dataPackage)
Collects a list of web_hooks from a chosen guild.
static co_routine< web_hook_data > getWebHookWithTokenAsync(get_web_hook_with_token_data dataPackage)
Collects a single web_hook_data, using the token.
text_input_style
Text input style for modals.
component_type
Component types.
DCA_INLINE auto newThreadAwaitable()
An awaitable that can be used to launch the co_routine onto a new thread - as well as return the hand...
The main namespace for the forward-facing interfaces.
For creating a new web_hook_data.
snowflake channelId
The channel_data within which to create the web_hook_data.
snowflake webHookId
The desired web_hook_data to delete.
For deleting a web_hook message_data.
snowflake threadId
Send a message to the specified thread within a webhook's channel_data. the thread will automatically...
snowflake webHookId
The web_hook_data you would like to collect.
snowflake messageId
The message snowflake to collect.
jsonifier::string webhookToken
The web_hook_data token you would like to collect.
For deleting a web_hook, using its token.
snowflake webHookId
The desired web_hook_data to delete.
jsonifier::string webhookToken
Token of the desired web_hook_data.
Data representing a file to be sent via multipart-form data.
For collecting a list of web_hooks from a chosen channel_data.
snowflake channelId
The channel_data from which to collect the web_hooks.
For collecting a list of web_hooks from a chosen guild.
snowflake guildId
The guild from which to collect the web_hooks.
Collects a single web_hook_data.
snowflake webHookId
snowflake of the desired web_hook_data to collect.
For getting a web_hook message_data.
jsonifier::string webhookToken
The web_hook_data token you would like to collect.
snowflake webHookId
The web_hook_data you would like to collect.
snowflake messageId
The message snowflake to collect.
snowflake threadId
The thread that the message is in.
Collects a single web_hook_data, using the token and snowflake.
snowflake webHookId
snowflake of the desired web_hook_data.
jsonifier::string webhookToken
Token of the desired web_hook_data.
snowflake webHookId
The web_hook_data to be modified.
jsonifier::string webhookToken
Token of the desired web_hook_data.
snowflake webHookId
The web_hook_data to be modified.