import{_ as e,o as n,c as t,e as o}from"./app-DuYQPtzk.js";const s={},f=o(`
get_bot() -> LiteyukiBot
获取轻雪实例
Returns:
LiteyukiBot: 当前的轻雪实例
get_config(key: str, default: Any) -> Any
获取配置
Args:
key: 配置键
default: 默认值
Returns:
Any: 配置值
get_config_with_compat(key: str, compat_keys: tuple[str], default: Any) -> Any
获取配置,兼容旧版本
Args:
key: 配置键
compat_keys: 兼容键
default: 默认值
Returns:
Any: 配置值
print_logo() -> None
LiteyukiBot
__init__(self) -> None
初始化轻雪实例
Args:
*args:
**kwargs: 配置
run(self) -> None
启动逻辑
keep_alive(self) -> None
保持轻雪运行
Returns:
restart(self, delay: int) -> None
重启轻雪本体
Returns:
restart_process(self, name: Optional[str]) -> None
停止轻雪
Args:
name: 进程名称, 默认为None, 所有进程
Returns:
init(self) -> None
初始化轻雪, 自动调用
Returns:
init_logger(self) -> None
stop(self) -> None
停止轻雪
Returns:
on_before_start(self, func: LIFESPAN_FUNC) -> None
注册启动前的函数
Args:
func:
Returns:
on_after_start(self, func: LIFESPAN_FUNC) -> None
注册启动后的函数
Args:
func:
Returns:
on_after_shutdown(self, func: LIFESPAN_FUNC) -> None
注册停止后的函数:未实现
Args:
func:
Returns:
on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> None
注册进程停止前的函数,为子进程停止时调用
Args:
func:
Returns:
on_before_process_restart(self, func: LIFESPAN_FUNC) -> None
注册进程重启前的函数,为子进程重启时调用
Args:
func:
Returns:
on_after_restart(self, func: LIFESPAN_FUNC) -> None
注册重启后的函数:未实现
Args:
func:
Returns:
on_after_nonebot_init(self, func: LIFESPAN_FUNC) -> None
注册nonebot初始化后的函数
Args:
func:
Returns:
`,78),r=[f];function a(l,d){return n(),t("div",null,r)}const c=e(s,[["render",a],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/en/dev/api/liteyuki/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":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/liteyuki/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:updated_time","content":"2024-08-19T02:04:24.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-19T02:04:24.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.bot\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T02:04:24.000Z\\",\\"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) -> None","slug":"def-run-self-none","link":"#def-run-self-none","children":[]},{"level":3,"title":"def keep_alive(self) -> None","slug":"def-keep-alive-self-none","link":"#def-keep-alive-self-none","children":[]},{"level":3,"title":"def restart(self, delay: int) -> None","slug":"def-restart-self-delay-int-none","link":"#def-restart-self-delay-int-none","children":[]},{"level":3,"title":"def restart_process(self, name: Optional[str]) -> None","slug":"def-restart-process-self-name-optional-str-none","link":"#def-restart-process-self-name-optional-str-none","children":[]},{"level":3,"title":"def init(self) -> None","slug":"def-init-self-none-1","link":"#def-init-self-none-1","children":[]},{"level":3,"title":"def init_logger(self) -> None","slug":"def-init-logger-self-none","link":"#def-init-logger-self-none","children":[]},{"level":3,"title":"def stop(self) -> None","slug":"def-stop-self-none","link":"#def-stop-self-none","children":[]},{"level":3,"title":"def on_before_start(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-before-start-self-func-lifespan-func-none","link":"#def-on-before-start-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_after_start(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-after-start-self-func-lifespan-func-none","link":"#def-on-after-start-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_after_shutdown(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-after-shutdown-self-func-lifespan-func-none","link":"#def-on-after-shutdown-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-before-process-shutdown-self-func-lifespan-func-none","link":"#def-on-before-process-shutdown-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_before_process_restart(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-before-process-restart-self-func-lifespan-func-none","link":"#def-on-before-process-restart-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_after_restart(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-after-restart-self-func-lifespan-func-none","link":"#def-on-after-restart-self-func-lifespan-func-none","children":[]},{"level":3,"title":"def on_after_nonebot_init(self, func: LIFESPAN_FUNC) -> None","slug":"def-on-after-nonebot-init-self-func-lifespan-func-none","link":"#def-on-after-nonebot-init-self-func-lifespan-func-none","children":[]}],"git":{"createdTime":1724031826000,"updatedTime":1724033064000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":3}]},"readingTime":{"minutes":1.25,"words":374},"filePathRelative":"en/dev/api/liteyuki/bot/README.md","localizedDate":"August 19, 2024","autoDesc":true}');export{c as comp,p as data};