#dev-chat
1 messages · Page 71 of 1
@pulsar willow i made this thing but really i dont understand the results
I just saw this I might just try to do this
Um, help
I just called the session data via the API and need to store some specific lists like recent followers, tips. raids, etc. (only the names) i variables (one variable per list)
And I have no idea how to do that
Oh, but for host and raid, I need name and amount
And for cheer and donation name and amount, for sub name, tier and amount
Still no idea how to get the right values, especially since it is kind of a list
Like, to tell you what I want: I want a list of the latest followers scrolling over a part of the screen, then it should switch into a sub, then into a raid, etc. roll
I already did that, I just need to add the API part and I'm done
But I have no idea how to do the API stuff
@uneven oxide Do you know where i can get Widget of Notifications in a History like that?
i dont even know what that Widget is Called
Hey, I'm trying to send a chat message from my custom widget. Is this possible?
getting a 403 when trying to call https://dev.streamelements.com/docs/kappa/b3A6NTM5NzEyNQ-channel-say
Hi together! Is it possible to rename the layers in the browser(editor) ?
Normally, you double click on a layer and enter a custom name
im making a widget that uses decAPI to grab user avatars but for some reason its kinda delayed
any idea?
i have a function that does a GET request for the image url and thats it
@pure drift Can probably answer that.
Though it's probably due to keep low API calls given how lovely his website is 

