#dev-chat

1 messages · Page 23 of 1

indigo flume
#

Let me transform it for you.

craggy ermine
#

Thank you so much

indigo flume
#
let name = '{{name}}';

nameChecker();

function nameChecker(){
  if (name == "keizar"){
    document.getElementById('amountHolder').style.display = `inline`;
  }else{
    document.getElementById('amountHolder').style.display = 'none';
  }};```
#

Just note, that this is my html:

<div class="sign-text">
  <p>
   {{name}} <br>
    has just subscribed<br>
  <p id="amountHolder">for {{amount}} months</p>
  </p>
</div>```
#

so it will show/hide amountholder div based on the name, but you should get the idea behind this

#

you can show/hide an entire div you want to

craggy ermine
#

and the js one comes with it too

#

or that was for the resub

indigo flume
#

just copy paste the JS part I quoted above and change the name to theirs

#

but in the sub alert

#

or the variation sub alert

#

and make sure you make a <div>/<p>/<img>/<video> for what ever you want to show

#

and add the ID of them to the show/hide parts of the JS

craggy ermine
#

I see

#

I will try it out thanks alot SEheart

craggy ermine
#

Is it possible to make the gif from follower alert smaller ?

#

im not using custom alert

#

it's just a gif

midnight orbit
#

resize the alert widget in your overlay?

craggy ermine
#

but all the alerts will resize then not only the follower right ?

#

and for the sub I'm using a custom alert

floral fable
#

You would either have to use separate alert widgets then, scale down the source, or use custom css for that alert as well

craggy ermine
#

how do i use separate alert widgets ?

floral fable
#

you create a new alert widget, and then just make sure you dont overlap what alerts are set in the different widgets. I personally use 2 alert widgets, one for most the alerts, and then one only for cheers so I can have it on a completely different area of my screen

craggy ermine
#

and can you use like 1 widget for every alert ?

#

just for the position ?

floral fable
#

I would not recommend using a separate widget for every alert, it might get wonky with that many in one overlay

glad root
#

So i looked through the pinned messages, and I cant find any information on how to access the 'obj' object that gets passed into the functions for the custom widget.

#

i'm assuming its the json data from the twitch api.

glad root
#

my main question is "am i able to access that obj outside of the streamElements editor?"

cinder lintel
#

my question (might not even be the right one) is what is your end goal

glad root
#

testing my code in a separate environment. the code i want to work with is like 200 lines long, its hard to manage on the tiny window we get in the editor.

cinder lintel
#

ahh

#

@viral patrol might be able to answer that with how he handles it. He has made quite a few cool widgets so far

indigo flume
#

@glad root Its best to use an external editor like Visual Studio Code

#

when you think its working, just copy paste it

#

If you want to debug the JS, just make an html tag and append text/result to it tosee whats going on and use the console for any undefined stuff

#

the built in small editor is not meant to be used like a normal editor for code

glad root
#

oh for sure, the issue i was running into was when i would copy from streamElements to my editor, the code would stop working. I'm assuming its because the stream elements has backend code that isn't accessible. like defining the obj object that gets passed into the functions. so my editor is missing that and thats what causes it to stop working.

indigo flume
#

Well if you can manage to connect your editor to the twitch API, you will have to make your debugger ask for an event, or more like your debugger to simulate an alert in JSON format and pass it towards your OnEventReceive event

#

which of the 3 is not defined in your editor and which editor are you using?

glad root
#

i assumed it was 1. since i'm not passing any data in to pull things like details and event from. so its not really listening for anything

indigo flume
#

Well you will need to call the event in your editor if you want to simulate an event and pass it 2 arguments I guess

#

I'm not sure how event handling is done in JS, as you can define a function in the arguments it can take really

#

but I've had no issue my self declaring all 3 like that

#

and processing alerts or events in the editor it self

glad root
#

hmmm ok, i'll keep trying things.

#

thanks for your help!

indigo flume
#

I may be understanding it wrongly as well and most like LX will poke you tomorrow if I'm wrong or something to add

wooden ledge
#

@indigo flume hello just a quick question how do i go about getting an api invite code? :)

floral fable
#

wut The API is open

#

Thats the mobile app, has nothing to do with API

wooden ledge
#

Oh sorry my bad am i in the wrong section for this ?

floral fable
#

completely wrong section, API = Application programming interface

zenith folioBOT
#

@wooden ledge The app is currently in closed beta, and is expected to be available to the public by mid October.
If you'd like to assist with beta testing, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

wooden ledge
#

@floral fable iv filled it out hopfuly i can get in

median hatch
#

hey guys. I've been doing some vague research into this and have a question. I'm attempting to build a command (not an widget event) but a command that users can poll to check how many bits they have cheered total.

Now, some of you may ask, why. well. I like to be through and this will help me in the future to have it at least accessible via commands.

I have two thoughts, and no leads so far. First thought is the stream elements extension leaderboard. That leaderboard has all the bits cheered since my first day, I just have no idea how to access the data.

I assume it's done though this twitch api .../api/reference/#get-bits-leaderboard but again, I'm not sure how I could use the twitch api within custom commands. any thoughts, questions?

#

I mean, strictly speaking, if the custom commands where on point, I could be able to poll any of that data with one or two commands. #LifeGoals

graceful wharf
#

Someone from Helpdesk-Twitch suggested I post in here. I purchased a Streamlab based alert package that I'm looking to transfer over to Streamelements. Everything works but the tips alert. I've reimported and verified that it works on streamlabs but doesn't work on streamelements. any suggestions?

indigo flume
#

Which alert package did you get?

graceful wharf
#

the Uplink one from NerdsorDie

indigo flume
#

@viral patrol Can you help the guy out ⤴

viral patrol
#

Can you poke me in 2 hrs? once I get to PC I will check it out

viral patrol
#

OK. Dmed @graceful wharf -

#

I think that if other types of alerts are working, this could be a simple issue 😉

verbal lotus
#

Hey. Quick question. Can I create fully custom website hosted for example on github in which i insert data from StreamElements to create overlay?

indigo flume
#

Its not advisable to have w/e you want to process hosted on Github as you will have to have it publicly open.

verbal lotus
#

Github was an example. I mean - can i create website which will be injected with data from stream elements - for example new follower apeared

indigo flume
#

Well it would be better to process new follower/sub/tip data directly from Twitch's API if you ask me.

#

I don't see the alerts open via our API

cinder lintel
#

Possible, yes. our very website is built on our API. Best practice is what Keizar said though

nova parcel
#

hey is there a way to get the name of the streamer's loyalty points from the api?

low sierra
#

the current and work in progress dev docs are in the header of this channel

nova parcel
#

ah ok perfect thanks @low sierra, i was looking at the points category oops

rugged spindle
#

hey I'm using a custom event list to cycle through recent subs, follows, etc

#

and I got my first tip yesterday and ever since then when it shows the last person to host me, and how many viewers they hosted me with, instead of the number it shows the last person to tip

#

the code reads as

*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"];
} 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]='Donation: '+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"];
arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
arr[3]='Donation: '+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 looks like this

#

I'm pretty new to coding and I didn't actually write it, @viral patrol did for me

viral patrol
#

Hi, just fix one part of it:

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"];
  arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
  arr[3]='Donation: '+data["tip-latest"]["name"]+'  $'+data["tip-latest"]["amount"];
  arr[4]='Host: '+data["host-latest"]["name"]+'('+data["host-latest"]["name"]+')';

});

Then it should work properly

#

@rugged spindle ⤴

rugged spindle
floral fable
#

arr[4]='Host: '+data["host-latest"]["name"]+'('+data["host-latest"]["amount"]+')';

rugged spindle
#

thank you @floral fable

viral patrol
#

I am so blind.... This is why one should not code if you can't check it

chilly parcel
#

Hey, is there someone who could help me ?

north nest
#

@chilly parcel post the question

chilly parcel
#

I'm trying to count all donations from my channel but problem is that in my channel are no donations. Is it somehow possible to add fake data ?

spare reef
#

Hello is it possible to pull all followers from JS (obj,detail) I only get those they are in recent. I am editing Credit Roll for your Stream End scene widget.

indigo flume
#

recent data unfortunately is only capped at the last 25 of each event.

#

so we can't get a full list or X amount past 25 recent followers for your channel. This is to prevent something internally for our system, most likely to not use a lot of data storage, even if temporary

viral patrol
main tinsel
#

Can a guru help me ? Just recently swapped over from Streamlabs , but i used the glitch package , and ive tried copying over the stuff from the jsfiddle but the sounds just arent working . As you guys have a cloud i really want to make this work .

viral patrol
#

Of course. What part of Glitch are you looking for?

#

Alerts?

#

Oh. if sounds it seems like alerts

#

Just download mp3 file and set it up as alert sound

main tinsel
#

thats the problem i cant find them, gone through all the files i have , i think the actual sound is connected to the animated image . im so confused . all this code is new to me haha ^^

viral patrol
#

Can you paste me, what you have on DM?

obtuse summit
#

Hey, i'm having trouble with the api can someone help me ?

#

I give every required fields, the authorization bearer and the channel after tips but the api returns me an error:

#

{"statusCode":400,"error":"Bad Request","message":"child "amount" fails because ["amount" is required]","details":[{"path":["amount"],"message":""amount" is required"}]}

#

But amount is given in my post data and is not null

arctic crane
#

Have you double checked the payload schema to make sure you are sending the request in the correct format?

obtuse summit
#

yes i'm sending it in postfields

viral patrol
#

I think it should not be post_fields but JSON object

#

But I am nowhere near pc now.

obtuse summit
#

Ok i'll try to find out ty

obtuse summit
#

I resolved my problem ty, the solution was to json_encode and specify json type in headers

rugged spindle
#

hey @floral fable I replaced the code with what you gave me and it makes everything go blank.. I'm headed to sleep right now but I'd really like to figure it out tomorrow! thanks in advance

#

I'll pm you the JS section again if you want to take another look

indigo flume
#

I'd suggest to use tripe ` to style the code snipper you want to quote.

