Documentation ¶
Index ¶
- func CreateBroadcastHandler(config *viper.Viper) gin.HandlerFunc
- func CreateWebhookHandler(config *viper.Viper) gin.HandlerFunc
- type Bot
- func (bot *Bot) BroadcastMessage(messages ...string) (*linebot.BasicResponse, error)
- func (bot *Bot) ParseRequest(req *http.Request) error
- func (bot *Bot) ReplyAudioMessage(event *linebot.Event, contentURL string, duration int) (*linebot.BasicResponse, error)
- func (bot *Bot) ReplyImageMessage(event *linebot.Event, contentURL string, previewImageURL string) (*linebot.BasicResponse, error)
- func (bot *Bot) ReplyStickerMessage(event *linebot.Event, packageID string, stickerID string) (*linebot.BasicResponse, error)
- func (bot *Bot) ReplyTextMessage(event *linebot.Event, messages ...string) (*linebot.BasicResponse, error)
- func (bot *Bot) SendGreetingMessage(event *linebot.Event) (*linebot.BasicResponse, error)
- type BotCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBroadcastHandler ¶
func CreateBroadcastHandler(config *viper.Viper) gin.HandlerFunc
CreateBroadcastHandler is a factory function for create lineBroadcastHandler
func CreateWebhookHandler ¶
func CreateWebhookHandler(config *viper.Viper) gin.HandlerFunc
CreateWebhookHandler is a factory function for create lineWebhookHandler
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot struct
func (*Bot) BroadcastMessage ¶
func (bot *Bot) BroadcastMessage(messages ...string) (*linebot.BasicResponse, error)
BroadcastMessage send messages to friend
func (*Bot) ParseRequest ¶
ParseRequest is function which handle webhook request
func (*Bot) ReplyAudioMessage ¶
func (bot *Bot) ReplyAudioMessage( event *linebot.Event, contentURL string, duration int, ) (*linebot.BasicResponse, error)
ReplyAudioMessage will reply audio message to friend
func (*Bot) ReplyImageMessage ¶
func (bot *Bot) ReplyImageMessage( event *linebot.Event, contentURL string, previewImageURL string, ) (*linebot.BasicResponse, error)
ReplyImageMessage will reply image message to friend
func (*Bot) ReplyStickerMessage ¶
func (bot *Bot) ReplyStickerMessage( event *linebot.Event, packageID string, stickerID string, ) (*linebot.BasicResponse, error)
ReplyStickerMessage will reply sticker message to friend
func (*Bot) ReplyTextMessage ¶
func (bot *Bot) ReplyTextMessage( event *linebot.Event, messages ...string, ) (*linebot.BasicResponse, error)
ReplyTextMessage will reply text message to friend
func (*Bot) SendGreetingMessage ¶
SendGreetingMessage will reply greeting message when LINE official account is added as a friend
type BotCommand ¶
type BotCommand struct {
// contains filtered or unexported fields
}
BotCommand struct of command line in chat bot
Click to show internal directories.
Click to hide internal directories.