How to Handle @ Symbol in StreamElements Custom Commands for Twitch

I need help with a StreamElements command I’m building for my Twitch stream. I want to make a custom command that promotes other streamers but I’m running into issues with the @ character.

Here’s my current command setup:

Go follow ${1}, currently streaming ${game ${1}} over at twitch.tv/${1}

This works fine when someone types: !promote username
Output: Go follow username, currently streaming Game_Name over at Twitch

But when people use the @ symbol like: !promote @username
I get: Go follow @username, currently streaming Game_Name over at Twitch

The problem is that Twitch isn’t a valid URL format. I need it to strip out the @ character so the link works properly.

With Nightbot I could use some eval functions to remove the @ symbol but StreamElements doesn’t seem to support that kind of string manipulation directly in commands. Has anyone found a way to handle this situation or know of any workarounds?

Just tell your viewers to drop the @ and use plain usernames - add it to your command description. Way easier than coding around it. Most people catch on fast if you mention it a couple times on stream.

StreamElements doesn’t have built-in string replacement like other bot platforms, so this gets tricky. What worked for me was making two separate commands - one for regular usernames and another for @ mentions. Set up !promote for clean usernames and something like !promoteat for @ mentions that handles the URL formatting automatically. You could also try StreamElements’ custom API endpoints if you’re comfortable with coding. The custom API lets you do advanced string manipulation through external scripts. More setup work upfront, but you get full control over cleaning up inputs. Someone else mentioned the replace function, but I think that’s only in newer SE updates and it’s pretty inconsistent.

Try using StreamElements’ chat moderation to preprocess the input instead. Set up a custom variable that strips the @ symbol before it hits your command. I’ve had the same formatting headaches with my bot commands - creating a simple custom script through the activity feed works really well. The script catches any @ symbols and cleans them up before passing to the main command. It’s more work than a single command fix, but you won’t need multiple versions of the same command. Check if your StreamElements dashboard has custom scripts enabled - newer accounts get better string handling functions than the old setups.

had the same issue! what i did was use ${if ${1} contains "@", ${1:replace:@:}, ${1}} for the link. it strippes the ‘@’ and should help! been a while since i worked with SE tho, so double check it.

Honestly, StreamElements limitations like this are exactly why I ditched platform-specific bots for anything beyond basic commands.

This is a common problem when you’re stuck with one platform’s command syntax. The workarounds others mentioned work, but they’re just patches on a broken system.

I built something way more flexible using Latenode for my stream automation. It connects to Twitch chat through webhooks and handles all the string manipulation you need with actual programming logic. When someone types !promote @username or !promote username, my workflow automatically strips the @ symbol, validates the username, and checks if they’re actually live before posting.

You’re not stuck with StreamElements’ command syntax anymore. You can add features like checking if the streamer’s online, pulling their current viewer count, or rotating through different promotional messages.

If you ever want to expand beyond Twitch or add Discord integration, you don’t need to rebuild from scratch. The same workflow handles commands from multiple platforms.

Takes maybe 30 minutes to set up a proper chat command handler that actually does what you want instead of fighting with bot limitations.