#dev-chat
1 messages ยท Page 20 of 1
u right
welp
it doesnt seem to work
dm'd response
is it meant to be in the regex part
IT WORKS ๐
Disco mode: $15
and i think i know how to make it so people can spend more to run other commands now
YEAH
not for money but ๐
the currency
can do like !disco
and make it run the api page
or a new api page just with different setup for one of the other effects
omg this is so good
thankyou so much LX
๐
no problem mate
@static wigeon is it possible to get channel 'crappy php snippets' where we could share inventions? I updated spotify plugin and it is burried under tons of text
There is a channel for sfx
Also I made a "nice" (in my silly opinion) sub alert, and there's no place to share it
OK.

Give me a error message
my chat just broke it
an*
like swap back to print
so you get all the debug stuff
oh i know why
its cuase any response is success atm
Yup
<?php
$url='https://api.lifx.com/v1/lights/all/state';
$authToken = "API KEY";
$headers = array('Authorization: Bearer ' . $authToken);
if (isset($_GET['hex'])){
$data = array("power"=>"on","color" => '#'.$_GET['hex']);
}else if (isset($_GET['color'])){
$data = array("power"=>"on","color" => $_GET['color']);
}
else {
die('No color provided');
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
$response = curl_exec($ch);
if (!$response)
{
die('error');
}
$status = json_decode($response,true);
if (isset($status['error'])) die ($status['error']);
else die ('Color set!');
}
dreamweaver is saying unexpected exit
Ah...
missing ")"
ah
Does it work now with !color imaginary or !color red ?
yeah it works with both color and hex
and both error correctly
could i make a store item run this

You can set up a price to call this command
I am not sure if store items can run api calls
was just thinking in the extension
@static wigeon can store items do api calls yet ๐ค
If you decide to do a store item:
- create a new item
- create a variation of redemption for that item
- add an api call in variation custom css
Store items can't do api calls, but you can hook into the websockets to get events when items are redeemed.
Ah, neither variations nor custom js/css
ye
But... You can assign "disco" to donations or subs
yeah
already got a variation on my subs atm
and follows
where it strobes green
making me chroma
Hi mates! Do you know what is your API rate limit?
quick ddos them 
Well.
Here's some documentation that is NOT ready.
https://developers.streamelements.com/rate-limiting
ohhhh
Take everything with a grain of salt
@static wigeon Bless you, man
documentation ๐
@low sierra ๐
The best thing i saw about SE is this one: https://github.com/StreamElements/tests
If you wanna contribute documentation or code samples feel free
We have many great repos. https://github.com/StreamElements/jobs
This one I saw too. I want to be a coder with helmet, so you can smash my head for coding php ๐
IoT
now to set it up so they can only use it while im live so they dont go waking me up
!temperature - will set up temperature in my room
!sprinkles - will turn sprinkles on
!window - will open/shut my window
!tesla - will send my car to provided gps coordinates (mainland only)
!nuke - will geolocate you and trigger nuke from nearest location to you - home delivery!
@sturdy socket please send a clip when you use that shit on stream, we will tweet it
the next time im live i will ๐ข
so busy again
so much editing
then OPL starts again this friday and so much filming and editing
yo @viral patrol you got a twitter
i wanna chuck you a follow and tag you for helping me build that
I am European, we use pigeons directly here, without internet websites ๐
do pigeons know how to parse php ๐ค
You can tag streamelements instead of me ๐ I don't collect internet points.
Your happines is way more worth than any heart/thumbup/+1 etc.
can lx atleast get a code master role ๐
@livid lotus can I have #code-share channel ?
i dont see why not, ill talk to @low sierra he is in charge of these things
he can make you the master of such a channel
lx if you ever want to host some PHP stuff for your stream
definately lemme know and i can setup you some stuff on my site
im assuming you already got a host tho seeing as you so knowledgeable
oh
actually
thats going in the ideas channel
idk how feasible it is
@viral patrol would putting php stuff on the SE site be too dangerous
for se
difficult to isolate the scripts
yep
So yes, I kinda have my place to be
im just using a mates spare server space
that hes hosting my esports website on
cause my actual site doesnt use much and im assuming the php doesnt either
but this has given me so many ideas for interacting with api's on different websites now
You got now my point of view.
i knew how to do things
SE bot can do almost anything.
just not how to connect them
the php scripting is how they connect
the missing chain in the link
and now i have no ideas ๐
If you make a good script, you can make a script which will send a postcard to provided address, you can order a pizza and so on...
yeah
i need more stuff that the stream can interact with
oh
actually you might be able to help with this
im building something in unity to control camera position
chat > SEbot > my server > unity
๐ค
unity just runs in C#
SE doesnt work with XXX servers, I know You want to move camera to a special place for chat currency. I am sure about that! ๐
lul
i mean ive made it so my arrow keys can move the camera around in x,y and rotate it with other keys
can also do rudimentary scaling atm
still ironing out the bugs
if you press enter
its crashes ๐
its not rotating camera but just moving the flat image of the camera around
in 2d space
You can do it two ways:
gather data in unity from website:
download json file
check timestamp
if timestamp>saved_timestamp => move camera to a location
im just thinking like
The other way is to create api endpoint on your computer and call it from bot/php script
lul ye
But you need to have external IP address
what i was thinking i would have to do
i think the redemption thing with the sockets would be the best thing atm
cause i think unity can do sockets
ah, and about that tweet - can you give me url to it, so I can take a look at final effect?
ah
was just a screenshot of the chat
gonna make a clip from the next stream
my lighting / camera setup is modular cause i use a dslr that i also use for filming
so my webcam is currently on a tripod in the corner
@sturdy socket check this one
I'm blue da ba dee da ba daa
๐
dude the level of your support is just insane, thanks a lot
Nah mate. You gonna be just fine. Look at this like on a nightmare you want to end, not like opportunity
(this helps with my deadlines)

@viral patrol Why was I tagged? ๐ค
Erm. Did I tag you? Can you provide me a timestamp? I am sure it was by mistake
https://i.imgur.com/eDWGJQ0.png ; It's 12:11pm now
OMG. This is Discord's fault! I typed [at]Ter[Tab] and it autocompleted you. Sorry about that
Ah it's alright i was curious cause i hardly know anything about the api haha
And you surprised me now, just made a few test with [at]random_letters to see, and sometimes it results strange...
In my experience, sometimes the mouse cursor gets on a name, then tab complete picks the name the mouse if over. I do it with emotes all the time too
Hey what do you guys think of my idea for the app? Would it be hard to implement? https://streamelements.helprace.com/i905-stream-to-multiple-rtmp-keys-at-the-same-time
a temp alternative
Is it mobile?
This channel is meant for API-related discussion. Please feel free to carry on the discussion in #general-chat. I will say that StreamElements is not an RTMP service or streaming application but streamer tools. We recommend OBS studio and restream if you would like to do this.
is there a way to trigger sound effects for certain users with chat commands?
No only with Store Redemption Items but not for certain users. You can make it only for subs or mods but mit specific users
ah okay
hi so im getting an error
when trying to add points
relevant code
def addpoints(user, amount):
r = requests.put('https://api.streamelements.com/kappa/v2/points/my_account_id/'+user+'/'+amount,
headers = {"Authorization":jwt_token},
)
print(r.text)```
def gift(user_to, user_from, amount):
negative_amount = amount * -1
print(str(negative_amount))
addpoints(user_to, amount)
addpoints(user_from, str(negative_amount))```
it adds the points but doesnt take them away
why not use our !givepoints command? 
who's the friend?
jakeoce
You're honestly better off using the !givepoints command
im not a developer, so i have no idea, i just could read the basics on what you're trying to do :p
ah gotcha
im sure someone can answer you later tho