#

there we go, fixed the style

near vortex
#

Not sure if this is the right channel for this question but i was wanting to know if its possible to export loyalty data for my viewers from streamelements?

indigo flume
fallow rune
#

hey all , is there a way to plug the donation in a html / PHP webpage? (donations, donation goal ect..ect..)

viral patrol
#

You can get all data from tipping endpoint, so you can set up your own donation goal (for example on your website)

mortal wagon
#

could someone make this for me (I just need the text in a custom event)
If someone could do this for me ill send $10 paypal SEheart

http://chrisis.live/s/1537777623_8.png

I'm after 2 "Custom Events" one for subscribers and one for Tip's with the layout

(Username) * (amount) < Tip

and

(Username) * (count) < Subscribers

The * Will be a bullet point that id like the ability to change the color of, So they MATCH the icon iv got before them like this.

rugged spindle
#

wait like this

#

yup

zenith isle
#

Is it possible to authenticate for websockets? I see the docs around websockets but nothing on how to authenticate and get a token.

#

Never mind

knotty holly
#

I need early access code please

#

I really want to try stream elements in mobile please

vapid iron
pulsar willow
#

Hello

#

İ want to try android streamelements beta, does anyone have code? Thanks.

zenith folioBOT
#

@pulsar willow The app is currently in closed beta, and is expected to be available to the public by mid October.
If you'd like to assist with beta testing, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

pulsar willow
#

Oh thank you @floral fable

floral fable
#

Also, this channel is for support for developers, that use the API and develop custom widgets and alerts

pulsar willow
#

İ know but since i couldnt see anyone other channels i try to look here

#

But thank you so much for caring me

#

Have a nice day @floral fable

floral fable
#

There are always people watching all the channels deIlluminati peepoDetect

pulsar willow
#

@floral fable good to know hehePepeLaugh

indigo flume
zenith isle
#

Hi I'm noticing that I don't get events like host or follow when connecting to the websocket. Would anyone know why that may be happening?

#

I do see events for cheer and tip though

zenith isle
#

Is it because those events aren't supported via websockets right now?

indigo flume
#

Won't it be better to subscribe to the Twitch API's webhook for hosts/raids and follower?

#

Just tossing it as an idea, because I'm not familiar with webhooks and webhooks towards our API.

zenith isle
#

I'd like to use one consistent place for that and being that I can't capture tips via the Twitch API I've chosen to go with this

indigo flume
#

Twitch doesn't handle tips anyway and they don't track them anyway, so I understand. Well I'd suggest to wait an answer from someone who knows the answer to your above question. I know there will be a person who will pop in 😉

zenith isle
#

ok sounds good. thanks for your responses @indigo flume

zenith isle
#

Anyone know about my question around events in websockets?

zenith isle
#

@indigo flume do you happen to know someone that's familiar with the websockets side of things?

indigo flume
#

@static wigeon

#

This big boi

zenith isle
#

I'm gonna be talking about this stuff/showing it off in my session/panel at TwitchCon and could really use some support to iron things out

#

Ok cool thanks 😃

zenith isle
#

Oh I see or maybe @gusty turret ?

indigo flume
#

Styler is the one who has written the API so far and has documented it, so 🤔

floral fable
#

Perry is not a dev, he is just the boss man

gusty turret
#

I'm not that kind of orc

zenith isle
#

ah ok gotcha

static wigeon
#

I'm here what's up?

#

@zenith isle I'm here for any questions you have pepeFix

zenith isle
#

Hey @static wigeon thanks for getting back to me

#

I'm noticing that via websockets I'm not seeing events like follow or subscribe being captured. However I am seeing events like tip and cheer. Would you happen to know why that may be happening? Do websockets not support those events yet?

static wigeon
#

Ehm.. the websocket should emit all events you receive

#

Do you see these events in your activity feed?

zenith isle
#

yes

#

I had a breakpoint in my code to capture it being triggered and people in the stream to test it out (such as host). Breakpoint was never hit except for tip or cheer

#

I'm planning on starting a stream in a minute to continue work on it. Maybe that will help show what's happening?

static wigeon
#

I mean i can throw a few test events your way to see if it triggers

zenith isle
#

Is there a way to do that from the emulations?

static wigeon
#

What event are you listening to?

zenith isle
#

same as the sample code shown in the websocket docs 'event'

static wigeon
#

I'm sending a test event your way.

#

Let me know if you see this follow event

zenith isle
#

I see the follow came through but breakpoint was not hit

#

Am I possibly connecting to the socket incorrectly?

#

Just seems odd some events are triggered via sockets and others aren't

static wigeon
#

From what i see here it looks correct.

#

I'll try to dig a little deeper in around ~10 minutes.

#

Just wrapping up some stuff

zenith isle
#

ok thanks

frozen plinth
#

im dev a game

languid escarp
#

hey there im having a bit of a coding problem for my alert rotator widget if someone could assist lmao

indigo flume
#

What is the issue you are facing? I assume you are using the rotator widget from #widget-share

languid escarp
#

yeah so im using the same widget but in two separate sequences. on is the follow/sub/dono/bitt words as purple color and then the other widget acts as the names of the corosponding action +data as another color. For whatever reason my data keeps showing up as NAN for all data in every action i can send a picture if easier

indigo flume
#

give a jsfiddle link of your code

languid escarp
#

jsfiddle link?

indigo flume
languid escarp
#

like this?

indigo flume
#

Mmkei, I'll take a look in a bit.

languid escarp
#

thanks a lot haha

viral patrol
#

This is a reason

#

this "+" before text, JavaScripts tries to add that to current value, but in that form that suggests it is a number to be added

indigo flume
#

I was gonna say that the original code had integer + there, but then i looked it doesn't directly thinkies

candid crypt
#

Hi! Can you give me invite code for android application?

indigo flume
#

Not the right place to ask but here:

zenith folioBOT
#

@candid crypt The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

mortal wagon
candid crypt
#

Thank you

languid escarp
#

@indigo flume so what should I add to the code? I'm still learning this stuff atm Haha

indigo flume
#

@languid escarp as LX pointed out you have left out the plus from the original code. Remove the plua thats infront of the data. He also linked you the fixed variant.

languid escarp
#

okay so now that ive done that. For whatever reason my subbscriber data is all undefined

#

everything else is good though

#

Actually. To make my life a bit easier, is there a way to make different parts of the rotator different colors? Like have where it says "Subscriber, follower, bitts, etc." as one color and then the name or "data" as another color all in one code? @indigo flume

#

ebcasue right now im rocking two separate codes and at radom times they seem to not match or lose timing with eachother randomly mid stream lol

indigo flume
#

You've deleted something important for the subscriber

languid escarp
#

ill send the code again

