We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5039ca7 + 9ed83a9 commit e14b4f8Copy full SHA for e14b4f8
packages/client-twitter/src/base.ts
@@ -313,6 +313,8 @@ export class ClientBase extends EventEmitter {
313
314
async fetchTimelineForActions(count: number): Promise<Tweet[]> {
315
elizaLogger.debug("fetching timeline for actions");
316
+
317
+ const agentUsername = this.runtime.getSetting("TWITTER_USERNAME");
318
const homeTimeline = await this.twitterClient.fetchHomeTimeline(
319
count,
320
[]
@@ -340,7 +342,7 @@ export class ClientBase extends EventEmitter {
340
342
tweet.legacy?.entities?.media?.filter(
341
343
(media) => media.type === "video"
344
) || [],
- }));
345
+ })).filter(tweet => tweet.username !== agentUsername); // do not perform action on self-tweets
346
}
347
348
async fetchSearchTweets(
0 commit comments