Hi I’m new here and I am working on a boop command. In short I want it to display one of two messages:
“X has booped themself!” or “X has booped Y!” with X and Y being user names.
If a user types it in chat it’ll be the form of !boop or !boop Y.
So my first impulse is to use $(eval) and argument $(1) to start.
I have:
$(eval
$(1) == null ? "You have been booped" : "You have booped $(1)"
)
This results in error and I’m pretty sure it’s how the JS is interpretting $(1). Is there a standard for parsing arguments into JS to be used?
With Eval, do I need to return something for it to work properly?
And what’s the standard for debugging nightbot? I know this is alot of questions but I’m really curious as to how this works.