mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:26:21 +02:00
Fix bug not letting you search 1
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class TiffAndEveCommand extends Command {
|
|||||||
validate: query => {
|
validate: query => {
|
||||||
if (types.includes(query.toLowerCase())) return true;
|
if (types.includes(query.toLowerCase())) return true;
|
||||||
const num = Number.parseInt(query, 10);
|
const num = Number.parseInt(query, 10);
|
||||||
if (!Number.isNaN(num) && num > 1) return true;
|
if (!Number.isNaN(num) && num > 0) return true;
|
||||||
return `Invalid query, please enter either today, random, or a specific comic number.`;
|
return `Invalid query, please enter either today, random, or a specific comic number.`;
|
||||||
},
|
},
|
||||||
parse: query => query.toLowerCase()
|
parse: query => query.toLowerCase()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ module.exports = class XKCDCommand extends Command {
|
|||||||
validate: query => {
|
validate: query => {
|
||||||
if (types.includes(query.toLowerCase())) return true;
|
if (types.includes(query.toLowerCase())) return true;
|
||||||
const num = Number.parseInt(query, 10);
|
const num = Number.parseInt(query, 10);
|
||||||
if (!Number.isNaN(num) && num > 1) return true;
|
if (!Number.isNaN(num) && num > 0) return true;
|
||||||
return `Invalid query, please enter either today, random, or a specific comic number.`;
|
return `Invalid query, please enter either today, random, or a specific comic number.`;
|
||||||
},
|
},
|
||||||
parse: query => query.toLowerCase()
|
parse: query => query.toLowerCase()
|
||||||
|
|||||||
Reference in New Issue
Block a user