Read argument as variable?

Asked Apr 11, 2021·2 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.

Hi everyone, this is probably a basic question, but it's my first time trying to do a more complex command.

So, what I'm trying to do is create a command to thank raids/hosts by tagging them, their channel url and their last game played by typing !customcommand username

I'm trying to get:
Check out the awesome streamer username on usernameurl! He was last seen playing usernamelastgameplayed

My code:
Check out the awesome streamer $(touser) on $(twitch $(touser) {{url}})! He was last seen playing $(twitch $(touser) {{game}})

What I'm getting:
Check out the awesome streamer username on username is currently offline - https://www.twitch.tv/username! He was last seen playing username is currently offline - https://www.twitch.tv/username

I've tried searching online for a solution but couldn't find anything.

Thanks in advance!

2 replies

Hey @Hushed Chipmunk!

You're missing an important part of the $(twitch) variable: quotation marks.
You can also combine everything together.

$(twitch $(touser) "Check out the awesome streamer {{displayName}} on {{url}} They were last seen playing {{game}}!")

I updated the command to be gender-less too, since there also are women streamers.

Polar Cat said:
$(twitch $(touser) "Check out the awesome streamer {{displayName}} on {{url}} They were last seen playing {{game}}!")

Awesome! Thank you very much!

I was translating from spanish and didn't even pay attention to gender LUL. Thank you!