Skip to content
Advertisement

Tag: discord.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;

Not combining values in deposit command, using discord.js

I’m adding a deposit command but when I try to add the amount into the bankBalance, it doesn’t add them correctly into integers, this may sound confusing, I’ll give you an example. Example: Command: ~deposit 100, User balance: Wallet: 120, Bank: 0, Output user balance: Wallet: 20, Bank: 0100 I wish this explains it, anyways here is my code: Note:

Advertisement