generated from nhcarrigan/template
fix: log when no response
This commit is contained in:
parent
e8e6b596ac
commit
b6350fbc74
@ -74,6 +74,10 @@ export const onMessage = async(message: Message): Promise<void> => {
|
||||
response?.text ?? "There was an error. Please try again later.",
|
||||
);
|
||||
|
||||
if (!response) {
|
||||
await logger.log("info", `No response from AI, here's the payload: ${JSON.stringify(messages)}`);
|
||||
}
|
||||
|
||||
await calculateCost(messages.usage, message.author.username);
|
||||
} catch (error) {
|
||||
await logger.error("message event", error as Error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user