1
0
forked from bot/app
LiteyukiBot/assets/lifespan.html-MLpl77J0.js

17 lines
11 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as e,o as n,c as s,e as f}from"./app-0e_4pVFu.js";const t={},a=f(`<h3 id="def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none" tabindex="-1"><a class="header-anchor" href="#def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none"><span><em><strong>def</strong></em> <code>run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -&gt; None</code></span></a></h3><p>运行函数</p><p>Args:</p><pre><code>funcs:
</code></pre><p>Returns:</p><h3 id="class-lifespan" tabindex="-1"><a class="header-anchor" href="#class-lifespan"><span><em><strong>class</strong></em> <code>Lifespan</code></span></a></h3><h3 id="staticmethod" tabindex="-1"><a class="header-anchor" href="#staticmethod"><span> <em><strong>@staticmethod</strong></em></span></a></h3><h3 id="def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none-1" tabindex="-1"><a class="header-anchor" href="#def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none-1"><span> <em><strong>def</strong></em> <code>run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -&gt; None</code></span></a></h3><p> 运行函数</p><p>Args:</p><pre><code>funcs:
</code></pre><p>Returns:</p><h3 id="def-on-before-start-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-before-start-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_before_start(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册启动时的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-after-start-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-after-start-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_after_start(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册启动时的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-before-process-shutdown-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-before-process-shutdown-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册停止前的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-after-shutdown-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-after-shutdown-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册停止后的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-before-process-restart-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-before-process-restart-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册重启时的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-after-restart-self-any-func-lifespan-func-lifespan-func" tabindex="-1"><a class="header-anchor" href="#def-on-after-restart-self-any-func-lifespan-func-lifespan-func"><span> <em><strong>def</strong></em> <code>on_after_restart(self: Any, func: LIFESPAN_FUNC) -&gt; LIFESPAN_FUNC</code></span></a></h3><p> 注册重启后的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><pre><code>LIFESPAN_FUNC:
</code></pre><h3 id="def-on-after-nonebot-init-self-any-func-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-after-nonebot-init-self-any-func-any-none"><span> <em><strong>def</strong></em> <code>on_after_nonebot_init(self: Any, func: Any) -&gt; None</code></span></a></h3><p> 注册 NoneBot 初始化后的函数</p><p>Args:</p><pre><code>func:
</code></pre><p>Returns:</p><h3 id="def-before-start-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-before-start-self-any-none"><span> <em><strong>def</strong></em> <code>before_start(self: Any) -&gt; None</code></span></a></h3><p> 启动前</p><p>Returns:</p><h3 id="def-after-start-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-after-start-self-any-none"><span> <em><strong>def</strong></em> <code>after_start(self: Any) -&gt; None</code></span></a></h3><p> 启动后</p><p>Returns:</p><h3 id="def-before-process-shutdown-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-before-process-shutdown-self-any-none"><span> <em><strong>def</strong></em> <code>before_process_shutdown(self: Any) -&gt; None</code></span></a></h3><p> 停止前</p><p>Returns:</p><h3 id="def-after-shutdown-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-after-shutdown-self-any-none"><span> <em><strong>def</strong></em> <code>after_shutdown(self: Any) -&gt; None</code></span></a></h3><p> 停止后</p><p>Returns:</p><h3 id="def-before-process-restart-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-before-process-restart-self-any-none"><span> <em><strong>def</strong></em> <code>before_process_restart(self: Any) -&gt; None</code></span></a></h3><p> 重启前</p><p>Returns:</p><h3 id="def-after-restart-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-after-restart-self-any-none"><span> <em><strong>def</strong></em> <code>after_restart(self: Any) -&gt; None</code></span></a></h3><p> 重启后</p><p>Returns:</p>`,71),r=[a];function o(c,l){return n(),s("div",null,r)}const d=e(t,[["render",o],["__file","lifespan.html.vue"]]),i=JSON.parse('{"path":"/en/dev/api/liteyuki/bot/lifespan.html","title":"liteyuki.bot.lifespan","lang":"en-US","frontmatter":{"title":"liteyuki.bot.lifespan","order":1,"icon":"laptop-code","category":"API","description":"def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None 运行函数 Args: Returns: class Lifespan @staticmethod def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFE...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/liteyuki/bot/lifespan.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.bot.lifespan"}],["meta",{"property":"og:description","content":"def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None 运行函数 Args: Returns: class Lifespan @staticmethod def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFE..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-08-19T01:55:47.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T01:55:47.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.bot.lifespan\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:55:47.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None","slug":"def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none","link":"#def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none","children":[]},{"level":3,"title":"class Lifespan","slug":"class-lifespan","link":"#class-lifespan","children":[]},{"level":3,"title":"@staticmethod","slug":"staticmethod","link":"#staticmethod","children":[]},{"level":3,"title":"def run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None","slug":"def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none-1","link":"#def-run-funcs-funcs-list-lifespan-func-process-lifespan-func-none-1","children":[]},{"level":3,"title":"def on_before_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-before-start-self-any-func-lifespan-func-lifespan-func","link":"#def-on-before-start-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_after_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-after-start-self-any-func-lifespan-func-lifespan-func","link":"#def-on-after-start-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-before-process-shutdown-self-any-func-lifespan-func-lifespan-func","link":"#def-on-before-process-shutdown-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-after-shutdown-self-any-func-lifespan-func-lifespan-func","link":"#def-on-after-shutdown-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-before-process-restart-self-any-func-lifespan-func-lifespan-func","link":"#def-on-before-process-restart-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_after_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC","slug":"def-on-after-restart-self-any-func-lifespan-func-lifespan-func","link":"#def-on-after-restart-self-any-func-lifespan-func-lifespan-func","children":[]},{"level":3,"title":"def on_after_nonebot_init(self: Any, func: Any) -> None","slug":"def-on-after-nonebot-init-self-any-func-any-none","link":"#def-on-after-nonebot-init-self-any-func-any-none","children":[]},{"level":3,"title":"def before_start(self: Any) -> None","slug":"def-before-start-self-any-none","link":"#def-before-start-self-any-none","children":[]},{"level":3,"title":"def after_start(self: Any) -> None","slug":"def-after-start-self-any-none","link":"#def-after-start-self-any-none","children":[]},{"level":3,"title":"def before_process_shutdown(self: Any) -> None","slug":"def-before-process-shutdown-self-any-none","link":"#def-before-process-shutdown-self-any-none","children":[]},{"level":3,"title":"def after_shutdown(self: Any) -> None","slug":"def-after-shutdown-self-any-none","link":"#def-after-shutdown-self-any-none","children":[]},{"level":3,"title":"def before_process_restart(self: Any) -> None","slug":"def-before-process-restart-self-any-none","link":"#def-before-process-restart-self-any-none","children":[]},{"level":3,"title":"def after_restart(self: Any) -> None","slug":"def-after-restart-self-any-none","link":"#def-after-restart-self-any-none","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724032547000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":2}]},"readingTime":{"minutes":0.86,"words":257},"filePathRelative":"en/dev/api/liteyuki/bot/lifespan.md","localizedDate":"August 19, 2024","autoDesc":true}');export{d as comp,i as data};