This commit is contained in:
Daniel Odendahl Jr
2017-11-19 19:59:00 +00:00
parent c9df6d9a59
commit 36c17d8988
3 changed files with 85 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ class EmojiArgumentType extends ArgumentType {
}
validate(value, msg) {
if (!value) return false;
const matches = value.match(/^(?:<:([a-zA-Z0-9_]+):)?([0-9]+)>?$/);
if (matches && msg.client.emojis.has(matches[2])) return true;
if (!msg.guild) return false;