#dev-chat
1 messages Β· Page 49 of 1
by asking the streamer to grant access to his SE account i suppose?
Chat/Bot Levels
100 - Viewer
250 - Subscriber (Twitch subscribers automatically placed at this level)
300 - Regular
400 - VIP (Twitch VIP automatically placed at this level)
500 - Moderator (Twitch chat moderators automatically placed at this level)
1000 - Super Moderator__
1500 - Broadcaster
Dashboard Manager Levels
Bot Supervisor
Editor
Full Access
Owner
https://i.imgur.com/s61Liry.png
if you go to the settings ->
ah, right..then i must ask the streamer to grant me that access
as a manager
ok then, thanks
yup yup. then you get that dashboard when you log in your account
ello ello ello how do we go about editing the confirmation message that shows in the twitch chat on a store redemption coz currently it uses an emote that we dont have in the channel and also i need it to work different
or how can i add a response when a user tries to write a command in chat and doesnt have enough credits that says you dont have enough credits to buy this it costs xx amount
yo, i'm trying to get the top users to develop sort of a leaderboard page
however the api (with success 200 as a response) provides 0 users
https://api.streamelements.com/kappa/v2/points/enkk/top this API
i'm giving the JWT as requested
it's your account id not name
i know that answer because make that error often π€£
Has anyone ever had any luck using google Sheets API to pull data into a streamelements custom widget? I'm trying to get 2 columns of data from a spread sheet to input either into stream elements or into OBS. Anyone that can help is amazing!
um... kind of? i've not done into into an SE overlay... but should work...
ok this time I think i'm onto something :p
https://api.streamelements.com/kappa/v2/bot/commands/chan_id/command_id returns 500
which is not supposed to be an answer
its the get commands details API
async function loadGSheetData() {
let spreadID = gameSetup.gSheetId,
sheetID = "1",
targetCells = "A:H",
APIKEY = gameSetup.gAPI,
dataSource = "https://sheets.googleapis.com/v4/spreadsheets/" + spreadID + "/values/Sheet" + (sheetID) + "!" + targetCells + "?key=" + APIKEY,
tempUsers = [...gameUsers];
const userDatabase = await fetch(dataSource)
.then(response => response.json())
.then(json => {
if (json.error) {
if (firstLoad) {
gameUsers = JSON.parse(fs.readFileSync(GameUserDatabase));
};
return false;
};
json.values.forEach(user => {
let userName = user[0].toLowerCase().trim();
if (!firstLoad) { //check if mid game reload and save current progress
let userIndex = tempUsers.findIndex(i => i.userName === userName);
if (userIndex >= 0) {
gameUsers.push(tempUsers[userIndex]);
return;
};
};
newUser = {};
newUser.userName = userName
newUser.team = user[1].toLowerCase();
newUser.lastStandard = ''
newUser.usedSpecial = false;
if (user[2] !== undefined) {
newUser.secretsRemaining = parseInt(user[2]) || 1;
}
gameUsers.push(newUser);
});
fs.writeFileSync(GameUserDatabase, JSON.stringify(gameUsers, null, 4), "utf8");
console.log(`${gameName} user database has loaded!`)
return true;
})
.catch(error => {
console.error("Error Getting Username Data from Google: ", error);
return false;
}); ....
@tiny vapor sorry that's a lot of code; but i dont want to clean it all up; but that is a copy-pasta of what i use to pull info from a google sheet
thanks!
I am playing now, ill let you know how i get on
Is that the entire code? whats the 4 dots at the end for?
that is a full code for like a game thing i have.
AHH i see
you don't need most of it; just an example of how i use it
no thats great. the first few paragraphs are really useful
ya; ya. that is sheet '1' ... then it moves into sheet '2' settings π€£ after the ....
I think its crazy that obs / streamelements hasn't created an actual module that allows you to input data from an api without having to code it
vMix has it built in and its great
what is vMix? i'll have to look into it?
vMix is another software based platform to record / livestream from
Its designed more for higher end studio streams / larger projects with remote callers etc
for customization; S.E. has been the greatest i've found all things considered.
Yer I agree. S.E is the best when it comes to customisation
vMix is designed less for twitch streamers etc and more for live streams on Vimeo / corporate stuff / sporting events etc
OBS and S.E. are 2 different things. streamElements doesnt have anything to do with the 'software' or streaming side.
no i know
ahh gotcha. ya here; in s.e. it's all twitch/youtube streamers with alerts and merch. i think i saw a facebook person once
so vMix would be an OBS competitor then?
yes it would. but it allows you to combine OBS with certain aspects of S.E
but it wouldn't allow for alerts etc, that would all be through S.E
but it has a great graphics / lowerthird creator etc built in
it can bring in browser source though?
yes sir
it can also bring in API data from sheets and other sources
then link individual cells to a specific line of text
that automatically updates
which is what im trying to do, but i can't use vMix as I don't have a personal license, i only use it at work
ya; that is; i don;t want to sell SE short; but it is basically a "website"
and for good reason. everything is cloud based.
ok, after a few more tests i'm pretty sure that the get command details APIs is not working, at least for me. Can anybody test it?
vMix is basically enterprise OBS π
It just gives me internal server error
ahhh; so you have to pay for it?
can you post your get request code? @merry plume
not sure i can help; but maybe π€
well to avoid issues i'm litterally using a web based request website
the JWT is correct since other calls are working
the channel id too
https://api.streamelements.com/kappa/v2/bot/commands/CHAN_ID/roulette
try this and you should be getting 500 too
any news?
command id is returned
from the command list
roulette is a command id
by giving a random string djijfe you will get a 400 answer, which is okay
but by giving a correct command such as roulette, you get 500
which should never happen
i've never played with that endpoint; so i'm not sure.. i also gotta run so cant set up a test
@merry plume Do you want to change roulette settings or roulette command?
roulette command
I simply want to enable or disable it
however, to change a command you have to provide the whole command set up
so firstly I need to get the command details, and then reupload it via PUT with the enabled toggled
Yes. That is correct:
https://api.streamelements.com/kappa/v2/bot/modules/:channelId/roulette
method: PUT
Payload:
{
"roulette":{
"cooldown":{
"user":50,
"global":0
},
"messages":{
"win":"/me {user} won {bet} undefined in roulette and now has {points} undefined! FeelsGoodMan",
"lose":"/me {user} lost {bet} undefined in roulette and now has {points} undefined! FeelsBadMan",
"allinWin":"/me PogChamp {user} went all in and won {bet} undefined PogChamp they now have {points} undefined FeelsGoodMan",
"allinLose":"/me {user} went all in and lost every single one of their {bet} undefined LUL"
},
"enabled":false,
"luck":45,
"minAmount":2
}
}
You need to adjust enabled property.
wait, you are using the modules API?
Yes.
https://docs.streamelements.com/reference/commands i'm using this
arent the module and the command two different things?
But several commands are controlled by modules.
so if i enable or disable this module, the commands will follow directly?
it just seems weird to me that the command API is not working properly
is not working even for my custom commands btw
well it still allows me to do my thing, so i guess its okay
thank you mate
np
So using another bot would be the only way?
hello, how can i create an alert for each item redeemed?
i'm trying to run something like an auction and the way i decided to do it is by people buying tickets and then refunding and taking the points from the winner of the auction. To do that I need to use a 'get' call for the participants because streamelements no longer shows all of them on the list, but the calls are not working. Any clues?
every other category calls are fine the giveaway ones are the only ones not working
When attempting to use https://api.streamelements.com/kappa/v2/points/{{channel_id}/{{username}}/amount I get the following: anybody know what type of token, or authz, or code it wants and from where might one get it?
"statusCode": 403,
"error": "Forbidden",
"message": "No channel authorization found"
}```
Sadly https://docs.streamelements.com/reference/single-user#pointsamountbychannelanduserput is not much help π¦
Yep, that's what I'm sending. All the other APIs work.
(Well, not all, some...)
https://api.streamelements.com/kappa/v2/channels/me will load perfectly fine with my JWT
But the APIs which manipulate points seem to want some other type of credential (or are just broken)
I'm passing my JWT while attempting to change the value of a user on my channel. I would understand if it was a different channel, but this is my own channel.
Probably missing something simple, idk, advice welcome haha
@main root Maybe this along here might help. #dev-chat message
hey sorry any idea how to call a function at the start of and alert and then again at the end of the alert
Hm. Not really. The JWT is valid because I can call the channels API to list my own channel which works. Maybe I need to use an OAuth token instead I'll play with that and see if I have any luck.
Are you already approved?
But doesn't /channels/me dump an oauth token..?
unless "accessToken" is yet some other confusing construct
I'm wondering if maybe I have to have something else set up for this.
I'll ping @viral patrol on this as he can answer better than I can as i simply tried discord-fu to see if I could ffind something and that's about where my understanding stops.
π Appreciated.
This isn't particularly urgent, but this is the last piece of the app integration for something I'm building for a friend.
Sitrep...
I was using my JWT which is for a channel which doesn't even have the right stuff set up in SE. That was the issue.
I asked for the JWT of the actual account this bot will be running for and it works as intended. Apologies for developer's denseness.
@main root Hi! JWT is per channel. It doesn't allow you to work with other channels (even if you have permissions granted). As a workaround I recommend using jebaited.net which is MITM for SE API. With that in use channel owner can create a token that will allow you to work with selected scope (like points management).
any idea why givaway api calls keep giving me 400s? I checked my id's and tokens on other calls and they work fine
Which endpoint gives you errors?
all of them but the one I need to use is "https://api.streamelements.com/kappa/v2/giveaways/channel/giveawayId/joined "
Currently giveaways are on v3 api (and being tested, this is why docs is not updated). Proper endpoint for you would be https://api.streamelements.com/kappa/v3/giveaways/:channelID/:giveawayID/entries?limit=100
Current giveaway ID should be got from: either https://api.streamelements.com/kappa/v3/giveaways/:channelID/active or historical from: https://api.streamelements.com/kappa/v3/giveaways/:channelId
oh i see! I'll check it when I'm back from work thanks!
Is there any other suggestion on how to run an auction with loyalty points other than what I described?
I think this is a nice idea for two types of auctions:
- Regular one - you refund giveaway and just subtract points from person who was on top manually
- Dollar action - you close giveaway without refunding
And by manually I think about a way where it is not "pick winner", as winner picking is random, but grabbing top contestant there and removing their points either via !addpoints -1234 command or a call to points endpoint
yes that's the way i'm already approaching it right now, thanks a lot
@viral patrol any news on that? It really does not aggregate properly, despite having set everything right. Building a new template doesn't help either.
I am forwarding that issue. I am not aware what could be a reason for that
Thanks for the answer. I am curious if this is a general or my specific problem.
Question: Does StreamElements API have its own stylesheet of fonts?
I ask because I am having this funnily weird experience where the baked in Lobster Two font in the Text Widget of Stream Elements overlay always seems to come out slimmer and smaller than the Lobster Two on my custom widget which is sourced from Google API even they are both the same font-size and set to bold.
Its admittedly a petty issue but I am bit of an OC so its niggling at me.
there is an automatic one if you add the redeem part to the overlay
where is the code from?
custom made
then maybe ask the original creator or (if you're allowed to) post the whole code here via jsfiddle
you can use https://jsfiddle.net for the code and https://pastebin.com for the fields
it's net not com 
i dont knopw how to use js fiddle
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@tribal zenith
are you sure this is a StreamElements widget? It looks more like Streamlabs or something
I used it in streamlabs but can I use this in streamelements?
or do I have to change it?
you have to change the eventlisteners and how you access the field values
can you help on that one lol
I don't have the time to do it for you, but it is all documented here: https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-widget-load
Thank you
basically goalLoad should become onWidgetLoad and goalEvent should become onEventReceived or onSessionUpdate
field values can be accessed like:
window.addEventListener('onWidgetLoad', function(obj)
{
const fieldData = obj.detail.fieldData;
myFieldValue1 = fieldData.myFieldValue1;
myFieldValue2 = fieldData.myFieldValue2;
});
depending on what the names are
ok thank you very much!
no problem. the html and css should work, but some field types are named differently
textfield -> text
fontpicker -> googleFont
I have a follow up question about my previous issue. How can i change the limit of the v3 giveaways entries endpoint to go over 100?
I need to get every entry for my auction system to work
@viral patrol is it ok to ping people?
I think you need to use &offset=100 to have second page
ok i'll check it out thanks
What should I expect to come down the pipe from https://docs.streamelements.com/reference/channels#channelssocketbychannelpost ?
do you have this overlay?
how do you download or use a shared widget?
As I can only se videos about the widget?
thanks a mil
does anyone know how I could make a animated border that instead of the colors going in a circle it flows from the bottom upwards to the top if it makes sense.
Or to create an animated frame overlay for cam that goes from like bottom left corner to top right corner but goes around both sides (so color change goes up the right as well as right then up) at the same time
Any custom animations like that will require an animation program
you just have to move the "center" of the gradient and use a webcam-border as mask
Any recommendations for animation programs?
if you know css you could create a kreyframe animation and just change the background-position over time
Don't know how to do thatπ
there may even be css gradient-animation generators if you google it
Or know of someone or somewhere I can learn to use it or something?
there also are a lot of free animated webcam-borders as video files. That's probably easier, than learning css 
i seem to have a problem with some functions on streamelements. I have logged in to streamelements with my twitch account. now im trying to add more payment methods (SE.pay) but it won't let me. I have all the requirements so i'm really confused as to what the problem is.
i also am from one of these countries
Is there any way to run a contest or something through python?
@hollow quail If you would like help from the StreamElements support volunteers/staff, please post your question in one of the helpdesk channels and someone will assist you as soon as they are available #helpdesk-twitch | #helpdesk-youtube | #helpdesk-facebook | #helpdesk-mobile | #helpdesk-selive | #helpdesk-merch
Helpdesk channels are only for requesting support! Thank you for being patient.
hello all, if i connect via websocket to streamelements on my own website, and do the onWidgetLoad thing, will it console log the same data as on your CustomCode website? eg recents, session data etc
hey, anybody knows how to use the ${args} variable? I'm trying for hours, but the reply always comes as '${args}', but I'm trying to personalize the value that I add in a $(count)
the args requires a number like ${2} would reply to this message: !argtest which word is it? with word
^ @sonic meteor
I have a problem and it is not a unique one. I have a custom css alert so I can animate it with transforms, and I can change the font easily enough in a number of ways. It's set to impact now. However, I want to use a custom font. I tried using google fonts or ones defined as '/fonts/font.ttf' from my computer and saved the overlay and refreshed obs.. all sorts of things. I tried defining a font in the html and referencing it in css and I just don't get it at all.
also tried redefining the body in obs's browser source
what is the font code you are using in the CSS?
something like this from searching the archive: #dev-chat message
I used everything, but as an example
@font-face
{
font-family:Gunstar.ttf;
src:url(/fonts/Gunstar_Large.ttf);
}
font-family:Gunstar.ttf;
while that would be simpler, there is no change in this example
.text-container {
font-size: 16px;
color: rgb(245, 245, 245);
position: relative;
text-align: center;
margin: auto;
text-shadow: rgba(0, 0, 0, 0.8) 2px 2px 2px;
background-color: black;
font-family: 'gunstar_heroes_megadrive';
animation: slideDown 10s;
}
I tried various things, this was the last iteration
hmmm; ya. that looks right. sometimes the local fonts are tricky but that looks right.
I also tried 'Gunstar Heroes Megadrive' 'Gunstar Heroes Megadrive Regular' 'Gunstar_Heroes_Megadrive.ttf' and other less viable things
if I just put impact in there it works so I was thinking maybe the other fonts were authorized or something involving windows verification
which sounds odd, but after grappling with this for 8 hours I had time to think
i can get google fonts working ```css
@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');
.text-container {
font-size: 16px;
color: rgb(245, 245, 245);
position: relative;
text-align: center;
margin: auto;
text-shadow: rgba(0, 0, 0, 0.8) 2px 2px 2px;
background-color: black;
font-family: 'bangers';
animation: slideDown 10s;
}
hmmm; that code doesn't work?
heres my full css, which I admit is messy but ive tried so many things all the optimizations went out the window
its a.. fairly complicated path it moves on
it says richard in 40 px arial with a shadow
so something is taking precedence
Is this html overriding it
<div class="text-container">
<div class="image-container">
<img src="https://cdn.streamelements.com/uploads/1d7ca996-e838-47d4-85fc-f62276af9a3f.gif">
</div>
<div>
<div class="awsome-text-container">
<span id="username-container"></span>
<br>
</div>
</div>
</div>
hmmm let me grab a different font. i have that bangers one local so it was working with the local file i had
move the @import part to the top of the CSS
i saved that codepen link; should look like
getting a little closer. I like that animation
Ive had it installed since I created it
try font-family: 'gunstar_large'; π
see this is the part I dont get. I do that and neither the browser, which ok there might be a problem doing that - nor OBS, which definitely should - show the font
Also I refereshed the source
not there
when you downloaded the font you did click the install button, right?
I installe dit a few times, I actually made it
so like 30 times
I wasnt quite happy with it the first few dozen
to wit, it works in photoshop and whatnot
or if I just do text in obs
edge, based on chromium
it really is
Im guessing that I can sidestep the problem using the url importer
..im not clear on how that works
I cant just host it on mega nz im guessing
ya. i don't think so; you might be able to on gitHub and pull it from there?
but i'd suggest trying a PC restart and make sure that font is in the windows/fonts folder. maybe even uninstall it then reinstall it?
then check that codepen i posted to see if it's loading
may as well
uninstalling and reinstalling the font caused it to appear
let me check my obs source
It seems as though you have resolved my problem completely. I dont understand why it would work with any fonts but some cobination of outside factors being resoved was the culprit
I thought I was losing my druthers but it's some whole other thing
haha. glad i could help!
i've never had good experiences with CSS in general and fonts are always a p.i.a. π€£
yeah I always strap in for hours of fun and frolic when I start one of these projects
thanks for the help, good day
Cross posting here due to recommendation: Hey all, have a question regarding updating a command using the API. (I've breifly read through the api docs before coming here, but am still somewhat confused).
I am trying to use that API to update a command (!queue) with a JSON string from my google sheet. I have that whole part of getting the string, etc figured out but am having trouble actually pushing the command update to my channel. Is there any guides or premade tools with a similar function that anyone knows of?
I am guessing this is the endpoint you'd want to hit to update: https://docs.streamelements.com/reference/commands#botcommandsbychannelandcommandidput
you'll probably have to get the command id by doing this endpoint first: https://docs.streamelements.com/reference/commands#botcommandsbychannelget
Giving it a shot now see if I have any success
where is says channel that is the ID*; and requires JWT token in the header; for example ^ this is some code i have for pulling points.
Okay, making progress. Was able to actually get the command ID this time and get that setup. Now I am getting error 401 'unauthorized' when trying to make the PUT request.
Do you know how the header for the bearer token should be formatted? I have a strong feeling thats my issue.
I have my JWT Token, just unsure how to format it.
should be ```js
'Authorization': Bearer ${process.env.SE_JWTTOKEN}
just did a test and got it to work. i had to add the "name" to the object
Like this (Censored it)? Sorry am a API Noob.
Name part at the top is just for labeling so ignore it.
you don't need the ${ or end }
Hmm, still getting Error 401. Could there be anything else Im missing there?
what program are you using? might not need the "auth..." in the value part
probably just Bearer .....
no qoutes or anything
Im using a service called Integromat.
So just Bearer *Key* ?
yup
Still Error 401. Tried adding quotes back in and in a few different positions.
As well as the base Bearer *Key*
hmmm... here is mine
which end point are you hitting, the get or put? do you have the content-type header?
omg im so dumb
There was a extra character in the channel ID
I appreciate your help so much!
Thank you for helping people like me 
not a problem. i'm learning as well. first time i've played with that endpoint
Is anyone able to help me, i want to create an animated border, however instead of the animation just going in a circle i want it to rotate around both sides an meet in the top
ello ello ello how do we go about editing the confirmation message that shows in the twitch chat on a store redemption coz currently it uses an emote that we dont have in the channel and also i need it to work different
or how can i add a response when a user tries to write a command in chat and doesnt have enough credits that says you dont have enough credits to buy this it costs xx amount
I was sent here from support at the weekend but got no reply
@sonic vessel enable !pepes command and do !pepes disable
@pulsar willow It won't work without conversion to SE system.
@hardy walrus which one will that fix?
The emote in the response.
I want to change the response to be a #colour
As that triggers stuff in the background of the camera
So each redeem would have #name
Of what ever the store item is called
Because then standard command with a price doesn't reply if you too poor
I just want a custom text response for items redeemed basically is the summary
Is anyone able to help me, i want to create an animated border, however instead of the animation just going in a circle i want it to rotate around both sides an meet in the top
@worthy dagger Check this one: https://codepen.io/mike-schultz/pen/NgQvGO, set angle to 0deg and background position to:
@keyframes animatedgradient {
0% {
background-position: 0% 0%;
}
50% {
background-position: 100% 100%;
}
100% {
background-position: 0% 0%;
}
}
I think you should be able to adjust the above to your needs or create your own with that as starting point
I think that simplest way would be to create two divs with gradiend background and move them in parent div.
Or - create a looped gradient background in video editing software and use a webm file.
@worthy dagger https://cole.codes/posts/animated-css-border-gradients
@viral patrol do you mind if I pm you?
I think it is the best to keep conversation here, so other can profit from it as well
trying to teach myself css now
Hey, just wondering if someone here could possibly code a progress bar exactly like the one for donations, subs, and bits with the color customization and all but make it respond to a counter in chat going up?
you mean a bot counter?
already a thing with the bot, being able to have a bot counter on screen would be cool but bot counters do already exist and streamelements does have one, check the site
@tribal zenith @wraith lynx I mean a progress bar that would respond to a bot counter. I believe the only progress bar options within stream elements at the moment are ones that respond to donos cheers and subs
Extra Life integration - I'm actually not sure which channel to put this in, but sometime last month my streamelements stopped pulling any information from Extra Life. Has this been reported somewhere?
yeah, that's what I was saying would be cool, it's not a thing atm I don't believe :/
something like that? https://streamelements.com/dashboard/overlays/share/5fcf6d68aacbc4419604f2b1
for the bot counter, that is
yeah that looks great, is there a way to maybe add a title and choose between a rounded style or a straight edge style? @tribal zenith
for hard edges you can just remove the lines which say border-radius in the CSS (lines 20 & 28) entirely and with title you mean instead of the current count or another text above that?
right before the count so Title: [counter value]/[goal value]
I updated it. You can use the same link as before
thanks 
@pulsar willow have you talked to the original creator of the widget? It's not that trivial and you would have to add some fields to get to the goal functionaility. Like title, type, goalAmount, endDate
if he/she doesn't support StreamElements for future updates, there is not really a point to port this
I have talked to him and he doesnt know streamelements stuff
I just like the animation amd I cant bug him to do that cos I got it for free lol
if he has any questions regarding the StreamElements API, he can just ask here
ok
WHere is did you get the widget ? @pulsar willow
Who?
Just a friend
I had some questions about the code it self. Any way I could contact him?
just tell me ill tell him
Btw thats not thge code he sent
thats the code i made by modding it(im noob)
like super noob
Iβm referring to the original code
Iβm mainly just interested in whom originally built it. Itβs a really nice widget
i think im not allowed to share his details lol
Well have him dm me
I'll try
Thanks
How can I make a link to pass it on to someone and have them create an overlay that I did?
That feature is only available on specific accounts. You can make the other person invite you as an editor to their StreamElements Account, so you can copy the overlay over.
@muted moat "Follow these steps to grant managers/moderators access to your dashboard:
- Click on your channel name at the top of the dashboard
- Create a new invite at one of three access levels (Bot Supervisor, Editor, Full Control)
- Send this invite to a mod/manager to give them access to your dashboard. The link is one-time-use and expires after 72 hours if not accepted
Video tutorial: https://youtu.be/zl_h-ttZDF0"
Which one where? I wanna have a look
Orrrrrrr....
Pixelpop widgets are a unique, clean design for your stream to add a bit of "pop" for your audience. The alert, chat box, and event list widgets let you customize the colors, font, and language and more used for all elements in the design. You'll be able to use the Streamlabs quick setup link to install in seconds.
anyone know how to get emulated alerts to ping "top" labels of the session? Atm, any emulated alerts do not work on changing the label calls
as I have a custom widget that animates in/out when a new label replaces it (currently donation) but the streamer wants it changed to top donation of the session, and emulated alerts just to show if its working or not
someone works the instagram widget? @torn wave

For the Chat Stats feature, is it only available with a range of "all time" or is there a way through the API or an easier way to get the chat stats for a set range of time?
This would be specifically related to BTTV emotes if possible.
Does anyone know how to setup facebook live events like stream elements? I'm trying to make an app in c# to grab info in the same manner and I can't find A) a dev discord for help, and B) resources on the internet specifically talking about live streaming things with facebook
Why not use SE instead
They save the data of the last 24 events, so you don't have the hassle of saving them somewhere
Is there any way to get the senders/user alltime points within a chat command? There is a variable ${user.points_alltime_rank} but no ${user.points_alltime}
Use SE how?
so "!time EST" should equal ${time.EST}
doesn't there need to be a period?
It is either period or space. I prefer space
oh ok
This was the result i was getting
trouble is that doesn't display pm or 24h time
There's a 3rd party api you can use to specify more than that. You'd have to work out the variables for how it displays though.
also the aest was incorrect, it should've been 8:41
thanks
why isn't it showing in 24h time?
Format should be g:i:s AFAIK
oh nvm, the timezone list is weird. So instead of typing !time AEDT I had to type !time Australia/Sydney
It was returning the default
You don't have to do that. You can specify that from within the URL.
And simply have commands as the timezone name.
i don't want to type out every timezone lol
@charred urchin Apologies for the late reply: Unfortunately due to the 500 character limit for command responses you'd either do a bunch of commands or the tedious typing with !timezone ActualTimezone to use just one command and specify any of them.
Not many options beyond those that I am aware of.
It's okay the command works to an extent, and I don't mind half assing things lol
Thanks for your help though
I am trying to link to the API and it does not work
The error always comes: The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
The URL with which I make the request:
https://api.streamelements.com/oauth2/authorize?client_id='.$client_id.'&redirect_uri='.$redirect_uri.'&response_type=code&scope=channel%3Aread
Hello, is there a way to fetch a value from a json response?
since the eval function is not working!!
how is your JS skills?
decent
the default custom API just reads the 'text' response from the server
are we talking about chat commands or widgets?
chat commands
yes im aware of that, it return the whole json format but i need a way to access a value
so... short story; it will take some set up; but if you have JS, you can get it to work π ... maybe... i am trying to set up an "easy API"
You'd need to set up a repl account and create your own "server"
you can clone that code
aaah ok
or Fork.. haha that is the right word
you have the api now; so you need to make your commands with your link
yup yup. let me know. π€ ... i'm still trying to make it "easy" and you are the first one to use it .... so good luck π
so; it is redundant... but you'll need to make that api call inside the repl code.
so basically from Twtich chat -> api call to repl -> api call to external API ... then snap back
u mean inside the :
app.get("/api/hey", (req, res) => { }
correct. you'd have to do an api call inside that and get the object back
aaah ok
should i use this methode
let url = 'https://complimentr.com/api'; fetch(url) .then(res => res.json()) .then((out) => { message = out; }) .catch(err => { throw err });
or you suggest a better one
i think you want return message? ... but i'm not sure best practice here
`app.get("/api/com", (req, res) => {
let message = ``;
let url = 'https://complimentr.com/api';
fetch(url)
.then(res => res.json())
.then((out) => {
message = success //out.compliment;
})
.catch(err => { throw err });
res.send(message);
});`
like this
the fetch is asynchronous
here is an example i use ```js
return new Promise((resolve, reject) => {
fetch(https://api.twitch.tv/helix/games?id=${gameID}, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': Bearer ${process.env.T_BOTOAUTHTOKEN},
'Client-ID': process.env.T_APPCLIENTID
},
})
.then(response => response.json())
.then(data => {
resolve(data);
})
.catch(error => {
console.error(error, !!!Error Getting Twitch Game Data ^^...)
reject();
});
});
so you probably want to await that
thank you for trying to set this up... i'm going to add in an example API call
or provide a wrapper function for fetch requests
then it's re-usable
ya... that is a good a idea . getDatat() or something?
maybe fetchData or fetchURL to be more transparent
shit @pulsar willow ... there is no "node-fetch" package in that template yet
i already installed it π
hahahah. thank you
hmm; i'll have to check that? i'm trying to set up an "easy" API ...
you see the code in the code channel, Reboot?
it just a basic Express server
the sayMessage?
the repl link
oh, yeah it's the same link you posted here
ya. i did add in the 'fetch' or external API calls yet
welp, keep giving me the The remote server returned status code 408 Request Timeout error π
are you awaiting the response now?
I can't see that yet, maybe it takes some time to update
it's still hello, or and eval
well, that changes things 
what is your API call @pulsar willow ?
so the axios get would look like this:
async function getURL(url) {
try {
const response = await axios.get(url);
return response;
} catch (error) {
console.error(error);
return null;
}
}
how would you send headers or auth with that?
overload the function with a second parameter for data
the express function could be:
app.get("/api/test", (req, res) =>
{
let response = getURL("https://myCoolUrl.com/test");
let message = (response === null) ? "An error occured" : response;
res.send(message);
});
are we "await" getURL ? ... i do like the the way that looks
a more abstract call could be
async function callURL(method, url, headers, data)
{
try
{
const response = await axios({ method, url, headers, data });
return response;
}
catch(err)
{
console.error(err);
return null;
}
}
axios.get is just a wrapper
but that is very abstract
ya; i think that will end up the same when you add in the objects
π€£
what is your API call.... i'm trying to catch up and get it working.
you mean the link ?? or what
ya. the JSON object you are grabbing
try https://seapitest.pjonp.repl.co/api/cd @pulsar willow π
it seems to work... i'll need to look into that wrapper a little more with what reboot said
did a ninja edit and added a forced object value π¬
did you make a direct fork of mine?
the professional people say 'fork' π€£
i say clone
<- not professional
yes
where i get confused with the Async @tribal zenith is that you have to handle that too ... like if it returns null
what is your link @pulsar willow
if it returns null you know an error occurred, if not you can just respond with the result
but you can of course still use the promise based variant
you don't have to await it
sorry
im dumb
forgot the "api" in the link
π
its working
π€£
@tribal zenith if you have time or want to; feel free to edit and improve on that.
i'm just trying to make a 'boiler plate' for people
well, it does the same thing just with another library 
so if it works it can stay that way
and thank you @pulsar willow for helping ... this was rough; and you are 1000x better than the "how do i ... redacted" people
π³π³π³
you just may want to change const fetchDataGET = (link) => { to async function fetchDataGet(url) {
@elfin arch also thank you , now i can just use this mehode for now for different apis , i hope streamelements add an easier way to play with custom apis calls
There may be some additions.... but this from my testing is the best route to go (i've on;y had it running for 6 days)
So if you run into issues or problems let me know ..... and also; it can be expanded at this point to return an JSON
Yes sir, ill let you know if any issues occur π
@tribal zenith .... ya that is where i π€·; i don't think that needs to be an asyc function, because it is a straight Promise return... and i'm ES6 so i'll never have "function" in my code.
if you mark a function as async it can also be awaited. Sou you give the devs some options. Also function declarations and function expressions do different things, even if they are pretty similar
ya.. that is too deep for me π€£ ... i'm just a hobbyist
hoisting and context are the biggest differences
console.log(test1());
console.log(test2());
function test1()
{
return "Test1";
}
const test2 = () =>
{
return "Test2";
}
// test2 is only available after this block
the first log will work, the second throws an error
also it's easier to read what part of your code is a function and what a variable
@elfin arch hey again π , i was wondering is there a way to see how many times my custom api link was called in the repl website ??
you could add a counter to the chat command
I searched but could not find it.. is there a goal tracker widget that tracks a total of tips + bits? I want both to go towards a common goal rather than having two discreet trackers
I got one in #widget-share
@sturdy oak do you know which one you're using or who made it so I can search?
can i send a bot message via overlay? i have tested using CURL and it work, but i want to get it more streamlined (as in copy paste code to overlay)
from the docs, i can retrieve apiKey, but not JWT Token, or can i?
current way to get JWT is to set my bearer to obj.detail.fieldData
there is an external API that allows that, maybe this helps: #dev-chat message
oh thanks!
but im looking to do it inside streamelements, is it possible doint it without using jebaited.net?
nope, the widget token alone does not have he required permissions
oh well, then back to my previous code where i need the user set up the JWT token on widget field
thanks btw
that is very bad practice and you should never do that
uh oh
the jebaited.net tokens are scoped, so if they ever get leaked they only have a limited usability and can easily be invalidated
the JWT tokens give full access
i get what you mean. in case someone just embed/iframe the widget, we can see the JWT token on developer console(chromium)
just realized that
thanks for the heads up
then, is there any documentation for jebaited api endpoints?
@viral patrol is the living documentation. he made that site π
hahaha..cool!
Basically when you click on a button with endpoint you selected, you will get basic usage example
I just want to follow up earlier on why my custom font that I created and installed wouldn't show up in my browser or OBS
It stopped working again after a reboot or just randomly. The solution is to install the font for all users, which I of course did not know was even a feature
you can go through %localappdata%, microsoft/windows/fonts and if a font shows up there it likely is only installed locally, so you right click on those and install for all users
then there's no font mysteries after that
@elfin arch actually
Is there any way to expand the "!top online|offline|alltime" command to show the top 10 or even top 20 with help of API? I'd like to have a command with a chat output (not overlay).
You would need to have a MITM that will query your channel's leaderboard and output specified data.
@indigo flume will you be able to answer it here? Is it possible to test that call?
I simply redirected you to the right channel. I haven't coded a custom widget in over a year and stuff has changed since then.
its not really the widget I need help with, more the getting the emulated data to show so i can test to see if everything works
ok well Ill ask here, but was ignored last time I tried - I have a 2 custom label widgets , left side is based on recent sub/gifted, right side is going to be top donation/bit donation of the session. Atm I cant test to see if the top donation works, because emulated data is seen by the top donation of the session calls.. Any way I can get those emulations to work so I can test to see if a new top event will replace the previous?
@spare tendon Consoles do not have native support for overlays. You would need a capture card, PS4 remote play or Xbox companion app and a PC with OBS in order to have overlays over your console gameplay.
We have a blog post about how to set up console streaming with our essential tools: https://blog.streamelements.com/how-to-stream-on-console-7b620b1c46c3
Is it possible to have an overlay/widget that works for both YT and FB in one for multistreaming, so I mean like the rotating feed (made by thefyrewire) but with data of both YouTube subscribers and Facebook followers at once
Technically yes with the api.store
I will screenshot this and come back with more knowledge
Hi, is this where Im supposed to ask for help if Im making a custom widget?
you're in the right place
Hi, so Im trying to make a countdown bar for a subtrain, and when I tried doing it with a while loop it just shit itself so now Im trying out setInterval which Im very unfamiliar with. Does anyone know why this code is not working?
else if (listener === 'subscriber') {
timeleft = 300;
setInterval(while(timeleft > 0){
progressBarWidth = timeleft * $('#progressBar').width() / timetotal;
$('#progressBar').find('div').animate({ width: progressBarWidth }, 500);
timeleft = timeleft - 1;
if(timeleft === 0){ clearInterval()};
},1000);
}```
And does this specifically work?
```if(timeleft === 0){ clearInterval()};```
you have to pass a function to setInterval and don't really need a while-loop. setInterval gets called every x ms (1000 in your case) so you can check the counter on every iteration
to clear an Interval you need to pass the creation variable as parameter
timeleft = 300;
// myInterval should be a global variable
myInterval = setInterval(function()
{
progressBarWidth = timeleft * $('#progressBar').width() / timetotal;
$('#progressBar').find('div').animate({ width: progressBarWidth }, 500);
timeleft -= 1;
if(timeleft === 0){ clearInterval(myInterval)}; // you might want to call an external function to clear the interval
}, 1000);
but your calculation for the widths doesn't seem right. Since timeleft is your factor the whole bar gets smaller on every iteration
also timeleft gets set to 300 every time the whole code should be called outside of the subscriber listener
trying to convert to the SE overlays for alerts, when doing recent subscriber what is the variable for how long they have subbed for?
i have it in streamlabs using {months} as the variable, but it doesnt work in SE
Thanks
@tribal zenith nah its correct , it has a background and stuff. Or in second thought, I could just set the width to timeleft, that part was copied and redone so havenβt looked in to it to much xD. Thanks for the help though!
StreamElements does not like while loops
Quick question, is there a way to see highest amount of total subs in the custom widget?
Is there a way to see if a sub is a resub within onEventReceived, without having to cross referencing it with data["subscriber-resub-latest"]["name"]
Also did I just find some typos in the docs
I don't think there is an all-time high for total subs, only for the current month or session
is that how twitch works, I thought a resub is when you continue a gifted sub
a resub just means you were subbed before and now subbed again. gifted subs should also count towards that
Twitch also counts cumulative and total months. So a resub streak of 3 means you were subbed 3 months in a row, while total can be in any timespan
Anyone know if I can .find divs by id using jquery instead of this JS $('#progressBar').find('div')
$('#progressBar #myDivId')
Follow-up, is it possible to store data/variables in the widgets that can be used on next load? That way I can iterate the highest subcount on my own
There it was. I can see it uses a .then, so I assume the get is async π€
it returns a Promise, yes
but it should also be awaitable if that was your question
Why doesnt JS $('#progressBar #bar2')
Pick up JS <div id="progressBar"> <div id="bar"></div> <div id="bar2"></div> </div>
But it does work for #bar
what do you get when you put console.log($('#progressBar #bar2').length); in your JS?
Do I have a console in streamelements? xD
outputs 1 (I think)
then it finds the element
then it's either the css or something else in the interval
@muted stag You might wanna consider GSAP
Hello everybody, we are trying to make little bot-like app, that will track down donations done, takes its value and make some action (python script). Is there some way to listen to some trigger done by streamlabs chatbot, or periodically check streamlabs API for tips/channel/moderation ? I was thinking that I could check this endpoint every second, but is it good practice, or is there some better way to catch donations? Can you point me to some good solution?
Hello! I had paid someone to make me a custom alert/notification bar and they returned to me wit ha jS file that works on streamlabs but i use streamelements and when I put the code into the Custom widget maker nothing works, Does anyone know how to help? Also if this helps, attached is the js code
How about using socket.io
@lethal herald looks like the custom fields are missing. its calling for a volume, and alert type
no problem @lusty star ... it's sleep time for me; good luck π (you can also grab something from #widget-share and see how others do it too!)
I ought to sleep too, I always leave these things so late that I never get them done at an appropriate time! I've 0 experience with javascript so I'm salvaging what I need from every widget I can find and breaking everything π Thank you for your help though, hope you sleep well β€οΈ
hey guys just wondering how long the approval time is roughly for the widget-share once you have submitted your application?
When dis you submit it?
Widgets are published one by one, so every single one of them gets enough hype from being "latest one", your widget is second in queue π
oh ok thanks was just curious cause some people are hitting me up for the link thanks for letting me know π
@sturdy oak thank you, going to look into it
hey sorry for the late reply on this, is this the tab you are on about, or the data vis tab?
Click on the computer with cog wheels icon next to the get link icon
Then navigate to Session data and change the values
yes, but this is StreamElements not labs :D
for the websocket connection you could take a look at https://docs.streamelements.com/docs/connecting-via-websocket
if you decide to poll the API you have to check the ratelimit on your calls
@next radish This one:
@tribal zenith ok, that rate limit is what I want to know π where can i find that information please? π
@viral patrol Yeah the data visualisation π thats what I've been using, but it doesnt update the custom label when I change the data, I have the labels animate in/out as new alerts coming in, and as Im about to change this to top dono/bits, I want to see the change work before I send this over to the client
Oh.. On events. This triggers onSessionUpdate event
the infos are in the response as headers and start with x-ratelimit-. So x-ratelimit-remaining is for example how many are left
yeah so assuming theres no way to test that without physically donating to my channel?
You can always fake tip your channel from here: https://streamelements.com/dashboard/tipping/list (make sure you have "imported" checked). You can also copy onEventReceived payload and emulate it. from within widget
or via a button under fields
Yup. Button under fields does the same (emulate event from within widget)
ahh perfect π thanks!
thank you too π helped alot π
hmm still doesnt update using the fake tip, assuming the stream will need to be live for this to work with session based events?
It should when you use "imported" - it should calculate aggregates and latest labels.
yeah alert was triggered, label didnt proc - ive just modified the custom labels code from the github
hmm normal built in labels seem to change, so it must be something in the code - all good then, Ill figure it out π thanks for all the help though
I've got an issue that might be similar to etsKi that maybe someone can help with. I've repurposed a "goals" widget that someone else made (I have zero experience with Javascript so I'm just butchering things), however I want the current total to be a sum of my tips, cheers and subs. I have it set in the JS that the variable is defined as those numbers, but it will only update on widget load. I was trying to make it update onEventReceived, but from my pathetic knowledge of JS I've read that you can't access this data then? Having massive PepeHands moments. Sorry to bother you all β€οΈ
onSessionUpdate in the docs might help you
Hey there! I've noted something interesting. I tried editing an overlay widget's fields, replacing a dropdown field with a checkbox instead. However, when I change the checkbox's state, expecting the widget to reload as it did when I changed the now gone dropdown, it doesn't reload anymore. I have to refresh the page. Is this intended behavior? If so, could it not? π
Use case is simple: why have a dropdown with 2 elements when you could have a boolean checkbox?
@lusty star Check this one, may be helpful: https://github.com/StreamElements/widgets/tree/master/CumulativeGoal
@frank trout Unfortunately checkboxes don't trigger widget reload. This is why I personally went with dropdown yes/no (and it looks nicer)
@viral patrol
checkboxes don't trigger widget reload
Which I've noticed, sadly. Wish that could be different though :
I went with dropdown yes/no
Which I had and hated because you can't just parse the values from the fields outright, you have to check if a string is a certain value.... ugh
you could set the values to "true" and "false"


If only they weren't both truthy...
Unrelated question: is it possible to import a custom widget from a directory/archive or something of sorts? That would be 
For testing purposes you may like this #dev-chat message
Then you will need to manually move your widget to overlay editor.
@viral patrol im trying to use your GOFUNDME ALERTS in its not picking up the donation when its been made can u help please
i have what i think is the short name bit nothing
Can you send me link to fundraiser via dms?
@viral patrol Just wanted to say thanks for the widget you linked to, managed to use some of the code to iron my stuff out. I'm 90% sure it's working though it's still being erratic when I use the emulate function in the editor. But just wanted to send my gratitude. Happy holidays mate β€οΈ
@lusty star use "Goals" tab in "Session data" to play with values
I've been using that to change the actual values, but it only updates when a visual event happens (or when I hit replay through OBS). I have a 'OnSessionUpdate' event listener but I think I'm misunderstanding what that does π
@viral patrol i have a question about the bank heist game - do you need to login to the jebaited link in post and login with your stream elements account for it to sync up and work?
What is the proper way to apply for OAuth2 credentials now? The link to apply for the credentials on the link below leads to a dead google forms page
https://docs.streamelements.com/docs/getting-started-1
Last I heard, OAuth credentials are currently not available @timber ore
@elfin arch is there another form of auth that is being used as an alternative now?
Depends on what you are trying to work on? For like personal projects and your own server you can use JWT.
or if you are doing like an overlay; then jebaited.net some some basic API calls
@elfin arch do you need to login to jebaited with your stream elements account for it work properly?
yes. it asks a a middle man service
it basically gives you a scoped and easily discardable token to make SE API calls for saying messages and points
Not sure if this is the right channel, would it be possible to animate the color on the text portion of the alert widget to change midway through, or a gradient?
Not sure if this is the right place, but I am trying to display bitcoin price data in an overlay and can't seem to get it to show. I have code I know works, because it displays in codepen.io, but doesn't show in streamelements. Any advice? Here's the code in codepen working https://codepen.io/ngauthier/pen/xxEXaGd
Hey! I'm a Software Developer and right now I'm working on my first custom widget, I'm wondering if it is possible to add text to speech (TTS) on a custom widget, and if it is, how? I already searched but I only find information related to cheers/subs/tips, which is not something that I want. I just want to be able to TTS a message that a user send in chat followed by a command.
Per example:
user: !tts Hey this message will be TTS
and after receiving this message a bot would TTS "Hey this message will be TTS"
Any kind of help or even documentation would be appreciated!
@hushed zinc your going to run into a cors issue. IMO. save it as a local html file. and drop that into OBS
just download that, drop into OBS
@whole storm here is my TTS highlighted msg widget. feel free to chop it up to do what u want https://streamelements.com/dashboard/overlays/share/5eb807ae09de09849f7b79e6
Thank you so much! Using google translator service is in fact smart, you just saved me. Mega thanks!
no problem!
I'm not really sure how to ask this, so this is the best I got:
Occasionally on the user's end, tip-session-top-donation breaks and shows the recent donation amount with the name "tip-session-top-donation". However on my end when I look at it in streamelements editor it is working properly. Is the only option to have to the user refresh cache in OBS?
Few questions about fields in custom widgets: how are field names parsed when interpolating them into, say, CSS? I use some of the values in my stylesheet for coloring and some other variables. However, I've noticed dashed names (something-like-this) aren't ingested properly vs. camel cased names (somethingLikeThis). Instead, they are just kept as {{something-like-this}} in the stylesheet. Are dashes an illegal identifier character? For what reason? Could it be supported?
I have a terrible workaround for this using js:
- Get the root
htmlnode - Get its computed style
- Filter fields that are defined as variables in the CSS stylesheet as
--variable-name - For every such field, change the root node's style, provoking a DOM reflow
I just did a test @frank trout and am seeing the same thing; using _ seems to work for field names. Is there a reason that you have to use dashes in the field Json?
It's a mixture of convention convenience than anything else. I was taking a look at the custom widgets over at SE's widget repo, specifically at the custom event list one. The fields there are a mix of camelCase and dashed-variables. For consistency's sake, I'd also like for the fields to all follow the same naming convention. The reason for it being dashed is I can just use the event's type as a part of the field's name, similar to what's being done in the aforementioned widget I visited.
I must say I prefer dashes vs. underscores, but that would definitely "solve" the issue. It's yet another workaround, but a much more acceptable one.
@elfin arch should've replied directly, sorry for the late ping
Ah. ya, that makes sense. I'm not sure of an easy work around for the dash thing, the underscore is best probably closest. I normally name my fields something like FDcolor to specify it is a field data JSON. (i've had issues in the past using literals and variable name confusion, the ${varName} was changed to a string $varValue during the widget load.) ... then convert those field data variables to js variables on widget load to same name without the FD. But everyone has their own style i'm sure.
Indeed. I think I'll just keep it as is, it's not like it under performs terribly. Since the parsing and hacking really only happens once, I'll take it. Helps me debug some stuff locally too, as well as copying stuff over to the SE overlay.
I used to have to take caution when copying CSS since locally I had hardcoded values whilst remotely I was using the values retrieved from field data. Now I don't really have to care. If I have CSS variables named after fields, they will just be automatically parsed. Neat side-effect.
Ya. it's actually really nice how it does that
so for the credit roll widget it doesn't show my new followers.
Are there any showing for that session in the activity feed?
hay guys I'm new here just started messing around with SE api. I'm looking at Connecting via Websocket docs. https://docs.streamelements.com/docs/connecting-via-websocket
I managed to connect to websocket and get some test data.
One thing that I don't understand is websocket.schema.json snippet. What do I do with this file? I tot it was used in JS but I don't see any reference in JS snippet.
Btw there on that on Connecting via Websocket "snipper" probably should be "snippet" π
You can make a Websocket connection towards our API - this method requires you to use a JWT token.Each event processed via the websockets can be seen documented here:Code snippet for connecting to Websocket with OAuth2: Make sure that after you obtain your JWT token from: https://streamelements.com/...
websocket.schema.json is a file that describes what you can expect in events coming via ws. More details: https://json-schema.org/
And if you want to check "live example", you may look into: #dev-chat message
@keen aurora ‴οΈ
@viral patrol thank you for the explanation. I'll take a look at example code.
I been playing around with live example. It was really helpful I think I can start making widget π I just have few more questions.
Is it possible to make widget that pulls data from Twitch and YouTube at same time. Something like rotating labels displaying twitch follow and YouTube sub? I tried connecting to YT and Twitch with JWT tokens at same time that works. I guess I can make local hosted widget that way. But can I publish a widget to SE that uses data from YT and Twitch at same time.
One other thing do you have live example code for YouTube?
When a video ends in the media request queue, the next doesnt starts (the autoplay option is enable), I need to click in the start every time?
Anyone know how (this is just a reskined tracker) I can track my bits and other goals not towards a total ?
so; #1; warning.... i would not recommend mixing bits with tips.
that is a Twitch no-no (TOS)
with that said; do you want to keep that same visual or open to anything?
I dont follow, I have program that lets people buy Avatar skins for bits, its run TROUGH twitch. I cant see how that is ToS problem with having goals (now this goal is used to wards a different avatar pet that chatt been leveling up )
This is a bought package, but the same problem comes trough the Stream elements widget editor, it just shows total target in stead for a custom goal set from that point in time.
ahh no no, thats donations and bits each. not a combined thing. And also this is a example text in case something was a miss. The numbers tough are the total for the stream, not a goal set in time there and then.
that worked well with SOBS , but OBS/Elements is having problems here.
when you say I can track my bits and other goals not towards a total do you just want to remove the "of ####" part?
in SOBS i used to let streamers "tend" to a pet by feeding it bits. each time it got say 300 bits it would "level up" and then its 400 bits. so each goal is a new sum. What OBS/elements is doing in stead is always counting my total bits. even when i set a new goal.
in slOBS?
I just skipped from streamlabs to this.
.... i guess i should clarify this for you. OBS is OpenBroadcastService that deals with your camera and microphone.
yea but SOBS have their own settings modified and plugins and such.
same as streamelements have
correct. but those settings do not affect the source (overlay).
no but how obs and its plugin mods from elements picks up and translates is different. the problem is still there. something aint working the same way.
so its not important about what is where .
im trying to solve the problem π
it's not different. you can use an SE overlay in OBS Studio, slOBS, OBS.live it will work the same in all 3.
but; either way; is that the goal is not triggering when you hit the max?
Thats not important in this case. no matter the wordings, the problem is still its different. so something is a miss.
no as said. it counts all bits, or all donations earned
and wont start at 0 when new goals are aset.
the widget doesn't reset to 0?
correct
To reset goals:
- from the Overlay Editor > Session data on top right (monitor symbol) > Goals tab > reset progress of desired goal
- from the Dashboard > Activity feed on the left > Widget data on the right > Goals tab -> reset progress of desired goal
Note: Goal widgets (progress) only counts up and doesn't go down automatically, if you lose followers/subs.
ahhh. so my guess is that the widget isn't checking for the current status on load
il try restarting for cache clearing
but its late for me i been up so need to sleep now. thx for the hlp and il work on this later.
merry Xmas π we'll be here when you get back into it
Would anyone here know how to make a circular sub train like lirik has on his overlay?
@thick trail disregard
The emote combo widget was only counting at most 3 uses instead of the correct number that would be recognized in chat. According to lx: Seems like the original code put all the emotes into single bag and it was confused with all the numbers. Now every emote has it separate
widget has been in use in many channels with no errors...
uhm, i've done personalized customization for some people tho, is this the case?
I'll let LX answer.
Hi @thick trail! I just rewritten that so it uses per emote buckets, so right now you have structure like:
emoteCombo={
"Kappa":{
users:[],
count=1,
timeout=somthing
},
"Jebaited":{
users:[],
count=1,
timeout=somthing
}
}
any text or other emote would break the combo, also it is required for it to be unique people
i don't see how this was an issue... this just seems like a feature to me?
im confused
But also I see I broke it in other way rn π
What I understand from ur snippet u are aiming for per emote combo?
I see I wrote it bad in that use case scenario.
While the combo in chat was recognized as 36x
Granted it was 1 person but Β―_(γ)_/Β―
its not possible tho... one person cannot trigger combo
it has to be unique people
im so confused
That is so true. I didn't know that a single user did that.
Yeah....... 
can you provide the code for the widget, it might be customized is my only guess
This is what I updated there: https://pastebin.com/3a2XnMDF and JSON: https://pastebin.com/XhS92NCG
So at this moment it may have this:
Also there's no need for:
if (!usedEmotes.length) return
line 19 was my code which checked for unique users, which u have commented out
Because actual check is afterwards
And line 81 is to continue the loop, not to exit it, if somebody has more than one emote in their message
Which is a very common thing
but its not unique person, why continue the loop
and u have to check if usedemotes is an array before looping it
It is always an array (it may be empty)
Typeguard is not required if this object cannot store mixed values.
anyways, if i understand correctly u are trying to write some feature to it that allows for multiple emote combos?
That is correct. For example people type "Kappa Jebaited" so there are 2 combos going on.
because the original is not broken by any means as stated above
Then somebody writes "Kappa" and "Jebaited" is broken, but Kappa is ongoing.
Kappa Jebaited in original would mean, if any of those are in the combo and is unique person it will continue the combo
otherwise it will store the emotes for next combo
It would display just first emote then. Your combo had an array of emotes and displayed one with 0 index (even if the emote on 0 was broken already and only one was the next one ongoing)
So I basically split that up to:
- allow multiple emotes combos ongoing (separately, on different indexes)
- Ability to break a combo by text (or ignoring it, so people could have just an emote counter within single widget)
- Ability to not ignore users (just like the bot has it)
was broken
i dont think i understand what u mean by broken
UserA: Kappa Jebaited
UserB: Kappa Jebaited
UserC: Kappa Jebaited // will display Kappa emote and x3
UserD: Jebaited OMEGALUL // will keep Kappa with x4
Because there was a Jebaited (part of combo), but not the element that was on index 0
This instance that I had initially poked you about was with a streamer who has a streamdeck and spamming multiple emotes within the message and making the "streak".
Ohh I see what you mean
And others within the chat as well who would do the same.
Hmmm. I see this needs additional changes however.
is the code working properly now?
Because it has Kappa stored, but with lower counter.
for (let emoteText in emoteCombo){
if (usedEmotes.findIndex(p => p.text === emoteCombo) === -1){
delete emoteCombo[emoteText];
}
}
Like this?
at the end of checkCombo
if (!usedEmotes.length) {
emoteCombo.emotes.length = 0
emoteCombo.triggerUsernames.length = 0
emoteCombo.count = 0
return
}
this is regarding the loop of empty array we discussed earlier, I was resetting it in original
yea that would work, at the end of checkcombo or at reset would work right?
if im not overlooking something
"Reset" (but not actual reset) is done via showCombo() - if emoteCombo is empty, or top emote is below threshold - it doesn't display it
checkCombo prepares emote combo object which is then parsed by showCombo
yea, i was referring to why i had that in original, showcombo was not resetting it or checking it
how are 2 simultaneous combos handled
oh i see
topIndex
after that clearing the top emote would work, right?
Yes.
you could've just asked me to write the functionality instead of dedicating your own time π
but I appreciate it
if only it was easier to push updates to all widget users, that would be amazing
I understand that would require some supervision because of security issues
but yea, currently pushing an update for the widget for all the users is quite difficult
Especially - they wouldn't be happy if they adjusted the code on their own π
true
And about dedicating my own time - I am still so full after Christmas dinner I cannot move out of my PC, so I want to be creative β€οΈ
same here, hope you had a nice christmas
So I apologize for stealing your opportunity to be creative (and even that last fix I pushed after your insight)
And part of it was for a VIP user.
haha, no need to apologize. you fixed something that was broken
And before you arrived I broke another thing! Without you I wouldn't be able to see that issue! TYSM
teamwork makes the dream work
if there is any way I can be helpful feel free to shoot me a message, i'm always happy to contribute
If you have any widget ideas I will be more than happy to review and let whole community use it/them π
Hi everyone
Could anyone help me?
I'm trying to enable and disable a default command (songrequest) using the API
But I only get this error: {'statusCode': 400, 'error': 'Bad Request', 'message': 'child "command" fails because ["command" is required]', 'details': [{'path': ['command'], 'message': '"command" is required'}]}
You cannot disable command on it's own as it is managed by module. You need to send PUT request to https://api.streamelements.com/kappa/v2/songrequest/:channelId/settings with full payload of that module. (you can use GET call on that endpoint, change either enabled or mode properties (mode accepts strings free,tip,combined).
Hey everyone, is there a way in a custom overlay to have the overlay send a message to chat?
@burnt yoke It is possible with mitm service. There are several widgets on #widget-share that do that, like: #widget-share message
Does anyone know what (or IF it exists) the endpoint would be for this custom command?
${user} was last seen ${user.lastseen} ago
Returns: User was last seen 2 months 29 days 14 hours ago
I can get this to work as a chat command but I'd like to make a small script and pull back a list of usernames to let me know how long ago they were last seen.
not sure if anyone has made one or not but though id ask here anyways, does anyone have a rotator for subs, stars and tips on facebook? if not how hard would it be to make one?
Wouldnt be hard to take a twitch one and change some code
i wouldnt know where to begin cause im not a coder at even the slightest lol
Anyone know what the endpoints are for ${user.lastseen} and ${user.lastactive} for user=whoever at my channel?
@sturdy oak you have to know the facebook graph api.
The Alpha Rotating Feed has Facebook support, but there's no FB share link, so you would need to add it your Twitch account first, then duplicate it to your FB one
https://streamelements.com/dashboard/overlays/share/5de9a01f0a74c326b5fa6c68
ah i forgot about that one. thanks man!
i have it for my twitch account and i think i added it to my facebook account. ill have to check.
hello, i would like to do some math on the ${user.points} variable, is it possible to display like "0.1" when the player has 100 loyality points: doing like "${user.points}/1000"
Hey guys might be a dumb question but looking for some help with text to speech and the streamelements api. This website https://www.elunduscore.com/ says its powered by streamelements but when looking through the API I couldn't find a TTS endpoint
I also found this github repo https://github.com/5E7EN/TTS-Emulator/blob/5c9a906d148093661f93321b4802d49e93110976/index.html#L87 that seems to be out of date but at one point it was hitting a TTS streamelements api endpoint. Is there still a TTS stream elements api endpoint that one could use to hear Brian perform text to speech?
To provide some context I'm trying to build a goofy discord bot that can do text to speech with Brian's voice and I was trying to explore different avenues I could use to get the bot to speak
Thanks for anyone who takes the time to help me out π
@forest geyser Due to excessive use there was a "security wall" put in place for our TTS related bits.
Ah I see, so to just get further clarification is there a way to get access/permission through this security wall or is it not available to the public?
@hardy walrus
Not possible atm.
No worries ty for your time ππΏ
You can use google's TTS instead @forest geyser
@sturdy oak Yeah theres a ton of TTS stuff out there. Javascript has a few libraries for TTS and same with python which is super cool but the bummer part is a lot of them don't have the voice of Brian :/
With the text to speech voice of Brian you can get him to say really silly stuff and his voice is super recognizable because many of the popular streamers use Brian for their TTS voice. So its been tough to find an API or library that includes his voice. Streamlabs I think may have a TTS endpoint but I reached out via email to confirm that
Otherwise I may use AWS polly to do TTS but the downside with that is AWS would bill me every month. The other option is to use selenium to go to that elundus core website I linked above and have selenium enter the text and submit it that way. It might be slower but could be a work around. Gotta do some more exploring with it π€·πΏββοΈ
@ebon pulsar You can use ${customapi https://api.mathjs.org/v4/?expr=${user.points}/1000}
@forest geyser I think that amazon polly on free tier would be enough for most of cases.
Hey devs.
Is there any way that you can add tts in Greenlandic? I know tts from Oqaasileriffik website one called "Martha" voice where it can read in Greenlandic.
It will be so cool to use it from my stream
hi, this isn't specifically api related but im not sure what other chat to ask this in: I'm creating my own custom alert and I'm having trouble getting the Username text to constrain to a specified area. I have everything almost working properly except if the name is longer than about 9 characters it runs off to the right side. I'm not sure if I've setup the alert widget wrong or not. If theres anyone that could lend a hand that would be great! I can share gifs/screenshots in DMs if necessary
is there a way to prevent multiple heist's happening at the same time?
Hi, im trying to get the watchtime(loyalty) list of a channel I am editor for using the streamelements api but all I get back is this json file. What am I missing, or is it not possible? json {"_total":0,"users":[]}
hey guys
anyone has any information about ByNoGame & Streamelements linking issue?
not done a lot of developing in streamelements custom widget editor in a while and just wanted to say that the improvements that have been made make it a lot! nicer to work on...thanks for this seriously thanks!!!
@spark obsidian You will need to use fitty.js library that will adjust font size to not exceed selected area. Example: https://github.com/StreamElements/widgets/tree/master/AlertboxTextFit
@tropic fern Use only one browser source with that game, because every instance of that widget generates a new game. So the best way is to have it only once in OBS, on dedicated browser source. Also - if you have it open in Overlay Editor, this will cause a new instance of game too.
did you get any resolution on this? having the same issue
I did not, I submitted a helpdesk ticket tok that was escalated. Itβs been a couple weeks now though.
Thank you
This is just a way to show on screen and make a noise when someone buy something with the channel points
It shows who bought it, the image, and what was bought
(Example in portuguese because i am brazillian, but it doesn't metter)
Link: https://dx3006.github.io/DXPN/
Does anyone know how a viewer can check the amount of currents tickets they have in a current giveaway using a chat command?
SE_API.Store questions:
- Are there size limitations for each object?
- Documentation says only simple objects, does this mean primitive types like string, integer, etc? Or does this mean no nested objects? Or does it mean something else?
- Does each store hold a single object or can it hold an array of objects?
- Counters, can you give me a good example where or how these would be used? Is a counter like a dictionary object that holds multiple values with an associated count?
Thank you for the assistance!
@tropic fern I thin that they can check that on giveaway's webpage.
@glad urchin I am not sure about size limits. When it comes to simple objects - it means you cannot have references nor functions nested. Basically - this is something you could represent as JSON. So it is absolutely safe to have {a:5,b:[1,2,"test"]} stored.
And about counters - this is for bot counters. Like when a viewer types !death and your death counter goes up by one. After bot increases that value, it will be increased on your screen (in any format, so you can have Deaths: 5, or face images like in old FPP games)
Thanks for the quick reply @viral patrol π
Just to double check @viral patrol but do you think itβll be safe to store an array of simple objects in the se_api.store?
Hello guys, does anyone have any insight on where to begin if I wanted to add (or suggest adding..?) a payment method in SE's tipping page?
question: and this has probably been answered over and over again...
the customWidget onWidgetLoad event has the following field:
{
detail: {
channel: {
apiToken: "tokenValue"
}
}
}
my question is is that apiToken what's used as a twitch oauth token or for streamelements?
hey, thanks for the link! Any idea how to remove this "X4" after the names for the custom label? I'm not sure why it's happening
it does this for every label
I'm not entirely sure, but it can take a string, right? could you make a comma-separated list and pass that in as a value?
for StreamElements, but it is a limited token and not the "full" one for all endpoints
gotcha. thanks!
I actually got it all setup tonight and an array of simple objects worked just fine π
I try to figure out how to format command variable ${user.time_online} to just show the sum of ours with one decimal place.
So instead of "7 months 3 days 14 hours" it should show "5222,0 hours".
It should be possible with the use of API, that's what I heard. But I am in despair, can't find how to do that.
@viral patrol I always get an error when I enter the command (404 The requested URL was not found on this server.) What can I do? I integrated the pashse correctly and otherwise it always worked.
If requested url throws 404 it means that path is not found on server. It can be because your url is wrong or file got deleted.
hi! is there a way to trigger a sound with a command and on the same with response something with the bot in chat? for example: !hi --> hi chat ${redeem hi} (if you have access to support request check 101666)
Does anyone know the list of all of the icon names for streamelements. Like if you type " heart " a heart will show up or " crown "
@copper portal Can you elaborate?
no
Hahahaha
Lmao trolls
I'm kind of new as well with the same problem, is there like a tutorial on how to use this?
Oh. This one is meant to be used by somebody with html/css/js knowledge. I am not aware of any "ready to go" solutions. Basically with that library you can select the text container and code will adjust the size of text inside, so it won't overflow the container dimensions.
hi! short question. is it possible to use ${game} with the integrated Tweetfunktion from streamelements?
hi
I'm not sure where to ask this question so I'm just gonna ask it here. My !watchtime is not working. I have it set up (or at least i thought I did) but it always just says 0 seconds. Is anyone else having this problem?
The watch time is in 10 minute intervals; do you have users that have more than 10 minutes already?
ya; it should
Hoping this is the right place to post! I'm trying to code out Twitch T2 and T3 alerts, but with JS to (hopefully) show how many months they've been subscribed as well. Ideally I'd like to do this for Prime, too.
I realized what I have currently is targeting tier since the variations are for tiers. Is there a way to make the alert display months as well?
I rarely touch JS btw! I animate and all with CSS so this is practically a foreign language to me.
You are in the right place @radiant halo .... what are you looking for ... like 'user resubbed with tier for X months' ?
Pretty much! Hard to capture motion in a screenshot, but ideally I'll have a star in different colours swirling around showing the tier, and then the text to say well... not 2000/3000 months lol.
π€£ ya. 2000 months; that's dedication
Multi-generational subs, hahaha
i've tested it some @radiant halo .... not sure where you are getting that 2000 from?
{amount} will give you the amount of months they've subbed. and {tier} will give the Tier
Oh hmmm. That's just what pops up in the emulator when I hit the play button of the left menu
OH! I think I found the issue @elfin arch! It's the emulator and not the code lol. When I put in a custom event and tell it the tier and months it's ok! π
oohh. hahah ya. emulate the event with custom amount
I've mainly worked with Streamlabs so I'm getting used to how SE functions
.... looks like the {tier} includes the word Tier too
Oh ha. I'll remember that so I don't go double tier
Welcome to SE π that alert you posted looks great.
Thanks! It's my brainchild of CSS animation with scaling svg backgrounds π€£ Brought on mostly by the question "Can I actually do this?!"
what happens when you emulate 2 events directly after each other?
i see CSS and SVG in the same sentence; and i'm nope
Oh geez it gets worse, I was animating clipping masks in CSS. π€£ https://twitter.com/nariwalsh/status/1327064543529353217?s=19
You know I stepped away from my computer, one sec
Both work!
Nice π
I saw some CSS only animations, which would override each other on stream when multiple were triggered π
Oh geez lol, maybe I'll have the ultimate test be live in that case. π As I've already found with the emulator it doesn't always display accurately!
I just installed them regularly and they turned to regular fonts after I restarted. It seems that installing it for all users resolved the issue. I think this step should be included in the official SE.Support response.
For the developers....the helpdesk for merch cannot answer this question to no fault of their own. But is there going to be an update to the merch store? Looking to add long sleeve shirts and masks. Anyone developing an update for the merch store?
Back again with a JS question that I hope can be resolved with JS. I'm trying to set up a widget that will update with the latest follower/sub/cheer etc.
I just am INEPT at JS, lol. I found the StreamElements variable list, but I'm not sure how to make the variable display into the IDs in my HTML.
How might I have an input that accepts multiple lines of text?
@radiant halo Check "Ultimate text widget" from #widget-share - it should help you
@ember sigil Unfortunately there are no textareas
Howdy folks! Weird question, but have any of you tried building react applications into the custom widget? Have you seen any performance issues?
Any app that can be held within jailed environment should be OK there. I haven't tried react/vue apps there, but I think they should be just fine there.
Ohhh awesome.
I will play around with it. I can't imagine any speed issues, but this is my first day playing with this.
I am still trying to understand the event system and all.
I think that the best way is to check docs/widgets on github
Basically there is window event dispatched on actions happening.
In most cases you won't need a complete React app though
Yeah, I just like the idea of building a robust plug and play library for my own components that can hook into context without needing to individually listen to window events.
Something I can version out and prototype on quickly. I might need a couple functions to simulate the data coming in for local development. Hrm.
For StreamElements paypal integration...
Can it be used soley through OBS Studio? or does it require a Twitch, FB, or YT stream platforms to work?
Scenario. I stream on Zoom through OBS Studio and would like if there was an option that when people donated to my paypal that a popup/alert shows on screen.
Maybe I could somehow use the streamelements tipping page link that it generates for FB?
That's the only way an alert would work.
@hardy walrus So I would have to stream on either FB, YT, twitch for it to work? π¦
Stream no. Just have an account for any of those platforms and connected with us.
Im still newish and not the sharpest tool. How would I be able to use the tipping overlay system if I am streaming on Zoom using OBS Studio or OBS Live ?
I think you would need to use virtual cam from OBS
Youre right. But thats not what im asking for here. I want to be able to use a stream element widget for tipping (paypal) for OBS while im streaming on Zoom.
You can use that. Set it as for Twitch, just use overlay and tipping link wherever you want
Checked that one! I have no idea how to turn an array into what I need.
I did get some help from a friend though to get what I wanted working
That is awesome! Say my thank you to your friend please β€οΈ
I definitely will!
Just in case anyone wants/needs to do what we did here's the rundown for stream labels in HTML and JS. You'd style the CSS however you want
HTML
<div class="follower">New Follower: <div id="new-follower"></div></div>
<div class="subscriber">New Subscriber: <div id="new-subscriber"></div></div>
<div class="cheer">Newest Cheer: <div id="new-cheer"></div></div>
<div class="tip">Newest Tip: <div id="new-tip"></div></div>
</div>
JS
let data=obj["detail"]["session"]["data"];
currencyCode=obj.detail.currency.symbol;
console.log(obj.detail);
console.log(data);
$("#new-follower").text(data["follower-latest"]["name"]);
$("#new-subscriber").text(data["subscriber-latest"]["name"]);
$("#new-cheer").text(data["cheer-latest"]["name"]+" x"+data["cheer-latest"]["amount"]);
$("#new-tip").text(data["tip-latest"]["name"]+" "+currencyCode+data["tip-latest"]["amount"]);
});
window.addEventListener('onSessionUpdate', function (obj) {
const data = obj.detail.session;
$("#new-follower").text(data["follower-latest"]["name"]);
$("#new-subscriber").text(data["subscriber-latest"]["name"]);
$("#new-cheer").text(data["cheer-latest"]["name"]+" x"+data["cheer-latest"]["amount"]);
$("#new-tip").text(data["tip-latest"]["name"]+" "+currencyCode+data["tip-latest"]["amount"]);
});
you may want to replace the $(...).html(...) with $(...).text(...) to escape possible bad names
Like offensive-type names?
potential XSS names
Not familiar with the term, ha. Is it a potential error kind of thing?
XSS is short for Cross-site scripting
I think this should be covered by name length π
the $().html() "executes" any html it gets, while $().text() just sets the text value without any parsing
But from the other hand, they can break your widget using name like </div>
what is the max name length for donations?
Twitch allows 25 characters, but I think donation names can be longer
I appreciate the info! It's not often I get into actual programming.
if you don't really need to render html, you should always prefer the text alternative
but in the case of widgets it's not that tragic
but it is not good either 
Hahaha good to know! I'll definitely change it
Hey, I was sent here from #helpdesk-twitch I am wondering if someone can help me if you have time
regarding a !boss command
@violet swallow Can you give us bit more details please?
Got a question about setting up a widget on Streamelements. I currently have a premade rotating ticker that shows latest Sub/follow/ect.
One of the tickers on it is for Sub goal, is there a code I can enter into the field before the {{ amount }} command so that it can also show how many current subs I have instead of only what my goal is?
Same question regarding current followers since I have one for follower goals also π
OMFG @radiant halo I was looking for this code for month !!!!!! Thank you so much for your help with Stream Labels

