hotgo/server/internal/library/notify/feishu/interactive.go
2022-11-24 23:37:34 +08:00

22 lines
517 B
Go

package feishu
type InteractiveMessage struct {
MsgType MsgType `json:"msg_type"`
Card string `json:"card"`
}
func (m *InteractiveMessage) Body() map[string]interface{} {
m.MsgType = MsgTypeInteractive
return structToMap(m)
}
func NewInteractiveMessage() *InteractiveMessage {
return &InteractiveMessage{}
}
// SetCard set card with cardbuilder https://open.feishu.cn/tool/cardbuilder?from=custom_bot_doc
func (m *InteractiveMessage) SetCard(card string) *InteractiveMessage {
m.Card = card
return m
}