사람 나갈 때 음악 꺼지는 문제 해결결

This commit is contained in:
2025-02-13 17:22:42 +09:00
parent ea7d42638e
commit 2a238f804d
2 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ C++ Dpp 라이브러리를 이용해서 개발된 간단한 디스코드 음악
<div align="center">
<a href="https://github.com/brainboxdotcc/DPP" alt="DPP"> <img src="DPP-markdown-logo.png" /> </a>
</div>
[![CodeFactor](https://www.codefactor.io/repository/github/happytanuki/bumblecee/badge)](https://www.codefactor.io/repository/github/happytanuki/bumblecee)
[![CodeFactor](https://www.codefactor.io/repository/github/happytanuki/bumblecee/badge)][https://www.codefactor.io/repository/github/happytanuki/bumblecee]
# 어떻게 써요?
1. 실행파일 경로에 config.json 파일을 만들고 다음과 같이 입력하세요:

View File

@@ -16,10 +16,10 @@ void MusicPlayManager::on_voice_track_marker(const dpp::voice_track_marker_t& ev
play(event.voice_client);
}
void MusicPlayManager::on_voice_client_disconnect(const dpp::voice_client_disconnect_t& event) { // 안 불리는 듯?
dpp::snowflake gid = dpp::find_channel(event.voice_client->channel_id)->guild_id;
event.voice_client->stop_audio();
queueMap[gid]->clear();
void MusicPlayManager::on_voice_client_disconnect(const dpp::voice_client_disconnect_t& event) { // 이거 봇이 나갈 때가 아니고 같이 있는 유저가 나갈 때였고
// dpp::snowflake gid = dpp::find_channel(event.voice_client->channel_id)->guild_id;
// event.voice_client->stop_audio();
// queueMap[gid]->clear();
}
void MusicPlayManager::play(dpp::discord_voice_client* client) {