1
0
forked from bot/app
LiteyukiBot/docs/dev/api/message/on.md
2024-08-21 17:59:21 +08:00

720 B

title order icon category
liteyuki.message.on 1 laptop-code API

def on_message(rule: Rule, priority: int, block: bool) -> Matcher

源代码
def on_message(rule: Rule=Rule(), priority: int=0, block: bool=True) -> Matcher:
    matcher = Matcher(rule, priority, block)
    for i, m in enumerate(_matcher_list):
        if m.priority < matcher.priority:
            _matcher_list.insert(i, matcher)
            break
    else:
        _matcher_list.append(matcher)
    return matcher

var current_priority = -1

var matcher = Matcher(rule, priority, block)

var current_priority = matcher.priority