line

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

func New

func New(secret, token, port string, opts ...Option) (*Bot, error)

func (*Bot) Close

func (b *Bot) Close() error

func (*Bot) Reply

func (b *Bot) Reply(handler ReplyHandler)

func (*Bot) Save

func (b *Bot) Save(ctx context.Context, messageID, dir string) (string, error)

func (*Bot) Send

func (b *Bot) Send(ctx context.Context, to, text string) (*linebot.BasicResponse, error)

func (*Bot) Start

func (b *Bot) Start(ctx context.Context) error

func (*Bot) Status

func (b *Bot) Status() Status

type Input

type Input struct {
	SourceType  string
	UserID      string
	Username    string
	GroupID     string
	RoomID      string
	ReplyToken  string
	MessageID   string
	MessageType string
	Text        string
	FileName    string
	Raw         *linebot.Event
}

type Option

type Option func(*options)

func WithPath

func WithPath(path string) Option

type ReplyHandler

type ReplyHandler func(ctx context.Context, input Input) string

type Status

type Status struct {
	Running     bool
	UserID      string
	BasicID     string
	DisplayName string
}

Jump to

Keyboard shortcuts

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