Discord Components & Role Selection (#5)

This commit is contained in:
2023-04-01 01:23:37 -04:00
committed by GitHub
parent 5e6a433b92
commit e1038a15cd
25 changed files with 696 additions and 31 deletions

View File

@ -1,6 +1,6 @@
package common
type GameModule interface {
type ChatSyncModule interface {
SendMessage(user string, message string)
RecieveMessage(user User, message string)
}

View File

@ -1,12 +1,12 @@
package common
type Component interface {
Initialize(birdbot ComponentManager) error
type Module interface {
Initialize(birdbot ModuleManager) error
}
// ComponentManager is the primary way for a component to interact with BirdBot
// ModuleManager is the primary way for a module to interact with BirdBot
// by listening to events and committing actions
type ComponentManager interface {
type ModuleManager interface {
OnReady(func() error) error
OnNotify(func(string) error) error
@ -21,5 +21,5 @@ type ComponentManager interface {
CreateEvent(event Event) error
Notify(message string) error
RegisterGameModule(ID string, plugin GameModule) error
RegisterChatSyncModule(ID string, plugin ChatSyncModule) error
}