Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logs ¶
type Logs struct {
Primary *logrus.Logger
Command *logrus.Entry
Multiplexer *logrus.Entry
// contains filtered or unexported fields
}
Logs defines all the different loggers used within the bot
func New ¶
New creates a new Logs stuct. Accepts a boolean specifying whether debug mode is enabled.
func (*Logs) CmdErr ¶
func (l *Logs) CmdErr(ctx *multiplexer.Context, err error, msg string)
CmdErr is used for handling errors within commands which should be reported to the user. Takes a multiplexer context, error message, and user-readable message which are sent to the channel where the command was executed.
func (*Logs) MuxMiddleware ¶
func (l *Logs) MuxMiddleware(ctx *multiplexer.Context)
MuxMiddleware is the middleware function attached to MuxLog. Accepts the context from disgomux.
Click to show internal directories.
Click to hide internal directories.