import { MessageContext } from "vk-io"; type MaybePromise = T | Promise; type Predicate = (ctx: C) => MaybePromise; export const not = (predicate: Predicate) => (ctx: C) => Promise.resolve(predicate(ctx)).then((v) => !v); export const isChat = (ctx: C) => ctx.isChat === true; export const isHasText = (ctx: C) => ctx.text ? true : false;