DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
StageInstanceEntities.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/// StageInstanceEntities.hpp - Source file for the stage instance related stuff.
27/// Nov 29, 2021 Chris M.
28/// https://discordcoreapi.com
29/// \file StageInstanceEntities.hpp
30#pragma once
31
34
35namespace discord_core_api {
36
37 /// @brief For creating a stage_instance_data.
39 stage_instance_privacy_level privacyLevel{};///< The privacy level of the stage instance(default Guild_Only).
40 snowflake channelId{};///< The id of the stage channel_data.
41 jsonifier::string reason{};///< The reason for starting it.
42 jsonifier::string topic{};///< The topic of the stage instance(1 - 120 characters).
43 };
44
45 /// @brief For collecting a single stage_instance_data.
47 snowflake channelId{};///< The channel_data id from which you would like to collect the stage_instance_data.
48 };
49
50 /// @brief For modifying a single stage_instance_data.
52 stage_instance_privacy_level privacyLevel{};///< The privacy level of the stage instance.
53 snowflake channelId{};///< The channel_data snowflake of the stage_instance_data.
54 jsonifier::string reason{};///< Reason for modifying the stage_instance_data.
55 jsonifier::string topic{};///< The topic of the stage instance(1 - 120 characters).
56 };
57
58 /// @brief For deleting a single stage_instance_data.
60 snowflake channelId{};///< The channel_data snowflake of the stage_instance_data.
61 jsonifier::string reason{};///< Reason for deleting the stage_instance_data.
62 };
63
64 /**
65 * \addtogroup main_endpoints
66 * @{
67 */
68 /// @brief An interface class for the stage_instance_data related discord endpoints.
69 class DiscordCoreAPI_Dll stage_instances {
70 public:
71 static void initialize(discord_core_internal::https_client*);
72
73 /// @brief Creates a stage_instance_data.
74 /// @param dataPackage a create_stage_instance_data structure.
75 /// @return a co_routine containing a stage_instance_data.
76 static co_routine<stage_instance_data> createStageInstanceAsync(create_stage_instance_data dataPackage);
77
78 /// @brief Collects a stage_instance_data.
79 /// @param dataPackage a get_stage_instance_data structure.
80 /// @return a co_routine containing a stage_instance_data.
81 static co_routine<stage_instance_data> getStageInstanceAsync(get_stage_instance_data dataPackage);
82
83 /// @brief Modifies a stage_instance_data.
84 /// @param dataPackage a modify_stage_instance_data structure.
85 /// @return a co_routine containing a stage_instance_data.
86 static co_routine<stage_instance_data> modifyStageInstanceAsync(modify_stage_instance_data dataPackage);
87
88 /// @brief Deletes a stage_instance_data.
89 /// @param dataPackage a delete_stage_instance_data structure.
90 /// @return a co_routine containing void.
91 static co_routine<void> deleteStageInstanceAsync(delete_stage_instance_data dataPackage);
92
93 protected:
94 static discord_core_internal::https_client* httpsClient;
95 };
96
97 /**@}*/
98}
An interface class for the stage_instance_data related discord endpoints.
stage_instance_privacy_level
Stage instance privacy levels.
The main namespace for the forward-facing interfaces.
stage_instance_privacy_level privacyLevel
The privacy level of the stage instance(default Guild_Only).
jsonifier::string reason
The reason for starting it.
jsonifier::string topic
The topic of the stage instance(1 - 120 characters).
snowflake channelId
The id of the stage channel_data.
For deleting a single stage_instance_data.
jsonifier::string reason
Reason for deleting the stage_instance_data.
snowflake channelId
The channel_data snowflake of the stage_instance_data.
For collecting a single stage_instance_data.
snowflake channelId
The channel_data id from which you would like to collect the stage_instance_data.
For modifying a single stage_instance_data.
stage_instance_privacy_level privacyLevel
The privacy level of the stage instance.
snowflake channelId
The channel_data snowflake of the stage_instance_data.
jsonifier::string topic
The topic of the stage instance(1 - 120 characters).
jsonifier::string reason
Reason for modifying the stage_instance_data.