This commit is contained in:
Daniel Odendahl Jr
2019-04-02 22:03:13 +00:00
parent 0a538eecb4
commit 8849112e54
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -21,7 +21,7 @@ module.exports = class RenameAllCommand extends Command {
min: 2, min: 2,
max: 32, max: 32,
parse: nickname => { parse: nickname => {
if (nickname.toLowerCase() === 'none') return null; if (nickname.toLowerCase() === 'none') return '';
return nickname; return nickname;
} }
} }
@@ -48,6 +48,7 @@ module.exports = class RenameAllCommand extends Command {
continue; continue;
} }
} }
if (!nickname) return msg.reply('Successfully removed all nicknames!');
return msg.reply(`Successfully renamed all but ${i} member${i === 1 ? '' : 's'} to **${nickname}**!`); return msg.reply(`Successfully renamed all but ${i} member${i === 1 ? '' : 's'} to **${nickname}**!`);
} catch (err) { } catch (err) {
return msg.reply(`Failed to rename everyone: \`${err.message}\``); return msg.reply(`Failed to rename everyone: \`${err.message}\``);
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "xiao", "name": "xiao",
"version": "102.1.0", "version": "102.1.1",
"description": "Your personal server companion.", "description": "Your personal server companion.",
"main": "Xiao.js", "main": "Xiao.js",
"scripts": { "scripts": {