bot

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History added in v0.2.0

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

func NewHistory added in v0.2.0

func NewHistory(length int) *History

func (*History) Contains added in v0.2.0

func (h *History) Contains(p *reddit.Post) int

func (*History) Push added in v0.2.0

func (h *History) Push(p *reddit.Post)

type Matcher

type Matcher interface {
	Match(p *reddit.Post) bool
	String() string
}

type Path

type Path struct {
	Matchers  []Matcher
	Templater Templater
	Sender    *router.ServiceRouter
	History   *History
}

type ShoutBot

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

func NewShoutBot

func NewShoutBot(paths map[string]Path) *ShoutBot

func (*ShoutBot) Post

func (sb *ShoutBot) Post(p *reddit.Post) error

type Templater

type Templater interface {
	GetTitle(p *reddit.Post) string
	GetMessage(p *reddit.Post) string
}

type TraceEntry

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

func NewTraceEntry

func NewTraceEntry(p *reddit.Post) *TraceEntry

func (*TraceEntry) Error

func (te *TraceEntry) Error(log string)

func (*TraceEntry) Pass

func (te *TraceEntry) Pass(log string)

func (*TraceEntry) Trace

func (te *TraceEntry) Trace() string

Jump to

Keyboard shortcuts

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