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