I was trying to figure out how to greet the user, when someone tags “Hi @handle” (can be anyone), it should reply "/me (tagged_user) had waved you hi (user) ".
Message if there is a username input:
/me [tagged user] had waved you hi $(user)
Message if there is no input:
/me 'Sup $(user)?
If you don’t like the alternative response I’ve provided one that simply doesn’t reply anything in the case there is no input.
Setup with alternative response:
!addcom -cd=5 hi $(eval a=decodeURIComponent(`$(querystring)`).replace(/@/g,``);a?`/me ${a} had waved you hi $(user)`:`/me 'Sup $(user)?`)
Setup without alternative response:
!addcom -cd=5 hi $(eval a=decodeURIComponent(`$(querystring)`).replace(/@/g,``);a?`/me ${a} had waved you hi $(user)`:` `)
1 Like
I was literally looking for the first one, it works like charm. I realized made a mistake with message format, just interchanged the two parameters “/me $(user) had waved you hi, [tagged user]” and it worked.
Thank you @RokettoJanpu
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.