Documentation ¶
Overview ¶
Package bot exports a Bot interface to manage bots for differents platforms easily.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot interface { Connect(c client.Client, addr string, token string, cap int, defaultResponse string) error Start() error Listen() error Stop() error }
Bot is an interface to manage bots for differentes platforms.
type Discord ¶
type Discord struct {
// contains filtered or unexported fields
}
Discord is a wrapper for a bwmawwin/discordgo session that satisfies the Bot interface.
func (*Discord) Connect ¶
func (d *Discord) Connect(c client.Client, addr string, token string, cap int, defaultResponse string) error
Connect receives a token with which tries to identify, setups everything necessary and initializes a goroutine to send the responses from the responses channel to the respective clients.
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response represents a bot response.
type Telegram ¶
type Telegram struct {
// contains filtered or unexported fields
}
Telegram is a wrapper for a yanzay/tbot client that satifies the Bot interface.
func (*Telegram) Connect ¶
func (t *Telegram) Connect(c client.Client, addr string, token string, cap int, defaultResponse string) error
Connect receives a token with which tries to indentify, setups everything necessary and initializes a goroutine to send the responses from the responses channel to the respective clients.