Nightbot Variables

Asked Jan 29, 2022·1 reply·Last activity 4 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.

So I'm looking for a way to use the variables $(touser) and $(query) a specific way. $(query) prints everything after a command. But I wanna make it to where if theres nothing after the command it uses $(touser) instead of $(query). Any ideas?

1 reply

Ended up solving it by using $(eval) for 2 slightly different versions of the api we needed this for depending on if the situation needs $(query) or $(user) using if statements. If this made no sense to anyone I apologize very tired when replying to this.