Removed problematic feature
This commit is contained in:
parent
90c41c8df4
commit
b3e1b5e140
|
@ -19,18 +19,12 @@ export default new Command({
|
||||||
|
|
||||||
displayEmoteList($, $.client.emojis.cache.filter((emote) => emote.guild.id === guildID).array());
|
displayEmoteList($, $.client.emojis.cache.filter((emote) => emote.guild.id === guildID).array());
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, search via a regex pattern
|
// Otherwise, by comparing inputs
|
||||||
let flags: string | undefined = undefined;
|
const query = $.args.join(" ").toLowerCase();
|
||||||
|
|
||||||
if (/^-[dgimsuy]{1,7}$/.test($.args[$.args.length - 1])) {
|
|
||||||
flags = $.args.pop().substring(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
displayEmoteList(
|
displayEmoteList(
|
||||||
$,
|
$,
|
||||||
$.client.emojis.cache
|
$.client.emojis.cache.filter((emote) => emote.name.toLowerCase().includes(query)).array()
|
||||||
.filter((emote) => new RegExp($.args.join(" "), flags).test(emote.name))
|
|
||||||
.array()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue