ScuttleBot

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

Keyboard Shortcuts

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