indigo flume
#
arr[1]= data["subscriber-latest"]["name"] + '('+data["amount"]+')';```
languid escarp
#

okay so i literally just copy and psated that in there and the name of the sub is up but the amount is still undefined

indigo flume
#
  arr[1]= data["subscriber-latest"]["name"] + '('+data["subscriber-latest"]["amount"]+')';
#

well i noticed it was missing on the other bit as well

#

as for each one having different colors, I will need to take a look at it more indepth if it can, but it should be able to

languid escarp
#

that did it! haha

indigo flume
#

maybe @viral patrol can pitch in in the mean time as its his widget 😛

languid escarp
#

okay gotchya. I was just curious to see if that was a possibility rather than using twi codes cuz its kinda rough to make em time correctly lmao

next heron
#

I think I've just discovered that the problem I'm having is that the webm shows only when the muted setting is true, which I think has to do with chrome's newer versions. Boo.

#

Is that the case? I'm tinkering with the custom CSS on an alertbox, looks like the video only shows if muted is set... without, no video at all. Is there a workaround?

cinder lintel
#

I believe so (to the chrome thing)

#

I remember seeing other people having the same issue

next heron
#

I'm imagining the workaround would be to set an alert sound to replace the missing audio from the webm? Although they might end up out of sync

#

Yeah, that seems to work after a fashion.

#

... until it doesn't. Lol. After a point both the webm and the alert sound play together.

#

Doubles up

mild cipher
#

@next heron I think apparently that's only in the overlay editor, but it doesn't apply or affect the OBS browser source, so maybe give that a try

viral patrol
#

+1 - autoplay unmuted policy doesn't work in OBS, so there is no need to interact document before playing a video, ergo - It will work 😉

burnt shell
#

hey is it possible to query the streamelements api for the top donators for the last 30 days instead of all? Is there somewhere a code example to this?

indigo flume
burnt shell
#

Jeah i would like to do a small toplist of 5 inside a fade effect let me take a look into

#

hmm, maybe i should be more in details what i would like to do. That are single donation but i would like to have the top in month per user (5 user)

#

With that api i would need to parse it inside a database and try to re- calculate the 5 in months with the amount they spend

#

so a i need a montly leaderboard

indigo flume
burnt shell
#

i guess not because there is no limit parameter or parameter monthly i guess i can't see something in the documentation

indigo flume
#

@static wigeon Can you help with this one?

burnt shell
#

@quaint swan Well i redirect this to you as dev :x

quaint swan
#

tips__channel__leaderboard_get won´t be a solution as it ends in {"statusCode":403,"error":"Forbidden"} ^^

indigo flume
#

I poked our main big boi dev who was written the API, so he will be able to help you solve your query visual_studio_2017 Clap

viral patrol
#

I think the one way of making it is to iterate over return from /tips as /tips/leaderboard seems to be abandoned

quaint swan
#

any options on /tips/top to limit the results just as /tips/{channel} has the option?

thorny pine
#

i want to add the C and sunrise and sunset to widget and it just wont go
it is currently in F i want bpth to be fair to those that us C
i been at this 7 am now almost 9 pm

#

why cant i write this weather widget thingy ?

#

no i am trying to write my own HTML , CSS, JS code for it

vapid merlin
#

@burnt shell there is a way, sec.

#

GET /activities/<channelId>/top?type=tip&period=months

#

you can also add &limit=5 to get the top 5

quaint swan
#

Well try it, sounds good so far

burnt shell
#

@vapid merlin Thanks we try it

brisk stream
#

I don't know if this is the right group. I tried to add a command with regex but it doesn't work. On the RegExr website it works perfectly but on others it doesn't. Here the link: http://regexr.com/41k9m

^(?=.*(Hi|What's Up))(?=.*Lauren).*$

I don't understand why the command doesn't work. Can anyone tell me what the problem is?

RegExr

RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).

viral patrol
#

The one you pasted can cause several issues.

#

I would do something like: ^((Hi|What's Up) (Lauren)|(Lauren) (Hi|What's Up))

#

@brisk stream ⤴

brisk stream
#

@viral patrol I tried that example at the time, but only 100 characters can be used and it limits me a lot if I have to duplicate the words twice.

#

That's why in my example, it only comes out once. I can use more words in any order.

viral patrol
#

Maybe removing part with end of line could help

#

(?=.*(Hi|What's Up))(?=.*Lauren).*

brisk stream
#

I'll try

viral patrol
#

Oh, Start of line could stay, so ^(?=.*(Hi|What's Up))(?=.*Lauren).*

brisk stream
#

It doesn't work either way.

#

I don't understand.

#

I think I'll have to do it in two commands. But I don't like the idea.

viral patrol
#

Huh. I see that lookahead is a problem, I tried (?=.*Hi).* and it didn't work as well

brisk stream
#

And it doesn't work with Streamelements regex, but it does work with others. It's something I don't understand.

low sierra
#

We use golang re2 which does not support lookahead

#

I recommend using regex101 and select golang on the left

scarlet bluff
#

hey, in the twitch marathon extension am i working with seconds or minutes? it says seconds, but at donos it states it's minutes so i'm confused

viral patrol
scarlet bluff
#

@viral patrol in what way is this updated?

viral patrol
#

There is no white bar and it is updated to latest jQuery countdown plugin

scarlet bluff
#

@viral patrol am i working with seconds or minutes? i'm kind of confused because it's called folllowerseconds and such, but at dono it states its minutes

viral patrol
#

Huh. I am pretty sure it is seconds added after each event

#

You can test your setup with test events under bell button on bottom left corner of editor

vapid merlin
#

Nice Avatar @scarlet bluff

ripe ember
#

Hey, is it possible to set in the live events, that only hosts from 1 viewer will be displayed?

viral patrol
#

Of course you can add a condition checking a hoster name before pushing it through

ripe ember
#

Where can I find it?

viral patrol
#

Huh. I am on my phone now. I gonna be near computer in 9 hrs (almost asleep). Can it wait until then or are you in a rush with that? In that case I could get off bed and switch my computer on.

ripe ember
#

No, i can wait

viral patrol
#

Ok. If you can, please poke me some time later so I have a notification waiting.

ripe ember
#

okay

scarlet bluff
#

Ty @vapid merlin pepeL 🚬

viral patrol
#

@ripe ember if you are talking about custom event list: http://jsfiddle.net/cuxg98n6/3/
Just change both occurrences of if (includeHosts && minHost<=event.amount){ (lines 37 and 82) to:
if (includeHosts && minHost<=event.amount && event.name==="UserName"){
Where UserName is a person you want to include

midnight orbit
#

@viral patrol thanks, but psykonator meant that he wants to filter out hosts below 1 viewer im the custom event list.

viral patrol
#

Oh, so this solution without any changes can make it happen

#

I was sure he wants to show hosts from 1 person only

#

So @ripe ember you can create "custom widget" and copy code from link provided above, where you can modify parameters

midnight orbit
#

Thank you lx! SEheartbeat

olive pollen
#

Hello :) is it possible to get an early acces key for the app ?

zenith folioBOT
#

@olive pollen The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

tepid zodiac
#

is a streaming API for events planned, much like streamlabs has one? 🤔 would make integrating with my software a lot easier and save me the polling for new donations...

indigo flume
tepid zodiac
#

that API requires me to poll for new events over and over again

#

and keep track of which elements i already dealt with locally

#

what I'm talking about is a websocket I can connect to that streams events to my software as they happen

#

which saves me the polling and the local state

#

and has the benefit of my software not being delayed compared to the actual on stream notifications provided by streamelements

indigo flume
#

I think you can use webhooks on our API

tepid zodiac
#

webhooks require me to run at least a minimal server in my software, which is what i want to avoid

#

the software runs locally on the PC of the streamer

#

but if webhooks already exist, it should be trivial to also provide websockets 🤔

indigo flume
#

I think that @static wigeon will be able to help you on this, for websockets if possible.

#

His the person who wrote the API, so I'd suggest to wait on his reply. Hopefully he is still around before going to TwitchCon monka

tepid zodiac
#

i'm in no rush either way danYes

#

but as more and more people switch over to streamelements from streamlabs, it becomes more important for me to also integrate with you guys 😉

indigo flume
#

If he doesn't reply soon, then hopefully someone more knowledgeable can answer you or after TwitchCon poke me again to poke him again.

tepid zodiac
#

will do, thank you danYes

#

appreciate the quick response a lot 👏

indigo flume
#

Sure, trying to help to my best of knowledge here - simple web dev things are my thing.

wide wing
tepid zodiac
#

ooooh, indeed danYes thank you!

wide wing
#

No worries 😄

tepid zodiac
#

what endpoint would i use to get the needed JWT?

#

can't find it in the documentation

twin ore
#

JWT is manually obtained from your account.

#

!jwt

zenith folioBOT
tepid zodiac
#

is there no other way to get it? through an oauth2 login or similar?

#

seems inconvenient to have to send my users to a website so they can copy/paste that token into my app 🤔

#

plus it's always a trust issue to have to instruct them to paste some token clearly marked as a "secret" into an external app

twin ore
#

Well, that token pretty much grants complete control over the account and information. It's a security thing.

#

No other way to get it.

tepid zodiac
#

but you see how "please paste the token that's clearly marked as SECRET and gives me full control of your whole account" could be a trust issue?

mild cipher
#

Oauth2 implementation is a work in progress I believe. No ETA on it.

low sierra
#

It is a work in progress

tepid zodiac
#

are we talking about 1, 3, 6 or 12 months, tentatively?

#

just to have a general ballpark

twin ore
#

As was mentioned, there's no ETA.

tepid zodiac
#

alright

vapid merlin
#

@tepid zodiac you can also use the api key, which has only read access to specific events stuff on the account, not complete control

#

change the method to apikey

stiff pecan
#

Hey guys, I'm looking to develop a website that is connected with the loyalty point system, but I need some help with the process. Is there someone available and interested to help?

fleet sky
#

trying to help a friend develop a quick and dirty custom integration. in the developer api the path required a channel id -- 24 character hex string... Where do I get the channel ID from?

finite heath
fleet sky
#

Thank you. I'll have channel owner get that for me.

viral patrol
#

Also if you want universal method, just call /channels/me with your JWT token and you will receive that on return

fleet sky
#

Thanks, still need the channel owner for that (when they wake up). Started this assuming that read-only operations for basic info might not require authentication.

viral patrol
#

So for getting just channel ID you can go to https://api.streamelements.com/kappa/v2/channels/[CHANNEL_NAME]

fleet sky
#

WONDERFUL. Thank you so much! That works! Now I just need to get the jwT Token (which acts like a piN Number at an atM Machine 😁 ). I can keep working with the example payload for now.

#

appreciate it greatly

viral patrol
#

What language are you going to use, to play with our API?

#

@fleet sky ?

fleet sky
#

Well it's a really simple project (when someone redeems a store item go to discord and issue a command) so was likely just gonna be lazy and make a cron job to periodically poll with a python script. If I felt more ambitious or I get more time I'll integrate it straight into the bot using node

#

First thing I went looking for was to see if there was already streamelements->discord integration of any sort.

viral patrol
#

Oh. I know those simple projects. 2k lines of code after "I should refactor it"

fleet sky
#

lol

#

I'm lazy when it comes to charity projects. i might even do it in bash if I can figure out a sane and easy way to make sure I only credit each redemption once.

#

but createdAt is a string rather than a timestamp which will make bash comparisons for tracking latest redemption a pain.
Python it is.

viral patrol
#

bash: date --date='date string' +"%s"
for example date --date='2018-10-25 11:22:33' +"%s"

fleet sky
#

😄

#

Thank you. Now I can just track last redemption. i guess only concern is multiple entries at the same time ... but the stream is small so doubt it'll be an issue. Or could i use _id? Is that hex value guaranteed to always increment or just guaranteed to be unique?

viral patrol
#

_id is unique, so no worries they are repeated

fleet sky
#

i figured that. Just being lazy again and hoping it was also guaranteed to increment so I would just have to track the one value rather than all redemptions i've processed.
Just nitpicking now though. Should not be an issue tracking even if there were thousands of redemptions.
Thank you for the assistance.

viral patrol
#

You can store latest timestamp then iterate over newer

#

I think that could do the trick

fleet sky
#

Got JWT token from stream owner. but it doesn't seem like /store/redemptions is returning all redemptions. I'm only getting 9 right now and it's all for the same item.

#

ooooooh. NM. had to set pending=true to find the rest

dense herald
#

Shoutout to the SE folks at Twitch Dev Day today

agile solstice
#

Hi! I love stream elements and I thought maybe yall would have an app for it. You guys do and I was so excited.. until I found out I needed an access code. I was wondering if anyone could give me a code possibly. I'd definitely test out to good use and let yall know what I think nd what I think the pros/cons are. If not it's ok. I still love your site! awesome!

zenith folioBOT
#

@agile solstice The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

shell yacht
#

I filled 1 out

tepid summit
#

I need a invite code

zenith folioBOT
#

@tepid summit The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

obtuse summit
#

Hi guys, i'm having an issue with the api, can someone help me pls ?

#

And i'm giving the good arguments like the amount, currency in json format by POST ... And my JWT Token is in the header and is working but i'm having the following error message :

#

{"statusCode":403,"error":"Forbidden","message":"No channel authorization found"}

viral patrol
#

It should look like

#

{"currency":"USD","payFees":true,"user":{"username":"lx","email":"test@example.com"},"amount":11,"message":"123123 123 123 123 12","imported":true}

#

And if your JWT token is correct it should work

limpid raft
wise idol
#

is there a list of (and example responses) for events you get with a websocket connection? looking for donations specifically nam

mild cipher
#

@wise idol I think you can POST yourself a tip and then log the response? Or you could listen on event:test and send a test tip from the overlay editor, but I think the structures are slightly different

#

There's also a list in pinned messages, it's for the custom widget but the event names are the same I believe (without -latest)

crude swan
#

Hey everyone, new here.

I am tinkering around with custom CSS/JS and just getting the hang of things. Right now I am editing the default code and trying to make a widget that would just handle new followers only. One part I'm stuck at or confused with is audio playing. Is there a special way I need to implement audio or should I just be doing that straight through JS? As far as getting a reference to audio, at some point I would have to feed in the location of the source file. Is there a general web host or way I should go about hosting my audio source files somewhere for streamelements to then pull in? Do they just need to go on a publicly accessible host or is there a way to upload my sounds to streamelements and then tell the code to pull those source files? https://jsfiddle.net/1m2jaknx/2/

Thanks

ocean narwhal
#

So I'm reading the custom code manual, but I have a feeling I can get a more straightforward answer by asking since this seems like a common issue: Is there a way to display an alert from something other than SE inside the SE Overlay as a custom CSS widget? I am getting a 'no cookies' when using iframe.

viral patrol
#

@crude swan you can upload audio to Stream elements and then play it. It should appear in "Network" tab of "Developer tools" of your browser (to make it easier to find, filter out media files)

#

Then just add url of that

#

And the code... let me check

#

Also - remember that sound won't be able to be played within Overlay Editor (no autoplay policy and custom CSS widgets are nested)

#

@ocean narwhal if you create your own listener then yes, but AFAIK you wont be able to use <iframe> within "custom widget"

ocean narwhal
#

I've gotten it to show up with allow-same-origin but allow-scripts kills it again, so I'm trying a lot of random stuff so I can use outside sources.

viral patrol
#

You can use XHR calls to something outside to be invoker of your custom widget alert

crude swan
#

awesome thanks @viral patrol !

ocean narwhal
#

I can always just run a separate source but I prefer to have it combined since I have other streamers, so I appreciate the direction @viral patrol

viral patrol
#

@crude swan however sounds in custom widgets will work in OBS as this policy is disabled there

crude swan
#

That just means I need to test with my OBS open to hear any sounds when testing? Not a problem at all.

#

Thanks a bunch. Having that example code is all I needed.

viral patrol
#

Good luck mate!

crude swan
#

@viral patrol Thanks again. Just got audio working triggered on a css animation end.

pulsar willow
#

can any of the devs give hmu with a document detailing the random number algorithm used for stuff like giveaways or other rng uses please?

fleet sky
#

FWIW last night I tried to use the api to create a new command and kept getting

{"statusCode":400,"error":"Bad Request","message":"child \"command\" fails because [\"command\" is required]. child \"reply\" fails because [\"reply\" is required]","details":[{"path":["command"],"message":"\"command\" is required"},{"path":["reply"],"message":"\"reply\" is required"}]}

Even when I tried using the example payload from the documentation.

I gave up and had to create a placeholder command via the chat bot's !command add functionality and then edit it.

#

☝ the endpoint that wasn't working

viral patrol
#

@fleet sky if you want to know, how should call look like, go to dashboard, commands, add a command while inspecting "network" tab in developer tools. You will see two requests made (OPTIONS then POST/PUT). Click RMB on that request then Copy => Copy as CURL

#

Then paste it to editor of your choice

#

So you can know how should that request look like

#

This error is because your JSON payload is wrong.

fleet sky
#

I'll do that.
Did want to point out then that the example payload is also wrong 😄

viral patrol
#

No. It is OK.

#

But it seems like you sent it as form_data element called "command"

#

It should be JSON object as payload

#

Just checked and created a command with that:

{
  "accessLevel": "250",
  "type": "say",
  "aliases": [],
  "keywords": [],
  "regex": "",
  "reply": "this is a test",
  "enabledOnline": true,
  "enabledOffline": true,
  "hidden": false,
  "cooldown": {
    "user": 15,
    "global": 5
  },
  "command": "testing"
}
fleet sky
#

hmmm. odd. I'll try it again tonight. Thank you for that.
I have one other question -- is there a way to call a custom api (${customapi.http:// ... }) when a redemption is made from the store using points? Will using the custom api syntax in the description work? (hesitant to try it)

lyric dune
#

Hey guys - So Nightbot has a command for steam - basically, it grabs the current status of a steam profile, the game it's in, and the server IP (if applicable)

#

Would anyone know how to do something like that for the SE bot?

tardy dirge
#

Hi, Does Anyone know of a custom api link that basically can count down from 10 - 1 for chat commands??

viral patrol
lyric dune
#

@viral patrol Alrighty that definitely looks.. right. I should note that I have absolutely zero experience wiiiiiiiith any of this. Moving from Nightbot, just looking for a way to get the same effect.

viral patrol
#

Ohhh. So if you are not into programming, this will not be an easy-go

viral patrol
#

@tardy dirge can you explain it a bit?

wide wing
#

Is there a good way to test an event listener via the SE webhook?

dapper wren
#

I need early access code for Streamelements mobile app

zenith folioBOT
#

@dapper wren The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

tardy dirge
#

@viral patrol i emailed a staff at @zenith folio and asked them iif they knew how to make a count down command for my twitch chat. so basically streamelemnts will count from 10-1 in a different message. He said to go into this discord and message this section

languid escarp
#

Hey hey hey. I asked a bit ago about some advanced questions about the rotator widget that got referred to @viral patrol wasnt sure if you had seen them or of you maybe help me out now?

subtle warren
viral patrol
#

Hello guys! Those timezones are crazy! They made your day when I am asleep 😉

#

@tardy dirge I am afraid it is not possible to create a command that has more than one response (as countdown should have few of them).

#

@languid escarp post your question and tag me. Once you are around, and I will do my best to answer it ASAP.

languid escarp
#

@viral patrol so basically what im looking to do is to make rotator widget have different color schemes between the action that is happening and the person doing the action. I was told it may have to be a real complex code and was curious if you could assist me through it?

viral patrol
#

On my way

mild cipher
#

@wide wing do you mean testing the SE websocket? If you additionally listen to event:test you can send test events from the overlay editor or replay from dashboard, but the payload structures are slightly different, so you probably need to do some additional logging. After that you could just emit your own event 🙂

languid escarp
#

DUDE @viral patrol THANK YOU it worked

oak spoke
spare yarrow
#

Bonjour! I'm working with @oak spoke on the same project. I found out that "https://api.streamelements.com/kappa/v2" is indeed the base uri (which isn't really clear from the docs), but we're still running into the error where we cannot make a PUT request, and I'm running into this error on a get request:

{
    "statusCode": 403,
    "error": "Forbidden",
    "message": "No channel authorization found"
}
#

Ah, it's clear to me now that you use different channel id's than twitch's api. However, we're still running into the issue where we're unable to PUT, in our case to the /points endpoint

#

So the solution was, to not use url variables (?channel=...), but instead just make the url like this: /points/<channel>/<user>/<amount>

viral patrol
#

There are three items:

  1. endpoint URL (containing variables for simple request as just number)
  2. Authentication Bearer token header
  3. payload as JSON object if request is more complex
#

However there might be some other stuff because API is always in development, there are two docs as this channel subject

#

One is more complete but might be a bit outdated

viral patrol
#

Also @spare yarrow you can GET /me endpoint to get channelid

jade quarry
#

I honestly didnt know where to ask this but where can I get a code for the stream elements app?

zenith folioBOT
#

@jade quarry The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2

vapid iron
jade quarry
#

Thank you

wide wing
#

@mild cipher awesome thanks for the event:test pointer that'll really help 😃

native swallow
#

Hi alll!
is it possible to off responce from bot when somebody redeemed item from the store?

vapid iron
#

@native swallow This would not be the correct spot but yes. You can go to the Chat Alert Module

#

Go to Redemptions & Disable the blue tick.

native swallow
#

@vapid iron hm, bot still give me answer

vapid iron
#

Sorry. Did you click 'Save' after disabling the Redemption module?

native swallow
#

yep. answer looks like "you, Casperovskii, succesfully redeemed ..."

verbal falcon
#

So I was told to come to this channel from live chat. I have some custom alerts that need to be edited to suit streamelements system.

hidden crow
#

Hi 😄 Was wondering if anyone can help me with a css code where the follower alert would start with one letter dropping after another to create a word...

#

basically for my alerts

vapid merlin
#

@verbal falcon !! For this matter @viral patrol it's your guy

verbal falcon
#

Thank you again! @vapid merlin

vapid merlin
#

Tho it's 6-7am for him right now...

scarlet bluff
#

Heyy, so about the marathon extension, I want a dollar to add 12 minutes, but I'm kind of confused. It says "3 will add 3 minutes" so I tried setting it accordingly, and upon a 10 dollar dono it didn't go up 2 hours. Is it a typo and am I supposed to count it seconds like this?

indigo flume
#

Most likely there is aditional multiplication in the JS code when you receive a tip

#

I have a more modified version of the marathon widget, so will see the original in a second

#

so if you receive a 10$ tip, the 60 seconds placed there will be multiplied by 10 making it 600 seconds

#

Which is 10 minutes

verbal falcon
#

I have some custom alerts that need to be edited to suit streamelements system. @gritty stump

scarlet bluff
#

@indigo flume oh cool, so now i have it correctly ty

verbal falcon
#

Sorry meant to tag @viral patrol

viral patrol
#

Hi, I dmed you.

#

We can talk here or on DM

#

It all depends on you 😉

vapid merlin
fresh niche
#

:(

{
    "statusCode": 500,
    "error": "Internal Server Error",
    "message": "An internal server error occurred"
}
viral patrol
#

What endpoint triggered that?

#

And was it request with parameters in endpoint or with JSON payload?

fresh niche
#

@viral patrol

viral patrol
#

Give me a second

#

Then go to URL of your endpoint using _id from /channels/bitsnoxx endpoint

fresh niche
#

Aaah, thanks ❤ I was confused since you can use channel as parameter on some requests

#

@viral patrol

viral patrol
#

AFAIK the only endpoints using channel name are channels and chatstats

#

Have fun with our API @fresh niche

fresh niche
#

Thanks raeHUG

mellow sparrow
#

Hi all. Is there anyway of adding an elimination counter to an overlay that I could update manually with the push of a hotkey?

viral patrol
#

With a hotkey - unfortunately it is not possible, but it is possible to do a twitch chat command to do that.

glacial spruce
#

.awsome-text-container { font-size: 25px; font-weight: bold; position: absolute; top: 75px; left: 300px; }

#

@viral patrol

#

So i put in the position and top/left

#

so i now got the text in the box part of my gif

viral patrol
#

Huh. You know you can achieve this without custom CSS?

glacial spruce
#

yeah i seen what you put in helpdesk 😆

viral patrol
#

(if there is no logic or custom JS there)

glacial spruce
#

did this before you put the suggestion

viral patrol
#
.awsome-text-container {
    background-image: url('{{image}}');
    background-repeat: no-repeat;
    background-size: auto;
    font-size: 25px;
    font-weight: bold;
      position: absolute;
      top: 75px; 
      left: 300px;
}
#

You can get this like that

glacial spruce
#

oh okay

viral patrol
#

Or:

.awsome-text-container {
    z-index:2;
    font-size: 25px;
    font-weight: bold;
    position: absolute;
    top: 75px; 
    left: 300px;
}
.awsome-image-container {
    z-index:-5;
    position: absolute;
    top: 75px; 
    left: 300px;
}
glacial spruce
#

why two instances of awsome-text-container?

viral patrol
#

Oh. Fixed

mellow sparrow
#

@viral patrol so there is a way of doing it? Without the hot key how would I do it with a twitch chat commend? Sorry I’m new at this?

outer ginkgo
#

does anyone have a command for changing game and title like nightbot does?

twin ore
#

It's a default command.

outer ginkgo
#

is it actually

twin ore
#

Yes.

outer ginkgo
#

What is it?

twin ore
#

Should be !settitle and !setgame

outer ginkgo
#

I'm an idiot, ty for being a genius

#

One last question, do you know of a "define" command, so basically a dictionary command

viral patrol
maiden kettle
#

hey guys, any links on how to use the webhooks? the new docs are empty

mild cipher
#

Webhooks or websockets 🤔

pulsar willow
#

Hola ´

#

Alguien Habla Español

hollow compass
#

Hi guys, there is a way to integrate the points system to my own website. Ejem: i wanted to create a site (maybe an idea for you) to sell chest but without real money like streamloots? i have this idea because in America latina some people dont have a cc so i really would like to sell it with the stream points. I tried to implement it like pearks 😄 but the user should be able to collect the cards and have in their accounts, something like collectionables cards. Attached my sample card, it's a spell card, when a viewer redeem this card i have to play a horror game on stream.

#

@《Rey Val3》 yo hablo español

teal drum
#

hi there! is there a way to get the count of a command similar to ${getcount} through bot commands? not seeing the value returned in /bot/commands/{channel}/{commandId}

viral patrol
#

@hollow compass of course you should be able to do that with our API. To give you directions you need to:

  1. Create twitch API authorization (so you can identify users)
  2. Create connection over API and your personal JWT token to our endpoint to get amount (value of wallet) of users - those endpoints you would like to use are:
  • /points - to get amount of points of user
  • /store/{channel}/items - to get available items with preview image, id, URL and so on.
  • /store/{channel}/redemptions/{itemId} - to redeem an item
    Then you should save those data on your website (as a 'transaction history' or card collection
#

@teal drum Unfortunately there is no access to counters via API ATM.

teal drum
#

oh that's a bummer, thank you @viral patrol

viral patrol
#

@teal drum however you can store counter out of StreamElements and then access it. For more advanced usage you can create your own function to return value and be accessible from wherever you want

#

Bot counters are as simple as they could be, so people with no tech knowledge can use them out of the box.

hollow compass
#

@viral patrol thnak you for this info. GG!!

teal drum
#

i looked at the overlay counter linked above, think i'll do something similar to keep the count with an external service and call the api through the bot. thanks!

valid grove
#

Would it be possible for me to get the script for the sraffle and raffle command?

valid grove
#

@last thunder

floral fable
#

Not sure what you mean looking for a script, there are defualt commands for that @valid grove

viral patrol
#

I wonder if it is because of EU directive to provide RNG algorithm for every 'lottery' software.

finite wraith
#

Is there a way to pull cheer data for commands?

#

Such as having someone see the top cheerer through chat?

indigo flume
#

@finite wraith Afaik, top cheerer can't be extracted via the API.

#

For chat usage

indigo flume
#

@pure trellis Hey. About the code - there is a pinned message here that has all available variables for custom widgets.

#

So what you asked if its wrong, is actually correct.

pure trellis
#

thats good. Without diving into all this, I figured that would be the first to check on. I may just wait to see if Grot responds. It's not that big of a deal, other than every stream, the credits keep getting longer and longer XD

#

@indigo flume thanks for checking on that for me!

indigo flume
#

I've already DMed Grot about it and he responded, that he will take a look at it. But here is how on one of my widgets(and most of the custom ones) start with in the JS:

hushed hazel
#

@pure trellis Hey, as far as i can tell from briefly plowing through the widgets code - everything looks fine. I can check out what makes it go crazy on your end if you share an editor link with me in a DM (dont paste it here, unless you feel very adventurous Monkas )

hushed hazel
#

@indigo flume @pure trellis it only happens on donations tho, right ?

indigo flume
#

cheers

hushed hazel
#

@pure trellis Figured it out - its not an issue with the widget, its a bug in the platform - reported it and the SE devs are working on it

ebon needle
#

hello!

#

i’m currently using streamlabs one and want to use an api but its very hard and not much documentation is it possible to use the streamelements api to get a recent follower so i can use css html and java script to create animated stream labels

viral patrol
#

Hello. You can do that within our editor without any issues

#

Of example:

let lastFollow;
window.addEventListener('onWidgetLoad', function (obj) {
let data=obj["detail"]["session"]["data"];
lastFollow=data["follower-latest"]["name"];
$("#follower").html(lastFollow);
});
window.addEventListener('onEventReceived', function (obj) {
    const listener = obj.detail.listener;
    const data = obj["detail"]["event"];
if (listener==='follower-latest' && lastFollow!==data['name']){
lastFollow=data['name'];
$("#follower").html(lastFollow);
}
});
#

Sorry about terrible indents - Wrote it on discord directly

#

@ebon needle ⤴

ebon needle
#

@viral patrol can you dm me/

#

?^

serene osprey
#

@viral patrol So I need some assistance. I was directed to ask you. I am using that credit roll, the simple one, at the end of my streams, and for a while it worked great, Reset its info every stream and whatnot. Well now... The Subscribers resets each stream, and the followers, resets, but the donations and cheers do not. How do I fix this? (I had a huge donation like 3 weeks ago still showing up, and since i read through the credits starting with "our ___ from tonight were", it gets awkward when things are showing up from weeks ago. Thanks!

viral patrol
#

@serene osprey Hello. Our team is working on that (I even think that they might finished they works and it is waiting for review/publish)

#

So It should by fixed by itself pretty soon.

#

"Fixed by itself"... I hate when somebody calls my work like that, so sorry devguys. You know I didn't mean that 😉

pure trellis
#

@hushed hazel ILY dude! Thank you so much for looking into it! ❤ ❤

serene osprey
#

lmao, Thank you so much @viral patrol 😃

#

Appreciate the help. Excited for the fix

ebon needle
#

hello!

#

can anyone help me with my animated stream labels

finite wraith
#

Wait! I found the cheer list in StreamElements - and I know Chatbot can display cheer totals in chat - so it seems possible for StreamElements bot to pull that API? Since it has the numbers somewhere...

#

Not sure how it all works..

mellow sparrow
#

@viral patrol great. Thank you so much! How do implement this code into the stream overlay?

ebon needle
#

Anyone wanna make me some css animation?

cursive kite
#

Hi, I am currently using the 'Credit Rolls for you Stream Ending' that is in #widget-share made by Grot, recently it has been showing the bits on the end scene from previous streams even though I do not want it to. Previously it has not done this and every time I have reset my stream it has reset the credit rolls and only displayed information relevant to that stream. I have not changed any code or touched it in any way but it just randomly kept all the bits from old streams on it, it resets follows, subs and donations just not bits. I even tried deleting the one I used and re-adding a new one to my overlays and used that one instead though it still does the same thing. If anyone knows how to fix this it would be great, if you need anything from the code or whatnot I can show it.

severe maple
#

I noticed the chat module of OBS.live is very slow in comparison to the raw Twitch chat popout. It seems to refresh in intervals that are obviously slower than they should be. I had people in chat redeeming things within my SE store and hearing the notification before I could see the redeem command in chat.

honest bone
#

This is being addressed and fixed!! (:

ember swan
#

Hello there, for the past few days I haven't been able to use <iframe> in my custom widgets, was it removed?

viral patrol
#

@ember swan I think sameorigin flag was always in Custom Widget, so you won't be able to put external stuff inside. However if you want to display something from external resources I recommend getting it via XHR JS call. With XHR there will be header of sameorigin checked (to see if external resource allows you to include it somewhere else, which couldn't be checked with iframe).

ember swan
#

Well, I'm using the Custom Widget inside the overlay section of the Dashboard

#

and I have no idea how I would do that 😄

viral patrol
#

So, what are you trying to achieve?

ember swan
#

I had an overlay set up so that I had a Custom Widget with an <iframe> pointing to a page on my site that I could use as a background and on top of that I had a timer and other things

#

But now the background doesn't load anymore because the <iframe> tag doesn't work (or is being restricted)

viral patrol
#

If this site is pure HTML/JS/CSS you can copypasta content of it to widget itself

ember swan
#

It's not :/

#

I have news articles on my site that I want to show

#

And the content on that page is dynamic

#

This is the page I'm trying to use as a background

#

Minus the text and image in the middle (that used to be handled by the SE overlay)

viral patrol
#

Huh. You can add it as browser source without having streamelements in the middle as far as I understand there is no loging with displaying this stuff

dapper quiver
#

is streamelements giveaway bot code open source?

twin ore
#

You're pretty persistent about this. There's nothing in the API that allows anyone, even the streamer, to rig the giveaway.

dapper quiver
#

Trying to talk to someone who doesn't blindly assume. that's how you miss exploits

#

I can read and write code. Bet i find something. Could even be a mistake. maybe his name is picked due to a glitch

#

Cause as a statistic/computer science person it doesn't add up

twin ore
#

Okay, then let's be fair about it. Is it 100% completely statistically impossible for him to have won as many giveaways as he has? Improbable does not count; only completely impossible.

dapper quiver
#

It's been going on for months

#

The chance of it has to be under 0.00000001% by now

#

hell the chance in his last 2 wins was 0.0024

#

in 2 giveaways. I run 4 a week. over 6-8 months. do the math. or point me to someone who i can talk to who will work with me than dismiss me pointlessly

twin ore
#

Okay, and what did Hectic say when you were told to DM him?

honest bone
#

@dapper quiver Looking at your past giveaways, it doesn't seem like anything is out of the ordinary. Yes there are some reoccurring people, but the number of entrants on these isn't very high.
Also, you have sub luck enabled, and from what i can see, the people i have seen reoccurring are indeed subbed. ei; more chances of winning.
To answer your question, no, our giveaway system is not open source. None of our code is.

If you'd like to DM me and elaborate on what's happening, I'd be more than happy to look into it, but again I examined the results, and nothing seems out of the ordinary.

dapper quiver
#

1 sub of 12 subs with another 12 non-subs

honest bone
#

You'll have to be more descriptive here..

dapper quiver
#

Win
Lost
Win
Lost
Lost
Lost
Win
Win

Win: 4
Lost: 4

^ his record in attempted giveaways in last 8

#

I can keep going back but statistically he is given no bonus over 5 subs I can name in EACH giveaway. YET I can name several subs or people who never won ONCE during this time.

So not only do we need to see the % chance of him winning we need a % chance of someone with the SAME odds to never win

#

Lost
Lost (but not max enters)
Won
Lost (but not max enters)
Lost (but not max enters)
Lost
Lost
Won
Lost
Lost
Lost
Won (out of 5 with 2 winners 1 being the other person)

Won: 3
Lost: 6

#

Over the same giveaways entering more than the other person. with 2 of his wins being multi winners or high odds. This person doesn't even come close

honest bone
#

So he's won 7 times, and have lost 10 times?

#

Who exactly is this user?

dapper quiver
#

Ok first list is the user who wins 50 50

#

second list is a person also a sub over the same amount of giveaways (25 total)

honest bone
#

Give me usernames, please.

#

From what you've described, this is just probability doing it's thing.

#

You've DMd me 1 username, when you just talked about 2 different people.

dapper quiver
#

the chance of that being true is lower than a problem with the bot itself 😆

#

Like i said the chance alone over the last 2 giveaway i calculated to be 0.024% and this is over 100s of giveaways

honest bone
#

Actually not at all, we don't look at usernames when picking something randomly.
There is no pattern followed either, the user you dmd me is always in random locations on the Giveaway Entrants list.
So the "probability" of the "bot" having an issue, is not there at all.

#

Also, I would like to see the math you did to come up with a .024% chance of him winning.

mellow sparrow
#

Massive thank you to @viral patrol who got a counter for me! Still learning bits about the code but I got it working! Thanks to stream elements for having an awesome!

viral patrol
vapid merlin
#

@viral patrol Clap

hushed thicket
#

Hey all, can anyone help me to delete the !donate command that responds with SE tip page? I don't use that as a donation method but it spawns every time the command is triggered

indigo flume
hushed thicket
#

I want to edit the !top points command for the leaderboard to show only top 3 vice top 5. Can i make a custom command to show? What should I use?

indigo flume
#

Unfortunately, the top command can't editied, as it has a default response. Also this is not the right spot to ask about commands 😉

#

this is for custom code/widget talk or API talk 😉

hushed thicket
#

Thanks for that. Any direction I can go to ask for help ?

indigo flume
alpine wind
#

I am not sure where to ask this. I am looking for a command that will post the latest twitter update automatically on a game in chat I did it with pubg before but I can't remember how I did it I want to do it with a different game so Blank just tweeted a new tweet any help would be great thanks!

viral patrol
alpine wind
#

thank you that is it i could not find it

broken sky
#

Ahoy! If I wanted to leverage the SE API to collection information about tips and cheers on a channel, I'd need to use the owner's personal JWT right?

twin ore
#

Correct. Non-public information is secured by the JWT token.

hollow compass
#

Hi guys, there is something wrong with the !raffle? always win the first person that write the Join Command. Can you check this?

hushed thicket
#

I need a dev, please dm me when you get a chance

viral patrol
#

@broken sky if you have full access privileges on his account you should be able to view this data using your JWT token.

#

@hushed thicket just state your question here and once somebody is available, you will get your answer

swift zephyr
#

One of my contacts gave me this, looks like they have an integration for our stuff:
https://lumiacove.com/lumiatwitch

Is that something one of us here did or not? 😄

#

A lot of my streamers have HUE stuff floating around, so would be nice to know

viral patrol
#

I've done something like that but for another lighting - lifx.com

gritty aurora
low sierra
#

The new docs are being written but in the meantime @@static wigeon and @vapid merlin can answer questions you have @gritty aurora

gritty aurora
#

just need to know what status 200 means when requesting the bot/channelid/say endpoint

low sierra
#

I believe that means success

#

And the bot posts the message

gritty aurora
#

well it isn't succeeding LUL

low sierra
#

Ah

viral patrol
#

Is there any response?

gritty aurora
#

the response doesn't include the message

#

just status and channel

viral patrol
#

OK. Gonna check it on my end

vapid merlin
#

@gritty aurora - do you send the message in the body of the request?

gritty aurora
#

yes

vapid merlin
#

Can you show me the payload you send?

vapid merlin
#

one sec

viral patrol
#

Just checked it as well, seems to respond status 200 without message on channel

vapid merlin
#

@gritty aurora just did a test message on your channel with /say

gritty aurora
#

nothing

#

and im just an editor for the channel btw

#

real streamer is live cur

vapid merlin
#

oh you are trying on another channel

gritty aurora
#

yea

#

forgot to mention whoops sowwy

vapid merlin
#

do you have the header content-type: application/json?

#

which channel?

gritty aurora
#

wow

#

totally forgot

vapid merlin
gritty aurora
#

i feel so stupid LUL

vapid merlin
#

its all good feelsokman

gritty aurora
#

yup it works now \o/

vapid merlin
viral patrol
#

And because of that message I tried to check bot, so I implemented methods into my API wrapper... Maybe some day It will be complete 😉

vapid merlin
#

What does it do @viral patrol

viral patrol
#

This is basically SE API wrapper for PHP so you can just go
$api->BotSay('test message'); and it will push message to channel

vapid merlin
#

Hey, wanna document the API while at it? LUL

viral patrol
#

went to shop. ETA of coming back: 2 months

vapid merlin
viral patrol
#

I wonder if my code will be selfdocumented, so I will be able to push it to some phpdoc or something like that then it will produce documentation

vapid merlin
#

Oh you came back from the shop. How about documenting the API?

viral patrol
#

I thought most of it is already documented

vapid merlin
#

Outdated and old.. slowly updating the new one

viral patrol
#

But I found one endpoint of /modules route not even mentioned in docs

#

When I am working with API, I try to do it 'practical' way

#

So I go to dashboard and then look for a page using it, then copy payload and manipulate it

#

And to be honest this is the way I would suggest people to go as they can see it in real action

#

(But I know documentation is important)

vapid merlin
#

Indeed.

ebon needle
#

what is the value needed for java script to access the last subscriber

#

is it lastSubscriber

#

?

viral patrol
#

'subscriber-latest'

ebon needle
#

so what do i need to change on this?

viral patrol
#

Can you paste your piece of code I got you for follower-latest?

#

Oh, just open it and replace 'follower' with 'subscriber'

viral patrol
#

Huh. This is not the thing I prepared, but give me a moment

ebon needle
#

yeah lol

#

lmao

viral patrol
#

Do you want to have separate widget for that?

ebon needle
#

yes

#

im just wondering what i would need to change

viral patrol
#

OK. So let me guide you

ebon needle
#

i would like to keep the variable follower the same

#

to reduce the amount that i need to change

viral patrol
#

OK, so if it is going to be separate widget I will just tell you, how to change it to display subscriber instead of follower

ebon needle
#

alright

viral patrol
#

So... line #94: replace follower with subscriber

#

Line #108 - replace follower with subscriber

#

And that should do the trick

viral patrol
#

Yes

ebon needle
#

okay thabks!

broken sky
#

@viral patrol You mean having the channel owner invite me as a "manager" and using my own token? I've tried that with another test account but all I could get were 403 responses (also sorry I'm late!)

viral patrol
#

So. I will tell you a trick 😉

#

But don't tell anybody (besides those guys here)

#

Go to dashboard and inspect network requests

#

You will see, that they are using different JWT Token

#

You might want to try using that

#

I am not 100% sure if it is still like that, but it was some time ago

broken sky
#

Ohhhh wow I didn't even think about that

viral patrol
#

JWT Token is tied to a channel AFAIK

broken sky
#

Are those reliable, or do they expire and rotate frequently? At least this would feel a little bit "nicer" than having to use their personal token

viral patrol
#

I am not sure but I would bet it can be reset by you or channel owner when 'reset secrets' is clicked

opaque timber
#

what's up guys? Can someone give me a hand? Will they be able to execute the commands for the parameters of the streamelements?
$addpoints("$userid","0","100","$username meteu o dedo no nariz do piadasemgrraca e tirou $value $currencyname de dentro do nariz!","não encontrou nada so ficou comendo meleka")

I already have some parameters to change but I do not know what is missing for the operation of the command:
${addpoints}("${user.name}","0","100","${user.name} meteu o dedo no nariz do piadasemgrraca e tirou $value ${pointsname} de dentro do nariz!","não encontrou nada so ficou comendo meleka")

viral patrol
#

Do you want to add points over API or custom command?

#

You cann add points by !addpoints command only or by API call which would require you to have MITM script

opaque timber
#

I understand, but I wanted to add points to my views by custom command, I'm migrating from streamlabs chatbot and I was trying to migrate at once and by API I do not know how to create the command, thanks

viral patrol
#

Oh. There is no such command that adds points and displays message

scarlet bluff
#

so i have my donations on streamlabs, so it doesn't add to the marathon timer when somebody donates. i've tried importing with the chrome extension but it doesn't work. any ideas?

floral fable
#

If your donations come from SL, there is no way to have it update our widgets, only our events will work with our widgets

low sierra
#

@scarlet bluff The import tool helps you switch to streamelements for tipping and alerts. It's not made for importing multiple times. If you need help with this tool to help you switch, let us know.

winter crescent
#

Idk if this is the right channel for my question, (nothing to do with api) emiliaN
I need help with some alert html/CSS code, i have a webm file for animation and i have it on html as this https://i.imgur.com/74dSVIV.png but it still is not playing i just get the first frame as an image whole time.

viral patrol
#

Oh. This is a good channel to come by

#

So. This should work, but not in browser. Try to open your overlay in OBS

#

As Chrome has no autoplay policy of unmuted media which doesn't affect obs

ebon needle
#

can any one help me

midnight orbit
#

sure, just ask your question

ebon needle
#

i want to integrate a way to tip into my website through streamelements instead of having to go to my tipping page to do so. I know its possible becuase Ix told me it was he sent me the streamelements dev site but like its blanks on a bunch of sections

#

@midnight orbit

gritty aurora
#

^ This would be a neat feature btw, but I'm sure it's not possible yet

viral patrol
#

It is possible and not really hard to achieve if you have working payment gateway. After transaction is finished, just send request:
URL: https://api.streamelements.com/kappa/v2/tips/[ChannelID]
Method: POST
Additional headers:

authorization: Bearer JWT-TOKEN
content-type: application/json; charset=utf-8

Payload:

{
  "currency": "USD",
  "payFees": true,
  "user": {
    "username": "username",
    "email": "paypal@email.com"
  },
  "amount": 123,
  "message": "This is a test",
  "imported": true
}
#

@ebon needle @gritty aurora ⤴

#

But as I wrote - you need to have your own payment gateway and StreamElements will be just to display alert on stream, store information in "Revenue History", update top tip/top tipper and so on, but not any part of processing money.

gritty aurora
#

hm couldn't I just do an iframe of the tipping page?

viral patrol
#

I am not sure if it is safe and 99% sure that paypal won't work in iframe.

#

This is why:

  1. create a website
  2. add iframe with opacity 0 px and above of your website with paypal "send money"
  3. place a "clickbait" button on your website just in position where paypal send money is
  4. wait for incoming money and police
gritty aurora
#

yeah I already suggested an idea for it on the idea forum

#

oh right

viral patrol
#

This is called Clickjacking

gritty aurora
#

Yeah heard of it ^^

#

Is there any other way other than manually doing it via API?

#

Don't really want to make my own payment system lmao

viral patrol
#

Oh. It might be one

#

Give me 5 minutes

#

OK

#
<a href="https://streamelements.com/d4mm_/tip" onclick="window.open(this.href,'targetWindow',
                                   'toolbar=no,
                                    location=yes,
                                    status=no,
                                    menubar=no,
                                    scrollbars=no,
                                    resizable=yes,
                                    width=480,
                                    height=720');
 return false;">Send me a tip</a>
#

This will allow you to display Stream Elements tip form in small window

gritty aurora
#

ohh shit that's smart

prisma valley
#

Sorry if this is the wrong place. I was told in helpdesk-twitch that I was to ask this here - I want to make a command that tells the time I am at for when someone types the command !time in chat. I tried the variable ${time.TIMEZONE} and tried both replacing TIMEZONE with Central and CST as well as CENTRALTIMEZONE and still get displayed UTC. What should I put to get the bot to show my time where I am located?

mild cipher
prisma valley
#

Thank you thefryewire. That was what I needed to know 😃

pliant osprey
#

Hi there, im currently having an issue with your api. In your documentation, you state in your activities section that it should return a message in the json, however when I make requests I do not recieve this. Ive tried 2 different methods, the web hook and the api but they both return the same

vapid merlin
#

@pliant osprey Redemption type of activity does not contain a message.

#

Activity like tip or cheer does contain

pliant osprey
#

So is there no way to collect the message people enter into the redemption?

vapid merlin
#

No, not at the moment. When people redeem items from the store there is no option to leave a message.

viral patrol
pliant osprey
#

@vapid merlin there is an option to leave a message but not recieve it

#

Ill add it to the ideas board

vapid merlin
pliant osprey
vapid merlin
#

please do

pliant osprey
vapid merlin
#

☝ solved. Clap

viral patrol
#

That was quick

vapid merlin
#

Already had a websocket event pajaNaM

stable monolith
#

hey

glossy ferry
#

any information how to auth? Api's pages is empty.

cinder lintel
glossy ferry
#

thanks!

cinder lintel
#

It uses JWT for authorization, that shows an example of how its done

glossy ferry
#

@cinder lintel Where to get more information about it? Structure, requirements?

indigo flume
#

Depending what you need to achieve. What API point you need?

glossy ferry
#

Just manage user's points

indigo flume
#

Well that end point shows what it needs to give you the response you want

#

https://api.streamelements.com/kappa/v2/points/{channelid}

glossy ferry
#

to do it i should firstly autorize myself
to prevent "No authorization token was found" error

indigo flume
#
    headers = {"Authorization":"Bearer "+jwt_token},
    )
    print(r.text)```
