feat: 전체 성능 개선 및 텍스트·슬래시 명령 로직 리팩토링 - #72
Merged
Merged
Conversation
feat: 급식 캐시 개선 및 관리자 권한 에러를 본인만 보이게 변경
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
봇 전반의 응답 속도, DB 부하, 안정성을 개선하고 텍스트/슬래시 명령의 중복 로직을 정리했습니다.
성능
fetch로 통일해 매 요청마다 하던 TLS 핸드셰이크를 없앰cache.ts): 동시에 들어온 같은 요청은 한 번만 호출하고, "결과 없음"도 짧게 캐시 (시간표·학사일정·날씨)getUser2회 → 대부분 1회!랭킹용(guild_id, balance)인덱스 추가!로 시작하지 않는 일반 채팅은 GIF 키워드·알림 마법사만 확인버그 수정
!출석/!일/!지원금/!송금연타 시 중복 지급·잔액 초과 송금 (조건부 UPDATE로 원자 처리)!알림목록이 2000자 제한으로 전송 실패하던 문제리팩토링
Ctx에defer/replyPrivate/isAdmin추가, 음악·카지노·스케줄러·시간표의 텍스트/슬래시 중복 제거 (음악 642 → 410줄)handleAdminToggle로 이동ephemeral: true→MessageFlags.Ephemeralnpm test스크립트, 캐시·게임 세션 단위 테스트 추가동작 변화
!play의 "검색 중..." 메시지 → 입력 중 표시 (API 호출 2회 절약)timezone: "Z"설정 (Docker 환경은 원래 UTC라 동일)테스트
npm run typecheck,npm run format:check,npm test(30개) 통과🤖 Generated with Claude Code