11 lines
349 B
Python
11 lines
349 B
Python
from typing import Iterable
|
|
|
|
from v6d2ctx.context import Context, Implicit
|
|
|
|
|
|
async def catch(ctx: Context, args: list[str], reply: str, *catched: (Iterable[str] | str)):
|
|
catched = {(case,) if isinstance(case, str) else tuple(case) for case in catched}
|
|
if tuple(args) in catched:
|
|
await ctx.reply(reply.strip())
|
|
raise Implicit
|