#dev-chat
1 messages Β· Page 44 of 1
basically i have a video playing and i would like an image to come up 3300ms into the video and dissapear aroudn 12090ms
let timeIn = 4000;
let timeDisplay = 4000;
let timeOut = 400;
pretty sure these are the key but ive put them just about everywhere i can thing and nothing
Hello! How would I go about getting just the message from an alert? I want to process the text message live in a lua or python script in OBS. What would be the simplest way to get the message from streamelemets into the script?
Should I get it through a normal alert and try to parse the message when it comes through? Can I get it in a text file or web link that a text source can use that I can then read from my script? Any other suggestions/ideas?
can someone help me make a simple edit to a widget?
@ashen narwhal probably not
if its very simple i can try, but ive never gotten an answer on this channel ever other than being told to read the exact document i said didnt have the info i wanted
Ok so can I change who can use a widgets command?
@crisp laurel I'll tag you so you see this
I'm trying to make a custom widget but don't think I'm knowledgeable enough to make it haha - It sounds simple yet its not - 1. I'm trying to make my mp4 video show and hide based on a time interval 2. Also have it animate in on sub or follow event for 8 seconds also wanting my total subs and followers to be displayed on top of the video.
Hello I'm trying to understand the events on Stream Elements, but now i don't understand how to icrease a value when i have a new folloer
follower*
I really don't understand how to use the event listener
@viral patrol the 'fixed time' feature you added to the credit roll widget doesn't seem to really be working right? it adjusts speed based on how many events are there to an extent, but still has pretty variable timing
Hey @ashen narwhal what are you trying to do?
To set the right expectation: this channel is about developers helping each other, this is done in a voluntary basis, something that is simple in concept may not be so simple when translated into code and if you are just looking to have a widget changed without doing the change yourself, this is specialized work and most people will expect compensation for it.
@pale acorn the code you have shared is increasing the same variable "count" when either a new subscribers or followers event happens, what are you trying to achieve?
Yo!
When I try to refresh access tokens at "https://api.streamelements.com/oauth2/token?"
I get
error: 'server_error',
error_description:
'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.'
Is it a server error, or am I sending incorrect credentials?
Thank you for reporting this. We are investigating the issue.
@viral patrol ok, ty!
It seems to be OK for me now. Can you check?
Working now! (still got error, but a better error π )
Hi! I have an issue with community gift alerts via AlertBox and a custom widget. After the first alert - "someone is gifting subs!" - there is a long pause which, I assume, is for all gift alerts from that community gift. In custom widget I used SE_API.resumeQueue(); but in AlertBox there are none (the default one is not showing neither the varied one for gifts). How can I skip the "post-community-gift alerts" in both custom widget and AlertBox?
Hi. I'm currently using Bananeens 'One Bar to Rule them All' widget, but I'm having trouble having it update when people donate. I'm not sure whether it's because the tip are in AU$ but it's not updating (the default SE one updates though), Does anyone know what the issue could be or Is there anyway to just link the points to equal whatever the dono goal amount is?
@ocean wadi ^^^^^
@crisp needle This will be always delayed as Twitch is dispatching those events one after one and we have to parse them.
If you have community gift variation and resumeQueue for events that are part of bult gift, there's nothing more you can do to make it go faster
@hardy walrus why ping me ???
Person above me had a question about your widget.
Oh right
@cursive hound , for donations, the bar is filled using this formula: rounded amount (1,49=1 / 1,50=2) multiplied by tipPoints. If you have large goals, small donation might not be visible since bar is filled % by %
It doesnβt care if itβs β¬,$,Β£,Β₯ or other
The tip points are for 1 unit whichever unit you use
Thank you, @viral patrol
Ah okay, thanks @ocean wadi Iβll have a look and see if that works
if you want to try things with another bar, just import it a second time and change the very first value in JS tab when editing code : "widgetNumber".
By changing this, you change the storage on SE end therefore the saved points on both bar are different.
I think I managed to get it working properly. Not sure why but even a second/new version wouldn't work 50% of the time. Had to recreate a brand new scene and start again - hopefully this continues to work. Thanks for your help!
Hey guys. I was looking into the API reference, but could not find anything about subscriptions. Is there a way to list all my current subscribers? Thank you!
The only way to get a list of your current subscribers is to query Twitch API, not StreamElements
Thanks, wanted to clarify that. I didn't want to use their OAuth procedure and use your JWT token instead, which is easier
@pale acorn the code you have shared is increasing the same variable "count" when either a new subscribers or followers event happens, what are you trying to achieve?
@steady iron To increase "count" depending on the event and try to show it on a goal bar
I'm trying to connect to the SE-Websocket but i never get any response / command line output. What am I doning wrong? My code:
const io = require('socket.io-client');
const streamelementsSocket = io('ws://realtime.streamelements.com', {
transports: ['websocket']
});
async function setupStreamelementsClient() {
streamelementsSocket.on('connect', () => {
console.log('connecting to Streamelements...');
streamelementsSocket.emit('authenticate', {
method: 'jwt',
token: process.env.STREAMELEMENTS_TOKEN
});
});
streamelementsSocket.on('disconnect', () => console.log('disconnect'));
streamelementsSocket.on('authenticated', () => console.log('authenticated'));
await io.connect();
}
setupStreamelementsClient(); ```
You can find working example of WS connection in this package: https://discordapp.com/channels/141203863863558144/259680142459142144/633144423055622165
thx, I will have a look at this.
ok, I can't connect because I have a "invalid token". But I also use the exact same token for API-Requests and it works just fine. Any Ideas why this could be the case?
ok, I found my error: The call require('dotenv').config(); was missing and therfore the token was just undefined....
@pale acorn then it is necessary to have different variables to count for different things (for example countFollower, countSubscriber, etc), and then make the functions to draw the numbers/bars in the HTML, This has to be done manually. If all you need is to have the totals you can simple retrieve the current total from Twitch/StreamElements through their APIs. You can check other custom widgets to have an example like this https://strms.net/one_bar_goal_by_bananeen
how exactly does the SE_API object work in the custom widget? For instance, if I want to get the current user's channel name without asking for it in the widget json?
nvm, I think I figured it out but it looks like obj.detail.channel["username"] is much easier
I believe this to be the right location: MixItUp app is having api authentication errors when attempting to connect. Has this been brought to anyone's attention to this point?
is there any possibility to add channel point redeem alert?
@cedar kiln there is something in #widget-share for redemptions that require text input but nothing beyond that.
@solid patio I had seen someone mention it once on twitter but I can't really do anything beyond that as I'm not sure where the issue is exactly.
This is the error specifically ^^
When did you last try klam?
Last attempt was 3-4 minutes ago, same issue.
Only person offhand I know that could answer this is @viral patrol and not sure when he'll be on.
Thank you for pinging me and thank you guys for reporting that issue. I forwarded that to our developers.
Hi, I tried getting a custom widget in your github to work but couldn't figure out what's wrong with it. https://github.com/StreamElements/widgets/tree/master/ImageOnEventAmount
Possible that someone could help me out and take a look?
It's about 2 years old so I'm guessing it's obsolete. But if so, could I get some pointers getting it up to todays standard?
Hello! I have a Widget rotator that uses several Session variables from streamelements API, per searching I came across this URL that describes each one of the objects. https://docs.streamelements.com/reference/sessions
I want to show case the Latest Gifter, but as it seems the object
Object data.subscriber-gifted-latest
String data.subscriber-gifted-latest.name
Integer data.subscriber-gifted-latest.amount
String data.subscriber-gifted-latest.message
Only has the Gift Reciever and not the GIFT SENDER.
I want to show the GIFTER and the latest ammount of gifted Subs
EG: Latest GIFT: username Gifted 10 Subs
I can't seem to get my head around gift subs with onEventReceived. I have an object that has the name and amount of the latest subscriber and latest gifter. I'd like to update this real-time with onEventReceived but I am gettin thoroughly confused by the documentation.
case 'subscriber-latest':
if (obj.detail.event.bulkGifted) {
state.gift.name = obj.detail.event.name;
state.gift.amount = obj.detail.event.amount;
} else if (obj.detail.event.sender) {
state.sub.name = obj.detail.event.name;
state.sub.amount = obj.detail.event.amount;
if (state.sub.amount == 'gift') state.sub.amount = 1;
} else {
state.sub.name = obj.detail.event.name;
state.sub.amount = obj.detail.event.amount;
}
break;```
This is my current code
If I do a single gift it doesn't recognize it as a gift
PMs?
Not needed. I actually figured it out 20sec ago lol
:D
I got so annoyed I made a custom widget that logs it and now I finally understand
.gifted ?
lmao
Yeah so bulkgifted = true is multiple gifts, bulkgifted false = 1 gift and bulkgifted = undefined is no gift
yep
That's what got me hella confused
Hi i don't even know If i am asking this in the right place, but since it's something pretty basic I Hope someone here could give a hand, so I have a command called !kill, which kills the tagged user, I would like to know the code so that whenever someone tries to kill one specific user(Ex: !kill Chuck norris), it appears: "You can't kill Chuck norris.".
currently the command is like: "${sender} matou ${1} com um ${random.pick"canivete" "tank" "cano" "revΓ³lver" "pΓ© de cabra" "dedo no boga"} e fugiu..."
@elfin arch i really liked your wheel widget, i'm looking for a spin the wheel widget for donations that spins and I do a random thing based on that, you think the widget can be modified for that?
Thanks. Sure. check out the donationWheel.js code here: https://github.com/pjonp/pjTestBot/tree/master/modules/.SE_Overlays/chatterWheel/alternativeWheels
^ @coarse gate ... if you want the name of the donator to show on the wheel too; then update the HTML information with the .html file in link as well π
no not donator, but like, i want the wheel to have some options of stuff id do at random. like do 10 push ups or gift a sub etc but the wheel activates when i get a donation of a certain amount. i hope that makes sense
Its like Spin the Wheel on SL or Roulette on Twip
I want to try the "Image Reveal Game" Widget by @elfin arch and I wonder if it's possible to track the wins of people in chat during a session? Maybe some kind of a top 3 leaderboard?
hey there, maybe you can help me again... If a make a chatcommand f.e. "!yummy" and output is "!redeem yummy" its not activating the redeem... is there a way how to trigger the streamshop item with a chatcommand like this?
Output should be ${redeem yummy}
Thx!
Is there any way to make a custom command that will edit another custom command?
Hello i have a question. Can we somehow edit someones points from api when we have permission like Bot Supervisor or Editor? Cuz I can edit these points from streamelements page but not from api. Using own jwt i got 403 No channel authorization found
@random dragon The streamer may register on jebaited.net and provide you token for points management
nice domain 
It uses oauth
ok thank you 
Example usage may be found in bank heist widget or wheel of fortune on #widget-share
i want to add level to discord bot
when someone get lvl i want to add some points
on streamelements points
ofc
Seems like jebaited.net should suit your purposes as middleware for SE api
I'm interested in how this works
const gifterData = await SE_API.store.get(kvID);
Is this an API wrapper that accesses the StreamElements API?
This gets data from SE key/value storage service.
There is no full api available from custom widgets due to security.
thanks
@meager rose what functionality are you looking for? Some of them may be covered by jebaited.net middleware for SE API
oh im just looking through existing widgets and looking at how they work π
never heard of jebaited.net
i will take a look π
This is OAuth service that allows noninvasive connection between widgets and SE API.
So if your token leaks, your usage will still be limited to selected scopes.
Hello guys, I'm new here and I would like to know if there is any way I can place bets to start and pay them through the stream chat, some API that does it in a simpler and easier way than having to go to the site always to start bets and pay them
Hey I'm Trying to make a completely custom alert boxes, got everything working except the font.
I know why it might not be working (unable to find the font) but when I use the exact link I use (points to a website I have) I prompts my browser to download the font. (so it is there) the font is in TTF format and works fine locally but not on SE
Here's the CSS code:
`@font-face
{
font-family: Font;
src: url(http://web.site/font.ttf);
}
.Textbox{font-family: Font;}
`
The way I am referencing this has worked great for me in the past and this has been the only time this hasn't worked for me, Any workarounds?
Not really a Pro at web design just been tinkering with it for years. Cheers!
@regal jetty Your font has to be served over https due to browsers security policies
One of the easiest way is to enable cloudflare on your domain, so your traffic will be SSL encoded between CF network and user where CF=>your server may be plain http
@pliant mist Check those: https://docs.streamelements.com/reference/contests#contestsbychannelpost https://docs.streamelements.com/reference/single-contest
@viral patrol Thankssssss
Yeah gotta work out how to enable that
@pliant mist Check those: https://docs.streamelements.com/reference/contests#contestsbychannelpost https://docs.streamelements.com/reference/single-contest
@viral patrol I'm being beaten up here to use, how do I use it? did not quite understand
I thought you want to create a script/program that will trigger a call to our API to start contest and this is the way you can create and manage one.
hey. is there anyway I can capture in my custom widget when somebody uses channel points ?
Only if the Twitch item has user message attached
it's been like 2 months, is the link from the docs outdated or am I missing something
@viral patrol ^^^^
Is anyone able to help me with a custom api command for twitch using stream elements?
@timber lark the tracking of wins is not built into the widget. But it would be possible to create an object of winners for the game session and reference back to it for a leaderboard to either announce in chat or add into the visual overlay. Unfortunately, I have no time to work on anything but can give you some suggestions if you want to try and tackle it π
Unfortunately I have absolutely no skills in JS, CSS etc.
So maybe you can just keep it as a suggestion for a later update, when time is right? π
Pretty sure this suits here but trying to edit my alerts and testing them, worked fine for a while now when I save or test them in the editor (works fine in there) but not on the preview/feed to OBS. Tried refreshing, nope.
You can test alerts via the Emulate bell on the lower left side of the Overlay Editor. Simply go to your Dashboard > My Overlays > pencil/edit button on the overlay. Make sure the Preview LIVE on stream option is on to see the alert in OBS/XSplit** https://streamable.com/vtulg9
Yo, code nerds, how hard is it to make a poll that chat can spam the shit out of for voting?
something that can be customisable for colours, icons and text
Hey, can't seem to get the font I want to pop up on the alert through CSS. Am I doing this right?
How do I create a custom alert with html/css like in streamlabs?
I want to migrate streamlabs to elements, but I cant find anywhere where I can put my design and stuff for alerts
Hey, can't seem to get the font I want to pop up on the alert through CSS. Am I doing this right?
@zealous basin did you add@import url('https://fonts.googleapis.com/css?family={fontName}');? or link it in your html template?
How do I create a custom alert with html/css like in streamlabs?
I want to migrate streamlabs to elements, but I cant find anywhere where I can put my design and stuff for alerts
@compact haven this custom code
@zealous basin did you add
@import url('https://fonts.googleapis.com/css?family={fontName}');? or link it in your html template?
@cedar kiln do I put this in CSS or HTML
is there a good way to test "session" events with the emulator? It seems that the "event-session" objects don't always exist when testing your custom widget (i.e. "subscriber-session")
or should we just assume the number is 0 if the subscriber-session object doesn't exist?
@cedar kiln do I put this in CSS or HTML
@zealous basin that was css..but you could use another code with same effect in html..i think it was not documented, but you can find it from examples
@silk pebble 2 things.
It wouldn't be accurate as prime subs do not really track monthly.
π€
I know something that might work but need to see if that's one of the responses it has.
@pure drift Regarding your API above it only does age right? No endpoint for streak?
@hardy walrus hmm ok tnx. i'll have a look at this π
@hardy walrus I have a question about this API. If you give authority to the API for a channel, does this mean that anyone can check on these stats if they just use that channel name instead, or the request will only work if it comes from the channel that authorizes it?
That would be a question for the person I pinged as that's his website.
But I think as long as they do the proper link for it technically anyone can once you authorize it.
oooh i see
I ask because a lot of people don't want things such as their sub count known to viewers, so authorizing this for sub age could also mean anyone else could just make a command in their own channel and just replace the channel name with the channel they want to look up the sub count for.
From what I've seen unless they know that you're using this api there's no way for them to know unless the website has a hiccup.
Because the commands list on your public SE doesn't list the actual website.
yeh i guess... still... seems a bit weird to allow others to see it if you don't want them to, but hey, maybe there's no way around it. shrug
@hardy walrus Streak isnt exposed via the API, so yeah, only subage.
@silk pebble Your concern is something I have thought about in the past, but by the time I realized, I didnt wanna drastically change the behavior of the API endpoint. Most people that do use the API have it in their overlay or in a chat command anyways, so its not like theyre trying to hide the info
Figured as much. 
@pure drift yeh, but allowing access for sub age also means giving access to subcount to anyone that wants to know. oh well. π
Yeah thats a mistake from the past, really.
Not many people use subage and not the either subpoints/count and I discourage people from using subage as it gives information thats pointless to 99% of the channels.
I'll probably deprecate the subage API at some point and then just remove it, since again, its not really information anyone cares about.
@pure drift aaah ic. yeh if im honest, i was actually looking into a way of trying to make a leaderboard of sorts for sub age, which doesn't seem like something that could happen with this anyway.
You'd need to use Twitch's API for that
But even then, it doesnt provide subscriber streak, only when the 'subscription' was started. For Prime subscribers, that date resets every month.
@pure drift hmmm ic. yeh i mean im not really that savvy when it comes to this stuff. It does seem strange that the mouse hover over a sub badge shows the month total and yet the API doesn't provide that number to be used. π€
It's Twitch. Theyve spent a few years building an API that works poorly and saying the old, decent API is deprecated and scheduled for removal.
For me its not strange at all, because I'm used to this kind of crap from them.
haha
@real dune I think you are looking for this: https://discordapp.com/channels/141203863863558144/457957557470887947/542768648222146561
@compact haven You should create regular alertbox and then enable custom code for that:
@real dune I think you are looking for this: https://discordapp.com/channels/141203863863558144/457957557470887947/542768648222146561
@viral patrol needs to be something pre-set and repeatable
Help
Hello. Tried to call api to get giveaway joined users, but give this errors. P.s. its all ok with JWT, ChannelID and Giveaway ID, because "send message" api works fine.
Hello, can I get top gifters list using SE's api? I cannot find it in docs.
@spare knot i think there is no devnull subdomain ;)
@harsh cosmos it is not provided in API
hey i really need help and i dont know ware to go i keep trying to use obs and this is my first time but no matter what i do it only displays black i dont wanna steam or anythings just record my screen and games
@tender prairie For the best OBS support, please join their Official Discord @ discord.gg/obsproject
Hello, I made this alert. Now i want the white line to reveal the name of the follower (infront of the "folgt") and then when it comes back to reveal the "DANKE" it should hide the name of the follower again. Sb have an idea? (Ik i can just make the text appear and dissapear, but then the animation would look kinda wierd.)
The only way is to create it in HTML
Oh sadly i dont know HTML but thx anyway
hey, i made a custom alert for my stream, but i can't get these two lines to work:
document.querySelector('#container').style.width = document.querySelector('#alert').offsetWidth+60;
document.querySelector('#container').style.marginLeft = "-" + document.querySelector('#container').offsetWidth/2
this works fine in local but not in SE
this should output : (values in px are random for the exemple)
<div id="container" style="width: 500px; margin-left: -250px;">
but instead:
<div id="container" style="margin-left: 0px;">
You should use integer values, not strings:
document.querySelector('#container').style.marginLeft = -document.querySelector('#container').offsetWidth/2
Hmmm. It seems like your offsetWidth returns 0 then. This may be because the content is not populated when you are calling offsetWidth or container is not display:block
This is a div, so maybe it is overwritten somewhere to display inline?
nope :/ its display:block
if you wanna try:
<div id="tipContainer">
<div id="tipAlert">
<span class="background"></span>
<div id="text">
<div id="username">{{name}}
<span class="usr-white">{{name}}</span>
<span class="usr-rose">{{name}}</span>
<span class="usr-bleu">{{name}}</span>
<span class="usr-jaune">{{name}}</span>
<span class="usr-vert">{{name}}</span>
</div>
<div id="action">
<span>text {{amount}}{{currency}} !</span>
</div>
</div>
</div>
</div>
const tipContainer = document.querySelector('#tipContainer');
const tipAlert = document.querySelector('#tipAlert');
tipContainer.style.width = tipAlert.offsetWidth+60;
tipContainer.style.marginLeft = -tipContainer.offsetWidth/2;
@torn saddle
tipContainer.style.width = `${tipAlert.offsetWidth+60}px`;
tipContainer.style.marginLeft = `${-tipContainer.offsetWidth / 2}px`;
yes it worked thx !
So the Current Game Label widget is pretty nice but does anybody have a guess how to insert a few pixels between the icon and the text?
it's a little too tight
Where do i find a channel id?
Is this the proper place to seek CSS/HTML help for custom alerts?
Hello, getting this error again for oauth2.
{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request.","state":"........
hello friends! I am looking for some on help How to use the query params for the api calls. I want to limit to 1 and ONLY show the most recent tip. building this in node.js. When I call the api, it is giving a long list instead of just 1 and the latest.
@dreamy creek https://streamelements.com/dashboard/account/channels
@pliant torrent Yes. This is the best place to seek help
@sterile lodge We are already on it. OAuth2 is in beta ATM and this issue may occur.
@digital glacier https://api.streamelements.com/kappa/v2/activities/:channelId?limit=20&types=tip&mintip=1
anyone in here able to help with a widget commission, its very hard to find anyone in the commissions channel as its mainly filled with gfx artists
guys is streamelements login working for you?
i get this 
and after that i get redirected to twitch and logs me out of twtich
@viral patrol I'm getting the same error as last week when trying to refresh access tokens.
error: 'server_error',
error_description:
'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.'
@lusty pivot "Twitch has no control over the content or security of twitch.tv" They got that right 
@elfin viper This is strange. From what I see it should be working properly now.
Hi, is there an API that transfers the loyalty points to another account for the same users?
The only way to do that is to take points from one account and add them to another.
this manually?
Not manually, you can do that via API endpoint: https://docs.streamelements.com/reference/single-user#pointsamountbychannelanduserput
So you can authorize with channel1, take points and then add points with authorization from second channel
Tks!
Also you may want to check: https://jebaited.net/tokens/
is anyone here good with custom CSS? i need help making my donation goal react to incoming donations on streamelements
i want it to be like a progress bar, but it doesnt do anything right now. it's just kinda stagnant and wont move as it should
also, code isnt mine, another creator posted it on codepen.
i think the code was meant for streamlabs first, but now that i'm copying it over to streamelements, there's a bit of a discrepancy in how information gets interpreted
does anyone know how i could maybe pull the JS from the original streamelements tip goal?
meaning the built-in widget
Hi guys.
Is there a way to build a custom chat widget with all the options the current default chat widget has?
The one in github has some stuff, but not all of them.
Like, is there a updated chat widget code somewhere or streamelements is planning on releasing one that reflects the current options we have on the default chat widget?
@unique iris There's actually another one in #widget-share that's a whole lot more customizable than the stock one. https://discordapp.com/channels/141203863863558144/457957557470887947/656092139817664523
@unique iris what options are we talking about
@hardy walrus thanks sudo!
@tame sparrow all those that are available in the default one:
I was looking to replace the ignored nicknames with this (pic) like the default one as well, instead of a list separated by commas like the custom chat has
Is there a documentation for all these controls?
@gray schooner If you want goal widget as custom code, so you can adjust it to your needs: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
@unique iris All of those settings can be done via code. Custom chat widget (either github or widget-share channel) has been created to be a start base for coders that want to change them to their look.
@viral patrol This error is now also returned from /authorize
{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request."}
Am I doing something wrong? π
I just reported that to our guys 2 minutes ago. Thank you for pinging
@viral patrol great, thanks π
@elfin viper should be good for now
@viral patrol after 5 days i ended my project, and jebaited API works as it should 
@random dragon Looks nice! Good job!
Also I see not only me is having issues with ISP today π
Morning. I have a question about chat commands with sound effects. Is there a way to have certain sound effects initiate without using !redeem before the command? Or is there a way to use an alias in the commands to trigger the !redeem function without chatters using !redeem before the command
There is a variable {redeem ITEMNAME} you can use in a custom command, to trigger a store item.
@rugged rapids ok does if I have !oops set at the chat command, Iβd add an oops sound effect in stream store and then add ${redeem oops} in the response? Or just {redeem oops}
Also thank you so much for your help
Add ${redeem ups} in the message field of the command.
Perfect thank you!
Hey @rugged rapids sorry to bug you again. It seems even when I have !oops response set ${redeem oops} it doesnβt play a sound effect. Is there maybe something I need to change on the store side?
Do you have the redemption widget added?
I donβt think so!
That would do it.
@hardy walrus thank you!! does that mean Iβll need to add one for every type of sound effect?
No. This handles anything done for the store. Adding multiple will simply cause an echo.
Ok thank you.
I'm having a hard time with args in a custom command to keep track of multiple counters at one time. Anyone have some insight?
This is what I have right now and I've tried changing things around several times
${count ToshiELO -${1:}} ${count ToshiELO +${2:}} ${count ToshiWIN +${3:}} ${count ToshiLOSS +${4:}}
Basically I want to be able to type !gain+ 0 2300 3 2 - For a 2300 ELO Gain and 3 wins 2 losses
I can do this easily with Streamlabs, but I want to make this work with Streamelements - Please tag me if you have insight or can help
Hello I developed an overlay using the socket connection. When I test it on "emulate", it works normally. Now when I receive a real donation, it doesn't work. Is there a different configuration for this?
Hi, i'm brazilian, so, maybe some words may be whiten wrong, sorry for that, now my question: Can i (a moderator) create or start a contest via Chat? Or i need the access to dashboard?
@sour estuary you can use the #π΅πΉοΈ±portuguΓͺs channel
ah, didn't see that, thanks
What's the easiest way to call the goals, latest sub, etc. from stream elements into python / an obs element?
Is there a get / post api for latest followers / subs?
StreamElements OAuth2 Application Form The form StreamElements OAuth2 Application Form is no longer accepting responses. Try contacting the owner of the form if you think this is a mistake.
Hi there guys, I'm experiencing loads of API oauth2 errors {"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request." ... . This issue seems to be affected a large number of streamers. Any progress or feedback on this issue? I see it was raised above and it was said to be resolved from what I can see.
@elfin viper This is strange. From what I see it should be working properly now.
@viral patrol still not working for me
@gray schooner If you want goal widget as custom code, so you can adjust it to your needs: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
@viral patrol i really like this, thank you! how do i incorporate the json file into streamelements? i feel like i'd be doing things the hard way by manually adjusting each piece of code individually. is that the only way to do it?
@lusty pivot @viral patrol Not working for me as well now
Thank you guys for a report. I forwarded that.
@gray schooner JSON file should go to FIELDS tab of custom code editor, then you will have options displayed in left panel.
Hi, I'm having some problems adding two different fonts on my css tab... idk why the "follow" text don't recognise the font named "ruido"
If you have the font installed on your PC you don't have to use font-face definitions, you just need to use actual font name
I mean, I just copy the name on "font-family" ΒΏ
What name is displayed when you open "Lemonmilk-lightitalic" from C:\Windows\Fonts ?
You should just use this name
Do not redefine it as "Ruido"
Sorry. I had a call
Not properties of file
Open it
Ohh. but..
I am blind. Those are two same fonts (same family), you don't have to redefine it
So instead: font-family: Ruido you should do:
.username{
font-family: "Lemon Milk";
font-style: italic;
}
Hi there guys, I'm experiencing loads of API oauth2 errors
{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request." .... This issue seems to be affected a large number of streamers. Any progress or feedback on this issue? I see it was raised above and it was said to be resolved from what I can see.
@viral patrol any feedback on the above?
This one has been resolved today: https://status.streamelements.com/
Welcome to StreamElements's home for real-time and historical data on system performance.
The new Clippy Widget, does anyone know how to make the actual animations bigger
@pulsar willow The assets there are small resolution so I kept them original so they are not pixelated, but you can go to Code editor, CSS tab and add something like:
body{
transform: scale(2);
}
And play with the number to fit your needs
@viral patrol I was experiencing issues after the time it was marked as resolved but seems to be working now, thank you π
getting this error,
{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request.","state":"Qf9y4D2PcNr7x5F6Mnd9314bfa2e344412a63ce9140e42412a"}
a lot
I just tried jebaited.net and got similar ^
Hello, I'm currently still experiencing the oAuth token issue despite the resolution. any ideas why?
Hi, is there any posible way to extract only the las video link from a channel of YouTube without all the text this api has?? - $(customapi.https://beta.decapi.me/youtube/latest_video?id=YOUTUBECHANNELID)
@pliant flume the last part is needed to specify which channel.
Yup, O know... but I'm looking for an api that only shows the link. Without the tittle and all the rest of the text
Ah.
@fresh cove @broken pecan @west night We are experiencing problems with our 3rd part applications handshakes. There was a patch introduced yesterday, but it seems that it happened again today. I already notified devs about that.
Thanks
Yup, O know... but I'm looking for an api that only shows the link. Without the tittle and all the rest of the text.
@pure drift Any way to not have video info returned from thelatest videoendpoint?
@hardy walrus no
Figured as much since there was nothing in the docs.
@pliant flume You can't unfortunately.
Yeah, I see
I used a page that creates a link to ur last video always
is a quite slow redirect, but It works
and is automated, so... I keep with it
@fresh cove @broken pecan @west night fix has been applied. It should be way better now.
@viral patrol thank you very much! π
Hi, what do I should do to make a text pop out form the bottom of the overlay with a trigger, like a command or some kind?? Coud it be a text and an image? it is possible?
Hello good friends and mentors, I have an API call that currently shows the latest TIP activity (and it works great). If I wanted to amend this to just show all details for the LATEST activity that has happened, what should I change? https://api.streamelements.com/kappa/v2/activities/:channelId?limit=20&types=tip&mintip=1
how do I just put the name inside the gif?
@spice citrus go to Text Settings > Advanced > Margins ...
@spice citrus on the Animation Settings tab > Text appearance delay
@digital glacier You can add multiple types &types=cheer&types=follow&types=host and so on.
I'm trying to build a custom "channel funding goal" widget that adds my subs for the month and bits for the month. I am looking everywhere for a guide to figure out how to build a Twitch widget using Streamelements or anything else. Can someone point me in some direction? I'
I'm not worried about the graphical part yet.
The best point to start with Custom Widgets is to check this docs https://github.com/StreamElements/widgets/blob/master/CustomCode.md
And about hype goal, you may want to look at: https://github.com/StreamElements/widgets/tree/master/CumulativeGoal
Thanks!
Question why isn't this working to load my current cheers?
window.addEventListener('onWidgetLoad', function (obj) {
let data=obj["detail"]["session"]["data"];
bits=data["cheer-month"]["amount"];
});
I'm trying to just do something very basic so I can understand the functionality, but I'm not sure why it won't at least grab the total month cheers.
I think it should load that, but you also may want to initialize "bits"
To initialize bits all I need is "let bits;"
Also keep in mind that this data is aggregated from the moment you joined StreamElements
?
window.addEventListener('onWidgetLoad', function (obj) {
let data=obj["detail"]["session"]["data"];
let bits=data["cheer-month"]["amount"];
});
Ah. Let me try it. Thank you very much btw.
You can access your aggregates here:
It just says 0. I can't get it to pull up anything. They don't need a JSON field value because I don't need the user to do anything or do they?
I am getting the widget to show the value of bits (I think).
As for your purpose I would really suggest you CumulativeGoal widget from github and then adjust code to fit your needs.
Hi guys and girls. I was wondering if i would be able to edit the official "Contests" widget myself (similar to custom widgets via editor) instead of just fonts etc. or create my own widget? Since i don't really know where/how to start at all, should i better leave it alone? I do know some HTML/CSS/JS, but that whole API thing is new territory for me.
hey there, I applied for api usage around 2 months ago (while the form was still active) but I never got a response, any chance I can still get it reviewed?
@viral patrol ^^^^
Hello team,
Iβm struggling with an issue in the variations of Sub Alerts. Right now Iβm using fields to change the output, although the fields save exactly the same no matter the variation?
Like sub alert is {name} then gifted sub should be {sender} but it seems that when I try to save the variation it changes all of the variations.
Iβm using custom CSS btw
Is it possible to add a browser source as an overlay in a stream elements overlay? If so, how?
so If I was trying to get all the different activities, would this be the right api call? https://api.streamelements.com/kappa/v2/activities/${channel}?limit=20types=cheer&types=follow&types=host&types=raid&types=resub&types=sub&types=tip
To piggyback on SunsetsBrew's question (he and I are working together on something), we were able to pull multiple types but the min only seems to work for tips
@digital glacier https://api.streamelements.com/kappa/v2/activities/:channelId?limit=1008&types=follow&types=subscriber&types=tip&types=cheer&types=host&types=raid&types=merch&types=redemption&types=purchase&minsub=2&mintip=30&mincheer=6&minhost=6
@naive forum You can check <iframe src="url"></iframe> but I am not sure if it will fork properly
Hey I want to make a picture spin and move around the screen do you know how I can do that ?
@surreal gale There is no spinning, but I think this could be added as CSS animation: https://discordapp.com/channels/141203863863558144/457957557470887947/680028043699290122
that would do ! Thx
Iβm not sure where to ask this at but my question is: is there any plans to add trovo alerts and capabilities here for streamelements
is there a way to have the alertbox always showing a background image unless an alert happens?
or is the alertbox only shown when an alert happens
Hey all, trying to learn how to make a glitch animation in StreamElements for a custom alert. I've been looking elsewhere but I think I've messed up somewhere. Any help would be greatly appreciated!
HTML: <div class="text-container"> <div class="image-container"> <video class="video" autoplay src="https://cdn.streamelements.com/uploads/e74991d7-dc21-40a1-a47a-aac5f4edf758.webm" type="video/webm"> </div> <div> <div class="awsome-text-container"> <span class="username" id="username-container"></span> </div> <p> {{message}} </p> </div> </div>
CSS: ```.video {
position: relative;
}
@font-face {
font-family: Hauser;
src: url(\fonts\Hauser.otf);
font-weight: normal;
}
.username {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
text-shadow: 0px 0px 25px black;
font-family: Hauser;
font-style: italic;
}
.username::before, .username::after {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
font-family: Hauser;
font-style: italic;
}
.username::before {
left: 3px;
text-shadow: -2px 0 red;
animation-name: glitch-animation-1;
animation-duration: 2s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: reverse-alternate;
}
.username::after {
left: -3px;
text-shadow: -2px 0 blue;
animation-name: glitch-animation-2;
animation-duration: 2s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: reverse-alternate;
}
/*
@keyframes glitch-animation-1 {
$steps: 20
@for $i from 0 through $steps
#{percentage($i*(1/$steps))}
clip: rect(random(150)+px, 350px, random(150)+px, 30px)
}
@keyframes glitch-animation-2 {
$steps: 20
@for $i from 0 through $steps
#{percentage($i*(1/$steps))}
clip: rect(random(150)+px, 350px, random(150)+px, 30px)
}
*/```
So I am trying to setup stream elements credit roll for OBS...I have it saved the way I want it however all it's showing is the main title and subtitle; its not showing followers, hosts, etc...I have everything checked so it should all be showing up. Am I doing something wrong or is this feature broken?>
Is there a variable or api for doing !time in am,pm 12 hr time instead of 24hr time?
The time for (this person) in Sydney Australia is Sunday 13th of September at 3:12pm
Like that.
@tepid hull variable ${customapi.https://decapi.me/misc/time?timezone=Australia/Sydney&format=h:i%20A} ... other time zones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
@torn gulch thanks. so how would i actually type it the way i said?
@tepid hull message: The time in Sydney Australia is ${customapi.https://decapi.me/misc/time?timezone=Australia/Sydney&format=l%20jS%20\o\f%20F%20\a\t%20h:ia}
@tepid hull change the end h:ia -> g:ia
sweet thanks for the help π
@red viper You can put a static image/video behind alertbox spot.
@strange spruce I see that you are trying to use SCSS. Please compile it to raw CSS.
@viral patrol sorry, how does one do that?
Iβm a noob at this stuff, my b
@viral patrol I have tried that, although the static image shows while the alert is going off. Idk if that makes sense
I've uploaded a file, as .png, how can I refer to it in my code? Is there a thing such as {{uploadeImage1}}?
Better yet, is there no way to force streamelements to look up a local directory since it's a widget?
@pulsar willow If you want to refer files in your custom code you an use FIELDS to create templating variable definition and then access it via it's name like {{someImage}} where someImage is field name and that templating variable will be populated to asset URL. More details https://github.com/StreamElements/widgets/blob/master/CustomCode.md#json
@strange spruce I think your code was hosted on jsfiddle, there you can click gear icon on CSS and select "display compiled CSS"
@red viper Huh. I may misread that. In that case it is possible, but it would require coding knowledge to make that image disappear when alert is played.
@viral patrol Thanks.
Thanks @viral patrol I have some coding knowledge, Iβm just wondering if the alert box always shows or only when an event occurs. Maybe I could add to the icon JS when an alert happens, change the opacity for the alert length.
Alertbox is played only on event and then it disappears
There are two ways I could think of:
- alertbox with green background over image, so when alert appears, background image is covered with green colour which you can remove via chroma key removing in OBS
- custom widget that listens to alerts and then hides on new alerts
Is there any way of limiting how far the text can go left (so it doesnt go over the logo)
You can set margins of text, so it will be limited to selected area
Oh, where?
In text settings, where you set font size/family and so on
Margins are in "advanced" tab of that
Thank you! @viral patrol
is there a way to fix watchtime from the moment i started actually watching the channel or at least from the moment i started following?
only just got streamelements in the channel not long ago so its not working right
Only when loyalty was enabled will it track it afterwards. Nothing before.
rip
Hello dearest Streamelements Team,
I am a mod on quiet a few Twitch channels and I always try to improove the commands and support them in the best way I can.
Now I've got a problem: 2 Streamers asked me to do a syncdrop command where they only type sth. like !sync in chat and a 5 second countdown in chat appeares like:
Press Battle in 5 seconds...
4...
3...
2...
1...
GO!!
I've seen this in the chat in SwedishLadyC's stream so I know it is quiet possible. Unfortunately she couldn't help me there bc an other person helps her with the commands...
I already searched the great Internets for help and also contacted your helpdesk on the browser site but they refered to this discord.
I would be really greatful if you guys can help me out there
Regards
German
Hi! Do you have coding knowledge? If so, you can use jebaited.net proxy service to send messages from custom widget to your chat
not yet ^^
Hi! Do you have coding knowledge? If so, you can use jebaited.net proxy service to send messages from custom widget to your chat
@viral patrol One last quick question what coding lenguage does this website use? (just so I know the variables I have to use)
It is javascript
thanks a lot man π
Let me rethink this
fieldData.token = "thisIsATokenFromJebaitedNet";
const sayMessage = (message) => {
message = encodeURIComponent(message);
return new Promise(resolve => {
fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
const countDown = () => {
setTimeout(() => {
sayMessage("Press battle in 5 seconds...");
}, 1000)
setTimeout(() => {
sayMessage("4");
}, 2000)
setTimeout(() => {
sayMessage("3");
}, 3000)
setTimeout(() => {
sayMessage("2");
}, 4000)
setTimeout(() => {
sayMessage("1");
}, 5000)
setTimeout(() => {
sayMessage("GO!");
}, 6000)
}
window.addEventListener('onEventReceived', function (obj) {
if (obj.detail.listener !== "message") return;
let data = obj.detail.event.data;
if (data.text === "!countdown" && data.nick == userOptions.channelName){
countDown();
}
});
Something like that
when I use {tip-latest.amount} it gives me the value as "5" what should I use for it to give me the value as "R $ 5.00"?
I was wondering if there was a way to do custom alerts on Streamelements. I'm building a Wordpress Woocommere store, and would love to do alerts for Twitch when someone buys something.
Could anyone in here consider making a widget for a slider? Just text, background and size/speed customisation should do it. The current static text with scroll effect is buggy and does not loop well
Looking at https://github.com/StreamElements/widgets/blob/master/CustomCode.md and the onSessionData event. Is there any way to trigger that with test events? Or will it only respond to real live subs/cheers etc?
@novel pond AFAIR test alerts update session data for single overlay editor instance, so when you emulate an alert and then reload widget it should have some fake data there.
But I am not 100% certain
What lx says is correct
Is it possible to access things like total sub number inside onEventReceived? As far as I've seen it's only inside onWidgetLoad and onSessionUpdate
Thanks for that that @viral patrol and @elder dragon
Yeah you cant get that on event received
But onSessionUpdate is fired on most events except messages and buttons
I think
That's what I thought but when it just ran, it never updated π€
maybe there is just a flaw in my onSessionUpdate even though it's identical to onWidgetLoad
and likewise, is there a way to get a hold of fieldData inside onSessionUpdate?
You can cast fieldData to global variable so you can access it within onSessionUpdate too
And about accessing label data - check "Ultimate text widget" on #widget-share
Thanks for the heads up on the text widget
Figured the global var bit out, thanks π
Hello, I am working on a shared widget "Video on command by Benno" and it looks like the script is parsing data for subs to be recognized in the userstate, but it was never implemented in the next part (where you can select from the drop down menu), I tried just adding another userState.sub to the ==vip section but it doesnt seem to be working, is there a quick fix for this someone could help me with? ``` //Preparing userState object containing all user flags
let userState = {
'mod': parseInt(data.tags.mod),
'sub': parseInt(data.tags.subscriber),
'vip': (data.tags.badges.indexOf("vip") !== -1),
'broadcaster': (user === userOptions['channelName'])
};
if (!allowed) return;
if ((userState.mod && userOptions['managePermissions'] === 'mods') || ((userState.vip || userState.mod) && (userOptions['managePermissions'] == 'vips')) || userState.broadcaster || (userOptions['otherUsers'].indexOf(user) !== -1)) {
let video = $("#video");
let source = $("#source");
allowed = false;
video[0].pause();```
You can implement checkPrivileges from https://github.com/StreamElements/widgets/tree/master/WheelOfFortune
hmm it looks like that is using the same way that the script is getting info already, so wouldn't || ((userState.vip || userState.mod || **userState.sub**) && (userOptions['managePermissions'] == 'vips') work if I wanted to include subs in the 'vip' permission
Yes. Wheel of fortune uses updated version of the script we did with Benno
but it is easier to play with "which user should be able to execute command"
because of if/else statements being split to separate lines
ah ok, I will see if I can stumble through implementing that instead of the older one,
I tried just adding the userState.sub section and it did not work
Hmmm. Strange. It should work then from what I remember this code
this is what I added to try and test, I made sure I have the vip field selected when testing. I can get vids to trigger from the broadcaster, mods, and VIPs, but not subs. ``` //Preparing userState object containing all user flags
let userState = {
'mod': parseInt(data.tags.mod),
'sub': parseInt(data.tags.subscriber),
'vip': (data.tags.badges.indexOf("vip") !== -1),
'broadcaster': (user === userOptions['channelName'])
};
if (!allowed) return;
if ((userState.mod && userOptions['managePermissions'] === 'mods') || ((userState.vip || userState.mod || userState.sub) && (userOptions['managePermissions'] == 'vips')) || userState.broadcaster || (userOptions['otherUsers'].indexOf(user) !== -1)) {
let video = $("#video");
let source = $("#source");
allowed = false;
video[0].pause();```
Seems like it doesn't detect subs. Let me check something
'sub': parseInt(data.tags.subscriber) || data.tags.badges.indexOf("founder")!==-1,
a ha!
the account I am using is a founder account
bada boom! @viral patrol π π₯³
OK. So now I can go to sleep. Everything is working for everybody :-).
I am happy I stayed bit late today, so you can go forward with your project.
Also - if you are self-confident enough with your stuff - I invite you to our code gurus community!
haha oh no, I am a learner, I am all copy/paste right now
It's really cool! We get a free hoodie ;)
But you know what part you should copy paste. Check my initial widgets on #widget-share
There were copy of GPL stuff from github with some listeners I created for SE.
And boom. Whole widget-share started like that.
touche.
We got amazing people like Coocla above π
π You're making me blush
Hey peeps, is there a way to have a dynamic roll command? i.e. !roll # and that # gets put into the random function? Tried with a response of ${sender} rolls a ${random.1-${1}}! but didn't seem to work.
I'll just do it via custom script
I was wondering if there was a way to do custom alerts on Streamelements. I'm building a Wordpress Woocommere store, and would love to do alerts for Twitch when someone buys something.
@wild nymph
Hi, is there a way of getting the SE chat bot in Twitch to spam a message multiple times with 1 command? (Not a Timer) π€
Hey! Can anyone help with css/js
idk if this will make sense because Iβm kind of lost myself, but Iβm having trouble finding a way to trigger an animation for an event list in css/ js , im want different animations for the different month subs, 1,2,3,6,9,12. Iβve already added a listener for bits, donations, and follows, but the only field I see for subscribers is βsubscriber-latestβ Iβm trying to have different variations of subscriber months for the reaction animation but thereβs only 1, i canβt figure how to put it for specific months
@wild nymph Check widget share channel for charity widgets. With coding knowledge you can alter that to fit your needs.
@silk pebble Only via custom widget that uses MITM external service (like jebaited.net) - example: https://discordapp.com/channels/141203863863558144/259680142459142144/755008810828955719
@snow olive You can use event.amount to add different styling for row like <div class="sub-${event.amount}">
Im sure this has been covered before, but I was looking for a way to add a command that would pull data from say steam? So if I had a command called !DBD for example, they could type that in the chat and it would pull say the play time from the steam API and present it in an output
I am trying to get the Credit Roll widget to work correctly in OBS Studio. I have added it as a browser source and it scrolls only with the title and subtitle. It does not display followers, hosts, etc. There is no widget select option in my version of OBS. Can someone point me in the right direction?
I'm live streaming work on open source. I'd like to have some gamification. For example, closing of issues in a Github repository would trigger a pretty animated message on the stream that says "issue #412 closed; 10 open issues remaining" or something like that. Before I go diving into the API documentation β I thought I'd ask here β what's the easiest way to achieve this?
Hi, I'm looking for a bot or a plugin for OBS that acts as a listener & chatter from the broadcaster account to give auto vip to anyone that reddems a channelpoint reddem or give mod from a command only avalible for moderators
Is there any "easy" way to make itΒΏ
!elo
@weak sentinel Widget selection is in "layers" tab in left panel. Once you click it, you should have "Settings" tab below. Also when you see just title and subtitle the most likely reason is that you have "shutdown source when not visible" not ticked in browser source settings in obs
As this widget displays just events from session, check if in "Session data" here https://streamelements.com/dashboard/session you have number above 0 for your event types
@earnest karma You can create JS listener to track your github events. And fire alert when there was a new one.
@pliant flume You can try https://overlays.thefyrewire.com/widgets/triggerfyre/ for that
Yup, o see... But actually I want a way to control remotly the broadcaster account by chat commands to give VIP and MOD's roles
I am currently using a JWT token from my client for local testing. But for production this seems insecure since it is a non expiring, full access token. From the docs I see that there is a oAuth endpoint available, but where can I register my app to get the clientID, clientSecret?
@high quartz oAuth applications are closed atm.
Ah alright, Thanks for the reply. But I guess in the future that would be the approach? Do you guys have a schedule on oAuth?
The process is being reworked. Beyond that no clue as that's outside of my paygrade access.
Im sure this has been covered before, but I was looking for a way to add a command that would pull data from say steam? So if I had a command called !DBD for example, they could type that in the chat and it would pull say the play time from the steam API and present it in an output
@simple cove Not sure if this went unnoticed and fyrewire did help me once before, but I can not seem to tag him?
@mild cipher β€΄οΈ 
@mild cipher
https://discordapp.com/channels/141203863863558144/564823275364941830/756069632015859753
https://discordapp.com/channels/141203863863558144/199460642975907840/756071724465782865
I'm sorry, if you know anything about this one, I'd appreciate a response.
Thank you for your help.
Hi, is there API for pushing song request into queue?
@simple cove You'll want $(customapi.https://decapi.me/steam/hours/STEAM_0:0:237242754/381210) as a command response
@sour tulip replied to you in the other discord, should be resolved now 
@mild cipher Thank you. I will test now
Hi everyone
I'm trying to create a custom widget and i would like it onWidgetLoad it find the last event (be that last follower, latest sub, whatever). i know i can get it to access specific ones with follower-latest etc, but i want the super last one. how do i get that?
thank you
@viral patrol Thanks for the Trivia Game! Any idea why ZnakeTTV did not win this round? He was the first one with the correct answer
I also recognized that after you give to many wrong answers (like spaming all possible answers), you are somehow excluded from the game completely?
I think I found the issue there. Preparing a fix
Nice!!
Fix is ready. You were right - game was like "Wrong answer and you are out for future questions". This issue has been fixed.
If you want to update your code instead of reconfiguring widget. Add:
contestants = {};
Here (Line #136):
Thx! I'll do that!
OMW!
@timber lark it is fixed now. Also I fixed a possible issue with messages that contain "/" character
New JS for you: https://pastebin.com/wnRRMYJV
thx!
Thank you for telling me about those problems.
nice widget :) lx
some kind of cooldown would be nice for the "everyone can start questions"-mode. so everyone can do it when they want but not spam it for example.
Also could i suggest two modes? not sure if "easily" possible, when i got time could try to do that myself
- "audience joker" - like in "who will be a millionaire" everyone can vote. and depending on the chat vote they all win or all lose.
- "everyone can answer" - everyone can answer the question and everyone with the correct answer gets points
hi. where can i find documentation on widgets javascript api?
There's one hosted on github => channel topic
Twitch channel points can be listened to when redemption contains user message
In addition, is there a way to make custom commands in an advanced way, as using webhooks or something similar?
Yes. You can call external calls for services that accept GET method and reply with plaintext.
how can i config that?
You need server side script that will reply to your request.
assume user1 cheers 100 bits. then he cheers another 100. is there a way to have the alert say user1 - 200 instead of 100?
also, assume user 1 cheers 100 bits, then user2 cheers 101, then user1 cheers another 101. is there a way for the alert to say user 1 - 201?
assuming they are not the top bits
@charred vortex unfortunately it is not possible to display alltime tips/cheers amount within alertbox. It is possible in aggregates (like top cheer/tip labels, top list)
how about if its not alltime? is there a way to get it from the session?
You could create a widget that stores this data and acts as alertbox, but you will need to write that from scratch
so it would have to keep track of every event of the session, then check the array for similar events 
speaking of events, I'm trying to create a custom widget and i would like it onWidgetLoad it find the last event (be that last follower, latest sub, whatever). i know i can get it to access specific ones with follower-latest etc, but i want the super last one. how do i get that?
i dont know how to save the last event from eventReceived and then get it back next time onWidgetLoad
@charred vortex you cannot forward from onEventReceived to onWidgetLoad as onWidgetLoad is triggered only once - on session load. You can do it the other way around, by storing value in global variable (like you should store fieldData or channel data, which is emitted only once)
You need server side script that will reply to your request.
@viral patrol I was asking if from streamelements you could configure a command for having calles a webhook on my own
SE bot can send calls to your webhook. SE from the other side doesn't have public webhooks.
it might not be the best way to do it, but what im doing right now is im using the data from onEventReceived, putting that in an [] and using a while loop with a switch that has different cases for each type of event (follower, sub etc)
theoretically it then puts it in a global variable but i dont know how to call it at the onWidgetLoad, but i dont know how to define the global variable so that its not overwritten on load
i just want to keep the last event for the next time the widget is loaded
SE bot can send calls to your webhook. SE from the other side doesn't have public webhooks.
@viral patrol and then... how can i configure that call?
Like ${customapi https://your.webhook.url/?user=${user}}
mmm
@charred vortex All global variables are removed on widget load as script is reinitialized.
(Keeping track of 2 conversations got me)
oh great, i didnt see it on variables... really i didnt expect it that easy!
so there is no way to take an event from onEventReceived and store it for next time the widget loads. is there a way to call it like follower-latest but like whatever that last event was
You can use SE_API.store() method
so onEventReceived * do whatever * and then store the last event using that
let me check that and i'll be back. thanks lx 
And onWidgetLoad get that stored object
yup
@viral patrol im back π
i havent figure out how to do it yet. even trying to set the value gives me an error. i just copied the line from the github and put it inside the onWidgetLoad to check if its working SE_API.store.set('keyName', obj);
when i try to .get the value it gives me a 404, obviously, since there is nothing there
You cannot save whole event, but you can store data.detail
so it should be SE_API.store.set('keyName', data["follower-latest"]["name"]); for example?
Wait. Why do you want to store that value as you have it in session data on widget load?
I thought you wanted to store something else
i want to save the last event and use it the next time the widget loads.
what i mean is, from the time the stream starts until it ends there are going to be a number of different events. i want to save the last one and use that the next time the stream starts. i cant know if it was a follower, a sub, cheer or tip so i need to store that somehow and then get it back
You can check obj.detail.recents then. It has 100 recent activitie, just sort them by date (to be sure) and pick latest one
Just like you have custom eventlist widget and limit displayed events to 1
i will try it out. thanks again!
I did it!
thanks @viral patrol
Do y'all happen to have a list of html span references for things like [sender]?
For example, [name] is <span id ="username-container"></span> but not all of the variables are intuitive
@sick bluff Contents of <span id ="username-container"></span> is done by JS, where you can see {name} as templating variable
Yes, but I'm not looking to change the contents, just to get the variable itself
ah well, JS it is i suppose. Blech.
So username is {name}, rest of variabling templates can be found here: https://github.com/StreamElements/widgets/blob/master/CustomCode.md#alert-widget
You can create a <div class="yourClassName">{name}</div> and it will be filled with username
ah, ty
LMAO I could have just used {{sender}}! Oh goodness, I did a dumb
Looks pretty quiet in here but I have a somewhat urgent last-minute question. I have zero experience and I'm trying to repurpose the wonderful "Level Up Goal" widget to include everything, not just tips. I've been picking apart and repurposing other widgets to get it right but subscriptions are troubling me. Trying to get them to add their actual value i.e. $5 for a single tier 1 sub works fine. But gifting a tier 1 sub does so at double the value, and emulating a single gifted sub seems to return NaN on the bar. I am so lost if anyone has any resources π EDIT: For clarity. EDIT 2: It appears my doubling value was a clerical error on my part, not sure how but it appears fixed. The "Gift" emulate button still seems to be broken, however.
Hello, I have a question regarding chat commands...
I've noticed you cannot input your own custom variables to custom commands. I'm looking at adding a prediction system implemented into my streams where viewers can type in the chat for example: !predict {number input from chat} and have the command say "{user} made a prediction of {number}".
Could this be a possible variable command that could be implemented into for the future?
Thanks.
@lusty star gift events have gifted as amount unless it is an initial community gift, which has exact amount of given subs
@pulsar willow ${user} made a prediction of ${1:} but it doesn't check if user entered a number
@viral patrol That's it!! Thank you!!!
@viral patrol Excuse my ineptitude, does that mean that it's impossible to tell if someone gifts a multi-month to a specific person. Say like, 6 months of tier 1 sub? I can do it manually if need be. Thank you so much for your help!
Well, I've just learned that the emulated alert button doesn't cover a bunch of stuff and so it's definitively broken my widget an hour before going live. Someone hold me π
Hello Guys, are there any future plans for the widget editor's api to provide the profile photo and latest game from a the user who send
a message for example?
Hi, anyone know of a way to make a command that costs a variable amount of points, or maybe a way of having a custom command that just gives their points to StreamElements?
@silk pebble This could be helpful for you: https://streamelements.helprace.com/i519-provide-an-addpoints-variable#comment-59866 (there is also GET parameter described few comments below)
@viral patrol oooh, at 1st glance this looks cool. i have 2 quick questions before looking into it too much. 1. Am i able, as a mod, to set up tokens, or i would need to walkthrough the streamer to have them generate a token? 2. a minor thing, but can the response output be ${pointsname} and not points?
Unfortunately it cannot reply with ${pointsname} But you can do ${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount} ${pointsname}
As you can see ?format=amount replies with just points amount
And creating tokens as a mod - it is not possible unfortunately. Only a streamer can login into jebaited
@viral patrol ah ok, great. so if i can convince them to login to jebaited and get a token, once i have that token they wouldnt need to be involved further, right? π€
That is correct
@viral patrol Where can I go to read more about the syntax of those links, such as using the transferPoints tokens? I dont want to keep bothering u with questions. π€
When you click on scope name you will see syntax
@viral patrol ooh ok. what is targetChannelToken though? is this not for transferring points from 1 user to another? π€
it is from transferring points from 1 channel to another
For transfer between users you can use default command
@viral patrol hmmm yeh ok. i thought if it was from 1 user to another i could have it send points via ${1} from the user of the command to StreamElements, sort of creating a customized !give command. oh well
You can also use those endpoints from custom widget too (not just bot command). Like bank heist game.
@viral patrol so my main goal was to try and let a user type something like !bet 100 which would take 100 points from them and store that bet in a urlfetch, and i would then use a separate command to do stuff with their bet.
So I would really go with custom widget to handle all of it
@viral patrol hmm ok. im not that advanced with programming yet. maybe i can teach myself how to do it shrug
Iβm working on custom alerts in Stream Elements using css coding. Is there anyway way that I can make text that goes past a certain length become a smaller font size?
E.g over 15 characters goes to 40px instead of 60px. Or is there something else other than px that would work for this in Stream Elements. It has to work in stream elements thank you.
@leaden solstice With custom code I recommend you fitty.js library that adjust font size to fit container. Example of usage: https://github.com/StreamElements/widgets/tree/master/AlertboxTextFit
Hey there, I have some problems with my custom widgets.
- I have a customized credit roll widget. Once started it rolls the text. But if I switch the szene and wanna go back and see the whole text roll again, it only continues since the last opening. How can i reset it with scene switchting via OBS? The only way I found is too clear the browser cache manually in OBS.
- I have an alert box widget an additional customized widget for subgift alerts on the same overlay. In my tests in SE the customized widget does, what I want. But on my Twitch stream via OBS it didn't, it only shows the alert box events. I don't know, what to do or how to debug this :(
Thanks for helping me!
@graceful stirrup
- Check "shutdown source when not visible" checkbox in Browser Source settings
- you can use
console.debug()and change console settings to verbose mode
@viral patrol Thanks.
- Tryd the first tip, but it don't work.
- My problem is, that the widget works with the emulate function in the overlay editor, but if anyone gifts really on stream, it doesn't. So if I want to debug it with this way, users have to gift...
@graceful stirrup if you are about direct gifts, you can replay them from activity feed
@viral patrol Okay, I found the problem for my second issue. There are differences between the emulate API responses and the real API responses...
And first issue - if shutdown source when not visible doesn't work (it should regather data and restart widget) maybe your OBS cache is somehow scuffed
Clear this directory when obs is off %AppData%\obs-studio\plugin_config\obs-browser\Cache
Hey all
Trying to make before and after duplicates in CSS, but i can't refer to the content of the actual username class correctly in my sub alert
Here is the CSS part im concerned about```.username {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
text-shadow: 0px 0px 25px black;
font-family: Hauser;
font-style: italic;
animation: fadeIn ease 8s;
}
.username::before,.username::after{
content: attr(id);
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
}
the ID part just refers to a string literal called "username-container"
how else do I call the username?
i need help with unlinking youtube and linking twitch
@lusty harbor Please ask your question in one helpdesk channel only. A support volunteer or StreamElements staff member will assist you as soon as they are available. Asking in multiple places will only result in confusion, not faster answers. Thank you for your patience.
Trying to fetch the list of "watch time" as per the documentation but keep getting this response: { _total: 0, users: [] } β Any ideas? Using JWT + axios on NodeJS
Ugh. Figured it out. In case it helps anyone, the channel parameter has to be the ID and not the name of the channel.
How would I go about grabbing and storing data on every emote used in a chat? Would I need to create a bot for this that would monitor the chat?
Is there a widget that will allow me to create an alert that is more than 60 seconds long?
@earnest karma You can create JS listener to track your github events. And fire alert when there was a new one.
@viral patrol sounds great. This JS listener β in what runtime is it running? I'm missing the implied context.
@viral patrol I canβt seem to get it working
@frank lake Hi. Emotes are grabbed in chat by our bot and you can find them on your chat stats page. If you want to do something else, you can use emotes only chat from #widget-share account π
@earnest karma Custom widget is CEF running iframe, so whatever works in your browser should work in custom widget too
@thorny rover You can create something like that in custom widget (write alertbox from scratch), but this will require you to write own queue system as AFAIK default one cannot be on hold for more than 60 seconds.
@elfin arch Any chance, that we can get additional sources for your image reveal game? I found one pokemon game and one pokemon+other characters game. One without pokemon would be nice π
It's ok to do ajax call in the overlayer editor?
Hey, i am wondering how i would go about getting follow and donation events through nodeJS, i have looked at the examples and they dont seem to help much
@leaden bay It is absolutely OK to use XHR calls in custom widets
@unkempt sleet examples in github hosted docs are for overlay custom widgets that are using internal events that cannot be listened externally. You can use websockets to listen to events from your local nodejs, but you will receive raw events only (and no chat events, you need to listen via other tools like tmi)
so the raw events include donations and follows?
Tips are for sure. I am pretty confident Twitch events are forwarded too.
oh so anything that streamelements outputs via websockets will come through?
would you happen to know a good npm for websockets? ive been trying a few but i dont know what arguments i need to connect and authenticate
@unkempt sleet socket.io
And example usage can be found here: https://discordapp.com/channels/141203863863558144/259680142459142144/619851854439776266
thats browser socket io, it doesnt work the same in nodeJS
actually sorry maybe it does
I do know that this is browser socketio, but it will work in node as well
You just need to declare io as requirement of socketio library
ahhh i think i found how to make it work
"const io = require('socket.io-client');" is needed, not just "const io = require('socket.io');"
thank you for your help
oh, it seems to have authenticated no problem, but im not getting any logs out when chat message or follow
Chat message won't emit an event, you need external library for that. But follow should be emitted and caught by socket.on('event', (data) => {
oh my bad, my terminal seems to be bugging, it worked! thank you so much!
You can listen to chat messages via https://www.npmjs.com/package/tmi.js/v/1.5.0
thats ok im using TMI for that, i thought it might be included, follow seemed to work, thanks anyway
You're welcome. Glad I could help.
oh, i was wondering something, is it possible for a bot with mod permissions to accept redeems in the queue? i am not sure how to word these things to find it in the api
unless there is nothing
Are you referring stream store, twitch points or queue system for viewers to play a game with streamer?
lx, sorry, i should have been clear! i meant channel points, the twitch points
i am receiving the redemptions via pubsub and wanted my bot to process certain ones
Unfortunately bot cannot process them, you can use custom widget for it, but by default we receive only events with user text provided
oh, okay, thank you, lx!
if i wanted my uptime output into a google sheet, where would i put the variable in this code?
function doGet(request) {
var ts = (request.parameter.ts || "").trim();
if (ts == '') {
return ContentService.createTextOutput('you need to give me something to do!');
}
SpreadsheetApp.getActiveSheet().appendRow([ts]);
return ContentService.createTextOutput('highlight saved at ');
}
i would guess i'd add it to function right?
or would it be in "SpreadsheetApp.getActiveSheet().appendRow([ts]);"
Is there a way for me to send the shoutout command through the sendmsg api for my channel? For example:
so it comes through okay, however, the command is not actually executed.
hmmm ok...
is there an end-point for me to get the user's Last Game Played?
I had been looking through the Kappa API Doc and didn't see one jump out at me.
ohhh DUH... oof... was looking through SE api... not twitch... sorry about that. Thanks π
Is there anyway that the shout-out command can be modified to shop an image on stream? So example it calls an alert which I can customise to fit with my brand?
Iβm not talking about the widgets though as I find these a little restrict with no experience
@timber lark I don't plan on adding anymore to it. But if you want you can use the database and image files from the github as a template if you like to make yourself a custom image list. Best images are 800x800 square (the game will stretch them to that size). I can help with the db file if you have a folder of images with the answer as the filename
Hello! I wanted to know if there is anyway to disable a specific streamelements chat response. Currently I have sfx set up so that when someone types w command like !oops a sound plays. However every time some one uses the command the chat bot responds with βuser successfully redeemed oops for 0 pointsβ. Iβd like to disable that specific response if possible
Unfortunately not.
Thank you for your response @hardy walrus Is there another way to utilize sound effect commands without using the store?
Not from what I can think of
Ok thank you!
i noticed that date field for custom widget always get parsed to full date, if i need only yyyy-mm-dd, what should i do?
"type": "date",
"label": "Since",
"value": "2020-01-01"
},``` current code
hi
Hey! Any way for the amount of months you've been subbed to show with the alert text?
Hi, is anyone here using the kappa v2 apis? I didnt find on the documentation how to get the client_id
What you need do? π
Im trying to get the list name of everyone who entered in a giveaway
on the website ui, it just show the last 100 users
so, do you know how to get the client_id ?
is that client_id the same one on twitch dev website?
https://docs.streamelements.com/reference/single-giveaway#giveawaysjoinedbychannelandgiveawayidget
Looks like JWT token is enough
firstly I'm trying to reach this [get] website -> https://api.streamelements.com/kappa/v2/giveaways/channel/history
maybe @viral patrol know more π
the link you sent me is requiring 2 parameters, -> channel_id and the jwt token
so I stil need that channel_id
yes
its your streamelements account id
you can found it in settings
or give me your username on twitch
my username is japapito
JAPAPITO's StreamElements account ID >>> 5bd68784d4c015e7d0e41a30
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.
i already tried that accountId it is still not working
the JWT bearer token is that long one right?
no, i dont need it
however it still doesnt work
Im trying to use the postman to simulate the requests
what tool you using for it?
Postman
yes
and know I want to know why the api https://api.streamelements.com/kappa/v2/giveaways/5bd68784d4c015e7d0e41a30/history is not working
one sec
I assume as you can get my accountID you can also take my JWT Token right? so could you try to run that api using my JWT token to check if it is my request problem?
a print screen of my request ->
can i know giveaway ID?
yeh
Im not sure if that id is the correct -> 5f6a13762cd4dfbf8c5ce27f
it should return 0 right?
as there are no users there
do you have any oldest ?
No
If you want we can try the another api, that just return the list of giveaways I created
but none of them are working
they are returning -> Error: getaddrinfo ENOTFOUND devnull.streamelements.com
ok, if you trust me, DM me your jwt token
Hey guys, is there a way to get ALL the entries of a specific giveaway? I just go the last 100 entries using the kappa v3 api
They are paginated, you need to use ?offset=100 for next calls
Oh I see, so if I have 400 results, I will need to do offset=100, and then offset=200, and then offset=300, because the limit is 100?
That is correct
thanks lx, thats solve my problem
lx, is that correct?
even inserting the parameters, it is not relflecting the api response:
the limit offset and limit is not considering the parameters
Hmmm. Seems like /entries endpoint doesn't accept neither limit nor offset
Reporting that forward
ok, I will create a bug ticket for that. If that fixes, I will be able to finish my bot
thanks lx
ticket created -> https://support.streamelements.com/hc/en-us/requests/85375
Hi guys! Hoping someone can help me out here. In a Twitch channel, we have a !quote command with multiple entries. Such as !quote 10 would output some random reply that we have set as a command. I am successfully pulling the command list via a GET request with https://api.streamelements.com/kappa/v2/bot/commands/channel/default - this shows me I do indeed have the quote command. But is it possible to return the responses themselves?
Couldn't find anything in the API docs on the responses of the commands. If I run the request with https://api.streamelements.com/kappa/v2/bot/commands/channel/ I can see some commands such as "rules" with the correct output. But I can not see the output of quote for example
I have also tried pulling the actual quote command using https://api.streamelements.com/kappa/v2/bot/commands/channel/quote - when I request the default commands, the attribute shows me the quoteId is indeed "quote." But I receive
"{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}"
@rough edge There is no API nor frontend for quotes management.
Darn! Thanks for letting me know, I appreciate it. May have to just manually input what I'm wanting to do.
How many quotes do you have?
@rough edge Maybe this will help you instead of quotes? https://thefyrewire.com/docs/api/twitch/pastebin/#return-random-line-from-paste
@hardy walrus around 40. Basically I'm writing a Python bot for my Discord server. The initial check of the bot would've added the found quotes to my database which could then be automatically added as commands to my server.
I will check that out @viral patrol, thank you! I'll try to think of some alternative solution here.
@hardy walrus is there a way how i can add time and temperature to the overlay? and if yes does it need serverpower?
@tiny tusk for time you can check #widget-share - there's a widget for clock. For weather, you may want to google for "weather widgets", those are made for websites, but they should work in SE as well.
thank you!
@viral patrol the text fitting issue doesnt work, I copied the code exacty from the git hub and now nothing works
The code from github is an example code with fitty.js usage. Of course you will need to adjust code to your needs.
i understand this and I changed what I need, however, it doesnt fit within the specifed area
You can check if the specified area is correct by setting border to the styling. Also check if word-wrap display are proper
Hey guys, i was wondering if there were any tip goal trackers where u could upload a gif or something that moves as u fill up the bar (for example goku doing a kamehameha where the distance of the kamehameha extends as the tips increase)
i looked in widget share and cant find anything
Hello, is there ani api link "easy" to use to get the current playlist of spotify ur listening to?? I mean, I want it to make a chat commands π
@pliant flume There is not as spotify isn't something we can do much with.
Partly as their ToS doesn't allow you to play music on stream.
I mean, there is an endpoint fro devs from spotify
But that requires more than a simple link to grab the information.
i was told to come over here for documentation for making custom css overlays in stream elements. i want to know what things i can use like {color} {image} or now what I'm stuck on is how to change the animation. is there a list of all the available stuff we can use when making custom overlays?
and now {image} suddenly stopped working?
Okay, I think I've figured out my event list... but could anyone please tell me how I see where all my images that are uploaded to stream elements are saved, in order to access the URL for my event list elements?
You can create image-input field in "FIELDS" tab, that will create templating variable with your image URL. You can use it directly in code. Check Overlay Editor docs in channel topic.
@uneven skiff Also for you, full list can be found in github hosted docs.
@viral patrol I'm not asking how to get the image into my code. If i upload an image to stream elements, so that it shows up as an option when I say "change image" for the standard templates. If I'm making something custom, how do i see a list of all the images I've uploaded to stream elements, and get the url for them, so that i can input them into the code? Such as to make a variable containing the url.
@chilly moth As I mentioned above - you need to create image-input field and refer to it in the code. You can check #widget-share channel for real life examples
It would help if i could do a search on the full documentation for the image-input you mentioned, but i cannot see a way to do this. I cannot find out where it is in the drop downs. My apologies, but I have complicating matters in my life right now that make things extra difficult, and I'm finding stream elements extremely difficult to work with, which is setting off my mental health. "It's here, go find it" doesn't help someone who knows next to nothing about coding when the location I'm feeling directed to doesn't have anything searchable that i can find. I do appreciate the help, please don't get me wrong. But I'm a touch unstable these days, and while I usually am good at figuring stuff out on my own, my brain isn't working as it usually does.
Is there anywhere I can get the documentation as one large text file so that it is searchable? Not so it's broken down into several pages and drop downs? To make it more accessible.
@chilly moth The channel's subject: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
Ok. Thank you. When i clicked the channel name at the top on my phone, all i saw was a link that took me to a page with drop downs. It wasn't fully searchable
Okay, that is either not what I'm looking for, or I can't see in that documentation how to view the image list. I suppose I'll just have to keep calling my background images from stream labs
There is information about image-input and calling a value either as templating variable like ({background}) or via onWidgetLoad fieldData.background
Like I said. I know next to nothing about coding. Someone else made my event list for me in the past. I've gotten it semi-working just by pulling the image files from stream labs, and messing around with the size numbers... so I might just stick with that
For example create a code that has FIELDS tab:
{
"image1":{
"type":"image-input",
"label":"Select Image"
}
}
and HTML:
<img src="{image1}">
how does that know which image I want?
You will see image selector in fields
I'm possibly just too out of it to see it. I try typing that all in and don't see anything like an image list π€·ββοΈ I'll just keep working the way I have, using the URL from the upload to stream labs
Hello all, Im an Hybrid on IT and im looking for resources to start creating my first steamelements widget.
I'm looking for info like, witch IDE is the best to dev a widget, how can I test the widget, questions like that
@pulsar willow The best IDE for you would be the one that allows you to play with HTML/JS/CSS files. You can test your widgets in overlay editor, or there's a testing (bit outdated, but working) environment: https://discordapp.com/channels/141203863863558144/259680142459142144/633144423055622165
The best way to start is to get a widget from SE github or #widget-share channel and play with it to get comfortable with SE environment
thanks a lot! ima start reading β₯οΈ
Well.... hopefully stream labs doesn't cut off the access to the images, but I have success, just have to finish it for all the different event types, and maybe a few small tweaks
You can create fields like @chilly moth
{
"follower":{
"type":"image-input",
"label":"Follower Image"
},
"sub":{
"type":"image-input",
"label":"Sub Image"
},
"tip":{
"type":"image-input",
"label":"Tip Image"
}
}
and then instead of actual URL of your images use {follower},{sub} and so on
How does Stream elements know which image goes for the "tip" image?
You select that file then
That's where I'm confused
I don't know the URL. And everything I've tried from what you've shown, hasn't given me a list
I hardcode the background image into the CSS
Do you have anything in FIELDS?
Yes, all the default stuff for creating an event list
I'll have to post the code later
Would you mind if we jump for a screenshare session?
I don't have time right now. I spent all morning trying to figure out how to get my image URL.. I have to go to a dentist appointment now, then work
I'll post the code real quick if I have time after getting ready
Or right now.. because I'm OCD...
Sure. Please use jsfiddle for HTML/CSS/JS and pastebin for fields
So there's no huge spam on this channel
I can do screenshots if you want. I have no idea what those things are
Otherwise it'll be after work
You can dm me with it
because again, time constraints. I need to be out the door in half an hour and haven't even eaten yet
Can somebody maybe point me in the right direction to achieve something like this with the kappa api? I am trying to implement this widget with JS on my site. So far I gathered that Streamelements is collection the subscriber data "manually" since twitch does not provide this via their api..
Hey guys, is it possible to connect to a websocket for listening to events. For example i use Twitch PubSub API to do something in Java code when a channel reward is used, i want the same just for donations. Thanks for every answer.
@viral patrol Thank you i will check this out!
I'm trying to integrate an external donation service and would like it if it could trigger the animations that are already set up.
Is it posible? So far I have this, but it doesn't trigger the animation like an emulated tip does. Thx
socket.on('event', (eventData) => {
triggerDonation(eventData.message[0]);
});
const triggerDonation = (data) => {
const emulatedDonation = new CustomEvent("onEventReceived", {
detail: {
listener: "tip-latest",
event: {
event: {
type: "tip",
name: data.from,
message: data.message,
amount: data.amount,
currency: data.currency
}
}
}});
window.dispatchEvent(emulatedDonation);
}
I'm updating 10+ variations for an alert and I get this error
Any way to go around this
More info
removed bearer and url
Regarding the roulette widget, I need assistance with this part: Provide jebaited token (botMsg and addPoints) in middleware settings I have the token, noooooo idea where to put it.
I'm having trouble making adjustments to an existing widget that cycles between recent events. I can't figure out how to extend the time between cycles and also the words aren't going down far enough before they vanish. And I have no clue how to get a white box with round edges behind it...
I'm also a pleb when it comes to programming
@elder dragon the solution for this is to host some of the JS libraries externally.
@gray crow
@pastel saffron Which widget are you talking about, maybe tag widget author here, so the best person will be able to reply to you.
thats probably not gonna work since it's harris heller, but my friend and I figured out that the best thing is to use something else. But we don't know how to work with the stuff. Trying to get an image to bounce in and bounce out with the text for a recent event cycle
@pastel saffron You may want to take a look at: https://streamelements.com/dashboard/overlays/share/5f3d520a2a8883627bd6724f
This one uses the same engine as ultimate text widget from widget-share
Yeah I'll check it out
this looks infinitely easier to work with
uhhhh replacing the β¬ with $ for the text breaks the everything for some reason
and I'm not in the code
Sorry to ask again, but I can't figure out how to pull subscriber data from streamelements. Subscription duration to be specific. I would like to include the StreamElements Leaderboard on a website.
Wanted to update on my quote management API question - I decided the best course of action was to simply scrape the quotes manually and add them to my database. From here on I will just have a custom Twitch bot in the channel at all times running a listener for added quotes, which will then automatically update to the database as well.
@arctic saffron Please ask your question in one helpdesk channel only. A support volunteer or StreamElements staff member will assist you as soon as they are available. Asking in multiple places will only result in confusion, not faster answers. Thank you for your patience.
Hello! What "channel-id" is it that I need to send message?
https://docs.streamelements.com/reference/bot#botsaybychannelpost
I have tried my name "mrbetaskull" and "_id" from the channels reference as well as ProviderId
are your sending JWT token in the header or using an API token?
you won't be using your name as the Auth; but could use the JWT
I am using the JWT
window.botMessage =(message)=>{
let callback = $.ajax("https://api.streamelements.com/kappa/v2/bot/mrbetaskull/say", {
async: false,
cache: false,
dataType: 'json',
method: 'POST',
data: {
message: message
},
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${JWT}`
}
}).responseJSON;
console.log(callback);
}
What I'm running
The response I get
{"statusCode":400,"error":"Bad Request","message":"Bad Request"}
ya; not familiar with that code; but it would not be your name, it would be the ID
I tried _id and ProviderId, so I am asking What ID I need?
It just says "channel id"
try your SE ID
it's been a while; give me a min; i'll check
I am coding for someone else, so in the end I do not need my own channel id, but need to test all works first. I'll wait for your reply, please @ me
I tried to use your code and it seems like it doesn't send POST but GET request
It does when I look
@viral patrol Yes, it is the Channel ID I am trying to figure out -What- channel ID I need to use, have tried 5 different id's by now
When I look the documentation it just stated "channel id", but now what id or where I can find it, so I have met a wall I can't climb here
It is _id from channels/me endpoint
same error
Erm.. One more thing - where do you want to use it
As storing JWT in place that can be reached by somebody is dangerous
I is behind admin-login for the user I code for, the key is locally stored outside public scope
Its just, no matter what id I try, I just get bad request response
const JWT="asdasdsad";
const channelId="5aeacfc6b680301301dcb164"
fetch(`https://api.streamelements.com/kappa/v2/bot/5aeacfc6b680301301dcb164/say`, {
"headers": {
"authorization": `Bearer ${JWT}`,
"content-type": "application/json;charset=UTF-8",
"sec-fetch-site": "same-site"
},
"referrerPolicy": "strict-origin-when-cross-origin",
"body": JSON.stringify({"message":"test"}),
"method": "POST"
});
So I think that with jQuery it may work like:
method: 'POST',
data: JSON.stringify({message: message})
json.stringify made it all work
That is not easy to see by the documentation, but it works now!
This is jQuery fault
window.botMessage =(message)=>{
let callback = $.ajax("https://api.streamelements.com/kappa/v2/bot/58ceee8a19981e3fde2a5eb2/say", {
async: false,
cache: false,
dataType: 'json',
method: 'POST',
data: JSON.stringify({message:message}),
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${JWT}`
}
}).responseJSON;
console.log(callback);
}
How I ended up changing the one line, now it all works
I wonder why it doesn't parse data as object when you have dataType: 'json',
thank you for posting the final; working code π
I don't know, but glad it worked out, now I can soon deliver the code. Thanks for the help!
@willow plank You can also use safer way to send messages - using MITM proxy service like jebaited.net (there is an single scope privileged api token)
100% as mention before TWICE don't use your JWT!
const sayMessage = (message) => {
message = encodeURIComponent(message).replace("%2F","%2525");
return new Promise(resolve => {
if (fieldData.token.length !== 24) resolve(false);
fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
What would my client have to do to change what?
So basically your client would have to register on jebaited.net (it uses OAuth, so it is way safer than exposing JWT). And provide just the token generated there.
As for example - JWT leaks, people can interact with API. If token from jebaited leaks, it allows only to send messages via bot and nothing else.
so in case something goes bad, do they go back to jebaited and change oauth or?
And they can delete token on jebaited.net (as they can reset JWT on SE website). But until reset happens, leaked jebaited api token will produce way less damage
Could the same be used for fetching tips? I quickly logged in for testing but am unsure about the scopes:
@high quartz getActivities should allow to do that. With same syntax as there's on SE API
perfect! thank you. I only use the JWT from a node backend api. But still, I think this is the better approach
How secure are requests from a backend service in such a case? I am unfortunately no expert on the subject..
@high quartz ```js
let url = 'https://api.jebaited.net/getActivities/' + fieldData.token + '?grabAll=1';
url += &before=${Date.now()};
url += &after=${Date.now() - totalSeconds*1000};
if (fieldData.enablefollower) url += &types=follow;
if (fieldData.enablesubscriber) url += &types=subscriber;
if (fieldData.enabletip) url += &types=tip;
if (fieldData.enablecheer) url += &types=cheer;
fetch(url).then(response => response.json()).then(events => {
//something
});
If you are using it for only yourself and nobody else has access to your token, it should be OK.
And machine security - it all depends on sysadmin.
I see, so the token is as safe in the backend as the server the app is running on basically
Yup.
Is there a documentation page for jebaited?
All requests are GET, and you can see endpoint info when you click on token type
Thanks for your help man! And sorry to spam a bit, but I tried to figure this out for a while. Do you know if there is a way to get subscriber duration from streamelemetns API? I opened a new idea, but if it already exists I don't want to generate overhead.
So all I need to do it GET-Request on https://api.jebaited.net/botMsg/:scope/:escapedMessage and assume escapedMessage is urlencode or rquilevant?
message = encodeURIComponent(message).replace("%2F","%2525");
Huh... the URL pasted by you is wrong https://api.jebaited.net/botMsg/:scope/:token/:escapedMessage
@viral patrol that is the link I got from clicking here ..
:token was just set top botMsg already
Hello :)
Is possible to put accesstoken in URL? like ?accesstoken=xxxx
@pseudo siren in SE API or jebaited?
SE
I am not aware of anything like that for SE. It requires access token in Authorization header
hey all! i'm a front end dev just starting to dip my toe into the world of custom code for streaming with se. does anyone have any recommendations on resources for getting started? i'm hoping to just start with some custom alerts before i get into anything more complicated
@dull mist channel topic should help.
welcome @dull mist! and ya what sudo said is the best info for getting the data/triggers. I used to make things in codePen and just copy-pasta it over, changing the trigger to call the function π good luck, and I hope to see what you can do with the overlays
I have settings set up for an alert but when I turn on the css editor it automatically overwrites what I did even tho I only need it to put everything in caps
@radiant jungle custom css is always from scratch. If you want to have just uppercase text:
okay thanks
Using the following command $(customapi.https://decapi.me/steam/hours/Steam_id/steamgame_id), does anyone have any experience pulling the same information from the EPIC Api? I would love to be able to implement a similar feature using it
@simple cove unless there is a middle man to obtain the data I don't think so.
And as he's the owner of that API it wouldn't to ask him about doing that. @pure drift ^^^^^
Thank you - Hopefully he will see the ping and get back about it - would be a cool little feature
Currently there are no plans for supporting Epic Games. I'm not even sure that data is publicly accessible via their API
Ok thank you - I will have a look around and see if I can find anything
Is there a way to open the editor for the default chat widget?
cause i got some css and html that someone made for another platform and i wanted to adjust it so i can use it in streamelements
Grab the one from lx in #widget-share and work from that.
Good morning! I'm looking for a developer to help a nonprofit client create custom hand-entered donation alerts for OBS and incorporate design / video animations we'd create. We looked at using Tiltify but their take is too much so we'd like the ability to hand-enter donations into the API. There's a few other shoutout / leaderboard / scoreboard functionality we're looking for as well. DM me if this is something you have interest and experience in creating.
By the way this will be a paid project obviously. Hit me up!
hello, is there a way to get all viewers in a channel/stream via irc or helix?
@silent osprey Looking at twitch docs doesn't appear or I'm blind.
yea, i tried looking too, but i could not find anything and hoped i would be blind too and someone knows better
Also could ask in the /r/Twitch discord. Discord. gg/twitchsubreddit
In their dev channel. Know they'd have a better set of answers for ya.
como puedo poner el bot en mi discord ?
Hey, is there a way to perform API actions via a connected web socket?
I'm just wondering if I can do everything through the socket or if I need to have both in order to perform actions and get event notifications.
On more question: I'm trying to connect via web socket on a Node.js application but I'm not getting an 'authenticated' event.
I'm following the example shown here: https://docs.streamelements.com/docs/connecting-via-websocket-using-oauth2
(Adjusted for Node.js.)
I do get a 'connect' event.
It also seems strange to me that the example says "You would need a schema file" and provides one, but none of the code in it uses said file.
Maybe that's what I'm missing?
After gaining the AccessToken make sure to pass it in the const in the JS bellow. 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 Access Token, you use it in the "acc...
@naive sorrel Hi. authenticated event should happen after you emit authentication. Probably you are trying to authenticate via OAuth, but do you have oauth credentials?
For localhost development, you can use JWT as in here: https://discordapp.com/channels/141203863863558144/259680142459142144/619851854439776266
I am.
I use it to connect to Twitch via tmi.js, and that works.
And json schema is a file that is a "manual" for emitted events.
Oh. This is different OAuth token. tmi.js uses Twitch API OAuth, for websockets with configuration as on website you linked you need to use SE OAuth2 token.
You can use JWT instead with the structure i linked above.
Oh, I see.
Ok, I'll use that then, thank you.
Yes, that works. π
Hmm, I'm not getting events for messages though.
Is the event for messages called "event"?
Messages are not forwarded from twitch. You can listen to native SE events there
Oh, ok.
The documentations lists "message - New chat message received" on the "On event" section so I thought it sent updates on chat messages.
Is there some event I can use to test the connection that doesn't require an additional Twitch account or tipping myself?
Ohh. JSON schema lists "message" but it is a string that contains user provided message for events like tip/cheer/sub
And testing events - I think you can add tips from here https://streamelements.com/dashboard/tipping/list - if you click "Add tip" and select "imported tip" it will emulate session update and event events (but it will recalculate tipping aggregates on your account).
And the screen above - this is for "custom widget" and onEventReceived listener there, so within your overlay you don't need to use additional chat connections.
Yeah, I figured it was for overlay widgets only.
The web sockets documentation page links there for the structure of events, so it's a bit of a shame that it's different than you'd expect, but no biggie.
I don't actually need to see messages anyway; I just want to test the connection and see the data of some event message.
If I add a fake tip and then delete it, will it bring it back to the way it was before or does it change some aggregate values permanently?
Structure of real time events is described in JSON schema file. Structure of session update is as on github docs. It could be a JSON schema file too (and maybe it even should).
And about aggregates - I haven't tested behaviour of that. I think that session reset should recalculate your aggregates
Alright, thank you.
One (hopefully last) question: Is there a way to get notified for store redemptions?
I don't see anything about that in the documentation besides API get/update/delete methods.
Do I need to periodically poll the API for the latest redemptions for it?
Oh, I see that the schema specifies that data.items is an array of redeemed items - maybe that's related?
There's no event type listed for that though...
I think it should be emitted too, but I haven't checked it before.
Gonna give it a test and see if I get anything.
Keep my fingers crossed!
Ok, yes, it does emit an event. =)
Type 'redemption', as one would expect.
It's missing from the schema, might want to add it.
Funnily enough, it does not give an "items" property, but rather a "redemption" property with the name of the item redeemed.
Guess the docs are a bit outdated about that.
Is it possible to check for every type of reaction instead of only likes for facebook?
As of now we have videolike-latest on onEventReceived but I'd like to be able to get all 7 types of reactions
Nah so facebook allows you to react with 7 different emotes (One of them is videolike which is covered by se as "Like Event")
These ones
ahhhhh. that would get bonkers. i see some streams where those things fly up the screen
What is the difference between .gifted, .bulkgifted and .iscommunitygift in layman's terms?
so far i have my widget check if the eventReceived .tier = gifted and if true check the amount, but i dont think thats what i need, simply because the alert plays amount times
if i had to guess, .gifted is person a gifting to person b specifically, but what about the other two? 
now it plays the gifted part and then plays the same alert x times depending on how many gifted subs it was, but they all have the same name..
Also, why is it that when i click this, all gifted subs are also prime subs 
@charred vortex You have information about that here: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
Right, i forgot to mention that i'm looking at that right now
.gifted - if this is a gift event for viewer
.bulkGifted - if it is INITIAL event of community gift (${event.sender} gifted ${event.amount} subs to community)
.isCommunityGift - if it is one of community gifts train (${event.sender} gifted ${event.name} a sub as part of random giveaway!)
i dont understand the difference
is .bulkgifted and .iscommunitygift a sub category of .gifted?
Example scenario. You have community gift of x>=2:
- .bulkGifted is emitted once
- .isCommunityGift is emitted
xtimes (for each viewer that received community gift)
so i use .isCommunityGift if its 1 sub and .bulk if its more than 1 so i dont get multiple alerts 
The real life example: https://github.com/StreamElements/widgets/blob/master/giftBomb/widget.js#L15
And if you don't want to play additional alerts - check if isCommunityGift is true
I dont get it. i do 1 gifted tier 1 and it says gifted = false i do 5, same thing. i press community gifted and then it says bulkgifted = true but gifted = false 
and if i dont press the community button on the custom alert it says bulk = false and gifted = false
Sub gift of 3:
Initial:
Next 3:
As you can see - next 3 have gifted set to true
what did you press to emulate that? i only see these
okay, let me try
window.addEventListener('onEventReceived', function (obj) {
if (!obj.detail.event) {
return;
}
if (typeof obj.detail.event.itemId !== "undefined") {
obj.detail.listener = "redemption-latest"
}
const listener = obj.detail.listener.split("-")[0];
const event = obj.detail.event;
if (listener === 'subscriber') {
console.log(event);
}
});
okay, so bulkgifted is the action of gifting multiple subs and then .gifted is a tag to separate actual subs from gifted 
i dont have much time now, but something like this seems to be working
if (data.isCommunityGift) {
console.log("it do be a gift doe");
break;
}
if (data.bulkGifted) {
$("#botText2").text("Gifted");
amount = data.count;
}```
assume there are other things below this
if (data.isCommunityGift && data.amount>1) {
Hi there! I was wondering if anyone could point me in the right direction?
I am essentially trying to have it so that if a user redeems something with points, it redeems a random item in the store of the same value
100 lp for any 100 lp item in store. Is that possible?
TLDR ive been inspired by scottfalco and want to add a minigame to the stream where a viewer can redeem an item and a random "effect" will happen.
For reference, the run hp item is what im referring to https://streamelements.com/scott_falco/store
I wish I could see more on how it works but I only have that page.
Hi, super new here, first post - I've written a bit of code that calculates what time of day it is and compares it to preset time stamps , displaying the correct string per time of day for adding as a browser source on stream. Since it's not using any API calls, does that constitute a widget or not?
Example scenario. You have community gift of
x>=2:
- .bulkGifted is emitted once
- .isCommunityGift is emitted
xtimes (for each viewer that received community gift)
hey @viral patrol, im still having trouble with the code. the problem is that i check for the .bulkGifted, which fires once like you said, but then there are all the other gifted subs that it checks and stalls the entire widget.
i might not be doing the queue system right.. what i do is onEventReceived i check if obj.detail.event.isCommunityGift is false and if it is i push the obj.detail.listener to an [] then use the first event from the queue in a switch. is there a better way? thanks 
is this the right place to ask questions about the embedded overlay dev tool on the site?
hello! total noob on the server. I was wandering where I could find information/documentation to code my own widgets if possible. Thanks!
@dreamy musk Channel topic
@sturdy rover Widget doesn't have to use any API. It just needs to be helpful for streamers π
@charred vortex If you have widgetDuration property set, you need to resume queue prematurely on events that are not parsed by widget by resumeQueue method of SE_API.
I created a simple twitch bot that does calculations based on chat activity, word counts etc., could these statistics (that I currently have locally in my node process) be integrated into my stream layout with streamelements, maybe in the form of a widget?
basically what in asking is that can i send custom data to widgets
@livid agate Of course, but remember, that widgets are sandboxed, so they don't have access to local storage nor cookies.
You can receive data in widget via XHR calls.
perfect, thanks
@charred vortex If you have
widgetDurationproperty set, you need to resume queue prematurely on events that are not parsed by widget byresumeQueuemethod ofSE_API.
@viral patrol I do have a widget duration set. I just need to figure out what the rest of your message means and try to use that go fix my problemthanks
@viral patrol yeah, i saw that, i just didnt really understand the whole resumeQueue thing. I will look into it more 
Hello. Is it possible to receive message when song was skipped? Event or something like that.
Incase a alert requires me to change the font via CSS, which line should I look for?
@viral patrol yeah.. i dont know what im doing here. i think my queue "system" is not good enough
Hi so I have and overlay in streamelements thats 720p and I want to make a 1080p one so I copied the 720p one and now I grouped all my layers, I can move them around as 1 but I want resize them as one. How can I resize them as one?
does anyone have a couple mins to slide into my DMs regarding parameter usage for switching scenes via chat.
websockets are connected, yet i cannot seem to get the
$OBSscene("<scene>") to do anything at all. edited for update...
no dm needed..but some help is appreciated.... i have the parameters installed through my chatbot software and when pinging the $OBSScene from chat... it's simply returned to the chat.
how i setup a song playlist
@spare knot I am not really into websockets, but I think that event should dispatched emitted there.


thanks