File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ import * as Sentry from "@sentry/node";
2727const commandPrefix : string = process . env . COMMAND_PREFIX || "!" ;
2828const commandPrefixLess : boolean = process . env . COMMAND_PREFIX_LESS === "true" ;
2929
30+ async function getQoutedMessageId ( msg : Message ) : Promise < string > {
31+ if ( ! msg . hasQuotedMsg ) return msg . id . remote ;
32+
33+ const qouted = await msg . getQuotedMessage ( ) ;
34+ return qouted . id . remote ;
35+ }
36+
3037export default async function ( msg : Message , type : string ) : Promise < void > {
3138 try {
3239 // ignore message if it is older than 60 seconds
@@ -220,7 +227,7 @@ export default async function (msg: Message, type: string): Promise<void> {
220227 messageBody ,
221228 options ,
222229 ) ;
223- return await originalReply ( messageBody , chatId , options ) ;
230+ return await originalReply ( messageBody , await getQoutedMessageId ( msg ) , options ) ;
224231 } ;
225232
226233 if ( ! msg . fromMe ) {
You can’t perform that action at this time.
0 commit comments