From 91e1e150a9b7b45ba1223e9f1dfd7a78a3d9b4fe Mon Sep 17 00:00:00 2001 From: Eartharoid Date: Sat, 4 May 2019 12:37:39 +0100 Subject: [PATCH] Update index.js --- index.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index e0c8741..a63e6df 100644 --- a/index.js +++ b/index.js @@ -178,13 +178,24 @@ client.on('message', message => { if (!command) return; if (command.args && !args.length) { - let reply = `:x: **Arguments were expected but none were provided.**`; + // let reply = `:x: **Arguments were expected but none were provided.**`; + // + // if (command.usage) { + // reply += `\n**Usage:** \`${config.prefix}${command.name} ${command.usage}\``; + // } + // + // return message.channel.send(reply); + if (config.useEmbeds) { + const embed = new Discord.RichEmbed() + .setAuthor(`${client.user.username}`, client.user.avatarURL) + .setColor("#E74C3C") + .setDescription(`\n**Usage:** \`${config.prefix}${command.name} ${command.usage}\`\nType \`${config.prefix}help ${command.name}\` for more information`) + .setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`); + return message.channel.send({embed}) - if (command.usage) { - reply += `\n**Usage:** \`${config.prefix}${command.name} ${command.usage}\``; + } else { + return message.channel.send(`**Usage:** \`${config.prefix}${command.name} ${command.usage}\`\nType \`${config.prefix}help ${command.name}\` for more information`) } - - return message.channel.send(reply); };