line

package
v0.0.0-...-4761250 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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 NewBot

func NewBot(accessToken string, secret string) *Bot

NewBot is a factory function which create new Bot object

func (*Bot) BroadcastMessage

func (bot *Bot) BroadcastMessage(messages ...string) (*linebot.BasicResponse, error)

BroadcastMessage send messages to friend

func (*Bot) ParseRequest

func (bot *Bot) ParseRequest(req *http.Request) error

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

func (bot *Bot) SendGreetingMessage(event *linebot.Event) (*linebot.BasicResponse, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL