[follow time command] Question on custom API and user ID

Hi everyone, I’m a moderator of a Taiwanese channel called 左先生. I have tried to add a !HowLong command to the channel. However, if a user with a Chinese name(or other languages like Japanese) uses the command, the response would be “Not Following…”

I have checked the command and discovered that the custom API won’t work when the user name is not consist of English character.
$(customapi http://api.newtimenow.com/follow-length/?channel=l9301023&user= $(touser))

For example, when a person called 右小姐 uses the command, the custom API will become http://api.newtimenow.com/follow-length/?channel=l9301023&user=右小姐 , which is not workable

(Sorry for bad organization and bad English) I want to ask is there any variable showing twitch user ID which can obtain the English id of the user while the user has a non-English name on twitch? Or is there any way to solve this issue? I have tried to replace $(touser) by $(user) and $(userid) already.

While there exists the $(userid) variable, the Custom API author would have to be accepting ID format instead of the Twitch name. I believe you can use the $(twitch) variable to get around this like so:

$(customapi http://api.newtimenow.com/follow-length/?channel=l9301023&user=$(twitch $(user) "{{name}}"))

This does, however, remove the ability to use ToUser.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.