forked from Supositware/Haha-Yes
If there is an image example, use it
This commit is contained in:
parent
eaf3b91239
commit
3ddd8b8d25
1 changed files with 6 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
class HelpCommand extends Command {
|
class HelpCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -61,6 +62,11 @@ class HelpCommand extends Command {
|
||||||
embed.addField('Bot permission', `\`${command.clientPermissions.join('` `')}\``, true);
|
embed.addField('Bot permission', `\`${command.clientPermissions.join('` `')}\``, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fs.existsSync(`./asset/img/command/${command.category.id}/${command.id}.png`)) {
|
||||||
|
embed.attachFiles(`./asset/img/command/${command.category.id}/${command.id}.png`);
|
||||||
|
embed.setImage(`attachment://${command.id}.png`);
|
||||||
|
}
|
||||||
|
|
||||||
return message.util.send({ embed });
|
return message.util.send({ embed });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue