Nightbot - Help with $(eval) command

Hey folks,

I’m running into an issue that I can’t just figure out how to solve myself and I feel like it is just a simple If/Or situation. I have the following command “!boom” that’s output is “!commands edit !ksp $count Kerbals have died today”… Which results in an awkward “1 Kerbals have died today” with the wrong plural noun/verb.

I’m trying to setup an eval so that if count = 0, the edit would be “1 Kerbal has died today”, but I just can’t get it working. Is something like that even possible and if so would anyone be able to help me get something functional?



Ternary operator seems useful.

!addcom !boom -a=!editcom !ksp $(eval c=$(count);c+` Kerbal`+(c!=1?`s have`:` has`)) died today

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.