How do I make a command that has a message and calls another command?

For instance,
User: !command1
Nightbot: Hello There
nightbot calls !command2…
Nightbot: How are you doing?

1 Like

Without a custom API, you can’t make Nightbot send two separate messages in response to a single command. But you can make the second command print out what the first message passed to it.

Enter this into your chat:

!commands add !command1 -a=!command2 Hello There

!commands add !command2 $(query) How are you doing?

You can also add your commands here and use the Alias field.

So if I were to do this in the Alias field, what would I enter in each command?

For !command1, the Alias field should be !command2

For !command2, the Alias field should be empty

But then Command1 would only call command2 right? It wouldn’t send the message?

!command1 would call !command2 with the message Hello There

!command2 would send the message $(query) How are you doing?
$(query) is a Nightbot variable that is replaced by the message the command was called with.

ok, i’ll try it. Thank you

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