mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-02-07 15:26:11 +08:00
2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
import{_ as i,c as a,ae as t,o as n}from"./chunks/framework.BzDBnRMZ.js";const d=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins/twisuki_petcat/index.md","filePath":"zh/dev/api/plugins/twisuki_petcat/index.md","lastUpdated":null}'),e={name:"dev/api/plugins/twisuki_petcat/index.md"};function h(l,s,p,k,r,o){return n(),a("div",null,s[0]||(s[0]=[t('<h1 id="模块-nonebot-plugin-marshoai-plugins-twisuki-petcat" tabindex="-1"><strong>模块</strong> <code>nonebot_plugin_marshoai.plugins.twisuki_petcat</code> <a class="header-anchor" href="#模块-nonebot-plugin-marshoai-plugins-twisuki-petcat" aria-label="Permalink to "**模块** `nonebot_plugin_marshoai.plugins.twisuki_petcat`""></a></h1><hr><p><code>@on_function_call(description='传入猫猫种类, 新建一只猫猫').params(type=String(description='猫猫种类, 默认"猫1", 可留空'))</code></p><h3 id="async-func-cat-new-type-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>cat_new(type: str) -> str</code> <a class="header-anchor" href="#async-func-cat-new-type-str-str" aria-label="Permalink to "***async func*** `cat_new(type: str) -> str`""></a></h3><p><strong>说明</strong>: 新建猫猫</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L22" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'传入猫猫种类, 新建一只猫猫'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(type=String(description='猫猫种类, 默认"猫1", 可留空'))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cat_new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_cat.cat_new(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='传入token(一串长20的b64字符串), 新名字, 选用技能, 进行猫猫的初始化').params(token=String(description='token(一串长20的b64字符串)'), name=String(description='新名字'), skill=String(description='技能'))</code></p><h3 id="async-func-cat-init-token-str-name-str-skill-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>cat_init(token: str, name: str, skill: str) -> str</code> <a class="header-anchor" href="#async-func-cat-init-token-str-name-str-skill-str-str" aria-label="Permalink to "***async func*** `cat_init(token: str, name: str, skill: str) -> str`""></a></h3><p><strong>说明</strong>: 初始化猫猫</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L34" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'传入token(一串长20的b64字符串), 新名字, 选用技能, 进行猫猫的初始化'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(token=String(description='token(一串长20的b64字符串)'), name=String(description='新名字'), skill=String(description='技能'))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cat_init</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(token: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, skill: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_cat.cat_init(token, name, skill)</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='传入token, 查看猫猫信息').params(token=String(description='token(一串长20的b64字符串)'))</code></p><h3 id="async-func-cat-show-token-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>cat_show(token: str) -> str</code> <a class="header-anchor" href="#async-func-cat-show-token-str-str" aria-label="Permalink to "***async func*** `cat_show(token: str) -> str`""></a></h3><p><strong>说明</strong>: 查询信息</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L42" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'传入token, 查看猫猫信息'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(token=String(description='token(一串长20的b64字符串)'))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cat_show</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(token: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_cat.cat_show(token)</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='传入token, 玩猫').params(token=String(description='token(一串长20的b64字符串)'))</code></p><h3 id="async-func-cat-play-token-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>cat_play(token: str) -> str</code> <a class="header-anchor" href="#async-func-cat-play-token-str-str" aria-label="Permalink to "***async func*** `cat_play(token: str) -> str`""></a></h3><p><strong>说明</strong>: 玩猫</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L50" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'传入token, 玩猫'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(token=String(description='token(一串长20的b64字符串)'))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cat_play</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(token: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_cat.cat_play(token)</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='传入token, 投喂猫猫').params(token=String(description='token(一串长20的b64字符串)'))</code></p><h3 id="async-func-cat-feed-token-str-str" tabindex="-1"><em><strong>async func</strong></em> <code>cat_feed(token: str) -> str</code> <a class="header-anchor" href="#async-func-cat-feed-token-str-str" aria-label="Permalink to "***async func*** `cat_feed(token: str) -> str`""></a></h3><p><strong>说明</strong>: 喂猫</p><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L58" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'传入token, 投喂猫猫'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params(token=String(description='token(一串长20的b64字符串)'))</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cat_feed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(token: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_cat.cat_feed(token)</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='帮助文档/如何创建一只猫猫').params()</code></p><h3 id="async-func-help-cat-new-str" tabindex="-1"><em><strong>async func</strong></em> <code>help_cat_new() -> str</code> <a class="header-anchor" href="#async-func-help-cat-new-str" aria-label="Permalink to "***async func*** `help_cat_new() -> str`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L65" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'帮助文档/如何创建一只猫猫'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params()</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> help_cat_new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_info.help_cat_new()</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='可选种类').params()</code></p><h3 id="async-func-help-cat-type-str" tabindex="-1"><em><strong>async func</strong></em> <code>help_cat_type() -> str</code> <a class="header-anchor" href="#async-func-help-cat-type-str" aria-label="Permalink to "***async func*** `help_cat_type() -> str`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L70" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'可选种类'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params()</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> help_cat_type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_info.print_type_list()</span></span></code></pre></div></details><hr><p><code>@on_function_call(description='可选技能').params()</code></p><h3 id="async-func-help-cat-skill-str" tabindex="-1"><em><strong>async func</strong></em> <code>help_cat_skill() -> str</code> <a class="header-anchor" href="#async-func-help-cat-skill-str" aria-label="Permalink to "***async func*** `help_cat_skill() -> str`""></a></h3><details><summary><b>源代码</b> 或 <a href="https://github.com/LiteyukiStudio/nonebot-plugin-marshoai/tree/main/nonebot_plugin_marshoai/plugins/twisuki_petcat/__init__.py#L75" target="_blank">在GitHub上查看</a></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@on_function_call</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'可选技能'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic;">.params()</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> help_cat_skill</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pc_info.print_skill_list()</span></span></code></pre></div></details>',38)]))}const g=i(e,[["render",h]]);export{d as __pageData,g as default};
|