Files
nonebot-plugin-marshoai/assets/dev_api_plugins_test_marshoai_basic_index.md.Bi6J7R_z.js

2 lines
4.8 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.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as i,c as a,o as t,ae as n}from"./chunks/framework.CTVYQtO4.js";const g=JSON.parse('{"title":"index","description":"","frontmatter":{"title":"index","order":100,"collapsed":true},"headers":[],"relativePath":"dev/api/plugins_test/marshoai_basic/index.md","filePath":"zh/dev/api/plugins_test/marshoai_basic/index.md","lastUpdated":null}'),e={name:"dev/api/plugins_test/marshoai_basic/index.md"};function h(p,s,l,r,k,d){return t(),a("div",null,s[0]||(s[0]=[n('<h1 id="樑块-nonebot-plugin-marshoai-plugins-test-marshoai-basic" tabindex="-1"><strong>樑块</strong> <code>nonebot_plugin_marshoai.plugins_test.marshoai_basic</code> <a class="header-anchor" href="#樑块-nonebot-plugin-marshoai-plugins-test-marshoai-basic" aria-label="Permalink to &quot;**樑块** `nonebot_plugin_marshoai.plugins_test.marshoai_basic`&quot;">​</a></h1><hr><p><code>@on_function_call(description=&#39;θŽ·ε–ε½“ε‰ζ—Άι—΄οΌŒζ—₯ζœŸε’Œζ˜ŸζœŸ&#39;)</code></p><h3 id="async-func-get-current-time-str" tabindex="-1"><em><strong>async func</strong></em> <code>get_current_time() -&gt; str</code> <a class="header-anchor" href="#async-func-get-current-time-str" aria-label="Permalink to &quot;***async func*** `get_current_time() -&gt; str`&quot;">​</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_test/marshoai_basic/__init__.py#L20" 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;">&#39;θŽ·ε–ε½“ε‰ζ—Άι—΄οΌŒζ—₯ζœŸε’Œζ˜ŸζœŸ&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</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;"> get_current_time</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() -&gt; </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:#24292E;--shiki-dark:#E1E4E8;"> current_time </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> DateTime.now()</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> time_prompt </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;ηŽ°εœ¨ηš„ζ—Άι—΄ζ˜― </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">,</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">,</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">。&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.format(current_time.strftime(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;%Y.%m.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> %H:%M:%S&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">), weekdays[current_time.weekday()], current_time.chinesize.date_hanzify(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;ε†œεŽ†</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{εΉ²ζ”―εΉ΄}{η”Ÿθ‚–}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">εΉ΄ </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{月份}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">月</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{数序ζ—₯}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</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;"> time_prompt</span></span></code></pre></div></details>',6)]))}const c=i(e,[["render",h]]);export{g as __pageData,c as default};