just tried doing setTimeout() on the function call that adds the message to give the API call time
same result, so it may or not be a performance thing
Good day everyone! Is there a way to export a Overlay pack I've created so I can give to anyone for them to install, avoiding having to be a moderator?
@earnest brook nope
One-Click Overlay Sharing Application
Use this link to submit an application: https://strms.net/shareoverlay_request
thanks! @hardy walrus
This is probably in an FAQ or something I can't find but are obs event listeners not registerable in overlays?
Doesn't seem like so based on my past tests. The obsstudio object of the parent window is not passed down to widgets iframes. So OBSWebsockets is the workaround...
Quelqu'un pourrait m'aider pour streamelements ?
hi, how can i display 7tv and bttv emotes in a chat element?
@indigo flume hey - is there anyway to get an additional callback url added to our oauth setup? specifically a localhost one for testing, or is this something you guys have already provisioned for?
@queen kraken is having issues with testing in local, even though he gets tokens returned from a localhost callback
I just get this response in the oauth /token route
{
"error": "unauthorized_client",
"error_description": "The client is not authorized to request a token using this method."
}
The object actually is accessible from the sandbox (at least in my reading tests, haven’t tried advanced stuff yet) but yeah the event listeners don’t seem to be. Guess I’ll have to look into the web socket approach, is there guide/starting point on that somewhere?
fetch("https://api.streamelements.com/kappa/v2/sessions/channel/<myChannelId>", {
"method": "GET",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer <myToken>"
}
})
Bruh why does this keep giving me error 404?
channel name not id
hello, does my JWT apply for the platforms i have linked in my account? eg will all alerts etc come thru the websocket for all platforms with that one JWT
or do they each have their own JWT's
I checked this with the channel ID from StreamElements in the docs and it worked there. However, when I send it in my script, I get a 404 error.
When I use the channel name, I get a 403 error
Ha, it works now
spelling mistake lmao
Hello!
Does somebody know if there is any way of importing a custom widget in an existing overlay, without pasting all the source code?
I would like to share a little widget with a few testers (its early beta state, so I wouldnt feel good to submit it in widget-share), but some of them have problems to paste the right content in the right tab and similar. It would be really cool if they could just import it from, for example a github repo.
for your own account:
when you duplicate a widget in an overlay, it will ask you whether the destination is this or an other of your widgets.
for other accounts:
The most convenient way is if the owner makes you an 'Editor'. If you now duplicate a whole overlay, it will ask for the destination account.
soz was half asleep at that time, meant to say "it also accepts channel name, maybe try that instead?"
but glad to see you've worked it out
Spelling mistake is bad 
hello? i clicked the live support thing and am now here, i have had an issue with OBS where my audio is not going from my capturecard/console to my he headset for weeks and can not find a fix
I keep seeing log reports like this in my OBS. I'm not sure what they mean or if they are bad? my log file is huge with dozens of these error messages.
Is there a way to find out if it's safe? if it's a specific overlay or widget causing it?
02:39:04.566: obs-browser: [Report Only] Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'none'".
02:39:04.566: (source: https://streamelements.com/overlay/scripts/vendor.js:62349)
There's no real way to make responsive overlays/widgets right? I just have to duplicate overlays and make different versions with different widths/sizes right?
You'd need to ask on the OBS server. https://discord.gg/obsproject
Trying to set up the Advanced SubGoal by Diox for a buddy as a daily sub goal. I have zero clue when it comes to coding it, is that something that is possible to do? I know i would just need to make the current sub count the session count, just not sure where to look for that in the coding since there isnt an option in the menus to do that.
Has anyone had any luck importing obs-websocket-js 5.0.0 beta into a streamelements overlay? seems like they're completely changing how they build
havent tested, but it should work by changing totalSubs to totalSubs = 0 + adjustment; under onWidgetLoad
in the widget.js file
@runic coyote Not the place nor something planned.
okay man, nevermind it, i gave you guys the chance, but you deleted the opportunity
peace
Thanks i'll give that a try this morning
Hello there.. I have a question about multible Account on Streamelements.. I have one YouTube account and one Twitch account.. Is there any possibility to mercg my account so i can use same SE merch and Chat bot to manage both of my Twitch and Youtube customers.? Right nopw i am using Restream io for multible streaming.. So no mater what People can see me live
@brazen tangle Short answer no. We don't support multistreaming.
same with my old Twitch account that i lost the 2FA ability.. I have a proper Merch that i cant use anymore.. would be nice to merge those 2 twitch accounts as well
Oh. understanable. guess i have multible browsers then
@marsh granite that worked, thanks!
Although one thing i noticed is whenever someone gifts a single sub, it counts as 2 for some reason
(i know its not your widget, just putting it out there lol)
yeah its only when its a single gifted sub, and it only when its live, its strange, it worked perfect when testing it off stream
if anyone can help me change my bank info for SE.pay that would be greatly appreciated
Please contact us via email for support with SE.Pay. You can use our contact form here: https://streamelements.com/contact Thank you.
i emailed a few days ago and no response has been given yet
What is the ticket number?
233604
Ticket was submitted earlier today. We'll respond in the order we receive them.
okay, thank you
hello everyone, a question its normal that a custom widget consume so much ram and increase the usage every animation that make?
im trying to figure out why the widget is crashing in obs and right now i think that is more for something of memory usage or a obs problem
so my activity feed alerts not working for me
Hello everybody, thought I'd try here aswell since it seems a bit more technical:
The kappagen emotesplosions for cheers on Twitch currently doesn't seem to work, it can't (reliably) fetch the emote GIFs from Cloudfront (missing CORS Header errors in the console)
Steps to reproduce: create a new overlay, simply add kappagen, make sure "Cheer" is activated under "Emotesplosions" and simply emulate a cheer
How to turn on the custom music/video for donates at streamelements? I prepared alerts for doanations with TTS, but I'm not sure that embed link for video works. Could anyone help me with that?
Also, why chat stats wont work, if I have 250+ followers?
I have a custom widget on my streamelements and I have full control access off my hopusemates. How do I share that widget with him so I dont have to recreate the whole thing:?\
you can press on the 3 dots in the overlay overview and select "Duplicate", this lets you copy it to their account
Thanks legend
Hi all, Are there any developers who can help me integrate streamelements contests into a custom overlay?
@pulsar willow can you check this out if possible? 😄
So, I wanted to check out some of the widgets that have been shared. I clicked the associated link for one and it added an overlay to my account. Is there anyway to add the widgets to one of my already existing overlays?
By default no.
However you can duplicate it between overlays by clicking this by the trashcan https://streamelements.is-serious.business/3KktBfo.jpg
The copy button? It can copy and then be put in another overlay?
Yes.
Oh. I honestly didn't realize that.
do you have a similar icon but for TikTok?
I have a problem with variations settings, after the changes I don't want to save "saving ..." is still displayed
How everybody so my activity feed alerts not working for me its not working for facebook for me
Is there a way to share a overlay with other people? I tried manipulating the url but it doesn't seem to work
I thought overlays were forkable as in you could select options and duplicate to yourself? 
Is there any timetable for the automated postings for platforms other than Twitter to be ready?
Hey great developers, Im looking for some coder to help me with the commission hit me up in the messages, will pay of course. Thank you! 
I have an issue with alert variations. When i create a copy of the community gift default alert and have uploaded the video animation and mp3 sound file...when i test it with OBS open...streamelements plays the correct sound but obs plays the standard 1 gift sub alert sound
Im sturggling making the command for a heist type game for a custom command. Is anyone able to help?
is there anyway to create your own module?
If I set up loyalty in StreamElements with a follower bonus, will it give that bonus to those that are already following me?
do you mean by "module" "bot module"?
If so, I don't think so.
At least lx did realize his "Bank Heist chat game" as a custom widget:
#widget-share message
Hello! I am not sure if this is the correct place to ask this, but does anyone knows how can I integrate a react.js project into the SE Overlay Editor? The widget is basically already done, and I want to be able to provide streamers with a familiar way of changing some configurations of it
Not sure if this is a developer thing, but I've been having issues attempting to save new variations (I only have 3 currently) on an Alert Overlay. No matter what I do, it just gives me a never ending notice of "Saving..." in the bottom right hand corner, but never saves. Any fix to this or reason that may be causing an infinite saving but not actually saving?
can I still use the nightbot you can make on twitch an the alerts through twitch even though I am using obs studio?
Afaik, the only bot that requires a particular OBS Version is the StreamLabs one.
So, nightbot and the SE bot should peacefully coexist.
Thank You for answering this I much appareicate it
My thought would be you probably have to do some linking to an unpkg version or some other CDN version of react, and then generally what I do is just yeet my entire bundled output into the js tab
but I also use svelte.js so it's a little different.
hmm, sounds interesting
basically a <script> tag in your html tab and the pasted built output of your react app in the js
` tab e.g.
<script src="https://unpkg.com.." />
and then the js tab is
// splat your built react application here
`
thanks you two 🙂
Hello! Is there a way to have Twitch Channel Point redemption show up in SE Chat overlay? Like the “Username has redeemed Drink Water”
Hi! I've got that, it's a JS to show current time, that I'm adding in one of my overlay as a custom widget
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('time').innerHTML =
h + ":" + m;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
startTime();
How would I do to have the time for a particular timezone? I wanna travel and do IRL streams and I wanna show Japan's time, not France 😦
actually just wrote a function that does it and havent tested if it actually works
would you mind testing it?
why not! i'll create a new overlay to test that
function currTime(){
//Local bases time on the broadcaster system's
//local timezone
if(timezone==='local'||timezone===undefined){
date = new Date();
hh = date.getHours();
mm = date.getMinutes();
}
//Else; If user has selected a different timezone
else if(timezone!=='local'&&timezone!==undefined){
let timeInt = parseInt(timezone.slice(3)); //returns hour/time difference
date = unixGet();
//Adds/Subtracts time difference based on
//selected timezone
hh = date.getHours() + timeInt;
mm = date.getMinutes();
}
diem = "AM";
if(hh===0){
hh = 12;
}
else if(hh>12){
hh = hh - 12;
diem = "PM";
}
if(mm<10&&mm>-1){
mm = "0" + mm;
}
currentTime = hh + ":" + mm + " " + diem;
return currentTime;
}
function unixGet(){
let dateGet = new Date();
let unix = Math.floor(dateGet.getTime() * 1000.0);
let UTC = (new Date(unix)).toUTCString();
//returns date and time in UTC+00 format
return UTC;
}```
timezone is field data thats in UTC+00/GMT+00 format
how would i change that? i'm an absolute zero in coding, like, copy-paste level lmao
i pasted the code without changing anything yet tho, and it shows nothing
okay so in fields.json paste in
"timezone": {
"type": "text",
"label": "Timezone (UTC+00/GMT+00 format)",
"value": "local",
"group": "Time"
},```
somewhere in the middle
like this right?
and in the .js file, you'll see a block that looks like this
above fetch, paste this in timezone = fieldData.timezone;
yup
above this, put in
let currentTime = currTime();
console.log(currentTime);
then press f12 and check the console if you got the right time when you launch the widget
i don't think i have that
the vanilla thing is like this
in JS
am i supposed to paste this instead of everything in JS ?
done but it still shows the main widget SE gives as an example
okay try pasting this over the original startTime() function
function startTime(){
//Local bases time on the broadcaster system's
//local timezone
let date,hh,mm,ss;
if(timezone==='local'||timezone===undefined){
date = new Date();
hh = date.getHours();
mm = date.getMinutes();
ss = date.getSeconds();
}
//Else; If user has selected a different timezone
else if(timezone!=='local'&&timezone!==undefined){
let timeInt = parseInt(timezone.slice(3)); //returns hour/time difference
date = unixGet();
//Adds/Subtracts time difference based on
//selected timezone
hh = date.getHours() + timeInt;
mm = date.getMinutes();
ss = date.getSeconds();
}
diem = "AM";
if(hh===0){
hh = 12;
}
else if(hh>12){
hh = hh - 12;
diem = "PM";
}
if(mm<10&&mm>-1){
mm = "0" + mm;
}
if(ss<10&&ss>-1){
ss = "0" + ss;
}
currentTime = hh + ":" + mm + " " + diem;
document.getElementById('time').innerHTML = currentTime;
const t = setTimeout(startTime,500);
}
function unixGet(){
let dateGet = new Date();
let unix = Math.floor(dateGet.getTime() * 1000.0);
let UTC = (new Date(unix)).toUTCString();
//returns date and time in UTC+00 format
return UTC;
}
startTime();
so i clear everything in JS and put this instead ?
oh yeah sorry no, just replacing startTime
do i let function checkTime from my code?
it shows nothing, but maybe i just suck
can you maybe try to put everything on this ? https://jsfiddle.net/mjqfo19d/
so i can just copy/paste everything
that's the original code i got from a forum
but it doesn't seem to allow me to choose the timezone
Can a stream store item be set up with the name being a chatbot/widget command and have the command execute when the item is redeemed with loyalty points?
function unixGet(){
let dateGet = new Date();
let unix = Math.floor(dateGet.getTime() * 1000.0);
let UTC = (new Date(unix)).toUTCString();
//returns date and time in UTC+00 format
return UTC;
}
This doesn't make any sense at all
oh i've found a clock widget in #widget-share anyway, it seems to work just fine!
let unix = Math.floor(dateGet.getTime() / 1000.0);*
also i forgot that the second function returns a string not an object so
//Else; If user has selected a different timezone
else if(timezone!=='local'&&timezone!==undefined){
let timeInt = parseInt(timezone.slice(3)); //returns hour/time difference
date = unixGet(); console.log(date);
//Adds/Subtracts time difference based on
//selected timezone
hh = parseInt(date.slice(-12,-10)) + timeInt;
mm = parseInt(date.slice(-9,-7));
ss = parseInt(date.slice(-6,-4));
so this should be it until i actually get around to testing it myself
thanks for helping me test it!
you're welcome! sorry for being unable to make it work lol
Still makes no sense to do that. And even less given that you're later not even using the string but parsing it into numerical values again. That said, .toLocaleTimeString optionally accepts timezones, no need for manual conversions. I'd recommend you to learn more about Date because you're overcomplicating things, a lot
oh didnt know .toLocalTimeString had parameters/options
was just skimming thru w3school's JS Date category for time-related stuff and the page for .toLocalTimeString doesnt have a mention of it at all so i just ignored that
thanks
w3schools = garbage. Always check MDN
I was about to say this
w3 is not really garbage, but it is a super simplified, not complete, source for beginners
How can I get the currency symbol in this case? it mentions userCurrency but having better proper example will be good thing
nvm, i nailed it but i have serious issue.... i need access to obsstudio from my SE widget, this seems not passed down the line...
I have a already done clock widget
hi guys, i'm trying to implement some typewriter code on my alerts but i need to know the names of the alerts (i guess) like:
when my HTML and JS have "alertSub" it triggers with SubTest, but if both are "alert"(or another name, Cheer, Follower,etc) it won't trigger the respective test action.
hey a little question, what is the event for a gifted sub and how i know how many subs gift a person?
the fields i need
for example if a user gift 5 subs, how it work? make 5 events of subscriber-latest or what?
So I was checking the Extra Life widget posted here #widget-share message in the overlay editor and I noticed that when I emulated an Extra Life donation with the editor's alert emulator, it didn't pop up on that widget, but the alert does come up when I go the settings for the widget and choose Test Alert. Will that affect the alerts showing up at all?
Hi, I'm having trouble making a set of alerts for a certain trigger (5 gifted subs) that all have the same % chance of activating, except one has a lower % chance to activate. Ive tried many options but none seem to work. I don't quite understand how these %'s work i guess. Can anyone help with this?
10 in total, 9 with equal chances of ocurring, 1 with much less chance. emulating a slot machine
when i set the %'s to add up to 100, it sometimes defaults back to the default alert for a single sub
leaving the 9 on 100% randomizes between those just fine, but the one set to 3% has never happened
@soft raptor, posting multiple links will result in not being able to post again.
I could be totally wrong here, but based on the code cleanup I've been doing for the default widget stuff, I think it essentially comes through as a subscription in both cases. So the event you're listening to is still subscriber, however, there's a flag on the event: event.gifted which is a boolean. Here's the logic I use for a gifted sub of one or more subs using a ternary!
Ignore the fact that I have subscriber as an object key, you really only need to care about the logic I have in addEvent there!
subscriber : (event) => {
const { amount } = event;
return addEvent(
event.type,
// Attach an "X" if the gift is more than 1, otherwise just go with "sub gift"
event.gifted ? `Sub Gift ${event.amount > 1 ? `X${event.amount}` : ''}` : `Sub X${event.amount}`,
event.name
);
}
ok make sense but my question is when the flag gifted is true then the .amount is not the months that subscribe the person is the amount of subs gifted?
are you test this?
and the flag gifted is community, bulked or what?
let me get you a console.log of the simulated event when I run it
Test Single Sub:
{
"type": "subscriber",
"name": "accountant",
"amount": 1,
"count": 1,
"items": [
...
],
"tier": "1000",
"month": "December",
"isTest": true,
"message": "Do not fear a man that spams 1000 memes, instead fear a man that spams a meme 1000 times",
"sessionTop": false,
"originalEventName": "subscriber-latest"
}
Test Gifted Sub:
{
"type": "subscriber",
"name": "Eleonora",
"amount": 10,
"count": 10,
"isTest": true,
"tier": "prime",
"gifted": true,
"bulkGifted": false,
"sender": "Peta",
"items": [...],
"subExtension": false,
"month": "March",
"message": "Born too late to explore the Earth, born too early to explore the universe, born perfectly to explore dank memes",
"sessionTop": false,
"originalEventName": "subscriber-latest"
}
And bulk is SLIGHTLY different, but a community gift looks like it generates a LOT of subscriber events
but lemme get that one too
{
"type": "subscriber",
"name": "Bert_90",
"amount": 1,
"count": 11,
"isTest": true,
"tier": "1000",
"gifted": true,
"sender": "Dehlia",
"items": [...],
"subExtension": false,
"month": "April",
"message": "Here you go",
"originalEventName": "subscriber-latest",
"isCommunityGift": true,
"playedAsCommunityGift": false
}
looks likegifted is true for all types of gifted subs, Multiple gifted subs I think have the bulkGifted flag changed (or present at all) on the event object
and then isCommunityGift exists and is true on community.
Man this API is MESSY.
yes for that reason i didnt understand what i need to have in mind for the gifted situation
so the bulked and the community work diferent right?
the bulked has any way to know how much subs?
and what is means bulked gift or community?
I’m trying to use this overlay from the gallery but I’m trying to add a day variable to track just the stream subs. Could I get some help with this fields editor.
adding it to just the fields will just add the option, but it wont do anything
mind sharing the js?
or a link to the overlay in the gallery
okay i take this back
i read the code then went to reread SE's variable list again
you can get it to work by changing "day" to "session" in the fields.json
@lusty timber
Awesome that’s what I thought but I realized I couldn’t make sure because the stream isn’t currently live. Would the same also work if I changed the JS from subscriber-{{goal range}} to subscriber-session?
yup
This is a snipped of a code for subs event:
` if (listener === 'subscriber-latest' && data.bulkGifted == true && !data.gifted && currentGoal.type == "subscriber"){
currentGoal["value"] += data.amount;
}
// listen for single gifted subs
else if (listener === 'subscriber-latest' && data.bulkGifted == false && data.gifted == true && currentGoal.type == "subscriber") {
currentGoal["value"] += 1;
// listen to new subs
} else if (listener === 'subscriber-latest' && !data.bulkGifted && !data.gifted && currentGoal.type == "subscriber") {
currentGoal["value"] += 1;
} `
Community Gifted or BulkGifted -> When somebody gifts more than 1 sub
Gifted Sub -> when somebody gifts 1 sub
Subs -> When somebody sub or resub to your channel
@young vale or you could use this library
https://reboot0-de.github.io/se-tools/tutorial-Events.html
it has functions that handle these events separated and abstract the messy code part for you
Stacking if/else just hurts my brain lol
Hey! is there a way to start a contest via chat?
If I'm looking to set up Tiltify alerts with custom CSS, will I just have to code a custom widget for that? Not seeing the custom css options for tiltify alerts specifically.
Short answer yes.
thanks
is there a way in the alerts variations setting to setup advance sub so if some one does a 6 mouth in advance
thank you, later i send you a better way to do it, because its not god all that if and else haha. But work well the logic
Hey, is there a possibility to connect dono goals between overlays? I mean that if I change the ending date on Overlay (Just chatting), it will also change the date on the (game) overlay.
If I understand correctly, you could isolate the widget on its own overlay and then use the URL for both browser sources. That way it is literally the same widget and therefore adopts all changes.
Oh that will work, thanks!
I don't understand with the API, how to get the latest sub gift?
The session-data- is only providing each gift as individual, which means if the latest sub gift is 10, it only shows latest gift: 1, and the last gift of the 10 as the result.
Am I missing something?
This is always sending amount: 1
Looks like this has been broken for years?
Um, guys... what does it mean, if I get
Request URL:
https://api.streamelements.com/kappa/v2/tips
Request Method:POST
Status Code:403
x-ratelimit-bucket:global
x-ratelimit-limit:1000
x-ratelimit-remaining:1000
x-ratelimit-reset:1655575064634
{"statusCode":403,"error":"Forbidden","message":"Forbidden"}
when clicking the Tip button on the tipping page? There's no reason and nothing 😲
Are you authenticated with the application at that point? A forbidden usually denotes a lack of tokens to make requests
Hello, does anyone know if there is any variable to get the last raider? Similar to shoutout aka SO, but streamer can use without typing channel name.
Hello,
The step goal is a very good tool idea, but will it be possible to choose a monthly subs option? Thanks
let data = obj[“detail”][“session”][“data”];
let latestRaider = data[“raid-latest”][“name”];
Is it possible to have a widget donation goal for YouTube that combines Superchats and tips (donations)?
Hey, has anyone made an event tracker that's scrolling horizontal instead of going vertical? If so, where's the best place to try and make one, or is there one that someone has already designed in the past? I tried to make one in stream elements, but i couldn't get the spacing right due to name sizes changing etc, so it looks weird. I created it by making an overlay that was 5000px wide x 200px, then put all the segments on it. Then put it in OBS and use the scroll feature.
I've attached a pic of it, but it does scroll across and includes all categories like, latest follower/sub/donation/bits/raids/gifters etc
hello
one question hope you can help me
I created a custom chat from streamelements overlay, and as you can modify all the parts of the code, js/html/css/data, I add some buttons to the top of the chat that in example changes the theme of the chat (to not overlap content and do text visiible depending on background) or put the option in other to disappear the messages at some seconds, and hide it completely when no messages inside
I add it as a browser source and I can interact with it without problems
but I would want to send from hotkeys in example, instructions to click a concrete button binding they however
and instead of, receive javascript events from the element that I could emit and bubble to window main HTML tag element
Anybody could lend me a hand?
(I switch my doubt from helpdesk-twitch to this channel as moderators said me)
Hello, does anybody know whether and how it is possible to create a custom widget that is basically a goal combining tips and SuperChat? I have almost no experience in terms of coding… Thank you very much :)
Hi! I have a question that is if I can use a StreamElements variable like the UPTIME of a streamer in a StreamElements Custom Overlay
And If this are possible how would it be?
Or a API without RATE LIMIT that I can get the uptime
A non-rate limited API call will probably never exist.
Why do you even need to call an API multiple times to get the uptime for an overlay. Call it once and then update a timer in JS. I mean, you don't need to call the API each second to know the uptime is one second larger
@elder dragon Hey, I love using your modern goal widget. I was just wondering how I could have the goal reset so that it can be reached multiple times in one session? I've looked at other widgets and tried to get the javascript code correct, but I can't quite get it. Will you please guide me on what to do?
Hiya, my SE Chat Stats broke due to name change, it says on SE page to contact through Discord, is this the correct channel for it?
Hi! I am trying to make custom Youtube chatbox overlay
Right now it can capture the chat using the code in github, but when I am testing it I can't seem to get a message deletion or user banned event in "onEventReceived" data
Is there a work around for this? Especially with the recent bot raids.
Thank you!
i think it's possible but wouldn't you need currency converter for the superchats to combine with the tips?
Hey is anyone else getting?:
Error: KV GET failed: 500 Internal Server Error
at async getFinalUrl (worker.js:144:19)
at async handleRequest (worker.js:47:20)
at async _handleRequest (worker.js:7:12)
Lots of websites are having issues right now. It should resolve itself shortly.
OK thank you
Issue seems to be resolved now! I was having the same issue here.
good morning! Can someone explain to me or point me to an example on how the Button field works in the overlay editor? I got it that I can add a button, give it a label and a value, but what if I want this button to execute a function?
you have to listen to the 'widget-button' event, it's sent when you click the button. There is an example in the Github docs, under Button Click section
will check, thanks
It worked, thanks 🙂
@everyoneow can i make such a sign or symbols with the chatbot as seen in the picture
G'day G'day everyone. I'm wondering if i can get some help with developing some stuff for my soon to be Overlay. This does include brainstorming and shizaz too
Before, you allowed the use of /raid and /host as a normal bot command and made it easier for the streamer doesn't need to give an editor to all mods on the channel. We could limit the supermod if necessary and it works exactly the same with setgame and settitle (both standard command and variables) ignoring mod editor level, but making life easier for all mods.
- Do you plan to re-enable the use of
/raidand/hostnow that Twitch's API for /raid is in open beta? - If I use a
$(customapi), will the bot convert to text like it started doing with/raid nameappearing in chat or will it be recognized as a command allowing me to gank through it? - Will I be able to use the Twitch Raid API programming in the overlay or do you intend to block?
I have basically no idea 😅
On YouTube as well as on my tipping page, I‘ve set the currency to euro…
Do you know how this widget can be done? Or what type of coding language is required so that I can get into the topic? As mentioned, I have almost no experience with that
maybe read session's data of tip + superchats and display it? You need HTML CSS Javascript in general
Okay, then I have a project for the following days 😅
Thank you
honestly just take an existing tip goal widget and modify it to get superchats, convert if needed, then add to the goal
Okay, thank you :)
obj["detail"]["session"]["superchat-latest"]["amount"]
Hello, Please i want to say something for #dev-chat
Please make the selected Item in the Design view to be like darker, as when you select like image or text, you aren't able to see it's selected already.
Also, when you go to settings of selected item, this should be revert you back to selected item in highlighted color.
Hope that you can edit this in the sire plz.
also, if anyone face this issue or want to the Dev. Do it plz vote 
@torpid trellis ⤵️
Check out the StreamElements ideas board: https://strms.net/ideas. You'll be able to add ideas, upvote ideas you agree with and track their progress with email notifications. Adding and upvoting ideas also helps the staff know which ideas should be prioritized so please take some time to upvote.
Thanks
@pulsar willow, posting multiple links will result in not being able to post again.
hello everyone, I was wondering if anyone was familiar with how the .colon container worked.
I am trying to hide the from my chat widget but .display: none; doesn't work
I also am trying to figure out how to create a smooth scrolling effect for my chat widget as well (messages sliding up/down smoothly rather than teleporting). I believe someone yesterday was also trying to achieve this but it doesn't seem like they have asked here yet
hey guys anyone know if i can make a debounce function inside the js custom widget? i cannot make it work right now
send a screenshot and/or a code snippet of what that container is exactly
Well the only information I really found on it was some old Reddit thread mentioning it
I don’t think it was inside of the widget itself (I just took the whatever custom chat code was on the github )
here is the thread i saw
i also looked through some other threads and i saw that someone else also included the class and also had display: none and the colon was hidden for their code
display: none;
}
tho they might have made the code for streamlabs i forgot
from what i see, its only used in an empty span element based on this thread
but might be used to display names that are in cjk
Codecy_ (コーデ死) Lorem Ipsum is smart dummy text
Hmm I see
otherwise, the element is practically useless as far as im concerned
Tysm for the help
I think I actually have an idea for implementing what I want in my chat but I’m going to do it tmrw since it’s getting rly late for me
Hey! How is the Contest Feature working when theres only 1 user doing it? does he only get his points back?
@viral patrol I need some help with your multichat widget 🙈
Is there a way to hide the channel avatar? like on the pic below the first icon is what i want to hide.
i do want to keep the twitch badges however! can i do that?
I need help with how to download my sound files so I can back them back, also, how do I delete said files to make room for more files for lets say alerts? thanks
I'm referring to this on the streamelements website in alert settings
What do you mean by back them back? In order to delete them just go hover the file with your mouse and you'll see a DELETE button.
As far as I know there isn't a proper way to download your files, I would use Chrome's Inspect tool in order to access the HTML element that contains the media URL informations.
Any idea when the docs will be live again?
Okay thanks
I just tried opening them via channel description links and they worked
thanks. All the links I've found on the internet go to pages that don't exist anymore.
Hey guys does anyone know where I can find some resources on how to code custom widgets for a beginner? I want to make a widget that changes images based on subs and plays a little animation when the image changes. It seems simple but I have no clue where to start with it
Thank you!
It has been a year now, and I still haven't had so much as a basic response to my request for API access.
is there perhaps some other way of programmatically interacting with streamelements that is a bit more accessible for small developers (or accessible at all in this case) without having to reverse engineer existing web tools (which I could do if I were paid enough, but probably won't)
I also found c4ldas' answer helpful:
#dev-chat message
Hey hey - anyone have experience with using React and material-ui for their custom widgets? I’m just looking for what the workflow/pipeline is. Tried a few different things short of bundling MUI and React into a single JS file and loading all 2 megs as a remote source script 😅
(Note I’m also doing this from typescript)
i need help making my event list. currently, i just want the border to also work on the bottom. as it stands, the bottom of my event list has no border even if i make it so the only code is a body { outline: solid; outline-width: 20px; }
i tried with a fresh event list CSS
i am using the custom event list widget thing
Hello everyone 👋 Is it possible to make a test channel points redeem script specifically highlight my message like a test message script?
Is there anyone I can turn to for help if the original creator of a widget doesn't respond? I'd like some help with Javascript code so a tips goal can reset 5 minutes after being reached. I have multiple goals so I don't want to use the reset option through StreamElements. Whom can I contact?
In case anyone is wondering: I decided to mix MUI and go with vanilla React. That got the file size small enough!
just ask here with a pastebin of the js
I assume that the bottom part of your outlining is cut off?
At least in my tests the following seemed to work:
CSS:
.main-container {
width: calc(100% - 2 * {{borderThickness}}px);
height: calc(100% - 2 * {{borderThickness}}px);
margin: {{borderThickness}}px;
/* The elements are arranged one below the other. */
display: flex;
flex-direction: column;
outline: solid;
outline-width: {{borderThickness}}px;
}
Fields:
{
"borderThickness": {
"type": "number",
"label": "Thickness of border in px:",
"min": 0,
"value": 10,
"step": 1
}
}
HTML:
<div class="main-container"></div>
Is possible in a alertbox disable the main alert and only have working the variations?
In Sub Event
Interested in knowing the outcome that's for sure 😁
This may also help https://reboot0-de.github.io/se-tools/tutorial-Events.html
Documentation for the StreamElements widget tools
this only works if somethings inside the thing. i want an outline around the entire box at all times as i fill it up. im using the body element currently and the bottom of the body seems to extend indefinitely no matter wayhttps://imgur.com/a/TkKfUxs edit img didnt work now it does
Hey I'm just editing a custom widget and want to add an image input instead of a video, but I can't find what the type of the field would have to be... Anyone know what it is?
since it'd be a pain having to change it to a video since it has a transparent bg
The entry and exit animations of a widget that I want to edit do not work for me, does anyone know how to fix it?
is there a list of elements i can use, IE body, main-container etc?
im entirely new to CSS
ive just been going off documentation so far
If you look at the html, you can see from@the markup things you can target. “.main-container” is just a single class you can target. You could add an id or more classes as space separated strings (e.g. “main-container something-else” and target that element in css with “.something-else”)
But essentially, body and html should exist implicitly, and then whatever markup is in the html tab should be available to target from the css tab
as Morklympious already said: your HTML structure defines what you can target.
(There is also the option to dynamically add elements to the HTML via Javascript, so the content of the HTML tag is not necessarily a complete overview.)
the structure of an image field is:
...
"imgField": {
"type": "image-input",
"label": "Some image picker",
"multiple": false,
"group": "Some Group"
},
...
If you set "multiple": true , you could define a pool of images.
If it is the last field, you need to delete the trailing , after the }.
Whether the widget can handle different input formats is another story ...
for which widget?
but why cant i just outline my box
It totally should be possible.
Trouble shooting would be easier if you post your HTML Structure in here (if it is not too long, otherwise a pastebin or jsfiddle link might be a better solution).
Of course, there is aways the "cheat mode" where you simply put an border image (or another custom widget with just the border) behind your event list 😄
@rare cairn, posting multiple links will result in not being able to post again.
is there some api for csgo rank so i can use it in command?
ALPHA ROTATING FEED V2.2
<div class="main-container"></div>``` im using the default html. so there's code i put to specific the widget itself to then slap outline css into in a function?
in the css tab you should just be able to add something like...
.main-container {
outline: 3px solid white;
}
you can also use border instead of outline
e.g. border: 5px solid red or whatever
this only works if somethings inside the thing. i want an outline around the entire box at all times as i fill it up. [...]
Then I don't understand why you get the behavior you described. At least in my tests it didn't behave that way.
The widget uses pretty much the code of my answer (#dev-chat message)
i needed a comma in my fields when adding your property thanks fren just a syntax error
thnx for the help i finished it without any hackery all in html and css
🥳
👏👏👏
quick question regarding custom CSS/HTML in overlays
if I were to do up an overlay mock up let's say in AI, then export it as an SVG file
and then open that in a browser and view the source, could i simply copy paste the generated HTML/CSS data by AI
and adjust things on an as needed bases so that instead of "insert_long_username" it's set to @brisk burrow for the recent follower field and so on
I'm trying to figure out how to reset my goals after they've been reached. This is using the modern goal widget by coocla. I just want the goals to reset every time after they reach the goal and start back at zero and show the goal reached text for a while before resetting. I was able to get it to reset the text after completion but the actual money amount wouldn't go back down to zero despite setting the variable equal to 0. Any ideas?
@cinder yacht ⤵️
To reset goals:
- from the Overlay Editor > Session data on top right (monitor symbol) > Goals tab > reset progress of desired goal
- from the Dashboard > Activity feed on the left > Widget data on the right > Goals tab -> reset progress of desired goal
Note: Goal widgets (progress) only counts up and doesn't go down automatically, if you lose followers/subs.
This is not working for you?
This would target all of my goals
I have 4 different ones that keep track of tips.
I saw on other widgets that they had a reset option in the field data and I tried my best to mimic their code into the one I'm using.
Hey
I just need some help with the JS. I tried to contact the original creator of the widget but they didn't respond. I believe the code goes at the end of the onComplete function but I couldn't get the tip to reset to 0. I have other goals that take more money to reach so I don't want to reset all of the goals at once with the reset option on StreamElements.
So, is that an unreasonable request? Should I go somewhere else for help?
I wasn't able to find a "modern goal" custom widget by coocla.
Do you mean this one? #widget-share message
The request is not unreasonable, but changing someone elses code is always a pain.
So this might take some time until a new dev did understand the code and potential side effects of changes.
Do you literally mean the . character in a chat message?
If so, you could use the replace() method of the string object (regular expressions are the way to go for more complex scenarios).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
I mean the : the colon the ":"
Can I add custom browsers sources into StreamElements overlay maker?
ahhh, right, colon was ':' ... my bad.
I assume you mean the one between username and chat message?
Should be possible.
yeah
i didnt have it in my first try
now its here in my 2nd try
i was on SLOBS before now SE
Yes, it is that one. It says, "Coocla Media" down below. I tried @ Misha a few days ago but didn't get a response. I know it's a lot of work which is why if it's too much, I totally understand and don't want to overwhelm anyone. I have a basic understanding of code, I just can't figure out how to get the actual tip value to get back down to 0 after it has been reached. Thank you.
goal_state seems the object you want to edit after goal is reached
then you can use this snippet from onSessionUpdate to update the widget visual
animate_goal(data.percentage, data.value);```
Thank you, I'll give that a shot and get back to you
Been messing around with the editor and had an idea. I wanted to have a channel point redemption that when redeemed would display your username in the streamelements overlay using a simple text widget. Is there any way I can do this without a script or would I need one?
You'd need a script that does it via Twitch API to do with with streamelements
but fortunately, check this out: https://overlays.thefyrewire.com/widgets/triggerfyre/
im trying to do a hanging indent with text-indent values but that makes my text get cut off. ive tried compensating with margin and padding but it moves the entire element, not the text? edit: nvm even though i spent all yesterday on this i figured out a solution just now for those using discord search in the future for "Negative Indent" it's good to know overflow:hidden will hide your negative indentation but overflow:visible wont.
hey good morning, im having a error "Uncaught (in promise) TypeError: Cannot set properties of null (setting 'onloadedmetadata')" and i really didnt know where the error could be, any hint?
look for onloadedmetadata
your script is trying to read something's that's null
probably something wrong in the request
Is there any documentation for streamelements to link loyalty points to a game made in unity and also a way to redeem something from streamers store to make something happen in the game
I'm currently talking to someone fiverr and what I want done they said I would have to have a dev account with SE??? What on earth is that???
Hi! Don't know if its OK to ask this here, sorry in advance if not.
I applied for OAuth2 credentials in the Asana form a month or so ago and I never had a response. I was wondering if I need to wait or if there something wrong with my submission.
What did you ask for on Fiverr?
Probably not, there are people waiting for much longer here..
ok! thanks!
I was asking him if he can help either create a custom widget or integrate a custom command where a user can type !coingrab but only when a event is triggered via streamdeck that runs through a scripts since streamdeck allows custom scripts. Then it will give users 1-10 loyalty points. The person I want to hire off fiverr said to that I would have to a api dev account which doesn't make sense since no where in the docs it says do I need that.
I don't get what that means either, maybe is talking about the fact you'll need to use SE APIs in order to give such points.
In case you will end up not working with that guy, feel free to contact me.
hello, im getting 401 Unauthorized when calling this endpoint https://dev.streamelements.com/docs/kappa/b3A6NTM5NzA5OA-channel
even though i have the right scopes and other endpoints like https://dev.streamelements.com/docs/kappa/b3A6NTM5NzEwMA-channel-public succeed with no issues
Can you show us your request? Are you including the Bearer token correctly?
url: 'https://api.streamelements.com/kappa/v2/bot/commands/622f602c4***************',
method: 'get', headers: { Accept: 'application/json', 'Content-Type': 'application/json', Authorization: 'Bearer mRsHqMu***************', 'User-Agent': 'axios/0.21.4' },
and this is the response i get: data: {
statusCode: 401, error: 'Unauthorized', message: 'Not allowed to perform this operation' }
const seAPIFetch = await fetch(`https://api.streamelements.com/kappa/v2/bot/commands/${channel_id}`, { method: 'GET', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': `Bearer ${jwtToken}` } })
You can get your JTW Token at https://streamelements.com/dashboard/account/channels > Show secrets
im pretty sure i have the right JTW token because i can call oauth2/validate and channels/me endpoints
this is working on my end
which scope are you using?
that's all I'm using, so probably no scopes
oh apologies, im putting the oauth2 access token in the Authorization header, not the JWT token
is there a way to call it with the access token instead?
According to this example sheet here https://github.com/StreamElements/authentication-samples/blob/master/go/main.go#L77, seems like you should include your Auth token into the Authorization header
yeah, it seems that sometimes the Bearer token has to be the auth token and sometimes it has to be the JWT token
sorry i know im asking many questions, but is there a way to get the JWT token for any user that has authorized streamelements on my website?
endpoints like channel/me and channel/details dont seem to include the JWT token in the response (the long token you get from https://streamelements.com/dashboard/account/channels > Show secrets)
I feel like the JWT token is been created for a personal/private use since it provides access to everything concerning your account. If you're looking to develop and release a public application, you should include into its OAuth2 the scopes that fit your needs. If you're asking which scope you should use in order to call kappa/v2/bot/commands/channel, I don't really know, here you have a list of all the possible scopes anyway https://dev.streamelements.com/docs/kappa/ZG9jOjE4MDk3Njc-o-auth2#oauth2-scopes
makes sense, unfortunately i've tried all the scopes listed in https://dev.streamelements.com/docs/kappa/ZG9jOjE4MDk3Njc-o-auth2#oauth2-scopes and i still get 401 Unauthorized error
I can't help you further since I don't have access to SE's OAuth program, I'm sorry
no worries, thanks a lot!
hey gang - does anyone know where i can hire someone to put together a super complex OBS scene collection system along with streamdeck for a live show? i'm talking advanced scene switching multiple plugins or custom coded solutions, scripts, etc.?
Depending on the complexity of your project, this might be a fiverr thing?
How do you apply to get access to SE api portal? Where is the form for it?
Here you got the form where to apply https://form.asana.com/?k=pWDtXOPVzh6AtBJQ7uTGgw&d=224349692947415
I was able to get it! Thank you for your help.
anyone having problems with Twitch PubSub API not really getting info about channel point redeems anymore?
I've been using this for a long time now, but it just broke about 1-2 hours ago
https://github.com/pjonp/pjTestBot/blob/master/modules/.SE_Overlays/emojiRotator/sePubSub_beta.js
It's working properly on my side. I'm using the same file, well actually I made a copy on my GitHub but it should be just the same.
your code also takes a token in TwitchPubSub's class constructor, and also the LISTEN topic is different, so it's not really the same
guess they simply don't allow no-token PubSub listeners and the old way simply stopped working
well, thanks for pointing me in the right direction anyway
You're right, I did those edits following the creator instruction actually. You can find the conversation following this link here #dev-chat message in case you need it. Glad it helped tho ahah
Dang it! So, it works but only kind of... Goals no longer stack up until they reach their goal and stay at 0. But act like they are reached when anyone donates anything even if it is less than the goal amount.
That's probably because you forgot to reset goal_state.reached to false
Good afternoon,
I apologise if this is wrong directory, but I wasn't sure which category this would fall under.
I have found a pretty serious privacy/security issue regarding tips/donos and I was wondering if I could notify a staff member privately?
I have raised a support ticket, but I know what support turnaround times can be like and I think this is too important to wait.
Thanks in advance.
Hi. The ticket already got a response. This is an issue we would like to handle via tickets, not via a private conversation.
Hi I was in the helpdesk-Twitch a few days ago, staff sent my issue here. I have the same person winning every giveaway drawing I do. I know your job's are hard I follow a few streams and see how difficult working with the different languages must be. My question is just, should I expect to hear anything for within a few days? I need to fulfil the giveaway somehow and was looking for clarification from staff if there is an issue.
the last mention of giveaway in this channel was in april
I put that in :/
you probably misunderstood them when they told you to forward it here manually
Oh, and follower events now trigger my goals, lol
It's working fine on my end.
I noticed that some of my brackets were out of place so I just adjusted mine to match yours.
Nevermind
Follower event is still triggering it
Does a follower even trigger yours?
Nope
I don't think so honestly
If you post your full code I can try to help otherwise it's kinda impossible
Okay, so a follower event only triggers the goal if it's been reset to 0$
Yeah, if the goal is at 0$, then the follower even will trigger it if it has been reset.
Does that happen to you, too?
There's the overlay that has all the code for the four different goals I run
Yeah.... Don't share those.
Overlay links = backdoor into your account.
Ah, kk. ty
What's the best way to share the code?
https://pastebin.com/ make sure to hide any private info before sharing the code
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
This is actually a tad better
https://codepen.io/pen/
...
My Fields are the same as the original code except I added this to the bottom
Here's my Data
Thanks for your help
It's much appreciated
I'll take a look later tonight 👍
Thanks
https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=auto&tl=en&text=${queryescape ${1:}}
poked around dev tools for a sec and apparently auto is its language code
Im unsure where to put this. So heres my question:
So i got a webcam overlay with my logo on there. Is there a way to when i get a new alert (donation, sub,…) that my logo changes color untill i get a new alert?
you'd need a custom widget for that but yeah
where every time its updated, it changes src
Is that hard to do?
nope, not really
Thank you so much !
But i see this got a duration. Is it possible to for example keep it red after a sub untill a new alert comes in like something a dono then it turns yellow? Or just in general when there comes a new alert to have it another color no matter if its a sub x2?
you may have had a missing } a tthe end but it seems that the command is updated now since it returns a bunch of html instead
yeah, seems like all of the big machine translation services (gtl, systran, yandex, deepl) require auth keys now
would require a custom bot that needs to be manually setup
I'm pretty sure I understood the issue, the widget is using onSessionUpdate that is triggered every time a session data is updated, so the widget update goal_state.value to obj.detail.session.data[goal_state.type].amount every time an event occurs. Basically after goal is reached, any event will get goal_state.value back to goal_state.goal and that trigger onComplete function.
That widget is being developed to be used just once a session, or at least that's what it seems to me.
so perhaps delete the whole onsessionupdate section? Or finetune that?
I feel like you'll need to replace onSessionUpdate with onEventReceived, then make some edits to adapt the code to it.
What you mean? Anyway here you have docs about onEventReceived
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
Does the eventreceived mean any event? Or is it specifically tips?
Oh, nevermind
I see
Yeah take a look at the documentation, that will help you along the way
Is there a way to either websocket or event the media request endpoint? If possible, I don't want to have to run constant fetches, but I want to see if this is possible in the first place 😅
just a random question out of curiosity
https://dev.streamelements.com/docs/kappa/b3A6NTM5NzEzMg-channel
what exactly is “isPartner”? Checked around and it doesnt mean twitch or SE partner from what i could tell
if i multi stream can i somehow put youtube chat into my chat overlay too?
Only if it's for YouTube
@pulsar willow, posting multiple links will result in not being able to post again.
Hey so I noticed recently that the tts voice I used (Szabolcs) is down and not working, if I try to use it from the api it gives me an Internal Server Error. The other Hungarian tts voice is Ishtevan, she works from the streamelements editor but not from the api. I think the problem isn't on my end so I just wanted to point it out.
EDIT: I have found Ishtevan's api it's called hu-HU-Wavenet-A, but Szablocs still doesn't work
@trail wraith some voices are broken atm unfortunately
Unfortunately no.
So, I got it so it no longer triggers on a follower event. But now it's no longer keeping track of new donations. I'll keep trying stuff.
When I set my text color for different variables for subs, like resub and gifts, it doesn't change the text color to what I want?
If I wass you I'll just keep the animation/goal logic from that widget then you'll need to update onSessionUpdate to onEventReceived looking for tip-latest, it should be pretty easy..
Are you doing it via custom code or?
Right, I'm just trying to figure out how to change it to that. since there's an if and else statement there.
window.addEventListener('onEventReceived', function(obj) {
// Get Current Goal Value
if (AMOUNTS.indexOf(goal_state.type) > -1) {
goal_state.value = obj.detail.listener[tip-latest].amount
} else {
goal_state.value = obj.detail.listener[tip-latest].count;
}
Is it something like that?
I don't think I got the syntax right for tip-latest
Sorry, I'm trying my best here. First time working with JS
Or is it obj.detail.event?
this will work for you if you're looking to use just for donations, otherwise you'll need to edit custom fields too in order to have a dynamic listener type check
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const event = obj.detail.event;
if (listener == 'tip-latest'){
goal_state.value += event.amount;
}
});
No, it's just for donations. Yeah, I don't think I would have gotten that but I was thinking I'd need to use a +=
Thank you
variable += 1 is the same of variable = variable + 1
No, I know, I was just saying I figured I'd need to use that I just wasn't sure how to put it in. Do I need to do the same thing for onWidgetLoad?
I'm pretty sure you can just get rid of the if else statement into the onWidgetLoad
And put the same code from above there, too?
Also, should I include 'tip-latest' in this area? const AMOUNTS =
Nope
This way every time the widget get loaded it will start from 0
Well, I do want it to keep track of total tips so it can be a goal that's active until it's reached.
It's working now, but the animation and the number updating takes a second to run, haha.
I'll take a look at onWidgetLoad to see what code from there I can use.
Okay, I got it so it's not slower anymore
If you want your data to be usable from session to the other you'll also need to include SE_API in your widget
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#se-api
So, I was just planning on manually resetting the session on StreamElements if I ever need to. The way it works now is it automatically loads in the tips so far and then it will reset if that goal was reached and then works accordingly.
I think everything is good now. I really appreciate your help.
Hi... I need help to make an API code to change the values marked in the image using commands in the chat.
Example: !tip @sender 10
Can anyone help me please? 
Do you know because of what does it normally progress?
I'm wondering if https://dev.streamelements.com/docs/kappa/b3A6NTM5NzIyNA-channel could help you
I’m adding alert labels to my stream and every single one works except followers. I go to my dashboard on streamelements and there’s no data where my followers should be! Is this some kinda glitch? I really need help.
@dusky mango ⤵️
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.
6162d358a7f6ba86e0e1e184
@dusky mango ⤵️
Please logout of StreamElements at https://streamelements.com/logout and then login again to your account (Twitch/YouTube/Facebook).
What is the name of the overlay you're using that is not showing the data properly?
done
im not really using an overlay just labels but i dont think its that i believe the problem is streamelements isnt showing data for my followers. All the other labels and the data for them work fine
So if you look at the session/widget data. there is no information set for the latest follower. So that is why it's not showing anything. You also have it set to reset your session data 15 minutes after your stream ends. This will clear all the settings under Session data, which includes the follower count. It shouldn't have an effect on your Labels, but it seems that was altered. If you adjust the labels section, it should now properly display the names
does obj.detail.listener["subscriber-latest"] apply to both twitch and youtube subs?
okay so i turned off the reset session. How exactly should i adjust the labels section? Do i have to manually input my latest follower because the latest subscriber auto'd in i didnt have to touch it. Or are you saying just reset everything and it should work?
Resetting everything should work and once the new data rolls in
okay thanks ill try that and see what happens
Hi Greyson did you hear anything about the giveaway issue?
I asked in #dev-chat but didn't see a reply.
No updates yet
Thank you for the response 🙏
Can anyone help me? About the LEADERBOARD of my account that is not working.
hey is anyone here a mathwizz
Hello my name is Gabriel, I would like someone to give me some attention to ask me a question, is there anyone who can help me?
Don't ask to ask, just ask
whats your question
shoot Boss, we are all happy to help 😄
Question for anyone familiar with pastebin. So i have a pastebin with a list of quotes and a command that randomly calls a quote from this. I'm wondering if there's a way to make the command behave similarly to the built-in !quote where I can call a specific line/quote from the pastebin (i.e. !quote 13)?
@modern pawn Only possible if you praise all the server daddies.
Especially 3v 
But hold a sec. It is doable.
I have 18 mbs upgrade and 980 mbs download... yet when I go live and my bitrate is at 6k and my stream output is set to 1080p it says that my kbs is from 0-4k and my stream is extremely choppy. Any help?
so this is what I'm using but I'm not sure if I'm reading it correctly if I'd be able to have it both work as !quote would pick a random line and !quote 13 would pick line 13 of the pastebin
You can use this way:
${customapi.http://api.thefyrewire.com/twitch/pastebin/PASTEBIN_ID?index=${1|-}}
If you type !quote 10, it will return the 10th line. However, you if just type !quote, it will return a random line.
Perfect! Thank you
Sorry, I'm big dumb. So, you said I should remove the if and else statement in the onWidgetUpload, which I did. but then it loses the progress of the donations from before. So you gave me the SE_API page. What kind of syntax should I use in the onWidgetUpload so I can keep the donations where they are at and have the next stream load the goal at the same value? I was looking in the link and I didn't see anything about how to get the tips from the last stream. Thank you.
So i have done browser source widgets before, but my current customer wanted it done in stream elements so far its been pretty straight forward but..
1: how do I actually share the widget with my customer?
2: how do i tell the widget what channel too listen to(or does it do so automatically)
Give them the files/code and they’ll copy/paste it themselves into a custom widget in their own overlay. Also yup, it does so automatically
I just stumbled upon this. is something like this "daily" command possible? afaik there is no addpoints variable (I know about the default addpoints command, but you can't really like customize it)
my initial idea was, making random events on a timer, who chooses a random chatter that either loses or gains Loyalty points. kinda like those event cards from monopoly.
like f.e.:
$(random.chatter) you inherit ${addpoints.#} $(pointsname)!
But also a daily would be cool:
$(sender) does chores and gets $(addpoints.#) from Papaturtle Noctshell!
cool down you can probably easily adjust to be long enough to go past your streaming time so it be a 1 time per stream thing
if this yisnt possible! uhm...
dear Streamelements-kun? 
C-can you make $(addpoints.#) and $(removepoints.#)
🥺👉👈
I'll be a good Lil turtle, I swear, uwu!

so ive been trying to fix this for a second now and i kinda need help is there an easy way i can have the text shrink so it doesn't overlap with the other stuff or have everything else move so the text can show
if that makes sense
would you mind to share the html and css code?
@low plank, posting multiple links will result in not being able to post again.
can someone help me with a widget?
i'm trying to add a tip goal. however i can't find a way to add a starting amount as there's already been some tips sent towards the goal. i can only add the total goal.
Hey guys, new to learning the whole custom widget coding scene. Where would be best place to start learning the code required to link Facebook Gaming to drive the widgets?
read the entire thing but that section contains the stuff specifically for facebook
cheers, I'll have a browse
Oh its using svg. Gonna need the js code as well
okay
my followers still dont show. My subcribers, cheers and everything else works not prob! So i dont know what im doing wrong i did everything you told me to do 🥲
have you recently changed your name on twitch?
jk i figure it out im done but there was another problem with the hype train when it hits 0 the number of subs doesn't revert to zero sooo idk
I've made a custom widget, and I've got about 3 dozen people I want to share it with. How do I share it with just those people? It seems like I can submit it for review and become a code guru and all that, but I'm not interested in any of that; it's a lot of trouble for something hardly anyone will be interested in. But on the other hand, it's also going to be really inconvenient to walk 30+ people through how/where to copy/paste the code.
It looks like there used to be "share" links, but those seem to be gone now.
@bronze ferry unfortunately you've more or less put down how it is. It's either Code Guru or spoonfeeding.
Well that's inconvenient. Guess I'll just set up a micro AWS server, seeing as the code's already 80% of the way to a webpage, anyway. Thanks!
How familiar are you with codepen?
Not a bad idea. 🤔
And include an image/GIF showing instructions 
Hello, good night. Does anyone know how I can create other sub categories for my channel?
Currently only group 1 appears to buy...
Greetings! Is there a way, programmatically, using the API, to enable/disable the 'chatalerts > follow > enabled' (under modules) variable? Something simple like an authenticated REST call would be ideal.
Tentatively I'd say it's a no with decent certainty.
Not sure if in here is the right place but I'll give it a shot otherwise let me know where I should put this.
I just started streaming again after a long time and to be honest I can't find out exactly where to start off with setting up a nice stream.
If someone would be willing to help that would be great.
While this is not possible with SE default command, you can use https://jebaited.net for that
1 - Go to https://jebaited.net
2 - Login with you SE account
3 - Go to API Tokens
4 - In the description type "Adding points to users" or something you want.
5 - In the "Scopes button" (where it says "None selected"), click on it and select "addpoints"
6 - Click on Add Token
7 - Your token will be shown below, in "Current tokens" (keep it private). Click on the green button on the right and you will see the code for that scope.
8 - You can create a command / timer on SE using customapi variable for that
${customapi.https://api.jebaited.net/addPoints/YOUR_TOKEN/${random.chatter}/POINTS_AMOUNT}
If you are going to create a command, remember to check the option "Hide command from public pages"
thank you so much! that's awesome, doing it right now!
quick additional question, i will try it! but maybe before I do I can get confirmation from you.
can I have 2 customapi variables in 1 command?
again thank you! 
Yes, you can... The only thing is the command will take more time to to run, but you can, no worries
yea it's suppose to be like a "every 30 minutes" thing!
just have to maybe find a way to work around or implement the "added # points to user Username" to the whole spiel!
wish I could turn points into my currency and maybe delete the extra user in there

Is there a way to view and manage a quote log? I have quite a few that I'd like to remove and so far I can only do that by painstakingly going through them whilst live.
Is there any way to hide the top-bar in the popout window via url parameters or does it have to manually be removed in a local html?
No option via URL parameters as far as I know. I would go with CSS display: none for that
I don't know the IDs of each HTML element, but based on the code, when the trainCount is 0, you set the width attribute to the ID "progress" to 0. However, all the other "#progress" are commented, so I believe it isn't the element you have to change. Maybe is it #train? I'm not sure (I'm not a good front end guy 😅 )
unfortunately not!
I recommend keeping a list somewhere in a seperate discord channel or making a pastebin.
Ah that's a real shame, thank you for getting back to me
I found an custom api, which sounded promising. which had a few extra features. but I couldn't get it to work. so I think it's outdated. :(
you're welcome!
Hi, can I get the market stock information of any user? with API
Hello guys please help me, when I press the streamlabs "IMPORT NOW" button it says "No Scene Collections are available for import".
did anyone ever figure this out?
Yes, two messages below that one
Yeah that’s been working great for the most part. The only issue I’ve ran into is whenever it’s gifted subs, it adds 1 extra. So if someone gifts 5 it counts 6 on the counter
Get rid of all the stuff after adjustment
nevermind i just changed "month" to "session" and that worked great
yeah prolly like a month ago before i started streaming
and thanks for the follow gang lol
i had obs up but wasnt streaming it scared the ham&cheese outta me 🤣
Hi, I have a custom sub goal widget, and I'd like to know if it's possible to add sound alerts in increments to goal progress.
Like a specific sound for 25%, 50% , 75% and completion.
Does anyone know how to change the Paypal account that is linked to your Stream Elements because I linked the wrong one and don't know how to change it?
yup, its possible
i think its best to submit a ticket for your issue:
https://streamelements.com/contact
Thanks but the problem's been resolved now :)
good to hear!
Okay, now how? xD
share js code
do you want different audio for each percent milestone?
I would like it, yeah. 3 different milestones.
try this and tell me if it works
"audioFile25": {
"type": "sound-input",
"label": "25% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume25": {
"type": "slider",
"label": "25% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile50": {
"type": "sound-input",
"label": "50% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume50": {
"type": "slider",
"label": "50% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile75": {
"type": "sound-input",
"label": "75% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume75": {
"type": "slider",
"label": "75% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile100": {
"type": "sound-input",
"label": "100% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume100": {
"type": "slider",
"label": "100% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},```
also in your fields, make a new line after line 1 and paste this in
is anyone available to help my alerts play twice ?? how can i fix
Idk if I was supposed to replace the entire coding with what you wrote, but it gives me this
If you have OBS running... That's why. You hear it twice if SE and OBS are opened.
i muted the obs studio and could still hear it twice
Last time this happened, I had two overlays that did hte same thing, so it played twice.
you pasted it in the html
Can we pretend it didn't happen?

oops, forgot to group the volume sliders, paste this new one in
It APPEARS to be working, but when I change the goal, it doesn't reflect and stays at 0
seems like a widget that was originally intended for streamlabs, not se
seeing a few variables like obj.detail.amount.current that dont exist (atleast i havent seen) in se
i havent modified anything that should brick the widget either 
hit f12 and check if there are any errors in the console while emulating an event
Can I just not add
" "audioFile25": {
"type": "sound-input",
"label": "25% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume25": {
"type": "slider",
"label": "25% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile50": {
"type": "sound-input",
"label": "50% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume50": {
"type": "slider",
"label": "50% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile75": {
"type": "sound-input",
"label": "75% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume75": {
"type": "slider",
"label": "75% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"audioFile100": {
"type": "sound-input",
"label": "100% Milestone Audio",
"group": "Sound Alerts"
},
"audioVolume100": {
"type": "slider",
"label": "100% Milestone Volume",
"group": "Sound Alerts"
"value": 50,
"min": 0,
"max": 100,
"step": 1
},"
no, you actually need those to input the audio files
(the volume sliders are also there for obv reasons)
So, do I just add the code you said over the one that was there, or completely replace it?
my tip progress keeps changing .. someone will donate 20$ and it will show the 20$ on progress, but then when someone donates like 10$ itll show 10$ not $30
Normally you would append the code to the existing JSON block (makes example-wise also sense as it ends with an ,).
So you paste it inside the first level of curly brackets.
{
"someOriginalField": {
"type": "text",
"label": "bla",
"value": ""
},
...
"audioVolume100": {
"type": "slider",
"label": "100% Milestone Volume",
"group": "Sound Alerts",
"value": 50,
"min": 0,
"max": 100,
"step": 1
}
}
If you paste it to the end, make sure you get rid of the , after the very last level 2 curly bracket.
There also seem to be some syntactical errors in the code you've posted:
"audioVolume100": {
"type": "slider",
"label": "100% Milestone Volume",
"group": "Sound Alerts" // missing ',' (is only valid when last item of the list)
"value": 50,
"min": 0,
"max": 100,
"step": 1
}," // orphaned quotation mark
If it isn't an orphaned quotation mark, but you wanted to paste the whole code in quotation marks, I would suggest using an ``` ... ``` block for that.
https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline- ('Code Blocks' section)
Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to d...
Are you using a custom tip progress widget? Can you show it to us?
I am using the tip goal widget
Is this happening on real life or during the emulate option?
During the emulate it is normal to do this kind of bug (it shouldn't, but...), however, it is expected to work in real life, I just tested here with a tip
Emulate. I was changing my song so I was testing the alert to make sure it was loud enough
Yeah, that emulate thing has this bug for some time, if I'm not mistaken. I will report it to the devs.
But it works in real life, don't worry 🙂
Thank you I appreciate it!
hey, dunno whether it's the proper channel, but what I wanted to achieve is to get Discord's StreamKit displayed in SE. They have instructions for OBS, but can I embed it directly in SE theme?
I don't know what you said there :/
Well, one option would be adding it as an iframe, but the discord widget itself blocks that. So it is better to stick with a separated browser source on OBS
@limber canyon your widget is meant for StreamLabs, it wont work StreamElements
we cant really help you in regards to modifying (or general support of) your widget here
I've been using it in SE for a few months no issues. I just cannot add the function I want to it apparently :/ It's from NoD, using their SE quick install.
It's okay, thanks anyways! 🙂
Not exactly. It's built for SL, but we use a wrapper to make it funtional for SE
is there seriously no way of sharing a widget without publicly releasing it ? (copy paste not included)
There is not.
Hey did you fix your prolem ? pretty sure i know what the issueis
god thats anyoing, you know if its something they are working on?
I joined this Discord specifically to report this issue right here.
Well, you can apply to have the option to share your overlay using a link
One-Click Overlay Sharing Application
Use this link to submit an application: https://strms.net/shareoverlay_request
But the link will not be private, so if you send the link to a person and that person sends it to anyone else, they will have access to install the overlay as well
this is incorrect. groups are missing ,
whew. found all kind of little mistakes in the code posted.
this is how i would personally do it. rather than trying to grab percentages
Can you code in SE with Python?
I'd check but I'm on my work computer, they blocked Twitch.
And since I login to SE with Twitch...
Overlays in SE are HTML, CSS and JS, so no Python support.
But if you want to create a program that make API calls, you can use any language you want. SE uses REST API for those and delivers the results in JSON format
Hi there, so I recently switched my donations to go through SE rather than Streamlabs for a bunch of reasons but now many of my widgets are obviously busted cause they reference the streamlabs api but I have no idea how to recode them to make them work with Streamelements. This is for my donation goal bar and a recent events widget. I was wondering if anyone could help me out? I just want my custom CSS to work and don't really know what to look for when updating stuff (just starting with learning how to code)
I can post my code here or if someone would be willing to DM me and help me out there that would be awesome
Can I get some help with SE_API? I'm trying to use it to get my total donations from the previous session so that onWidgetLoad, my goals will be at that amount. I just don't know the syntax for getting the tips from the previous stream. I know it's something like this but I'm not sure what all I need to do. SE_API.store.set('keyName', obj);
Maybe this example can help you:
#dev-chat message
In your case ...
... the SE_API.store.set("someUniqueID", {k: yourVal}) part goes in the onEventReceived callback and ...
... the SE_API.store.get("someUniqueID") part goes in the onWidgetLoad callback (returns a Promise object).
if (goal_state.value < goal_state.goal) {
goal_state.value = obj.detail.session.data["tip-goal"]["amount"];
} else {
goal_state.value = 0;
}
Could I do something like this to achieve the same goal? Or would API be easier?
hi i got a message back from bot and it says how they can help me but i don't know where to write back
@wicked mango whats the issue
where do I answer?
this sounds like a good solution too, you'll be able to reset Tip Goal progress as wanted, otherwise it will increase from a stream to the next
What does happen when you click on the + button > Alerts > AlertBox?
So, the only problem is that this doesn't work. When it loads in StreamElements, it fills up to the tip total amount and then will reset if it goes over, starting at 0. Any ideas how I can tweak that a bit?
Help! My ${user} variable isn't working in my custom command. It only displays the actual variable and not the username.
Anyone know if it's possible to use counter variables in custom api commands, wanna do some math based on two counters
Hey! õ/
I would like to use SE api in the overlay on multiple channels. Can I get JWT key with a variable or function? So I could share the overlay without sharing the channel key and editors don't see the key in the code.
Can someone help me? I am trying to enable the magic 8 ball command and the queue command. But everytime I enable it and then save it.. it gets disabled.... Why won't the commands update when I change them....? And how do I make it so the commands stay enabled....
So the commands are enabled now. Does my stream chat need to be active for these settings to save? Also... New question... I can't for the life of me find the viewers queue module? Like where is it? I only have chat alerts 8ball and twitter modules... How do I get more???
So, I guess what I'm trying to go for is for the goals to keep of all donations from every session until the goal is met. And then when it resets to just go back to 0$ and start over. Should I use SE_API to keep track of all sessions' donations until the goal is met? And just have the onWidgetLoad do SE_API.store.get function to get the total progress thus far? Sorry, I'm not trying to be annoying, haha.
@cinder yacht to keep your goals persisting during sessions use:
window.addEventListener('onSessionUpdate', function (obj) { const data = obj.detail.session; const tipGoal = data["tip-goal"]["amount"] //fancy stuff here });
documentation: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
To be able to edit the "Goal Amount" from your tip goal you have to go to your SE Dashboard -> Activity Feed -> Widget Data -> Goals -> Edit the Tip goal progress field
It is possible.
For example this https://api.mathjs.org/ based command should print "value - 1" of another counter:
$(customapi.http://api.mathjs.org/v4/?expr=${getcount test_count1}-1)
Hi, how long do applications usually take to be approved? 
Is the only way to share overlays by applying in here? I made an alertbox I want to distribute for free but i feel like it's such a small project compared to other stuff. Am i still allowed to apply to be a code guru?
shoot me a DM with the name of the application and when you did it. I will check for you the stage that is at
Hi Hex, yes the only way is to apply here. Does not matter if it is a small thing we will still review it 😄
The link to apply and send submit the widget is on the channel description
Thank you!!
Oh wait another question. Because it's an alert box it's built with the default alertbox template, so it has different code for each type of alert. Do i need to pull it all out and make it self-contained to submit it?
that would be better as we can check everything in one go, you could also add it to a github the way it is and add the github link on the notes \ comments
Okay. Do you happen to have any resources or guides on how to do that? haha
(if anyone has any experience taking an alert-box widget and making it full custom i would easily pay u consultation fees for your experience!!)
Can somebody help me please
@vernal flower ⤵️
Welcome to the helpdesk! Please let us know how we can assist you today and a support volunteer or staff member will assist you as soon as they are available. Thank you for your patience.
i have not received my Payout from the raid shadow legends sponsorship i did last month. i have logged on and says it is schedules to be in my Paypal today. Could some give me an estimated time of when it should be in my account?
@vernal flower ⤵️
If you need help with your campaign or sponsorship please use our form here: https://strms.net/sesp_help Thank you.
form submitted
So I got a question as far as creation of commands goes… im trying to make a command that will consistently respond and display the last message of the person that called it not including calling the command. With User.LastMessage. It’s a 50/50 shot on whether or not it’s the message calling the command or the actual last message. Any ideas?
Ok so I'm not sure where to ask this question so I'm asking it here.
A streamer I mod for got a partnership with either you guys or a game called Suspects Mystery Mansion and we where asked to click a link which lead to a QR code that we had to scan in order for her to get credit and she hasn't gotten any credit for anyone of us scanning her code.
@past laurel ⤵️
If you need help with your campaign or sponsorship please use our form here: https://strms.net/sesp_help Thank you.
Thank You
Right, but the problem is, is that I have four goals that are all different amounts. So I was working with someone else and we changed onSessionUpdate to onEventReceived. And the goal now successfully resets to 0$ when the goal is reached. But now I don't know how to get the goal to keep track of the donations made during the last session so the goal can gain progress over multiple streams AND reset when it is reached.
This is what I have so far:
window.addEventListener('onWidgetLoad', function(obj) {
// Get Current Goal Value
if (goal_state.value < goal_state.goal) {
goal_state.value = obj.detail.session.data["tip-total"]["amount"];
} else {
goal_state.value = 0;
}
// Assign Currency
currency = obj.detail.currency;
// Assign Field Data
fd = obj.detail.fieldData;
// Update Goal
let data = calcData();
animate_goal(data.percentage, data.value);
});
// On Session Update
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const event = obj.detail.event;
if (listener == 'tip-latest'){
goal_state.value += event.amount;
let data = calcData();
animate_goal(data.percentage, data.value);
}
// Update Goal
});
hello, can you add https://fonts.google.com/specimen/Finlandica to be displayed on SE? ATM it is broken :(
Anyone got any ideas? Looking for some help with this…
on this case you could use the SE_API.store to save the goal-total and retrieve it when you load the widget https://github.com/StreamElements/widgets/blob/master/CustomCode.md#se-api
a second way would be to have your own custom api server with a db integration just to save and and fetch the goal value
Yeah I already told him about SE_API.store, hise problem is all about code knowledge but there isn't much to do about it. He knows what to use in order to achieve its goal, now he gotta try and try again until it works
Hey! I'm wondering if there is a method to hide an image on an overlay using chat commands? (something basic like !show or !hide) - even if it just simply toggles the visibility is good enough
catch the message in chat using onEventReceived looking for type: message, then you can easily hide the image using jquery.
something along these lines? window.addEventListener('onEventReceived', function (obj) { if (obj.detail.listener == 'message' && obj.detail.event.message == '!show'){ $("#img").show(); } if (obj.detail.listener == 'message' && obj.detail.event.message == '!hide'){ $("#img").hide(); } });
it doesn't seem to work, I must be missing something
something like this
`window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
const data = obj.detail.event.data;
if (listener === 'message' && data.text == '!show'){
$("#img").show();
}
if (listener === 'message' && data.text == '!hide'){
$("#img").hide();
}
});`
of course you would have to do checks for it to be allowed only for mods or the broadcaster to use the command. you could do that checking for the broadcaster or mod tag inside the data received
Ahh I see thanks!
Have I overcomplicated this? Just trying to set it up so that I have the option for mods/broadcasters or even vips to use
let userState = {
'mod': parseInt(data.tags.mod),
'vip': (data.tags.badges.indexOf("vip") !== -1),
'broadcaster': (user === userOptions['channelName'])
};
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
const data = obj.detail.event.data;
if ((userState.mod && userOptions['managePermissions'] === 'mods') || userState.broadcaster) {
if (listener === 'message' && data.text == '!show'){
$("#img").show();
}
if (listener === 'message' && data.text == '!hide'){
$("#img").hide();
}
};
});```
you can probably tell coding isn't my strongest point 😂
This variable is meant to be used for another person, not for the one who ran it. In your case, you can type !test johny123 and you will get the last message from johny123.
But if you use to get your last message, the expected is that you will always see **!test **
There are also "Reboot0s Widget Tools", which simplify some of the work:
https://reboot0-de.github.io/se-tools/index.html
https://reboot0-de.github.io/se-tools/tutorial-ChatMessage.html
Documentation for the StreamElements widget tools
Documentation for the StreamElements widget tools
Is there any ETA for OAuth2 API service submission?
I filled https://form.asana.com/?k=pWDtXOPVzh6AtBJQ7uTGgw&d=224349692947415 this form on Sept 21 and still no response.
I tried implementing this reboot tool to check if the user has "mod" role, if (listener === 'message' && data.text == '!show' && message.hasRole("mod")){ $("#img").show(); } I've probably used it incorrectly? Are there any other widgets that use the reboot tool and roles that I could take a look at so I can try and implement it myself?
Did you include the script in the HTML tab?
<script defer src="https://reboot0.de/hosted/js/se-tools.min.js"></script>
using the library woud look like this
`let userOptions = {};
let userState = {};
function onMessage({text, roles})
{
userState = roles
// class property
if ((userState.moderator && userOptions['managePermissions'] === 'mods') || userState.broadcaster) {
if (text == '!show'){
$("#img").show();
if (data.text == '!hide'){
$("#img").hide();
}
};
`
function onMessage(msg) {
if (msg.isModerator()) {
const txt = msg.text.toLowerCase();
if (txt === "!show") {
$("#img").show();
} else if (txt === "!hide") {
$("#img").hide();
}
}
}
should work
function onMessage(chatMessage){
console.log(chatMessage.renderedText);
if (chatMessage.text == '!show' && chatMessage.hasRole("mod")){
$("#img").show();
}
}```
Oh, nevermind 😄
pick your cherry
😅
c4ldas is the most clean one but all of them works @sacred vine
@real furnace don't know if you know, but if you want to send your code in colour, put the code into three backticks (```) and add a "js" right after the first of them
` `` js
your code here
` ``
neat! I was not aware of that 😄 Thank you
Three backticks before and three backticks after... It's kinda hard to create an example here 😄
It also works for HTML, JSON, CSS, etc etc etc
But I didn’t look at the screen cap. Regardless is there a way I can make that command that I’m looking for?
Hey, I need help with my custom alerts. I want to show how many the user gifted. without having the alert spas out with individual names. Is it possible? I've searched quite a bit.
Good morning! Quick question on a custom command to trigger an ad on Twitch and to post a reply in chat as well. Is that possible?
just create a variation
did you try /commercial 15 "text" ?
not sure if it works! that there can be a text after the /commercial and I can't test it
I'm using my own code. A small area that updates a number dynamically. I want the amount of subs the user has gifted.
you can isolate just the number with a variation
with [amount], and then put that wherever you need
So what I tried to do, was set up commands to reply to the initial command to twitch to run an add.
I thought if I could get the bot to send the command to run the ad, and then respond with another string, it would work, but it's failed.
Didn't know if there was a different way.
The bot responds to the initial command, but twitch isn't taking the first response and running the ad.
that won't work, the bot can't answer itself!
I think it just did in my chat. Let me try again and send a snip.
okay
command sent and response.
So the !ad30 command is supposed to trigger the bot to say "/commercial 30", and then respond with the !adr30 command, which tells chat that I'm taking a quick 30 second break, blah blah blah.
But I don't think Twitch is responding to the /commercial 30 sent by the bot, even though it's a mod.
it should tho, in my expierence
I'll have to fully test it when I'm live again, but I just wanted to ask and see if I had any holes in my theory or not.
So basically, yea /commercial works with the bot, but the bot responding to itself does not. :(
not sure if you can make a work around with an api or so
The command sequence I have set up to get the bot to respond to itself is right here.
If I have the response trigger to look for the first command, it works.
At least it is right now.
I have it listed as an alias. 🙂
We'll see. Thanks for the feedback and help! I appreciate it.
I thought you meant the response of the first command triggers the next one, sry
let's hope! :)
you're good. I probably did a really bad job of explaining. I'm still learning.
The bot needs to be added as editor on Twitch to be able to run ad.
It won't work. The command will either trigger the /commercial command or the text message, never both of them.
One suggestion is adding another bot and use it to send a message using the same command
Streamelements:
!ad = /commercial 30
Another bot:
!ad = We are running a quick commercial, bla bla bla
You can remove all permissions and configurations on the second bot and have only the !ad available
Unfortunately, no. That would need to have a variable for something like ${user.secondLastMessage}, which does not exist.
Oh ok thanks
So you don't think it will work if I use the first command to trigger the commercial, and have a second command to look for the first command as an alias to say the break text?
Also, I put the bot role to editor, as well as mod now. Thank you for that tip.
Exactly, it will not trigger two responses. 😦
I can't test it fully, since I'm not live, but when I do the first command I had in the screenshot, it responds with the second command response.
So you think that it's just skipping the first one altogether then.
You can create a test with two different commands, for example. First command will send "message 1" and the other will send "message 2". You will see that only the first one or the second one will work. That is expected on SE, it will not trigger two responses with only one command.
Also, when you add a keyword in a command, it will have preference above everything (even if you have a command with the same word).
In your case, you added the word !ad30 as a keyword on !adr30 command. So every time you write !ad30, the !adr30 response will run, but not the original !ad30
This "non-2-responses" behaviour is to avoid loop messages from SE on chat which could it to be blocked from posting on Twitch chat (or any other livestream service chat)
One more thing... If you try to run a commercial while offline, the bot will respond "failed to run commercial, channel is offline". If that is not appearing for you, it means the command didn't run.
@severe shell ... wow. That is one heck of a detailed explanation and just want to thank you for breaking it down for me. Great information to have. I'll see what I can do to make something work. 🙂
I have a follow up question... if I use the twitch command for commercials, will stream elements respond to it?
If I put it as a custom command?
I think I know the answer... it won't, because twitch gets rid of the command as soon as I hit enter...
Hi! I had a quick question regarding the "Income Report" section on the SE website! It seems like the "Download" button is empty and isn't leading me anywhere. Is there a way to download the report otherwise? Wasn't sure where to ask this question. Let me know if there's a better channel to ask the question! 🙂 Appreciate the help ❤️
@real furnace @opaque wasp Sorry for running you guys around, I appreciate the help a lot. JS isn't my strong point, but I figured out a simple solution of when the goal is reached and it resets, I put goal_state.value = goal_state.value % goal_state.goal, therefore giving me the remainder left over and I did the same for onWidgetLoad
hello I have an issue with streamelements website I can login but when it directs me to my dashboard my screen stays blank and it won't load. I tried it in a private browser and it works is there a reason why it doesn't work for me?
What platform are you using to login?
Twitch
Hello, just wondering if there might be a way to do a custom accountage command? The streamer I'm helping has some ideas to make the command fit with an in joke of that community. If there's an API I could call to with ${customapi.link-to-api.com} that would work. Any ideas or suggestions very welcome, I like tinkering with custom commands
Outright custom? No. You'd have to host your own endpoint for that.
Hmm, ok...so there's no way to get this from Twitch API? Sorry, not the most knowledgeable programmer, I mainly dabble in SQL for a living. I understand an endpoint as being a custom website that would do some of the handling
It's definitely doable.
It's just that you'd need to parse the response yourself if you want full customization.
Any suggestions where I could get the source info from Twitch? Parsing is very easy for me, most of my job is parsing data from one company's SAP to another one's
Good place for that https://discord.gg/twitchdev
Ah ok, appreciate it!
If you want to just make a custom accountage response, you could use $(customapi.https://decapi.me/twitch/accountage/$(user)?precision=4), and if you want to make a bunch of different random possible responses, there's a pastebin customapi floating around as well
Hey thank you so much! A Twitch volunteer dev had mentioned this as well!
@mint barn, posting multiple links will result in not being able to post again.
Sorry I didnt know where else to ask this - Can you Edit "Timers" via the command line?
@burnt summit ⤵️
To add your overlays to OBS, add a new browser source in your scene. Paste your overlay URL in the browser source properties, set the dimensions to 1920x1080 (unless you changed them on the website) and check Shutdown source when not visible as shown in this GIF: https://imgur.com/a/2JhJD0S
I don't believe so.
damn - cool, thank you
anyone able to point me in the right direction, i want the ability to upload a sound file in my custom widget
I think you're looking for the "sound-input" field (should be added to the JSON structure in the "FIELDS"-Tab):
{
...
"soundFileURL": {
"type": "sound-input",
"label": "Audio:",
"multiple": false
},
...
}
yes excactly, cant seem to get any play method to work with the url tho, is there a specific way ? if i manualy input the url it works, if i use the field data it dosent work
it looks like the issue is im not able to read the value of "soundfileURL" in the js side of things, but i can read it fine if it use it as a value in the html side of things
Maybe an example helps (it uses the sound-input field from above):
let audioUrl;
function playSound(url, normalizedVol = 1) {
if (url) {
const sfx = new Audio(url);
sfx.volume = normalizedVol; // Volume is a number between 0 and 1.
sfx.play();
}
}
window.addEventListener('onWidgetLoad', function (obj) {
const fieldData = obj.detail.fieldData;
// Store value of field for later use.
audioUrl = fieldData.soundFileURL;
});
window.addEventListener('onEventReceived', function (obj) {
if (obj.detail.listener !== 'message') return;
const data = obj.detail.event.data;
const msg = data.text.toLowerCase();
// Ignore any event that isn't the chat message '!audio'.
if (msg !== "!audio") return;
playSound(audioUrl);
// Using a field's value directly does also work, but isn't very readable.
//playSound("{{soundFileURL}}");
});
Here is a example of how i normally do it.
"alertSound": {
"label": "Follower - Alert Sound",
"type": "sound-input",
"group": "Alert Sound Options",
"value": ""
},
"alertVolume": {
"label": "Alert Volume",
"type": "slider",
"name": "",
"value": 15,
"max": 100,
"min": 0,
"steps": 1,
"group": "Alert Sound Options"
}
var alert = new Audio();
alert.src = fieldData.alertSound;
alert.volume = fieldData.alertVolume * .01;
or
var alert = new Audio();
alert.src = {alertSound};
alert.volume = {alertVolume} * .01;
@broken coyote @pulsar willow got it working, thank you boiss 🙏
Is it possible to add something akin to an if statement to a command?
@everyone whenever my stream elements opens the page gets frozen and I can’t scroll or minimize the window…Stuck with the start stream button any club how to fix
Do you have an example of what you're trying to do?
So for one example, we have a silly "disqualified" command.
/me @${touser} is ${random.0-100}% disqualified.
I would like to add a custom response for 0, 69, 100 etc.
#dev-chat Hey does anyone know why Im getting this error from the 'InstaPhoto' widget from the Stream Elements Git Hub its my first time messing with some custom widgets so Im kinda at a lost
Access to XMLHttpRequest at 'instagram url' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
(this is just one example)
It is possible with a customapi! You need to make your responses on a paste on Pastebin, where each conditional is structured like this: :{start-end}
:{0-30} $(1) is $(ranges.1)% disqualified. Oh well.
:{30-68} $(1) is $(ranges.1)% disqualified. Rough.
:{69-69} $(1) is $(ranges.1)% disqualified. NICE.
:{70-100} $(1) is $(ranges.1)% disqualified. Massive oof.
With a command response like this... (replace the pastebin ID with your own) (note that the random SE variable is minimum inclusive, maximum exclusive, so for random numbers between 0-100, including 100, the range should actually be 0-101 in the variable)
$(customapi.https://api.thefyrewire.com/twitch/pastebin/XGuKKCJC?range=$(random.0-101)&target=$(1:|sender))
Hope that helps a bit!
Oh wow thats awesome! Thank you! I'll give that a go
Let me know if you get stuck or have any questions!
This is a block from Instagram, nothing can be done here, unfortunately 😦
Maybe you can create an issue for that on github
is it possible to remove the bit icon from the cheer goal bar? I set the text to transparent...
Yes, try this on your OBS:
#helpdesk-twitch message
shut the front door
ive been stuck on this for a couple days lol
thank you
it hid some other stuff that i had.. so i changed it to img {visibility: hidden;} and it only hid the bit icon
Yeah, that code is not very specific, it will hide everything that is an image or text in that overlay. In your case you can also use this:
se-widget-cheer-goal .goal-wrap p {visibility: hidden;}
This will hide the text and image inside the bar
thank you so much ❤️
did you ever figure this out?
Yes, I did that in php
Hi, I would like to make a my custom integration with streamelements, for it I need oauth2 creds, I sent form with all information
And I have questions, which types of oauth can I use?
Only oauth code?
ok cool, just calling the contests api right?
Yes
Hello. I have a script that executes a shout-out message from the StreamElements bot in Twitch chat.
The message itself, let's say !so stonegrasp, is correctly sent to the twitch chat, however, it seems that since it's from the StreamElements account it is not actually triggering the !so command.
Are there ways around this? Lots of questions about this about some options I'm thinking about:
1 - instead of the command showing up in chat, can the command be sent through the API and the result be printed to the chat instead?
2 - Would it be easier to just write the shout-out text in my script? If so, I'd need to find the {last-game-played} info for that particular user through API and I've never really done that before... is that possible?
3 - Could I have the script set up to send the command from my own personal twitch account? I don't think I've ever done that, however, I see the functionality built into StreamLabs (which I do NOT want to use).
4 - I guess if no other options are available, my only recourse would be to either keep typing in the shout-outs / commands or have another / different bot listen for those commands and do it's own shout-outs.... I'd prefer to keep everything in SE if possible though...
A little confused on your process here. Where is this "script" at and how are you sending the !so command?
So... this is the script... super basic.
This is it in execution... when the bot does it, the command is ignored since it was done by itself, however, if I type the command it works fine.
right, it won't listen to itself
I could just write my own shout-out text and have that put in, however, I don't know how to show the Last Playing info via the API... I think that'd be the easiest / quickest solution.
Maybe I missed it in the API documents, but I didn't see it.
Yeah, I don't think you can get the game info from the streamelements api
I've always used the twitch api to do it https://dev.twitch.tv/docs/api/reference#get-channel-information
Or... You can use decapi.me API, which is simpler as it doesn't need authorization keys, etc etc etc. This is the endpoint:
https://decapi.me/twitch/game/${channel}
oooo thank you so much!
This option works WAY better than needing to go through the Twitch API. Again, thank you 100000%. XD
so i need help when i try and get the latest cheer it breaks everything if anyone can help i would really appreciate
in your onwidgetload event listener you are calling an update function but i do not see one called just update
otherwise everything else looks good to me. any console output with errors?
Hello. My friend try to give me access to dashboard, but when I click to link give me this error
can you help me ?
Hey guys! Is that possible to make a command with keyword "to"? I added "to" as keyword, alias as well but this give no response. I would like to make currency exchanger. I would like to use this: mywebsite.com/index.php?something=$user.lastmessage
And the message is: 50 usd to eur
Its working manually, but from chat its not
an alias still needs a Prefix!
advanced settings, keyword: "to"
maybe the problem is with the website URL, because if it is faulty it can happen that there will be no response
Hi, I would like to make a my custom integration with streamelements, for it I need oauth2 creds, I sent form with all information
And I have questions, which types of oauth grant types can I use?
Only oauth code?
Not sure where to ask this, so I'll ask here. Where can I find the streamelements branding?
Hi all, can you please tell me how to configure in an existing alert option to work with Boosty. Or for example I have a css widget loaded in streamlements, can I somehow save it as a gif file?
@stark heart ⤵️
Please create a support ticket by filling out the form here: https://streamelements.com/contact This will ensure staff are able to track and resolve your issue in a timely manner.
can someone answer my question?
I am not aware of a place where those are available.
I'm guessing you're talking about logos, banners, colors, etc?
I used this but nothing happen. If i put my chat to link its working
Can u check dm please? @little pewter
Hey dev support... how would we start making Stream Elements widgets available on our React client web app ? Is there a manual or best place to start ?
You can find instructions on this channel description. Overlay Editor Documentation.
It uses simple HTML, CSS and JS, but you can use the way you want using libraries you like.
I am working with the StreamElements API, but this - there seems to be a problem. But the JSON argument is called "follower-latest", so well... Is there a way to avoid the - being considered as a control sign?
fcount = JSON.parse(data.follower-total.count)
Did you try with data["follower-total"].count?
It is not an array, so it doesn't work.
The ['string'] doesn't always mean array, it is used for objects when you have symbols that can be confused with math symbols.
"Unexpected token "["..."
welp no
data[ not data.[
I was thinking if it's possible to add the current game to the !quote command. Does anyone have an idea?
You can retrieve it via https://decapi.me/twitch/game/${channel}
Or just ${game}, saves a request to Decicus's servers lol
Is there a way to get the code for an existing widget? The Stream Marathon timer in #widget-share is amazing but doesn't currently support tiltify donations as an option to increase the timer, so I was gonna try and add it myself.
yes you just go to open editor
ah, somehow missed that big and obvious button when I had a quick look
thanks so much!
Damn, doesn't look like there's anything in the api to support Tiltify/Charity donation?
i'm with my account and its same
Hi, I would like to make a my custom integration with streamelements, for it I need oauth2 creds, I sent form with all information
And I have questions, which types of oauth grant types can I use?
Only oauth code?
Can anyone help me please?
But how do I create a custom quote command with this?
Hi, is it possible to add a song to sr with it being the first in the queue or changing the queue order
Hi guys, i'm moving to SE from from SL but i'm having a hard time trying to set up my custom chat that my friend made to me. is there anyone that can help mt to make the HTML and CSS work?
Take a look at the documentation https://dev.streamelements.com/docs/kappa/ZG9jOjE4MDk3Njc-o-auth2
I would be down, feel free to DM me
thanks, already checked, I'm interested in pure server to server integration, can I use client credentials grant type?
I sent form, but I just started my project and don't have logo, site etc:)
hope it will be enough for obtaining credentials
Honestly I don't know how to help you further, I did search for your problem in the server chat and that's the only thing I found..
Maybe is worth mentioning that invite links work just once, so make sure the link you're using hasn't been used by someone else previously.
I'm sorry but I didn't find anything about adding quotes containg API calls to !quote.
Tried both below but didn't get luck.
`!quote add Now playing: $(https://decapi.me/twitch/game/username)
#1: Now playing: $(https://decapi.me/twitch/game/username)
!quote add Now playing: ${game}
#1: Now playing: ${game}`
and i would like to change his appearance
Are there rate limits for the StreamElements API?
I'm making a custom widget that uses the Contests API and since there's no listener that pulls in contest data I'm pinging the API every second. Is this fine?
Hey, not sure where to ask this - is there a devkit for widget development? I'd like to work on some custom widgets, but the development process of editing directly on StreamElements, saving in the editor, and then refreshing the overlay source is incredibly cumbersome.
How does stream elements work new to this
You don't need to refresh the overlay source. Whenever you click Done on the editor it refreshes (only if you made an edit to the code)
Gotcha, I'm assuming the cache clears also? I'm working with the chat API and it appears to be wiping it upon saving
As far as I'm aware there should be no caching at all but idk
How does stream elements work new to this
this is the channel for developers. are you asking a specific question on how to develop custom widgets or use the API?
Both
🕵️ API documentation: https://dev.streamelements.com/docs/kappa
🕵️ API Connection Guides: https://dev.streamelements.com/docs/kappa/docs/OAuth2.md
📄 Overlay Editor documentation https://github.com/StreamElements/widgets/blob/master/CustomCode.md
You should never share personal overlay links, delete it and provide a screenshot/video instead. As far as the edits you want done, I may be able to help you, feel free to DM me
I don't know if websocket send contest notification, but you can try.
As regards the rate limit, I remember something that it depends on the endpoint, you can check the response header
You can use this:
#dev-chat message
Appreciated!
Bit of a long shot, but does anyone know of a simple way to update a widget based on Tiltify donations? I was hoping since there’s built in widgets and integrations that there’d be something in the SE api but so far all the options seem pretty convoluted.
Sorry for bothering; did you find out anything about those events?
I'm not 100% sure but maybe you can catch them via onEventReceived. I tried listening to the test events triggered by *Emulate > Other > Tiltify * but I didn't get luck since the event handler returns a strange event:test object.
emulatingTiltify: true,
event: {
. . .,
type: "tip"
},
listener: "tip-latest"
}```
Hm, thanks! It’s been a few years since I did any JS so I’ll need to read up a bit to figure out how to do that.
I don’t suppose the source code for the built in Tiltify alert widget is available? That’d be a great one to crib from.
Actually I suppose there’s a chance I can just dig for that myself in the overlay page now I think about it
Can anyone direct me to where I can find this? I've looked everywhere I can think of but to no avail.
So I've been playing around, and yeah it seems a bit tricky because the test events for charity donations appear to be handled separately to how the real ones would be.
It seems that normal "tip-latest" events will be fired in the case of a tiltify donation, but... well this is pretty much impossible to test until the campaign is live, which is super annoying.
Is there a way to get in touch with the dev team to seek clarification maybe?
Yeah, spent a bit more time fiddling, and I think I'm properly stuck. I'm not 100% sure how to make a widget respond to Tiltify (or other charity) events, and the documentation is seemingly missing any references to how to make it work.
Any details on what the data structure of a non-emulated Tiltify event looks like would be super appreciated
Hi, I'd like to add the people who raid me to the end credits besides (Credit Roll - by Grot) don/followers/bit/sub. But it only returns me the last person who raid. Anyone have a tip on how to show everyone who raided during the stream?
There use to be a link for that https://strms.net/assets but it's no longer working. Tried googling "streamelements brand assets" and find out that brandfetch . com/streamelements.com has logos, color palette and fonts too; give it a shoot. NB. I would consider asking in another channel too.
Alright
Seems like there isn't a way to directly retrieve current session list of raid and host since obj.detail.session doesn't contain raid-session nor host-session as you could expect. Instead raids/hosts are included into obj.detail.recents that's where the widget scripts is looking for data to show. But recents how would you know that they occured in the current session? Each object contains a field named createdAt that contains a timestamp like "2018-06-11T08:08:33.180Z", you could retrieve stream uptime via https://docs.decapi.me/twitch?endpoint=uptime%2F%3Achannel and do some calculations in order to include just current stream raids/hosts.
@fringe cypress, posting multiple links will result in not being able to post again.
I stopped pursuing this for a bit, but IF what I figured out is accurate, they're "tip" events with "emulatingExtraLife = true". "emulatingTiltify" is for Tiltify and emulatingDonorDrive is for Donordrive, but I haven't committed the time to add it and then test with actual donations.
I just realized your question was answered already, but maybe my screenshot provided some more insight.
Yeah I already find out about emulatingTiltify and stuff, I also forwarded a request to the staff in order to see if we can get some documentation about those events.
I need help
Hey, please don't ask to ask for help just go ahead and describe your question/issue!
sorry, I fixed with the help of the bot, thanks!
Hello, is there a way to get contest events? I am connected to the realtime websocket but I don't get any contest event. I don't know how to get this events on the custom widget overlay neither.
Start reading from this message #dev-chat message, you should find what you're looking for
<#dev-chat message>
This looks like the answer, but I can't make it work. I don't get any event when I emit the subscribe.
socket.on("authenticated", (data) => {
console.log(data);
const { channelId } = data;
console.log("Successfully connected to channel " + channelId);
socket.emit("subscribe", {
room: "contests::" + channelId,
reconnect: true,
});
});
socket.on("contest:state", (data) => {
console.log("CONTEST:STATE", data);
});
socket.on("contest:update", (data) => {
console.log("CONTEST:UPDATE", data);
});
socket.on("contest:winner", (data) => {
console.log("CONTEST:WINNER", data);
});
socket.on("contest:update", (data) => {
console.log("CONTEST:UPDATE", data);
});
This doesn't work for me @opaque wasp .
I don't really know what to tell you, I just did search for you into this channel.
thank you anyway, I'll keep searching
Wait, as far as I've seen in the messages I linked you it should be room: "contests::" + contest_id not room: "contests::" + channel_id.
As you can read in the conversation seems like you must specify the contest_id you wanna listen to.
Here is possible workaround if you want to create a script that listen to current contest #dev-chat message
I think that is the channel_id, but this message <#dev-chat message> was edited to change that and is confusing reading it now xD.
Anyway, I tested both and didn't work any of them.
He got an answer with the wrong room, I don't get anything
<#dev-chat message>
Hi, not sure if this is the right channel, but is there a way to reply to a command in the chat from a custom overlay widget?
Yes. You create an event listener and check if the event is a message. You can look at any of the Shoutout widgets posted in #widget-share for examples.
if you figure this out please let me know, I'm also working on a custom contests overlay widget. right now i'm just pinging the contests api every second so not ideal
ok. I'm doing that too.
I'm sorry, I'm new to the topic, but do I see this right that posting a message is a GET request on an API endpoint? and the API is api.jebaited.net?
Hello,
Is https://realtime.streamelements.com correct socket server address? And can I authenticate to it using my JWT token? I'd like to access events like donation and subscription in my app. While trying to authenticate via JWT I'm getting 400 error.
?? not sure of your question
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
you set up an onEventReceived listener in the JS of the widget and then check if its a message and then do whatever you need with it
With this code I get a null response, it wasn't working but now it works... I don't know why it didn't work before. @inner lagoon
socket.on("authenticated", (data) => {
const { channelId } = data;
console.log("Successfully connected to channel " + channelId);
socket.emit("subscribe", { room: "contests::" + channelId }, (response) => {
console.log(response);
});
});
If I put wrong channel id the response is
{ status: 1, message: 'Invalid room specified' }
Awesome thank you I will try that out!!
I use JWT token to connect to realtime. This is working for me:
const connectWebsocket = async (token) => {
const socket = io("https://realtime.streamelements.com", {
transports: ["websocket"],
});
// Socket connected
socket.on("connect", () => {
socket.emit("authenticate", { method: "jwt", token: token });
});
// Socket is authenticated
socket.on("authenticated", (data) => {
const { channelId } = data;
console.log("Successfully connected to channel " + channelId);
});
...
}
https://dev.streamelements.com/docs/kappa/ZG9jOjYxMzcxNTY-connecting-via-websocket-using-o-auth2
that much is obvious and I know already. My question is how do i sent a response to the chat from the JS code of the custom widget?
taken from the shoutout 2.0 script in #widget-share
const sayMessage = (message) => {
console.log(message);
message = encodeURIComponent(message).replace("%2F", "%252F");
return new Promise(resolve => {
fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
so yes its a GET request
Ok, I already guessed this was the code, I was just surprised as I had expected this API to be a twitch api and not some "random" thing 😄 but i guess this is just me not knowing the "ecosystem" around it
Are promises and fetch() always available in the overlay JS context?
@inner lagoon thanks for the help. I will check it out soon.
I'm not sure who runs that jebaited site but yes you could use a twitch endpoint too. the jebaited site may be something that cdod created, idk
ok, i will check the twitch api docu to see if i find the direct twitch endpoint
ok
also i know there is an emulate function in the overlay editor. is there also a way to emulate messages in the overlay editor?
nope
sad. hm and fetch() is always present? i thought this was a "plain" html website with no pre-defined libs present
fetch is native to JS
oh wow.... it has been too long since i did JS it seems 😄
And another question: the overlay i'm editing has scrolling text for recent followers in it. however, when i save the overlay while it is actively in used via OBS in a live stream, then the scrolling stops in the live stream until my friend the broadcaster restarts OBS and reconnects. is that a known issue or can i somehow work around this in the overlay?
I see a problem here. I added
window.addEventListener('onWidgetLoad', function (obj) {
console.log("field data:", obj.detail.fieldData);
});
But the field token doesn't exist in this object. How do I get the needed token to send the message then?
Could it be that this is old code and it should be obj.detail.channel.apiToken ?
possibly. try it and see
well my friend isn't online right now but i will assume it is and test it next time he is online