diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts index 10a7af7..4b60c92 100644 --- a/src/events/messageCreate.ts +++ b/src/events/messageCreate.ts @@ -89,7 +89,7 @@ export default event(Events.MessageCreate, async ({ log, msgHist, ollama, client // Check for channel-wide bot-to-bot cooldown const channelCooldownKey = `channel:${message.channelId}:bot_cooldown` - const cooldownPeriod = 60 // 1 minute + const cooldownPeriod = 300 // Increased from 60 to 300 seconds (5 minutes) if (isBotMessage) { log(`Checking bot-to-bot cooldown for channel ${message.channelId}.`) try { @@ -360,7 +360,7 @@ export default event(Events.MessageCreate, async ({ log, msgHist, ollama, client } // Log initial sentiments with two decimals - log(`Initial sentiments - User ${message.author.id}: ${userSentiment.toFixed(2)}, Bot: ${ OLLAMA_NUM_LAYERS=40botSentiment.toFixed(2)}`) + log(`Initial sentiments - User ${message.author.id}: ${userSentiment.toFixed(2)}, Bot: ${botSentiment.toFixed(2)}`) // Construct sentiment data for prompt const sentimentData = `User ${message.author.id} sentiment: ${userSentiment.toFixed(2)}, Bot sentiment: ${botSentiment.toFixed(2)}`