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:
tkrmagid
2026-06-11 01:32:32 +09:00
parent 67ff52227d
commit d335287e7e
3 changed files with 36 additions and 5 deletions

View File

@@ -19,7 +19,9 @@ const cmdErr = (message: Message, commandName: string | undefined | null): void
export const messageCreate = async (message: Message): Promise<void> => {
if (message.author.bot || message.channel.type === ChannelType.DM) return;
if (!message.content.startsWith(client.prefix)) {
handleMessage(message);
handleMessage(message).catch((err) => {
Logger.error(`[messageCreate] handleMessage 처리 중 에러: ${String(err)}`);
});
return;
}