From bcc0c32386950ebf57035f4f6813be28ef32914e Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 18 Feb 2020 19:37:44 +0100 Subject: [PATCH] add prompt --- commands/utility/color.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/commands/utility/color.js b/commands/utility/color.js index 3dab5c40..33741522 100644 --- a/commands/utility/color.js +++ b/commands/utility/color.js @@ -9,6 +9,9 @@ class colorCommand extends Command { args: [ { id: 'color', + prompt: { + start: 'Please input a color, say `cancel` to stop the command' + }, type: 'string' } ], @@ -49,7 +52,11 @@ class colorCommand extends Command { 'dark_navy' ]; - if (args.color.match(/^#[0-9A-F]{6}$/i) || ColorResolvable.includes(args.color.toLowerCase())) { + let colors = [ + 'black' + ]; + + if (args.color.match(/^#[0-9A-F]{6}$/i) || ColorResolvable.includes(args.color.toLowerCase()) || colors.includes(args.color.toLowerCase())) { let role = message.guild.roles.find(role => role.name === args.color); if (!role) { message.guild.roles.create({