bot

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 11 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
	GetHandler(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 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 string, chat *Chat)

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

Jump to

Keyboard shortcuts

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