Skip to content

Commit

Permalink
bug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Feb 20, 2024
1 parent 92f4331 commit 556a371
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/discord/commands/global/d.ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,15 @@ export async function aiReaction(
const thumbsUpEmojis = ['πŸ‘', 'πŸ‘πŸ»', 'πŸ‘πŸΌ', 'πŸ‘πŸ½', 'πŸ‘πŸΎ', 'πŸ‘πŸΏ', 'ts_thumbup'];
const thumbsDownEmojis = ['πŸ‘Ž', 'πŸ‘ŽπŸ»', 'πŸ‘ŽπŸΌ', 'πŸ‘ŽπŸ½', 'πŸ‘ŽπŸΎ', 'πŸ‘ŽπŸΏ', 'ts_thumbdown'];
if (messageReaction.message.reference === null) return;
const originalMessage = await messageReaction.message.fetchReference();
let originalMessage = {} as Message;
try {
originalMessage = await messageReaction.message.fetchReference();
} catch (error) {
log.error(F, `Error fetching reference: ${error}`);
log.error(F, `Reaction: ${JSON.stringify(messageReaction, null, 2)}`);
log.error(F, `Message: ${JSON.stringify(messageReaction.message, null, 2)}`);
return;
}
const aiLinkData = await getLinkedChannel(originalMessage.channel);

// log.debug(F, `aiLinkData: ${JSON.stringify(aiLinkData, null, 2)}`);
Expand Down

0 comments on commit 556a371

Please sign in to comment.