#dev-chat
1 messages · Page 47 of 1
So when someone subs the number obviously goes up, but I don't think it goes down again
Same with followers
I think we had the exact same topic a few lines above 
you just have to use subscriber instead of follower
or for a goal it's probably data["subscriber-goal"]["amount"]
Check the api store, https://github.com/StreamElements/widgets/blob/master/CustomCode.md#se-api. You'll need to set the current value of your subs and then increment it on event received. Basically, you set your own counter, that way it won't go down when someone's sub expires.
@cloud iris... if that is what you were asking
@cloud iris you can change where it grabs the data from and Id pull it from onWidgetLoad instead to ensure accuracy
@woven zinc I actually DO want it to go down. So it accurately represents my current number of subs.
So I guess I have to change something in this code then?
console.log(obj.detail);
fieldData = obj.detail.fieldData;
goal = fieldData["goal"];
$('#goal-total').text(goal);
goaltitle = fieldData["goaltitle"];
$('#title').text(goaltitle);
pointsPerBit = fieldData["pointsPerBit"];
pointsPerTip = fieldData["pointsPerTip"];
pointsPerSub = fieldData["pointsPerSub"];
let data = obj["detail"]["session"]["data"];
analysePoints(data);
});
window.addEventListener('onSessionUpdate', function (obj) {
let data = obj["detail"]["session"];
analysePoints(data);
});
function analysePoints(data) {
let bitsAmount = data["cheer-goal"]["amount"];
let subsAmount = data["subscriber-goal"]["amount"];
let tipsAmount = data["tip-goal"]["amount"];
let followerAmount = data["follower-goal"]["amount"];
let currentPoints = subsAmount * pointsPerSub;
currentPoints += tipsAmount * pointsPerTip;
currentPoints += bitsAmount * pointsPerBit;
currentPoints += followerAmount * pointsPerFollow;
$('#goal-current').text(subsAmount);
updateBar(subsAmount); ```
that already should be dynamic and account for decreasing subs 🤔
Ooh wait, I didn't have the whole code block...
It's too long for Discord, but here's a paste: https://pastebin.com/qbxCPPYq
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you are interested in 2 variables, data["subscriber-total"]["count"] - Total count of subscribers to get the current count of subs you have and data["subscriber-goal"]["amount"]
that already should be dynamic and account for decreasing subs 🤔
@tribal zenith Hmm that's weird, because currently it shows 0 subs, as I reset my goals in the overlay editor... but in the SE totals, it still shows my total amount of subs...
yes, I believe totals are not reseted while session data is
you can change your session data in the editor to test around
Yeah, so it should pull from the totals ideally
Anyone know how to separate youtube member tiers in se?
What should I put here for the second tier for example
you can change your session data in the editor to test around
@tribal zenith So I did that and currently it pulls from this tab.
@cloud iris currently the code pulls data from the session/goal data with let subsAmount = data["subscriber-goal"]["amount"];
to get the total count you would have to change that to data["subscriber-total"]["count"]
the same goes for tips, cheers etc
Follower: data["follower-total"]["count"]
Cheer: data["cheer-total"]["amount"]
Tips: data["tip-total"]["amount"]
Anyone know how to separate youtube member tiers in se?
@elder dragon isn't it 1000, 2000 & 3000?
np
I had an angry client lol you're a life saver
i stream on twitch, and i was wondering, is there a way to get the subscribers of my youtube channel on a widget?
i linked my youtube channel to SE but that just made a different platform. is that how i get it? 🤔
@charred vortex data doesn't transfer between each other.
so there is no way to do it? im watching a stream right now and somehow they did it, but i didnt get an answer when i asked 🤷🏻♂️
You probably might be able to pull something but 99% sure you SoL.
what do you mean?
You might be able to work something with a custom widget but 99% sure it won't work.
yeah, that was my plan. i was wondering if anyone has tried it already and if so, how?
get a youtube api key and fetch the subs or use one of those metrics sites
The api key, that's what I wanted. But I couldn't remember the words for it 😅 thanks
@charred vortex Just create an se account on yt
Create the widget on that account so you get the se data
It would be separate
Or use the youtube api
@abstract basalt are you able to help with your Raid Boss alerts? I'm not getting the 'warning' text for some reason.
What’s the best way to import text into a stream Element widget? I’d like to pull in text from either a text file, HTML, etc.
Looking to use the end-point for placing a bet: anyone know the body params required for the following end-point?
POST https://api.streamelements.com/kappa/v2/contests/channel/contestId/bet
I've got the correct channelId and contestId in the path params and I'd imagine the body params will be something like "bet" and "username" but I can't seem to guess them lol. And the docs don't seem to have the params listed there? Any help would be greatly appreciated
EDIT: this is the response I'm getting
{ "statusCode": 400, "error": "Bad Request", //Note, this only says bad request when I use a valid contestId and channelId so thats how I gathered that those are correct and that I'm just missing the body params "message": "No contest found" }
@daring mauve please dm me to get some help, otherwise i'll forget
Will do. thanks!
hey guys i was wondering if its possible to create a webhook from my stream store to my discord, so whenever someone redeems smth there i would also be notified in here
thx
@hushed hazel I'm using your credit roll widget, but I've noticed that somehow it actually doubles or something after the initial round. Do you perhaps know what could cause this? I've checked and I haven't added it double to my scene or anything.
hmm 🤔
anybody know why font-awesome icons are acting up?
nvm I need to learn to close my tags
'ello! It was a while since I wrote here and... yes, I need help!
Is there a way to force the widget update from within the editor without clicking on SAVE?
I'm trying to make a scoreboard controlled from the SE editor...
You can use external data fetched by XHR call by widget or have a button within overlay, but you cannot change any "base" data of widget without saving overlay.
OK, thanks!
Hm... Changes made on SE editor button click doesn't show up in OBS browser...
So I had some help on this before, I am wanting to make a command to translate other languages to English. here is what I have. https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=auto&tl=en&text=${queryescape ${1:}} how can this be made into an API to read only the translated text?
@pastel raft Unfortunately when it comes to their translation API it becomes costly.
So unfortunately returning a link for the message is your best bet.
Because you can only translate a small amount without charge before they say pay up.
And they do it by the character.
Is there a way to create a command that can show the last clip created on your channel? It seems like it should be possible, but I am unsure if anyone has come across something like this?
Hey, I am currently starting out writing my first python code snippets. Is there a tutorial / example / someone who can help me out on how to connect to the api with python?
look at the pinned messages of this channel. The linked API reference already has python snippets
is there a merch/store alert that can be triggered/customized?
@tribal zenith but theres no info how to authenticate over python with the api. Do you have an example only for the Auth?
try something like: js headers = { 'Content-Type': 'application/json', 'Authorization': `Bearer ${process.env.SE_JWTTOKEN}` } where the ${process.env.SE_JWTTOKEN} is your JWT token. I'm not familiar with Python, but sending that object to the API should get you the Auth @fallow jay
first time I played with it; but it looks like it is in there ....
window.addEventListener('onEventReceived', obj => {
//Test Button
if (obj.detail.event.listener === "merch-latest") {
let merchPur = obj.detail.event.event
console.log('MERCH PUR', merchPur,
'MERCH NAME:', merchPur.name,
'MERCH ITEMS:', merchPur.items,
'....');
};
});
No idea how this will actually work on a Merch purchase.... but 🤞 it'll get you started
Any chance somebody has more details about the current status/outage? https://status.streamelements.com/
I'm currently not getting any of the user events on the websocket when testing via the editor (so sub, tip, cheer etc). But I do get events when I mute/unmute the alerts f.e.
I'm mainly wondering if this is indeed the outage and I should have patience, or if I'm just being dumb but not awake enough to realise and should continue to debug 
Welcome to StreamElements's home for real-time and historical data on system performance.
@fiery nexus Bad people tried bad things and we're still trying to have the queue catch up.
Oh no, not bad people 
There is a delay in the follows ... not sure on the other events.
I'm glad the bad people are dealt with :)
But now I'm back with a more detailed question regarding the socket connection:
In the docs (https://github.com/StreamElements/widgets/blob/master/CustomCode.md) it's mentioned that events have a structure like this:
{
"listener": "<type>-latest",
"event": {
"some":"fields"
}
}
which is indeed what I receive (wrapped in ["event:test", eventBody]) when I'm firing test-events via the Overlay editor.
But in a live setting it seems to be different? As I get events like this:
[
"event:update",
{
"name": "<type>-latest",
"data": {
"some": "fields"
}
}
]
Besides that I feel like I had no way of knowing that I should expect event:update, I also don't understand why the keys change to name and data?
Did I just overlooked something massive, I can't find a specific v2 for the socket documentation? I assume I'm not the only one using the websocket?
And there's also messages with key "event", but that uses "type": "cheer" and "data":{}? I'm getting so confused 
when you click on the JavaScript tab it tells you which structure you should expect from which event
but the onEventReceived structure is different from direct socket connections and sends a smaller, more specific payload
Ohhh, so I should kinda just ignore the whole "Each event processed via the websockets can be seen documented here:" block? 
Thanks though, that does help!
So if I understand correctly, there's no clear overview which fields are available for which event type?
Not a huge deal, as most are guessable, but would be nice to have something more official
yeah, the documentation you mentioned was for CustomCode inside the SE editor. The onEventReceived event is basically a parsed payload, while direct socket events are more like "raw data"
Makes sense
And am I correct that this also means there's no way to test events (triggered from SE) in that case?
event:update is fired everytime data changes, so you could use that
That's what I was doing, but as the structure is so different, it's not really a feasible test
As the event itself isn't fired at that point
I don't really know the exact output right now, but doesn't name contain the event?
["event",{"_id":"5fafeed7748243567ed7f4f8","channel":"594a9f426e9dd856f439d15a","type":"follow","provider":"twitch","flagged":false,"data":{"username":"twitch_username"}}] (+ some extra fields)
vs
["event:update",{"name":"follower-latest","data":{"name":"twitch_username"}}]
I guess it just means I need to write more tests myself, based on trial and error
oh, you mean you triggered test events in the editor, but don't get the event triggered on the websocket?
and if you check the "Preview Live" box?
Yeah same, without it I don't receive the event:test
ah okay, the only other way would be to re-trigger events from your dashboard
if you have any
or the event-list rather
Ah yeah, I thought about trying that, but hadn't yet. But it would not help that much
As I mainly develop for other people, I don't stream 
But I could at least test follow events :P
But like I said, it just means I'll write a bunch more unit tests than what I have now.
I should have enough events logged from a livestream that it should be enough info to base the tests on
the only other, more complex way would be to get the id from socket events and then query https://docs.streamelements.com/reference/activities for that id, but that is a lot more work
actually wait, I believe test events are not even registered in the backend. So that probably would return nothing 
I don't even think it would work, for 2 reasons:
- the test events don't get an _id

- and I assume that endpoint only works with live events anyway, not test events
Yeah indeed, that 
it would give you a fixed structure for live events though, but it is of course not as fast and performant as direct socket data
True, it could be used for some sort of integration test I guess, but don't think it's worth it in my case
Unless the structure changes a lot 
is there a way to share data/comunicate between widgets? I want my background widget to react when my alert widget is triggered
@limber fiber use an external js script to link the different widgets together
@neat tangle what do you mean exacly?
So, I'm trying to make a goal tracker and everything works great in the preview. But on the actual livestream it doesn't update when an event (donation, subscriber etc) is triggered. Again, it does update in the preview when emulating events but not on the actual livestream :(
Anyone in here know how to setup text to speech as an item on stream store?
Hello
Can someone help me?
I’m trying to set up an overlay
I put the widget token
When I copy the overlay url but is not working
thefyrewire?
i have an issue
where the sub name is showing twice
idk if it's only streamelements
any idea?
ahh i don't have to refrence the {name} in the html
Hi
Could someone help me?
How can I get the actual song in my songrequest using python?
I obtain a 500 error everytime
You should get data from this endpoint https://api.streamelements.com/kappa/v2/songrequest/:yourChannelId/playing, where :yourChannelId is a guid of channel. No authorization required.
It does work. It just exits on everything 😉
Imagine you have listener = "follower-latest"
Then it is:
if (0 || 1 || 1 || 1 || 1 || 1 || 1) return;
What do you want to achieve?
Something like:
if (listener.indexOf("-latest") === -1 ) return;
?
I want to pass a function whenever listener is all of those
mb I meant to say one of those
Or:
const events=["follower-latest","subscriber-latest","cheer-latest","tip-latest","host-latest","raid-latest"];
if (events.indexOf(listener) === -1) return;
Will make it easier to understand later
intrestingly it is not triggering the function @viral patrol
@viral patrol saves the day again
can't you just omit the negation and still use the or?
like (listener === 'follower-latest' || listener === 'subscriber-latest' || listener === 'cheer-latest' || listener === 'tip-latest' || listener === 'host-latest' || listener === 'raid-latest')
well true but that's a lot cleaner
well, it's micro-optimization, but you don't have to create and iterate over an array every time 😄
but that doesn't really matter
If I pass a function in onEventReceived and that calls SE_API.resumeQueue(), will the SE_API.resumeQueue() work?
yes
@tribal zenith you sure mate, my widget says otherwise
the event is onEventReceived
I can confirm. SE_API methods are defined global
you have an extra e in there
what is your code then?
Unless you override the SE_API in your function, the global one should be called
I am not sure about that, but you might have to define a widgetDuration in your fields
Yup. It is required to define that one
Otherwise queue is not held
resumeQueue method is used to prematurely resume it.
ahh crap I mentioned it but then reloaded by mistake and now it's not there
🤦♂️
Autosave please
@viral patrol
it should warn you about unsaved changes 🤔
ohh freak I just deleated the widget by mistake
Thank god Control + Z works
@tribal zenith I was writing some code and pressed enter for a new line but confirmed the reload instead
oh okay 
Time to switch to VS Code
@viral patrol quick question: If a submitted widget gets rejected, would one get notified about that and what has to change or no?
I usually come over to coders and discuss widgets
And yes, your widget is in queue 😉
okay, I got worried a little bit 
I finally managed to animate 3D alerts, but holy shit shaders are some witchcraft
it looks cool tho
The inconsistency on this 😢
Consistency is if you look with different approach. AFAIK every -goal has amount, and -count is always count
Hi, does anyone know how I can make sure that instead of the word "name" there is the name of the new follower?
@sturdy oak haven't looked it js but thanks buddy 
@pallid jetty {name}
@pallid jetty
{name}
@sturdy oak Directly on After Effects ??
@pallid jetty ohh no no in the overlay editor add an alert box upload this video and then in the message field enter {name}
If you export it to html5 animation you could do that in AE.
But if it is a webm file (video), you cannot alter it via code
Yeah well you gotta allign that text in css
@pallid jetty I am not familiar with AE, but https://exchange.adobe.com/creativecloud.details.12557.bodymovin.html and https://lottiefiles.com/plugins/after-effects
it's a little complicated for me, sorry ahahah
@pallid jetty I am not familiar with AE, but https://exchange.adobe.com/creativecloud.details.12557.bodymovin.html and https://lottiefiles.com/plugins/after-effects
@viral patrol oh, thanks
it's an animation I've created in AE but I don't know how to program in CSS
bodymovin and lottie files are very simple. i use them all the time
Lottie is way to op to even exist
is there a way to make the bot say something in chat?
or whisper a user?
I have a command detection in JS and i want it to reply to whisper the user that the command went through
whispers user "Successfully sent an emote to the stream."
I am recreating !#showemote command from xQc's stream
is there any way in JavaScript to get the StreamElements bot to whisper a user?
@gray reef There is a way to get the commands to whisper to the user, you gotta figure out how to trigger it using js
You can create a command that replies in dms, you need to call external REST API to get text you want to dm to user. There's no other way to dm user without user triggering it
Hello Good Morning All, I'm starting to think this might be a bug or something. my activity fee on stream elements isnt updating at all
and none of my alerts are triggering
ive relogged, logged back in multiple times, made sure all urls were correctly put in browser source, made sure alll minimums were correct
never had this happen before
thank you in advance
@cloud monolith Please post this question on platform specific channel, so you get the best support in your case.
Haven’t had help yet, I’m not sure if they saw it or not, but my question was skipped because I see them answering everyone else
Hi, bringing this up again as we have thousands of users using Lumia Stream who complain the SE test alert box does not send it to their API like they're familiar with on SL.
Has there been any movement on the test alert box?
A staff member responded that Lumia didn't contact StreamElements about it and that it sounds like their is something bugged on the side of Lumia.
That was this morning
Yeah, we get these messages every week. I've contacted SE multiple times actually, especially on this channel
Does SE have an API Demo App?
@viral patrol ^^^^^^
There are two things users complain about.
1: The alert box not sending alerts to the api, so they always assume something is going wrong with the connection
2: SE will randomly disconnect from the socket and then not allow us to reconnect. This issue started happening after SE went down about 2 months ago. Before this we weren't having any connection issues from our users
@magic prawn there's no demo app I am aware of.
@nova hedge Do you have logs with statuscodes perhaps?
I do not actually. I'm going to leave my connection running all day though and see if I can get disconnected
👍
Let us know how it goes.
Because even if you disconnect, you should always be able to reconnect right away.
Okay, but honestly the biggest issue has always been the alert box
Users always complain about this, and all we can tell them is that it's out of our control and that we try to reach out about it
We even created an issue on your ideas forum a few months ago
Oh. Ideas boards are not the best place to post issues. For the best support you can use dedicated OAuth2 channel, so they are not buried by other stuff
If you search for my name @viral patrol you'll see that I posted here, Oauth2 channel and even the general support about this multiple times throughout this year and last year
We really don't know where else to go to try and get movement on this
Yup. That issue you posted was held by devs AFAIK. Sorry for no response on that.
Right 😦
Thx. @viral patrol
@nova hedge And about test events not being forwarded to sockets, there is a toggle for that:
If this box is not checked, events are emulated within overlay editor only
This or replaying event from activity feed
Gotcha, okay so the listener field isn't the same though as a live alert
It sends follower-latest, follower-count, follower-total, follower-top for instance
Rather than just follow
This is definitely a huge difference though
For events it is the best to listen to -latest events only as this is raw data. Additional events are dispatched so aggregates are updated.
Also as there's no need to distinct test events, they contain same data for each type (which is not used by real events).
Trying it out now, thanks
Okay, so even with a live alert -latest comes through the api. So you're saying we should listen to -latest over the actual alert?
When using -latest not even the provider comes through and the data is all over the place
follower-latest
{
listener: 'follower-latest',
event: {
type: 'follower',
name: 'bradley',
amount: 13,
count: 13,
items: [
{
name: 'Shirt',
price: 38,
quantity: 1,
},
{
name: 'Hat',
price: 4,
quantity: 2,
},
{
name: 'Mug',
price: 3,
quantity: 2,
},
{
name: 'Hoodie',
price: 44,
quantity: 1,
},
{
name: 'Protein powder',
price: 6,
quantity: 1,
},
],
tier: '1000',
month: 'October',
isTest: true,
},
}
follow
{
_id: '332424',
channel: '32324324',
type: 'follow',
provider: 'twitch',
flagged: false,
data: {
username: 'ahadcove',
providerId: '123',
displayName: 'ahadcove',
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/226b0d7a-5ea8-4044-8c64-0af2b143f2d9-profile_image-300x300.png',
quantity: 0,
},
createdAt: '2020-11-16T19:55:40.027Z',
updatedAt: '2020-11-16T19:55:40.027Z',
}
I was using:
socket.on('event:test', (data) => {
parseEvent(data);
});
socket.on('event', (data) => {
parseEvent(data);
});
where parseEvent was checking listener and grabbed data from event property.
yeah, but the test alerts are extremely inconsistent with a live alert schema. It literally doesn't even send a platform. Lumia Stream supports all of the major platforms and some users use more than 1 at a time. We don't really have a generic follow alert. It's either a twitch follow, facebook follow, or youtube follow
Oh. This can be hard when it comes to subscribers
But... I wonder - user platform that is tied to event is in user properties. You can get them by calling: https://api.streamelements.com/kappa/v2/channels/:channelId and that platform doesn't change over time. Each guid is tied to single platform (provider property).
Hmm, let me test this out, but don't users connect to multiple platforms with SE as well? Like my test account is connected to all three platforms
They can connect to multiple platforms by SE, but each one of them have separate guid
I see
So we'll have to store the platform and then map the test schemas to something that's similar to the live alert schema. :(
Seems extremely convoluted
Are you one of the SE developers @viral patrol?
I am "Community developer" who likes to share knowledge
Gotcha. So while we can go about this in a hacky way, it wouldn't be ideal for the long run. We just have way too many users that having something hacky in our experience just causes more confusion and issues. We really just want to talk to a staff member to hopefully get this figured out in a stable way
So Styler, who messaged earlier and asked for error codes is SE Developer. I think once you get details he asked for you can also bring that topic up.
Will do, thank you for your help and brainstorming
Is there a way to make a command that responds to everyone in chat, except for a couple of people where it would give a predetermined response?
Maybe using Pastebin or something?
@static wigeon So I let the SE connection stay connected all day. Whenever the transport closes it does reconnect correctly on my end. So that second issue doesn't seem to be an issue atm. But there's still the first issue
Hello guys, could someone help me? In which part of the css do I change the size of the emoji?
I thought it was here ... but I think I'm wrong. can anybody help me? (mark me when you can help me please)
someone please?
width: 1,1em;? shouldn't it be1.1emthere?
@crisp needle Ah, I already fixed it ... but nothing changed
Well... first of all - what is the widget you are editing there? The info you've given is really lacking :)
hi guys ! do you know what's missing in this code to make it work on streamelements ? https://github.com/DekeTonucci/Twitch-Horizontal-Events-List when I copy / paste the code nothing appears
I think I fixed that event list before. Let me find it @tropic wagon
Oh thanks ! 🙂
Thanks again for your help @broken coyote 🥰 🙌
no problem!
Anyone have any ideas for doing polls?
Anyone else having issues with events not showing up?
i seem to be missing follow and host events intermittently
for context i'm using the kappa v2 rest request to get the data.
I know the events have happened as chat tells me, but nothing in the data returned or the activity feed in ground control or the website.
I suspect a connectivity issue between SE and Twitch but I have no technical data to back that up
@ivory heath Do you see a pattern to it?
well hosts do show when raided, but stand alone hosts are hit and miss
same with follows
i get all the data that is in ground control when i do a historical data pull
e.g.
/kappa/v2/activities/"+ channel_id + "?types=subscriber&types=tip&types=host&types=cheer&types=raid&types=follow&types=merch&after=2020-11-11T09:00:00
but some events are just not showing at all
I'll try to take a look
👍
Regarding hosts, it could be the requirement of >= 1 viewers to appear.
is it possible to host with <1 viewer?
i thought the min viewer count was 1 with the hoster being the 1
We have a minimum requirement of 1 viewer because of abuse and the sheer rate of events.
Not having that requirement would ingest more hosts than followers if that puts it in perspective 
i'm not sure i understand.
I didn't think it was possible to host with <1 viewer. but i'll keep that in mind
Well... first of all - what is the widget you are editing there? The info you've given is really lacking :)
@crisp needle sorry for the delay in responding @crisp needle! The widget is exactly the one that @sturdy oak marked
quick question, i have a custom widget that reads from data["subscriber-total"]["count"] on youtube, but how often does it check? cause it's been stuck to the same number for over 3 days now
quick question: is the spam filter RegEx different from the command RegEx syntax?
If not, then I want to report a bug 
@charred vortex That depends on where you put that line of code, if it is under onWidgetLoad it will only grab the sub total when the widget loads, instead use onSessionUpdate so it grabs the total subs at widget load and also when there's an event
@heady orchid You can try increasing the height and width
@heady orchid You can try increasing the height and width
@sturdy oak already tried ... and nothing happens.
let me have a look
hmm @viral patrol I seem to have found a bug in that widget
@heady orchid change height: {emoteSize}px; to this height: {{emoteSize}}px; and you can change the emote size from the fields on the left
@heady orchid change
height: {emoteSize}px;to thisheight: {{emoteSize}}px;and you can change the emote size from the fields on the left
@sturdy oak I tried to apply this and it wasn't either. I'm going crazy kkkk
did you get to test on your side?
sure did, and it worked
@heady orchid The updated code is not reflected in existing ones, I recommend deleting the overlay the widget is in and reinstalling it
@sturdy oak aaah is not possible .-. can you send me a print of how is the code there please?
That should solve the size problem
@sturdy oak there really is some previous code hindering me to change this emoji size change. My head is already frying right now. I can share the code with you and maybe you could show me where I'm going wrong?
If you click the link I sent above, it will add the widget with corrections made to your overlays
And you can change emote size on the left panels
@sturdy oak Oh, ... Thank you very much friend!
np 😄
@sturdy oak i have the data["subscriber-total"]["count"] inside the onWidgetLoad to start with and again inside an onEventReceived that checks if the new event is subscriber-latest and then gets the total, but it doesnt work. not even on load
@charred vortex Post the JS
onWidgetLoad
data = obj["detail"]["session"]["data"];
fieldData = obj.detail.fieldData;
let main = document.getElementById("main-container");
main.innerHTML = "<div class='text-container' id='text-container' style='color: " + fieldData.textColor + "'>" + data["subscriber-total"]["count"].toString() + "</div>";
});
onEventReceived
if (obj.detail.listener != "subscriber-latest") return;
let newSubcount = data["subscriber-total"]["count"].toString();
});```
i didnt send everything cause it would be a mess over here 
Is this your first widget?
Well you clearly could have shortned and simplified the code here
probably
change onEventReceieved to onSessionUpdate if you're not doing any animations
i am doing animations
then you cant use data in onEventReceieved
you have to create a vaiable subCount assign it in onWidgetLoad and increment it in onEventReceieved
window.addEventListener('onWidgetLoad', function (obj) {
data = obj["detail"]["session"]["data"];
fieldData = obj.detail.fieldData;
subCount = data["subscriber-total"]["count"];
});
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
const data = obj["detail"]["event"];
if (listener=='subscriber-latest'){
subCount += data["amount"]
}
});
@charred vortex Here's how you can structure it out
👍
it still shows the same number onwidgetload tho..
0?
Well you should have told me that
ohh is it
But it seems like your aggregate might be off somehow
@viral patrol Found a bug in the chat widget
This one #widget-share message
@charred vortex Click this
I saw your message. Was it the one with replacing {emoteSize} with {{emoteSize}}?
@viral patrol yeah
Both templating variables will work 😉
@charred vortex Click session data and change your subscriber numbers
@viral patrol I thought so too, but the emote size didnt seem to change
@charred vortex Click session data and change your subscriber numbers
@sturdy oak i reset the session data and now it shows 9. nice. thanks!
👍
@viral patrol lol idk why it didnt work for me
Voodoo.
Hello! when the body params will work for this one? https://docs.streamelements.com/reference/redemptions#storeredemptionsbychannelanditemidpost
okay, so, again, someone subscribed on youtube but the count didnt go up. i had to go to the totals and reset them manually.. unless it only works when im streaming, which i dont know why it would..
@charred vortex Does emulation work?
yes, when i emulate a new subscriber it works just fine.
maybe because "session" starts when the stream starts
every other widget i have works, so i dont see why this is not updating
maybe the event is actually not received for some reason
That's not a possibility
im going under the assumption that youtube is like twitch, in the sense that every time someone clicks the sub button it sends out an event and it doesnt send one event every x minutes
It send one when the event happens, streamelements stores those events and sends them out everytime your widget loads
and also when there's an event
what i have done is i have connected my youtube account to streamelements, made that widget and i put it on obs, which i use to stream on twitch. is there a possibility that breaks things?
okay, let me try again
now i have to wait for it to figure out i unsubbed from myself 
you can't sub or unsub to yourself
i mean from a second account
anyone to help me?
@uncut heron Body for this should be like:
{"input":[]}
But... This endpoint is for viewers, not streamers, so you won't be able to redeem an item on user's behalf with streamer's credentials token.
If that item requires input, you should provide each input/value on payload
ok, I will try here, tks
@static wigeon have you ever had a chance to look at the conversation I had with lx a few days ago
do twitch resub messages have a max length?
oh nvm, I found it. 255 is max length 😄
hi, how can i apply for streamelements oauth2 credentials? this link: https://strms.net/oauth2_request which I found in the docs doesnt work anymore
@celest flame It's currently closed at the moment while it's being "reworked".
@hardy walrus ok, so for now I should handle the authorization by asking users to enter their JWT token on my app right? is there any date when I can expect oauth2 to be available?
As far as the 2nd question I can't answer that as it's being worked on by others.
ok, i understand, thanks for your response
The first one I can't answer but are seeing if someone can since that stuff is beyond what I know of.
Unfortunately as I'm heading to bed I can't really answer beyond this but hopefully they're able to give a better response.
Hi! Unfortunately at this moment OAuth2 is on hold. We have no ETA for next opening. For some cases you may want to use jebaited.net (which is MITM proxy for SE API) with limited scopes (users decide what scopes may be used by app)
after quick research i dont think it will work for me as i am developing a mobile app which ideally would open in-app browser with a streamelements sign in form, the completion of which would result in navigating back to the app
so i guess ill stick to JWT for now, but im looking forward to implement oauth2 in my app 🙂
Sure. Got it. Can I have any details about this app as you made me really curious 🙂
sure, im making the app for IRL streamers which would allow to read their chat (with BTTV and FFZ emotes), play TTS alerts, and control their stream (eg. start/stop stream on OBS using remote connection, or edit title and category on Twitch)
and SE oauth2 would allow me to implement linking SE account in easy and user friendly way 😄
What's the object to listen for to grab a purchase event?
Can't seem to find any docs about it or emulate it
@static wigeon had a repeat issue tonight. Follows were showing in the overlay alerts, but not in ground control and not in the API. I should have a clip of it which I'll dig out tomorrow and post
Is there any way to have communication between alert box widgets on different platforms to basically merge them into one alert box? I plan on starting to multistream soon and I think the alerts could be an issue
Hi! is there any way I can make it in my chat widget that texts in chat slide in from the right / left side
Fairly certain one of the widgets in #widget-share can do that. As I'm on mobile atm not even gonna attempt to look.
Purchase as in merch event?
The one that you can use xsolla and have it show up in the dash
It's an activity post to the api, and the only way I get the emulation is if i replay the alert
@viral patrol Can help you with the api ⤴️
the post to the api works just fine, it's just that I don't get the alert to the overlay unless I replay the alert
@static wigeon or any other dev
This is what I was taking about.
Events are intermittently not showing in the activity feed and the api, but the do show on the overlay.
Here is a clip from last nights stream
1st link failed for some reason
OK looks like clips are playing up this morning
Hopeflly captured it as a highlight below
https://www.twitch.tv/videos/808154116
what is even stranger is that the events seem to have synced up overnight
Hello,
I don't know what happened, but something changed with the overlay (credits) at the end of the stream, nothing is displayed even when there was an action on the stream.
When I go into the session data and add manually, it works though.
Before, I always had the title "thank you for your support".
And now, nothing.
Even when I go into the overlay changes, it doesn't show up anymore. The only credit that appears is credit roll that I don't use.
@viral patrol Thanks
There are two widgets there, one collects data on load. So to make it work you need to reload overlay (switch scene, when overlay source with credits has "Shutdown source when not visible)
Yes, but it doesn't work anymore.Before, all I had to do was change the scene.
I had even put a 7 second start time for the scrolling to sync with the music.
Now nothing is displayed anymore.
We're not able to troubleshoot issues with using our overlays in StreamLabs OBS (SLOBS) as we don't have the tools to support their software. We recommend using OBS Studio or OBS Studio with our plugin OBS.Live.
I have streamelement obs, i have a theme SLABS
Ah.
I just tried to delete everything from reinstalling everything and I still have this problem. Nothing is displayed and even in the overlay preview, it should be displayed as before but now nothing. @viral patrol
Getting too used to the streamlabs theme, after 2 years it's difficult to change it @hardy walrus 😄
Ohh. One more thing - it won't display anything if there's no data in session
Even with data, at the end of the stream there is nothing.
And even before, there was just the title that appeared even without a session and I liked it.
Recommend a better one by one of our own https://obsproject.com/forum/resources/twitchy.813/
About:
This is a very modified version of the "Dark" theme shipped with OBS. It contains code snippets from the themes "Acri" made by @Warchamp7 and "Rachni" made by @Fenrir. Those themes are also shipped with OBS. This theme is mainly meant for...
Okay, it works.
I think the solution was to just reload the overlay.
Weird, because I close everything every time so it should reload or not...
But I did what you told me, I added 1 to follow, save, reload overlay then I put 0, save, reload and my title is displayed as before.
Perfect, thanks a lot
Ouhhh i like too this theme @hardy walrus
regarding events not showing up in the V2 API, is there any rate limiting?
Currnelty my application is polling every 5sec for the last 30sec. could that be contributing to the lack of data intermittently?
Does anyone know a way to create a command that would show the last clip that was made on your channel? I know we can do one for Tweets etc, but one for the last clip would be awesome!
@ivory heath your app should respect x-ratelimit response headers. They display how many calls do you have remaining in a specified period per bucket/overall
@viral patrol Where can i find documentation on this header?
I do not see anything in the API docs but i could be looking in the wrong place i guess
my data set comes back empty if there is no data
In order to guarantee API stability, there are a few rate limits in place.
If a limit is exceeded, an error is returned: HTTP 429 (Too Many Requests).
When you make an API request, you will receive a set of rate-limiting headers to help your application respond appropriately. The headers are:
x-ratelimit-bucket The bucket that you are currently using.
x-ratelimit-remaining The number of requests you have left for the current time interval.
x-ratelimit-reset A Unix epoch timestamp of when your rate-limit window will reset.
So if you have return code 200 it is not because of reaching limits
ok looking at my debug node to see what i can configure it to display
ohhh hello!! that's more like it
so the rate limit is 1000 but for what duration?
and if my app is open wile ground station is running does that also eat into the rate consumption?
So i have been watching this poll for the last little while and i have not gone below 900 requests remaining before its reset back to 1000
so the issue of the events not showing up is not due to that
I am not sure about duration rn, but you can easily grab it from ratelimit-reset header
yeah it's not a rate limit issue
its really strange the overlay sees it but the API/activity view doesn't
Hmmm. For real time events - maybe it would be better to use websockets instead of calling REST API periodically?
true, but i have been unable to get websockets using socket.IO working in node red
to the point i broke one of my dev environments trying 😄
Wait. So you have your service in node and using rest API? Sounds like using a fork to hold a spoon 😉
Check this one for working WS interface using socket.io: https://discordapp.com/channels/141203863863558144/259680142459142144/633144423055622165
Hi, trying to update I get this
Any idea why I can not do it?
I am using Windows 7
You can get install package directly from: https://streamelements.com/obslive and start it when your OBS is shut
Overlays use websocket, then events from it are translated to "onEventReceived" and "onSessionUpdate"
Ok, so I am seeing the issue in the overlay where the activities event doesn't show up in the overlay until I replay it from the dashbaord
Hmmm. Do you have alerts paused by a chance?
that's a good questions
ha
Is it better to use onEventReceived or on SessionUpdate specifically for activities?
@viral patrol Alerts were not paused btw...
It depends on what are you trying to achieve.
If you want to display latest event of a type, or a number (basically a label) then onSessionUpdate is the best way to go
ok
Hey guys, I hope this is the right place to post.
Before I rewrite the thing: I'm looking to extend the existing cheer goal (Labels > Bits > Goals > Cheer goal) widget. Basically, I want to extend percentage completed to display n decimals. In my use case, the bits goal is over 10 million, so this is very useful.
Is there any place other than the widgets repo on github I can refer to? Or do I have to rewrite it?
@viral patrol, I can confirm that if I post to the API an activity of some sort, it shows up in the activity feed in the dashboard and does not trigger an alert. Only when the the activity is replayed does it trigger an alert int he overlay. This is both in my custom overlay and the default SE one. Is this expected behavior?
@tame heart I think you can look on #widget-share but almost every goal widget is an extension to this: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
@magic prawn definitely not expected behaviour, events should go directly to listener. You may want to add Eventlist (both native and custom) in order to check if it is overlay wide or just a single widget
It doesn't work with the SE Event List widget
Is that a widget you emitted or one of native?
haha
This may have no all features from current overlay editor but it should let you check socket data live
@viral patrol thank you ❤️ this is really helpful!
is @elder dragon here?
I am
Great, mind if I DM you for a sec about the advanced information bar?
Sure!
Hi all, first time here so please let me know if this isn’t the right place .. I’m trying to setup subscriptions direct through PayPal and looking for a way to have them alert via widget the same as regular twitch subscriptions..
if there’s nothing existing happy to commission one
Can you elaborate? If you subscribe to a twitch channel, no matter if it is via PayPal or other payment method, alerts will look the same
From what I can tell , PayPal has the ability to send transactions using what they call IPN Notifications, just not sure how the lister would work on overlay side
Oh. You want a direct subscription, not a twitch one.
@viral patrol sorry should have elaborated , you can actually set up a direct monthly payment through PayPal ... backstory twitch is committing highway robbery at 50% cut so want to work on alternative !
In that case you will need to create a websocket that will emit an event when recurrent subscription got paid for another month and a widget in overlay editor should listen to this ws server.
That’s the part I’m not farmiliar with , where can I find information about how to setup a “listener” on stream elements side .. that is possible right ?
Sure thing. You can use socket.io within a widget (or you can also use raw communication)
One minute
HTML:
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
JS:
let token, fieldData, ignore = false, channelId;
const host = 'https://my.wss.local';
const socket = io(host, {
transports: ['websocket']
});
socket.on('newEvent', onNewEvent);
socket.on('connect', onConnect);
socket.on('disconnect', onDisconnect);
// Socket is authenticated
socket.on('authenticated', onAuthenticated);
socket.on('unauthorized', (data) => {
console.log(data)
});
function onConnect() {
console.log('Successfully connected to the websocket');
socket.emit('authenticate', {
method: 'apikey',
token: token
});
}
function onDisconnect() {
console.log('Disconnected from websocket');
// Reconnect
}
function onAuthenticated(data) {
console.log("Authenticated");
}
function onNewEvent(obj) {
console.log('Received event',obj);
// Reconnect
}
Something like it should work in your widget
Legend , thanks a ton might actually be able to hack this together myself in that case ... will make sure to reply back with the prototype as soon as it’s done !
Does anyone know a way to create a command that would show the last clip that was made on your channel? I know we can do one for Tweets etc, but one for the last clip would be awesome!
Unfortunately I am not aware of any API endpoint that could provide that. There's one for highlight https://docs.decapi.me/twitch?endpoint=highlight%2F%3Achannel
is it possible to display just a label without any input as a custom field?
like a heading
You want to use the value in a custom field as a heading?
ohh you mean label without the actual input? Im not sure if that's possible
mh :/
i have a group of checkboxes and it would be nice to give them a heading
You can add type:"hidden", label: "My Fancy Checkboxes"
Just a field that won't be displayed
oh, hidden has a label property 
yeah, I tried value, but that of course was just...hidden
thanks
Hey guys, its possible make a command trigger 2 separated messages? just for organization, or a /n, jump line, new line kinda of thing
Hello, I'd like to ask for help on JavaScript for Overlay Widgets with event from bot commands
How to change the 'deathcounter' from both chatcommands count and getcount?
JS:
// command ${count death} and ${getcount death} should trigger it
let counter = 'death';
window.addEventListener('onEventReceived', function(obj){
const listener = obj.detail.listener;
const event = obj.detail.event;
// this should be for count, but how to do the same for getcount?
if(listener === 'bot:counter' && event.counter == counter){
document.getElementById('deathcounter').innerHTML=event.value;
}
});
It is a death counter followed by these instructions but I can't find documentations on bot:xxxx or event.xxxx
https://www.youtube.com/watch?v=1gXtDGz4tYo
Anyone here have a sample REST client file from Visual Studio code or perhaps an example of hitting the Session end point?
any idea what i'd need to change in custom css on custom widget to make recent events display as a row and not a column
@pulsar willow This widget could probably help #widget-share message
@late sail check the message event if somebody entered the text of your command.
For example if the command is called !deathcounter you can just check if any chat message contains that command text
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#message
@tribal zenith I wonder how you see events in your browser - firefox F12 Shows a lot but couldn't see commands yet. Any hint where to look? Debugging would be a blessing.
Your link shows a much better option, trying to set it on widgetload it should show the proper value right from the start. Still I'd like to advance here so if you could help where to look for any option to see what is sent etc would help.
you can listen for messages like you are listening for bot:counter in your example above.
you can just add
if(listener === "message")
{
console.log(event.data);
}
to inspect the object
the messages text content should be in event.data.text
Thank you very much you helped me a lot.
no problem
@late sail oh and one other thing:
Try to avoid setting innerHTML, if not absolutely needed. Use innerText or textContent instead
devs, do you have any exchange for moobot to streamelements extension?
I have an overlay with two boxes.
Active Subscriptions & Daily Subscription Goal.
Every 60 seconds for 60 seconds, I want to fade out that information and fade in Top Tip & Top Bits.
What is the best method to achieve this?
Would I have to custom build this in CSS as a custom alert?
Please @ me if you can help and thank you in advance.
@random pebble You would have to make a custom widget, and the idea you have is called a rotator
Have a look at this made by @elder dragon https://strms.net/advanced_bar_rotator_by_coocla33
👀
That's just for an idea don't rip it off lmao
Ah, I thought as much. I've actually already looked at that and I don't think it has the customisation I need. I'll double check in the morning.
Have a look at how the rotation is done and you cane make something similar
Thanks for the help!
Hey guys, what are the limits to the custom widgets?
@naive fractal Endless Possibilities
I see, all I wanna do is make a kingdom hearts esqu bar around my webcam, what languages do I need to know?
@naive fractal idk what that a a " kingdom hearts esqu bar" is but im sure it will be possible, you will need to know basic HTML, CSS and maybe JS depending on your project
So you want it to reflect your health in game or you want to use it as a goal bar? @naive fractal
Ooo I didn’t even think about that in game one
But yeah both
*goal bar (could I use it as a health bar?)
Goal Bar for sure, but health bar is already visible in game so why would you need that @naive fractal
Call of duty, Destiny, etc
Dont they have health bars?
Kinda? CoD doesn’t, at least it’s not a bar, you kinda just tell with how red it gets
I don’t actually know if destiny does or doesn’t
@sturdy oak
My advice would be first learn to make a goal bar, then go ahead with a health bar
😮 we can do it though? Wouldn’t I have to access something for the health bar
I’m sure that there’s a value, but I figure I’d have to access a value in the games files, and I think it’s anti cheat wouldn’t allow me to @sturdy oak
Pretty sure health values are not stored locally, look for an api if there is one
There is an api, but it looks like there’s nothing to let me access values like health @sturdy oak
There is another way, but you'll need to update the health value manually via commands
and that's not efficient
Tragic
Maybe just use a key as a constant condition?
If W is pressed then update
okay but it will update to what value
@random pebble You can check this one too https://streamelements.com/dashboard/overlays/share/5fa5aebb0584c9b08b0756c3
s'up peeps
Is there a way to reference an image uploaded to the SE library via a custom widget?
I.e a widget contains a couple of images, someone can select the image from the library. Is that possible to pass and do via the fields.json?
Leaving the answer here since I just found it:
Use "type": "image-input"
image/sound/video input fields can also have "multiple":true
so able to select multiple images? How does that get passed to the data?
the result on the code will be an array of urls
that's far simpler than what I planned then, thanks mate
Example usage is in "ultimate text widget" on widget share
Where you can use inline variable like {image.1}
so i have a jquery animation in a function. how would i call that function whenever someone follows or subscribes?
window.addEventListener('onEventReceived', function(obj){
const listener = obj.detail.listener;
const event = obj.detail.event;
//check your listener for the desired events and call your function
});
subscriber-latest for example
thankyou, thats exactly what i needed
using the eventlistener, the animation is a little delayed and if multiple events happen at the same time it takes abit of time to play the animation again
may I add that chrome browser got some problem with my custom widgets so I use firefox or opera to visualize proper function
I can try that but I also tried it in obs and it was the same
Hey, I’m looking at a video another streamer made, does anyone know is Shroud has any code in his alerts
Or is that all in AE
(After Effects)
Obs uses chromium for their browser sources so if it doesn't work correctly on chrome it probably won't work correctly on obs either
@neat tangle then your jQuery animation probably takes too long at some points. Maybe you are better off with timelines
What are the exact ratelimits on the SE_API store and get thingies?
I’m starting to realize that the bar itself is html and css and the functionality is the actual health bar
Thank you @viral patrol, that's close to what I want. I'll see what I can do with it but think I'll ultimately need to just either get it made or go without.
Hello everyone. I need to do eventlist. There is a one eventlist in streamlabs. Its name is slick theme. I want the same one. Can you help me please
Hey guys, web dev with limited stream experience hoping to get some ideas about streamlabs before I jump in. Is it possible for me to playback lottie files? or any bodymovin style library that will let me animate elements and start / stop at certain intervals. Can I use the api to incremement custom events / goals?
Hello everyone. I need to do event list in streamelements. There is a one event list in streamlabs. It is really popular. Its name is slick theme. It is simple and basic. And it is free. I want the same one. Can you help me please @everyone @here
@spark kettle Basically you can create an event list and add a background like:
.event-container:last-child {
background: #cccccc;
}
@frozen latch Yes. You can use any HTML5 compatible elements in widgets
thank you very much. You are the best. Appreciate it @broken coyote
What do most people use to make their custom widgets?
visual studio code
I use my powers to ask others like lx
OK. You won.
lol ok thanks yall. I haven't coded in years and wanted to see if there was an easier way than .txt files with html lol
is there documentation on how to reference events in js for custom overlay actions? I've got some that I imported from my twitch profile to facebook and would like to get them functional for facebook alerts. Also just to learn how to do it. I've searched around but I think I'm just asking about it incorrectly.
take a look at the channel description
IF ONLY I COULD READ! RIP! Thanks!
you probably wanted the Overlay Editor documentation
yep that's exactly it
@broken coyote you sent me event list. But there is one problem in this event list. Subcribe problem. When someone only subscribe it is directly shows Resub X1 in this event list. But it has to write Sub. If someone resubscribe to me, than it has to write RESUB. Can you fix it please
I've changed my username from theager to eager and since then my chatstats aint loading https://stats.streamelements.com/c/eager

Hello! I have a request! I would like a custom widget that simply displays the number of days duration that have passed since March 13, 2020--the start of COVID in Canada. Can anyone point me in the right direction? Cheers!
TimeandDate dot com has a calculator
@gaunt ledge I don't have the time to do this, but this should get you most of the way there
https://date-fns.org/v1.30.1/docs/distanceInWords
@gaunt ledge there's many endpoints in this library so you can poke around if you'd like back a more specific timestamp rather than a string like "6 months and 4 days ago"
var result = distanceInWords(
new Date(2020, 3, 13),
new Date.now()
)
Edit: It also just occurred to me that you might not be a developer but if you're not you can send one this message and they'll know lol
Definitely not a developer! Would love a result to be an integer for number of days.
I’m trying to recreate another widget I’ve seen for practice, in the HTML section all I see is this cloudfair stuff and some other things, what is it?
Also, @gaunt ledge when do you need this by? Because I’m not near my usual computer so my capabilities are limited, but in January I can begin working on this. It seems simple enough
But also I’m a novice, and recently learning HTML, CSS, and JavaScript (although I know Java, C++, C, and SQL)
I'm manually updating the day number, so that's my "workaround" LOL. Any help appreciated.
How are you looking to have it work? @gaunt ledge
Like a animated alert that slides on every x minutes?
Just a variable inside a custom text field. E.g. Number of Days: X Days
And it permanently stays on screen?
YEs
Oh, that should be easy enough. Doesn’t HTML just have a counter?
I will shave off my beard once a COVID vaccine is widely available, it's been X days
@gaunt ledge Are you looking to have any accompanying graphic or anything? Or are you legitimately looking to just get the value back for the number of days?
I'd like the legit number to autocalculate and include that in plain text on an overlay. I'm guessing I would use the Custom Field option in SE
Today is 256!
@everyone @here There is an event list in the link I sent. There is only a problem in the Subscription part. When someone new subscribes, it shows "SUB X1". When someone renews subscription, it shows "SUB X2, SUB X5". This is wrong. When a new subscriber arrives, it just needs to write "SUB". When a person renews a subscription, it should write "RESUB X2, RESUB X3, RESUB X8". Can anyone fix this code? https://streamelements.com/dashboard/overlays/share/5e725fa8c91908168c26abae
So when someone resins it should count the amount of times correct?
And when a new sub comes it’s new sub
If I can get my Laptop to work I can look at that for you
Also does anyone here know what that code means in the image I sent
I am open to any help. There is a little error in the if, else coding part.
I’ll take a look at it in a moment 🙂
i added it. @naive fractal @spark kettle
side note. it didnt need "fixed"... it was just set up to be Xmonths, rather than SUB/RESUB.
Thank you very much. I will come to your broadcast. Stay healthy @broken coyote
@broken coyote thanks!
Hello. Is there official limits to the number of requests to the API backend? Is 2 requests every 20 seconds reasonable pacing?
@worldly mauve I'm using your current game widget and quite often I notice that I get this error from it. Usually it resolves itself after a couple of minutes, but just wondering if there was something I could do to keep this from happening?
@cloud iris let me look into it I back use decapi for pulling the game info so possible something with that?
Hi Guys ! Do you know what to add in this code : https://codepen.io/carlos-ernesto/pen/xxOaXVp to make it work in StreamElements ? I tried to use MrBoost JS from his widget but it didn't work xD
I'd like to stop using Streamlabs
OR is it possible to transform MrBoost goal widget into rotating widget ?
@broken coyote ^^^^
I didn't want to bother him again 😂
thats a SL widget
I try to learn coding alone so i have some difficulties especially with Javascript ....
you will need a wrapper to convert it. orrrrr will manually have to convert it
So I have two questions regarding custom widgets and the programming behind it: 1) Is it possible to filter fields based on other fields that you've selected? 2) Is there a way to call stored images on StreamElements? The idea behind it is that we select a team, and it changes the team member dropdown to the members in that team. When the team is selected, it changes the image based on the data.
is there a variable that like ${touser} / ${1} that removes the @ and just leaves the name?
can anybody help me with obs im having trouble opening it
@steep wagon ${channel ${touser}}
Hello I'm currently using the Benno socials widget. Is there a way by custom css to add a delay (the display starts from X seconds) and an appearance time (after X seconds, the display stops, and restart after a delay like see above) ? I don't want socials to be permanently displayed.. Thanks
you could use setInterval in JavaScript and toggle a class for visibility every X seconds
@dire walrus fields in custom widgets are static and readonly. So no, you can't do that within fields, but check values in code and change what should be displayed
Thank you. While searching on my side, I also found setInterval (or timedLoop) interesting, but I couldn't find the callback function to "display/show the animation every X seconds" :/ Javascript is new to me
In vanilla JS you could do
document.getElementById("yourElement").classList.toggle("yourClass")
but I can take a look at the widget and refactor it to add an interval with field options
Late response, but the first line loads Google Fonts, second line loads animate.css (nice css animations for elements), third line is anime.min.js (don't know that one)
Last line is just an element which on itself does nothing.
Ok, it seems more complicated than i thought :/ And beyond my abilities. Thank you
actually there already is a similar option called Time before socials repeats itself (almost at the bottom). If you set that to 10000 for example, it should be delayed by 10Secs
But if you can/want take a look, that would be great 😉 (and it would be useful for a lot of users I think)
it's in ms so 1000 = 1 sec
Yes I saw that while digging a little. At first I didn't feel it was working, but in the end it seems to be good
Maybe i set a bad parameter
Finaly, the only problem is that it doesn't loop. We can't define a display time -> the socials are only displayed once and it stops
For example, it would be good to be able to request a display for 5 minutes in a loop, and then with Time before socials repeats itself define the interval for resuming the display
I almost did a complete rewrite of it, so once it gets updated I'll send you a link
Oh really ? So thanks mate, I wait for your update
And if it can help to improve a bit more, I noticed a problem with the "enter" and "exit" animations (in "Animation Settings").
Those corresponding to the "animation in" and "out" are working (animation between the different social networks).
But animation for the first input display and the exit when display disappears seems not to work
Thank you anyway for your help
that should be fixed as well
hello, i emailed earlier about getting paid for a sponsored stream I did and I got an email from payments@streamelements.com I was wondering if this was a legit thing? it was about a streamelements payment portal through tipalti
Yes it is legit
hello I install streamelement and I need some help for the TTS to know how it can be used thank you.
i use google translat sry
I would like if possible to put a text to announce an arrival on my live without a follow thank you for your help
anyone ?
Hi, can someone help me with custom CSS?
@olive steeple Unfortunately SE TTS works only with alertbox. But if you want something like that, you can use a widget and prerecorded audio
Like this one: #widget-share message
@covert rain Hi! How can I help you?
Hi, so I'm trying to do the custom CSS thing but it's my first time.
I've successfully set up my Follower and Subscriber alerts however I am running into an issue with the HTML of the tip alert
I think I may have removed a certain part of the HTML because I don't see any text when I try emulate a tip event ( I do see the video file tho)
Nevermind I just compared it to a public alert box. My HTML appears fine. The error must be in my CSS
Video has different structure. I recommend checking documentation here: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
Thank you!
Hey all.
I have a brainstorming question. Does anyone know of its possible, with a bot chat command, invoke an event, or trigger an overlay, or an overlay widget, etc?
I know I can do an external HTTP request with a bot with ${urlfetch ... } but I am not sure how to circle back to Streamelements in that case. Doesn't seem to be any APIs regarding custom events, or something like that.
If anyone has any goofy ideas on how to build something like that, would be interesting to hear!
listen for chat messages and check if a posted text matches your trigger
then you can trigger whatever function you want to
using which streamelement tech, when you say "trigger whatever function you want"? is that a widget you mean? or API?
Oh ok. Ive seen the custom widget, but I only thought it listened to the events that was mentioned in the code.
For for chat messages as well
cool, thanks, ill check it out!
I suggest to not mix events, if not explicitly needed. Have one widget for stream events (subs, resubs, tips etc) and one for chat messages, so they have separate queues
but yes that is how you would do that
@pulsar willow the widget should be updated now and you can find it here: https://strms.net/socialmedia_rotator-by-benno
let me know if that fixes your problem
Thanks for your update mate
It seems to work (except the enter and exit animation, but I didn't test it in live, just on the SE overlay preview)
however, there is a problem with the text and custom logo alignment :/
original widget
which animations have you selected?
Enter : Bounce In
Exit : Zoom Out Down
I tried different combination but still the same result
like this?
that works on my end 🤔
No, in the "animation settings" folder
oh, no you have to set them in the animations tab of the widget settings
what you say (in and out animation) works perfectly
oh, ok I thought I could adjust the enter and exit animation of the display (in addition to the transition between socials) so it's good, animations works
for the alignment, i tried to edit css but no conclusive result
you mean the horizontal alignment?
like, the space between should be smaller?
oh wait, I see now what you mean. Hold on
Hey guys! 🙂 I found this CSS for this cool event list widget but I don't know how to install it on Elements 😦 I tried to create custom widget but with only the CSS it didn't work. Any help, please? https://nerdordie.com/product/twitch-alert-event-list-css/ Thanks!!
Customize your Twitch Alerts Event List with our custom CSS code. This item requires no purchase. Watch the full setup guide. Copy the code below @import url("https://fonts.googleapis.com/css?family=$font_family"); html, .widget-EventList li > div { -webkit-transform: rotateX($rotate_x) rotateY($rotate_y); transform: rotateX($rotate_...
@pulsar willow try replacing your CSS entirely with:
@import url("https://fonts.googleapis.com/css2?family={{fontFamily}}:wght@{{fontWeight}}&display=swap");
body
{
margin: 0 !important;
padding: 0 !important;
}
#container
{
width: 100%;
height: 100%;
font-family: '{{fontFamily}}', sans-serif;
font-size: {{fontSize}}px;
}
#container .slides
{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
visibility: hidden;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: center;
align-items: center;
}
#container .slides.animateIn
{
animation: {{animationIn}};
animation-duration: {{timeIn}}ms;
animation-iteration-count: 1;
}
#container .slides.animateOut
{
animation: {{animationOut}};
animation-duration: {{timeOut}}ms;
animation-iteration-count: 1;
}
#container .slides .username
{
flex: 0 0 auto;
color: {{fontColor}};
font-weight: {{fontWeight}};
padding: 0 10px;
}
#container .slides .imageWrapper
{
flex: 0 0 auto;
max-width: {{fontSize}}px;
}
#container .slides .imageWrapper .image
{
height: {{fontSize}}px;
width: {{fontSize}}px;
display: block;
}
sorry for the long codeblock
@grim star TwitchAlerts was the name of Streamlabs a long time ago :D
So it doesn't exist anymore and you would have to replace the old variable names with the StreamElements ones
and the selectors of course
Aaaaa, let me try!
Didn't work 😦
But I think I'll change the layout to an easier one, so thank's anyway! 🙂
oh, the css code was for something else 😄
I might be able to help
I still accept help hahaha Although I'm almost giving up
there is a decent starting point @grim star
Aaaaa, thank you SO much ❤️
Done. It's better 😉
but the text is still not correctly centered vertically (compared to the original widget).
I managed to reduce the space between logo and text with padding, but I'm stuck on the vertical alignment
thanks for your time
Yas, thank you guys :)
@broken coyote Im not a lawyer, but seeing that gif made me spit my coffee out.
is there a way to have a shareable link for my overlays in streamelements? i did overlay for my friend and i want it to send to him with only one click
@solid moat you can share to his dashboard with editor access
thanks @pseudo siren 🙂
@pulsar willow can you pm me a screenshot of what you mean?
@shell tree 🙂

is there any way I can pull current viewers
https://decapi.me/twitch/viewercount/:channel, but it's not realtime
not realtime as in a delay?
kind of, yes. The Twitch API only gets updates in intervals, but I don't know the exact seconds between
yeah the twitch stats in OBS are delayed too, that will do
The viewer count in the activity feed has a lesser delay
Because it is has per user bucket and decapi has one bucket for everybody
Hey everyone, I was wadering if someone could steer me in the right direction. Im looking to see if it is possible to send out a call from within a custom alert in SE so that this then can trigger a websocket and then in turn control OBS?
I stream FB Gaming so im looking for a way to make this possible?
Stars Sent -> Alert Triggered
-> Code Executed to trigger WebSocket -> Contact6s OBS does required task?
I have looked at quite a few of these but they are all designed for twitch i think, as it stats platform mismatch 😦
I've seen people in chat of a streamer use a command "!say <text>" and it would play on stream using a TTS Voice - they used Streamlabs OBS - is there such a feature in Streamelements?
I dont think there is, I would love for there to be more power behind the alerts so we could get very creative.
I could be wrong though mate
how do i take out points as - number, when i put ```javascript
var removepoints = args[1];
setUserPoints(username, config.data.seChannelID, -removepoints);```
it adds up not removing points in amount?
only i getting is status code 400
im directly doign custom bot :/
using SE Points as my Interactive stuff
With direct link to SE API?
Seems correct. Are you sure your link has negative number?
like https://api.streamelements.com/kappa/v2/points/324234234/testUser/-500
pulling out this?
async function setUserPoints(user, channelID, amount) {
try {
const userAPI = `https://api.streamelements.com/kappa/v2/points/${channelID}/${user}/${amount}`;
const response = await axios.put(userAPI);
} catch (error) {
console.log(`Set user points error: ${error}.`);
}
}```
to `setUserPoints(username, config.data.seChannelID, -removepoints);`
and code works
just why doenst do - it only can +
less i need do -${removepoints} in there
What do you get if you do console.log(userAPI) when using negative value?
just im building like minecraft Interactive using Rcon and Se points since im too lazy make system read active chats just get points even i dont know how to anyways 😛
Hi! Does anyone happen to know how to share objects between multiple custom widgets in the same overlay? I know SE_API.store is a possibility, but I'm finding it to be inconsistent when putting and getting the objects. If there's another way around this, I'd love to know! Thanks.
It's super consistent, what about it is bothering you?
There's one thing - you can store simple objects only, so if you try to pass an object with method, it won't work.
When the object is updated in the store in one widget, will it update the information in a second widget?
@elfin arch with the same name yes
Alright. I haven't had a chance to play with that. Wasn't sure if the updates worked like 'web hooks' and auto refreshed.
But you need to read it from another widget as no event is emitted
Anyone here know if you can have something display the names of all current subscribers?
Trying to edit the code in a widget
Depends on the platform and even then I'd say there's a limit from your respective platform.
Mainly because for youtube it doesn't list all of them due to privacy settings and twitch I think the returned list is paginated.
Yea sorry I mea t twitch only
Would I be able to do some kind of workaround where I have it list the names of the last 20 subs or something like that?
i think there is a "credits roll" thing? not sure if official or in the widgets channel?
Yea that's what I'm editing
Currently 8ts set to only show data from the most recent session
So I was looking to change that but didn't know if what I was trying to do was possible
You can grab latest 25 subs from subscriber-recent
That doesn't only display the single most recent?
You can have the latest one from subscriber-latest
Or if you want a full list, this is something that may be helpful for you: https://github.com/Decicus/DecAPI/blob/72b7c12cc6c778602dce7c83f33379120e721bb7/app/Repositories/TwitchApiRepository.php#L295
Interesting. Thanks. Gonna go to sleep and mess around with this widget more tomorrow
switch channel @steady iron 😉
Perhaps inconsistent wasn't the right word. So I'm trying to have one widget fetch data from my own api and 'distribute' that data to two other widgets (rather than having all 3 widgets fetching the same api). Whenever there is an onEventReceived event, and depending on the type of event, data is fetched from my api and PUT into SE_API.store. The other two widgets are checking if the data has been updated in SE_API. This, sometimes, leads me to be rate limited by SE_API.
If there is a way to have the fetching widget emit an event, or something similar, my other widgets wouldn't have to constantly be checking if the data has been updated. I know @viral patrol has mentioned something about 'reading' it from another widget, but I don't think I understand what they mean by that.
or use the socket API on your own server/API and let the widgets wait for events from there
so your server processes the events and your widgets just consume the result of that
Yo @zenith folio @empty crown said that one of mods were seeing me say the n word in which i did not do so yeah sorry for being a karen about this
@zenith folio is a bot xd
Hi everyone, the other day I saw a streamer who had a timer in his overlay, which was set up to show the exact queue time in Overwatch and seemed to get its information directly from the game. Does anybody of you know where such a thing is to find because I found it very interesting
are you sure he is not just starting a timer when he queues?
Yes iam pretty sure because when he clicked on start game the timer went from "not in Queue 0:0" to "In Queue "0:01" with no delay, so ...
That sounds pretty neat.... but unfortunately I am not familiar with any API that would do that? How would the computer know when they are queued in or when they get put into a game? Would be sweet if there was something that existed, but i'd guess it was just a simple overlay switch with a stream board
Ah well okay...but I agree with you that´d be absolutely epic, thats why I was so curious about it xD, however thanks for the fast reply and the help!
by all means; it might exist in the gitHub .... and would be Epic (pun) if open sourced. if you can find the API we can help make an overlay 🙂
It could be a local program, that reads the queue state from the memory or something, but that is pretty specific. Maybe somebody on the streamer's discord knows more
So he said, he has some way to have it automated, but he doesnt wanna share it xDD such a pity
So I see streamelements has rolling credits widget... but all it shows is the subscribers names... how can you get this to display other info and and put other text in eg Thanks for watching, followers, bit donations ect the only option seem to add the same text to every line but the last...
I looked a bit in widget share but I didn't find anything.
How could I make the "big donation text" be animated with pulses or gradients color so that it can be seen in my overlay?
Thanks
what do you mean by "big donation text"? the attached message or the name/amount?
Could anyone help please? I don't know how to edit css, but, i would like to make it so the text for my alerts swipes in from the left of the screen on the swipes back out afterwards.
hey guys, so is there a way to get an oauth token for stream elements currently?
Unfortunately OAuth2 credentials are no longer dispatched until further notice.
The name with the amount in the overlay!
I'm not talking about the alert but about the overlay, the text that is constantly displayed on the stream @tribal zenith 🙂
oh, so you mean a label? I don't think you can customize the default labels, but you could design your own
if you didn't find any fitting widgets in #widget-share you could just create your own custom widget in the editor, read the latest tip from onWidgetLoad and update the value in onEventReceived
How far is the API currently developed?
@warm needle Check https://github.com/StreamElements/widgets/tree/master/SessionDataTemplating
What happened to the Clip API website? I cannot find it?
@pulsar willow You can use this https://www.sowhoyou.com/clipcommand/
Hey guys, are there any contest StreamElements widgets that people shared?
Hey guys ive been redirected for help with CSS in here. I made the stupid mistake in deleting one of my panels and ive lost all my notifications
I have the CSS code for it but when i input the custom CSS the alert defaults back to the shark :/
You need to have not only CSS, but HTML too (and if it qualifies JS and FIelds' JSON too)
if there any way to have the default alertbox tts not read a message that starts with a certain phrase?
Hi! Anyone that can help me out with finding a link to import into my html settings from my webm file? thanks in advance!
Hello. I am partnering with ActBlue to raise money for the Georgia Senate Runoff Races throughout all of December. I have been given an official ActBlue page and am being asked for a URL Endpoint through which I can receive safe data (username, money amount donated) to facilitate the creation of a notification that could be part of my stream.
I've never made a custom notification before and I'm not sure how to do it. Can I please get some assistance?
I'm a web dev but I've never made a notification for this kind of thing before. Any help would be greatly appreciated!
Maybe some of you experts know this, I'm wanting to set a hotkey to show/hide my taskbar instead of using the taskbar setting to hide it. Can it be done? If not is there a way to entirely remove the taskbar?
hot keys to ctrl+esc
hmmm this will be worth checking out, appreciate ya @broken coyote
Is there a course or tutorial on how to code a widget in streamelements
It's basically just a website. So if you have some basic knowledge of HTML, CSS and JavaScript, you can take a look at the pinned links in this channel and start with basic overlays
if you have more specific questions regarding the API, feel free to ask 😄
Oh, I'm new to discord so I didn't know what pins were
Thanks
Is it possible to make something in Webflow and copy paste the code?
I'm not really familiar with Webflow, but if it just exports markup you should be able to copy&paste that, yes.
What is a markup?
the HTML for example
Yeah, Webflow is like WordPress you don't code, you just design and it codes itself and you can export that code
Bubble is also an example
I would probably have to change variables and similar stuff
depending on what you want to achieve, yes
also it should not depend on a whole directory structure
From what I know it has very smooth code, not bloated, I don't what a directory structure is
Why on earth are you repling@latent dust
But nevertheless what's a directory structure
multiple files
Cause I have a similar query
Wait, so the html, css and js needs to be one file?
Like widget.html?
No, in the StreamElements editor you have 3 tabs (HTML, CSS & JS), so you can separate your code, but not across multiple files
So, widget.html, widget.css, widget.js
yes and the last tab is Fields for variable user input
JSON?
Yeah
Well this just got a hell of a lot easier
the overlay editor documentation tells you more about available field options, EventListeners and variables
Okay
Hello all, ive been trying all morning to get my bot to add points through node.js i installed axios but get a 503 when i try to call
setUserPoints(user, channel.channelID, 100); I'm trying to go off the sample provided.
Make sure that your call URL is https://api.streamelements.com/kappa/v2/points/:channelId/:username/:amount
const userAPI =
https://api.streamelements.com/kappa/v2/points/${channelID}/${user}/${amount};
Like this? im confused about where im suppose to put the header, not alot of info on the site
You should put request header Authorization: Bearer ${JWT} or Authorization: OAuth ${oauth2Token}
Method should be PUT
im using
axios.defaults.headers.common['Authorization'] = Bearer ${config.token};
trying to get the setpoints function working from the page
Is my fuction im just really confused about how or where to use this header
try {
const userAPI = `https://api.streamelements.com/kappa/v2/points/${channelID}/${user}/${amount}`;
const response = await axios.put(userAPI);
console.log('API Response:', response.data);
} catch (error) {
console.log(`Set user points error: ${error}.`);
}
}```
I see that somebody had similiar issue, but it worked: https://discordapp.com/channels/141203863863558144/259680142459142144/781972117427191819
Idk if thas helps but im constantly getting the 503 error
403* i mean sorry, and thank you for the help
async function setUserPoints(user, channelID, amount)
{
return new Promise((resolve, reject) =>
{
axios({ method: 'put', url: `https://api.streamelements.com/kappa/v2/points/${channelID}/${user}/${amount}`, headers: { 'Accept': 'application/json', 'Authorization': 'Bearer ' + config.token} })
.then((response) =>
{
if(response.status === 200)
{
resolve(response.data);
}
else
{
console.log(`Status ${response.status}`, response);
}
})
.catch(reject);
});
}
403 could also mean that your token is invalid
Yup. That could be the issue. I thought about 503 and that it was using the wrong URL that couldn't be provided
Is there a place I can read the streamelements custom coded widget documentation? I need to access the top bit, top tip, all time sub count and daily sub count data.
@median dragon Check channel's topic, Overlay Editor documentation URL
Thank you!
This is what i get when i tried that, no could it because im using a bot account on my main page channel?
Yeah im using my token from my main twitch account, but trying to set this bot us with its own account.
do i need to include JWTToken or just the bunch of text?
then the bot needs the JWT token from your main account
just the text
if you try console.log(config.token); do you get the right value?
let me check
seems that way
so it seems that the function needs a channelID but if i log out channel.channelID its undefined
Also I would change inline ${error} to be printed in other line
As it is object with toString, so you will see just error, not a server response there (IIRC)
Having it in separate console.log(error) or using comma expression it should provide you more details
And without channelId - that could be the issue, as your JWT has no access to channel with empty string "" id
"channel": "sobetechgaming" , is in my json &
setUserPoints(user.username, channel.channelID, 100); is how im calling in i feel like im calling it wrong?
you lost me on the $error bit:(
Ohh. channel is string, so it doesn't have channelId property
am i doing that wrong?
I changed the error part in the code above
"channel": {
"channelId":"yourGuidHere",
"channelName":"sobetechgaming"
}
so how do i get my channel id?
good afternoon guys! I just got here, and I wonder if anyone can help me understand how to use the buttons from custom widget in streamelements
i'm using this docs https://github.com/StreamElements/widgets/blob/master/CustomCode.md
but when i click the button that appears on the left side, no function is called, i tried to use eval () to execute a string, but streamelements do not allow = /
@mild siren calling https://api.streamelements.com/kappa/v2/channels/me with your Auth should provide you details
Or...
@mild siren Please provide your account ID found at the top of this page: https://streamelements.com/dashboard/account/channels This ID is public info and safe to share here.
There
of your main account that is
@waxen granite Widget is in secured sandbox, no eval, cookies, innodb
@viral patrol oh, nice. you know how i can run a function when click on button?
i can't pass a function using json
I'm sorry if the questions are strange, I'm using a translator = /
Function should be within JS already and called by the event listener
5f02844587ef3bd1109162c1
think i got it, i'll try it now thank very much
@mild siren you just pasted your channel Id 😉
okay thanks lets see if this changes anything lol
it works!!!!!!
Thank you foreverything guys
@viral patrol it worked just fine, thank you again
The alert, store redemptions, is delayed when you put audio in the store.
That is, when you put 1 sound + image it is delaying.
The image only appears after the audio stops.
is it buggy?
Hey, I want to submit tips using API but the problem is, it will return 500 error.
https://api.streamelements.com/kappa/v2/tips/{mychannelid}
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "An internal server error occurred"
}
and this the body:
amount:500
provider:SomeProvider
message:My Donate Message
currency:USD
imported:true
Can I get a widget to set and and configure some commands which I can then use to controle it
Need assistance with the first part
there are API endpoints for that, but I believe you need an actual JWT token and not just the overlay apiToken
Where can I get a JWT token and also is there docs for this
docs are here: https://docs.streamelements.com/reference/commands#botcommandsbychannelget
but you can't get the JWT token in an overlay and should never have it as input field
you can find it here tho
#dev-chat message
@empty void you also need an user object in the body and a bearer token in the header
i'm trying to modify an existing custom widget in order to show follower goals in a level bar as a practice at the moment
the problem is i'm not sure where to get current follower count...
to be more exact i'm trying to learn how to make widgets, haha
is there a guide to start off with, where possible?
look at the pinned messages
i'm looking through them and I have no idea which one exactly you are referring to
and which question you're answering
the overlay editor documentation is probably what you are looking for
and the onWidgetLoad event should give you the required data
... oh that's not a pin
that's the ... subject? whatever it's called
got confused because I was actually looking at the pins
but alright thanks!
I have two overlays. For one of them, it appears that events are only firing when I have the overlay open in the editor. For the other, it always works.
What would cause an overlay to only work while it is being edited?
Its uses OBSWebsocket
Both overlays both use the onEventReceived and onWidgetLoad events
have you set the "Preview LIVE on stream" checkboxes on both overlays?
Where can I find that checkbox?
in the editor under emulate in the bottom toolbar
