Querys with an alias editing another command

!editcom !setduo -a=!editcom !duo Kevin is in queue with: $(query)

So right now what im attempting to do is when someone sends the !duo command it replies with

"USERNAME Kevin is in queue with: $(query) "

The query comes from the !setduo command by saying:

!setduo Mike

So it would return when someone types !duo:
USERNAME Kevin is in queue with: Mike

However if you do:

!editcom !setduo -a=!editcom !duo $(touser) Kevin is in queue with: $(query)

!duo will return: Mike Kevin is in queue with: Mike

How do I get around this. I want users to be able to @ each other and have nightbot ping the user with the !duo command but not have to edit it each time?

Eval is a hacky way to slip variables in.

!editcom !setduo -a=!editcom !duo $(eval `$`+`(touser)`) Kevin is in queue with: $(query)
1 Like

Solved. Thank you very much!

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