groupme-js / node-groupme

The only GroupMe API library for NodeJS that isn't a million years old.
https://groupme.js.org
MIT License
27 stars 11 forks source link

Get messages #13

Closed not-so-smart closed 2 years ago

not-so-smart commented 3 years ago

GroupMessageManager#fetch(): Promise<Collection<string, Message>> GroupMessageManager#fetch(options: GroupMessageFetchOptions): Promise<Collection<string, Message>>

Fetches messages from a group. The options parameter can be used to modify the query. If called with no arguments, this function fetches all messages in the group.

Usage:

const group = client.groups.cache.get('12345')

group.messages.fetch()
group.messages.fetch({ limit: 50 })

A useful overload of this method would be fetch(id: string) to fetch a single message from a group.