@@ -23,13 +23,13 @@ import { DiscordUserClient } from './discordUserClient';
23
23
24
24
// Constants
25
25
const MARKETING_CONSTANTS = {
26
- MIN_MARKETING_INTERVAL : 2 * 60 * 1000 , // 2 minutes
27
- MAX_MARKETING_INTERVAL : 2 * 60 * 1000 , // 2 minutes
28
- BASE_WAIT_TIME : 4 * 60 * 1000 , // 4 minutes
29
- MIN_MESSAGES_BEFORE_REPLY : 2 , // Reduced for testing
30
- TIME_REDUCTION_PER_MESSAGE : 1 * 60 * 1000 , // 1 minute
31
- MIN_WAIT_TIME : 2 * 60 * 1000 , // 2 minutes
32
- MAX_MARKETING_MESSAGES_PER_GROUP : 96
26
+ MIN_MARKETING_INTERVAL : 6 * 60 * 60 * 1000 , // 6 hours
27
+ MAX_MARKETING_INTERVAL : 6 * 60 * 60 * 1000 , // 6 hours
28
+ BASE_WAIT_TIME : 6 * 60 * 60 * 1000 , // 6 hours
29
+ MIN_MESSAGES_BEFORE_REPLY : 2 ,
30
+ TIME_REDUCTION_PER_MESSAGE : 30 * 60 * 1000 , // 30 minutes
31
+ MIN_WAIT_TIME : 4 * 60 * 60 * 1000 , // 4 hours
32
+ MAX_MARKETING_MESSAGES_PER_GROUP : 4 // 4 messages per day max (24/6)
33
33
} ;
34
34
35
35
// Base templates that incorporate character's style and behavior
@@ -90,9 +90,9 @@ export class MessageManager {
90
90
private lastMarketingTimes : Map < string , number > = new Map ( ) ;
91
91
private channelMessageCounts : Map < string , number > = new Map ( ) ;
92
92
private channelTimeReductions : Map < string , number > = new Map ( ) ;
93
- private readonly MIN_MARKETING_INTERVAL = 2 * 60 * 1000 ; // 2 minutes
94
- private readonly MAX_MARKETING_INTERVAL = 2 * 60 * 1000 ; // 2 minutes
95
- private readonly MAX_MARKETING_MESSAGES_PER_CHANNEL = 96 ; // Max messages per channel per day
93
+ private readonly MIN_MARKETING_INTERVAL = 6 * 60 * 60 * 1000 ; // 6 hours
94
+ private readonly MAX_MARKETING_INTERVAL = 6 * 60 * 60 * 1000 ; // 6 hours
95
+ private readonly MAX_MARKETING_MESSAGES_PER_CHANNEL = 4 ; // Max messages per channel per day
96
96
private marketingEnabled : boolean = false ;
97
97
98
98
constructor ( runtime : IAgentRuntime , client : DiscordUserClient ) {
@@ -579,7 +579,7 @@ export class MessageManager {
579
579
private scheduleNextMarketingMessage ( channelName : string ) : void {
580
580
if ( ! this . marketingEnabled ) return ;
581
581
582
- const interval = this . MIN_MARKETING_INTERVAL ; // Use fixed 2-minute interval for testing
582
+ const interval = this . MIN_MARKETING_INTERVAL ; // Use fixed 6-hour interval
583
583
elizaLogger . log ( `Scheduling next marketing message for ${ channelName } in ${ Math . floor ( interval / 1000 ) } seconds` ) ;
584
584
585
585
setTimeout ( async ( ) => {
0 commit comments