3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

Fix issues with circular dependencies between plugins

This commit is contained in:
Dragory 2021-08-18 19:33:22 +03:00
parent 62a6e59b7a
commit e3b6b017a2
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
23 changed files with 36 additions and 29 deletions

View file

@ -18,6 +18,9 @@ import { postCaseToCaseLogChannel } from "./functions/postToCaseLogChannel";
import { CaseArgs, CaseNoteArgs, CasesPluginType, ConfigSchema } from "./types";
import { LogsPlugin } from "../Logs/LogsPlugin";
// Workaround for circular dependency
const AnyTypedLogsPlugin = LogsPlugin as any;
const defaultOptions = {
config: {
log_automatic_actions: true,
@ -39,7 +42,7 @@ export const CasesPlugin = zeppelinGuildPlugin<CasesPluginType>()({
`),
},
dependencies: [TimeAndDatePlugin, LogsPlugin],
dependencies: () => [TimeAndDatePlugin, AnyTypedLogsPlugin],
configSchema: ConfigSchema,
defaultOptions,