dimaskiddo/go-whatsapp-cli

Question about handler

Closed this issue · 4 comments

b4-io commented

How do I use the textMessgeHandler? ive tried to use it, modified the code but cant seem to learn where to properly call the function nd how. And it doesn't do anything with the default code.
thanks in advance

Hi @AbyssEkko did you mean the text command and responses?
if it yes, the command and responses is defined in share/commands.json

b4-io commented

Im sorry if i didnt explain my self correctly, the question is where should I add the "HandleTextMessage" in the daemon so that it work, currently i tried many different ways but none of them worked. I see theres a line in the code that says "Welcome to Go WhatsApp CLI\nPlease Test Any Handler Here!" but that means all the handlers are already working or should i do something

Thanks.

No problem hehe

after that message it shoud wait for a few seconds and handler will attach, you can see in ctl/daemon.go the handler was defined in hlp/libs/whatsapp.go

Clossing this issue since there is no continuation of discussion
Thank's 👍