-
Notifications
You must be signed in to change notification settings - Fork 0
/
cog.go
32 lines (25 loc) · 868 Bytes
/
cog.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package internal
import "sync"
type CogInfo struct {
Name string
Description string
Meta interface{}
}
// Cog is the basic interface for any cog. This must provide information about the cog
// such as its name and description.
type Cog interface {
CogInfo() *CogInfo
RegisterCog(sub *Subway) error
}
// CogWithInteractionCommands is an interface for any cog that implements methods that return interaction commands.
type CogWithInteractionCommands interface {
GetInteractionCommandable() *InteractionCommandable
}
// CogWithBotLoad is an interface for any cog that implements methods that run when a bot loads.
type CogWithBotLoad interface {
BotLoad(sub *Subway)
}
// CogWithBotUnload is an interface for any cog that implements methods that run when a bot unloads.
type CogWithBotUnload interface {
BotUnload(sub *Subway, wg *sync.WaitGroup)
}