Disallow white in c4

This commit is contained in:
Dragon Fire
2021-01-18 16:43:55 -05:00
parent b3649c2694
commit 6baa519c67
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -39,6 +39,7 @@ module.exports = class ConnectFourCommand extends Command {
if (!hasEmoji && !colors[color.toLowerCase()]) {
return `Please enter an emoji or one of the following: ${list(Object.keys(colors), 'or')}.`;
}
if (color === blankEmoji) return 'You cannot use this emoji.';
return true;
},
parse: color => colors[color.toLowerCase()] || color
@@ -74,6 +75,7 @@ module.exports = class ConnectFourCommand extends Command {
);
const filter = res => {
if (res.author.id !== opponent.id) return false;
if (res.content === blankEmoji) return false;
const hasEmoji = new RegExp(`^(?:${emojiRegex().source})$`).test(res.content);
return hasEmoji || available.includes(res.content.toLowerCase());
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "126.6.4",
"version": "126.6.5",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {