fix(tts): follow user across voice channels without dropping session; remove Chzzk cookies
- VoiceSession.moveTo: destroy(false) + join instead of disconnect()/destroy(). The old path sent a leave payload first, so Discord emitted voiceStateUpdate(channel=null) and endSession() killed the session while moving. - voiceStateUpdate: when the bot itself is moved, only sync the channel. - getVoiceChannel: user's channel first, then the session's channel, then the bot's cached voice channel. - Remove CHZZK_NID_AUT/SES and token fetch; Chzzk TTS works without them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,8 +67,6 @@ db/
|
||||
| `TOKEN` | ✅ | 봇 토큰 |
|
||||
| `PREFIX` | ✅ | 메시지 명령어 prefix (예: `!`) |
|
||||
| `DBPATH` | ✅ | SQLite 파일 경로 (예: `./db/data.db`) |
|
||||
| `CHZZK_NID_AUT` | ✅ | 네이버 NID_AUT 쿠키 (치지직 TTS 인증) |
|
||||
| `CHZZK_NID_SES` | ✅ | 네이버 NID_SES 쿠키 |
|
||||
| `GUILDID` | △ | `DEV=true`일 때만 사용 (DEV 길드 한정 슬래시 등록 대상). 그 외에는 미설정이어도 무방 |
|
||||
| `DEV` | 선택 | `true`면 글로벌 대신 `GUILDID`에만 슬래시 등록 |
|
||||
| `DEBUG` | 선택 | `true`면 명령어 오류 스택 로깅 |
|
||||
@@ -108,7 +106,7 @@ Dockerfile은 `node:22-bookworm-slim` 기반이며 `ffmpeg`을 설치한다. (
|
||||
2. 텍스트 전처리(URL/멘션/이모지 치환) → 시그니처 키워드 분할
|
||||
3. 각 조각을 Chzzk TTS로 합성 또는 캐시된 시그니처 mp3 사용
|
||||
4. mp3 Buffer 결합 → `Transcode`에서 PCM 변환 → `VoiceSession.player.play()`
|
||||
5. 일정 시간 idle 시 세션 자동 종료, 사용자 채널 이동 시 따라감
|
||||
5. 일정 시간 idle 시 세션 자동 종료. 채팅한 유저가 음성채널에 있으면 그 채널로 이동해 재생하고, 음성채널에 없으면 봇이 있는 채널에서 재생
|
||||
|
||||
## 참고
|
||||
|
||||
|
||||
Reference in New Issue
Block a user