|
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
|
|