commit
a812fd151f
7
go.mod
Normal file
7
go.mod
Normal file
@ -0,0 +1,7 @@
|
||||
module github.com/paked/messenger
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
)
|
@ -87,6 +87,11 @@ type Response struct {
|
||||
to Recipient
|
||||
}
|
||||
|
||||
// SetToken is for using DispatchMessage from outside.
|
||||
func (r *Response) SetToken(token string) {
|
||||
r.token = token
|
||||
}
|
||||
|
||||
// Text sends a textual message.
|
||||
func (r *Response) Text(message string, messagingType MessagingType, tags ...string) error {
|
||||
return r.TextWithReplies(message, nil, messagingType, tags...)
|
||||
@ -368,7 +373,7 @@ type StructuredMessagePayload struct {
|
||||
type StructuredMessageElement struct {
|
||||
Title string `json:"title"`
|
||||
ImageURL string `json:"image_url"`
|
||||
ItemURL string `json:"item_url"`
|
||||
ItemURL string `json:"item_url,omitempty"`
|
||||
Subtitle string `json:"subtitle"`
|
||||
DefaultAction *DefaultAction `json:"default_action,omitempty"`
|
||||
Buttons []StructuredMessageButton `json:"buttons"`
|
||||
|
Loading…
Reference in New Issue
Block a user