mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-29 22:27:31 +00:00
refactor(config): 调整 BotConfig 中部分字段的默认值.
内置命令默认打开, 方便用户查询命令. baseApiUrl 默认值为 Telegram 官方 API 地址, 设置默认值可让用户了解可以对此项进行修改.
This commit is contained in:
parent
54b3e1cad7
commit
eb34f17b06
@ -10,6 +10,7 @@ import net.lamgc.scalabot.util.ProxyTypeSerializer
|
||||
import org.eclipse.aether.artifact.Artifact
|
||||
import org.eclipse.aether.repository.Proxy
|
||||
import org.telegram.telegrambots.bots.DefaultBotOptions
|
||||
import org.telegram.telegrambots.meta.ApiConstants
|
||||
import java.io.File
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
@ -38,7 +39,7 @@ internal data class BotAccount(
|
||||
internal data class BotConfig(
|
||||
val enabled: Boolean = true,
|
||||
val account: BotAccount,
|
||||
val disableBuiltInAbility: Boolean = true,
|
||||
val disableBuiltInAbility: Boolean = false,
|
||||
/*
|
||||
* 使用构件坐标来选择机器人所使用的扩展包.
|
||||
* 这么做的原因是我暂时没找到一个合适的方法来让开发者方便地设定自己的扩展 Id,
|
||||
@ -47,7 +48,7 @@ internal data class BotConfig(
|
||||
*/
|
||||
val extensions: Set<Artifact>,
|
||||
val proxy: ProxyConfig? = null,
|
||||
val baseApiUrl: String? = null
|
||||
val baseApiUrl: String? = ApiConstants.BASE_URL
|
||||
)
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user