-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Rename into Judging * feat: Add JudgingStatus * feat: Add waitingJudgingEmoji * fix: Fix as hasNoTestCases * feat: Enforce JudgingCommand * fix: Update test * fix: Make emoji high resolution * fix: Replace with internal emoji
- Loading branch information
1 parent
36fcb44
commit 732d56a
Showing
5 changed files
with
105 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export const judgingStatuses = [ | ||
'CE', | ||
'MLE', | ||
'TLE', | ||
'RE', | ||
'OLE', | ||
'IE', | ||
'WA', | ||
'AC' | ||
] as const; | ||
|
||
export type JudgingStatus = typeof judgingStatuses[number]; | ||
|
||
export function isJudgingStatus(str: string): str is JudgingStatus { | ||
return (judgingStatuses as readonly string[]).includes(str); | ||
} | ||
|
||
export function hasNoTestCases(status: JudgingStatus): boolean { | ||
return status === 'CE'; | ||
} | ||
|
||
export function emojiOf(status: JudgingStatus): string { | ||
switch (status) { | ||
case 'CE': | ||
return '<:CE:981118707264811018>'; | ||
case 'MLE': | ||
return '<:MLE:981118706916675614>'; | ||
case 'TLE': | ||
return '<:TLE:714879875969712193>'; | ||
case 'RE': | ||
return '<:RE:981118707222872084>'; | ||
case 'OLE': | ||
return '<:OLE:981118707088637962>'; | ||
case 'IE': | ||
return '<:IE:981118706920865802>'; | ||
case 'WA': | ||
return '<:WA:714879905111736320>'; | ||
case 'AC': | ||
return '<:AC:714879672353161236>'; | ||
} | ||
} | ||
|
||
export const waitingJudgingEmoji = '<:WJ:714879935256461355>'; |
This file contains 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
This file contains 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
This file contains 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