Skip to main content

liteyuki.message.rule

SnowyKamiLess than 1 minuteAPI

async def empty_rule(event: MessageEvent) -> bool

源代码
@Rule
async def empty_rule(event: MessageEvent) -> bool:
    return True

async def combined_handler(event: MessageEvent) -> bool

源代码
async def combined_handler(event: MessageEvent) -> bool:
    return await self.handler(event) or await other.handler(event)

async def combined_handler(event: MessageEvent) -> bool

源代码
async def combined_handler(event: MessageEvent) -> bool:
    return await self.handler(event) and await other.handler(event)

class Rule

def __init__(self, handler: RuleHandlerFunc) -> None

源代码
def __init__(self, handler: RuleHandlerFunc):
    self.handler = handler