DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
DiscordCoreAPI::GuildData Class Reference

Data structure representing a single Guild. More...

#include <FoundationEntities.hpp>

Inheritance diagram for DiscordCoreAPI::GuildData:
[legend]

Public Member Functions

VoiceConnectionconnectToVoice (const Snowflake guildMemberId, const Snowflake channelId=Snowflake{}, bool selfDeaf=false, bool selfMute=false, StreamInfo streamInfo=StreamInfo{})
 For connecting to an individual voice channel.
 
- Public Member Functions inherited from DiscordCoreAPI::DiscordEntity
std::string getCreatedAtTimestamp (TimeFormat timeFormat)
 Converts the snowflake-id into a time and date stamp.
 

Public Data Members

std::vector< Snowflake > channels {}
 Array of Guild channels.
 
DiscordCoreClientdiscordCoreClient { nullptr }
 A pointer to the DiscordCoreClient.
 
std::vector< Snowflake > emoji {}
 Array of Guild channels.
 
GuildFlags flags {}
 Guild flags.
 
std::vector< Snowflake > guildScheduledEvents {}
 Array of Guild channels.
 
IconHash icon {}
 Url to the Guild's icon.
 
TimeStamp joinedAt {}
 When the bot joined this Guild.
 
uint32_t memberCount {}
 Member count.
 
std::vector< Snowflake > members {}
 Array of GuildMembers.
 
StringWrapper name {}
 The Guild's name.
 
Snowflake ownerId {}
 User id of the Guild's owner.
 
std::vector< PresenceUpdateDatapresences {}
 Presence states for each of the GuildMembers..
 
std::vector< Snowflake > roles {}
 Array of Guild roles.
 
std::vector< Snowflake > stageInstances {}
 Array of Guild channels.
 
std::vector< Snowflake > stickers {}
 Array of Guild channels.
 
std::vector< Snowflake > threads {}
 Array of Guild channels.
 
VoiceConnectionvoiceConnectionPtr { nullptr }
 A pointer to the VoiceConnection, if present.
 
- Public Data Members inherited from DiscordCoreAPI::DiscordEntity
Snowflake id {}
 

Member Function Documentation

◆ connectToVoice()

VoiceConnection * DiscordCoreAPI::GuildData::connectToVoice ( const Snowflake  guildMemberId,
const Snowflake  channelId = Snowflake{},
bool  selfDeaf = false,
bool  selfMute = false,
StreamInfo  streamInfo = StreamInfo{} 
)
Parameters
guildMemberIdAn id of the guild member who's current voice channel to connect to.
channelIdAn id of the voice channel to connect to.
selfDeafWhether or not to self-deafen the bot.
selfMuteWhether or not to self-mute the bot.
streamInfoFor usage with the Vc-to-Vc audio streaming option.
Returns
VoiceConnection* A pointer to the currently held voice connection, or nullptr if it failed to connect.

Definition at line 1348 of file FoundationEntities.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: