From a73fd2b8936270d635ecfa158c081c7615e649a7 Mon Sep 17 00:00:00 2001
From: Supositware <sup@libtar.de>
Date: Wed, 31 Aug 2022 23:03:10 +0200
Subject: [PATCH] Fix showing example image of commands

---
 commands/utility/help.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/commands/utility/help.js b/commands/utility/help.js
index 1cb8685..4b5324f 100644
--- a/commands/utility/help.js
+++ b/commands/utility/help.js
@@ -1,4 +1,4 @@
-import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
+import { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder } from 'discord.js';
 import fs from 'node:fs';
 
 const { ownerId, prefix } = process.env;
@@ -66,8 +66,9 @@ export default {
 			}
 
 			if (fs.existsSync(`./asset/img/command/${command.category}/${command.data.name}.png`)) {
-				embed.attachFiles(`./asset/img/command/${command.category}/${command.data.name}.png`);
+				const file = new AttachmentBuilder(`./asset/img/command/${command.category}/${command.data.name}.png`);
 				embed.setImage(`attachment://${command.data.name}.png`);
+				return interaction.reply({ embeds: [embed], files: [file] });
 			}
 			return interaction.reply({ embeds: [embed] });
 		}