From 2ac6fedfc591dfe5b8c0c31d901d33934754ee71 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 13 Feb 2021 19:53:12 +0200 Subject: [PATCH] Fix edge case error in ContextCmd --- backend/src/plugins/Utility/commands/ContextCmd.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Utility/commands/ContextCmd.ts b/backend/src/plugins/Utility/commands/ContextCmd.ts index 4cbfefc1..81a488b3 100644 --- a/backend/src/plugins/Utility/commands/ContextCmd.ts +++ b/backend/src/plugins/Utility/commands/ContextCmd.ts @@ -27,8 +27,8 @@ export const ContextCmd = utilityCmd({ return; } - const channel = args.channel || args.message.channel; - const messageId = args.messageId || args.message.messageId; + const channel = args.channel ?? args.message.channel; + const messageId = args.messageId ?? args.message.messageId; if (!canReadChannel(channel, msg.member)) { sendErrorMessage(pluginData, msg.channel, "Message context not found");