My Bot won't post a .gif file from it's Assets folder

It's been a long time since I worked on a bot last and I've been revisiting my old bot that runs my server. I've updated the API, downloaded all the up to date NPM and discord.js files and my bot is sending messages just like normal. The issue I'm experiencing is that my bot will not send .gif or any images from it's Assets folder. I first started with the old code from when I first made the bot: if (message.content == "Major Ruin" { message.reply("This is Major Ruin!", { files: ["./Assets/Gifs/MajorRuin.gif"] } ); { Then after doing some more google searching and finding some servers, someone pointed me towards the discord documents which I have gone through the page a couple of times but I'm having trouble understanding how to use it. The problem is, whenever I was learning to code discord bots or any form of coding, there would be examples to help show you how to write it out correctly to teach you how to properly code it. This is the document that was sent to me: https://old.discordjs.dev/#/docs/discord.js/main/class/AttachmentBuilder?scrollTo=s-from My bot's folder structure is like this: User/source/repos/CraftyMaelyss/TheWotNot/Source_Code/Assets/Gifs Whenever I try to learn how to write this new code, I'm finding that there's not many examples being shown for either beginners or very rusty individuals like myself. What is the proper way to write out the AttachmentBuilder when using it in your code? I'm a visual learner and I'm getting errors because I'm basically guessing how to write this because I can't find any examples of how to do so.
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
4 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs15mo ago
guide Popular Topics: Embeds - Attaching images read more
chewie
chewie15mo ago
Ignore the embed part Thats how you use the AttachmentBuilder
CraftyMaelyss
CraftyMaelyssOP15mo ago
I think I'm having a brain fart because I completely missed it :(
Want results from more Discord servers?
Add your server