mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: no embed errors
This commit is contained in:
1 parent
6094875ffb
commit
8946f115c0
8 files changed
+15
-33
No files matched your search
@@ -11,8 +11,7 @@ export default async function getTankStats(region: Region, id: number) {
|
||||
|
||||
if (tankStats[id] === null) {
|
||||
throw new UserError(
|
||||
'No tank stats available',
|
||||
"This player doesn't have any stats available. This may not be the player you are looking for.",
|
||||
"# No tank stats available\nThis player doesn't have any stats available. This may not be the player you are looking for.",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { go } from 'fuzzysort';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import {
|
||||
tankDefinitions,
|
||||
tanksDefinitionsArray,
|
||||
@@ -16,8 +17,7 @@ export default async function resolveTankId(tank: string | number) {
|
||||
|
||||
if (searchResult.length === 0) {
|
||||
throw new UserError(
|
||||
'Tank not found',
|
||||
`Could not find tank by the name "${tank}".`,
|
||||
`# Tank not found\nCould not find tank by the name "${markdownEscape(tank)}".`,
|
||||
);
|
||||
} else {
|
||||
return searchResult[0].obj.id;
|
||||
@@ -27,8 +27,7 @@ export default async function resolveTankId(tank: string | number) {
|
||||
return number;
|
||||
} else {
|
||||
throw new UserError(
|
||||
'Tank not found',
|
||||
`Could not find tank by the ID "${number}". Try typing the name of the tank instead of a number.`,
|
||||
`# Tank not found\nCould not find tank by the ID "${number}". Try typing the name of the tank instead of a number.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user