From e614cd4b1c5a2536667740eec90e021a07a52ab1 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Mon, 29 Nov 2021 18:44:44 +0100 Subject: [PATCH] Checking message user exists before checking ID in Trivia. --- src/games/trivia.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/games/trivia.js b/src/games/trivia.js index 2590bea..9e69597 100644 --- a/src/games/trivia.js +++ b/src/games/trivia.js @@ -166,7 +166,7 @@ function onCommand(args, context) { } async function onMessage(message, context) { - if (!game || context.user.id === config.user.id) { + if (!game || context.user?.id === config.user?.id) { return; }