34#include <discordcoreapi/Utilities/UnorderedMap.hpp>
64 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
69 jsonifier::string
url{};
74 activity_data() =
default;
76 ~activity_data() =
default;
87 namespace discord_core_internal {
89 class sound_cloud_request_builder;
90 class you_tube_request_builder;
92 class base_socket_agent;
93 class sound_cloud_api;
119 template<
typename return_type,
bool timeOut = true>
class co_routine;
128 enum class presence_update_state { online = 0, Do_Not_Disturb = 1, idle = 2, invisible = 3, offline = 4 };
132 template<
typename value_type>
friend struct jsonifier::core;
133 jsonifier::vector<activity_data> activities{};
134 unordered_set<jsonifier::string> jsonifierExcludedKeys{};
135 presence_update_state status{};
139 DCA_INLINE update_presence_data() =
default;
140 update_presence_data(presence_update_state updateState);
142 operator discord_core_internal::etf_serializer();
145 jsonifier::string statusReal{};
148 std::basic_ostream<char>& operator<<(std::basic_ostream<char>& outputSttream, jsonifier::string_view (*function)(
void));
153 Deferred_Response = 1,
184 Auto_Moderation_Configuration = 1 << 20,
195 std::function<void(discord_core_client*)>
function{};
216 std::ostream* outputStream{ &std::cout };
217 std::ostream* errorStream{ &std::cerr };
250 class DiscordCoreAPI_Dll config_manager {
252 config_manager() =
default;
254 explicit config_manager(
const discord_core_client_config&);
256 bool doWePrintWebSocketSuccessMessages()
const;
258 bool doWePrintWebSocketErrorMessages()
const;
260 bool doWePrintHttpsSuccessMessages()
const;
262 bool doWePrintHttpsErrorMessages()
const;
264 bool doWePrintGeneralSuccessMessages()
const;
266 bool doWePrintGeneralErrorMessages()
const;
268 bool doWeCacheGuildMembers()
const;
270 bool doWeCacheVoiceStates()
const;
272 bool doWeCacheChannels()
const;
274 bool doWeCacheUsers()
const;
276 bool doWeCacheGuilds()
const;
278 bool doWeCacheRoles()
const;
280 update_presence_data getPresenceData()
const;
282 jsonifier::string getBotToken()
const;
284 uint64_t getTotalShardCount()
const;
286 std::ostream* getOutputStream()
const;
288 std::ostream* getErrorStream()
const;
290 uint64_t getStartingShard()
const;
292 uint64_t getShardCountForThisProcess()
const;
294 jsonifier::string getConnectionAddress()
const;
296 void setConnectionAddress(jsonifier::string_view connectionAddressNew);
298 uint16_t getConnectionPort()
const;
300 void setConnectionPort(
const uint16_t connectionPortNew);
302 jsonifier::vector<repeated_function_data> getFunctionsToExecute()
const;
304 text_format getTextFormat()
const;
306 gateway_intents getGatewayIntents();
309 discord_core_client_config config{};
314 static constexpr jsonifier::string_view
white{
"ffffff" },
378 jsonifier::vector<uint8_t> data{};
379 int64_t currentSize{ -5 };
381 audio_frame_data() =
default;
383 audio_frame_data(audio_frame_type frameType);
385 audio_frame_data& operator+=(jsonifier::string_view_base<uint8_t>);
387 audio_frame_data& operator+=(jsonifier::vector<uint8_t>);
389 DCA_INLINE
bool operator==(
const audio_frame_data& rhs)
const {
415 template<
typename return_type> DCA_INLINE return_type fromString(jsonifier::string_view
string, std::ios_base& (*type)( std::ios_base& )) {
417 std::istringstream
stream(std::string{
string });
422 template<
typename return_type> DCA_INLINE jsonifier::string toHex(return_type inputValue) {
423 std::stringstream
stream{};
424 stream << std::setfill(
'0') << std::setw(
sizeof(return_type) * 2) << std::hex << inputValue;
425 return jsonifier::string{
stream.str() };
428 class rgbcolor_value {
435 using hex_color_value = jsonifier::string;
437 class DiscordCoreAPI_Dll color_value {
439 template<
typename value_type>
friend struct jsonifier::core;
441 color_value(jsonifier::string_view hexColorValue);
443 rgbcolor_value getRgbColorValue();
445 hex_color_value getHexColorValue();
447 color_value(uint32_t colorValue);
449 uint32_t getIntColorValue();
455 enum class hash_type { User_Avatar = 0, Channel_Icon = 1, GuildMember_Avatar = 2, Guild_Icon = 3, Guild_Splash = 4, Guild_Banner = 5, Guild_Discovery = 6 };
457 class DiscordCoreAPI_Dll icon_hash {
459 icon_hash() =
default;
461 icon_hash& operator=(jsonifier::string_view
string);
463 icon_hash(jsonifier::string_view
string);
465 bool operator==(jsonifier::string_view rhs)
const;
467 bool operator==(
const icon_hash& rhs)
const;
469 friend jsonifier::string operator+(
const icon_hash& lhs, jsonifier::string rhs);
471 operator jsonifier::string()
const;
543 return computePermissions(guildMember, channel);
552 if ((jsonifier::strToUint64(computePermissions(guildMember, channel).data()) &
static_cast<uint64_t
>(
permission)) ==
static_cast<uint64_t
>(
permission)) {
563 permissions_base setValue(computeBasePermissions(guildMember));
564 return static_cast<value_type*
>(setValue);
570 uint64_t permissionsInteger = *
static_cast<value_type*
>(
this);
571 for (
auto valueNew: permissionsToRemove) {
572 permissionsInteger &= ~static_cast<uint64_t>(valueNew);
574 std::stringstream sstream{};
575 sstream << permissionsInteger;
576 *
static_cast<value_type*
>(
this) = jsonifier::string{ sstream.str() };
581 DCA_INLINE
void addPermissions(
const jsonifier::vector<permission>& permissionsToAdd) {
582 uint64_t permissionsInteger = *
static_cast<value_type*
>(
this);
583 for (
auto valueNew: permissionsToAdd) {
584 permissionsInteger |=
static_cast<uint64_t
>(valueNew);
586 std::stringstream sstream{};
587 sstream << permissionsInteger;
588 *
static_cast<value_type*
>(
this) = jsonifier::string{ sstream.str() };
594 jsonifier::vector<jsonifier::string> returnVector{};
595 uint64_t permissionsInteger = *
static_cast<value_type*
>(
this);
596 if (permissionsInteger & (1ll << 3)) {
597 for (int64_t x = 0; x < 46; ++x) {
598 permissionsInteger |= 1ll << x;
602 returnVector.emplace_back(
"create instant invite");
605 returnVector.emplace_back(
"kick members");
608 returnVector.emplace_back(
"ban members");
611 returnVector.emplace_back(
"administrator");
614 returnVector.emplace_back(
"manage channels");
617 returnVector.emplace_back(
"manage guild");
620 returnVector.emplace_back(
"add reactions");
623 returnVector.emplace_back(
"view audit log");
626 returnVector.emplace_back(
"priority speaker");
629 returnVector.emplace_back(
"stream");
632 returnVector.emplace_back(
"view channel");
635 returnVector.emplace_back(
"send messages");
638 returnVector.emplace_back(
"send tts messages");
641 returnVector.emplace_back(
"manage messages");
644 returnVector.emplace_back(
"embed links");
647 returnVector.emplace_back(
"attach files");
650 returnVector.emplace_back(
"read message history");
653 returnVector.emplace_back(
"mention everyone");
656 returnVector.emplace_back(
"use external emoji");
659 returnVector.emplace_back(
"view guild insights");
662 returnVector.emplace_back(
"connect");
665 returnVector.emplace_back(
"speak");
668 returnVector.emplace_back(
"mute members");
671 returnVector.emplace_back(
"deafen members");
674 returnVector.emplace_back(
"move members");
677 returnVector.emplace_back(
"use vad");
680 returnVector.emplace_back(
"change nickname");
683 returnVector.emplace_back(
"manage nicknames");
686 returnVector.emplace_back(
"manage roles");
689 returnVector.emplace_back(
"manage webhooks");
692 returnVector.emplace_back(
"manage emojis and stickers");
695 returnVector.emplace_back(
"use application commands");
698 returnVector.emplace_back(
"request to speak");
701 returnVector.emplace_back(
"manage events");
704 returnVector.emplace_back(
"manage threads");
707 returnVector.emplace_back(
"create public threads");
710 returnVector.emplace_back(
"create private threads");
713 returnVector.emplace_back(
"use external stickers");
716 returnVector.emplace_back(
"send messages in threads");
719 returnVector.emplace_back(
"start embedded activities");
722 returnVector.emplace_back(
"moderate members");
725 returnVector.emplace_back(
"view creator monetization analytics");
728 returnVector.emplace_back(
"use soundboard");
731 returnVector.emplace_back(
"use external sounds");
734 returnVector.emplace_back(
"send voice messages");
742 jsonifier::string returnString = *
static_cast<value_type*
>(
this);
750 for (int64_t x = 0; x < 46; ++x) {
751 allPerms |= 1ll << x;
753 std::stringstream
stream{};
755 return jsonifier::string{
stream.str() };
759 DCA_INLINE permissions_base() =
default;
761 DiscordCoreAPI_Dll
static jsonifier::string computeOverwrites(jsonifier::string_view basePermissions,
const guild_member_data& guildMember,
const channel_data& channel);
763 DCA_INLINE
static jsonifier::string computePermissions(
const guild_member_data& guildMember,
const channel_data& channel) {
764 jsonifier::string permissions = computeBasePermissions(guildMember);
765 permissions = computeOverwrites(permissions, guildMember, channel);
769 DiscordCoreAPI_Dll
static jsonifier::string computeBasePermissions(
const guild_member_data& guildMember);
772 class permissions_parse :
public permissions_base<permissions_parse>,
public jsonifier::string {
774 template<
typename value_type>
friend class permissions_base;
776 DCA_INLINE permissions_parse() =
default;
778 DCA_INLINE permissions_parse& operator=(jsonifier::string_view valueNew) {
779 resize(valueNew.size());
780 std::memcpy(data(), valueNew.data(), size());
784 DCA_INLINE permissions_parse(jsonifier::string_view valueNew) {
788 DCA_INLINE permissions_parse& operator=(uint64_t valueNew) {
789 *
this = jsonifier::toString(valueNew);
793 DCA_INLINE permissions_parse(uint64_t valueNew) {
797 DCA_INLINE permissions_parse substr(uint64_t offset, uint64_t count)
const {
798 return substr(offset, count);
801 DCA_INLINE uint64_t size()
const {
802 return jsonifier::string::size();
805 DCA_INLINE
char* data()
const {
806 return jsonifier::string::data();
809 DCA_INLINE
operator uint64_t()
const {
810 return jsonifier::strToUint64(data());
816 template<
typename value_type>
friend class permissions_base;
818 DCA_INLINE permissions() =
default;
820 DCA_INLINE permissions& operator=(
const permissions_parse& other) {
821 value = other.operator uint64_t();
825 DCA_INLINE permissions(
const permissions_parse& other) {
829 DCA_INLINE permissions& operator=(jsonifier::string_view valueNew) {
830 value = jsonifier::strToUint64(valueNew.data());
834 DCA_INLINE permissions(jsonifier::string_view valueNew) {
838 DCA_INLINE permissions& operator=(jsonifier::string&& valueNew) {
839 value = jsonifier::strToUint64(valueNew.data());
843 DCA_INLINE permissions(jsonifier::string&& valueNew) {
844 *
this = std::move(valueNew);
847 DCA_INLINE permissions& operator=(uint64_t valueNew) {
852 DCA_INLINE permissions(uint64_t valueNew) {
856 DCA_INLINE
operator uint64_t()
const {
860 DCA_INLINE
operator jsonifier::string()
const {
861 return jsonifier::toString(value);
868 DiscordCoreAPI_Dll jsonifier::string constructMultiPartData(jsonifier::string_view data,
const jsonifier::vector<file>& files);
870 DiscordCoreAPI_Dll jsonifier::string convertToLowerCase(jsonifier::string_view stringToConvert);
872 DiscordCoreAPI_Dll jsonifier::string base64Encode(jsonifier::string_view,
bool =
false);
874 DiscordCoreAPI_Dll jsonifier::string loadFileContents(jsonifier::string_view filePath);
876 DiscordCoreAPI_Dll jsonifier::string utf8MakeValid(jsonifier::string_view inputString);
878 DiscordCoreAPI_Dll jsonifier::string urlEncode(jsonifier::string_view inputString);
880 DiscordCoreAPI_Dll
void spinLock(uint64_t timeInNsToSpinLockFor);
882 DiscordCoreAPI_Dll jsonifier::string generateBase64EncodedKey();
884 DiscordCoreAPI_Dll
bool nanoSleep(int64_t ns);
A type of user_data, to represent the bot and some of its associated endpoints.
A co_routine - representing a potentially asynchronous operation/function.
A class for handling commands from user input.
discord_core_client - the main class for this library.
A websocket client, for communication via a tcp-connection.
Data structure representing a single guild_member_data.
An interface class for the guild_member_data related discord endpoints.
An interface class for the guild_data related discord endpoints.
An awaitable that can be used to launch the co_routine onto a new thread - as well as return the hand...
Permissions_base class, for representing and manipulating permission values.
DCA_INLINE void removePermissions(const jsonifier::vector< permission > &permissionsToRemove)
Removes one or more permissions_base from the current permissions_base value.
static DCA_INLINE jsonifier::string getCurrentGuildPermissions(const guild_member_data &guildMember)
Returns a string containing the currently held permissions_base in a given guild.
static DCA_INLINE jsonifier::string getCurrentChannelPermissions(const guild_member_data &guildMember, const channel_data &channel)
Returns a string containing all of a given user's permissions_base for a given channel.
DCA_INLINE void addPermissions(const jsonifier::vector< permission > &permissionsToAdd)
Adds one or more permissions_base to the current permissions_base value.
static DCA_INLINE jsonifier::string getAllPermissions()
Returns a string containing all of the possible permissions_base.
DCA_INLINE jsonifier::string getCurrentPermissionString()
Returns a string containing the currently held permissions_base.
DCA_INLINE jsonifier::vector< jsonifier::string > displayPermissions()
Displays the currently present permissions_base in a string, and returns A vector with each of them s...
DCA_INLINE bool checkForPermission(const guild_member_data &guildMember, const channel_data &channel, permission permission)
Checks for a given permission in a chosen channel_data, for a specific user_data.
An interface class for the reaction_data related discord endpoints.
voice_connection class - represents the connection to a given voice channel_data.
input_event_response_type
Input event response types.
text_format
Represents which text format to use for websocket transfer.
activity_type
Activity types.
gateway_intents
Gateway intents.
permission
Permission values, for a given channel, by role_data or guild_member_data.
DiscordCoreAPI_Dll jsonifier::string getTimeAndDate()
Acquires a timeStamp with the current time and date - suitable for use in message-embeds.
@ Ephemeral_Interaction_Response
Ephemeral interaction response.
@ Ephemeral_Deferred_Response
Deferred ephemeral response.
@ Interaction_Response
Interaction response.
@ Modal_Interaction_Response
Respond to an interaction with a popup modal.
@ Edit_Interaction_Response
Interaction response edit.
@ Application_Command_AutoComplete_Result
Respond to an autocomplete interaction with suggested choices.
@ Edit_Follow_Up_Message
Follow-up message edit.
@ Ephemeral_Follow_Up_Message
Ephemeral follow-up message_data.
@ Follow_Up_Message
Follow-up message_data.
@ Guild_Scheduled_Events
Scheduled events.
@ Privileged_Intents
Privileged intents requiring id.
@ Guild_Integrations
Intent for receipt of guild integrations.
@ Guild_Message_Typing
Intent for receipt of guild message typing notifications.
@ Message_Content
Intent for receipt of message content.
@ All_Intents
Every single intent.
@ Default_Intents
Default intents (all non-privileged intents).
@ Guild_Bans
Intent for receipt of guild bans.
@ Guild_Message_Reactions
Intent for receipt of guild message reactions.
@ Direct_Message_Typing
Intent for receipt of direct message typing notifications.
@ Guild_Invites
Intent for receipt of guild invites.
@ Guild_Emojis
Intent for receipt of guild emojis.
@ Guild_Presences
Intent for receipt of guild presences.
@ Guild_Webhooks
Intent for receipt of guild webhooks.
@ Guild_VoiceStates
Intent for receipt of guild voice states.
@ Direct_Message_Reactions
Intent for receipt of direct message reactions.
@ Guild_Messages
Intent for receipt of guild messages.
@ Guild_Members
Intent for receipt of guild members.
@ Auto_Moderation_Execution
auto moderation configuration.
@ Direct_Messages
Intent for receipt of direct messages (dms).
@ Send_Voice_Messages
Allows sending voice messages.
@ View_Channel
Allows guild members to view a channel, which includes reading messages in text channels.
@ Use_External_Sounds
Allows the usage of custom soundboard sounds from other servers.
@ Manage_Events
Allows for creating, editing, and deleting scheduled events.
@ administrator
Allows all permissions and bypasses channel permission overwrites.
@ View_Creator_Monetization_Analytics
Allows for viewing role subscription insights.
@ Use_Application_Commands
Allows members to use application commands, including slash commands and context menu.
@ Manage_Messages
Allows for deletion of other users messages.
@ Use_VAD
Allows for using voice-activity-detection in a voice channel.
@ Manage_Nicknames
Allows for modification of other users nicknames.
@ Change_Nickname
Allows for modification of own nickname.
@ Create_Instant_Invite
Allows creation of instant invites.
@ speak
Allows for speaking in a voice channel.
@ Use_Soundboard
Allows for using soundboard in a voice channel.
@ Move_Members
Allows for moving of members between voice channels.
@ Send_Messages_in_Threads
Allows for sending messages in threads.
@ Priority_Speaker
Allows for using priority speaker in a voice channel.
@ Read_Message_History
Allows for reading of message history.
@ Manage_Guild_Expressions
Allows management and editing of emojis, stickers, and soundboard sounds.
@ Use_Embedded_Activities
Allows for using activities (applications with the embedded flag) in a voice channel.
@ Manage_Webhooks
Allows management and editing of webhooks.
@ Mute_Members
Allows for muting members in a voice channel.
@ Manage_Roles
Allows management and editing of roles.
@ Create_Private_Threads
Allows for creating protected threads.
@ Use_External_Emojis
Allows the usage of custom emojis from other servers.
@ Kick_Members
Allows kicking members.
@ View_Audit_Log
Allows for viewing of audit logs.
@ connect
Allows for joining of a voice channel.
@ Manage_Threads
Allows for deleting and archiving threads, and viewing all protected threads.
@ Create_Public_Threads
Allows for creating public and announcement threads.
@ Use_External_Stickers
Allows the usage of custom stickers from other servers.
@ Send_TTS_Messages
Allows for sending of /tts messages.
@ Manage_Channels
Allows management and editing of channels.
@ Ban_Members
Allows banning members.
@ Mention_Everyone
Allows for using the at-everyone tag to notify all users in a channel.
@ Attach_Files
Allows for uploading images and files.
@ Manage_Guild
Allows management and editing of the guild.
@ Moderate_Members
Allows for timing out users to prevent them from sending or reacting to messages in chat.
@ Request_to_Speak
Allows for requesting to speak in stage channels. (this permission is under active development).
@ Add_Reactions
Allows for the addition of reactions to messages.
@ Send_Messages
Allows for sending messages in a channel and creating threads in a forum.
@ Embed_Links
Links sent by users with this permission will be auto-embedded.
@ View_Guild_Insights
Allows for viewing guild insights.
@ Deafen_Members
Allows for deafening of members in a voice channel.
@ stream
Allows the user to go live.
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...
audio_frame_type
Audio frame types.
stream_type
For selecting the type of streamer that the given bot is, one must be one server and one of client pe...
@ encoded
Encoded audio data.
Color constants for use in the embed_data color values.
static constexpr jsonifier::string_view blue_aquamarine
Blue aquamarine.
static constexpr jsonifier::string_view submarine
Submarine.
static constexpr jsonifier::string_view orange
Orange.
static constexpr jsonifier::string_view ruby
Ruby.
static constexpr jsonifier::string_view dark_gray
Dark gray.
static constexpr jsonifier::string_view vivid_violet
Vivid violet.
static constexpr jsonifier::string_view gray
Gray.
static constexpr jsonifier::string_view raspberry
Raspberry.
static constexpr jsonifier::string_view blue_green
Blue green.
static constexpr jsonifier::string_view endeavour
Endeavor.
static constexpr jsonifier::string_view discord_black
Discord black.
static constexpr jsonifier::string_view red
Red.
static constexpr jsonifier::string_view light_gray
Light gray.
static constexpr jsonifier::string_view lime
Lime.
static constexpr jsonifier::string_view medium_sea_green
Medium sea green.
static constexpr jsonifier::string_view wrx_blue
Wrx blue.
static constexpr jsonifier::string_view cadmium_green
cadmium green.
static constexpr jsonifier::string_view tahiti_gold
Tahiti gold.
static constexpr jsonifier::string_view black
Black.
static constexpr jsonifier::string_view sti_blue
Sti blue.
static constexpr jsonifier::string_view deep_sea
Deep sea.
static constexpr jsonifier::string_view scarlet_red
Scarlet red.
static constexpr jsonifier::string_view cinnabar
cinnabar.
static constexpr jsonifier::string_view magenta
Magenta.
static constexpr jsonifier::string_view gray_chateau
Gray chateau.
static constexpr jsonifier::string_view white
White.
static constexpr jsonifier::string_view jazzberry_jam
Jazzberry jam.
static constexpr jsonifier::string_view forest_green
Forest green.
static constexpr jsonifier::string_view blue
Blue.
static constexpr jsonifier::string_view moon_yellow
Moon yellow.
static constexpr jsonifier::string_view light_sea_green
Light sea green.
static constexpr jsonifier::string_view rust
Rust.
static constexpr jsonifier::string_view deep_lilac
Deep lilac.
static constexpr jsonifier::string_view aquamarine
Aquamarine.
static constexpr jsonifier::string_view summer_sky
Summer skye.
static constexpr jsonifier::string_view yellow
Yellow.
static constexpr jsonifier::string_view bismark
Bismark.
static constexpr jsonifier::string_view sea_green
Sea green.
static constexpr jsonifier::string_view pink
Pink.
static constexpr jsonifier::string_view dark_goldenrod
Dark goldenrod.
static constexpr jsonifier::string_view discord_white
Discord white.
static constexpr jsonifier::string_view cyan
cyan.
static constexpr jsonifier::string_view ralli_art_crimson
Ralliart crimson.
static constexpr jsonifier::string_view brown
Brown.
static constexpr jsonifier::string_view green
Green.
The main namespace for the forward-facing interfaces.
jsonifier::string name
Name of the activity.
jsonifier::string details
What the player is currently doing.
snowflake applicationId
Application id for the game.
jsonifier::string url
Stream url, is validated when type is 1.
time_stamps timestamps
Timestamps object unix timestamps for start and / or end of the game.
activity_type type
Activity's type.
uint64_t createdAt
Unix timestamp(in milliseconds) of when the activity was added to the user's session.
jsonifier::string state
User's current party status, or text used for a custom status.
Represents a single frame of audio data.
jsonifier::vector< uint8_t > data
The audio data.
int64_t currentSize
The current size of the allocated memory.
For selecting the caching style of the library.
bool cacheGuildMembers
Do we cache guild_members?
bool cacheVoiceStates
Do we cache voices states?
bool cacheUsers
Do we cache users?
bool cacheChannels
Do we cache channels?
bool cacheRoles
Do we cache roles?
bool cacheGuilds
Do we cache guilds?
Configuration data for the library's main class, discord_core_client.
gateway_intents intents
The gateway intents to be used for this instance.
jsonifier::vector< repeated_function_data > functionsToExecute
Functions to execute after a timer, or on a repetition.
text_format textFormat
Use etf or json format for websocket transfer?
update_presence_data presenceData
Presence data to initialize your bot with.
logging_options logOptions
Options for the output/logging of the library.
uint16_t connectionPort
A potentially alternative connection port for the websocket.
jsonifier::string botToken
Your bot's token.
sharding_options shardOptions
Options for the sharding of your bot.
jsonifier::string connectionAddress
A potentially alternative connection address for the websocket.
cache_options cacheOptions
Options for the cache of the library.
Data representing a file to be sent via multipart-form data.
Loggin options for the library.
bool logGeneralErrorMessages
Do we log general error messages to std::cout?
bool logWebSocketErrorMessages
Do we log the websocket error messages to std::cout?
bool logHttpsSuccessMessages
Do we log https response success messages to std::cout?
bool logHttpsErrorMessages
Do we log https response error messages to std::cout?
bool logWebSocketSuccessMessages
Do we log the websocket success messages to std::cout?
bool logGeneralSuccessMessages
Do we log general success messages to std::cout?
Data that is received as part of a voice server update event.
Data that is received as part of a voice state update event.
Function data for repeated functions to be loaded.
std::function< void(discord_core_client *)> function
The std::function char* to be loaded.
uint32_t intervalInMs
The time interval at which to call the std::function.
bool repeated
Whether or not the std::function is repeating.
Sharding options for the library.
uint32_t numberOfShardsForThisProcess
The number of shards to launch on the current process.
uint32_t startingShard
The first shard to start on this process.
uint32_t totalNumberOfShards
The total number of shards that will be launched across all processes.
For connecting two bots to stream the vc contents between the two.
uint16_t port
The port to connect to.
bool streamBotAudio
Do we stream the audio coming from other bots?
jsonifier::string address
The address to connect to.
stream_type type
The type of streamer that this is. set one to client and one to server.
For updating a user's presence.
For connecting to a voice-channel. "streamInfo" is used when a SOCKET is created to connect this bot ...
int32_t currentShard
The current websocket shard, if applicable.
bool selfDeaf
Self-deafen the bot?
snowflake channelId
The channel id to connect to.
stream_info streamInfo
The info for the stream-SOCKET, if applicable.
snowflake guildId
The guild id to connect to.
bool selfMute
Self-mute the bot?
snowflake userId
This bot's user id.