Amgelo
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by Unicorn. on 1/21/2025 in #djs-questions
Role cache get undefined
make sure the ids in your config are correct and they're strings
35 replies
DIAdiscord.js - Imagine an app
•Created by Unicorn. on 1/21/2025 in #djs-questions
Role cache get undefined
then there's no role with that id
35 replies
DIAdiscord.js - Imagine an app
•Created by Unicorn. on 1/21/2025 in #djs-questions
Role cache get undefined
you have 2 logs there plus the one you were asked, which one logs undefined
35 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
you can try changing your token for that
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
if you've changed host providers or something like that it could be possible that you have some old code that used to do that still running somewhere
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
you should search in your code with something like vscode or grep for
rest.put
, application.commands
or guild.commands
usages33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
so it would be somewhere else
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
the code you shared does not do that
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
basically the whole issue is explained if you somewhere do this
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
they end up with duplicate global commands- one set of commands is deployed globally, so it's present in all guilds (depends on contexts but let's forget that for simplicity) - the other duplicate set would come from deploying to that guild (they're deployed as guild commands) the mix of both would end up with you seeing "duplicate commands"
Interestingly, the guild-specific commands do not appear twice.because those commands aren't deployed globally, you would've only deployed them to that guild only
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
this again
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
the issue makes it sound like you're deploying all commands, as guild commands to that guild, whenever you join it
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
I mean in your code
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
maybe this is happening somewhere else
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
I'd recommend you double check whether this is really the only place where you're deploying commands
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
if this is the only deploy script and it's ran manually then that shouldn't happen
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
the only way you can end up with two commands with the same name is if you deploy one in the guild, and one globally
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
what do you mean by "duplicate global commands"? two global commands can't have the same name, even if you did want that, that'd result in an error
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
is this the only place where you deploy commands? are you running this on guild join or something?
33 replies
DIAdiscord.js - Imagine an app
•Created by Kbone22 on 1/17/2025 in #djs-questions
Issue with Duplicate Commands When Bot Is Added to Another Server
that being said, the code you shared should work fine, but it has unnecessary extra api calls, you only need the last two put calls
33 replies