bot

package
v0.0.0-...-86d0d79 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthoredBy

func AuthoredBy(id string) filter

func Prefix

func Prefix(fix string) prefix

Types

type Bot

type Bot struct {
	Client *ifunny.Client
	Chat   *ifunny.Chat
	Log    *logrus.Logger
	// contains filtered or unexported fields
}

func MakeBot

func MakeBot(bearer, userAgent string) (*Bot, error)

func (*Bot) Listen

func (bot *Bot) Listen() error

func (*Bot) On

func (bot *Bot) On(filter filter, handle handler) func()

func (*Bot) OnMessage

func (bot *Bot) OnMessage(handle handler) func()

func (*Bot) Subscribe

func (bot *Bot) Subscribe(channel string)

func (*Bot) Unsubscribe

func (bot *Bot) Unsubscribe(channel string)

type Context

type Context interface {
	Robot() *Bot
	Event() (*ifunny.ChatEvent, error)
	Caller() (*ifunny.User, error)
	Channel() (*ifunny.ChatChannel, error)
	Send(message string) error
}

Jump to

Keyboard shortcuts

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