From 070a567f1d2cc86f515ce790b1b0c7abae0f3552 Mon Sep 17 00:00:00 2001 From: soge__ Date: Tue, 9 Nov 2021 22:57:53 +0100 Subject: [PATCH] fix(commons): fix incorrect object to get discord attribute Fixes https://discord.com/channels/317348946144002050/619437014001123338/907729363577999390 --- src/commons.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commons.ts b/src/commons.ts index a75ecf9b36a..0a94497465a 100644 --- a/src/commons.ts +++ b/src/commons.ts @@ -16,7 +16,7 @@ class Commons { @timer() async messageToSend(senderObject: any, response: string | Promise, opts: ParserOptions | { isParserOptions?: boolean, id: string, discord: CommandOptions['discord']; sender: CommandOptions['sender']; attr?: CommandOptions['attr'] }): Promise { const sender = opts.discord - ? { ...senderObject, discord: { author: senderObject.discord.author, channel: senderObject.discord.channel } } : senderObject; + ? { ...senderObject, discord: { author: opts.discord.author, channel: opts.discord.channel } } : senderObject; if (isParserOpts(opts) ? opts.skip : opts.attr?.skip) { return prepare(await response as string, { ...opts, sender, forceWithoutAt: typeof opts.discord !== 'undefined' }, false); } else {