#

something like this (example taken by searching for auth in this channel)

glossy ferry
#

you're too using python? Nice)

indigo flume
#

I work with C# at my work, I've dabbled with python for work purposes and don't like it

glossy ferry
#

thanks for example

vapid merlin
#

@indigo flume are you doing some programagicing at your work? PogChamp

indigo flume
glossy ferry
#

@indigo flume SKB Kontour?

indigo flume
#

what now? keizarSip

#

aah, no

#

Startup company about robots

#

and factory flow

vapid merlin
#

+1 for vscode. -1 for c#

glossy ferry
#

oh i miss 😄

indigo flume
#

Thats a fully legal Visual Studio Squintright

#

the project also has python and C++ in it

vapid merlin
#

wait what

glossy ferry
#

ironpython? 😄

vapid merlin
#

why not just vscode

#

oh well

#

so just -1 for c#.

indigo flume
#

because this?

vapid merlin
#

iot pajaNaM

indigo flume
#

Yeah, so back to work refactoring FeelsDiscordMan

vapid merlin
viral patrol
#

@vapid merlin In your school I would get F for using JetBrains + PHP

vapid merlin
#

still have jetbrains as well NaM

indigo flume
#

mac ew

vapid merlin
#

uhm

viral patrol
#

Mac & Cheese

