feat: 为 BotExtensionFactory 提供一些可用的信息. (#125)

为 BotExtensionFactory 的 createExtensionInstance 方法添加 BotExtensionCreateOptions 参数,
通过 BotExtensionCreateOptions 为扩展包 Factory 提供更多信息, 以避免扩展重复声明配置文件.

Issue #4
This commit is contained in:
2024-03-25 23:22:26 +08:00
committed by GitHub
parent 92a1deac50
commit 9dc4bfa28f
6 changed files with 61 additions and 4 deletions

View File

@ -29,7 +29,7 @@ internal class ScalaBot(
db: DBContext,
options: DefaultBotOptions,
extensionFinders: Set<ExtensionPackageFinder>,
botConfig: BotConfig,
val botConfig: BotConfig,
private val creatorId: Long = botConfig.account.creatorId,
val accountId: Long = botConfig.account.id,
val extensions: Set<Artifact> = botConfig.extensions