exception handler

This commit is contained in:
Fran Jurmanović
2023-10-01 14:26:13 +02:00
parent 2b192b9f94
commit c2ab9c9ba8

View File

@@ -13,6 +13,7 @@ class ClientController {
}; };
private sendMessage = async (): Promise<void> => { private sendMessage = async (): Promise<void> => {
try {
const href = await getFirstHtml(); const href = await getFirstHtml();
const { img, title } = await getImgTitle(href); const { img, title } = await getImgTitle(href);
@@ -25,6 +26,9 @@ class ClientController {
await msg.react(reaction); await msg.react(reaction);
} }
}); });
} catch (err) {
console.error(err);
}
}; };
} }