ROLE_ID from .json file is wrong

^
14 Replies
d.js toolkit
d.js toolkit13mo 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 User13mo ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA33613mo ago
:/ im stupid where does the number come rom thou
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
SuperPEKKA336
SuperPEKKA33613mo ago
wait it worked for emoji ids thou
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs13mo 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
SuperPEKKA33613mo ago
huh well why is this happening
SuperPEKKA336
SuperPEKKA33613mo ago
SuperPEKKA336
SuperPEKKA33613mo ago
im getting the interaction's customID which is the same as the roleID's var name but lower case
treble/luna
treble/luna13mo ago
you're uppercasing your value, but as far as i can see your json keys are lowercase
SuperPEKKA336
SuperPEKKA33613mo ago
i changed em all of em are upper now but why are they undefined?
treble/luna
treble/luna13mo ago
how do you import your ROLE_IDS
SuperPEKKA336
SuperPEKKA33613mo ago
yeah