-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto buttons and special dialogs #96
Comments
number 1 is possible |
How, and what is the correct making if it? |
yes you can, first one is button message, second is list message. you should explore more bcs this library has very few examples haha for button message and you can implement like
|
Thanks @ander890
msg := &waProto.Message{
ListResponseMessage: &waProto.ListResponseMessage{
Title: proto.String("title"),
Description: proto.String("Description"),
SingleSelectReply: &waProto.SingleSelectReply{
SelectedRowId: proto.String("SelectedRowId1"),
},
// ContextInfo: ,
ListType: waProto.ListResponseMessage_SINGLE_SELECT.Enum(),
},
}
msg := &waProto.Message{
ListMessage: &waProto.ListMessage{
Title: proto.String("ListMessage title"),
Description: proto.String("ListMessage Description"),
FooterText: proto.String("ListMessage footer"),
ButtonText: proto.String("ListMessage ButtonText"),
ListType: waProto.ListMessage_SINGLE_SELECT.Enum(),
Sections: []*waProto.Section{
{
Title: proto.String("Section1 title"),
Rows: []*waProto.Row{
{
RowId: proto.String("id1"),
Title: proto.String("ListMessage section row title"),
Description: proto.String("ListMessage section row desc"),
},
{
RowId: proto.String("id2"),
Title: proto.String("title 2"),
Description: proto.String("desc 2"),
},
},
},
{
Title: proto.String("Section2 title"),
Rows: []*waProto.Row{
{
RowId: proto.String("id1"),
Title: proto.String("ListMessage section row title"),
Description: proto.String("ListMessage section row desc"),
},
{
RowId: proto.String("id2"),
Title: proto.String("title 2"),
Description: proto.String("desc 2"),
},
},
},
},
},
} Then sending it as: jid, ok := parseJID("966xxxxx")
if !ok {
return
}
send, err := cli.SendMessage(jid, "", msg) // jid = recipient
if err != nil {
log.Errorf("Error sending message: %v", err)
} else {
log.Infof("Message sent (server timestamp: %s)", send)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Not sure if the title is clear or misleading, but here what I'm looking for, that I got wile contacting some WhatsApp business account:
Is there something like this at Whatsmeow package? Thanks
The text was updated successfully, but these errors were encountered: