There are a lot of Followbots on Twitch and some Viewers complain,
when Streamers celebrate this fake numbers.
There is a way to ban/block them via Commander Root Tools
but only with actual Streamer Account access.
Since you could accidentally kick all your followers this isn’t something that i would want a unexperienced streamer to perform and kill all his progress.
So my Idea was to simply add a !followers command that would deduct the number of known Bots from the Commander Root Site (which can be checked by every Mod) from the Twitch numbers.
Since there is no way to save values directly in Nightbot i used the CustomAPI Quote System to have a command for all the Mods to Update the Known Bots number.
That gave me 3 commands:
!followers - (split + join because of the added thousands separator)
has already $(eval "$(twitch $(channel) "{{followers}}")".split(",").join("") - $(urlfetch https://twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1); ) Followers. *Not including known Bots
!setbots x - (1x quote needed to be created first)
Following that my idea was to make one !bots command with multiple arguments.
This generally works but isnt pretty (not a programmer). Problem is that the URL’s blow this beyond the 500 character limit
!bots get | set x | url
$(eval
input="$(1)";
number="$(2)";
channel="$(channel)";
if(input=="set")
{$(urlfetch twitch.center/customapi/editquote?token=176fd9d9e5804630&data=1 number&silent=1);
output="Bots set to "+$(urlfetch twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1);}
else if(input=="get")
{output="Bots are set to "+$(urlfetch twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1);}
else if(input=="link"||a=="url")
{output="Click on Link and set known Bots to yes twitch-tools.rootonline.de/followerlist_viewer.php?channel="+channel;}
else
{output="No valid argument given. Arguments are: set <number> = set the bot count. get = get the bot count. url or link = get the CommanderRoot-Link;"}
output;)
Now i now i can put this on to pastebin and make a urlfetch for everything bigger, but i have to convert it somehow to json and also cant use nightbot commands?
Anyone who could help me with some more infos on that?
const OUTPUT = "";
switch (INPUT()) {
case "set":
$(urlfetch twitch.center/customapi/editquote?token=176fd9d9e5804630&data=1 ${NUMBER}&silent=1);
const OUTPUT = "Bots set to "+$(urlfetch twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1);
break;
case "get":
const output= "Bots are set to "+$(urlfetch twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1);
break;
case "link":
case "url":
const OUTPUT = "Click on Link and set known Bots to yes twitch-tools.rootonline.de/followerlist_viewer.php?channel="+${CHANNEL};
break;
default:
const OUTPUT = "No valid argument given. Arguments are: set <number> = set the bot count. get = get the bot count. url or link = get the CommanderRoot-Link";
break;
}
}
}
first, i’d have to say u shouldn’t share your quote list token, and after working on this that should be changed… i also don’t think urlfetch will work from inside the paste, could be wrong there… and u’ll have to rearrange some stuff and use an alias, because the way nightbot reads command variables like urlfetch, it will always do the urlfetch whether the code leads there or not… aka if u don’t type “set” it will still do that urlfetch and if there’s no second argument it will save the error for lack of second argument into the quote system replacing the number u would’ve put in earlier… i’m rather experienced with this sort of thing, so i’ll tinker and see if i can squeeze all that in
$(eval `$(urlfetch https://twitch.center/customapi/editquote?token=176fd9d9e5804630&data=$(2)%20$(3))`;i=$(1);i>0?`Bots ${$(2)<1?`are `:``}set to $(urlfetch https://twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1)`:i==0?`Click on Link and set known Bots to yes twitch-tools.rootonline.de/followerlist_viewer.php?channel=$(channel)`:`No valid argument given. Arguments are: set <number> = set the bot count. get = get the bot count. url or link = get the CommanderRoot-Link`)
and i tested it, it works ^^
p.s. it’s defo not as pretty, but all the spaces, tabs and carriage returns r characters and count against your character limit
First of all, thanks for that great solution.
The tokens are from a test account, so not in use besides testing.
Didn’t know you could call a 2nd command as alias ,
and also shorten the logic down so much.
I was even able to check for 2nd arg as number for the set, which i guess is the shortest way to do it?
no problemo ^^
ok, that’s cool, i have a couple test ones too, lol
i’m also curious to know if that works… before i say this, i’ve found it is best to take in the arguments as strings like we did there, because u can get other crazy errors that would transfer into the quote list if u don’t… but i’m not sure how js’s data type flexibility will work with that “isNaN” and the data being taken in as a string (what i do is n='$(2)';i=='set'&&n==n*1) because technically it is NaN (not a number)
and for the bad news… u can only link 2 commands together by alias… what i would give for just a 3rd… i could do so much more with just a 3rd
p.s. well, ok, not entirely accurate… u can link as many commands as u want, to the same alias… but u can’t go to another alias after already going to one
$(eval `$(urlfetch https://twitch.center/customapi/editquote?token=176fd9d9e5804630&data=$(2)%20$(3))`;i=$(1);i>0?`Bots ${$(2)<1?`are `:``}set to $(urlfetch https://twitch.center/customapi/quote?token=d1d06372&data=1&no_id=1)`:i==0?`Click on Link and set known Bots to yes twitch-tools.rootonline.de/followerlist_viewer.php?channel=$(channel)`:`No valid argument given. Arguments are: set <number> = set the bot count. get = get the bot count. url or link = get the CommanderRoot-Link`)
Using it
Get the Link with !bot url and click it
Login via Twitch and wait until loaded
Set “Is known bot” to Yes and note Filtered follows
Set “Is known bot” to Any and set “Is disabled” to Yes and note Filtered follows
Use command !bot set x and replace x with bot and disabled numbers combined