remove / in board args

This commit is contained in:
loicbersier 2019-12-24 21:27:46 +01:00
parent a1d0782a83
commit 5ffe4e251b

View file

@ -33,6 +33,7 @@ class FourchanCommand extends Command {
if (boards.getType(args.board) === boards.NSFW && !message.channel.nsfw) return message.channel.send('Sorry, this board only work in nsfw channel!'); if (boards.getType(args.board) === boards.NSFW && !message.channel.nsfw) return message.channel.send('Sorry, this board only work in nsfw channel!');
if (!args.board) return; if (!args.board) return;
args.board = args.board.replace(/\//g, '');
let i = Math.floor((Math.random() * 5) + 1); let i = Math.floor((Math.random() * 5) + 1);