Command creation help

not even 100% sure its possible but basically what im trying to do is make a nightbot command that has two responses where it chooses the responses based off of if a specific twitch user is on the channel at the time

basically want these two responses depending on if the player is online at the time

Offline:
A Feeling Of Depression Washes over you as a light rain breaks out due to the fact [Player] is not online

Online:
An Aura of Fear Washes Over You As The Sun Is Blocked Out, Shadows Darkens And Stretches While the Temperature Drops 10 Degrees, Weep in Fear for [Player] is Here!

Do you mean if the specific user is currently a viewer in someone else’s channel or if the specific user is online on Twitch?

if the user is in the actual Twitch Channel at the time @RokettoJanpu - also sorry the reply took so long

@Killua_Hunter Copy and paste this into your chat. This will check if a specific user is a viewer in your channel:

!addcom -cd=5 !checkviewer $(eval c=JSON.parse('$(urlfetch json http://tmi.twitch.tv/group/user/$(channel)/chatters)').chatters;a=c.moderators.concat(c.staff,c.admins,c.global_mods,c.viewers);a.includes('$(touser)'.toLowerCase())?'An aura of fear washes over you as the sun is blocked out, shadows darkens and stretches while the temperature drops 10 degrees. Weep in fear for $(touser) is here!':'A feeling of depression washes over you as a light rain breaks out due to the fact $(touser) is not online.')

Usage: !checkviewer [specific user]

Feel free to change the command name if needed.

@RokettoJanpu is it possible though to make the command Specifically for one user, like so when the command is used no name is needed to be specified like if [Player A] typed “!checkviewer” it would ONLY look for a specific viewer and cant be used for anyone else

basically i want it to be a command that will only look for one viewers account instead of anyone its tagged to

@Killua_Hunter

!addcom -cd=5 !checkviewer $(eval c=JSON.parse('$(urlfetch json http://tmi.twitch.tv/group/user/$(channel)/chatters)').chatters;a=c.moderators.concat(c.staff,c.admins,c.global_mods,c.viewers);a.includes('SPECIFICUSER'.toLowerCase())?'An aura of fear washes over you as the sun is blocked out, shadows darkens and stretches while the temperature drops 10 degrees. Weep in fear for SPECIFICUSER is here!':'A feeling of depression washes over you as a light rain breaks out due to the fact SPECIFICUSER is not online.')

Copy and paste that, then replace each SPECIFICUSER with the user you’re looking for.

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