Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ForteScarlet committed Sep 15, 2023
1 parent d6e4296 commit ec5c5db
Show file tree
Hide file tree
Showing 23 changed files with 42 additions and 31 deletions.
29 changes: 20 additions & 9 deletions snapshots/components/kook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,33 @@
<div class="breadcrumbs"></div>
<div class="cover ">
<div class="cover ">
<h1 class="">Simple Robot KOOK 组件</h1>
<h1 class="">Simple Robot - KOOK 组件</h1>
<p class="paragraph">此为 <a href="https://github.com/simple-robot/simpler-robot">Simple Robot v3</a> (以下简称为 <code class="lang-kotlin">simbot3</code> ) 下基于simbot标准API对 <a href="https://www.kookapp.cn/">KOOK API</a> 的组件支持。</p>
<p class="paragraph"><strong>Simple Robot - KOOK 组件</strong> <small>以下简称KOOK组件</small> 是一个基于 <a href="https://kotlinlang.org/docs/multiplatform.html">KMP</a>、 支持多平台(<code class="lang-kotlin">JVM</code><code class="lang-kotlin">JS</code>、native)且JVM平台库对Java友好、 (特定模块)实现simbot3标准API的 <strong>KOOK 机器人API</strong> 依赖库。</p>
<p class="paragraph"><strong>KOOK组件</strong>提供多平台的KOOK API、bot事件订阅等功能实现的底层库, 以及基于simbot3标准API的高级功能应用库。</p>
<h2 class=""> 文档</h2>
<p class="paragraph">了解<strong>simbot3</strong>: <a href="https://simbot.forte.love">simbot3官网</a></p>
<p class="paragraph">KOOK组件的<strong>组件手册</strong>: <a href="https://simple-robot.github.io/simbot-component-kook/">组件手册</a> </p>
<p class="paragraph">KOOK组件的<strong>组件手册</strong>: <a href="https://simple-robot.github.io/simbot-component-kook">组件手册</a></p>
<blockquote class="quotation">
<p class="paragraph">版本进入稳定后考虑配置域名,目前暂未配置</p>
<p class="paragraph"><strong>Note</strong> 手册与simbot3官网均部署于GitHub Pages。 为了更好的浏览体验,<strong>推荐</strong>开启魔法后访问</p>
</blockquote>
<p class="paragraph"><strong>API文档</strong>: <a href="https://docs.simbot.forte.love">API文档引导站</a></p>
<blockquote class="quotation">
<p class="paragraph"><strong>Warning</strong> README 施工中。。</p>
<p class="paragraph">版本进入稳定后考虑配置域名,目前暂未配置</p>
</blockquote>
<p class="paragraph"><strong>API文档</strong>: <a href="https://docs.simbot.forte.love">API文档引导站</a></p>
<h2 class=""> 支持情况</h2>
<p class="paragraph">前往查看 support-list.md</p>
<h2 class=""> 使用</h2>
<p class="paragraph">前往 <a href="https://simple-robot.github.io/simbot-component-kook/">组件官网</a> 参考 <strong>快速开始</strong> 相关章节。</p>
<p class="paragraph">前往查看 support-list.md</p>
<h2 class=""> 快速开始</h2>
<p class="paragraph">前往 <a href="https://simple-robot.github.io/simbot-component-kook">组件手册</a> 阅读 <strong>快速开始</strong> 相关章节。</p>
<h2 class=""> 走马观花</h2>
<details>
<summary>简单示例</summary> <div class="sample-container">
<summary>简单示例</summary> <blockquote class="quotation">
<p class="paragraph"><strong>Note</strong> Java开发者可直接参考 <a href="https://simple-robot.github.io/simbot-component-kook">组件手册</a><strong>快速开始</strong>相关示例的Java部分代码。</p>
</blockquote>
<blockquote class="quotation">
<p class="paragraph">使用 Kotlin + <code class="lang-kotlin">simbot-component-kook-core</code> 配合 <code class="lang-kotlin">simboot-core-spring-boot-starter</code> 使用 <code class="lang-kotlin">Spring Boot</code> 的情况下:</p>
</blockquote>
<div class="sample-container">
<pre><code class="block lang-kotlin" theme="idea">// simbot-core / simbot-boot<br>suspend fun KookContactMessageEvent.onEvent() {<br> author().send(&quot;Hello World&quot;)<br>}</code></pre>
<span class="top-right-position"><span class="copy-icon"></span>
<div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div>
Expand All @@ -91,6 +99,9 @@ <h2 class=""> 走马观花</h2>
<div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div>
</span></div>
<p class="paragraph">简单的完整示例:</p>
<blockquote class="quotation">
<p class="paragraph">(使用 Kotlin + <code class="lang-kotlin">simbot-component-kook-core</code>, 非 Spring Boot 的情况下:)</p>
</blockquote>
<div class="sample-container">
<pre><code class="block lang-kotlin" theme="idea">suspend fun main() {<br> createSimpleApplication {<br> // 注册并使用Kook组件。<br> useKook()<br> <br> // 注册各种监听函数<br> listeners {<br> // 监听联系人(私聊)消息<br> // 此事件的逻辑:收到消息,回复一句&quot;你说的是:&quot;,<br> // 然后再复读一遍你说的话。<br> ContactMessageEvent { event -&gt;<br> val contact: Contact = event.source()<br> contact.send(&quot;你说的是:&quot;)<br> contact.send(event.messageContent)<br> }<br> }<br> <br> // 注册kook的bot<br> kookBots {<br> val bot = register(&quot;client_id&quot;, &quot;token&quot;)<br> // bot需要start才能连接服务器、初始化信息等。<br> bot.start()<br> }<br> }.join() // join, 挂起直到被终止。<br>}</code></pre>
<span class="top-right-position"><span class="copy-icon"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="breadcrumbs"><a href="../../../index.html">simbot-component-kook-core</a><span class="delimiter">/</span><a href="../../index.html">love.forte.simbot.component.kook.bot</a><span class="delimiter">/</span><a href="../index.html">KookBotVerifyInfoConfiguration</a><span class="delimiter">/</span><span class="current">Companion</span></div>
<div class="cover ">
<h1 class="cover"><span><span>Companion</span></span></h1>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">Companion</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L183">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">Companion</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L187">source</a>)</span></span></div></div></div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="breadcrumbs"><a href="../../../../index.html">simbot-component-kook-core</a><span class="delimiter">/</span><a href="../../../index.html">love.forte.simbot.component.kook.bot</a><span class="delimiter">/</span><a href="../../index.html">KookBotVerifyInfoConfiguration</a><span class="delimiter">/</span><a href="../index.html">Config</a><span class="delimiter">/</span><span class="current">Companion</span></div>
<div class="cover ">
<h1 class="cover"><span><span>Companion</span></span></h1>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">Companion</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L164">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">Companion</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L168">source</a>)</span></span></div></div></div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="cover ">
<h1 class="cover"><span><span>Config</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">isCompress<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">syncPeriods<span class="token operator">: </span><a href="../../-kook-bot-configuration/-sync-periods/index.html">KookBotConfiguration.SyncPeriods</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">clientEngineConfig<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">wsEngineConfig<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">timeout<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-timeout-configuration/index.html">BotConfiguration.TimeoutConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">wsConnectTimeout<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">isNormalEventProcessAsync<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">?</span><span class="token operator"> = </span>null</span></span><span class="token punctuation">)</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L113">source</a>)</span></span></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">isCompress<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">syncPeriods<span class="token operator">: </span><a href="../../-kook-bot-configuration/-sync-periods/index.html">KookBotConfiguration.SyncPeriods</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">clientEngineConfig<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">wsEngineConfig<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">timeout<span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-timeout-configuration/index.html">BotConfiguration.TimeoutConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">wsConnectTimeout<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span></span><span class="parameter ">isNormalEventProcessAsync<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">?</span><span class="token operator"> = </span>null</span></span><span class="token punctuation">)</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L117">source</a>)</span></span></div></div></div>
</div>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="cover ">
<h1 class="cover"><span>client</span><wbr><span>Engine</span><wbr><span><span>Config</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="client-engine-config.html">clientEngineConfig</a><span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L128">source</a>)</span></span></div><p class="paragraph">参考 <a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/client-engine-config.html">BotConfiguration.clientEngineConfig</a></p><h4 class="">See also</h4><div class="table"><div class="table-row" data-filterable-current=":simbot-component-kook-core:dokkaHtmlPartial/main" data-filterable-set=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/client-engine-config.html"><span>Bot</span><wbr><span>Configuration.</span><wbr><span>client</span><wbr><span>Engine</span><wbr><span><span>Config</span></span></a></div></span></div><div></div></div></div></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="client-engine-config.html">clientEngineConfig</a><span class="token operator">: </span><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/-engine-configuration/index.html">BotConfiguration.EngineConfiguration</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="clearfix"><span class="floating-right">(<a href="https://github.com/simple-robot/simbot-component-kook/tree/main/simbot-component-kook-core/src/main/kotlin/love/forte/simbot/component/kook/bot/KookBotVerifyInfoConfiguration.kt#L132">source</a>)</span></span></div><p class="paragraph">参考 <a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/client-engine-config.html">BotConfiguration.clientEngineConfig</a></p><h4 class="">See also</h4><div class="table"><div class="table-row" data-filterable-current=":simbot-component-kook-core:dokkaHtmlPartial/main" data-filterable-set=":simbot-component-kook-core:dokkaHtmlPartial/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="../../../../simbot-component-kook-api/love.forte.simbot.kook/-bot-configuration/client-engine-config.html"><span>Bot</span><wbr><span>Configuration.</span><wbr><span>client</span><wbr><span>Engine</span><wbr><span><span>Config</span></span></a></div></span></div><div></div></div></div></div></div></div>
</div>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
Expand Down
Loading

0 comments on commit ec5c5db

Please sign in to comment.