ROLE_ID from .json file is wrong

^
14 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
:/ im stupid where does the number come rom thou
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA336OP2y ago
wait it worked for emoji ids thou
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
• Discord ids follow the snowflake format: learn more • Discord ids must be represented as strings as they are larger than Number.MAX_SAFE_INTEGER, the largest integer that can be represented in JavaScript
- client.guilds.cache.get(123456789012345678)
+ client.guilds.cache.get("123456789012345678")
- client.guilds.cache.get(123456789012345678)
+ client.guilds.cache.get("123456789012345678")
SuperPEKKA336
SuperPEKKA336OP2y ago
huh well why is this happening
SuperPEKKA336
SuperPEKKA336OP2y ago
SuperPEKKA336
SuperPEKKA336OP2y ago
im getting the interaction's customID which is the same as the roleID's var name but lower case
treble/luna
treble/luna2y ago
you're uppercasing your value, but as far as i can see your json keys are lowercase
SuperPEKKA336
SuperPEKKA336OP2y ago
i changed em all of em are upper now but why are they undefined?
treble/luna
treble/luna2y ago
how do you import your ROLE_IDS
SuperPEKKA336
SuperPEKKA336OP2y ago
yeah
Want results from more Discord servers?
Add your server