Skip to content

Commit

Permalink
Add logs to AI audit
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Feb 19, 2024
1 parent 6e3d930 commit 169b98a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/discord/commands/global/d.ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2274,6 +2274,13 @@ export async function aiReaction(
channel_id: originalMessage.channel.id,
},
});

log.debug(F, `aiLinkData: ${JSON.stringify(aiLinkData, null, 2)}`);
log.debug(F, `messageReaction: ${JSON.stringify(messageReaction, null, 2)}`);
log.debug(F, `messageReaction.message.author: ${JSON.stringify(messageReaction.message.author, null, 2)}`);
log.debug(F, `user: ${JSON.stringify(user, null, 2)}`);
log.debug(F, `Emoji name: ${messageReaction.emoji.name}`);

if (aiLinkData
&& messageReaction.message.author?.bot
&& !user.bot
Expand Down
4 changes: 2 additions & 2 deletions src/discord/events/messageReactionAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export const messageReactionAdd: MessageReactionAddEvent = {
try {
await messageReaction.fetch();
} catch (e) {
log.error(F, 'Failed to fetch messageReaction');
// log.error(F, 'Failed to fetch messageReaction');
// return;
}

try {
await messageReaction.message.fetch(); // Get the message object so that we can do stuff between restarts
} catch (e) {
log.error(F, 'Failed to fetch message data');
// log.error(F, 'Failed to fetch message data');
// return;
}

Expand Down

0 comments on commit 169b98a

Please sign in to comment.