How to make an "Authorized App"?
Hey there! So recently someone who's better than me at coding showed me they made a "self-bot" of sorts that allowed slash commands in any chat they were in, and they told me that Discord made it so you could add your own "slash commands" of sorts where the App you authorized basically works. I already had my own bot, so I added it as an Authorized App (it shows up just fine on the list), but how do I proceed? How do I make it so its slash commands show up on my client? How do I handle them?
I was wondering where I could get more information on this, and how to do it. Thanks!
17 Replies
- 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!
- ✅
Marked as resolved by OP1. It's not a self bot, it's weird to describe it as such and also a misrepresentation.
2. It is still in beta so it is not supported by discord.js yet, you can however check this announcement by discord https://discord.com/channels/222078108977594368/992166350640386090/1219333156486778944, there's also a guide on how to make them linked there, you just need to use json structures for you commands and include the two new properties mentioned in the docs, if you use builders for commands, you can convert them into json using
toJSON()
method and then pass the new properties and register you commands using RESTDiscord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
gotcha, i appreciate it so much.
is there an estimated time for when discord.js will support them? i'm assuming when it gets out of beta?
It'll most likely be after beta, there's no estimate on when though
so i think i figured it out, but i'm getting an error i've never seen before 🤔
do you recognize it?
does the bot have permission to change channels there? or do you use user apps for this?
1. its usually joke
it's a user app
here's the JSON i used to create it:
what do you mean? i'm editing the message, which i tried before and it works
show your code
alrighty, one sec
that's the function i'm calling with the "slash command"
and it works fine if i use it in the bot DM channel
try
interaction.editReply()
gotcha, one sec
:pepe_woo:
seems to have worked :]
thank you <3