embeds for specific commands
This commit is contained in:
parent
1913704e90
commit
d8de3f5c54
1 changed files with 53 additions and 35 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
const { RichEmbed } = require('discord.js');
|
||||||
|
|
||||||
exports.run = (client, message, args, level) => {
|
exports.run = (client, message, args, level) => {
|
||||||
message.delete();
|
message.delete();
|
||||||
if (!args[0]) {
|
if (!args[0]) {
|
||||||
|
@ -23,7 +25,23 @@ exports.run = (client, message, args, level) => {
|
||||||
if (client.commands.has(command)) {
|
if (client.commands.has(command)) {
|
||||||
command = client.commands.get(command);
|
command = client.commands.get(command);
|
||||||
if (level < client.levelCache[command.conf.permLevel]) return;
|
if (level < client.levelCache[command.conf.permLevel]) return;
|
||||||
message.channel.send(`= ${command.help.name} = \n${command.help.description}\nusage:: ${command.help.usage}\n${command.conf.aliases.join(", ") !== "" ? `aliases:: ${command.conf.aliases.join(", ")}` : "aliases:: none"}`, {code:"asciidoc"});
|
message.channel.send({embed: client.embed(`Command information: "${command.help.name}"`, command.help.description, [
|
||||||
|
{
|
||||||
|
name: 'Category',
|
||||||
|
value: command.help.category !== "" ? command.help.category : "none",
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Usage',
|
||||||
|
value: command.help.usage,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Aliases',
|
||||||
|
value: command.conf.aliases.join(", ") !== "" ? command.conf.aliases.join(", ") : "none",
|
||||||
|
inline: true
|
||||||
|
}
|
||||||
|
])});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue