Skip to content

Commit

Permalink
fix the query search for replies
Browse files Browse the repository at this point in the history
  • Loading branch information
Xm0onh committed Jan 3, 2025
1 parent a9b261f commit f642882
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions auto-agents-framework/src/services/twitter/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ const getMyRecentReplies = async (
maxResults: number = 10,
): Promise<Tweet[]> => {
const userRepliesIterator = scraper.searchTweets(
`from:${username}`,
`from:${username} filter:replies`,
maxResults,
SearchMode.Latest,
);
const replies: Tweet[] = [];
try {
for await (const reply of userRepliesIterator) {
if (replies.length >= maxResults) break;
replies.push(reply);
}
} catch (error) {
Expand Down

0 comments on commit f642882

Please sign in to comment.