diff --git a/BuildDockerAndUpload.sh b/BuildDockerAndUpload.sh index 2ea7011..05b27b5 100755 --- a/BuildDockerAndUpload.sh +++ b/BuildDockerAndUpload.sh @@ -1,4 +1,10 @@ #!/bin/bash +if [ "$(id -u)" -ne 0 ]; then + exec sudo "$0" "$@" +fi +cd build +cmake .. && make +cd .. cat password | docker login -u happytanuki12 --password-stdin docker build --tag happytanuki12/bumblebee:latest . docker push happytanuki12/bumblebee:latest \ No newline at end of file diff --git a/include/Audio/MusicPlayManager.hpp b/include/Audio/MusicPlayManager.hpp index 497076c..d4da2a3 100644 --- a/include/Audio/MusicPlayManager.hpp +++ b/include/Audio/MusicPlayManager.hpp @@ -1,6 +1,4 @@ #pragma once -#ifndef _MUSICPLAYMANAGER_HPP_ -#define _MUSICPLAYMANAGER_HPP_ #include #include #include @@ -50,7 +48,7 @@ public: void setRepeat(const dpp::snowflake guildId, const bool value); bool getRepeat(const dpp::snowflake guildId); - std::list getQueue(const dpp::snowflake guildId); + std::pair>>, std::list>::iterator> getQueue(const dpp::snowflake guildId); MusicQueueElement getNowPlaying(const dpp::snowflake guildId); std::condition_variable queuedCondition; @@ -63,7 +61,6 @@ private: std::unordered_map> queueEmptyMutex; - void send_audio_to_voice(const MusicQueueElement& music, dpp::discord_voice_client* client); + void send_audio_to_voice(std::shared_ptr music, dpp::discord_voice_client* client); }; -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/include/Commands/BumbleBeeCommand.hpp b/include/Commands/BumbleBeeCommand.hpp index b095fe3..a97143f 100644 --- a/include/Commands/BumbleBeeCommand.hpp +++ b/include/Commands/BumbleBeeCommand.hpp @@ -1,6 +1,4 @@ #pragma once -#ifndef _BUMBLEBEECOMMAND_HPP_ -#define _BUMBLEBEECOMMAND_HPP_ #include #include