qqGuildIfSupport

inline suspend fun BotRegistrar.qqGuildIfSupport(crossinline block: suspend QQGuildBotManager.() -> Unit)(source)

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

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

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