Skip to content

Commit c6da87c

Browse files
authored
parse min max setting to int
1 parent 1871e9b commit c6da87c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/client-twitter/src/post.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export class TwitterPostClient extends ClientBase {
3131

3232
onReady(postImmediately: boolean = true) {
3333
const generateNewTweetLoop = () => {
34-
const minMinutes = this.runtime.getSetting("POST_INTERVAL_MIN") || 5;
35-
const maxMinutes = this.runtime.getSetting("POST_INTERVAL_MAX") || 15;
34+
const minMinutes = parseInt(this.runtime.getSetting("POST_INTERVAL_MIN")) || 5;
35+
const maxMinutes = parseInt(this.runtime.getSetting("POST_INTERVAL_MAX")) || 15;
3636
const randomMinutes = Math.floor(Math.random() * (maxMinutes - minMinutes + 1)) + minMinutes;
3737
const delay = randomMinutes * 60 * 1000;
3838

0 commit comments

Comments
 (0)