#include <dpp/dpp.h>
#include <iomanip>
#include <sstream>
int main(int argc, char const *argv[])
{
uint8_t* robot = nullptr;
size_t robot_size = 0;
std::ifstream input ("../testdata/Robot.pcm", std::ios::in|std::ios::binary|std::ios::ate);
if (input.is_open()) {
robot_size = input.tellg();
robot = new uint8_t[robot_size];
input.seekg (0, std::ios::beg);
input.read ((char*)robot, robot_size);
input.close();
}
std::string command;
ss >> command;
if (command == ".join") {
bot.message_create(
dpp::message(channel_id,
"You don't seem to be on a voice channel! :("));
}
}
if (command == ".robot") {
}
}
});
bot.start(false);
return 0;
}
The cluster class represents a group of shards and a command queue for sending and receiving commands...
Definition: cluster.h:221
discord_voice_client & send_audio_raw(uint16_t *audio_data, const size_t length)
Send raw audio to the voice channel.
bool is_ready()
voice client is ready to stream audio. The voice client is considered ready if it has a secret key.
Represents a guild on Discord (AKA a server)
Definition: guild.h:163
bool connect_member_voice(snowflake user_id, bool self_mute=false, bool self_deaf=false)
Connect to a voice channel another guild member is in.
snowflake id
Definition: discord.h:44
Represents a connection to a voice channel. A client can only connect to one voice channel per guild ...
Definition: discordclient.h:59
class discord_voice_client * voiceclient
voice websocket client
Definition: discordclient.h:88
CoreExport guild * find_guild(snowflake id)
Create message.
Definition: dispatcher.h:682
message * msg
Definition: dispatcher.h:688
Represents messages sent and received on Discord.
Definition: message.h:841
user * author
Definition: message.h:849
snowflake guild_id
Definition: message.h:847
std::string content
Definition: message.h:853