question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get older messages of a specific user in DM

See original GitHub issue

Form

Put an [x] if you meet the condition, else leave [ ].

  • [ x ] I’ve searched the Issues
  • [ x ] I’ve read the basic concepts
  • [ x ] I’m using the latest version

How to get older message of a specific user in a DM I am able to get only 10 after that it return the same 10 items. The feed.isMoreAvailable() returns false even if it’s old. feed.items() always return the chatList not the meesage.

const threadFeed = igClient.feed.directInbox();
console.log(threadFeed.isMoreAvailable()); // returns false
exports.getOlderMessages = async function (chatId) {
  const items = await threadFeed.items();
  const thread = items.find((chat) => chat.thread_id === chatId);
  console.log(threadFeed.isMoreAvailable()); // returns false
  return thread;
};

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Nerixyzcommented, Apr 23, 2020

How to get older message of a specific user in a DM

In this case you want to use the directThread(threadId) feed.

0reactions
dyigitpolatcommented, Jan 1, 2021

Could you please tell how to do

#1002 (comment)

Replace directInbox() with directThread(threadId)

getting 404 error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you View Old Messages on Discord?
If you want to see the oldest one you can click on the oldest one. Click on search and choose “has: link, embed,...
Read more >
How To Delete Your DM History On Discord - Online Tech Tips
Before Discord, we never knew what it was like to have a messaging service permanently store our conversation history in the cloud.
Read more >
How to retrieve previous messages with discord.py
You can use discord.TextChannel.last_message to get the last message of a channel. @client.event async def on_message(message): c_channel ...
Read more >
Making old direct messages accessible - Discord Support
I know the DMs are safekept in there somewhere, I know they can be accessed, I just want the means to actually open...
Read more >
How To Delete All Messages in Discord - Player Assist
To delete messages in your Discord chat app, use the following commands: Use '!clear @username' to delete a specific user's previous 100 messages....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found