bot

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Name() string
	Adapter() joe.Module
	GetHandlers(bot *joe.Bot) []any
	GetFunMap() template.FuncMap
}

type Chat

type Chat struct {
	Provider string
	Channel  string
	ChatID   string
	ChatType ChatType
}

type ChatType

type ChatType int
const (
	ChatTypeP2P ChatType = iota + 1
	ChatTypeGroup
	ChatTypeChannel
)

type Command added in v0.2.1

type Command struct {
	Cmd  string
	Args []string
}

type Commands

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

func NewCommands

func NewCommands(bot *joe.Bot) *Commands

func (*Commands) Handle

func (c *Commands) Handle(command *Command, chat *Chat)

func (*Commands) Parse added in v0.2.1

func (c *Commands) Parse(text string) (*Command, error)

type Server

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

func NewServer

func NewServer(adapter Adapter, messenger messenger.Manager) (*Server, error)

func (*Server) Run

func (b *Server) Run(addr string) error

type Webhook added in v0.2.1

type Webhook struct {
	ID string `json:"id"`
}

func NewWebhook added in v0.2.1

func NewWebhook() *Webhook

func (*Webhook) String added in v0.2.1

func (w *Webhook) String() string

Jump to

Keyboard shortcuts

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