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

Send message #14

Open not-so-smart opened 3 years ago

not-so-smart commented 3 years ago

Polymorphic send

this is going to involve a lot of overload signatures and type checking.

Group#send(text: string): Promise<Message> Group#send(options: GroupSendMessageOptions): Promise<Message>

Sends a message to a group.

Usage:

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

group.send('hi guys')
group.send({
    text: "here's a picture of my dog",
    image: "https://i.imgur.com/NPUoRh5.png" 
})

come up with more overloads later, like sending a message with only an image or a user resolvable or something like that