Remove unnecessary if in /ban

If whois info is unavailable, the promise is rejected.
This commit is contained in:
Simon Ser 2021-05-31 14:53:56 +02:00
parent a6cdd64444
commit e90c07e64e

View file

@ -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];