#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:216
void send_audio(uint16_t *audio_data, const size_t length, bool use_opus=true)
Send 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:162
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:52
class discord_voice_client * voiceclient
voice websocket client
Definition: discordclient.h:81
guild * find_guild(snowflake id)
Create message.
Definition: dispatcher.h:655
message * msg
Definition: dispatcher.h:661
Represents messages sent and received on Discord.
Definition: message.h:731
user * author
Definition: message.h:739
snowflake guild_id
Definition: message.h:737
std::string content
Definition: message.h:743