Skip to content

Can't get lastMessage from other users #5428

Closed Locked Answered by tipakA
TheMathGeek314 asked this question in Q&A
Discussion options

You must be logged in to vote

lastMessageID is dependant on cache. Cache is empty when you start the bot, and API does not send you every message from every channel when you log your bot in. Library caches messages that were received since the bot started up, but to get anything beyond that, you have to fetch messages.

You cannot fetch messages from specific users (and search is not available for bot accounts). You also cannot fetch messages from multiple channels at once, so to get actually most recent message from a user, you would have to fetch unspecified amount of messages from unspecified amount of channels, in worst case ending up with fetching all messages in a server and getting no results.

There isn't really…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@TheMathGeek314
Comment options

@DaStormer
Comment options

@TheMathGeek314
Comment options

@DaStormer
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by iCrawl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants