snowflake and string comparison

Hi everybody, I need to compare channel.id which is a snowflake type with a string id that is saved in my database. The operator"===" returns false for channel.id===id even though they have the same value. How to compare them?
5 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
chewie
chewie12mo ago
if === returns false, they are either not the same id, or you didn't save it as string, but as a number
Petra
PetraOP12mo ago
In the logs I can see that they are the same id and in my database it is saved as a string
chewie
chewie12mo ago
log it show it
Nullified
Nullified12mo ago
Maybe you parsed it to JSON or something?
Want results from more Discord servers?
Add your server