#

I love JetBrains.

vapid merlin
#

golang sucks in jetbrains

viral patrol
#

Before I was using Netbeans, Eclipse and now just JetBrains + vim

#

(oh my vim to be specific)

vapid merlin
#

try vscode for a week

#

you can even change it to vim style editor

viral patrol
#

I know vscode has vim bindings

#

Used it for a week

#

Then I got email "Your recurring license on PHPStorm has been extended automatically"

vapid merlin
#

lol

viral patrol
#

I kinda like it, especially for working on documentation

soft hull
#

This looks to complicate

vapid merlin
#

there are markdown extensions for vscode as well you know NaM

viral patrol
#

Pinned message on that channel has a documentation which was wame using that

#

You won't convert me to vscode (at least not until September 9th, 2019)!

vapid merlin
#

the code sharing was the thing that did it for me

indigo flume
#

VSCode's live code sharing is awesome pog

viral patrol
#

I have nobody to share my code with, I don't want anybody get serious diseases from it.

soft hull
#

Why waste your in codeing when u could be gaming :]]]

indigo flume
#

No time for games, custom widgets need to be made

viral patrol
#

@soft hull this is almost like gaming.

soft hull
#

Oof true

#

How

viral patrol
#

You play with that, there are bosses called "deadlines"

indigo flume
#

