Skip to content

Commit

Permalink
okay one more log
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Dec 10, 2023
1 parent d344cec commit 71e7353
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/discord/commands/global/d.ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ export async function discordAiChat(
if (!env.OPENAI_API_ORG || !env.OPENAI_API_KEY) return;
await messageData.fetch();

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

const channelMessages = await messageData.channel.messages.fetch({ limit: 10 });
// log.debug(F, `channelMessages: ${JSON.stringify(channelMessages.map(message => message.cleanContent), null, 2)}`);
Expand Down
4 changes: 4 additions & 0 deletions src/discord/utils/messageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ export async function messageCommand(message: Message): Promise<void> {
const displayName = message.member ? message.member.displayName : message.author.username;
// log.debug(F, `message: ${JSON.stringify(message, null, 2)}`);

if (message.guild.id === env.DISCORD_GUILD_ID) {
log.debug(F, `message: ${JSON.stringify(message, null, 2)}`);
} // Log messages from tripsit for debugging

// Ignore messages that start with ~~, these are usually strikethrough messages
if (message.content.startsWith('~~')) { return; }

Expand Down

0 comments on commit 71e7353

Please sign in to comment.