chatmessage

package
v0.0.0-...-df918ef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: ISC Imports: 3 Imported by: 0

Documentation

Overview

Package chatmessage provides a simple frontend for message handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler implements MessageHandler and powers this event system

func (*Handler) AddCTCPHandler

func (h *Handler) AddCTCPHandler(ctcp string, f MessageFunc) int

func (*Handler) AddHandler

func (h *Handler) AddHandler(f MessageFunc) int

AddHandler adds a function to handle all incoming messages

func (*Handler) DelHandler

func (h *Handler) DelHandler(id int)

DelHandler removes a handler function, if it exists

func (*Handler) OnMessage

func (h *Handler) OnMessage(message *event.Message) error

OnMessage implements a message handler for chat (PRIVMSG) messages

type MessageFunc

type MessageFunc func(message, target string, isPM bool, event *event.Message)

MessageFunc is a callback func for a PRIVMSG

Jump to

Keyboard shortcuts

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