Forgive me if I'm slighty mad, but it's a week Im having headaches because of this extremely basic thing. It is literally driving me insane. I have to add like 20-30 manual checks to Nightbot so it can autoreply when someone uses commands in a wrong way, for example !gamble instead of !gamble 100, this is a VERY common one that leaves the user in silence, without a single reply, and I NEED to explain him that he needs to add the amount after the command.
So since I can't reply manually to every person, I thought about a bot, but I cannot find a way to do it properly. This is the closest I got so far:
$(eval if (!$(1)){'Incorrect'})
As you can see, if $(1) doesn't exists, it prints "Incorrect" in chat. But what if $(1) exists? Like someone that actually writes the command in the right way . This is the result:
chatuser1: !gamble 100
Nightbot: undefined
gamblebot: chatuser1 gambled 100 and won 200!
I cannot get rid of that "undefined" in chat, how do I tell Nightbot to just ignore and dont write anything if the argument exists? I tried with return, 1=1, void(0) and other dummy things but it ALWAYS writes some error in chat.
I know about 5-6 different programming languages and I never went so crazy over a simple IF ELSE statement.
Any help would be appreciated
Thanks, have a good day