DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
StickerEntities.hpp
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/// StickerEntities.hpp - Header for the sticker related classes and structs.
27/// May 13, 2021
28/// https://discordcoreapi.com
29/// \file StickerEntities.hpp
30#pragma once
31
34
35namespace discord_core_api {
36
37 /**
38 * \addtogroup foundation_entities
39 * @{
40 */
41
42 /// @brief For getting a sticker_data object for the given sticker id.
44 snowflake stickerId{};///< The chosen sticker_data's snowflake.
45 };
46
47 /// @brief For collecting a list of stickers from a chosen guild.
49 snowflake guildId{};///< The chosen guild from which you would like to collect the stickers from.
50 };
51
52 /// @brief For creating a single sticker_data.
54 jsonifier::string description{};///< Description of the sticker_data.
55 jsonifier::string reason{};///< The reason for creating the sticker_data.
56 snowflake guildId{};///< The guild within which to create the sticker_data.
57 jsonifier::string file{};///< The sticker file to upload, must be a png, apng, or lottie json file, max 500 kb.
58 jsonifier::string name{};///< Name of the sticker_data.
59 jsonifier::string tags{};///< Autocomplete / suggestion tags for the sticker(max 200 characters).
60 };
61
62 /// @brief For modifying a single sticker_data.
64 jsonifier::string description{};///< Description of the sticker_data.
65 snowflake stickerId{};///< The sticker_data you wish to modify.
66 jsonifier::string reason{};///< The reason for modifying the sticker_data.
67 snowflake guildId{};///< The guild within which to modify the sticker_data.
68 jsonifier::string name{};///< Name of the sticker_data.
69 jsonifier::string tags{};///< Autocomplete / suggestion tags for the sticker(max 200 characters).
70 };
71
72 /// @brief For deleting a single sticker_data.
74 snowflake stickerId{};///< The sticker_data you wish to delete.
75 jsonifier::string reason{};///< The reason for deleting the sticker_data.
76 snowflake guildId{};///< The guild within which to delete the sticker_data.
77 };
78
79 /**@}*/
80
81 /**
82 * \addtogroup main_endpoints
83 * @{
84 */
85
86 /// @brief An interface class for the sticker_data related discord endpoints.
87 class DiscordCoreAPI_Dll stickers {
88 public:
89 static void initialize(discord_core_internal::https_client*);
90
91 /// @brief Gets a single sticker_data item.
92 /// @param dataPackage a get_sticker_data structure.
93 /// @return a co_routine containing a sticker_data.
94 static co_routine<sticker_data> getStickerAsync(get_sticker_data dataPackage);
95
96 /// @brief Gets a list of nitro-available sticker_data packs
97 /// @return a co_routine containing a sticker_pack_data
98 static co_routine<jsonifier::vector<sticker_pack_data>> getNitroStickerPacksAsync();
99
100 /// @brief Gets a list of stickers from a guild.
101 /// @param dataPackage a get_guild_stickers_data structure.
102 /// @return a co_routine containing a jsonifier::vector<sticker_data>.
103 static co_routine<jsonifier::vector<sticker_data>> getGuildStickersAsync(get_guild_stickers_data dataPackage);
104
105 /// @brief Creates a new sticker_data within a chosen guild.
106 /// @param dataPackage a create_guild_sticker_data structure.
107 /// @return a co_routine containing a sticker_data.
108 static co_routine<sticker_data> createGuildStickerAsync(create_guild_sticker_data dataPackage);
109
110 /// @brief Modifies a sticker_data within a chosen guild.
111 /// @param dataPackage a modify_guild_sticker_data structure.
112 /// @return a co_routine containing a sticker_data.
113 static co_routine<sticker_data> modifyGuildStickerAsync(modify_guild_sticker_data dataPackage);
114
115 /// @brief Deletes a sticker_data within a chosen guild.
116 /// @param dataPackage a delete_guild_sticker_data structure.
117 /// @return a co_routine containing void.
118 static co_routine<void> deleteGuildStickerAsync(delete_guild_sticker_data dataPackage);
119
120 protected:
121 static discord_core_internal::https_client* httpsClient;
122 };
123 /**@}*/
124};
An interface class for the sticker_data related discord endpoints.
The main namespace for the forward-facing interfaces.
For creating a single sticker_data.
jsonifier::string tags
Autocomplete / suggestion tags for the sticker(max 200 characters).
jsonifier::string description
Description of the sticker_data.
jsonifier::string file
The sticker file to upload, must be a png, apng, or lottie json file, max 500 kb.
jsonifier::string reason
The reason for creating the sticker_data.
snowflake guildId
The guild within which to create the sticker_data.
jsonifier::string name
Name of the sticker_data.
For deleting a single sticker_data.
snowflake stickerId
The sticker_data you wish to delete.
snowflake guildId
The guild within which to delete the sticker_data.
jsonifier::string reason
The reason for deleting the sticker_data.
For collecting a list of stickers from a chosen guild.
snowflake guildId
The chosen guild from which you would like to collect the stickers from.
For getting a sticker_data object for the given sticker id.
snowflake stickerId
The chosen sticker_data's snowflake.
For modifying a single sticker_data.
snowflake stickerId
The sticker_data you wish to modify.
jsonifier::string tags
Autocomplete / suggestion tags for the sticker(max 200 characters).
jsonifier::string description
Description of the sticker_data.
jsonifier::string reason
The reason for modifying the sticker_data.
snowflake guildId
The guild within which to modify the sticker_data.
jsonifier::string name
Name of the sticker_data.