Add plugin support for commands

This commit is contained in:
2023-06-16 02:08:29 +00:00
parent 7b0c8351a8
commit b252d5e62e
6 changed files with 41 additions and 34 deletions

View File

@ -62,3 +62,7 @@ func (loader *ComponentLoader) Notify(message string) error {
loader.bot.Notify(message)
return nil
}
func (loader *ComponentLoader) RegisterCommand(name string, config common.ChatCommandConfiguration, handler func(common.User, map[string]any) string) {
loader.bot.Session.RegisterCommand(name, config, handler)
}