Skip to main content
Module

x/grammy_autoquote/mod.ts>autoQuote

grammY plugin that forces all sent messages to quote the last received one
Latest
function autoQuote
import { autoQuote } from "https://deno.land/x/grammy_autoquote@v2.0.6/mod.ts";

Applies the addReplyParam middleware to the bot's API configuration.

Use this when you want to enable auto-quoting for all scopes.

Examples

Example 1

 import { Bot } from "grammy";
 import { autoQuote } from "jsr:@roz/grammy-autoquote";

 const bot = new Bot("");

 bot.use(autoQuote());
 // OR:
 // bot.use(autoQuote({ allow_send_without_reply: true })

 bot.command("demo", async (ctx) => {
   ctx.reply("Demo command!"); // This will quote the user's message
 });

 bot.command("hello", async (ctx) => {
   ctx.reply("Hi there :)"); // Also quotes the user's message
 });

 bot.start();

Parameters

optional
options: Partial<AutoQuoteOptions>
  • Optional configuration options for autoQuote.

Returns

A middleware function.