Skip to content

Commit f37c889

Browse files
authored
Merge pull request elizaOS#2683 from elizaOS/tcm-clean-code
fix: remove wrong comment
2 parents 74a0f1a + 1113bb7 commit f37c889

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

packages/client-twitter/src/post.ts

+30-8
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,28 @@ export class TwitterPostClient {
118118
`- Post Interval: ${this.client.twitterConfig.POST_INTERVAL_MIN}-${this.client.twitterConfig.POST_INTERVAL_MAX} minutes`
119119
);
120120
elizaLogger.log(
121-
`- Action Processing: ${this.client.twitterConfig.ENABLE_ACTION_PROCESSING ? "enabled" : "disabled"}`
121+
`- Action Processing: ${
122+
this.client.twitterConfig.ENABLE_ACTION_PROCESSING
123+
? "enabled"
124+
: "disabled"
125+
}`
122126
);
123127
elizaLogger.log(
124128
`- Action Interval: ${this.client.twitterConfig.ACTION_INTERVAL} minutes`
125129
);
126130
elizaLogger.log(
127-
`- Post Immediately: ${this.client.twitterConfig.POST_IMMEDIATELY ? "enabled" : "disabled"}`
131+
`- Post Immediately: ${
132+
this.client.twitterConfig.POST_IMMEDIATELY
133+
? "enabled"
134+
: "disabled"
135+
}`
128136
);
129137
elizaLogger.log(
130-
`- Search Enabled: ${this.client.twitterConfig.TWITTER_SEARCH_ENABLE ? "enabled" : "disabled"}`
138+
`- Search Enabled: ${
139+
this.client.twitterConfig.TWITTER_SEARCH_ENABLE
140+
? "enabled"
141+
: "disabled"
142+
}`
131143
);
132144

133145
const targetUsers = this.client.twitterConfig.TWITTER_TARGET_USERS;
@@ -274,7 +286,6 @@ export class TwitterPostClient {
274286
await this.generateNewTweet();
275287
}
276288

277-
// Only start tweet generation loop if not in dry run mode
278289
generateNewTweetLoop();
279290
elizaLogger.log("Tweet generation loop started");
280291

@@ -874,7 +885,9 @@ export class TwitterPostClient {
874885
const formattedConversation = thread
875886
.map(
876887
(t) =>
877-
`@${t.username} (${new Date(t.timestamp * 1000).toLocaleString()}): ${t.text}`
888+
`@${t.username} (${new Date(
889+
t.timestamp * 1000
890+
).toLocaleString()}): ${t.text}`
878891
)
879892
.join("\n\n");
880893

@@ -934,7 +947,12 @@ export class TwitterPostClient {
934947
formattedConversation,
935948
imageContext:
936949
imageDescriptions.length > 0
937-
? `\nImages in Tweet:\n${imageDescriptions.map((desc, i) => `Image ${i + 1}: ${desc}`).join("\n")}`
950+
? `\nImages in Tweet:\n${imageDescriptions
951+
.map(
952+
(desc, i) =>
953+
`Image ${i + 1}: ${desc}`
954+
)
955+
.join("\n")}`
938956
: "",
939957
quotedContent,
940958
}
@@ -1082,7 +1100,9 @@ export class TwitterPostClient {
10821100
const formattedConversation = thread
10831101
.map(
10841102
(t) =>
1085-
`@${t.username} (${new Date(t.timestamp * 1000).toLocaleString()}): ${t.text}`
1103+
`@${t.username} (${new Date(
1104+
t.timestamp * 1000
1105+
).toLocaleString()}): ${t.text}`
10861106
)
10871107
.join("\n\n");
10881108

@@ -1132,7 +1152,9 @@ export class TwitterPostClient {
11321152
formattedConversation,
11331153
imageContext:
11341154
imageDescriptions.length > 0
1135-
? `\nImages in Tweet:\n${imageDescriptions.map((desc, i) => `Image ${i + 1}: ${desc}`).join("\n")}`
1155+
? `\nImages in Tweet:\n${imageDescriptions
1156+
.map((desc, i) => `Image ${i + 1}: ${desc}`)
1157+
.join("\n")}`
11361158
: "",
11371159
quotedContent,
11381160
}

0 commit comments

Comments
 (0)