Skip to content

Tag: node.js

How to make this case insensitive

I’m not sure how I can use .toLowerCase() to make my discord command case insensitive this should be simple but I’m really new to this Answer In your handler where you check for the message content in the message event Have this done Eg: if(message.content.toLowerCase() === cmdName) return;

If statement considers FALSE promise as TRUE

I’m making authentication in my app. And have such code changedPasswordAfter retuns promise (true or false) So I run request and get this into console. As you see ttt is FALSE but IF statement decided that it is TRUE . How can I fix that ? Answer Because ttt (which is a very bad name for a variable) is …