.
This commit is contained in:
1 parent
feeb30c6a9
commit
5286e4d1ed
13 files changed
+344
-82
No files matched your search
@@ -94,9 +94,6 @@ function parseCancelArgs(args: string): DakaoCommand {
|
||||
if (matchId.length === 0) {
|
||||
throw new CommandParseError('usage');
|
||||
}
|
||||
if (!isObjectIdHex(matchId)) {
|
||||
throw new CommandParseError('invalid_match_id', matchId);
|
||||
}
|
||||
|
||||
return {
|
||||
kind: 'match-cancel',
|
||||
@@ -143,7 +140,3 @@ function parseJoinArgs(args: string): DakaoCommand {
|
||||
positions,
|
||||
};
|
||||
}
|
||||
|
||||
function isObjectIdHex(value: string): boolean {
|
||||
return /^[a-f0-9]{24}$/i.test(value);
|
||||
}
|
||||
Reference in new issue
Block a user