Config

data class Config(val serverUrl: String? = null, val shardConfig: ShardConfig = ShardConfig.Full, val intentsConfig: IntentsConfig = IntentsConfig.Raw( EventIntents.Guilds.intents + EventIntents.GuildMembers.intents + EventIntents.PublicGuildMessages.intents ), val clientProperties: Map<String, String>? = null, val timeoutConfig: QGBotFileConfiguration.TimeoutConfig? = null, val cacheConfig: CacheConfig? = DEFAULT.cacheConfig, val dispatcherConfiguration: DispatcherConfiguration? = null)(source)

其他配置信息。

{
"config": { ... }
}

Constructors

Link copied to clipboard
constructor(serverUrl: String? = null, shardConfig: ShardConfig = ShardConfig.Full, intentsConfig: IntentsConfig = IntentsConfig.Raw( EventIntents.Guilds.intents + EventIntents.GuildMembers.intents + EventIntents.PublicGuildMessages.intents ), clientProperties: Map<String, String>? = null, timeoutConfig: QGBotFileConfiguration.TimeoutConfig? = null, cacheConfig: CacheConfig? = DEFAULT.cacheConfig, dispatcherConfiguration: DispatcherConfiguration? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "cache")
val cacheConfig: CacheConfig?

缓存相关配置。

Link copied to clipboard
Link copied to clipboard

是否禁用 ws

Link copied to clipboard

调度器相关配置。

Link copied to clipboard
@SerialName(value = "intents")
val intentsConfig: IntentsConfig

事件订阅配置。

Link copied to clipboard
val serverUrl: String? = null

目标服务器地址。默认为null,使用 BotConfiguration 的默认情况。

Link copied to clipboard
@SerialName(value = "shard")
val shardConfig: ShardConfig

分片信息配置,默认为 ShardConfig.Full

Link copied to clipboard

与部分超时相关的配置信息。