Fix droprarity and dropnumber commands (#431)
All checks were successful
Test / build (push) Successful in 20s
All checks were successful
Test / build (push) Successful in 20s
- Fix the droprarity and dropnumber commands with the changes previously made regarding image urls - Add a `CatchError` function to the app logger to easily send caught errors to the error logs - Add choices to the droprarity command to make them easier to select #429 Reviewed-on: #431 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
ad34cc7b7f
commit
9b34bc65a7
4 changed files with 83 additions and 56 deletions
|
@ -86,4 +86,12 @@ export default class AppLogger {
|
|||
public static LogSilly(label: string, message: string) {
|
||||
AppLogger.Logger.silly({ label, message });
|
||||
}
|
||||
|
||||
public static CatchError(label: string, error: unknown) {
|
||||
if (error instanceof Error) {
|
||||
AppLogger.Logger.error({ label, message: error.message });
|
||||
} else {
|
||||
AppLogger.Logger.error({ label, message: error });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue