mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Fix
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ class EmojiArgumentType extends ArgumentType {
|
|||||||
|
|
||||||
validate(value, msg) {
|
validate(value, msg) {
|
||||||
const matches = value.match(/^(?:<:([a-zA-Z0-9_]+):)?([0-9]+)>?$/);
|
const matches = value.match(/^(?:<:([a-zA-Z0-9_]+):)?([0-9]+)>?$/);
|
||||||
if (msg.client.emojis.has(matches[2])) return true;
|
if (matches && msg.client.emojis.has(matches[2])) return true;
|
||||||
if (!msg.guild) return false;
|
if (!msg.guild) return false;
|
||||||
const search = value.toLowerCase();
|
const search = value.toLowerCase();
|
||||||
let emojis = msg.guild.emojis.filterArray(nameFilterInexact(search));
|
let emojis = msg.guild.emojis.filterArray(nameFilterInexact(search));
|
||||||
|
|||||||
Reference in New Issue
Block a user