From 8a0fbf7f6c1d13b403e0b97789a941d5dabb27b1 Mon Sep 17 00:00:00 2001 From: Carol Knieriem Date: Wed, 8 Jan 2020 10:22:42 -0500 Subject: [PATCH] embed now! --- events/message.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/events/message.js b/events/message.js index 3f00ec6..f8a1840 100644 --- a/events/message.js +++ b/events/message.js @@ -25,7 +25,21 @@ module.exports = async (client, message) => { if (level < client.levelCache[cmd.conf.permLevel]) { if (settings.systemNotice === "true") { message.delete(); - return message.channel.send(`${message.author}, you do not have the right permissions to use this command.\nYour current permission level is **${level}** (${client.config.permLevels.find(l => l.level === level).name}), and this command requires permission level **${client.levelCache[cmd.conf.permLevel]}** (${cmd.conf.permLevel})`); + return message.channel.send({embed: client.embed("**Invalid permissions!**"),`You don't have the proper user level to use command ${cmd.help.name}.`, [ + { + name: "**__Required permissions level:__**", + value: `**${client.levelCache[cmd.conf.permLevel]}** (${cmd.conf.permLevel})` + }, + { + name: "**__Your permissions level:__**", + value: `**${level}** (${client.config.permLevels.find(l => l.level === level).name})` + } + ], + { + author: message.author.tag, + authorIcon: message.author.avatarURL + } + }); } else { return; }