roll: explicitly check null

This commit is contained in:
Cynthia Foxwell 2024-08-18 15:09:53 -06:00
parent 68a313e0ab
commit 1f5971d52d

View file

@ -7,7 +7,7 @@ roll.usage = "<sides>";
roll.addAlias("img");
roll.callback = function (msg, line) {
line = Number(line);
if (!line || line == "" || Number.isNaN(line)) line = 6;
if (line == null || line == "" || Number.isNaN(line)) line = 6;
if (line < 0) line = Math.abs(line);
if (line == 0) return ":hole:";