Slash Commands Embeds

Im currently working on a discord bot and i am on the last step which is making the commands. i need help though. I wanna know if i am able to run the command and the bot responds in an embed message
17 Replies
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
Like this" this:*
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
No description
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
see how the guy used a command and the bot replied in an embed and not a normal message? like that how do i do it? Please @ me if you know the aswer ok cya!
KaydaFox
KaydaFox3mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
KaydaFox
KaydaFox3mo ago
Then you can just do interaction.reply() or interaction.channel.send()
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
@KaydaFox But I wanna make an embed send using a slash command
KaydaFox
KaydaFox3mo ago
All the info you need is there
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
Ok Ty! It's not there? It aint I searched it up Nothings there
KaydaFox
KaydaFox3mo ago
^
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
Can you send a sample code? With the results?
KaydaFox
KaydaFox3mo ago
GitHub
dragonite/src/commands/System/info.ts at main · favware/dragonite
A Pokémon information Discord bot built around Discord Interactions - favware/dragonite
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
Which line is it??
KaydaFox
KaydaFox3mo ago
.. i dont want to feed everything to you i dont mean to be rude but it wouldnt hurt to take a few seconds to read things properly
mizorint
mizorint3mo ago
You know how to send a response via the the slash command right? You can do this:
async chatInputRun(interaction) {
const embed = new EmbedBuilder
.setTitle("hi");
interaction.reply({ embeds: [embed] });
}
}
async chatInputRun(interaction) {
const embed = new EmbedBuilder
.setTitle("hi");
interaction.reply({ embeds: [embed] });
}
}
And like that you can modify the embed to whatever you want with the embed builder You import the EmbedBuilder from discord.js at the top of the file
ArshmaanEhtisham
ArshmaanEhtishamOP3mo ago
Your not being rude I get it. It's just that I don't wanna learn it rn. I just want my discord bot done I dont Forget it
KaydaFox
KaydaFox3mo ago
but.. they gave you an example right there
mizorint
mizorint3mo ago
Oh. Then please reach out to Sapphire guide, specifically slash commands. I understand that you want your bot done but trust me, even if your bot works, you must learn at least the very basics of JS. It's a reuqirement. Btw, just so you know: for slash commands to work you have to register it. Either in guild or globally, and the "either" part is crucial.
Want results from more Discord servers?
Add your server