$(touser) variable auto-drop the @ sign

Asked Feb 11, 2020·1 reply·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.

Is there any way of using $(touser) in a command or similar variable to input a users name while dropping the @ sign in front of the name. I know I can just type it without the @ but would rather be able to autofill the name to minimize typos. Hoping to use this in a shoutout command and make it a bit easier.

1 reply

Hiya, yes replace $(touser) in your command with ``$(eval $(touser).replace(/@/g,""))`` this will remove the @ (if there is any).