Closed naftis closed 2 years ago
Hi @naftis have you put your bot's ID in the .env file you created? 🙂 It's needed so that the slash commands can be properly registered.
Jack
I should also mention, and coming to think of it this may be the reason why, Discord slash commands can take up to 1 hour to register when this bot is in production mode!
The image above is a screenshot from the Discord.js guide on registering slash commands at https://discordjs.guide/interactions/registering-slash-commands.html#global-commands
Okay, it seems to be some kind of user error but I'm not sure what. I created a new Discord server, and it works perfectly there. Nice!
But the original server I was adding it to still doesn't work. It's probably some kind of permission problem, but I'll try and see if I can find what the problem is and reply here after. Unless you have some kind of idea? 🤔
Ahhh I'm feeling like that could be a permission thing. Have you tried the same OAuth URL with the old server as you have with the new one? 🤔
I joined both of the servers with the link this created discordapi.com/permissions.html#2150695936 . So I think yeah.
And I'm guessing you have permission as a user on the faulty server to use application commands? 🤔 If it's disabled for @everyone and your highest role (except admin) you won't be able to see slash commands.
Yep, we actually have it enabled for @everyone now that I look at it. Also when typing / it shows atleast the giphy + ban + kick stuff so I should have permissions to use the slash commands.
I also tried to kick the bot and add it back with the same link, but nothing :s
I'm guessing it's just some stupid simple stuff but just can't figure out what is it :D
You're not in development mode are you? I know you started in production but if you're in development it'll only work for a specific server!
Alright, figured out the problem (not sure why it worked for the other server though):
http://discordapi.com/permissions.html#2150695936 this gives a link as such https://discord.com/oauth2/authorize?client_id=client_id&scope=bot&permissions=2150695936
but I had to add a "applications.commands" scope so that the link looks like https://discord.com/oauth2/authorize?client_id=client_id&scope=bot%20applications.commands&permissions=2150695936
Now the bot works great. Thanks for your help :)
Ahhh I see, glad you got it sorted!
In your original question you had it enabled (I think) so I never brought it up! 😂
Hi, this is most likely an user error but might be useful for someone else too. Basically I followed the README, and have the bot running as such:
I then invited the bot to my Discord server with these permissions: https://discordapi.com/permissions.html#2150695936
The commands aren't showing up when I'm writing /, and nothing is also happening when I say /play. What should I do to get it working?