fix: Lavalink 노드 미연결 시 unhandledRejection 방지
노드가 CONNECTED 상태가 아닐 때 joinVoiceChannel이 throw 되어 fire-and-forget handleMessage에서 처리되지 않은 Promise 거부로 번지던 문제 수정. - LavalinkManager.hasReadyNode() 추가 - channelJoin에서 노드 미연결 시 안내 임베드 반환 + join try/catch - messageCreate의 handleMessage 호출에 .catch 추가 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,11 @@ export class LavalinkManager {
|
||||
});
|
||||
}
|
||||
|
||||
/** 연결 가능한(CONNECTED 상태) Lavalink 노드가 하나라도 있는지 확인 */
|
||||
hasReadyNode(): boolean {
|
||||
return !!this.shoukaku.options.nodeResolver(this.shoukaku.nodes);
|
||||
}
|
||||
|
||||
getPlayer(guildId: string) {
|
||||
return this.players.get(guildId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user