1
0
forked from bot/app
LiteyukiBot/assets/channel.html-DBl6mYl9.js

10 lines
9.0 KiB
JavaScript
Raw Normal View History

import{_ as e,o as n,c as a,e as t}from"./app-0e_4pVFu.js";const l={},c=t(`<h3 id="def-set-channel-name-str-channel-channel-none" tabindex="-1"><a class="header-anchor" href="#def-set-channel-name-str-channel-channel-none"><span><em><strong>def</strong></em> <code>set_channel(name: str, channel: Channel) -&gt; None</code></span></a></h3><p>设置通道实例</p><p>Args:</p><pre><code>name: 通道名称
channel: 通道实例
</code></pre><h3 id="def-set-channels-channels-dict-str-channel-none" tabindex="-1"><a class="header-anchor" href="#def-set-channels-channels-dict-str-channel-none"><span><em><strong>def</strong></em> <code>set_channels(channels: dict[str, Channel]) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>channels:
</code></pre><h3 id="def-get-channel-name-str-channel" tabindex="-1"><a class="header-anchor" href="#def-get-channel-name-str-channel"><span><em><strong>def</strong></em> <code>get_channel(name: str) -&gt; Channel</code></span></a></h3><p></p><p>Args:</p><pre><code>name:
</code></pre><p>Returns:</p><h3 id="def-get-channels-dict-str-channel" tabindex="-1"><a class="header-anchor" href="#def-get-channels-dict-str-channel"><span><em><strong>def</strong></em> <code>get_channels() -&gt; dict[str, Channel]</code></span></a></h3><p></p><p>Returns:</p><h3 id="def-on-set-channel-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-set-channel-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_set_channel(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-on-get-channel-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-get-channel-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_get_channel(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-on-get-channels-data-tuple-str-dict-str-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-get-channels-data-tuple-str-dict-str-any-none"><span><em><strong>def</strong></em> <code>on_get_channels(data: tuple[str, dict[str, Any]]) -&gt; None</code></span></a></h3><h3 id="def-decorator-func-callable-t-any-callable-t-any" tabindex="-1"><a class="header-anchor" href="#def-decorator-func-callable-t-any-callable-t-any"><span><em><strong>def</strong></em> <code>decorator(func: Callable[[T], Any]) -&gt; Callable[[T], Any]</code></span></a></h3><h3 id="async-def-wrapper-data-t-any" tabindex="-1"><a class="header-anchor" href="#async-def-wrapper-data-t-any"><span><em><strong>async def</strong></em> <code>wrapper(data: T) -&gt; Any</code></span></a></h3><h3 id="class-channel-generic-t" tabindex="-1"><a class="header-anchor" href="#class-channel-generic-t"><span><em><strong>class</strong></em> <code>Channel(Generic[T])</code></span></a></h3><p></p><p>使 <code>receive</code> 使 <code>on_receive</code> </p><h3 id="def-send-self-any-data-t-none" tabindex="-1"><a class="header-anchor" href="#def-send-self-any-data-t-none"><span> <em><strong>def</strong></em> <code>send(self: Any, data: T) -&gt; None</code></span></a></h3><p></p><p>Args:</p><pre><code>data:
</code></pre><h3 id="def-receive-self-any-t" tabindex="-1"><a class="header-anchor" href="#def-receive-self-any-t"><span> <em><strong>def</strong></em> <code>receive(self: Any) -&gt; T</code></span></a></h3><p></p><p>Args:</p><h3 id="def-close-self-any-none" tabindex="-1"><a class="header-anchor" href="#def-close-self-any-none"><span> <em><strong>def</strong></em> <code>close(self: Any) -&gt; None</code></span></a></h3><p></p><h3 id="def-on-receive-self-any-filter-func-optional-filter-func-callable-callable-t-any-callable-t-any" tabindex="-1"><a class="header-anchor" href="#def-on-receive-self-any-filter-func-optional-filter-func-callable-callable-t-any-callable-t-any"><span> <em><strong>def</strong></em> <code>on_receive(self: Any, filter_func: Optional[FILTER_FUNC]) -&gt; Callable[[Callable[[T], Any]], Callable[[T], Any]]</code></span></a></h3><p></p><p>Args:</p><pre><code>filter_func: None
</code></pre><p>Returns:</p><pre><code>
</code></pre>`,39),s=[c];function d(r,o){return n(),a("div",null,s)}const i=e(l,[["render",d],["__file","channel.html.vue"]]),f=JSON.parse('{"path":"/en/dev/api/liteyuki/comm/channel.html","title":"liteyuki.comm.channel","lang":"en-US","frontmatter":{"title":"liteyuki.comm.channel","order":1,"icon":"laptop-code","category":"API","description":"def set_channel(name: str, channel: Channel) -> None Args: def set_channels(channels: dict[str, Channel]) -> None Args: def get_channel(name: str) -> Channel ...","head":[["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/liteyuki/comm/channel.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.comm.channel"}],["meta",{"property":"og:description","content":"def set_channel(name: str, channel: Channel) -> None Args: def set_channels(channels: dict[str, Channel]) -> None Args: def get_channel(name: str) -> Channel ..."}],["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.comm.channel\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-19T01:55:47.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"def set_channel(name: str, channel: Channel) -> None","slug":"def-set-channel-name-str-channel-channel-none","link":"#def-set-channel-name-str-channel-channel-none","children":[]},{"level":3,"title":"def set_channels(channels: dict[str, Channel]) -> None","slug":"def-set-channels-channels-dict-str-channel-none","link":"#def-set-channels-channels-dict-str-channel-none","children":[]},{"level":3,"title":"def get_channel(name: str) -> Channel","slug":"def-get-channel-name-str-channel","link":"#def-get-channel-name-str-channel","children":[]},{"level":3,"title":"def get_channels() -> dict[str, Channel]","slug":"def-get-channels-dict-str-channel","link":"#def-get-channels-dict-str-channel","children":[]},{"level":3,"title":"def on_set_channel(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-set-channel-data-tuple-str-dict-str-any-none","link":"#def-on-set-channel-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def on_get_channel(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-get-channel-data-tuple-str-dict-str-any-none","link":"#def-on-get-channel-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def on_get_channels(data: tuple[str, dict[str, Any]]) -> None","slug":"def-on-get-channels-data-tuple-str-dict-str-any-none","link":"#def-on-get-channels-data-tuple-str-dict-str-any-none","children":[]},{"level":3,"title":"def decorator(func: Callable[[T], Any]) -> Callable[[T], Any]","slug":"def-decorator-func-callable-t-any-callable-t-any","link":"#def-decorator-func-callable-t-any-callable-t-any","children":[]},{"level":3,"title":"async def wrapper(data: T) -> Any","slug":"async-def-wrapper-data-t-any","link":"#async-def-wrapper-data-t-any","children":[]},{"level":3,"title":"class Channel(Generic[T])","slug":"class-channel-generic-t","link":"#class-channel-generic-t","children":[]},{"level":3,"title":"def send(self: Any, data: T) -> None","slug":"def-send-self-any-data-t-none","link":"#def-send-self-any-data-t-none","children":[]},{"level":3,"title":"def receive(self: Any) -> T","slug":"def-receive-self-any-t","link":"#def-receive-self-any-t","children":[]},{"level":3,"title":"def close(self: Any) -> None","slug":"def-close-self-any-none","link":"#def-close-self-any-none","children":[]},{"level":3,"title":"def on_receive(self: Any, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]","slug":"def-on-receive-self-any-filter-func-opti