Having nightbot do more than one command at a time

Essentially i’d like to add a command for death counters, one for all time, one for today. The one for today needs to be restable and so it needs to be in it’s own line (if I’ve read the nighbot doc correctly). This is how Im using the over all one right now

!addcom !dead -ul=moderator -a=!commands edit !deaths Player has died $(count) times

and as such regular users can do !deaths and see whats up, but that is only tracking over all.

I would like to set up a way that in this scenario !deaths displays something like: Player has died ### times today and ### times overall.
I’ve tried making it alias out to two commands and have a counter in each and then making one merge with the other using the query function, but any way I try this it will actually print the second alias. so trying something like this:

!editcom !thistest -a=!editcom !thistest2 check this number! $(count) -a=!thistest1

would print whatever was in !thistest1, and even though it would keep track of the count, it wouldn’t edit the !thistest2 command.

Am I missing something obvious? or am I going about this the whole wrong way?

I don’t believe this is possible due to you wanting to maintain the global count. Command as of now cannot access the count value of other commands, which I think is the limiting factor in this case.

It should also be noted that you can’t alias 2 commands, 1 command = 1 command response.

well I was thinking having one command with an initial count, then the second has its own count and takes that count as a query? then I can just reset the first one as a daily? or no way for that

No I don’t believe there is a way to do that. Since you can’t pass variables like $(count) it’s very difficult to take that value as a query for another command. I’d recommend a custom API since you’d be able to implement this as well as the resetting daily.

unfortunately I know actually zero about how to make an api, I wish I did. None of my classes have ever covered anything about or like that, and I couldn’t find any decent youtube tutorials. thanks for the suggestion tho!

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