plugin

package
v0.0.0-...-fa0c35c Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessMessageHandler

func ProcessMessageHandler(command TextReplyCommand) processor.OptionalHandleFunction

func RegisterPlugin

func RegisterPlugin(plugins ...MessagePlugin)

Types

type ImageReplyCommand

type ImageReplyCommand MessageCommand

type ImageReplyMessageBaseImplementation

type ImageReplyMessageBaseImplementation struct{}

func (ImageReplyMessageBaseImplementation) Type

type MessageCommand

type MessageCommand interface {
	Name() string
	Description() string
	Example() string
	Triggered(content string) (triggered bool)
	Type() MessageCommandType
	Handle(payload processor.Payload) (replyMessage message.Message)
}

type MessageCommandInfo

type MessageCommandInfo struct {
	Name        string
	Description string
	Type        MessageCommandType
	Example     []string
}

MessageCommandInfo 消息命令信息

type MessageCommandType

type MessageCommandType string
const (
	TextReplyMessageCommandType  MessageCommandType = "TextReplyMessageCommandType"
	ImageReplyMessageCommandType MessageCommandType = "ImageReplyMessageCommandType"
)

type MessagePlugin

type MessagePlugin interface {
	TriggerKey() string
	Commands() []MessageCommand
}

type MessagePluginInfo

type MessagePluginInfo struct {
	Name       string
	TriggerKey string
	BlockChain bool
}

MessagePluginInfo 消息插件信息

type TextReplyCommand

type TextReplyCommand MessageCommand

type TextReplyMessageBaseImplementation

type TextReplyMessageBaseImplementation struct{}

func (TextReplyMessageBaseImplementation) Type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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