![]() |
DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
|
A class representing the Song APIs. More...
#include <SongAPI.hpp>
Static Public Member Functions | |
static Song | addSongToQueue (const GuildMember &guildMember, Song &song) |
Adds a Song to the current Playlist's queue. | |
static bool | areWeCurrentlyPlaying (const Snowflake guildId) |
Checks if there is currently playing music for the current Guild. | |
static Song | getCurrentSong (const Snowflake guildId) |
Collects the currently playing Song. | |
static Playlist | getPlaylist (const Snowflake guildId) |
Collects the Playlist from the SongAPI. | |
static bool | isLoopAllEnabled (const Snowflake guildId) |
Returns the current loop-all status of the current Guild's Playlist. | |
static bool | isLoopSongEnabled (const Snowflake guildId) |
Returns the current loop-song of the current Guild's Playlist. | |
static bool | isThereAnySongs (const Snowflake guildId) |
Checks to see if there are any playable Songs in the current Playlist. | |
static void | modifyQueue (int32_t firstSongPosition, int32_t secondSongPosition, const Snowflake guildId) |
Sets the position of a Song in the current Playlist's song queue. | |
static void | onSongCompletion (std::function< CoRoutine< void >(SongCompletionEventData)> handler, const Snowflake guildId) |
For setting up behavior in response to a completed song. | |
static void | pauseToggle (const Snowflake guildId) |
Toggles pausing on and off. | |
static bool | play (const Snowflake guildId) |
Plays the current Song. (Assuming that you are currently connected to a VoiceConnection). | |
static std::vector< Song > | searchForSong (const std::string &searchQuery, const Snowflake guildId) |
Search for a Song to play. | |
static bool | sendNextSong (const GuildMember &guildMember) |
Send the next playable song off of the current Guild's Playlist to be played. | |
static void | setCurrentSong (const Song &song, const Snowflake guildId) |
Sets the currently playing Song. | |
static void | setLoopAllStatus (bool enabled, const Snowflake guildId) |
Enables or disables the loop-all status of the playlist. | |
static void | setLoopSongStatus (bool enabled, const Snowflake guildId) |
Enables or disables the loop-song status of the playlist. | |
static void | setPlaylist (const Playlist &playlistNew, const Snowflake guildId) |
Sets the playlist of the desired Guild. | |
static void | skip (const GuildMember &guildMember) |
Skips to the next Song in the queue, if applicable. | |
static void | stop (const Snowflake guildId) |
Stops the currently playing Song. | |
|
static |
guildMember | The GuildMember that is adding the Song to the queue. |
song | The Song to be added to the queue. |
Definition at line 217 of file SongAPI.cpp.
|
static |
guildId | The id for the desired Guild to check the current playing status. |
Definition at line 125 of file SongAPI.cpp.
|
static |
|
static |
Definition at line 228 of file SongAPI.cpp.
|
static |
guildId | The id of the Guild for which you would like to check the loop-all status of. |
Definition at line 187 of file SongAPI.cpp.
|
static |
guildId | The id of the Guild for which you would like to check the loop-song status of. |
Definition at line 195 of file SongAPI.cpp.
|
static |
Definition at line 199 of file SongAPI.cpp.
|
static |
|
static |
handler | A delegate taking a SongCompletionEventData structure as an argument. |
guildId | The id of the Guild for which you would like to instantiate this event. |
Definition at line 38 of file SongAPI.cpp.
|
static |
Definition at line 121 of file SongAPI.cpp.
|
static |
Definition at line 117 of file SongAPI.cpp.
|
static |
|
static |
guildMember | The GuildMember who is requesting the Song to be sent. |
Definition at line 273 of file SongAPI.cpp.
|
static |
|
static |
enabled | A bool representing whether or not to enable the loop-all status. |
guildId | The Guild id for which Guild to update this status in. |
Definition at line 183 of file SongAPI.cpp.
|
static |
enabled | A bool representing whether or not to enable the loop-song status. |
guildId | The Guild id for which Guild to update this status in. |
Definition at line 191 of file SongAPI.cpp.
|
static |
playlistNew | The new Playlist to be set. |
guildId | The id of the desired Guild to set the Playlist of. |
Definition at line 224 of file SongAPI.cpp.
|
static |
guildMember | The GuildMember structure of the individual who is skipping the Song. |
Definition at line 129 of file SongAPI.cpp.
|
static |
guildId | The id of the Guild within which to stop the currently playing music. |
Definition at line 146 of file SongAPI.cpp.