Skip to main content
Module

x/grammy_parse_mode/hydrate.ts>ParseModeFlavor

Safely format messages and keep their source code maintainable.
Latest
type alias ParseModeFlavor
import { type ParseModeFlavor } from "https://deno.land/x/grammy_parse_mode@1.10.0/hydrate.ts";

Context flavor for Context that will be hydrated with an additional set of reply methods from hydrateReply

definition: C & { replyFmt: (stringLike: Stringable, ...args: Tail<Parameters<C["reply"]>>) => ReturnType<C["reply"]>; replyWithHTML: C["reply"]; replyWithMarkdown: C["reply"]; replyWithMarkdownV1: C["reply"]; replyWithMarkdownV2: C["reply"]; replyFmtWithPhoto: (
photo: Parameters<C["replyWithPhoto"]>[0],
other?: Omit<Exclude<Parameters<C["replyWithPhoto"]>[1], undefined>, "caption"> & { caption?: Stringable; },
...args: Tail<Tail<Parameters<C["replyWithPhoto"]>>>,
) => ReturnType<C["replyWithPhoto"]>; replyFmtWithMediaGroup: (
media: (Omit<Parameters<C["replyWithMediaGroup"]>[0][number], "caption"> & { caption?: Stringable; })[],
other?: Parameters<C["replyWithMediaGroup"]>[1],
...args: Tail<Tail<Parameters<C["replyWithMediaGroup"]>>>,
) => ReturnType<C["replyWithMediaGroup"]>; editFmtMessageMedia: (
media: Omit<Parameters<C["editMessageMedia"]>[0], "caption"> & { caption?: Stringable; },
other?: Omit<Parameters<C["editMessageMedia"]>[1], "caption">,
...args: Tail<Tail<Parameters<C["editMessageMedia"]>>>,
) => ReturnType<C["editMessageMedia"]>; editFmtMessageText: (
text: Stringable,
other?: Parameters<C["editMessageText"]>[1],
...args: Tail<Tail<Parameters<C["editMessageText"]>>>,
) => ReturnType<C["editMessageText"]>; }