Reference a command/variable within an evaluation

Hello all,

I’m quite new to twitch commands. I have been pulling my hair out trying to figure out a way to reference a stored variable or command and use it an some evaluation within chat. As a simple example, using nightbot, I tried:

!commands add !var 2
!commands add !test $(eval !var + 2)

I tried variations of @, $, !, but no combination worked. Am I wrong to assume this is possible? This seems like quite a simple thing to do. I understand eval runs javascript and so maybe var’s scope is outside, so how would I go about this? Thanks for the insight in advanced. Again I’m very new.

It’s not possible to get another command’s message from a command without using the Nightbot API.

If you are just trying to do a win/death counter, this post has a guide: Some sort of counter to track deaths that viewers can view but not change and maybe a way to reset

If you want to store/retrieve/change any type of text, you can use this quote system: [CustomAPI] Quote system.

If you go into detail about the command you’re creating, I may be able to give more specific instructions.

1 Like

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