Querys with an alias editing another command

Asked Mar 21, 2020·2 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

!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?

2 replies

Eval is a hacky way to slip variables in.

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