This commit is contained in:
Dragon Fire
2021-02-20 11:29:53 -05:00
parent 841e17cc01
commit 1202e2c4e6
+4 -4
View File
@@ -23,14 +23,14 @@ module.exports = class FontArgumentType extends ArgumentType {
});
if (foundExact.size === 1) return true;
if (foundExact.size > 0) found = foundExact;
return found.size <= 15 ?
`${disambiguation(found.map(font => escapeMarkdown(font.name)), 'fonts', null)}\n` :
'Multiple fonts found. Please be more specific.';
return found.size <= 15
? `${disambiguation(found.map(font => escapeMarkdown(font.name)), 'fonts', null)}\n`
: 'Multiple fonts found. Please be more specific.';
}
parse(value) {
const choice = value.toLowerCase();
let found = this.client.fonts.filter(font => {
const found = this.client.fonts.filter(font => {
if (font.isVariant) return false;
if (font.name.toLowerCase().includes(choice)) return true;
if (font.filenameNoExt.toLowerCase().includes(choice)) return true;