bot

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ANSWER_FUNC

type ANSWER_FUNC func(string, string) (string, bool)

type Bot

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

func New

func New(cfg *Config) *Bot

func (*Bot) AddRule

func (b *Bot) AddRule(k, v string)

func (*Bot) Close

func (b *Bot) Close()

func (*Bot) Message

func (b *Bot) Message(uniq string, msg string) (string, bool)

type Config

type Config struct {
	RulesFile  string
	AnswerFunc ANSWER_FUNC
	History    string
	Threshold  float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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