and minibosses called bugs

soft hull
#

OOOOF

viral patrol
#

You collect your inventory on github

indigo flume
#

skill improvements called refactoring

vapid merlin
#

farming git points

viral patrol
#

Also there are cheats you can find on stackoverflow

soft hull
#

Do u get money :333

viral patrol
#

Money? What is that?

soft hull
#

;-;

indigo flume
#

I've invested a lot of skill points in my cheat called "googling"

viral patrol
#

Aaah, ingame currency called SLA points

vapid merlin
#

art.

soft hull
#

Art

#

.

indigo flume
#

Also art pepeJedi

soft hull
#

Wow this got silenced real quick

indigo flume
#

you scare developers with any mention of "weeb"

magic sandal
#

Da hell are you guys doing in here? ahmmmm

indigo flume
soft hull
#

I dont have ninja frog powers

viral patrol
soft hull
#

I do have anime power

viral patrol
#

Yes, you can laugh now.

vapid merlin
soft hull
#

Wats so funny

viral patrol
soft hull
#

I never dont read srry

#

Wow my grammar today

pliant osprey
#

Hey, quick question because I know the documentation isnt the best. Do I still have to specify a bearer jwt token in the header for this?

#

If not, what stops me from just altering my points on another channel?

viral patrol
#

You need Authentication for that scope

