Recieving messages via the external link
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
package common
|
||||
|
||||
type ChatSyncModule interface {
|
||||
SendMessage(user string, message string)
|
||||
RecieveMessage(user User, message string)
|
||||
}
|
||||
11
common/external_chat.go
Normal file
11
common/external_chat.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package common
|
||||
|
||||
type ExternalChatManager interface {
|
||||
SendMessage(user string, message string)
|
||||
}
|
||||
|
||||
type ExternalChatModule interface {
|
||||
Initialize(ExternalChatManager)
|
||||
|
||||
RecieveMessage(user User, message string)
|
||||
}
|
||||
@@ -24,5 +24,5 @@ type ModuleManager interface {
|
||||
// Commands
|
||||
RegisterCommand(string, ChatCommandConfiguration, func(User, map[string]any) string)
|
||||
|
||||
RegisterChatSyncModule(ID string, plugin ChatSyncModule) error
|
||||
RegisterExternalChat(ID string, chat ExternalChatModule) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user