File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ TWITTER_PASSWORD= # Account password
34
34
TWITTER_EMAIL = # Account email
35
35
TWITTER_2FA_SECRET =
36
36
TWITTER_COOKIES = # Account cookies
37
+ TWITTER_POLL_INTERVAL = 120 # How often (in seconds) the bot should check for interactions
37
38
X_SERVER_URL =
38
39
XAI_API_KEY =
39
40
XAI_MODEL =
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class ClientBase extends EventEmitter {
178
178
username ,
179
179
this . runtime . getSetting ( "TWITTER_PASSWORD" ) ,
180
180
this . runtime . getSetting ( "TWITTER_EMAIL" ) ,
181
- this . runtime . getSetting ( "TWITTER_2FA_SECRET" )
181
+ this . runtime . getSetting ( "TWITTER_2FA_SECRET" ) || undefined
182
182
) ;
183
183
184
184
if ( await this . twitterClient . isLoggedIn ( ) ) {
Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ export class TwitterInteractionClient {
96
96
this . handleTwitterInteractions ( ) ;
97
97
setTimeout (
98
98
handleTwitterInteractionsLoop ,
99
- ( Math . floor ( Math . random ( ) * ( 5 - 2 + 1 ) ) + 2 ) * 60 * 1000
100
- ) ; // Random interval between 2-5 minutes
99
+ Number (
100
+ this . runtime . getSetting ( "TWITTER_POLL_INTERVAL" ) || 120
101
+ ) * 1000 // Default to 2 minutes
102
+ ) ;
101
103
} ;
102
104
handleTwitterInteractionsLoop ( ) ;
103
105
}
You can’t perform that action at this time.
0 commit comments