#

maybe it is skipped in documentation

#

But it is required

pliant osprey
#

Thanks, how would I go about implementing that, is it the same as all the others where I set it as a header like authentication: Bearer {jwt} ?

vapid merlin
#

@pliant osprey yep

pliant osprey
#

Cheers @vapid merlin

pliant osprey
#

Hey sorry to be a burden. Im trying to use the points api but I keep getting 404 not found.

#

I am using channel id aswell

vapid merlin
#

Send me in dm the full request

viral patrol
#

Oh. If you have this open it seems that you try to send GET request and there is no path for that method

pliant osprey
#

That seems like a cool tool, ill use that in future 😄

#

The issue was I was using get and not put. Thanks alot guys

cyan fulcrum
#

Hey guys! So I just tried out the new Fields feature for the Custom Widget and I'm running into a slight problem. If I change one of the Fields the Widget isn't reloaded and therefor I really only can see the changes I made when I force it to reload by either doing some modification in the Widget Editor or reopening the Overlay. Is there something I'm missing, or am I doing something wrong? I'm currently just fetching the values in the onWidgetLoad event handler!

viral patrol
#

@cyan fulcrum Thanks! We are already working on a solution to that. The easier way to reinitialize it is to resize it, but soon there will be a fix to that released.

#

You can either do the BAD way (we support it as well) like:

