oops
This commit is contained in:
parent
2a35abdce0
commit
9829b2bf9b
1 changed files with 4 additions and 3 deletions
|
@ -43,9 +43,6 @@ export const modrinthCommand = async (
|
|||
}
|
||||
|
||||
const res = await fetch('https://api.modrinth.com/v2/project/' + id);
|
||||
const data = (await res.json()) as
|
||||
| ModrinthProject
|
||||
| { error: string; description: string };
|
||||
|
||||
if (!res.ok) {
|
||||
await i.editReply({
|
||||
|
@ -60,6 +57,10 @@ export const modrinthCommand = async (
|
|||
return;
|
||||
}
|
||||
|
||||
const data = (await res.json()) as
|
||||
| ModrinthProject
|
||||
| { error: string; description: string };
|
||||
|
||||
if ('error' in data) {
|
||||
console.error(data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue