Add Command Functionality to Discord Package & Implement Feedback Webhooks

This commit is contained in:
2023-06-16 01:24:25 +00:00
parent 204803cd0b
commit 996155205d
10 changed files with 324 additions and 20 deletions

View File

@@ -83,6 +83,15 @@ func main() {
}
}
if cfg.Features.Feedback.IsEnabled() {
loader.LoadComponent(modules.NewFeedbackWebhookComponent(cfg.Feedback.WebhookURL, modules.FeedbackWebhookConfiguration{
PayloadType: cfg.Feedback.PayloadType,
SuccessMessage: cfg.Feedback.SuccessMessage,
FailureMessage: cfg.Feedback.FailureMessage,
}, bot.Session))
}
if _, err := os.Stat(PluginsDirectory); !os.IsNotExist(err) {
components := app.LoadPlugins(PluginsDirectory)
for _, comp := range components {