Remove Common, Rework External Chat Support, & Bugfixes (!5)

Co-authored-by: Layla <layla@layla.gg>
Reviewed-on: https://gitea.sumulayla.synology.me/layla/birdbot/pulls/5
This commit was merged in pull request #5.
This commit is contained in:
2023-06-19 03:08:24 -04:00
parent 5e4698495c
commit 6cbe4df36c
28 changed files with 81 additions and 146 deletions

View File

@@ -3,9 +3,10 @@ package app
import (
"log"
"os"
"path/filepath"
"plugin"
"github.com/yeslayla/birdbot/common"
"github.com/yeslayla/birdbot-common/common"
)
// LoadPlugin loads a plugin and returns its component if successful
@@ -49,7 +50,7 @@ func LoadPlugins(directory string) []common.Module {
continue
}
if comp := LoadPlugin(path.Name()); comp != nil {
if comp := LoadPlugin(filepath.Join(directory, path.Name())); comp != nil {
components = append(components, comp)
}
}