i dont recognize that syntax
Python I think ๐
it is Python
@honest bone 
I figured out what the problem was btw
@nova parcel so can you tell us, maybe somebody else will come to us later with the same issue and we will know, how to help them
oki sure
when i was trying to turn it into a negative number
i was multiplying a string by an integer
and it just returned nothing
so i got an error when trying to update points
soi turned the string into an integer first then multiplied it then turned it back into a string
str(int(amount) * -1)
is there any docs on the websocket connection?
@unique nymph Only the very basics
https://developers.streamelements.com/websockets
What are you looking for?
The new page is very much still WIP.
I have noticed, need help on that front?
For sure that'd be awesome ๐
@unique nymph What's your github?
Gonna dm you an invite to our gitbook team.
Cool thanks
Hello everybody !
Where is the code for "Follow" " Subscriber" " count " or " the name of guys to follow / subs " ! There are a code in css/js to modified this ?
and how on my css / js the follow.subscriber is connect to my stream channnel ?
@static wigeon hi
Hiya, was wondering if there was any way to listen to chat messages via the socket API?
@gray wigeon there is easier way. Twitch uses IRC protocol, so you can run irssi/bitchx and so on to connect your channel
someone see my message ?
Hello everybody !
Where is the code for "Follow" " Subscriber" " count " or " the name of guys to follow / subs " ! There are a code in css/js to modified this ?
and how on my css / js the follow.subscriber is connect to my stream channnel ?
idk
@kindred raven or @hushed hazel could you help out here? โคด Custom coding within the alertbox or event list widget
For alertbox - there is a pinned message @cold swift
Is there possible to make my subs count session with appear and disapear like every 2 sec or ? i can only make it slide left to right on stream element ! someone can me send the code ? plz
If you want to use data from "Data" tab in overlay editor, you should create a "Custom Event List", go to the CSS editor and use code provided. For better readibility it is wrapped in HTML file. As you can see - each element has two divs: one for header (variable name - for better visibility) and one for data contained. So if you want to display JUST data for subscribers count, you should remove JS corresponding to displaying header ($("#hsubscriber-total").html("subscriber-total");) . Remember - this code can bring you a lot of work but also a full customizable display of each information. For example - you want to have a fancy 3D last sub? Just add some css to it. I assume SE staff will not be able to provide detailed help to it as it is not basic usage (this channel is for experienced users), but if you have somebody, who knows html/css/js, he/she will adjust this script to your needs. So, there's a link: https://pastebin.com/sDbxkEyG
@hushed hazel @livid lotus @cold swift โคด
This snippet has no "refreshing" but you can call it from onEventReceived
@viral patrol im affraid you wont get the same data within the onEventReceived - youll have to assign obj.details to a public variable and then use it within the onEventReceived listener
the object returned from the onEventReceived event is just that events data
๐
good job on the list btw. sure will come in handy!
The way I've got this list as I am lazy: just wrote an ajax post request to nowhere, then checked "network tab" in dev tools. copied it to a file and iterated by php script ๐
@hushed hazel offtopic: when are you streaming as I would like to take a live look at your stream ๐
This autocompletion is killing me
Huh, obj passed to onEventReceived could be the same one that is on widget load, but in event Received function grabs just js const listener = obj.detail.listener; const data = obj.detail.event;
The best way is to create a function parseObject(obj) and forward full object from event listener and on widget load (so there is no duplicated code), as well there could be a lot more things (to update just one div instead of all of them).
@viral patrol im doing Tue, Thu, Sun @ 8pm CEST
@viral patrol maybe I misunderstood what youre trying to achieve, but this is what i meant with assigning the onWidgetLoad data to be used in the onEventReceived listener:
let loadData;
window.addEventListener('onWidgetLoad', function(obj) {
loadData = obj.detail;
});
window.addEventListener('onEventReceived', function(obj) {
$('.main-container').html(JSON.stringify(loadData, null, 2));
});
I didn't try to achieve anything @hushed hazel , i just realized, that this is the same object, but with event, there is also listener and event scopes.
when i trying doing the custon event list i cant make it so stay on there forever becuase it keeps disappearing after a few seconds
So i've been tagged in here by @low sierra to help out with this โผ
https://streamelements.helprace.com/i890-having-separate-colours-for-specific-letters-variables-in-a-widget
He was giving the idea to use the HTML field as an option. I could write a minor tool for this, but to make it easiest, it would be best to make it have its own section like "text settings" is ... maybe Advanced Text ? This of course would also override aforementioned editor bar
Just point me in a direction and I should have it done fairly soon for ya! ๐ ... be sure to Tag me as I currently work grave shifts for my dayjob ๐
hey guys
on custom css code for subscription alerts
i want to do an alert for gifted subs
which parameters do i have to work with
like username who got the gift - username who did the gift - number of months - number of gifts already done by gifter etc
cant find anything about it
right now {{amount}} trigers: gift
and {{name}} triggers a username (but i dont know if its the gifter or the sub )
in the alertbox we use {sender} gifted {name} a subscription!
np ๐
how can i get the latest donation info / latest sub info and latest cheer info for custom event list
I think there is some details on this in the pinned messages
with this
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'subscriber-latest') {
username = event.name;
text = 'x' + event.amount;
ls = username + ' ' + text;
and this
window.addEventListener('onWidgetLoad', function(obj) {
const recents = obj.detail.recents.sort((a,b) => a.createdAt > b.createdAt);
userCurrency = obj.detail.currency;
for (var eventIndex in recents){
const event = recents[eventIndex];
if (event.type === 'subscriber') {
username = event.name;
text = 'x' + event.amount;
ls = username + ' ' + text;
i get undefined values
i think @viral patrol or @hushed hazel might know the answer to this
HTML:
<div class="main-container"><p>Latest <span id="action-rotate"></span></p>
</div>
CSS:
p span {
color: white;
font-weight:bold;
vertical-align: top;
}
JS:
let userCurrency;
var arr=['','','','',''];
var counter=0;
var len = arr.length;
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'follower-latest') {
arr[0]='Follower: '+data["name"];
} else if (listener === 'subscriber-latest') {
arr[1]='Subscriber: '+data["name"] + '('+data["amount"]+')';
} else if (listener === 'host-latest') {
arr[4]='Host: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'cheer-latest') {
arr[2]='Cheer: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'tip-latest') {
arr[3]='Donate: '+data["name"]+'('+data["amount"]+')';
}
});
window.addEventListener('onWidgetLoad', function(obj) {
var data=obj["detail"]["session"]["data"];
arr[0]='Follower: '+data["follower-latest"]["name"];
arr[1]='Subscriber: '+data["subscriber-latest"]["name"] + '('+data["subscriber-latest"]["amount"]+')';
arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
arr[3]='Donate: '+data["tip-latest"]["name"]+'('+data["tip-latest"]["amount"]+')';
arr[4]='Host: '+data["host-latest"]["name"]+'('+data["tip-latest"]["name"]+')';
});
var i = 0, // Start Index
$el = $('#action-rotate'),
$temp = $('<span />');
$temp.hide().appendTo( $el.parent() ); // Setup Helper
(function loop() {
var w = $temp.text( arr[i%=len] ).width(); // set text + get width
$el.fadeTo(600,0).animate({width: w}, 300, function(){
$el.text( arr[i++] ).fadeTo(600, 1);
});
setTimeout(loop, 3000);
}());
@kind beacon @rugged spindle โคด as you were interested in that
@kind beacon and about your code:
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'subscriber-latest') {
username = event.name;
text = 'x' + event.amount;
ls = username + ' ' + text;
It should be data.name not event.name
omfg brainfail xD thx
Of course, you can change animation in loop function
Hello, can someone help me? i want activate a Keystroke for each event ? how is that possible? ๐
Keystroke on your computer for each event in stream?
It is possible if you push keystrokes to public API/server, then receive it by software running on your pc, then pressing buttons. So I think - some kind of API to handle requests, dekstop app to receive list of those reuests. I think - few days of work at least
Not without creating connection between your PC and SE events catcher. I know it would be easily monetized - donate $10 to instant granade throw. You are sneaking and then bam! $10 donate. However - few days of work at least.
For 2 people (1 for desktop site and 1 for API)
mhh ok
Whats that
i just want a script.. that press just the number "2" on the keyboard
someone followed -> press the number 2 on the keyboard
Oh. This is not related to your question, this is a widget share. As I wrote - you need somebody, who can write something like that for you as there is no solution for that.
Okay
new version of BattleBoss:
Changelog:
- added messages 'user X hit user Y with a follow for 214 dmg!'
- saving data in keyvaluxe.xyz service
- fixed issue with dmg that is not integer (damaging for 12.12312312312 and so on)
- fixed an issue with "Not a Number" as max health value
dosent work.......................................................................................................................................................................................
@hushed hazel Maybe you could help me, i'm looking for any documentation about custom HTML & CSS Alerts or maybe do you know the variable for text area on alerts please
@inland warren see the pinned msg
Yup I saw but I succeed to did it differently
@inland warren sorry about the late response, i was deep into work stuff - glad you figured it out tho!
No problem, thanks @hushed hazel ๐
@viral patrol Do you know where can i found all value for the custom event list you gave me, for example, for the latest tip it's gonna be tip-latest but I would like to find others value like Top tipper etc...
I think
found it
Thanks !
nvm i pin it for me ๐
There you are. Something I am working on
nice job ๐
It is not complete yet, but you can get a lot of information from there
yup i see
Perfect, I succeed to did exactly what I wanted @viral patrol ๐
Don't mind me just pining that 'ish for later usage 

Ty
that is awesome
So i want to make a widget like "stream avatars" because we cant really sync stream avatars with stream elements.
Can i see who is watching with streamelements api (Dont see anything in the docs)
hi
I'm trying to give points to an user using the api call https://dev.streamelements.com/#points__channel___user___amount__put but I canยดt manage to find how should I generate the JWT to authenticate the call, any hints?
!jwt
You can find your JWT token on your account channels page: https://streamelements.com/dashboard/account/channels
(Don't forget to click on "Show Secrets")
perfect, thanks @viral patrol ๐
Anyone seen my message?
@white flume what do you mean by "watching"
Once someone says something in chat they get added to a list with people that watch
I think i can recreate it, but i just need something from the api that looks at people in chat
And the streamelement is mostly user calling for something
So youโre saying i should use streamelements at all?
Shouldnโt *
I didn't say that, I am just saying if you want to watch for chat lists, you want to use twitch
there are some integrations you can use between the application and SE, but specifically the viewer lists, pull from twitch
Yea ok, but then i go directly to twitch api and not streamelements api right?
for that part, yes
and probably cant get twitch api to the custom event widget
Just including?
that widget can do just about anything, minus a few things that cause security issues
You can converg it to a array right?
Just normal js array
๐คฆ๐ปโโ๏ธ
Then you get json with chatters name
If you were interested lol
@white flume if you want it as object to iterate:
let viewers={};
$.get("http://tmi.twitch.tv/group/user/tygo1oo/chatters", function(data) {
let obj = JSON.parse(data);
viewers = obj.chatters;
});
@viral patrol this need jquery right?
Yes, but in "custom event list" jquery is included by default
@viral patrol i cant really find how to select the images from the media center on the website. Better way to get image in the custom even list is to get them external?
Internal would be better tho
Give me a second
Press insert image, then select image you want to use from your library. Now just click RMB on thumbnail on left to "Change image" and "Copy Image Address" from menu.
This is how I did get images urls I could use in my snippets
Can the Regular Expression component of a command be used to check the sender's name? Or only the body of their message?
Message
@viral patrol I'm trying to use your marquee build but I'm having trouble with it. I guess I really don't know how to insert it. I tried to go through widgets>custom event list and replace what's there with the code you posted but it doesn't seem to be working.
Gonna check it bit later as I am not home now
Why cant i send code
you can, use the tilda "~" key
but not that symbole
lol
`
that one
three of those surrounding code puts it in a special box
its the link
`var JSONItems = [];
$.getJSON( "http://tmi.twitch.tv/group/user/tygo1oo/chatters", function( data){
JSONItems = data;
viewers = JSONItems.chatters.moderators;
var i;
var display;
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
document.getElementById("test").innerHTML = display;
}
});`
looks weird ay
if you use 3 back ticks it will do a code block
use 3 ` before and after
ahhh
$.getJSON( "http://tmi.twitch.tv/group/user/tygo1oo/chatters", function( data){
JSONItems = data;
viewers = JSONItems.chatters.moderators;
var i;
var display;
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
document.getElementById("test").innerHTML = display;
}
});```
there you go ๐
So why is this not working in custom event
Works in localhost
I only get the following : was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint
But it should work
what happens when you put in https
Change url u mean?
Its just impossible in streamelements as a beginner programmer, i really cant test
Yeah, change the url from http to https
Ill try ty
just this: ``` var JSONItems = [];
$.getJSON( "https://tmi.twitch.tv/group/user/tygo1oo/chatters", function( data){
JSONItems = data;
viewers = JSONItems.chatters.moderators;
var i;
var display;
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
document.getElementById("test").innerHTML = display;
}
});```
idk if it will work, but worth a shot
This is ajax
also no need to declare JSONItems on init, as it is overwritten within success of JSONitems
AND it should work, as there was protocol mismatch (accessing http while on https)
Sorry, my fingers wrote "and" in caps as it is custom from coding ๐
Wait what
haha, magical programming stuff
Oh. Got it now. Do you have any webhosting which could do
<?php
header('Access-Control-Allow-Origin: *');
echo file_get_contents('https://tmi.twitch.tv/group/user/tygo1oo/chatters');
as there is no such header on twitch tmi endpoint which disallows your script to get data by AJAX call from there
And about function scope - it is wrong, it should be:
Ahh i have this in localhost. I thought it was in streamelements already
let viewers=[];
$.getJSON( "https://tmi.twitch.tv/group/user/tygo1oo/chatters", function( data){
let JSONItems =data; //there is no need as you can direct call let viewers = data.chatters.moderators
viewers = JSONItems.chatters.moderators;
var i;
var display;
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
}
document.getElementById("test").innerHTML = display;
});
document.getElementById("test").innerHTML = display; should be out of a loop
And you were assigning string as array
The vars?
I did getjson ?
OK. So from beginning:
- you need serverside script which has header AllowOrigin: * (to AJAX calls work)
- there is no need to initialize JSONItems before calling .getJSON (as it should be initialized on method success)
- no need to use another variable to hold this data - putting whole
datatoJSONItems
Conclusion. You need serverside script, lets call it script.php with contents:
<?php
header('Access-Control-Allow-Origin: *');
echo file_get_contents('https://tmi.twitch.tv/group/user/tygo1oo/chatters');
then you need to call it instead of calling twitch by:
$.getJSON( "https://URL-TO-YOUR-DOMAIN/script.php", function( data){
let viewers = data.chatters.moderators;
let i,display;
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
}
document.getElementById("test").innerHTML = display;
});
No problem. Glad I could assist
Are you actual dev in streamelements?
he is just awesome xD
yes, its good having people willing to help ๐

is there anyone that might be willing to help me convert some code for a custom event list that i use in streamlabs in order for it to work in SE?
@fresh vigil just took a look at this snippet. By mistake there was a "CSS" section described as JS. Corrected it now
@viral patrol it actually works ;D
is trying to look surprised ;-)
result is this tho.
undefinedstreamelements
tygo1oo
But i'll try to fix it my self plz
doesn't twitch API use the userID now? idk, but I think i remember hearing that at some point
Wanna hint?
Tygo "undefined" comes as an item is not defined, maybe you could skip it somehow
@white flume โคด
oooo, I get it
thanks for the fix @viral patrol
@viral patrol skipping first [0] just skips the first viewers. It doesn't skip undefined
i think the undefined comes from somwhere else
@viral patrol let i is just giving back undefined
$.getJSON( "https://DOMAIN/viewers.php", function( data){
let viewers = data.chatters.moderators;
let i,display="";
for (i = 0; i < viewers.length; i++) {
display += viewers[i] + "<br>";
}
$("#test").html(display);
});
hmm
display was undefined on start and you were updating it.
Imagine a question:
there is a bus
on first stop 5 people went in
on second stop 3 people went out and 2 went int
on third 1 person went in
how many people are on the bus?
You don't know, how many people were on the bus before first stop, always reset value of variables
And I am sorry i pasted a code that caused troubles
Wasn't my intention, i wrote it on discord directly without checking it first
I only used the parts i need
But - there is always a lesson taken
๐
No problem
Thanks for helping again
@viral patrol i think i learn more from you then school
No. You learn by yourself. Teacher or me are only to show you a way, it is all up to you if you take it.
@viral patrol you there?
@viral patrol any time helping me with debugging?
I have this code that makes divs move randomly. But it wont work when i trigger it inside the ajax request
(still same code as before)
already fixed it sorry
Np
so this is the basics ๐ Are you proud of me master @viral patrol
Pretty nice
they crash together, video stops
I thought for a second it died and waited for error xD
I expected explosion on collision
big boom. big badda boom
ive been having trouble converting code for an eventlist i use in streamlabs to work in SE. is there anyone that might be willing to help out?
@young saffron have you checked out the code manual that was put together? It is pinned, and might help you out a bit
@cinder lintel ah ok ill take a look. my coding skills are limited so we'll see what happens
that manual is VERY detailed, and awesome
@cinder lintel yea looks pretty detailed. problem is when i paste in the html everything immediately disappears. i dont even see anyting in the manual that could help
i am trying to call.... /points/{channel}/{user}/{amount} but getting a error 404
points/channel id/tads_gaming/ works without fail and shows me what i wanted
but adding a number to it 404 errors
Are you using PUT method on your call?
ahhhh
my bad
i have started to write a Wordpress Plugin for SE as i use wordpress for my site and i am building a "stream Store" that people can use the "points" to buy desktop backgrounds etc
i think it will be quite cool if i get it right
I imagine WooCommerce Stream Elements currency payment gateway ๐
see i was thinking woocommerce but thats a bulky plugin and i dont think its needed for a "stream store"
only thing is i have never used PUT so just trying to find some info on it
Do you use cURL for calls?
if so:
<?
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
@pulsar willow โคด
well i didnt want to but all info seams to point at curl
Huh... Give me a second
i just have to enable it on localhost so i can code it locally
Check this one: http://docs.guzzlephp.org/en/stable/
Thanks will do in a sec
$request = $client->createRequest('PUT', '/path', ['body' => ['foo' => 'bar']]);
@viral patrol i think i might just use curl... but would you have a example code i could learn from... as for the points to add or take away points.
hello, i need some help with event list CSS! i want to remove host from events.. but i dont knwo how ๐ฆ i try everything.. but nothing ๐
Events are added in two places:
- on event received
- on widget load
just comment AddEvent iniffor hosts in both places would do the trick
Just like that
thanks โฅ
@pulsar willow https://stackoverflow.com/questions/5043525/php-curl-http-put - this could help you with that
yea i have been using that and i get... {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"} @viral patrol
$url = "https://api.streamelements.com/kappa/v2/points/";
$data = array('channel' => $channelid, 'user' => $user, 'points' => $points); ```
Put it directly into URL and use PUT method
$url = 'https://api.streamelements.com/kappa/v2/points/' . $channelid . '/' . $user . '/'.$points;
@pulsar willow
yea i have just done that but to send with curl you have to send http_build_query and that has to have a array
without using...
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query
i get the 401 message
right time to stream so i will get back to it soon
401 - Unauthorized, probably no authentication header
ok so i am receiving this... "message": "No authorization token was found"
So, you need to add it to haders
<?php
$authorization = "Authorization: Bearer JWTTOKEN";
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
Thanks @viral patrol i am walking away for a bit.... i have never had to use any of this before and its abit overwelming tbh.... never used PUT or JWT <head hurts>
I created a countup timer, since only a countdown timer existed natively. Useful if you're trying to track progress of a current task.
JavaScript code you can add to a custom widget within SE:
var timerVar = setInterval(countTimer, 1000);
var totalSeconds = 0;
function countTimer() {
++totalSeconds;
var hours = Math.floor(totalSeconds / 3600);
var minutes = pad(Math.floor((totalSeconds - hours * 3600) / 60));
var seconds = pad(totalSeconds - (hours * 3600 + minutes * 60));
document.getElementById("timer").innerHTML = hours + "h " + minutes + "m " + seconds + "s";
}
function pad(val) {
var valString = val + "";
if (valString.length < 2) {
return "0" + valString;
} else {
return valString;
}
}
Then for the HTML you'd use:
<div id="timer"></div>
You can see an example of the output below.
@honest meteor wanna a hint? ๐
A hint? I'm just sharing what I created for myself, so others who might have a use can feel free to use it. ๐
I get it as I do the same ๐
@civic harbor first: wrong channel, this is for developers. second - please check out #art-marketplace
Sodapoppin's stream package was created by Nerd or Die. You may be able to hire them to do something for you. Contact them via twitter or their website.
@young crystal These guys can help
hey in nightbot I can use $(touser) to make it when someone (mods) !command @user the reply @'s the user
it seems you only have $(user)
is that the case
@cobalt narwhal there are two variables $(user) which you can prepend with @, There is also $(sender) which will reply with a person who is using command. For example a command !watchtime - by default it will treat $(sender) as $(user) but when you add param !watchtime user A user will differ from sender. In that case response @$(sender), $(user) was watching my stream for $(user.time_online) will have response like @Vince, lx was watching my stream for 13 seconds
@viral patrol thanks, do you guys have variables to execute a command? for example I have a !camera command and a !cam command and I would like the cam command to just say what the camera command is
these are questions for #helpdesk-twitch. I'll meet you there
at last i got my head round it
just using curl and PHP
so using
CURLOPT_POSTFIELDS => "{\n\t\"amount\":30\n}",
adds to a users points and you would think changing 30 to -30 would remove? but it does not it adds 30 again... how would i take 30 points away?
Hello, I'm wanting to pull the tips, subs, bits, from the api in real time any why of doing this ?
@hollow verge have you looked at the api docs? https://dev.streamelements.com/#stats__channel__daily_get
My bad it is now working <User Error> like normal
@pulsar willow I have but am I limited to api calls ? thank you
There is a websocket for getting live events, I'm just too pleb to know how
Are there libraries available to work with the API from say, PHP, Python, JS...? ๐ค
Just wondering if they exist, if they do not, I might write a few
None that have been posted in this discord
๐ #helpdesk-twitch is the place for StreamElements support
awesome. thanks @low sierra
@pulsar willow I would heavily recommend using Guzzle over CURL... If you need help on that front hmu
Is there any documentation besides https://dev.streamelements.com/# ?
I need a token but I can't find where to get one. Every google search has been a dead end.
@mellow tiger You can find your JWT token on your account channels page: https://streamelements.com/dashboard/account/channels
(Don't forget to click on "Show Secrets")
Thank you
Also, can I just pass the JWT key in the url or does it need to be as a header?
Header
Okay, and what does the name need to be?
Bearer token
token did not work. I still have error 401
Sorry, replace that with your JWT
This is what I used curl --header "token: {token}" https://api.streamelements.com/kappa/v2/bot/darkswordsmantv
Did you mean "bearer: {token}" ?
I believe that will work yes but I only have limited knowledge when it comes to this stuff. I'm sure one of our devs or a community member with experience can help out when they're available.
Alright. bearer did not work either, and it looks like the only documentation on Oauth is non existent and current WiP: https://developers.streamelements.com/oauth2
Oauth is wip, not released. Im not familiar with the format you are using, but I can show what I used through Google scrips to pull from the api
That would be great, thanks. I was just testing with curl to see what data/JSON structure I would get since the documentation is fairly vague
It appears it's supposed to be curl --header "Authorization: Bearer {token}" https://api.streamelements.com/kappa/v2/bot/darkswordsmantv, though, so far, all of the urls I have tried have not worked for various reasons. ๐
Edit: channels/{channel} worked 
hold on, I think i know what it is
xD
pardon my scatterbrain, otherwise I would have helped sooner, lol
No worries. I'm no where near even a Junior developer, but I know if there's a will, there's a way. Lol
I'm wondering if loyalty/{channel} is broken. It returns 500
what are you putting in for {channel}
darkswordsmantv, my channel
https://api.streamelements.com/kappa/v2/loyalty/darkswordsmantv
you need to use your accountID from your profile
in SE
โค big thanks. Worked

hey im having trouble setting up a google api
im not the owner of the channel but he would like a google sort of command but the api wont work

Does the api allow us to pull information in regards to chatstats?
@cunning inlet check the header, its all linked there for your usage: https://developers.streamelements.com/endpoints/chatstats

Am I to understand I can't just drop in {name}, etc. placeholders to custom CSS alerts in the HTML, I need to replace values myself with JavaScript? First tame making custom coded alerts, sorry for the newbie question. It's not currently being replaced automatically when I test it.
There is a complete guide pinned @charred tundra
That's what I'm using
The placeholders aren't working as-is so I wanted to verify that's expected behavior
They should work - I just have a custom sub alert which has name in CSS field
content: '{{name}}\A {{amount}} months!';
So {{}} should do the trick
ah, double brackets
the guide may need to be updated
there we go, that did the trick. thanks!!
OK. Gonna update it then
Updated
Huh, and i found a typo
Overlay Variables for Custom CSS and Custom Event List
Awesome, thanks!!
I was sent here by the helpdesk team
I'm trying to use querystring/queryscape/queryencode/pathencode but none of them seems to work.
$(urlfetch https://example.com/${queryescape})
it doesnt replace
@charred pebble ${customapi.http://url/?param=${pathescape ${1:}}}
does it include spaces?
It htmlencodes all spaces to %20
k this is what i need
So for example !spotify Drunken Sailor will send a request http://playme.asong/script.php?song=Drunken%20Sailor
the documentation was really confusing
it says both queryscape and queryencode
also it doesnt submit if you type the comand without arguments
is the the desired behavior?
Good day.
I want to translate the command !accountage.
But i did not find a variable for the date the account was created.
Is it possible to help me somehow?
you would need to find the twitch api that pulls that
@spark carbon https://docs.decapi.me/twitch?endpoint=creation%2F%3Auser
$(customapi https://decapi.me/twitch/creation/$(1))
That requires a target user
!age terrabuck
Command Age Terrabuck responded with error: we don't check age for everything that is older than coal
Thank you.
I do not understand this at all, but i'm very interested. I could not understand why it did not work. But then i tried instead$(1), add $user, and everything worked.
Now I ask to help. How can I make a beautiful date?
- What is now.
- As I want.
Use https://decapi.me/twitch/accountage/ Instead of https://decapi.me/twitch/creation/
@spark carbon โคด
"days" "years" etc. cannot be translated
I have a feeling that would be the next question
I did not understand how to use the parameter 'precision'.
I only have year and month.
I tried to write this parameter, but I can not.
How to write it correctly?
Now: $(customapi https://decapi.me/twitch/accountage/$(user))
Many thanks!
For translate command !givepoints
I not only need to translate the text, but the function of sending points is also needed. Is it possible to implement?
And so is the command !item
default commands at this time are unable to be editted, and certain ones that have logic built in (those two you listed) can't be re-created any other way
@viral patrol
Hey could you help me out
@autumn lark I will try. Just post your question and I will do my best to answer (but I am not always around ๐ )
I'm a mod for SypherPK and tried using the earlier posted Fortnite API to make a command that shows the amount of wins he got in that day, and i'm getting close but yeah
It's reading the script, not executing it
Whoa. You have to download this script to your webhosting
Not to github
Could host it locally but my pc is not always on
@autumn lark https://www.000webhost.com/free-php-hosting - maybe it will work, but I am not sure if they add something to code after execution (ads for example)
Alright, I got the script to work, but would you happen to know if I can change the timezone to match him? @viral patrol
In one of first lines of PHP script just add:
date_default_timezone_set('Europe/Amsterdam');
``` or whatever a timezone you want to use
List of timezones: http://php.net/manual/en/timezones.php
i know this is not in the scope of SE but you are all great with PHP... i am trying to scrape the big top header image from my twitch page to display on my website... i have tried file_get_contents but page fails to load... have any of you any idea how i can do this?
I'm not great with PHP at all 
Also this doesn't seem to be working, i'm guessing it's just taking whatever the api provides? @viral patrol
I might just hit up the partybus team @viral patrol
So I don't bother you every time 
I am not sure about this piece of code as I don't remember what is timezone related there
But you're right, it seems just forwarding data from API
Yeah i've contacted them, i'll see what they say when they get back to me
Can i perform a task on discord through SE?
@viral patrol Is this the only thing I should see when opening the pinned file?
I though it should contain all the Custem Event list variables?

@white flume I don't think thats possible as both use different APIs. If you want a way to have a middle-man, do share with us.
Huh. Maybe something broke. Give me a second
It contains, but somehow it is not displaying anything below "Note:"
@indigo flume would be nice to add sombody to group through stream stats. But if thats impossible, no problem
I don't understand what you want to achieve
Would be good ay?
@viral patrol
Cant i do somethink like this through custom event?
Including part of discord api to layout
I think you should be able to code something from the custom event list to discord, yes
@white flume you need to send request over REST API to discord endpoint
ok
Not sure weather to ask this here on in the other section, so I will ask in both. What data type does the point system use? Asking so I know what the max amount of points a user can have.
@potent ravine
Our lead developer says:
"Use an INT. The value shouldn't ever be above Int32"
Hey so a while ago @viral patrol helped me out with a custom widget and I'm having trouble changing the font. one section of it isn't changing
would anyone be able to help me with that?
should be pretty simple, would just need to see the code
html is:
<div class="main-container"><p>Last <span id="action-rotate"></span></p>
</div>
css:
p span {
color: white;
font-weight:bold;
vertical-align: top;
font-family: arial, sans-serif;
}
JS:
let userCurrency;
var arr=['','','','',''];
var counter=0;
var len = arr.length;
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'follower-latest') {
arr[0]='Follower: '+data["name"];
} else if (listener === 'subscriber-latest') {
arr[1]='Subscriber: '+data["name"] + '('+data["amount"]+')';
} else if (listener === 'host-latest') {
arr[4]='Host: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'cheer-latest') {
arr[2]='Cheer: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'tip-latest') {
arr[3]='Donate: '+data["name"]+'('+data["amount"]+')';
}
});
window.addEventListener('onWidgetLoad', function(obj) {
var data=obj["detail"]["session"]["data"];
arr[0]='Follower: '+data["follower-latest"]["name"];
arr[1]='Subscriber: '+data["subscriber-latest"]["name"] + '('+data["subscriber-latest"]["amount"]+')';
arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
arr[3]='Donate: '+data["tip-latest"]["name"]+'('+data["tip-latest"]["amount"]+')';
arr[4]='Host: '+data["host-latest"]["name"]+'('+data["tip-latest"]["name"]+')';
});
var i = 0, // Start Index
$el = $('#action-rotate'),
$temp = $('<span />');
$temp.hide().appendTo( $el.parent() ); // Setup Helper
(function loop() {
var w = $temp.text( arr[i%=len] ).width(); // set text + get width
$el.fadeTo(600,0).animate({width: w}, 300, function(){
$el.text( arr[i++] ).fadeTo(600, 1);
});
setTimeout(loop, 3000);
}());
and it's not chaing the font of the text that says Last
http://prntscr.com/k1eww5
ok, lemme look into it
thx
also should I be able to use any of the fonts that are in the regular widgets
I was just going to ask what font you wanted to use
I haven't decided just yet, should I do that now?
you can easily replace the font at any point
ok
ok, so here is what I did
This will be the HTML. The top part is setting the font from google fonts (which are where the fonts in the overlay editor come from)
<link href="https://fonts.googleapis.com/css?family=Shrikhand" rel="stylesheet">
<div class="main-container"><p>Last <span id="action-rotate"></span></p>
</div>
okay so do I add that to what's already there for html or completely replace it?
And this will be the CSS, where we set the font globally at the top, and then can change it on a widget level as well. As you see we set the font color in the top to black, but have it as white in the container for the data. You can control this further like size and other styles
* {
font-family: 'Shrikhand', cursive;
color: white;
font-size: 23px;
overflow: hidden;
}
p span {
vertical-align: top;
}
This would replace the existing code, I just used this font because it was a noticeable change
On the google fonts page, when you select a font, you can easily get the HTM and CSS from there and just replace in the code
can you make that a hyper link? also is there an easy way to make it so that the Last is white along with the rest of it
The fonts page is just https://fonts.google.com/ once you find one you want, you just click select this font, then a grey bar will appear, and that will have the code for any selected font
I also modified the CSS above, it will now make all of the font white
The top section I added controls the font on a global level, you can also add font style and parameters into the p span as that is the container for the events. There is no separate container for the word Last so anything you set on a global level will control it. Hope this makes sense/helps
okay
I think I can get it from here, I'll dm if I run into another problem
thanks
No problem 
@floral fable okay one more question
how can I force it to show all on one line
it looks like it has something to do with the "vertical-align: top;" line in the css
if its not on a single line, you can either change the font size smaller, or rezise the widget box
changing the font itself, or the size can cause it to not look right in the widget, and resizing it should fix that
I tried resizing the widget box and it didn't change anything
how does yours look right now?
sometimes it does it sometimes it doesn't
nvm I think it's just because I resized it while it was already showing it
yeah, it should reload after the resize, otherwise if it is acting funky, you can try making a new event list widget, you defiantly want the vertical align in there, if you change it or remove it, it might start doing some funky stuff when it cycles through the events
okay, thanks again
yeah, no problem 
whats up
@viral patrol also said it was possible to get SE to show your current song playing on spotify
would you wanna help me do it?
Thats not something I am going to be able to help with. The way I understand that was done, you will have to host your own PHP script that will be used to call the Spotify API's. Once lx is around and sees your ping, he will be able to give much more detail into that

@rugged spindle if you want spotify bot command you need PHP hosting with SSL (as Stream Elements is over SSL) + a script I can provide you
Hey. I have been trying for a very long time to make an instant notification of a new follower, like a twitchalert and like your bot. How do you get instant information about a new follower? If I use api twitch tv/kraken/channels/CHANNEL/follows then there is a delay of 20 seconds before updating, which does not suit me. If you do not want to disclose secrets, then tell me, can this information be obtained from you?
You can make event listener in overlay editor to push actions to your endpoint
As @floral fable suggested, moving this here.
I added the Last Events Rotator posted in #widget-share and want to change the color of the label part (like "Latest Follower:") to a different color and make the name itself white. I can't figure out how to do this cause with how the rotator works currently, the last half of the label (So "Follower:" in the example) can't be a different color than the name. https://i.imgur.com/aU4MynJ.png
It would require splitting the event type label (like Follower) into a separate span from the event content (like name) but I know 0 JS so I have 0 idea how to split it.
If you want to have same style for both elements, just remove "span" from original code in CSS. Like that:
@pulsar willow โคด
no no @viral patrol
He wants "Latest Follower", "Latest Donation" etc... to be the same colour, but the variables to be a different colour
Ach. OK. Gimme a sec
@pulsar willow @honest bone https://jsfiddle.net/yLgm6032/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
It works
Thanks
Hey! To get the current sub points, is that a specific SE API or does Twitch allow me to get that data as well?
I think you can just iterate over https://api.twitch.tv/kraken/channels/[CHANNEL_ID]/subscriptions and sum sub_plan
we do have a total subscriber points widget
meaning theres a way to get it on our api
probably needs the jwt
Good day!
Can i somehow automate the purchase of a subject for points and Kappagen?
The viewer buys the item 'Kappagen' and automatically the widget works.
You can create two commands:
!item with response {redeem item}
!kappaitem for kappagen generation (with an alias item) and hide it
Change price of those commands (so people won't use !kappaitem nor !item just to show kappagen free of charge)
@spark carbon โคด
There is other way - create custom event list event listener and if there's item redemption, trigger call to API to invoke kappagen, but this requires more work.
Chat bot writes in the chat '!kappagen', but nothing happens.
I did not quite understand. How to give chat bot the privilege of a command '!kappagen'?
the bot doesn't see its own lines, so you can't get 1 command to trigger another
I got confused.
I did everything that wrote @viral patrol , but nothing works.
Maybe i made a mistake somewhere.
if I read this correctly you want that people can trigger kappagen, but that it should cost points? @spark carbon
Command item
bot response: {redeem item]
Command kappagen
command alias: item
So command !item will run two things:
- item redemption
- Kappagen event
@viral patrol , @green yarrow ,
I created 2 commands
What have i done wrong?
Excuse me. It seems very simple, but i really do not understand where i was wrong.
Now everything works, thanks.@viral patrol
No problem mate.
But remember, somebody without points will trigger kappagen
but won't redeem an item
@viral patrol I created the item in the store.
Let's say: A lot of emotes. Command !buy kappa
But the bot does not buy it. I want the notification to work after the purchase on the stream.
How can this be done?
okay... last time now...
Why doese it need to be a Store item?
whats the point?
If you want that the command cost loyalty points why not make it so the command cost something?
Wait. So you basically wanted to allow people to trigger kappagen for a price?
its fairly easy to make that in the command settings of !kappagen
I thought you wanted "buy an item AND trigger kappagen". For example "Buy a porsche and trigger kappagen show"
The viewer opens the store, and sees there everything that is available.
but kappagen isnt a Item and it will be super hard to trigger that since the bot doesnt trigger its own command
I can just point out there's such a team.
But I wanted to automate this.
As with music, you buy - it immediately turns on.
I realized that it would not work out with Kappagen.
you can make a store Item showing that Kappagen excists and show people how to use it and this will cost points
no one know immediately how to use SongRequests and thats also not a Store item I guesse?
make a informing Command like
!Commands
-Kappagen :200 points - Unlesh emotes on screen
-SongRequest: 50 Points - Use !SR Youtube URL to que music
-Test Command:40 Points - What ever this should do
ETC
Or put it into your pannels or something I think this will be easier for you to configurate
I understood you perfectly.
But i noticed how the purchase of items with audio was realized.
You buy - immediately the music plays. + Widget that shows who bought and what.
In the case of Kappagen, this will not work.
If the viewer goes to 'streamelements.com/vvv/store' then he simply can click on the buy button, this simplifies the whole process a little.
For me, this is a small problem, I just wanted to simplify it a bit.
Thank you all for helping once again.
@viral patrol i wasa wondering if you might be able to answer a question regarding the wheel of fortune alert you created?
I think I can do that in 12 hours as I have BBQ now
BBQ? what are you? murican?
@viral patrol
How can i fix this URL to work for me im moving from phantom bot to SE and this API is causing issues
$(customapi (encodeurl https://api.thetwitchapi.site/define?term=(echo)))
European actually. But not everyone is aware of grilling instead of BBQ
Chris try to provide pathencode on term with param instead of encode URL
im a noob... speak baby please
I am on my phone so this is hard to type
Gonna try copy paste
How can i fix this URL to work for me im moving from phantom bot to SE and this API is causing issues
$(customapi https://api.thetwitchapi.site/define?term=$(pathescape$(:1)))
Something like that
@round rampart How about you stop that!
Ch
ris 
@mortal wagon as I told. I am on my phone so it may be wrong
Search this channel for pathescape to get proper syntax
moVe* the : behind the 1?
Same responce :(
https://chrisis.live/s/0507181715_3.png
$(customapi https://api.thetwitchapi.site/define?param=${pathescape ${1:}}}
so that ?
$(customapi https://api.thetwitchapi.site/define?param=${pathescape ${1:}}}
Ah and opening bracket
${customapi https://api.thetwitchapi.site/define?param=${pathescape ${1:}}}
${customapi https://api.thetwitchapi.site/define?param=${{pathescape ${1:}}}
Let me help you...like so?
I see one too many brackets 
TY KeiZar
bad request @indigo flume
${customapi https://api.thetwitchapi.site/define?param=${pathescape ${1:}}
I hate typing code on phone
You can still use double ` right?
${customapi.https://api.thetwitchapi.site/define?param=${pathescape ${1:}}
missing dot and I'm not sure why so many brackets
Change Param to term in code
${customapi.https://api.thetwitchapi.site/define?term=${pathescape ${1:}
${customapi.https://api.thetwitchapi.site/define?term=${pathescape ${1:}}}
why so many brackets at the end 
Ok. Gonna get out of bed to my pc
@indigo flume so many brackets, because each opening bracket has to have closing one
${customapi.https://api.thetwitchapi.site/define?term=${{pathescape ${1:}}}

I know that for each opening you need a closing, but it doesn't make sense to me to have 2 opening at term=${{pathescape ${1:}}}
well if you are back on your PC(sorry for getting you out of bed
), then Chris is saved
peace out 
${customapi.https://api.thetwitchapi.site/define?term=${pathescape ${1:}}}
Here you are
so back to bed ๐
I can't count 
I just stretched discord a bit and saw my own mistake with the brackets

KeiZar look on second character of response ;)
Ignore me, I had discord squished so the entire thing was on 2 rows and I could not follow the start and ending brackets properly

@mortal wagon is it ok? I tested it but I want to have confirmation
@viral patrol im free whenever so feel free to DM me or in here when you are ready
Is it just me or do CSS animations for custom alerts show inconsistently in the editor? Sometimes there's a lag between elements, other times no. But so far the tests in actual OBS seem okay.
I just don't want to kill myself trying to perfect it if this isn't going to be an issue live
It is not just you, I have seen this before as well, I find it best to test the CSS for alerts in OBS
Thanks Kite, good to confirm!! Will continue to do so then ๐
I'm wondering if anyone can point me in the direction of using the SE api for the sub wheel of fortune points widget from #widget-share ....as I'd like the points to be added automatically.
Also, ever have issue's with the animation/points not firing off properly in OBS??
part in question:
4* ADVANCED USERS ONLY: If you want points to be automatically added, paste URL to your endpoint of SE API (ADCANCED USERS ONLY)
*/
let URL_TO_SCRIPT = ''; //Set value of this to your API man-in-the-middle if you want points to be added automatically. Request sent is GET URL_TO_SCRIPT?name=SUB_NAME&prize=PRIZE
@viral patrol โฌ i saw you were taking questions on it yesterday, sorry if it was rude to tag you
I have a "is anyone here" question. Anyone here great at working the chat bots to change color when certain text is posted? Thank you.
hi. You need a webhost account with PHP and SSL ( can be let's encrypt). Or local Apache server might work as well (as browser don't trigger protocol mismatch on localhost calls)
@foggy fulcrum
@viral patrol ok so it's nothing that just calls to the SE API on its own, it relies on a script in between.... Don't know that much about coding so likely won't happen anytime soon lol
Thanks for the response at least :)
Script in the middle is to not paste jwt token in overlay
About the /points/{channel}/{user}/{amount} Endpoint:
Do I see it correctly, that the API will not throw an error, if I deduct more than a user owns?
Wouldn't it make much more sense to throw an 400 Bad Request?
is there an api endpoint to add custom notifications for a stream?
I am going to answer yes to that, because I know there is one, but I don't know what it is xD
mainly because 1upcoin integrated alerts into our system through the api
hmm. maybe through /tips endpoint?
Hi, can anyone help me out with something?
I'm creating a "movie credits" type custom event list, and I'm trying to put data in the credits, but I'm unsure of a few things:
-
Is there a list somewhere that displays the variables that streamelements uses for javascript?
-
Is there a way to make it so that duplicate supporters do not appear?
for the first, there is a pinned message with that information. for the second, that would be something you set up programatically
Ah I see it, thank you
Is there any documention/endpoints with getting an OAuth token with redirect URi's and the whole nine?
As well as getting a
client_key or clientid and secret
not at this time, as I do not believe that oauth has been implemented yet, just planned
Uhhh, that sucks. I'm the president of Lumia Twitch and we've been tweeting with Streamelements for the past month or two. Now that we promised to finally implement Stream Elements into Lumia i'm just being told it can't be done at the time being?
There is a JWT authorization key that is used in the API, which other systems have used to integrate with our system. But as far as I know (and I will ask to make sure), oauth isn't possible yet
Yeah I guess we could point the users to manually get the JWT Token, but we really want to avoid manual things like that
It just opens up a lot more issues that could happen and will be directed to us. Please @ me when you get a response about the oauth
Does anyone have an api for doing simple math? i want to do the following equation: 150-$(channel.followers)
@lost holly Bot response ${customapi.http://api.mathjs.org/v4/?expr=150-${channel.followers}} should do the trick
you would have to use the API (in the channel header)
in the api docs
You can do it two ways:
- connect to api and refresh state of latest event - as SE API has no push
- create JS code to push every single event to your endpoint. for example pushing to http://localhost/newEvent/ with post params:
type=> sub,
amount=>3,
user=>MrBean,
message=>Great time mate,
tier=>2
But there is no ready to go solution for that, maybe converting alerts to SE environment would be easier?
@viral patrol thank you so much
@viral patrol thanks for the math API! That can be very useful ๐
Is there any way to send test events to the SE socket? I tried emulating events from the overlay editor but it doesn't go through. (I'm guessing it's only specific to the overlay link). Replaying the event from the dashboard doesn't seem to send anything either.
Triggering an event in chat like a redemption works fine, but it's a bit harder to test things like subs/resubs/cheers/tips.
Anyone up for some fun converting a SL Events list to SE ๐ (im a noob and still learning).
Maybe a noob question but when using custom CSS and testing the event on for example follower {name} in the html doesnt get replaced by the name of the testsubject. Should I use some other variable?
{{name}} i think @quartz gull
awesome, that works ๐
another question, can you link to a remote .css file instead of having to edit the css at every alert (for easier updates in the future)?
@viral patrol do you know?
You can. Check pinned message for details
cool ty
Can anyone help me my chat commands is replying the same message like if i set points its not mentioning the user name when asked in live but its saying only user
Bot response should be like @${user} has ${user.points} ${pointsname}
Been having words with Scalper About the possibility of Editing watch time Scalper thinks there is a way through the API, as he saw something about it a month or so ago Anyway of doing such thing? ๐ค
I'm having an issue using the API to pick a winner of a contest. I'm getting the correct "Created" response, but the winner is not being chosen
Nevermind, Camel Case strikes again (winnerId not winnerID)
Hi, can i ask for some help in javascript here ? or maybe not ? ๐
Of course you can
Anyone available for hire who does HTML & CSS ??
Right now this is my intro using SE but i dont like the slideshow styled animation, Im after somehting more fluid
http://chrisis.live/s/1531854214_3.gif
hey guys whats the escape character to use parenthesis without them being recognized as an arg? im trying to go to a math api and use a log function but the command does not like the () on either side of my argument
@dusk trench Try this ${customapi.http://api.mathjs.org/v4/?expr=${pathescape ${1:}}}
Oh... Wonderful...
${customapi.http://api.mathjs.org/v4/?expr=${pathescape ${1:}}}
Fixed
${customapi.twitch.center/customapi/math?expr= log( ${1}/${user.points} ) / log(2) } is my command
i need the parenthesis around the log
Would you happen to know the answer to my question @viral patrol ?
Help, i cannot find the message pertaining to bit boss custom coding.
What happens when you search this: from: lx#9027 in: #developers-api boss
Who me?
yeah
I don't know how to search
it is a very important thing to know in life:
I get 28 pages worth of results


