Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUsage = errors.New("Wrong command usage")
Functions ¶
This section is empty.
Types ¶
type BaseTrigger ¶
type BaseTrigger struct {
IRC Sender
}
BaseTrigger is just an implementation of Trigger to reduce some boilerplate code
func (*BaseTrigger) SetSender ¶ added in v0.6.0
func (btrigger *BaseTrigger) SetSender(sender Sender)
type Command ¶
type Command interface { Info() CommandInfo Execute(nick string, args []string) (reply string, err error) }
Command is like a pure function just inputs and outputs
type CommandInfo ¶
CommandInfo contains information of a command
type Config ¶
type Config struct { Nick string `toml:"nick"` Name string `toml:"name"` User string `toml:"user"` Server string `toml:"server"` Port int `toml:"port"` Channel string `toml:"channel"` Retry bool `toml:"retry"` SASLUser string `toml:"sasl_user"` SASLPass string `toml:"sasl_pass"` DBPath string `toml:"dbpath"` WebHookAddr string `toml:"webhook_addr"` Secret string `toml:"secret"` Points []int `toml:"points"` Cooldowns []Duration `toml:"cooldowns"` }
type Duration ¶ added in v0.6.0
func (*Duration) UnmarshalText ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.