mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
So I have a twitch bot, and I used to be able to check to see if the bot was a moderator in the channel to be able to utilise game commands, however, since Twitch IRC did away with OP, I can't check that way any more.

What is the easiest way to check to see if the bot (not the user) is a moderator, before actioning a command? There's no way of distinguishing that in the user list any more, so wondered if anyone else had any ingenious ways of extrapolating that information with the new Twitch API?

Thanks


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I've always found Twitch frustrating to deal with, as they make no attempt to conform to the IRC protocol. The /LIST command doesn't work, so you can't get a list of channels. You mention the userlist, and I can't even figure out a way to get a list of users for the nicklist except for the channel owner. And the twitch documentation I've been able to find is nowhere close to being helpful.

Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
@maroon You need to run this on connect:

CAP REQ :twitch.tv/membership
CAP REQ :twitch.tv/tags
CAP REQ :twitch.tv/commands

After about 60 seconds, the user list will load.

You also need to remember to connect to the correct channel, the format of the channelname needs to be all in lower case. If there is a single capital letter, it will not connect.


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
[Linked Image from i.gyazo.com]

Last edited by EggFriedCheese; 26/05/22 08:53 PM.

Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Finally figured out my problem, there are some channels that I can get a nicklist, and other channels I see chatter indicating a lot of nicks are present, but nothing I do causes anything to appear in nicklist except the owner

Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
Still having this issue btw, if anyone has any ideas


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: May 2022
Posts: 5
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: May 2022
Posts: 5
If you can connect to the chanels properly you could try:

paste in alias

/listops {
echo 4 * Listing Ops on #
set %i 1
:next
set %nick $nick(#,%i)
if %nick == $null goto done
if %nick isop # echo 3 %nick is an Op!
inc %i
goto next
:done
echo 4 * End of Ops list
}

or paste this in remotes and type " list " in the channel
you may want to add user access to your command also smile


on *:text:list:#: {
echo Listing ops/ mods in #
set %i 1
:next
set %nick $nick(#,%i)
if %nick == $null goto done
if %nick isop # echo 3 %nick is an Op/Mod
inc %i
goto next
:done
echo 4 * End of list
}


~ Ascertainment =)
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
isop no longer works in the twitch IRC servers. All users including the broadcaster no longer show up as OP in the user list.

Twitch require the use of message tags now to check for moderator / broadcaster / sub / VIP:

(broadcaster isin $msgtags(badges).key)

But the issue is, using (moderator isin $msgtags(badges).key) on the bot for the bot checking themselves doesn't work, as it can't check it's own messages, and because it doesn't run the command itself (and can't run it's own commands), and in turn doesn't see it's own replies in the mIRC chat room, there's no easy way of checking the tags on the bot.


Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese
Joined: Sep 2013
Posts: 61
E
Babel fish
OP Offline
Babel fish
E
Joined: Sep 2013
Posts: 61
[Linked Image from gyazo.com]

Last edited by EggFriedCheese; 01/07/22 11:39 AM.

Twitch Live-Streamer:
Synth Riders
Beat Saber
www.twitch.tv/eggfriedcheese

Link Copied to Clipboard