1
0
forked from bot/app
LiteyukiBot/assets/index.html-Dl0QVrVc.js

24 lines
14 KiB
JavaScript
Raw Normal View History

import{_ as e,o as n,c as t,e as a}from"./app-CkqL16TZ.js";const s={},o=a(`<h3 id="def-get-bot-liteyukibot" tabindex="-1"><a class="header-anchor" href="#def-get-bot-liteyukibot"><span><em><strong>def</strong></em> <code>get_bot() -&gt; LiteyukiBot</code></span></a></h3><p>获取轻雪实例</p><p>Returns:</p><pre><code>LiteyukiBot: 当前的轻雪实例
</code></pre><h3 id="def-get-config-key-str-default-any-any" tabindex="-1"><a class="header-anchor" href="#def-get-config-key-str-default-any-any"><span><em><strong>def</strong></em> <code>get_config(key: str, default: Any) -&gt; Any</code></span></a></h3><p></p><p>Args:</p><pre><code>key:
default: 默认值
</code></pre><p>Returns:</p><pre><code>Any:
</code></pre><h3 id="def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-any" tabindex="-1"><a class="header-anchor" href="#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-any"><span><em><strong>def</strong></em> <code>get_config_with_compat(key: str, compat_keys: tuple[str], default: Any) -&gt; Any</code></span></a></h3><p></p><p>Args:</p><pre><code>key:
compat_keys: 兼容键
default: 默认值
</code></pre><p>Returns:</p><pre><code>Any:
</code></pre><h3 id="def-print-logo-none" tabindex="-1"><a class="header-anchor" href="#def-print-logo-none"><span><em><strong>def</strong></em> <code>print_logo() -&gt; None</code></span></a></h3><h3 id="class-liteyukibot" tabindex="-1"><a class="header-anchor" href="#class-liteyukibot"><span><em><strong>class</strong></em> <code>LiteyukiBot</code></span></a></h3><h3 id="def-init-self-none" tabindex="-1"><a class="header-anchor" href="#def-init-self-none"><span> <em><strong>def</strong></em> <code>__init__(self) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>*args:
**kwargs: 配置
</code></pre><h3 id="def-run-self-none" tabindex="-1"><a class="header-anchor" href="#def-run-self-none"><span> <em><strong>def</strong></em> <code>run(self) -&gt; None</code></span></a></h3><p></p><h3 id="def-keep-alive-self-none" tabindex="-1"><a class="header-anchor" href="#def-keep-alive-self-none"><span> <em><strong>def</strong></em> <code>keep_alive(self) -&gt; None</code></span></a></h3><p></p><p>Returns:</p><h3 id="def-restart-self-delay-int-none" tabindex="-1"><a class="header-anchor" href="#def-restart-self-delay-int-none"><span> <em><strong>def</strong></em> <code>restart(self, delay: int) -&gt; None</code></span></a></h3><p></p><p>Returns:</p><h3 id="def-restart-process-self-name-optional-str-none" tabindex="-1"><a class="header-anchor" href="#def-restart-process-self-name-optional-str-none"><span> <em><strong>def</strong></em> <code>restart_process(self, name: Optional[str]) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>name: , None,
</code></pre><p>Returns:</p><h3 id="def-init-self-none-1" tabindex="-1"><a class="header-anchor" href="#def-init-self-none-1"><span> <em><strong>def</strong></em> <code>init(self) -&gt; None</code></span></a></h3><p>, </p><p>Returns:</p><h3 id="def-init-logger-self-none" tabindex="-1"><a class="header-anchor" href="#def-init-logger-self-none"><span> <em><strong>def</strong></em> <code>init_logger(self) -&gt; None</code></span></a></h3><p></p><h3 id="def-stop-self-none" tabindex="-1"><a class="header-anchor" href="#def-stop-self-none"><span> <em><strong>def</strong></em> <code>stop(self) -&gt; None</code></span></a></h3><p></p><p>Returns:</p><h3 id="def-on-before-start-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-before-start-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_before_start(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-after-start-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-after-start-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_after_start(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-after-shutdown-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-after-shutdown-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_after_shutdown(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-before-process-shutdown-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-before-process-shutdown-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_before_process_shutdown(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-before-process-restart-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-before-process-restart-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_before_process_restart(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-after-restart-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-after-restart-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_after_restart(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-on-after-nonebot-init-self-func-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-on-after-nonebot-init-self-func-lifespan-func-none"><span> <em><strong>def</strong></em> <code>on_after_nonebot_init(self, func: LIFESPAN_FUNC) -&gt; None</code></span></a></h3><p>nonebot</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="var-executable-sys-executable" tabindex="-1"><a class="header-anchor" href="#var-executable-sys-executable"><span><em><strong>var</strong></em> <code>executable = sys.executable</code></span></a></h3><h3 id="var-args-sys-argv" tabindex="-1"><a class="header-anchor" href="#var-args-sys-argv"><span><em><strong>var</strong></em> <code>args = sys.argv</code></span></a></h3><h3 id="var-chan-active-get-channel-f-name-active" tabindex="-1"><a class="header-anchor" href="#var-chan-active-get-channel-f-name-active"><span><em><strong>var</strong></em> <code>chan_active = get_channel(f&#39;{name}-active&#39;)</code></span></a></h3><h3 id="var-cmd-start" tabindex="-1"><a class="header-anchor" href="#var-cmd-start"><span><em><strong>var</strong></em> <code>cmd = &#39;start&#39;</code></span></a></h3><h3 id="var-chan-active-get-channel-f-process-name-active" tabindex="-1"><a class="header-anchor" href="#var-chan-active-get-channel-f-process-name-active"><span><em><strong>var</strong></em> <code>chan_active = get_channel(f&#39;{process_name}-active&#39;)</code></span></a></h3><h3 id="var-cmd-nohup" tabindex="-1"><a class="header-anchor" href="#var-cmd-nohup"><span><em><strong>var</strong></em> <code>cmd = &#39;nohup&#39;</code></span></a></h3><h3 id="var-cmd-open" tabindex="-1"><a class="header-anchor" href="#var-cmd-open"><span><em><strong>var</strong></em> <code>cmd = &#39;open&#39;</code></span></a></h3><h3 id="var-cmd-nohup-1" tabindex="-1"><a class="header-anchor" href="#var-cmd-nohup-1"><span><em><strong>var</strong></em> <code>cmd = &#39;nohup&#39;</code></span></a></h3>`,86),r=[o];function l(f,c){return n(),t("div",null,r)}const i=e(s,[["render",l],["__file","index.html.vue"]]),p=JSON.parse(`{"path":"/en/dev/api/bot/","title":"liteyuki.bot","lang":"en-US","frontmatter":{"title":"liteyuki.bot","index":true,"icon":"laptop-code","category":"API","description":"def get_bot() -> LiteyukiBot Returns: def get_config(key: str, default: Any) -> Any Args: Returns: def get_config_with_compat(key: str, compat_keys: tuple[str], defa...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/bot/"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/bot/"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.bot"}],["meta",{"property":"og:description","content":"def get_bot() -> LiteyukiBot Returns: def get_config(key: str, default: Any) -> Any Args: Returns: def get_config_with_compat(key: str, compat_keys: tuple[str], defa..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.bot\\",\\"image\\":[\\"\\"],\\"dateModified\\":null,\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def get_bot() -> LiteyukiBot","slug":"def-get-bot-liteyukibot","link":"#def-get-bot-liteyukibot","children":[]},{"level":3,"title":"def get_config(key: str, default: Any) -> Any","slug":"def-get-config-key-str-default-any-any","link":"#def-get-config-key-str-default-any-any","children":[]},{"level":3,"title":"def get_config_with_compat(key: str, compat_keys: tuple[str], default: Any) -> Any","slug":"def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-any","link":"#def-get-config-with-compat-key-str-compat-keys-tuple-str-default-any-any","children":[]},{"level":3,"title":"def print_logo() -> None","slug":"def-print-logo-none","link":"#def-print-logo-none","children":[]},{"level":3,"title":"class LiteyukiBot","slug":"class-liteyukibot","link":"#class-liteyukibot","children":[]},{"level":3,"title":"def __init__(self) -> None","slug":"def-init-self-none","link":"#def-init-self-none","children":[]},{"level":3,"title":"def run(self) ->