From e90c07e64e1dedb4af55482db3c713750172a690 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 31 May 2021 14:53:56 +0200 Subject: [PATCH] Remove unnecessary if in /ban If whois info is unavailable, the promise is rejected. --- commands.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/commands.js b/commands.js index 9389410..61dc14a 100644 --- a/commands.js +++ b/commands.js @@ -27,9 +27,6 @@ const ban = { } const client = getActiveClient(app); client.whois(nick).then((whois) => { - if (whois === null) { - throw new Error("No such nick"); - }; const info = whois[irc.RPL_WHOISUSER].params; const user = info[2]; const host = info[3];