robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
122 stars 12 forks source link

Read messages? #8

Closed piqueza closed 1 year ago

piqueza commented 1 year ago

Hi.

Is there the ability to receive messages sent to @me, or to a group? mudslide --help only shows send commands, but not read commands.

TIA.

robvanderleek commented 1 year ago

Hi @piqueza

Mudslide is (currently) for sending only. I don't know what your use case is (happy to hear 😄) but if you're building something like a chatbot I think you're better off using the WhatsApp API library directly.

piqueza commented 1 year ago

Hi @robvanderleek

So far I found it very intuitive to use, once I got the NPM versions and dependencies resolved. My use case is not a chatbot per se, but for the program to read a group for keywords and then alert a particular user about this.

Ex: I administer several servers for several different companies, and while I am the contact person on the group as company owner, when I am in a consultation or neck deep in Cat6 I would like for the ability to have mudslide read a particular group on a cron and then send a message to our work team or the technician on duty to say something like problem reported.

Alternatively if I can action on a keyword-read I can make a ticket for an issue on our osticket instance.

I could use the API, but mudslide is much easier to get going than what the business api seems be.

robvanderleek commented 1 year ago

Thanks for detailing your use case 👍

I checked the WhatsApp library Mudslide is based upon but unfortunately, it has a TODO for getting chat history (my idea was to create a command that reads a bit of the chat history for a specific user/group.)

If it's not possible to get a chat history upon launch I guess this feature needs to be implemented by running a long-term process and acting upon certain keywords in certain channels. Not sure if Mudslide is the right tool for that job, it looks similar to what (ChatOps) bots do (the library Mudslide uses suggests this framework but I haven't used that myself.

piqueza commented 1 year ago

Thanks so much for the helpful feedback. I used mudslide this morning to demo something to potential clients, it was super easy to implement into a python program that I could build a basic demo in an hour or so.

I'll take a look at the other framework you pointed to, see if that suits my requirement, for now mudslide does 90% what I need to do now.

[Edit] Can I close as not resolved for now?

robvanderleek commented 1 year ago

Great to hear @piqueza

Do note that the working of Mudslide depends on this external library and since that is not an official supported library it could stop working when WhatsApp decides to change the API/block certain clients/etc.

All the best with your business, I'll close this issue now 😄