command

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 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 CallbackSignature

type CallbackSignature func(args []string, privateMessage *twitch.PrivateMessage, ircClient *twitch.Client) error
var Ping CallbackSignature = func(_ []string, message *twitch.PrivateMessage, ircClient *twitch.Client) error {
	ircClient.Say(message.Channel, fmt.Sprintf("Pong! @%s", message.User.DisplayName))

	return nil
}

func HasRole

func HasRole(roles []string, cb CallbackSignature) CallbackSignature

type Controller added in v0.3.1

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

func NewController

func NewController() *Controller

func (*Controller) AddCommand added in v0.3.1

func (c *Controller) AddCommand(commandName string, cb CallbackSignature)

func (*Controller) CallCommand added in v0.3.1

func (c *Controller) CallCommand(userMessage string, privateMessage *twitch.PrivateMessage, ircClient *twitch.Client)

func (Controller) Prefix added in v0.3.1

func (c Controller) Prefix() string

Jump to

Keyboard shortcuts

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