I’ve seen the command a few time now but can’t figure out how to get it to work.
I want to see what mods are currently in chat. I know there is /mods but this shows all mods for the channel. I only want to see those that are active in the channel as of the command being run.
A similar command i’ve seen is the !hosts one but i could’t replicate for mods. Any ideas?
Yeah, i was hoping i could create a custom command to call for this information and display in chat. It’s possible with javascript but i’m just not sure what to call for. Wasn’t sure if there was an api for this information etc.
You’re actually right, reading this post again reminded me of a possible solution using the Twitch API, I just forgot the link, so here’s the solution you’re looking for:
!addcom !mods $(eval `The current active moderators are: ${$(urlfetch json https://tmi.twitch.tv/group/user/$(channel)/chatters).chatters.moderators.join(`, `)}`;)
You don’t need to write the channel name, $(channel) replaces the field automatically.
The error you get means that you deleted something that shouldn’t have been deleted.
If the list of active moderators is empty, except for bots we filter out, then the response will give no name. Active moderators means moderators that are currently actively watching the stream and/or talking in the chat. If the stream isn’t live there’s low chances you’ll get any mod listed.
And finally, note that the Twitch API regarding the active chatters isn’t live, it’s refreshed periodically, so sometimes you’ll have to wait for a bit to get the name of an active mod in the list.
If however, you want the full mods list, regardless of how active they are, just do /mods.
That being said, this is the command to filter out both Nightbot and Streamelements from the active mods list:
!addcom !mods $(eval mods=$(urlfetch json https://tmi.twitch.tv/group/user/$(channel)/chatters).chatters.moderators;bots=[`Nightbot`,`Streamelements`];bots.forEach(b=>mods=mods.filter(m=>m.toLowerCase()!=b.toLowerCase()));`The current active moderators are: ${mods.join(`, `)}`;)
well the streamer where im a mod just go online and the command with the bot names blocked doesn´t work, it response blank :(, i use the first command that you give ryan where the bot names are not blocked and it works, all the mods get listed, its weird. Sorry for my english im trying my best lmao