.
This commit is contained in:
1 parent
5286e4d1ed
commit
62368c720e
12 files changed
+477
-59
No files matched your search
@@ -11,6 +11,7 @@ import { AccountRegisterHandler } from './handlers/account-register.handler';
|
||||
import { MatchCancelHandler } from './handlers/match-cancel.handler';
|
||||
import { MatchJoinHandler } from './handlers/match-join.handler';
|
||||
import { MatchListHandler } from './handlers/match-list.handler';
|
||||
import { PreferredPositionRegisterHandler } from './handlers/preferred-position-register.handler';
|
||||
|
||||
const INBOUND_SUBJECT_DEFAULT = 'lolympus-tournament-support.kakaotalk.command';
|
||||
|
||||
@@ -30,6 +31,7 @@ export class DakaoSubscriber implements OnModuleInit {
|
||||
private readonly matchListHandler: MatchListHandler,
|
||||
private readonly matchJoinHandler: MatchJoinHandler,
|
||||
private readonly matchCancelHandler: MatchCancelHandler,
|
||||
private readonly preferredPositionRegisterHandler: PreferredPositionRegisterHandler,
|
||||
) {}
|
||||
|
||||
async onModuleInit() {
|
||||
@@ -113,6 +115,14 @@ export class DakaoSubscriber implements OnModuleInit {
|
||||
matchAndRiotId: command.matchAndRiotId,
|
||||
senderUserId: event.userId,
|
||||
senderNickname,
|
||||
positions: command.positions?.positions,
|
||||
});
|
||||
break;
|
||||
case 'preferred-position-register':
|
||||
segments = await this.preferredPositionRegisterHandler.handle({
|
||||
communityId,
|
||||
senderUserId: event.userId,
|
||||
senderNickname,
|
||||
positions: command.positions.positions,
|
||||
});
|
||||
break;
|
||||
@@ -202,15 +212,15 @@ export class DakaoSubscriber implements OnModuleInit {
|
||||
const text = ((): string => {
|
||||
switch (err.code) {
|
||||
case 'unknown_command':
|
||||
return ` 알 수 없는 명령어입니다. 사용법: !내전 목록, !내전 계정등록 <게임명>#<태그>, !내전 신청 [ID 또는 제목] <게임명>#<태그> <포지션1>,<포지션2>, !내전 취소 <ID>, !내전 참가취소 <ID>`;
|
||||
return ` 알 수 없는 명령어입니다. 사용법: !내전 일정, !내전 계정등록 <게임명>#<태그>, !내전 선호포지션등록 미드,정글, !내전 신청 [코드] [게임명#태그] [포지션1,포지션2], !내전 취소 <코드>`;
|
||||
case 'usage':
|
||||
return ` 사용법: !내전 목록, !내전 계정등록 <게임명>#<태그>, !내전 신청 [ID 또는 제목] <게임명>#<태그> <포지션1>,<포지션2>, !내전 취소 <ID>, !내전 참가취소 <ID>`;
|
||||
return ` 사용법: !내전 일정, !내전 계정등록 <게임명>#<태그>, !내전 선호포지션등록 미드,정글, !내전 신청 [코드] [게임명#태그] [포지션1,포지션2], !내전 취소 <코드>`;
|
||||
case 'invalid_match_id':
|
||||
return ` 매치 ID 형식이 올바르지 않습니다 (${err.detail ?? ''}).`;
|
||||
case 'invalid_riot_id':
|
||||
return ` 라이엇 ID 형식이 올바르지 않습니다 (예: 프리리#KR1).`;
|
||||
case 'invalid_position':
|
||||
return ` 포지션 입력이 올바르지 않습니다. 최소 2개, 중복 없이, 인식되는 별칭(탑/정글/미드/원딜/서폿) 사용.`;
|
||||
return ` 포지션 입력이 올바르지 않습니다. 최소 2개, 중복 없이, 인식되는 별칭(탑/정글/미드/원딜/서폿/SUP/SPT) 사용.`;
|
||||
default:
|
||||
return ` 명령을 처리할 수 없습니다.`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user