@elizaos/plugin-twitter 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7582,7 +7582,7 @@ var TwitterDiscoveryClient = class {
|
|
|
7582
7582
|
const accounts = /* @__PURE__ */ new Map();
|
|
7583
7583
|
for (const topic of this.config.topics.slice(0, 5)) {
|
|
7584
7584
|
try {
|
|
7585
|
-
const popularQuery = `${topic} -is:retweet -is:reply
|
|
7585
|
+
const popularQuery = `${topic} -is:retweet -is:reply lang:en`;
|
|
7586
7586
|
logger6.debug(`Searching popular tweets for topic: ${topic}`);
|
|
7587
7587
|
const popularResults = await this.twitterClient.fetchSearchTweets(
|
|
7588
7588
|
popularQuery,
|
|
@@ -7590,10 +7590,11 @@ var TwitterDiscoveryClient = class {
|
|
|
7590
7590
|
0 /* Top */
|
|
7591
7591
|
);
|
|
7592
7592
|
for (const tweet of popularResults.tweets) {
|
|
7593
|
+
if ((tweet.likes || 0) < 10) continue;
|
|
7593
7594
|
const scored = this.scoreTweet(tweet, "topic");
|
|
7594
7595
|
tweets.push(scored);
|
|
7595
7596
|
}
|
|
7596
|
-
const verifiedQuery = `${topic} -is:retweet lang:en
|
|
7597
|
+
const verifiedQuery = `${topic} -is:retweet lang:en is:verified`;
|
|
7597
7598
|
logger6.debug(`Searching verified accounts for topic: ${topic}`);
|
|
7598
7599
|
const verifiedResults = await this.twitterClient.fetchSearchTweets(
|
|
7599
7600
|
verifiedQuery,
|
|
@@ -7628,7 +7629,7 @@ var TwitterDiscoveryClient = class {
|
|
|
7628
7629
|
const accounts = /* @__PURE__ */ new Map();
|
|
7629
7630
|
const topicQuery = this.config.topics.slice(0, 3).map((t) => `"${t}"`).join(" OR ");
|
|
7630
7631
|
try {
|
|
7631
|
-
const viralQuery = `${topicQuery}
|
|
7632
|
+
const viralQuery = `${topicQuery} -is:retweet has:mentions`;
|
|
7632
7633
|
logger6.debug(`Searching viral threads with query: ${viralQuery}`);
|
|
7633
7634
|
const searchResults = await this.twitterClient.fetchSearchTweets(
|
|
7634
7635
|
viralQuery,
|
|
@@ -7636,6 +7637,8 @@ var TwitterDiscoveryClient = class {
|
|
|
7636
7637
|
0 /* Top */
|
|
7637
7638
|
);
|
|
7638
7639
|
for (const tweet of searchResults.tweets) {
|
|
7640
|
+
const engagementScore = (tweet.likes || 0) + (tweet.retweets || 0) * 2;
|
|
7641
|
+
if (engagementScore < 50) continue;
|
|
7639
7642
|
const scored = this.scoreTweet(tweet, "thread");
|
|
7640
7643
|
tweets.push(scored);
|
|
7641
7644
|
const account = this.scoreAccount({
|
|
@@ -7660,7 +7663,7 @@ var TwitterDiscoveryClient = class {
|
|
|
7660
7663
|
const accounts = /* @__PURE__ */ new Map();
|
|
7661
7664
|
for (const topic of this.config.topics.slice(0, 3)) {
|
|
7662
7665
|
try {
|
|
7663
|
-
const influencerQuery = `${topic} -is:retweet
|
|
7666
|
+
const influencerQuery = `${topic} -is:retweet (is:verified OR has:links)`;
|
|
7664
7667
|
logger6.debug(`Searching for influencers in topic: ${topic}`);
|
|
7665
7668
|
const results = await this.twitterClient.fetchSearchTweets(
|
|
7666
7669
|
influencerQuery,
|
|
@@ -7668,6 +7671,8 @@ var TwitterDiscoveryClient = class {
|
|
|
7668
7671
|
0 /* Top */
|
|
7669
7672
|
);
|
|
7670
7673
|
for (const tweet of results.tweets) {
|
|
7674
|
+
const engagement = (tweet.likes || 0) + (tweet.retweets || 0) * 2;
|
|
7675
|
+
if (engagement < 20) continue;
|
|
7671
7676
|
const scored = this.scoreTweet(tweet, "topic");
|
|
7672
7677
|
tweets.push(scored);
|
|
7673
7678
|
const estimatedFollowers = Math.max(
|