let variable={{field1}};
let variable2="{{field2}};

or onWidgetLoad, which is the best way to use it 😉

pale wagon
#

Does anyone know how I can use a custom font for a widget?
I need to set up “recent tip” or “top tip” but it doesn’t have the font I need, and I can’t find how to code for it. Any help please?

indigo flume
#

Then customize it from this window and use the imports

pale wagon
#

Thank you!!!

#

Do you know where I can find what to enter for “recent tip” or “top tip”? I’m not able to edit the ones that are already clickable, I would have to enter new code

indigo flume
#

Check the pinned messages for the documentation for custom widgets variables

pale wagon
#

Thanks. If I have any more questions I’ll hop back in. Been searching for hours I should’ve came here first

terse marten
indigo flume
terse marten
#

yikes ok ty

indigo flume
terse marten
trail mist
#

is there an API to retrieve counter values? I see the points API but nothing for counters

indigo flume
#

the points API is part of the loyalty points, but afaik, atm we don't have an end point for the counter variable

honest bone
#

GET only tohttps://api.streamelements.com/kappa/v2/bot/ACCOUNTID/counters/COUNTID

#

The nerd devs can help more, i just know the link

indigo flume
#

I shot the gun too early sadcat

trail mist
#

neat, works. Tyvm

trail mist
#

Is there a ways to access to the custom counters created by custom chat commands inside the custom widget for the overlays? Or is a XHR the only way to get it in there?

#

I'll try and see if the XHR works or if it'll just run into CORS

indigo flume
#

Already built overlay counter via commands by @viral patrol pepeJedi

trail mist
#

Did not know widgets had chat event access. Thanks for the help

#

Seems like that won't benefit from the existing per-user cooldown, but that seems easy enough to add by just keeping track of when users last issued a command

#

with the added benefit of being able to share a cooldown between multiple commands when doing it in the custom widget

viral patrol
trail mist
#

Thanks, I think for the application I was thinking of the non-persisted counters inside the overlay widget are enough.

silk mesa
#

This isn't an api question so feel free to send me to another channel. I can't seem to find a good fit for where to ask. Trying to figure out how to set a theme thumbnail

indigo flume
#

Theme thumbnail?

silk mesa
#

Create an overlay, save it. Go to your overlays screen. Big ass Question mark as the thumbnail.

#

However when I download themes or superthemes, they have their own thumbnails

indigo flume
#

set game

#

Custom thumbnails can't be uploaded afiak

silk mesa
#

Hrm. They seem to have them in the themes gallery

indigo flume
#

Because those are themes/overlays provided by us

silk mesa
#

oooOOOO

#

Makes sense. Thanks again, KeiZar. I think you've been the one to answer every question I've asked in the past few days.

indigo flume
#

i've most likely been the fastest one to answer really

gritty aurora
#

hey is there an endpoint i can use to retrieve the banned users from the loyalty system?

viral patrol
#

If you send GET request to https://api.streamelements.com/kappa/v2/loyalty/[CHANNELID] you will have "ignored":["userA","userB"] in response

#

But I am not sure if there's anything like ban

gritty aurora
#

oh right i meant ignore ^^

#

thankyuuuu

pliant osprey
barren ridge
reef granite
#

Whoa. I just noticed the Custom Widget has some fancy new settings for colors and text and such. Is there documentation on how to access these things?

#

Looks kind of placeholder-y right now so not sure if it's fully baked yet

honest bone
#

@reef granite in the custom code area html/css/js, there’s a new tab for custom fields... you’d fill that in to affect your widget. (:

reef granite
#

Ahh. Figures all I needed to do was actually go into my code. 😛 Thanks

honest bone
#

No problemo

reef granite
#

@honest bone Really awesome stuff.. Am I a newb if I can't figure out how to access those values from my html/css/js?

honest bone
#

I am a lot worse than you. Trust me.. all I know is that you can create custom fields.. now to translate that to work with HTML/css/js... I have no idea. :p you’ll have to wait til one of the smart people come online

reef granite
#

hah. nice to know I have company.

#

lol. omg. it's as easy as {variableName} in html, css and js. I was trying to just figure it out by looking at it and the first thing I tested worked.

viral patrol
#

Oh hello!

#

There is a documentation about everything in pinned message

reef granite
#

Knew I should have checked that. I'm a fool. Thanks @viral patrol .. Is checkbox your best bet for a bool?

viral patrol
#

There is no checkbox at this moment

reef granite
#

Oh. Does it just not work? Because it shows up if I use it as a type

viral patrol
#

Oh, maybe it was added recently, I will have to check it

#

I was using dropbox with yes/no values (as I can't use true/false as key in JSON)

#

Then I made variable=(fieldData["fieldName"]==="yes")

reef granite
#

It could use some better styling (currently it's a giant checkbox under the label text) but it does show up on the side. Haven't tested to see if the code parses the variable correctly

#

your solution also looks pretty good if it doesn't work thou

#

Yup. It does seem to work in code too.

cyan fulcrum
#

as far as I can see almost all html input types work (tried checkboxes, datefields (datetime, date, week, time) ...), some have a bit weird formatting and others are pretty much useless at the moment like button, radio or file.

#

but most of them seem to actually work as expected

drifting light
#

Okay, I have a widget related question, it concerns one of the custom widgets from #widget-share and I was advised to post my question here as well as ping @viral patrol

I'm a css idiot. I'm screwing around with the credit roll widget and I was wondering if there was a way to have my top tipper/top cheerer show up there.

I've figured out how to edit some parts of the widget (like text/speed/color) but that's as far as I've managed to go.

Any help is appreciated!

viral patrol
#

Which widget are you using?

pliant osprey
#

If I try to use that it gives me a 404 error

cursive kite
#

Just was wondering if anyone knew if it is hard or not to make a custom widget that updates live the amount of subs a youtube channel has from sites like social blade or something??

viral patrol
#

Unfortunately socialblade doesn't share their numbers via API, but I think this can be done via youtube API itself

drifting light
#

sorry about the delayed response @viral patrol , I sorta fell down an overlay editing rabbit hole.. Anyway, I'm using Roll Credits.

viral patrol
#

Add a section to credits-sections:

<div class="credits-sections__item">
                <h2>Top</h2>    
                <ul class="people-list col2" id="tops"></ul>
            </div>

And just below:

window.addEventListener('onWidgetLoad', function(obj) {
  const recents = obj.detail.recents;
  let session = obj.detail.session.data;
  userCurrency = obj.detail.currency;

add:

addEvent('tops', "Donator: "+session["tip-session-top-donator"]["name"]+" - "+userCurrency.symbol+session["tip-session-top-donator"]["amount"]);
addEvent('tops', "Cheerer: "+session["cheer-session-top-donator"]["name"]+" - "+session["cheer-session-top-donator"]["amount"]+" Bits");
#

This should do the trick

drifting light
#

I'm actually really proud of what I did with the hypecup and I wanna show it off wowvlad

#

Oh, thanks!!!

#

You css guys are freakin' nuts. It's amazing what you come up with!

#

Okay, I can get that first section in there okay, but when you say just below, can you specify? Sorry, like I said, I'm a css idiot @viral patrol

viral patrol
#

So find:

window.addEventListener('onWidgetLoad', function(obj) {
  const recents = obj.detail.recents;
  let session = obj.detail.session.data;
  userCurrency = obj.detail.currency;

and make it look like

window.addEventListener('onWidgetLoad', function(obj) {
  const recents = obj.detail.recents;
  let session = obj.detail.session.data;
  userCurrency = obj.detail.currency;
addEvent('tops', "Donator: "+session["tip-session-top-donator"]["name"]+" - "+userCurrency.symbol+session["tip-session-top-donator"]["amount"]);
addEvent('tops', "Cheerer: "+session["cheer-session-top-donator"]["name"]+" - "+session["cheer-session-top-donator"]["amount"]+" Bits");
drifting light
trail mist
#

I'm having the weirdest issue with using twitchjs like in the "OverlayCounters" example. It connects but it doesn't get any callbacks on messages. When I add username/oauth I can even send messages and then it gets the callbacks from its own messages, but not anything from outside

drifting light
#

I think I screwed it up though... I copy pasted the code above & this is how it turned out

trail mist
#

Well that is unfortunate, I see the chat messages in the WS frames in the browser debugger, they just don't seem to trigger the callback

trail mist
#

ouch, looks like it was just giving an empty string in channel=obj["detail"]["channel"]["username"]; but I still saw the messages in the debugger because something else in streamelemts was opening a connection to the right channel 😒

#

also I was seeing the sending messages because I specifically used a call that took the channel as parameter