17 Replies
They're registered the same way slash commands are
looks like the context menu is not getting created
Can you send your code?
https://pastebin.com/cBS58aGf
forgot to add a .sort to the user roles here's the updated version
Pastebin
const { Command } = require("@sapphire/framework");const { Applicat...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
if it doesnt show up on a user then refresh/update your client. code looks fine.
i'm using browser, would that affect anything
i already reloaded the page
it shouldnt
just tried again and still not working
Look at the guide or other bots that use Sapphire. Validate that other things of the command do work, i.e. try registering a slash command. Validate what Sapphire logs about the registered commands.
And undo whatever you did in https://discord.com/channels/737141877803057244/1152041112161239181 because that change makes it so you don't get any information from Sapphire. Like I said in the reply, you're shooting yourself in the foot super hard there.
oh yeah yesterday I saw what you used and removed it
looks like registering a slash command also doesn't work
@Favna what does this exactly do?
actually I got this problem (bot not creating slashes/context menus) a while ago, I asked about and someone told me to use the code above
idk if this is the problem but I remember making a test slash command, then I deleted it using a djs funtion, then I tried to make an actual slash command and it just didn't work
That makes it so it will set all the bot's commands instead of updating them. This ensures that your bots commands are always up to date with, and only with, what's in your command files.
If you just use
RegisterBehavior.Overwrite
, the following situation could occur:
1. Create command A and B (they are both registered)
2. Delete A file and edit B (B is updated, but sapphire doesn't know A exist, so it stays registered on discord)
With BulkOverwrite
, it overwrites all your past commands every time, so A would be deleted if the file doesn't exist.
If it's an issue with loading the command, you can find out by assigning Store.logger = console.log
in your main file before logging in (Store
can be imported from framework)how can I know if there is an issue with it
Read through the logs mentioning your file
See if it's getting unloaded for some reason
would this be
I also have a userinfo command but with prefix
Yes
Name the two differently
it created the context menu but returns The application did not respond
gonna try with a try and catch to see if it returns anything
no errors