Skip to content

Conversation

@supreme-gg-gg
Copy link

@supreme-gg-gg supreme-gg-gg commented Oct 13, 2025

This PR extends the DirectThreadEntity.broadcastText API to take in an optional thread message item (DirectThreadFeedResponseItemsItem) to reply to with the given text. This is based on how instagrapi, the Python alternative, handles sending replies. I referenced their source code here and the API is designed similarly.

Example usage

const threadFeed = ig.feed.directThread({ thread_id: thread.threadId });
const messageToReplyTo = messages[messages.length - 1]; // select a test message item to reply to
// pass in the item to reply to
const replyResponse = await thread.broadcastText('This is a reply!', messageToReplyTo);

let me know if anything needs to be changed

@supreme-gg-gg supreme-gg-gg changed the title [feat] Reply to direct thread item Feat: Reply to direct thread item Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant