mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 06:10:49 +02:00
Disallow white in c4
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "126.6.4",
|
||||
"version": "126.6.5",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user