Force known nobody names

This commit is contained in:
Dragon Fire
2020-04-18 12:43:26 -04:00
parent cfe996b52d
commit c087e3b40c
3 changed files with 16 additions and 1 deletions
+2
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const { shuffle, firstUpperCase } = require('../../util/Util');
const forced = require('../../assets/json/nobody-name');
module.exports = class NobodyNameCommand extends Command {
constructor(client) {
@@ -30,6 +31,7 @@ module.exports = class NobodyNameCommand extends Command {
}
run(msg, { text }) {
if (forced[text.toLowerCase()]) return msg.say(forced[text.toLowerCase()]);
const letters = text.split('');
letters.push('x');
const shuffled = shuffle(letters);