crossword

package
v0.0.0-...-4308b5e Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnswerRegexp = regexp.MustCompile(
	`^!(?i:answer\s+)?([0-9]+[aAdD])\s+(.*)\s*$`,
)

A regular expression that matches a message that's providing an answer. Capture group 1 is the clue and capture group 2 is the answer.

View Source
var DefaultCrosswordHTTPClient = &http.Client{
	Timeout: 1 * time.Second,
}

The HTTP client to use when communicating with the api service from the crossword integration.

View Source
var ShowClueRegexp = regexp.MustCompile(
	`^!(?i:show)\s+(?P<clue>[0-9]+[aAdD])\s*$`,
)

A regular expression that matches a message that's asking for a clue to be made visible. Capture group 1 is the clue.

Functions

This section is empty.

Types

type MessageHandler

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

func NewMessageHandler

func NewMessageHandler(host string) *MessageHandler

func (*MessageHandler) HandleChannelMessage

func (h *MessageHandler) HandleChannelMessage(channel, status, message string)

HandleChannelMessage parses a message and if it matches a crossword command sends it to the appropriate API endpoint.

Jump to

Keyboard shortcuts

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