discord bot slash command
hello i created slash command like 3days ago but i cant still use it others slash commandss is working

34 Replies
⌛
This post has been reserved for your question.
Hey @xcel_dev! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
the /ping is working
but /love not
but whats the problem
is the command not visible
ir something
What happens when using it? Did you register the command?
i can't add new commands
only the old ones works
What happens and how did you register the commands?
yeah it seems like you might not have it registered. I personally have a start up routine
adding all commands to it using a list. (this will overwrite all global commands you have registered updating or deleting ones no longer used. ids wont change)
keep in mind that after registration you need to reload discord which you can do using
CTRL+R
Im not to sure whether your emojis mention will work since Discord Emojis work differently for bots and usersreloading is typically not necessary any more
and tbh I wouldn't recommend recreating all commands every time - doing this too often can result in hitting rate limits and you not being able to use (some or any) commands for a few hours
never saw that i would have hit rate limits using this. I think there is something that it only counts as 1 upsert or sth.
you have to use that specific way though. otherwise its gets a lot more poblematic if you upsert them all individually.
pretty sure its still the case. I think dv8 used dc client while in stage (componets v2 stage like a week ago) and browser so he could reload because he had too in browser
We had this issue with @JavaBot at some point
though there were many restarts there
interesting. you manually uploaded each or used that specifiec method?
in bulk
i had a lot of restarts never saw that issue yet. i made it so it auto configures role overrides in my server for it. THAT one is rate limited!
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Thank you so much
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
and where to add this

here?
Uh yeah should work. However there is a method like waitforready or something. It's a blocking method that ensures JDA is fully loaded. Call it first and then use the command registering method.
Also keep in mind that Java can be decompiled revealing your token if shared or uploaded to github etc. Change it over to properties file or sth.
i have it in private
errors 😦
stacktrace?

Cannot resolve symbol 'jda'
assign the return value of the jda builder to a vartiable
Cannot resolve symbol 'globalCommands'
also call awaitReady()
list of commands you want to upsert
like
jda.awaitready
Commands.slash()
Alternatively one could just put it in a listener that gets executed on startup
jda.awaitReady()
ye
no - it would need to be the
JDABuilder
objectso specific
:GnuTrolling: