|
|
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="api" tabindex="-1"><a class="header-anchor" href="#api"><span><strong>API</strong></span></a></h3><p>理论上所有基于onebotv11的api都可调用,不同Adapter api也有差别.</p>`,13),d={href:"https://283375.github.io/onebot_v11_vitepress/api/index.html",target:"_blank",rel:"noopener noreferrer"},u=n("h3",{id:"结束关键字",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#结束关键字"},[n("span",null,[n("strong",null,"结束关键字")])])],-1),m=n("p",null,'由于LiteyukiBot基于异步运行, 所以在编写lyfunction时也要注意异步的调用,避免出现"单线程走到底"的情况是效率提升的关键.',-1),h=n("p",null,[n("code",null,"await"),e(" 异步任务结束关键字,用于结束当前已完成function的执行")],-1),v=n("div",{class:"hint-container warning"},[n("p",{class:"hint-container-title"},"Warning"),n("p",null,"但若出现非单function的情况,有一个task任务没有完成而await被执行了,那么当前所有函数包的task都会被截停销毁")],-1),k={class:"hint-container tip"},f=n("p",{class:"hint-container-title"},"Tips",-1),g={href:"https://github.com/LiteyukiStudio/lyfunctionTextmate",target:"_blank",rel:"noopener noreferrer"};function b(_,y){const a=o("ExternalLinkIcon");return i(),l("div",null,[r,n("p",null,[n("a",d,[e("Onebot v11 API文档"),s(a)])]),u,m,h,v,n("div",k,[f,n("p",null,[e("编写轻雪函数推荐你使用VS Code插件"),n("a",g,[e("Liteyuki Function"),s(a)]),e("实现语法高亮")])])])}const w=t(p,[["render",b],["__file","dev_lyfunc.html.vue"]]),L=JSON.parse('{"path":"/en/dev/dev_lyfunc.html","title":"轻雪函数","lang":"en-US","frontmatter":{"title":"轻雪函数","icon":"code","order":2,"category":"开发","description":"轻雪函数 轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mc...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/dev_lyfunc.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/dev_lyfunc.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"轻雪函数"}],["meta",{"property":"og:description","content":"轻雪函数 轻雪函数 Liteyuki Function 是轻雪的一个功能,它允许你在轻雪中运行一些自定义的由数据驱动的命令,类似于Minecraft的mcfunction,属于资源包的一部分,但需单独起篇幅. 函数文件 函数文件放在资源包的functions目录下,文件名以.mcfunction .lyfunction .lyf结尾,例如test.mc..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-08-29T06:23:13.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-29T06:23:13.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"轻雪函数\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-29T06:23:13.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"轻雪函数","slug":"轻雪函数","link":"#轻雪函数","children":[{"level":3,"title":"函数文件","slug":"函数文件","link":"#函数文件","children":[]},{"level":3,"title":"命令文档","slug":"命令文档","link":"#命令文档","children"
|