Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Discussion options

You must be logged in to vote

You can do that by iterating through them:

for await (const message of client.iterMessages(yourChat)) {
  // use message
}

This is how you can use the above method to put all of them into an array:

const messages = new Array<Api.Message>();
for await (const message of client.iterMessages(yourChat)) {
  messages.push(message);
} 

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ainizoda
Comment options

@rojvv
Comment options

@ainizoda
Comment options

@painor
Comment options

@privorka
Comment options

Answer selected by ainizoda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants