tencentGuildIfSupport

inline suspend fun BotRegistrar.tencentGuildIfSupport(crossinline block: suspend TencentGuildBotManager.() -> Unit)

ApplicationBuilder.bots 作用域中寻找并使用 TencentGuildBotManager

simpleApplication {
bots {
tencentGuildIfSupport {
val bot = register("app id", "app key", "token") {
// config
}
bot.start()
}
}
}

如果当前环境中不存在 TencentGuildBotManager, 则不会执行 block.