Allow mentions

This commit is contained in:
Dragon Fire
2021-01-14 23:43:44 -05:00
parent 310e9c2ccb
commit 5fb05aed07
+3 -1
View File
@@ -1,4 +1,5 @@
const Command = require('../../structures/Command');
const { User } = require('discord.js');
const { MersenneTwister19937, integer } = require('random-js');
const texts = require('../../assets/json/name-rater');
const { NAME_RATER_EMOJI_ID } = process.env;
@@ -22,7 +23,7 @@ module.exports = class NameRaterCommand extends Command {
{
key: 'name',
prompt: 'What name do you want to determine the quality of?',
type: 'string',
type: 'user|string',
max: 20,
default: msg => msg.author.username
}
@@ -31,6 +32,7 @@ module.exports = class NameRaterCommand extends Command {
}
run(msg, { name }) {
if (name instanceof User) name = name.username;
if (name.toLowerCase() === 'xiao') {
return msg.reply(`<:nameRater:${NAME_RATER_EMOJI_ID}> Yes, ${name}! What a perfect name! I'm speechless!`);
}