|
void | connect (dpp::cluster &bot, const dpp::message_create_t &ev) |
| Connects the bot to a voice channel that the user requesting is in. More...
|
|
void | disconnect (dpp::cluster &bot, const dpp::message_create_t &ev) |
| Disconnects the bot to a voice channel that the user requesting is in. More...
|
|
void | play (dpp::cluster &bot, const dpp::message_create_t ev, const std::string &pcm_name, const std::string &pcm_data) |
| Play a new track. More...
|
|
size_t | get_tracks_remaining (const dpp::message_create_t &ev) |
| Get the number of tracks remaining in the queue of the requesting user's server. More...
|
|
void | skip (const dpp::message_create_t &ev) |
| Skip to the next track. More...
|
|
void | stop (const dpp::message_create_t &ev) |
| Clear the track queue. More...
|
|
void | pause (const dpp::message_create_t &ev) |
| Pause the track queue. More...
|
|
void | resume (const dpp::message_create_t &ev) |
| Resume the track queue. More...
|
|
◆ connect()
void ffss::SSMsgVoice::connect |
( |
dpp::cluster & |
bot, |
|
|
const dpp::message_create_t & |
ev |
|
) |
| |
Connects the bot to a voice channel that the user requesting is in.
- Parameters
-
bot | a reference to a cluster. |
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The user must be in a voice channel.
◆ disconnect()
void ffss::SSMsgVoice::disconnect |
( |
dpp::cluster & |
bot, |
|
|
const dpp::message_create_t & |
ev |
|
) |
| |
Disconnects the bot to a voice channel that the user requesting is in.
- Parameters
-
bot | a reference to a cluster. |
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- Exceptions
-
std::runtime_error | if the bot is not in a voice channel or the voice state is otherwise erroneous. |
◆ get_tracks_remaining()
size_t ffss::SSMsgVoice::get_tracks_remaining |
( |
const dpp::message_create_t & |
ev | ) |
|
Get the number of tracks remaining in the queue of the requesting user's server.
- Parameters
-
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- Returns
- The number of tracks remaining.
◆ pause()
void ffss::SSMsgVoice::pause |
( |
const dpp::message_create_t & |
ev | ) |
|
Pause the track queue.
- Parameters
-
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- There must be at least one track playing.
◆ play()
void ffss::SSMsgVoice::play |
( |
dpp::cluster & |
bot, |
|
|
const dpp::message_create_t |
ev, |
|
|
const std::string & |
pcm_name, |
|
|
const std::string & |
pcm_data |
|
) |
| |
Play a new track.
- Parameters
-
bot | a reference to a cluster. |
ev | a reference to the event the user generated. |
pcm_name | the name of the track. |
pcm_data | the raw PCM data of the track. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
pcm_data
is valid PCM data. - Exceptions
-
std::runtime_error | if there is an erroneous state in the object, which would likely be a developer bug. |
◆ resume()
void ffss::SSMsgVoice::resume |
( |
const dpp::message_create_t & |
ev | ) |
|
Resume the track queue.
- Parameters
-
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- There must be at least one track playing.
◆ skip()
void ffss::SSMsgVoice::skip |
( |
const dpp::message_create_t & |
ev | ) |
|
Skip to the next track.
- Parameters
-
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- There must be at least one track playing.
◆ stop()
void ffss::SSMsgVoice::stop |
( |
const dpp::message_create_t & |
ev | ) |
|
Clear the track queue.
- Parameters
-
ev | a reference to the event the user generated. |
Documented preconditions are as follows:
- The bot must be in a voice channel.
- There must be at least one track playing.
The documentation for this class was generated from the following files:
- /home/user/git/projects_2023/ffss2/src/ss/SSMsgVoice.h
- /home/user/git/projects_2023/ffss2/src/ss/SSMsgVoice.cpp