ScuttleBot

scuttlebot / internal / bots / bots.go
Blame History Raw 18 lines
1
// Package bots defines the Bot interface and shared types for all scuttlebot built-in bots.
2
package bots
3
4
import "context"
5
6
// Bot is the interface implemented by all scuttlebot built-in bots.
7
type Bot interface {
8
// Name returns the bot's IRC nick.
9
Name() string
10
11
// Start connects the bot to IRC and begins processing messages.
12
// Blocks until ctx is cancelled or a fatal error occurs.
13
Start(ctx context.Context) error
14
15
// Stop gracefully disconnects the bot.
16
Stop()
17
}
18

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button