Skip to content
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

Button Message #51

Closed
elpulga opened this issue Feb 9, 2022 · 9 comments
Closed

Button Message #51

elpulga opened this issue Feb 9, 2022 · 9 comments

Comments

@elpulga
Copy link

elpulga commented Feb 9, 2022

Is it possible to send button message like te image below?

image

@ramacatur
Copy link

Is it possible to send button message like te image below?

image

yes, you can

@elpulga
Copy link
Author

elpulga commented Feb 10, 2022

Is it possible to send button message like te image below?
image

yes, you can

Could you point me on the right direction to do so?

@ghost
Copy link

ghost commented Feb 10, 2022

up

@tulir
Copy link
Owner

tulir commented Feb 26, 2022

The library doesn't really care about message content, you can send whatever you want within the Message protobuf schema. For buttons, you should probably try buttonsMessage

@tulir tulir closed this as completed Feb 26, 2022
@elpulga
Copy link
Author

elpulga commented Feb 28, 2022

I got it to work using "TemplateMessage"
Thanks!

@Duckduckgot
Copy link

Can you share a code snippet?

I got it to work using "TemplateMessage" Thanks!

@ghost
Copy link

ghost commented Mar 3, 2022

msg = &waProto.Message{
	ButtonsMessage: &waProto.ButtonsMessage{
		
		HeaderType: waProto.ButtonsMessage_TEXT.Enum(),
		ContentText: proto.String("TEXT TOP"),
		Buttons: []*waProto.Button{
			{
				ButtonId: proto.String("YES"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("YES"),
				},
			},
			{
				ButtonId: proto.String("NO"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("NO"),
				},
			},
		},
		FooterText: proto.String("TEXT FOOTER"),
	}}

@Duckduckgot
Copy link

msg = &waProto.Message{
	ButtonsMessage: &waProto.ButtonsMessage{
		
		HeaderType: waProto.ButtonsMessage_TEXT.Enum(),
		ContentText: proto.String("TEXT TOP"),
		Buttons: []*waProto.Button{
			{
				ButtonId: proto.String("YES"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("YES"),
				},
			},
			{
				ButtonId: proto.String("NO"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("NO"),
				},
			},
		},
		FooterText: proto.String("TEXT FOOTER"),
	}}

Thanks.

You received a message but your version of WhatsApp doesn't support it. Update Whatsapp

@jairforero
Copy link

msg = &waProto.Message{
	ButtonsMessage: &waProto.ButtonsMessage{
		
		HeaderType: waProto.ButtonsMessage_TEXT.Enum(),
		ContentText: proto.String("TEXT TOP"),
		Buttons: []*waProto.Button{
			{
				ButtonId: proto.String("YES"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("YES"),
				},
			},
			{
				ButtonId: proto.String("NO"),
				ButtonText: &waProto.ButtonText{
					DisplayText: proto.String("NO"),
				},
			},
		},
		FooterText: proto.String("TEXT FOOTER"),
	}}

Also problem say version no compatible :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants