Documentation ¶
Index ¶
- Constants
- Variables
- type Bot
- func (b *Bot) AddCmd(commands ...ICommand)
- func (b *Bot) Connect(config Config) error
- func (b *Bot) Disconnect()
- func (b *Bot) Join(message *irc.Message)
- func (b *Bot) JoinCmds(taken bool)
- func (b *Bot) Leave(message *irc.Message)
- func (b *Bot) Msg(message *irc.Message)
- func (b *Bot) OnConnect(onconnect func())
- func (b *Bot) Pong(message *irc.Message)
- func (b *Bot) Send(msg string)
- type Command
- func (c *Command) Execute(user string, msg string, args []string)
- func (c *Command) Init(schan chan string, log chan string)
- func (c *Command) Match(msg string) bool
- func (c *Command) OnJoin(user string)
- func (c *Command) OnLeave(user string)
- func (c *Command) OnMsg(user string, msg string)
- func (c *Command) Once()
- type Config
- type ICommand
Constants ¶
View Source
const ( CONNECTED = iota CONNECTING DISCONNECTED )
Bot status
Variables ¶
View Source
var ErrAlreadyConnected = errors.New("Bot already connected")
Error if an connection is already open
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { Log chan string // contains filtered or unexported fields }
Bot contains Log channel for getting propagated logs
type Command ¶
Click to show internal directories.
Click to hide internal directories.