Commit 63fe7e66 authored by nanahira's avatar nanahira

add OnAnywhere and OnNowhere

parent 1f36ec85
......@@ -75,6 +75,10 @@ export const OnContext = (
): MethodDecorator & ClassDecorator =>
Metadata.append(KoishiOnContextScope, ctxFun);
export const OnAnywhere = () => OnContext((ctx) => ctx.any());
export const OnNowhere = () => OnContext((ctx) => ctx.never());
export const OnUser = (...values: string[]) =>
OnContext((ctx) => ctx.user(...values));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment