Way to make a variable only show if there is no query after

Asked Mar 23, 2021·5 replies·Last activity 5 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.

I have a couple commands that i need to do an @ but i only want it to @ the person who ran it when there is no query after @member a different using

5 replies

Hey @Kind Dog!

Not sure I properly understand what you want, but here's how to @user if there's no $(query):

$(eval `$(query)`?` `:`$(user)`)

So, I need the query to show where user would be. Can you help?

I can't help without the full command or at least further explanation, because I don't understand what you want.

Ok, But just incase this makes more sense, I need it command to be @ user Message, but if the command is !command @ otheruser, It should say @ otheruser message

Ah, I finally understand what you're really looking for!

For that use $(touser) instead of the whole code I shared before.

Didn't find your answer? The community is on Discord.

Ask on Discord