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{ 0 }, Bool selfDeaf=false, Bool selfMute=false, StreamType streamType=StreamType::None, StreamInfo streamInfo=StreamInfo{})
 For connecting to an individual voice channel. More...
 
- Public Member Functions inherited from DiscordCoreAPI::DiscordEntity
String getCreatedAtTimestamp (TimeFormat timeFormat)
 Converts the snowflake-id into a time and date stamp. More...
 

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.
 
Int8 flags { 0 }
 Guild flags.
 
std::vector< Snowflake > guildScheduledEvents {}
 Array of Guild channels.
 
IconHash icon {}
 Url to the Guild's icon.
 
TimeStamp< std::chrono::milliseconds > joinedAt {}
 When the bot joined this Guild.
 
Int32 memberCount { 0 }
 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{ 0 },
Bool  selfDeaf = false,
Bool  selfMute = false,
StreamType  streamType = StreamType::None,
StreamInfo  streamInfo = StreamInfo{} 
)

For connecting to an individual voice channel.

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.
streamTypeFor usage with the Vc-to-Vc audio streaming option.
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 1290 of file FoundationEntities.cpp.

Here is the call graph for this function:

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