msghandler

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoResponse = errors.New("no response")

ErrNoResponse is the error that should be returned by a command handler if the bot should not provide a response

Functions

func GetSettings

func GetSettings(gapi storage.GuildAPI, gid snowflake.Snowflake) (s storage.GuildSettings, err error)

GetSettings gets the guild configuration settings

NOTE: this cannot be called while another transaction is open

Types

type Handlers

type Handlers interface {
	ConnectToBot(discordapi.DiscordBot)
}

Handlers is the dependency interface for a set of message handlers that connect themselves to a discord bot

func NewHandlers

func NewHandlers(deps dependencies, opts Options) Handlers

NewHandlers creates a new Handlers object

type Options

type Options struct {
	DefaultCommandIndicator string
	SuccessColor            int
	ErrorColor              int
}

Options is how to set response colors etc. when creating a Handlers

Jump to

Keyboard shortcuts

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