import{_ as e,o as n,c as a,e as s}from"./app-Ct8dV_oN.js";const t={},l=s(`

class Matcher

def __init__(self, rule: Rule, priority: int, block: bool) -> None

 匹配器

Args:

rule: 规则

priority: 优先级 >= 0

block: 是否阻断后续优先级更低的匹配器
源代码
def __init__(self, rule: Rule, priority: int, block: bool):
    """
        匹配器
        Args:
            rule: 规则
            priority: 优先级 >= 0
            block: 是否阻断后续优先级更低的匹配器
        """
    self.rule = rule
    self.priority = priority
    self.block = block
    self.handlers: list[EventHandler] = []

def handle(self, handler: EventHandler) -> EventHandler

 添加处理函数,装饰器

Args:

handler:

Returns:

EventHandler
源代码
def handle(self, handler: EventHandler) -> EventHandler:
    """
        添加处理函数,装饰器
        Args:
            handler:
        Returns:
            EventHandler
        """
    self.handlers.append(handler)
    return handler
`,13),o=[l];function i(r,p){return n(),a("div",null,o)}const d=e(t,[["render",i],["__file","matcher.html.vue"]]),u=JSON.parse('{"path":"/en/dev/api/message/matcher.html","title":"liteyuki.message.matcher","lang":"en-US","frontmatter":{"title":"liteyuki.message.matcher","order":1,"icon":"laptop-code","category":"API","description":"class Matcher def __init__(self, rule: Rule, priority: int, block: bool) -> None 匹配器 Args: 源代码 def handle(self, handler: EventHandler) -> EventHandler 添加处理函数,装饰器 Args: Returns: 源代码","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuepress-theme-hope-docs-demo.netlify.app/dev/api/message/matcher.html"}],["meta",{"property":"og:url","content":"https://vuepress-theme-hope-docs-demo.netlify.app/en/dev/api/message/matcher.html"}],["meta",{"property":"og:site_name","content":"LiteyukiBot"}],["meta",{"property":"og:title","content":"liteyuki.message.matcher"}],["meta",{"property":"og:description","content":"class Matcher def __init__(self, rule: Rule, priority: int, block: bool) -> None 匹配器 Args: 源代码 def handle(self, handler: EventHandler) -> EventHandler 添加处理函数,装饰器 Args: Returns: 源代码"}],["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-21T09:59:21.000Z"}],["meta",{"property":"article:modified_time","content":"2024-08-21T09:59:21.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"liteyuki.message.matcher\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-08-21T09:59:21.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"class Matcher","slug":"class-matcher","link":"#class-matcher","children":[]},{"level":3,"title":"def __init__(self, rule: Rule, priority: int, block: bool) -> None","slug":"def-init-self-rule-rule-priority-int-block-bool-none","link":"#def-init-self-rule-rule-priority-int-block-bool-none","children":[]},{"level":3,"title":"def handle(self, handler: EventHandler) -> EventHandler","slug":"def-handle-self-handler-eventhandler-eventhandler","link":"#def-handle-self-handler-eventhandler-eventhandler","children":[]}],"git":{"createdTime":1724234361000,"updatedTime":1724234361000,"contributors":[{"name":"snowy","email":"snowykami@outlook.com","commits":1}]},"readingTime":{"minutes":0.52,"words":157},"filePathRelative":"en/dev/api/message/matcher.md","localizedDate":"August 21, 2024","autoDesc":true}');export{d as comp,u as data};