9xN / node-ig-framework

Framework for interacting with instagrams private api in a usable manner in a structure and format similar to discord's old bot development framework.
GNU Affero General Public License v3.0
25 stars 8 forks source link

Create the equivalent of the chat.awaitMessage of discord.js #19

Closed gaetan20 closed 8 months ago

gaetan20 commented 9 months ago

Hello, I findyour repo really usefull but in my opinion a function that while wait for a message is missing. Or maybe there's another way to do. If so, could you please explain me how to do this.

My goal is to create a quizz that while ask questions and then give a recap of the answers.

Thanks by advance for your help !

9xN commented 9 months ago

Hello, I findyour repo really usefull but in my opinion a function that while wait for a message is missing. Or maybe there's another way to do. If so, could you please explain me how to do this.

My goal is to create a quizz that while ask questions and then give a recap of the answers.

Thanks by advance for your help !

hello! thank you for your interest in the project! there is a way you could implement this using the message collector for a set amount of time or unlimited and wait for a certain amount of messages to be received or other events then stop the collector

librewolf_G4TJHXS9BM

Properties .chat

The chat in which the messages should be collected Type: Chat .client

The client that instantiated this Type: Client .ended

Whether this collector is ended Type: boolean .filter

The filter to apply Type: Function .idle

How long to stop the collector after inactivity in milliseconds Type: number Methods .end(reason)

End the collector Parameter Type Description reason string

The reason the collector ended Returns: void Events

Emitted when the collector ends Parameter Type Description reason Message

The reason the collector ended

Emitted when a message is collected by the collector Parameter Type Description message Message

The collected message

gaetan20 commented 9 months ago

Thank you ! i'll try that

gaetan20 commented 9 months ago

Update : it works fine thank you ! Is there a way to collect likes ?

9xN commented 9 months ago

Update : it works fine thank you ! Is there a way to collect likes ?

Awesome! likes on a message? or a post?

gaetan20 commented 9 months ago

on a message

9xN commented 9 months ago

not using a collector but you can check the like count: image librewolf_5QhFrQkGMr

gaetan20 commented 9 months ago

ok thank you. Or maybe with the likeAdd event ?