#dev-chat
1 messages Β· Page 67 of 1
nah I don't want to create a widget for that. But it seems like the only way, because the customapi response from jebaited.net will also be posted in the chat

you need to send the ${customapi} to your custom API; then have that do the dual commands
I'd have to look but I believe he has a variable to hide that kind of stuff.
Might've just been for his points thing.
i'm not sure if it passes the / along. i know for sure the whispers are removed
π€ that is odd
yep, it all "almost" worked out
?format=empty
thanks for figuring it out with me tho π
Not sure if it'll work with this but Β―\_(γ)_/Β―
is it meant to work with any customapi?
This is jebaited.
not working at all for some reason
well it doesn't matter if it doesn't support slashes lol
${pathescape} perhaps?
I mean jebaited.net responds with 404
no
well, there's no such thing as perfect code
no it's jebaited.net
fair
that is a POST as well so can't be in the customapi
...at least i don't think a custom API can do a POST.
but it works via GET too, except for / at the start
Oh I see you think I didn't tried...
not worth it, btw I have everything fine to make it myself lol
I guess I'm just lazier than you are
hahah. i'm almost done; just need to test
the fastest hands in the entire wild west xD
https://chatbot-api.pjonp.repl.co/api/rouletteto?jbToken=JBTOKEN&user=TARGET *disabled. fork replit below.
btw what is the default timeout duration?
5 minutes
Pretty sure itβs 10
oh; yup. it's 10 minutes
is it just a /timeout user message?
was gonna ask lol
and if you wanna change anything then fork this and make your own π€£ https://replit.com/@pjonp/chatbot-api
also it would be perfect to remove the response at all
I thought you wanted the timeout + response?
work again
no, response is /me from the chat module
?
forked it
you get 1 message from the Module. if you want 2; then API to send the /timeout and follow up with response
you just put ${customapi} to the module message, api does the /timeout
the fetch sends the /timeout user to jebaited to send to chat then the API returns the "you lost" which the chat bot grabs as the expected ${customapi} response and sends that
and the was quick code; so do some testing as needed an use the ENV variables and don't have your token in the actual code
yep ty
imagine being timed out for a second for each point you lose KEKW
so if anyone interested - here's my code for the roulette, it returns the timeout string https://replit.com/@JohnnyM5/chatbot-api#routes/rouletteTo.js thanks legend @elfin arch
@elfin arch btw, thanks for the help earlier! I managed to update my widget to add points automatically
. Just a thought, is it possible to save information in streamelements through a custom widget? similar with how viewer points are saved?
@random comet Sorry for the ping, I'm writing to see if you managed to fix the widget, I write that the game I was trying to get the hours played and current price, in the region of Spain is 7 Days To Die.
@pulsar willow, posting multiple links will result in not being able to post again.
how can i use text to speach in js?
Hello, I have couple of videos of widgets that I want to learn how to make it, can I send the videos here or it's Forbidden?
search for TTS on this channel, you should fint a project from where copy
Hey π
I haven't managed to check for a fix right now, since I have no time π
Hi, I am once again trying to solve a problem, just noticed this channel, the #helpdesk-twitch has not been helpful the past several times but...
How can I program an image to vanish during an event? I have 2 gifs that one is always there as an image object, one is only during follow events. When an event plays they overlap and it's ugly. I want to hide the idle animation while the action animation plays
It sounds to me like the idle animation would need to be displayed using a custom widget, and have custom javascript and css handle the disappear and reappear effect. Sort of the inverse of an alert box.
I can't figure out the event handles in it. I put some in and nothing happened. Eventually I found a tutorial on how to do the coding for an alertbox. It took hours of digging to find that only tutorial that had anything on code. Everything else is setting up and not coding
What did you try exactly
Is there a way to automate stream alert variations? For example if I want 100 variations for sub alerts do I have to do all of them manually?
If you decide to use a Custom Widget, you can listen for events by adding a callback function like this:
Javascript:
window.addEventListener('onEventReceived', function (obj) {
// Filter events for desired ones. In this case: chat messages.
if (obj.detail.listener !== 'message') return;
// Prints a message to the console (F12).
console.log(`message received: ${obj.detail.event.data.text}`);
});
As this is a bit clunky, you might find Reboot0's widget tools very handy.
https://reboot0-de.github.io/se-tools/index.html
To use it, you add the <script>-tag from the above website to your HTML.
After that you can write something like:
Javascript:
function onMessage(msg) {
console.log(`message received: ${msg.text}`);
}
This works the same for all other kinds of events:
https://reboot0-de.github.io/se-tools/tutorial-Events.html
In which way do those variations differ?
just different alert images
Do you use a custom widget or a built-in SE alert widget?
I ask that, because custom widgets can utilize the "multiple" parameter for input fields:
"someVideo": {
"type": "video-input",
"label": "Video:",
"multiple": true
}
That way an array of URLs is returned.
You then could calculate a random index.
Is it possible to check if the streamer is actually in live via SE? I was thinking about sounds triggered by chat messages, but a streamer wouldn't like random sounds when he's not in live but he has just OBS opened.
Okay I'm going to mess with this a while and get back to you
Ohh ok gotcha. Is there a template for a custom alert widget? Sorry I'm new to this and still learning about custom widgets and the SE API lol
https://docs.decapi.me/twitch you can check uptime
I am not sure if I am in the correct place, but I will try to ask anyway.
If you want to set the game, some games need to have the quotation marks (when there is one or more words), for example: "F1 2021". So I was trying to make the command that will add quotation marks to the simple ${setgame <game>}
And to check it, I made two commands:
- !test -> "${1:}" And this one looks to work fine. Input: !test F1 2021 Output: "F1 2021" (quotation marks added), and then I put the same command to the second one ->
- !sg -> ${setgame "${1:}"} and here I have a problem, even if I used "${1:}" that should return to me exactly the same result as above, so "F1 2021", it returns only the first word after the command so !sg F1 2021 is still interpreted as: !sg F1 instead of "F1 2021".
ps. I know that the easiest way would be just to add the quotation marks manually, and forgot about the case, but I actually want to know where is the problem in my thinking.
Alright! Got it working to the point where I can hide and show elements as I wish
Thank you so much for this!
Next though, I have no idea how to make things fade out after a number of seconds, which I'm not finding anything I can reverse-engineer
Try this and let me know if it works for you:
${setgame ${queryescape ${1:}}}
No need of quotation marks
Hmm, maybe you can create a class with a fade out animation and then add that class on the div you want to have the animation?
CSS
.fade {
animation: fadeOut 5s forwards;
}
@keyframes fadeOut {
0% {
opacity: 100%;
}
100% {
opacity: 0%;
}
}
JS
const messageElement = document.getElementById('message')
messageElement.classList.add('fade');
is there a list of all streamelements tts api voices? (/kappa/v2/speech)
see what happens if you send an invalid voice π https://api.streamelements.com/kappa/v2/speech?voice
oh okay. and is there like a list with what voice is what language etc.
not that i've seen, no. just kind of the prefixes to give it away like "en" for English. and also not all voices work
yeah but for the "names" for example brian etc its not as clear
correct. i've never seen a lis tthat maps them like in the Alert widgets and gives the language + name. Just trial and error or look at that list to get the name
Best option would be opening an alertbox and checking the TTS voices... They are organized in a list in there
I assume the example code of a new custom widget can be seen as a template?
I also created this example (which uses 'Reboot0s Widget Tools' and also heavily borrows from Reboot0's examples):
https://jsfiddle.net/kvj4nhwe/
https://pastebin.com/9qQVuXcH (goes in the 'Fields' tab)
It uses videos, because this is the most complicated type of media (imo) and every other type should be easier to handle.
Please note that events will get ignored when there was/were no video(s) provided for the event type.
It is also only meant as a starting point. So there is a lot of room for improvement.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
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.
Documentation for the StreamElements widget tools
There are also transitions (which are pretty much just a shorthand notation for easy css animations).
Here is some example code: https://jsfiddle.net/ou9vfL04/
And if you want to go full fancy, there is the animate-css library π (https://animate.style/)
https://jsfiddle.net/jncsy6dh/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Thanks! I used you and @pulsar willow's help there
I have 1 more item before I can go live with my overlay:
The alert emulation is showing {{name}} instead of making a name
I searched this one, thought it would be an easy search, but not finding anything
Edit: found a temp workaround using default objects instead of coding it
hey could i possibly get help setting up my sound alerts?
Yes, thank you. It works!
if you have already opened a ticket then it is in the queue. this is the wrong channel the ask.
where would i ask?
in the helpdesk channel for your platform.
and i can almost promise you will get.... [i give up on the bot commands]
give me a min @copper tundra ... gonna do a quick check for the fonts
No worries.
... i am not seeing an import issue to OBS.
<div id='main'> TEST FONT</div>
CSS: ```css
@import url('https://fonts.googleapis.com/css2?family=Passion+One&display=swap');
#main {
color: red;
font-size: 100px;
font-family: 'Passion One', cursive;
}
Hmm. I'm not sure why I wouldn't be seeing it reflecting on my end. I actually just updated to 27.2.0 now too. Disabled custom CSS, nothing.
and I've actually have it happening on two different browser sources.
i'm also on 27.2 OBS; does that work?
Shit - sure does lol. So it's something with both overlays I'm using then?
most likely π
If I link the overlay, could you tell if there was anything off with it?
I didn't make this myself, got this widget from this discord I believe actually.
don't link overlays! never share overlay links.
Will do!
You could share the source where you got it, but never share links from your account
it was a widget in #widget-share that was using the google font input without a @import url('https://fonts.googleapis.com/css2?family={{font}}&display=swap') in the CSS
Where do you use {{name}} and is there a corresponding field in the 'Fields' Tab?
Afaik, those {{fieldName}} bits are only replaced in the HTML, CSS (and JS, but may hurt readability).
In your specific case it would get replaced with the value of a corresponding "name": {...} field (in 'Fields').
However, if you use it in 'Fields' as a placeholder for a runtime value, you would need to replace it later on.
Example:
Lets assume you have a field "follow_text": {...}:
"follow_text": {
"type": "text",
"label": "Text:",
"value": "{{name}} just followed!"
}
Replacing it in JavaScript:
// global variable that holds all field data.
let fieldData;
// 'fieldData' is initialized when the widget is loaded.
function onWidgetLoad(obj) {
fieldData = obj.detail.fieldData;
}
function onFollow(data) {
// the line breaks are only for readibility reasons.
let actualText = fieldData.follow_text
.replace("{{name}}", data.name)
//.replace("{{other}}", data.somethingDifferent) // can be chained, too.
console.log(actualText);
}
Please note, that an existing ``"name": {...}field, could break this replacement code, as"{{name}}"would be replaced with its value. Might be a good idea to use[]instead of{}` to avoid such problems.
Hello, does anyone here know the API?
it's in the header of the channel
Oh, do you know if it is only for the creators to manage their own channel?
I want to get notified when items in a store refresh but i need a channel ID which i assume is private
channel ID is public; but you would need Bearer to read it.
and ... if you want to get the event it would be using the websocket.
there isn't a socket event for store changes
I'm not sure what a Bearer is, but I see there is a GET request form store items and it requires a channel ID
How do I read the channel ID?
When I try to make the request, I don't get any authorization errors, only error for wrong channel ID it feels like. I'm not very knowledgeable in this field though
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.
^ that's your ID
Oh, do I need to make a StreamElements account to view other channel IDs?
you can only read your own channel information
so it's not public?
Because my goal is to get store information of another channel
it's neither public nor private; .... if that makes sense.
i'm not sure if you can grab that data; unless you are an editor/manager for that account
Oh, so the API is probably only meant to manage one's own account then?
I didn't see any need for authorization for certain requests, and I was able to get 200 OK on certain requests without any extra information
So I assumed all that i needed was to get the channel ID, but maybe i'm missing the point
I'm unsure what you are going for? but most API calls will require the Channel ID in the request; and then your Token in the header
All I want is to not have to check the store manually, if new items have been added or not
So I was gonna make an app that notifies new changes to the items in the store or something
I thought webhook was using API
a webhook sends you information .... like say you go live on Twitch; Twitch sends a webhook out, and Discord gets it and posts to your 'live channel'
Oh, and StreamElements doesn't have this feature?
and API is a "check" so you have to request info
But if a GET request sends me a list of all items doesn't that work?
You seem to know a lot about this field, can I ask you what you would do to accomplish what I'm trying to do?
I tried grabbing the HTML from the page source but the store list seems to be created dynamically
nice
i learned from freecodecamp.org π
if... and hypothetically i had to do it; i would send an API request every 60 seconds and compare the last store object to the previous
But I don't have the channel ID so I can't ask for the last object
if length is longer that means something was added.... but; depends on what you are expecting and how to handle removes and changes
My problem is that I don't know how to access the information
are you a mod for the channel?
No
then there is no way to get the info.
If i just browse there manually I can of course see the list
It's a store that anyone can access
Correct. that is "API polling" you go to the website and see what is new.
The streamer would need to set up a webhook to Announce to you that something was added.
If it's not your account; then you can't check.
If the store list wasn't dynamically added I could've seen the list in the HTML
So I would need an app that could mimic what an user does to access the website in order to see the contents maybe?
This; so if you did this, you would refresh the page every 10 seconds?
probably every minute or so depending on how important it was to be quick
I'm trying to make this for a friend that doesn't want to hit refresh constantly when he tries to buy something
Just googled it, it sounds kinda bad XD
It would only send out a notification that an update has happened, it wouldn't buy anything automatically
ya; and the streamer would need to do that
Appearantly there is no announcement as to exactly when it happens
Which is why he'd want such an app
But I might have to give it up
Anyways, I really appreciate your time and help π
π
Maybe I'll have to check out that codecamp, if it can bring me to your level π
heheh; it's free π
Heyho,
I have been trying to build my first widget and wanted to slide gifs from left to right (doing this with css animations). The group of gifs start off-screen and slide to the right (also off-screen). The problem is that only the first gif is animated whereas the rest appear as still images. If I reposition the group to the screen, they will all be animated. Does Streamelements have some sort of culling I am not aware of?
Also I would like to add variations to my widget but I didn't find the option to do so (variations like in the alertbox). Is that generally possible or not?
is it possible to create a share link for a widget?
that's not a public feature, you'll need to use the duplicate overlay option instead
@young fjord variations are an alertbox-specific thing, in a custom widget you'd have to implement that as code
Thought so. I wanted to add a variable number of gifs that flow together. So something like 3 GIFs and a sound belong together as a package and I want to be able to allow multiple packages^^ it doesn't seem to be possible though after reading through the source on github. Thanks for the help though π
This is perfect, thank you!
This is perfect! Thank you!
Hello, can anyone tell me about Overlays, or rather, can I download My Overlays from the site?
Or are they only through the power and yuzat??
There is a possibility and the code is significantly in the constructor, but is it really possible to somehow separate the Overlay from there *//
HELP!!!!!!
Guys how can I remove stream elements notifications from my server
They are pissing me off
It's so annoying
is there anyway to extract the first word from a tip message in JS? There is no container for the message itself so I cant set an ID in a <span>.
.split(' ')[0]
i am not sure if this fits here. does anyone know where se.live stores its scenes? i want to transfer the data from windows to my mac but do not know where this data is stored
that might be a question best for OBS server. and i'm not sure it is possible... the Windows to Mac might be an issue. For the SE stuff .... it's alll overlay links.
that's what I thought.
with the normal obs i know where it saves everything. unfortunately it is different with the se.live version
it is the same place @nimble chasm.... .Live is just a plugin; just adds a dropdown menu into OBS
I'm not familiar enough with OBS for a good response; but I know for sure that .Live is just a plugin.
ok that will help π
π you can uninstall SE.LIve and nothing will change to your scenes
oh no.. hahah this isn't StreamLabs π .... OBS crew if amazing and they are the best at what they do. No reason to mess with that.
SE just adds tools into what they do
and this tools are awsome π
Still don't know why the GIFs won't work but I fixed it by converting them to webm and changing the input to video. Autolooping video works somehow^^
Regarding emotesplosions, is it possible to create a custom command to be used by mod that triggers based on command? Iβve been able to create a command but I only get 5 of the emote. In overlay settings, there is the option for number of emotes but the list of trigger events is static.
Hi, my chat doesnt work, cant type, and cant see massages
Then how are you typing
Is any one home
user sub tier isn't avaible via chat messages object right?
correct
that unfortunate... any clever idea on how to deal with it?
not on a per message level;
doing an API call every message isn't doable, the only thing I can think of is to cache any sub for 30 days
getting the sub tier requires a Twitch API call
Is it possible to manipulate the json portion of a custom widget via javascript?
For instance (dumb example, I know), I add a button to fields and when pressed, I add a field for an image or something like that.
nope, fields can't be changed at runtime. Only values, but changes there won't reflect in the UI
that's cheating π .... but doesn't get the tier level 2 or 3 .... can be fun for 12+ or 24+ month sub stuff
that also contains the tier
wait what, thanks! so is the tier included into the message object but streamelements doesn't leave it there?
the badges object contains the tier info. The method just uses some regex to read it out
interesting.... i love these tools
thanks, I'll need to find some time to update them tho. It's been a year already π
Ask the streamer the mod process to their channel
let me rephrase. In the CSS editor for tips, the HTML file is the one being sent to the webpage to be used as a notification. The HTML file has the dono message in a paragraph, as opposed to the name, currency, and amount which are all in <span> with an ID for their container. Since its in a paragraph, it isnt accessible by the JS editor and so when trying to get the first word from the dono message to send externally (for a stream where top dono decides the word the streamer cant say) I cant access the message to send to another overlay to automatically update.
Is there a container I can use in place of a paragraph in the HTML file for the dono message that I can use for example <span id="message-container"></span> and then in the JS code use .quereySelector and .innerHTML to access the message and split the first word by using the .split(' ') function, use return message[0] or some other way to send the first word externally to a different overlay
how did you discover that badges object contains tier info? did you manage to receive a message event from a subscriber?
You have the badges from obj in message listener:
afaik overlays cannot communicate with each other.

you can use the SE kv store to 'talk' between to widgets + @next shuttle ; main widget saves the Object and second looks for the 'store update' matching that key
my problem was about sending a message with an user that is subscriber, a feature for testing messages event would be good
Hello, I've been able to approve a store redemption using the PUT to https://api.streamelements.com/kappa/v2/store/{channel}/redemptions/{redemptionId} with the body { "completed": true }
I want to deny and refund the redemption, but I don't know how. I've tried DELETE but that just completely delete the redemption.
I guess it is with the same PUT but another body.
EDIT: I found my answer here: #dev-chat message
Hey guys, i trying to put RGB effect with css to some borders of my overlay, i did this code from my machine and is working well but when i try to put on streamElements i cant see this effect...some one can help me please?
ow guys, i discoverd hahahaha. The default configuration of CSS are overwritting my css
I'm trying to add a font through custom CSS, other than importing the font from google fonts and setting the font-family is there anything else I need to do? Even though I've done both of those the font isn't changing
what font are you using
@import url('https://fonts.googleapis.com/css2?family=Exo&display=swap');
use this as an import
font-family: 'Exo', cursive !important;
this one inside of youre text field on css
i use it its totaly fine
I'm pretty sure I just broke SE's overlay editor while testing a custom widget probably because of an infinite loop. How should I proceed?
Quickest way: Just remove the overlay
I'm in need of another solution. Haven't saved anything about that overlay yet..
What is happening right now? Aren't you able to modify anything?
Chrome tab just got freeze. I can get back in but as soon as the widget starts it freezs again. Btw I meant I didn't saved a backup, things are saved on SE.
I don't have time to access the editor before it gets freezed again
Well, we can try something here... It will give the HTML, CSS, JS, FIELDS and DATA, but each tab will be one line, you will need to format it later.
Part 1
You will need theAccount IDandJWT Token, both accessible here (JWT is like your password, take care of it, click onShow secretsto reveal your JWT): https://streamelements.com/dashboard/account/channels
Copy them and go to the Streamelements API website. Go to the endpoint that will list your overlays: https://dev.streamelements.com/docs/api-docs/b642d46bee583-channel
Fill the fields on the right side
Token = Your JWT Token
Channel = Account ID
Search = Your overlay name (do not use symbols, if your overlay has any non-alphanumeric, rename it first to an easier name)
Type = Just type regular
Click on Send API Request. This will give you the information about your overlay. Get the key called _id (at the end of the result) and copy it, it is your overlay ID.
Part 2
Now go to the endpoint which will show the widgets in your overlay: https://dev.streamelements.com/docs/api-docs/af02de52998ec-channel-overlay-id
Same thing as before for token and Channel.
overlayID= The ID you copied from the previous result
Click on Send API Request. You will find a key called "variables" with the subkeys called css, html, js, fields, and fieldData. These are the fields you want. Copy it to your notepad and have fun reworking on it.
If you are fine with that, you can remove the overlay that is freezing your browser and recreate it.
Let me know if that works for you.
Morning everyone, i am currently having an issue regarding the documentation. I am trying to learn how to make custom alerts with html/css/js but can't seem to find a documentation for it. Can someone help me regarding this?
"Overlay Editor documentation" on this channel description. π
How can I share my overlay? The old method (deleting the editor part and pastin the id into the share link) doesn't seem to be working for me. All it does is log me out and throw me back to the login page
@young fjord ‡οΈ
Follow these steps to grant managers/moderators access to your dashboard:
- Click on your channel name at the top of the dashboard
- Create a new invite at one of three access levels (Bot Supervisor, Editor, Full Control)
- Send this invite to a mod/manager to give them access to your dashboard. The link is one-time-use and expires after 72 hours if not accepted
Video tutorial: https://youtu.be/zl_h-ttZDF0
Ok but that would mean I or my friend had to give control over the whole design. I only want him to copy one of my overlays into his account which used to be possible with the share thingy but doesn't seem to be working anymore
Unless you were given the special permissions you never could.
Ah, ok. Thanks for the quick answer :)
Hey! I am going through to upload a file onto my twitch overlay section and it keeps saying failed, but worked under my facebook one just last night. Is there an issue right now?
Hmm, yeah, it failed for me to, I've just tested. I will send this information to staff
thanks!
Can you try again?
works now!
Close all Streamelements tabs you have open and open a new one. Try to upload the file and let me know
@severe shell it works, but now the preview to emulate doesnt have the name listed out to show positioning
The staff told that was a quick issue with the upload thing but it should be solved now. I would ask you to try again (one more time, yeah, sorry)
Thank you! Yeah it worked perfectly, had to replace \n and \t but other than that everything is fine now.
It works, but I can't figure out why the preview name isnt coming up now
like the alert name is no longer showing
all the new ones I add the alert message doesnt show
Can you send a screenshot and explain what you want to have appearing on the screenshot? I'm not sure if I understand it.
Normally the alert name should show when you emulate it. Right now it does not do that when I insert the new customer video, but it worked on all of my FB ones last night
Hmm, I think I got it.
Go to Text Settings > Advanced and change the top margin...
THis is what they are at now. When I first inserted it they were at -235 and a blank number on the right
I adjusted it to this as that is the exact layout on my others, but it is not showing
These are big values... But anyway, try to change them to 0 and start playing around with the numbers
I see it now. Why is the other one set up on facebook so much differently? Shouldnt they match?
I got it! It was zoomed out so it is fixed!
Thank you!
Ohh, I would never imagine that! π
Hello everyone, I have a question, is it possible to apply the animation and appearance of the alert overlay to the DonationAlerts alerts?
Or is the design of alerts only valid when working with StreamElements and DonatePay.eu?
I don't know how DonationAlerts alerts work, my suggestion is that you ask them about it. Show the animation you want (record a video) and ask them if it is possible to replicate on their alerts
I got a alert set from NerdOrDie, if someone doesn't mind taking a look at the code for me, i'd love to change a animation on the alert portion in which a logo pops in/out, instead, i'd like it to just fade
@severe shell
rather tag @broken coyote for NoD stuff
Hahaha I'm not the best with animation things, to be honest! π
I tagged you because someone spammed in this channel... π
I contacted them earlier, unfortunately, they don't help with custom code for their products
this would be correct. Our alerts are designed to work with stream elements and stream labs
I am helping my friend out with creating a custom alert for his Twitch stream. I have a problem with the font size.
Is there a way using HTML, CSS, JS or Jquery (without downloads) that allows me to make the font shrink based on its character length or its overall width?
Thanks
Im having trouble with my alertbox. My gifs that I upload wont work for the subscriber alert only. The same gif will work for the follower tho
You can manipulate the style element of any given DOM-element. Together with String.length this should work
^^
im not sure how alerts are coded but you can probably convert px to vh/vw in css
You can convert them with ffmpeg to webm. That seemed to do the trick for me
let length = username.length;
if(length > 15){
<div class="forLongNames"></div>
}
else if(length <= 15){
<div class="forNormalNames"></div>
}
something like this i think?
is it just me or this isn't working properly? I digged into the source code and noticed that you're looking for raw.tags.badges but there isn't any tags subkey inside raw
kinda. You have to give the div an id so you can manipulate it in javascript. For instance, <div id="usernameDiv"> in your html portion. Then you can do something like usernameDiv.style or username.classList.add("Yourclass")
ah yeah, gotcha 
Is there anyway to do this without coding
not to my knowledge
best you can manage is to cut-off the name with the standard alert widget in se
would look like VeryLongNamedPersβ¦
afaik
Iβm not the most familiar with coding is there anyway you can help me out.
raw is just the event. You can get the same here:
window.addEventListener('onEventReceived', function (obj) {
if(obj.detail.listener === 'message'){
console.log(obj.detail.event.data.tags.badges)
}
})
And then do some regex magic to retrieve just the subscriber value (10, 20 or 30)
Yeah I figured that out, thanks! I was pointing out the problem to him.
He's doing raw.tags.badges instead of raw.data.tags.badges. Or maybe it's just me going crazy
let usernameDiv = document.getElementById("usernameDiv");
if("{name}".lengt > 15){
usernameDiv.className = "forLongNames";
}
else{
usernameDiv.className = "forNormalNames";
}
});```
This should do the trick if you are using the alertbox widget
Hey
Anybody here
I have a question
Can Streamelements do url fetch api calls like nightbot?
@tribal zenith can I DM you?
this is actually surprisingly difficult to do in html/css and requires javascript for which you can get libraries that do it
an alternative is to render your text as an svg element where this is supported natively, it's just that that has other drawbacks
Can I dm you super fast
And can I dm you as well I have a private question
Can anyone help me about se chatbot for json api calls?
sorry, I just saw it now. Yeah, you're right and I think I have a fix for it. The RegEx had to be changed a bit too.
I'll try to test it a bit tomorrow and then update it
Can SE do even eval with json?
Am i wasting my time trying to convert from nightbot to se? xd
eval is not supported, no
Wow
Thats tough
Why? 
I thought Streamelements is more advanced then nightbot :/
const groups = Utils.matchRegexGroups(this.raw.tags.badges, /subscriber\/(?<tier>[2|3]0)[1-9][0-9]*/i);
I had to change the "DOM path" as long as the regex, I was going to ask you why did you put [1-9] instead of [0-9]
This is my updated code and it's working properly.
regex = /subscriber\/(?<tier>[2|3]0)[0-9][0-9]*/i; raw_tier = regex.exec(msg.raw.data.tags.badges);
did you test this with 30 months subs and non-subs?
non-subs should return 0 instead of 1
I tested it with 17 month Tier 3 and something Tier 2, I can rember that the full number was 2002
- I check if the user is subscribed before checking the tier
you can even reduce the regex to /subscriber\/(?<tier>[2|3]0)[0-9]+/i
but yeah I'll add the subscriber check in there and return 0 for non-subs
my problem is that I'm dont know anything about regex, I just tried intuitively..
Hey guys, does anyone know how to transfer a SLOBS widget to OBS using a stream elements overlay?
I have all the CSS code and all that, also I can export it to a .widget file, I just haven't been able to actually get it to work.
Can anyone help?
GitHub and hosted file should be updated now. Let me know if it breaks again
Thanks for your toolset btw, it saves a lot of time, much love 
Even with these the font isn't changing 
@import url('https://fonts.googleapis.com/css2?family=Exo&display=swap%27');
.text-container {
font-family: 'Exo', cursive !important;
}
try it without the %27 at the end
Hey guys, does anyone know how to transfer a SLOBS widget to OBS using a stream elements overlay?
I have all the CSS code and all that, also I can export it to a .widget file, I just haven't been able to actually get it to work.
Can anyone help?
That worked thank you π
SE Widgets can't interact with the SE chat bot right?
You can use commands on chat to trigger the widgets. But if you want to send messages to chat, it will be better to have a middleware to store your token safely
If you have the HTML, CSS etc etc etc, you can copy them to Streamelements, but probably the JS will need to be changed.
Go to My Overlays on Streamelements dashboard and create a new overlay. In that overlay, click on + > Static/Custom > Custom Widget
Click on "Open Editor" and remove everything from all tabs. Then you can paste your code
If you need more details, you can consult the "Overlay Editor documentation" from this channel description
I pasted my code exactly like you said, however it was very broken. :/
It will be. You'll need to with adapt your jS from SL. Or build a wrapper to adapt it
Is it a purchased widget?
I have the widget if thats what you mean LOL
Did you buy it from a company
It was very long ago boost, honestly I do not remember.
Is it for the pixel pop I see on your vod?
Square widget
anyway someone can help me with my problem on OBS
That's a nerd or die widget. You can redownload it. I made SE installs for it years ago
Can you link me?
Sorry π
maybe i can screen share on a call?
You'll have to download it from the site. Make a account. If it's not there. Head over to the discord and we can link it
Got it π
also do you guys take tips for hjelping etc?
lx's "Bank Heist chat game" can serve as an example for the usage of such a middleware.
#widget-share message
what's your needs?
@severe shell @pulsar willow awesome thank you guys 
i dont fully know how to explain but prettty much when i open my obs i dont have an option dock for stream title or like recent updates on who follows etc
@opaque wasp
what do you mean?
So I would have to make a middleware similar to Jebaited.net correct?
Itβs like all of my streaming docks have disappeared
To where I canβt really control my stream title
That doesn't seem something about Streamelements.. You should ask in the right Discord imo.
I would like to setup a secondary Oauth Application for our QA team, am I good to just submit the API Access Application form detailing this?
You should be able to find them in OBS menu
Tbh, I never used something other than jebaited up this point.
But if you find good alternatives or even can make one yourself, why not π
Hello, Everytime I open up Stream elements I have to sign back into Twitch. Problem started after last update. What can I do?
Hello! I've been having an issue with my overlay editor and the browser sources. Lately, the fonts that I've chosen for my widgets turned back into default and the font and buttons on the overlay editor have completely changed. What can I do?
Hello everyone! through the API it is possible for me to see how many streamelements points I have in a channel?
You need to know the channel ID for that. And then you can consult this endpoint:
https://api.streamelements.com/kappa/v2/points/<Channel ID>/<Your Username>
Hello! I'm trying to use my business paypal account and when I enter my email associated with that, streamelements turns read saying "Enter your paypal email". If I enter my personal email (personal paypal), then it turns green and connects. But it won't let me use anything else except my personal email. How can I get this to work?
Check if you are not inserting a blank space after the email. If necessary, try to type the email manually. I had the same issue some time ago and it was just a blank space.
omg...
typing it in manually worked. i feel like a ditz, thank you! LOL
That's what I get for being lazy. Sorry to trouble you lol
So simple, right?! But itβs very common, I took some time to discover that ππ
No trouble at all!!
I'm messing with Jebaited.net rn but am having some trouble with the fieldData variable. I have let fieldData; at the top of the js but when I try to console log it (or things like fieldData.token) it just comes back as undefined
nvm I forgot to add fieldData = obj.detail.fieldData; to the onWidgetLoad event listener lol
Now when I try to use sayMessage() I'm getting this error: TypeError: Cannot read properties of undefined (reading 'token') as well as TypeError: Cannot read properties of undefined (reading 'first'). Any idea what could be happening? When I console log fieldData.token it logs the token correctly
Did you change userOptions.token to fieldData.token in the sayMessage() function?
If so, can you provide some more context for the code? It's hard to tell with out that.
hey,
yesterday i received a new update for OBS and StreamElements. After this update i have following problem: every time i start StreamElementsSE.Live or OBS Studios i need to relog in with Twitch.
This problem existed since the yesterday's update, unfortunately a new installation or reboot does not help.
Is there a solution?
did you try the steps described in #270206314561404928 ?
okay, its working. Thanks
Hi,
I'm working (hard) to change from StreamLabs to StreamElements and I'm still running into a few bumps that disable me from doing so. I've now created my progress bar based on a different progress bar to look and act the way I want except for one thing. I need a "goal" to start at a date, and then count from that date forward rather than just a single month, week, session or total. Especially for a donation goal. that any donation are counted towards it starting from (eg.) january 15th until it's completed
I've put my HTML/CSS/JS in a jsfiddle (I'm not sure how I can share my overlay through StreamElements) and would appreciate someone helping me to set up the goal bar so it can start counting from a date so I can finally make the switch
oh and these are the fields
{
"eventType": {
"type": "dropdown",
"label": "Pick event type:",
"value": "follower",
"options": {
"follower": "Follower",
"subscriber": "Subscriber",
"tip": "Tip amount",
"cheer": "Bits amount",
"subscriber-points": "Subscriber points"
},
"group": "Goal"
},
"titleText": {
"type": "text",
"label": "Title text",
"value": "Follower goal",
"group": "Goal"
},
"goal": {
"type": "number",
"label": "Goal",
"value": 50,
"step": 1,
"group": "Goal"
},
"final": {
"type": "text",
"label": "Completion text",
"value": "",
"group": "Goal"
},
"fontColor": {
"type": "colorpicker",
"label": "Bar color",
"value": "rgb(55, 55, 55)",
"group": "Design"
},
"back": {
"type": "colorpicker",
"label": "Background color",
"value": "rgb(1, 1, 1, 0.7)",
"group": "Design"
},
"fontName": {
"type": "googleFont",
"label": "Font name",
"value": "Roboto",
"group": "Design"
},
"eventPeriod": {
"type": "dropdown",
"label": "Pick period:",
"value": "session",
"options": {
"session": "Session",
"week": "Week",
"month": "Month",
"total": "Total",
"goal": "Open goal"
},
"group": "Goal"
},
"labelSize": {
"type": "number",
"label": "Label font Size",
"value": 15,
"group": "Design"
},
"posX": {
"type": "number",
"label": "Position X",
"value": -12,
"group": "Position"
},
"posY": {
"type": "number",
"label": "Position Y ",
"value": -12,
"group": "Position"
}
}```
and data
{"goal":150,"final":"- COMPLEET","fontColor":"rgb(238, 133, 37)","fontColorS":"rgba(227, 60, 180, 0.62)","back":"rgb(229, 229, 229)","borde":"rgb(238, 133, 37)","fontName":"Open Sans","titleText":"Follower goal","eventType":"follower","textPosition":"up","eventPeriod":"month","labelSize":16,"userLocale":"nl-NL","posX":0,"posY":0,"imagen":"https://cdn.streamelements.com/uploads/30b67a9f-7b5a-4142-b350-d9d627ef6c0d.png"}```
Please ping me if you reply, again, I'd greatly appreciate the help
thanks!
Well, in case you do not have another donation goal setup, you can just not increase the progress bar checking in JS if the current date is equal or higher than the initial date you want. When you reach the initial date, you can reset the donation goal in Session Data (https://streamelements.com/dashboard/session > Goals tab) and then start filling up your progress bar.
Or, (not sure if I'm overlooking something here, senior guys, please help me), you can store the donation values somewhere else, because there is no default way to choose a start date. You can do a date check and if the date is equal or higher than the one you set you can start counting and storing on SE_API, which is a small database to store custom values in key: value format (https://github.com/StreamElements/widgets/blob/master/CustomCode.md#se-api). You can use SE_API.store.get to check the current value and SE_API.store.set to create/change the value.
I think you misunderstand (or I'm misunderstanding you @severe shell haha) I don't want to set the date in advance
I want to count all the donations from date X towards the goal, since it's an open goal
That kind of historical info is not available to the widgets by default. But you can call the API directly to retrieve detailed info and filter it however you want (including date): https://api.streamelements.com/kappa/v2/activities/{channel} for all activities or https://api.streamelements.com/kappa/v2/tips/{channel} for just donations
Hi, I just requested API access to the StreamElements API. Two questions:
(1) any idea how long the review process takes before I get a client id and secret? Can I expect an answer in a couple of hours/days/weeks?
(2) Is there a more complete oauth scope list anywhere than what's here? https://dev.streamelements.com/docs/kappa/ZG9jOjE4MDk3Njc-o-auth2#oauth2-scopes
I want to access the /:channel:/say, /me and /:channel/:user/:amount endpoints but I'm not sure which scopes would have to be requested for that
Hello, I am having an issue with long verification for SEPay. Is there anyone I can speak with?
how is it historical data? I just want an open goal instead of just "this session" "this week" "this month" just... start now, and don't stop until it's complete
could be a week, could be a year, could be ten if I'm unlucky
Hii! I'm not sure if this is the right spot to ask but I think it is the closest to:
I'm looking for resources/information/tips on how to go about starting with Twitch Chat Widgets. I want to make my own custom one with my own graphics but I'm really not sure about where to start. I've never done it before and I have very little experience with coding but I do have some with Python (really not much though). If anyone has any information for me that would be lovely!
In the channel description is a general documentation for custom widgets. (Especially the "Message" section).
It might also be helpful to take a look at the code of other chat widgets in #widget-share.
Thank you!
The "start now" use case is exactly what c4ldas referred to in their answer, and you said you didn't want to set the date in advance but to count from date X, so I assumed X was a past date (my assumption also based on you using January 15th as the example), and hence my answer
The code you shared already has an open goal option tied to the session>goals data, so as c4ldas said, reset those goals the day you want the bar to start filling up. Or, as he also said, you can alternatively store your own count in the SE store key-value database so you don't have to rely on the session>goals data (in case you don't want to reset such data for other reasons, as a reset also affects subs/followers/bits)
Maybe we're misunderstanding your issue, but then we probably need a clearer explanation of your use case and/or why your current code doesn't fit it
new update for SE Live removed the edit stream info dock???
@crimson flint ‡οΈ
Please contact us via email for support with SE.Pay. You can use our contact form here: https://streamelements.com/contact Thank you.
Hi Alpha, I think you are going to have a more precise answer in #helpdesk-selive as this is specific for SE.Live plugin. People in there are more familiar with that kind of issue. Here we discuss things related to widget creation, overlays, custom commands and things like that.
Hey! I just had a few questions about SE on how alerts work.
I use Restream and everything is pretty connected. Is there no way to connect alerts through SE and all the other stream sites so that if a follow alert came through, it would not be an awkward mess? If I have to use multiple alerts, that is fine, I was just curious
selecting colors from variations menu causes problems, since the colors menu opens and the variation one get closed(it wont open again after choosing the color), the color selected is not getting saved too
There is no configuration (at least on SE side) for this kind of integration as far as I know. So yeah, if you have alerts coming from different platforms, they will play independently.
Even if you have an overlay for Twitch, one for Facebook and another one for Trovo on your OBS (and all of them from SE overlays, for example), they won't be connected. So if you have 1 single alert on each platform at the same time, they will play at around the same time
Thank you! I was hoping but I understand. Also, I am sure it is just glitched but when I am editing my FB info in SE, it says I am live but I am not currently. Nothing to really worry about?
Hmm, I wouldn't know how to answer that, I don't have experience with Facebook streaming. I think you can get a better response on #helpdesk-facebook
Thank you again!
I had a brief questions do arrow function on js is working on streamelements?
Yes
Good evening everyone! I hope you are having a good week and that the weather is being nice to you β¨
I'm using the boxed chat by Cocahh but was thinking about customizing it a bit further. Can anyone help me to position the badges to the right side of the container?
thanks
you can do that on youre css
I know.. i just dont know the proper coding π i tried messing up with some stuff but didnt work
should i share the current code? (i changed a few stuff already)
what happen when you changed the code?
thats fine
Here you got it! Feel free to DM me if in need.
@summer mesa try this
o>
Hello, been using the Social Media Pop-Up widget by @mild cipher via SE. I'm using it as a social media/upcoming events rotator. How can I show the same social media icon multiple times as the rotator cycles through all of the field values? For example, want to 1. Show Twitch icon with text. 2. Rotate to Twitter icon with text. 3. Rotate to Twitch icon with different text. It appears I am unable to use the same Twitch icon multiple times. I removed the Twitch icons from the code in the fields and changed the labels to Twitch 1, Twitch 2, and Twitch 3 to keep track of the different text values but I cannot figure out to have the Twitch icon appear each time for Twitch 1, Twitch 2, and Twitch 3?
So that's what I thought right, the "goals" but how do I reset that because it seems to just show the total amount?
Just to be sure: does that leave my original data in tact?
the "total" so to speak ?
because that would both explain a lot and fix my issue π haha
This only affects goals' progress. Also, you can edit the tip goal progress and save changes instead of resetting everything (I forgot that was an option)
thanks man, I hadn't seen this yet! This might actually solve my problem for me π
Sorry I hadn't found this myself before spamming here, it's been a LOT of information and effort to switch from streamlabs to StreamElements π
Downsides of doing a lot of custom work haha
No problem, I've been there too π
underestimated it a little bit XD
Hey! I apologise if this has been asked / mentioned already; It appears Twitch has changed their API when it comes to userdata. Would someone have the update expressions for Userdata such as username etc, for stuff like Event Rotators?
Hi, one more question... If there's a donation, is there a way to pass that on to a different API/Endpoint (such as MQTT message bus)?
If you want to check that in real time, you will need to connect to Streamelements using websocket and listen for tips. When a tip occur, you can send the information to anywhere you want, but you would need to custom code that.
Here you have a code example on how to connect to SE websocket: https://dev.streamelements.com/docs/kappa/ZG9jOjYxMzcxNTY-connecting-via-websocket-using-o-auth2
If you don't have oauth2, you can use your JWT, but be sure to keep it safe.
After gaining the AccessToken make sure to pass it in the const in the JS bellow. Powered by Stoplight.
Thanks ^__^
Technically you don't even need to connect to websockets, you could call the whatever API endpoint from within the onEventReceived listener
True, I went too far! π
At the end there are small differences for both approaches, it all depends on your needs and use case and infrastructure. It's good to know the websockets alternative is there ^^
Hello everyone! I'm currently thinking about writing a plugin for touchportal to modify streamelements bot commands. My idea is to have a set of buttons, which I can use to pull new information from some other source and then update the respective bot command. Looking at the documentation, I need to request access to the API first. The form includes a mandatory company name but I'm just doing this for personal use. Is it possible to get access as an individual?
I'm not sure if I understood your question, but what changed was the Twitch API, so if you are working on SE widgets, you don't need to worry about it, you can use the event listeners on SE widget for that, like follower-latest, subscriber-latest:
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
However, if you want to know the Twitch API endpoints (follower, for example), you can get them here:
https://dev.twitch.tv/docs/api/reference#get-users-follows
i've been having that issue, too. :/
Just place your website name in the company field, individuals can also apply, I've just confirmed with staff.
Check on #helpdesk-selive, they can give you more information π
Ok, good to know. What should my website show? ATM I don't have anything yet, since I'm only now working on a concept. Should my page tell you who I am or what I want to build?
I've found the solution over there too... you need to use the beta version and reconnect your Twitch account
You need a working website to have something to show. Maybe the concept stage is not the ideal moment to apply as the staff needs to understand how it would work to approve the idea and send the credentials.
When you have something to show it is easier to get approval. It is like "Hey, look! I have this so far, check how it works, but I would need oAuth2 to be able to have this to access that and that"
Perfectly reasonable. I'll set things up and then apply through the form. Thanks for the guidance!
For some reason when I add the cheers option as an alert it never transfers over it just stays the same on stream. Any reason as to why that would be?
thank you!
@severe shell any chance you also know an answer to my questions? π
1 - I don't know, unfortunately, the process was recently opened, so it depends on the people who does the analysis of each application. I know it is not by hours for a response
2 - I also don't know, I don't have access to oAuth2 application, I'm just a normal person, not part of the staff, sorry π¦
Hi, I'm trying to read the contents of a field via if-statement in js and its returning undefined
the error: Uncaught TypeError: Cannot read properties of undefined (reading 'chatIdenAll')
@marsh granite, posting suspicious links will result in not being able to post again.
How are you trying to read them? Did you declare them on 'onWidgetLoad'?
crud, im on my alt. the bot interpreted a link to a twitch badge image and a link to streamelements api as sus links
const fieldData = obj.detail.fieldData;
animationIn = fieldData.animationIn;
animationOut = fieldData.animationOut;
hideAfter = fieldData.hideAfter;
messagesLimit = fieldData.messagesLimit;
nickColor = fieldData.nickColor;
customNickColor = fieldData.customNickColor;
hideCommands = fieldData.hideCommands;
chatIdenAll = fieldData.chatIdenAll;
chatIden = fieldData.chatIden;
chatIdenStr = fieldData.chatIdenStr;
chatIdenMod = fieldData.chatIdenMod;
chatIdenVIP = fieldData.chatIdenVIP;
chatIdenSub = fieldData.chatIdenSub;
chatIdenVer = fieldData.chatIdenVer;
lightMode = fieldData.lightMode;
msgDisplay = fieldData.msgDisplay;
channelName = obj.detail.channel.username;
fetch('streamelements api link' + obj.detail.channel.id + '/').then(response => response.json()).then((profile) => {
provider = profile.provider;
});
if (fieldData.alignMessages === "block") {
addition = "prepend";
removeSelector = ".message-row:nth-child(n+" + (messagesLimit + 1) + ")"
} else {
addition = "append";
removeSelector = ".message-row:nth-last-child(n+" + (messagesLimit + 1) + ")"
}
ignoredUsers = fieldData.ignoredUsers.toLowerCase().replace(" ", "").split(",");
});
function badgeOptions(){
let badges = "", badge;
if (provider === 'mixer') {
data.badges.push({url: data.avatar});
}
for (let i = 0; i < data.badges.length; i++) {
badge = data.badges[i];
if(chatIden === 'show' && chatIdenAll === 'hide' && chatIdenStr === 'show' && badge.type === 'broadcaster'){
isBroadcaster = 1;
badges += `<img alt="" src="broadcaster badge on twitch cdn" class="badge"> `;
log('chatIdenAll = false; isBroadcaster');
}
}```
window.addEventlistener('onWidgetLoad', function (obj) {
fieldData = obj.detail.fieldData
})
also, you should learn object destructuring syntax, your life would be easier ^^ (not related to your problem, just a tip)
Would it be a problem if a custom widget I plan to share, includes a data url?
let img = new Image();
img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABEAQAAADljNBBAAAAC0lEQVQI12NgAAIAAAUAAeImBZsAAAAASUVORK5CYII=';
...
no, many already do
@marsh granite That mute has been fixed.
thanks!
Hmm, you didn't say what is the issue
will do, im slowly seating back into dev stuff after staying away from it for a couple of years
im not sure myself, i copy pasted the code from my IDE a couple times and it started to work somehow
so im guessing the problem fixed itself
Ahh okay, you are the Kirrahe, right? I thought were two different people, sorry
yeah
π
sorry for the confusion
thanks for the answer π
Here's the sayMessage() function
const sayMessage = (message) => {
message = encodeURIComponent(message);
return new Promise(resolve => {
fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
and then this is the function call sayMessage("This is a test message.");
Developers I have now tested the giveaway of Streamelements, it is not random winner it is rigged to last persons that joins the giveaway, can someone here develop exactly the same giveaway, same features which is not rigged. I have a video to prove it uploaded YouTube. Did 6 giveaways in a row run yesterday! The last 5 that joined was the winners. I will pay 10 euros if you fix the problem for me. π
that honestly sounds so strange
would you mind dming me the video?
I agree, but my entire community saw it in a lot of giveaways, I have it set to subscriber luck 5. it skips non subs. Which is probably low chance anyway. But otherwise you can name call the last 5-6 persons that are subbed and joined last, call them to be winners. I hope they solve it. π
I tested the same code as you and it worked perfectly, the message was sent to my chat.
I created a field called token and it was able to read with no problems.
Try to go to DATA and remove the token key and value (or maybe remove everything and just put a {} )
And then add the jebaited token again
Hello i need some help asap.
Im looking for a widget that could ad like 20 on a counter when i get one sub and the same for bits.
When I go to the Data tab it's empty and I can't type anything in it. I actually thought that tab wasn't editable because I've never been able to enter anything in there lol
You definitely can type in there. It is a one line tab, though.
If you create a new custom widget, can you see anything in DATA tab? It should appear like this:
You said that those errors don't occur when you log field values.
Does the logging also happen in the sayMessage() function?
In case it didn't:
const sayMessage = async (message) => {
message = encodeURIComponent(message);
let url = `https://api.jebaited.net/botMsg/${fieldData.token}/${message}`;
console.log(url);
let response = await fetch(url);
let text = await response.text();
};
The easiest cause I can think of would involve a local assignment instead of a global one.
There is no such statement as the following in your onWidgetLoad() function, right?
function onWidgetLoad(obj) {
...
const fieldData = obj.detail.fieldData; // there shouldn't be a 'const' or 'let' in front of fieldData
...
}
Is the DATA tab only editable for custom widgets? When I create a new one I can see it yeah
Ok so when I console.log(url) in the sayMessage() function I get the same error as before: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'token')
Here's my onWidgetLoad()
window.addEventListener('onWidgetLoad', function (obj) {
fieldData = obj.detail.fieldData;
});
Very strange. At least in my example widget it seems to work properly.
Does the same happen when you run a minimal version like this?
let fieldData = {}; // Data from 'Fields'.
const sayMessage = async (message) => {
message = encodeURIComponent(message);
let url = `https://api.jebaited.net/botMsg/${fieldData.token}/${message}`;
console.log(url);
let response = await fetch(url);
let text = await response.text();
};
window.addEventListener('onWidgetLoad', function (obj) {
fieldData = obj.detail.fieldData;
sayMessage("This is a test message.");
});
Got it, you are not using the custom widget... You are using CSS Editor from some alert, right (follower, subscriber, etc etc)?
If so, the function sayMessage would need to be inside onWidgetLoad as I could understand. Because the fieldData will load only when the widget run
well, that explains a lot π
Or... Just forget the onWidgetLoad (because the alert is a onWidgetLoad by itself) and use {{}} to your fieldData items. You can use {{token}} like this:
const sayMessage = (message) => {
message = encodeURIComponent(message);
return new Promise(resolve => {
fetch(`https://api.jebaited.net/botMsg/{{token}}/${message}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
sayMessage("This is a test message.");
It's incredible how sometimes we discover things in unrelated questions. I had never used Custom CSS on alerts before
OH ok yeah that makes a lot more sense ty ty. So that solved the error issue. When I console.log(message) in the sayMessage() function it logs correctly (i.e. This%20is%20a%20test.) and the bot does send a message in my chat, but it only sends a single dollar sign https://i.imgur.com/y8KBdDc.png
Try this:
const sayMessage = (message) => {
return new Promise(resolve => {
fetch(`https://api.jebaited.net/botMsg/{{token}}/${encodeURIComponent(message)}`).then(response => response.text()).then((text) => {
resolve(true)
})
});
};
sayMessage("This is a test message.");
That worked! Why does that work but having message = encodeURIComponent(message); on a separate line not work?
Being honest with you, I don't know, π I just had the feeling that if the $ sign was being sent, maybe the message wasn't being encoded or was being lost. So I had this idea. Maybe someone more experienced can help us with that. I'm new on JS, still learning.
And message = encodeURIComponent(message); is still something strange to me... π
It should work... I'm wondering if it has to do with SE replacement of variables, seems like maybe {message} was interpreted as a fieldData variable before string interpolation? Because otherwise, whatever message is (including empty or undefined or whatever), string interpolation would have removed the dollar sign
On a side note, fetch already returns a promise, there's no need to wrap the call into another promise (especially because you're always resolving it). If you need/want to return a promise, just do return fetch(...). Although given the use-case, you probably don't even need to further handle the promise and not even await for it, so just do fetch(...).catch() (the catch to avoid the program stopping on errors)
Hey guys! Is giveaway API working well?
I'm using this link, with my account id, but it shows errors only π¦
https://api.streamelements.com/kappa/v2/giveaways/[channel] <- My account ID
Statuscode: 404
Error: "Not found"
Message: "Not found"
I got the problem. I have to use v3, not v2 in link
it is 100% that
the widget code has the {} variable replacement done before it executes
which is why it's a bit weird that SE allows both {variable} and {{variable}}, as doing only the latter would make more sense and mostly solve that problem
I use string interpolation frequently in my widgets' code and haven't had this issue before, that's the weird thing to me
it mean it only breaks if you use a {var} that exists
I think {message} doesn't exist for custom widgets but it does for alertbox
uhm... that might be it
imo SE shouldn't do those {} variable replacements at all on js code
but it's too late for that
When checking that a Twitch message either comes from a BROADCASTER or a MODERATOR I use the following:
if (tags.badges.broadcaster == "0" && tags.badges.moderator == "0") .... That works fine but when the message comes from someone who is neither, I get the following error Uncaught TypeError: Cannot read properties of null (reading 'broadcaster') .
It seems the BROADCASTER or the MODERATOR badge has to be present. How can I do the test that the message comes from either a mod or broadcaster, without giving and error if it is neither
Something like a shebang in bash could solve such a problem and still provide downward compatibility, couldn't it?
badges not always exist, there are users without badges. If you want to check if a message comes from the broadcaster or a mod:
if(tags.badges && (tags.badges.broadcaster || tags.badges.moderator)) (pseudocode)
btw, "0" is true while 0 is false, that's a very confusing way to check an if statement
sry, wrong person π
Just in case, that you don't know about reboot0's library (of course there is nothing wrong with doing a vanilla role check)
https://reboot0-de.github.io/se-tools/tutorial-ChatMessage.html#pre-id-3
Also, can use if(tags.badges?.broadcaster || tags.badges?.moderator)
The ?. (optional chaining) will check if badges exist and if so, check if it is a mod or broadcaster. If not, it just says "undefined" and do not throw an error.
However, I think the last time I used, the overlay editor didn't understand it well because it didn't want to keep the indentation. But you can use when the code is already done
Hi Team, my streamelements (Youtube) Activity Feed isn't loading anymore in my OBS Studio Dock, can anyone help me? Also re-added the URL in the OBS Studio Dock, no luck. I saw some post that you can do a reset. thanks for helping
@still juniper @severe shell Thank you both for your help. I come from a different type of programming language and JavaScript is a strange beast to me.
true, except if you're still targetting old OBS and their old CEF, no support for that in old versions (I learned this the hard way)
Oh good to know... I'm new in JS, so I still need to remember the compatibility thing! π
And will not brake things like ${myAwesomeVariable} while I'm trying my best to keep consistent naming of variables in my shitcode
Curious if anyone here has ever done any work integrating SE into Unreal Engine? Not a developer myself, but I'm currently working on a big VTubing project and we're trying to integrate some of SEs interaction like donation events and such. UE doesn't have any current twitch plugins with donation events that we can find.
Does anyone know why I may be getting duplicate bot messages in the chat? I am using the !heist widget
You probably have the widget open in two places. Maybe your overlay editor is open and your OBS as well. Or you have the widget in two scenes on your OBS
Yes, that was most likely the case. Thank you!
Would you know how to add more fields to some options of this widget?
Click on Open Editor and go to FIELDS tab.
But in the JS tab I don't have to modify anything?
When I tried to choose a different font in the overlay editor, it still stays the same for each font. Not to mention, this editor looks like this and shows it exactly on the Streamelements OBS.
I don't know what you want do do. But to add new fields on the left side, you add in there. I also don't know the widget, so cannot help much
Hi everyone! Does anyone know of a way to get a sound to play when I get a chat message? Have been tearing my hair out trying to find something.
I do streams where I am not always looking at chat (long outdoor scenery streams while I read a book nearby) I want to be able to hear a sound of any kind that will tell me I have a message so I can respond and engage with my viewers. I don't believe the Twitch apps do it at all, the SE chat overlay doesn't make sound. It was suggested y'all may have something or have heard of something. I use OBS to stream, but would be happy with any method at all. I don't need it to play on stream, just for me and my ADHD π . Any ideas?
i have another issue what does the red box mean next to fps while im streaming and how do i fix that
play a sound on all chat messages?
Yes. Hopefully! π
Are you familiar with making a custom overlay @timber quail ?
also my chat is telling me that my stream is delayed by a lot
I'm not sure what the red box is? Probably an OBS thing for something. And stream delay is set in the Twitch settings (assuming you are streaming to Twitch)
yes but i turned on low latency and its still delayed by a lot so im guessing its the box that changes colors all the time but whenever i stream it goes from green to red
@elfin arch I'm not but I can learn!
π first thing you need to do is go to your overlays menu and create an new empty overlay. Then add a custom widget and remove everything from all of the tabs
Alright, I think I have done that. The tabs are the settings, position etc on the left side menu?
It turns out, there is already a custom widget for that in the #widget-share π #widget-share message
Oh my! What a lovely surprise! Perfect! You are truly a champion. β€οΈ
No problem. π
Got it all set up and working in OBS. Thanks again! β€οΈ
I was wondering if there will ever be a way for you to exclude specific dollar amounts from showing up within your tip alerts. This is a feature that I feel would be very helpful for those whom want to have multiple tip alerts of different sizes. For example my main tip alert just sits in the middle and activates as usual. But I'd like to have a tip alert that expands over the entire overlay only when a specific amount is given. I'm unable to do this because when you make two different overlays the primary with a default of 0 will play no matter what.
Well, you can set a variation with a value and remove the image/video, the sound and the text from the main overlay
So when the tip meets the value you set, it will not do anything. On the second overlay you create your full screen expansion alert
Right but wouldn't that make it so you'd have to make a variation with a list of number values to compensate for the main overlay being inactive?
You can leave the the secondary overlay with no alert in the default option and just create variation for the the specific amount you want the full screen
Wow I honestly would have never thought of that. I just tested it out and it worked. Thankyou very much for your help.
Any reason you can't just use the API?
hi is there a list of default text effect in stream elements? like the wobble
It's just a css animations made with animate.css, you can google it
oh thanks
if(badge.type === 'broadcaster' || badge.type === 'moderator')```
this also works
i meant
for(let i = 0; i < data.badges.length; i++){
badge = data.badges[i];
if(badge.type === 'broadcaster' || badge.type === 'moderator'){
}
}```
sorry just woke up then
what are you going for @marsh granite ? no need for the for loop on that?
well its what works for me when checking for badges
badges work and; #1 this is assuming using Twitch; #2 will break on the 'first 10' sub badge (unless handled for that);
actually its what the widget comes with in here
so i just modified this loop to suit my needs
the founders badge? how would it necessarily break?
unless it's changed; the sub badge is not the same as founders badge
ah yes, fond memories of KappaGen ignoring me because with a founders badge you aren't a sub
it's like 'founders' and not 'sub'
it's not wrong... just depends on want you are doing with it
like; a user can have maybe 3 badges; Mod Vip Sub
making it so that the user can toggle the following:
1: show badges in the chatbox
2: if so, whether or not to show all badges or just specific ones
3: then select which specific badges they want to show
I have to assume this is a Twitch only thing?
and that's why i'm questioning it; if you go the badge route you are locked into Twitch
if you want to cross platform then ..... need remove VIP badge or extra code to platform check
this would probably be a twitch-only thing in the end already. I've got an API fetch to grab twitch avatars
ok; ya. then you would be alright using the badges ... but would need the founders badge for subs
....but in normal usage; badges isn't needed. Unless needing "VIP" or other Twitch stuff. Streamer and Mod checks shouldn't use the badge check
@marsh granite @elfin arch thank you both for the conversation and you guidance on this topic.
hi, just wondering if it is possible to configure a custom chat command to trigger an emotesplosion of a single emote of choice, or will I have to make a custom widget for that? currently i can't seem to find a way to have the command work
Is it possible to approve tips via api? Cant find that in documentation
@abstract harness Only thing I can find is listing tips that are requiring mod approval. Nothing regarding actual approval.
"I want to cycle some sort of different background, rather then have everything on screen at the same time"
π
π
so are you controlling the background in the Overlay or OBS?
are you doing for alerts only?
no
.... i'm trying to figure out what you are going for
i'm not sure if the OBS and HTML file is needed
it will be overlay/background that has different designs and will then be for different information
are you making it in SE editor?
no
the easiest way would be to make it in the SE editor π€£
ok, don't want to do that, so I'll keep looking π thnx though
hahah; i'm just saying easiest way would be that π
...next option would be to do an API call for your page/widget load (see header for API docs)
"easiest" is depending on the person doing it π
..then start a Socket and connect to that to get the updates (no polling)
fair.
π€£ i was going to explain further @ivory yarrow. but i think you got it from there π
np π
for clean up; i just want to note that the widgets have 2 main EVENTS, on load and then when something happens. the onLoad is api.streamelements.com/kappa/v2/sessions/{channel} call then the other events are sent through the socket (see header).
does anyone know how i can display a live browser source in stream elements overlay maker?
Just click on "Preview" button on top right
i want to capture a website as part of my overlay
make a custom widget and put it as an iframe?
so i need help, streamelements says that my old name on twitch is still the hosting name of the bot so i cant raid or ban or time out poeple. so how do i fix this?
@hot trout i tried but the website im trying to pull from has so many javascripts, it only pulls just some imgs and not the fiels. any ideas?
maybe it's better to just put it as a browser source in obs then?
think you may be right, is there any way to animate it doing so? @hot trout
what would you want to animate?
ah i think i got it, a quick little source transition
but would it be possible to set that on a timer? to slide into and off the screen
help i lose my old discord account this is new i been part of Streamelements dreamteam that we called now this is new account hope i can get it back again please msg me
@vocal rover you'd have to script that with obs lua probably I think
and by that I mean you can use this script that someone else made
i updated obs/elements and 2 of my docs disappeared, the one to change the title and game , and other one one to to check viewers/ subs and all
Hi Gen, please contact your SE account manager and they will be able to work on that with you.
@severe shell where can i see who is my SE AC manager?
for some reason my streamelemts site is all white anyone know how can i fix it?
It is usually the person you talk when you need support from SE. What was your previous username here on Discord and on the platform you stream?
As regards the SE website, try to open here and login again. If that does not work, click on the lock icon next to the address bar > Cookies and remove all cookies:
https://streamelements.com/logout
If it is stil not working, try to open it in a private window and check if that works for you.
previous name i got is the same but my old account got hacked so no idea what is the new name on it now i stream on Twitch ''Twitch.tv/GenOdyssey'' and the link still not working
even on private mode or incognito mode its not working
Well, I pinged the staff to check the Dreamteam issue for you.
If the page is not working on incognito mode, maybe there is something stuck on the wb browser. Try to use MS Edge or Google Chrome as they work better on Streamelements. Also try to disable extensions you have installed on your browser to check if any of them is conflicting with the site
@severe shell yes i try it and didnt even work it have all white screen
are you using Chrome?
Let's try Edge π€ .... open that up. Press CTRL+SHIFT+J that will open the console for the browser. then go to https://streamelements.com/
should look like:
Can you post a screen shot of what you see; like that.
i will msg you provately @elfin arch
π
Is there a way to make a command or store item that will play a sound alert, but also will be available only for VIPs or Mods (not other viewers)?
Nope.
thanks
Well, there is a way⦠involve some steps, not too simple:
- Create an item (sound effect) in the store
- select only the option βRedeemable via chatβ on second screen
- where it says βItem commandβ, choose a single name for the item (laugh, for example)
- create a new command on commands page and put this in response:
${redeem laugh}(considering you put laugh on the previous step. - On permission level, select VIP. This will make the command available only for VIP and Mod. Save the command
- Go to default commands and enable the command
redeem. Make them available for VIPs as well
And then other people will still be able to use other sounds (by the website), but not by the command, right? It sounds like a good solution. I will try to implement it next time. Thank you!
There is also the "Video on command" Custom Widget (can play audio as well):
#widget-share message
later versions do have cooldown options and more audio alerts, for example:
#widget-share message
Well, if you check the option βredeemable from websiteβ, anyone can redeem it from there. But if you uncheck that option and kept only βredeemable from chatβ, the item will not be available on the page and only VIPs and mods will be able to redeem it
Thank you so much!
Hi, i'm trying to close my SE account (linked to Trovo) because I've other one (who is the principal) with my others social media and other stuff but i've been waiting for weeks and still nothing
Hello if i make a overlay design how do i share this with a friend using url i tried this Delete the "/editor?er=1" at the end.
instead of "/overlay/", turn it into "/dashboard/overlays/share/" this just logs us out and don't share the graphics
Not possible, unless you have the share link permission for that. The best and quickest way is asking your friend to add you as "Editor" on their account, so you can duplicate your overlay to their account.
Follow these steps to grant managers/moderators access to your dashboard:
- Click on your channel name at the top of the dashboard
- Create a new invite at one of three access levels (Bot Supervisor, Editor, Full Control)
- Send this invite to a mod/manager to give them access to your dashboard. The link is one-time-use and expires after 72 hours if not accepted
Video tutorial: https://youtu.be/zl_h-ttZDF0
thanks
im a creator on etsy making overlays so how does nerd or die and other create links when you purchase they give you a url that install into your account with ever thing in place
Hi, i'm trying to close a SE account because I've other one (who is the principal) with my others social media and other stuff but i've been waiting for weeks and still nothing
perhaps you're still waiting because you keep asking in the wrong place
Hey all, is there a possible way I can get help with bot commands?
so, what is your question about bot commands? π
What do I do if my watchtime and other basic commands arent working? And with the timeout command how do I set it up for it to timeout for a certain amount of time and what would the prompt be? Stupid questions I know, I just suck at this type of stuff and I hope Im not asking in the wrong place and thank you. @pulsar willow
@sacred tinsel ‡οΈ
One-Click Overlay Sharing Application
Use this link to submit an application: https://strms.net/shareoverlay_request
You can apply for one-click overlay sharing using the link above
ππ thank you
Hi guys, is a countdown to send a message command possible (single use)? For example with moderators, !timer 2 testmessage would send testmessage in 2 minutes. Doesn't seem possible with the given tools, just wanted to make sure.
hi i want to ask if stream element is supported by es6?
i had a codepen code and its working
when i try to copy my code to stream elements seems its not working.
it supports whatever the chrome version in obs supports
which if you haven't updated to 27.2.x is a rather old one
ok so its possible to use no js or vue right
you can use vue yes
Afaik, the standard trouble shooting procedure for such problems goes like this:
- Are those commands activated? https://streamelements.com/dashboard/bot/commands/default
- Does your chatbot have a custom name?
- Did you try to log out and log in again?
- Did you try to part the bot from your channel and rejoin it again?
I assume the desired behavior of a timeout command is, that a user can timeout himself/herself?
If so, something like the following should work (the SE bot must be moderator):Setup from dashboard
Command:!timeout
Response:/timeout ${sender} ${1|10}In my tests it timeouts the user, who posted
!timeout. (Except the broadcaster or other moderators.)
A second parameter can be specified for the duration, otherwise it uses 10 seconds.I don't think that it's possible to trigger the timeout and post a prompt to the chat? (Expect the standard twitch prompt "userABC was timouted for X seconds".)
The easiest solution might be another command, which is triggered by the same phrase and posts the text?
For example:
!timeout
!timeout 23
Hi, is there any SE Staff member here that could give me quick feedback about the status of my "StreamElements API Access Application" submission sent on 23 February (app is called ALLSTARZ21 Portal).
Currently there is a long list of queued up applications from a few months back that have not been looked into. The reason for that is, we are planning some changes to some things that would involve Oauth 2 credentials.
With that being said, currently there are a few applications that have been pushed to be looked into by the devs before these changes take affect, but we can only do a specific number of applications at a time - basically the slots for these manual reviews is filled right now and no ETA on when the slots will open up again.
I see. Can I ask my users to provide their SE JWT token and use that token instead of one generated through OAuth2 to access the API?
If you are referring to asking viewers for their JWT token, I would advise against that. But if its for a few streamers sure, as long as you understand that its not a very secure way.
and the tokens need to be kept a secret
Yes, I understand it's less secure. That's one of the reasons I would much rather use the OAuth way π
Is there anything that I can do to ensure a smooth review when the devs find time to review my app? It's a private app, basically invite-only, so you don't get a lot of public information and the redirect URL also will not work without a correct state parameter (and client id + secret ofcourse). What are the devs looking for in the review?
thanks for the info ππ
anyone worked with YouTube alerts? I'm facing difficulties with members tier's variations.
yoo, brand new here, trying to add alerts and scenes. after copying url and adding browser source in obs preview the page just says stream elements can not load page. also my alerts look perfect in the streamelements settings tab, but doesnt play with live preview on either the big layout part of streamelemets or my obs preview (imported from streamlabs)
Hi! I'm making my own alerts and have to export them in AVI if I want them transparant in After Effects. Streamelements doesnt support that. What do I do now??
@violet garnet export as .webm
not possible with after effects
I figured it out!

Hello. i need some help wihit my overlays. is ther a way i can upload them bak so they show in My overlays?
Your overlays are not removed unless you do it manually. So it will be always in "My overlays"
Hey guys, i'm not sure what is going on and hopefully someone can assist me. I was initially using streamlabs chatbot to put all my commands and sound commands through as well as streamlabs for my overlays. I have since switched everything over to stream elements with you guys!
No going back! But ever since I moved over I have noticed that the audio of my overlays, TTS (Brian) and my sound commands are so quiet! I have even had to take some audio files and increase the levels of the audio file itself to be usable. The audio file is now blaring in my ear because it's so loud if i were to play it on my desktop off stream but through my overlay in stream it is still super quiet. I had no issues with audio levels before moving across. Is there a way to increase all audio levels through my overlays? my sound commands are at 100% in the store.
Hello, is there any variable to be able to obtain the Twitch ID of a user?
I am asking because some users in my chat have special characters and the bot gives me an error by putting only {user}.
I'm not a developer and I am enquiring with my own issue however reading your question make sure you are firstly using the correct syntax as you need the $ in front of {user} like this: ${user}
If you're still struggling you can always visit this link for other variables. You can also Nest variables if required for your desired command. https://streamelements.com/dashboard/bot/command-variables
For a long time I have used the {user}, but a friend changed the name and now it appears this way. @γ¬γ€γΌγ‘γγ (rayvv)
In some commands I have been able to fix this using "${user.name}", but for alerts I don't know how I can use this variable.
hi can some one help me hahaha im creating a animation using js and it turns out like this
is there an object that stores sessionβs up time?
@spice cypress presumably the <p>s are causing line breaks
as well, the +i0.04 and +n0.04 bits aren't syntactically correct
I expect you meant something more like out += '<span style="animation-delay:'+ (i * 0.04) +'s">'+str[i]+'</span>';
(increasing the delay by 0.04 for each char)
Is anyone able to take a look at this; I am still waiting for some help. Thanks in advance.
i did the p tag for the has followed to break
and it didn't work
the way you have it now there's a <p> tag around every letter
'<span style="animation-delay:0s">v</span><span style="animation-delay:0.04s">o</span><span style="animation-delay:0.08s">n</span><span style="animation-delay:0.12s">n</span><span style="animation-delay:0.16s">i</span><span style="animation-delay:0.2s"> </span><span style="animation-delay:0.24s">h</span><span style="animation-delay:0.28s">a</span><span style="animation-delay:0.32s">s</span><p> <span style="animation-delay:-0.04s"> </span> </p><p> <span style="animation-delay:-0.08s">f</span> </p><p> <span style="animation-delay:-0.12s">o</span> </p><p> <span style="animation-delay:-0.16s">l</span> </p><p> <span style="animation-delay:-0.2s">l</span> </p><p> <span style="animation-delay:-0.24s">o</span> </p><p> <span style="animation-delay:-0.28s">w</span> </p><p> <span style="animation-delay:-0.32s">e</span> </p><p> <span style="animation-delay:-0.36s">d</span> </p>'
if you want a line break before the second loop just add out += '<br/>' between them
ok thanks ill ty that
or save yourself some time and use animation libraries (GSAP, anime.js) with staggers
Did you already try 'Control audio via OBS' in the Browser Source settings?
did you tested it? because seems like I'm having problems with it again: I used my script until today when I changed back to your code, it isn's working properly. I'll send further informations later
so i have over 100 followers on youtube and idk how to enable se pay
how would i do that
Hello guys! Can I customize the default giveaway repsonse? To customize, or just translate the response text
@cerulean sparrow unfortunately not possible.
Hmm. On my account the response text is hungary, but on my friends acc is english
You can change the bot language here https://streamelements.com/dashboard/bot/commands/default
ty
β Question
How do you make more than one contest for betting, I can't figure it out.
Authenticating with OAuth appears to be broken. I can connect but an unauthorized result is returned with get a "Failed to authenticate" message. See the attached which is a testing snippet Styler had provided to me in the past.
As far as I can tell the access token I'm using is valid, and have regenerated an access token encase there was an issue with it, but no joy.
We're having the same issue. Please give us any updates SE, we have users coming at us like crazy because of this with Lumia Stream
I'll have our devs take a look into this issue, apologies for the inconvenience! @viscid jay @nova hedge
@viscid jay @nova hedge could you guys see if the issue still persists?
I'm still seeing the issue
also getting failed to authenticate?
devs will take a deeper look into this, there were some auth changes made today
"Failed to authenticate"
I also got a report that the Jebaited middleware was not responding. I tested and was unable to send messages. But after clearing cookies and Authing again, it is working.
Hey guys, I'm not sure why this is happening but when I play an audio file directly from my desktop the audio is around -15db but when I preview the audio from the stream elements store it is around -32db which is a lot quieter. Both audio sources are pushing through the same audio channel. This is happening with ALL of my audio files I have in the Stream Store including my TTS from Brian and my sound alerts. I had no issues with this previously as I was using streamlabs. as soon as I have switched over to stream elements I am getting the sounds to be a lot quieter.
If anyone is able to assist that would be very helpful!
Anyone here ever thought about developing a widget that display real time Twitch's Hype Train progresses? Is this something doable just withing SE or a is middle server needed?
good morning.. can you provide the endpoint and http method that you are using so we can check what might be wrong with the changes.. we are sorry if there is any issue still.. we will be looking into this with you today.. please let me know more details about it and we will find the solution
good morning.. which endpoint you are hitting here?
@scenic remnant I'm trying to open a socket IO connection so e.g.
const stats = {
connected: 0,
error: 0,
authed: 0,
unauthorized: 0
};
for (let i = 0; i < 50; i++) {
const socket = io(URL, {
transports: ['websocket']
});
socket.on('connect', () => {
stats.connected++;
console.table(stats);
socket.emit('authenticate', {
method: 'oauth2',
token: '...'
})
});
socket.on('authenticated', () => {
stats.authed++;
console.table(stats);
})
socket.on('error', () => {
stats.error++;
console.table(stats);
})
socket.on('unauthorized', (data) => {
stats.unauthorized++;
console.log(data);
console.table(stats);
})
}
Where URL is realtime.streamelements.com
okay we just made a release with some changes @viscid jay can you try again please and let me know
we apologise to anyone having difficulties in the last 12 hours connecting via sockets, we are passing through some migration phase of our infrastructure which we are trying to do as smooth as possible, but it is a big system so please bare with us and if there is anything that you see as problem, please report to us and we will fix ASAP, thanks for the patience π
how can i get an accurate follow count in a custom widget?
Thank you seems to be working again
Hi, I was working on a custom Alert and was adding some data in my "fields" section. Seems like I made an error, because after saving and reopening my overlay I am not able to see any usable fields and I also do not even see my CSS editor option anymore. Can you please tell me how I can fix this? I don't want to lose my code.
Thanks!
Here's a screenshot for reference:
are you able to run nodejs programs?
Are you asking me?
yes
I dont know what are nodejs programs but I'm able to trigger my Alert preview but I am not able to open my CSS editor. I was checking out the page elements and managed to bring back the CSS icon but clicking it doesnt do anything
ah
there's a way to get the data out of streamelements using the api
I made a tool to do that but it's written in nodejs so if you have that installed or are willing to install it you can use that
or you can do it manually
someone had a similar question recently and was answered using the manual way
if its something I can do directly or manually I'd prefer to do that since I don't know much about this.
let me see if I can find the instructions
@acoustic sandal which browser are you using?
edge
Chromium edge or everybody loves me IE edge?
didn't microsoft forcibly remove IE edge from everyone's pc
all I did was add a user-color in my fields within the {} in the fields tab and saved the overlay and this happened.
Microsoft edge. The new one. its quite good.
tried loading the overlay editor in inprivate mode but no difference
thank you
you could try this #dev-chat message
you can skip searching for the overlay id though and just get it from the url in your overlay editor
if you try to edit it in the web the url will be something like https://streamelements.com/overlay/<something here>/editor?er=1
that <something here> is the id
the important parts are the setup (account id and JWT) and part 2 where you actually get the data
ok I tried this but I didnt get anything - not sure where the result comes up
after clicking send API request the response just has 4 lines
sorry I had to fix something that broke here
okay - I managed to generate the API but I am not able to remove the data I had put in the "fields" section. Could you please tel me how I can edit this API?
"fields": "{\n "userColor": {\n "type": "colorpicker",\n "label": "User Color:",\n "value": "#fff",\n "group": "Font"\n },\n "group": "Font"\n \n}"
this caused my error
well the easiest way to go is to extract the data you need (the code), fix it up and make a new overlay where you paste in the fixed code
ohhhh I get what you mean now.
cause that api documentation thing won't let you upload anything
ya I understand. working on it rn - let me check
Thank you so much @hot trout it's working now. ^_^
np
Hi, my fields are not showing up in my overlay. I'm not sure what I'm missing here. Could you please help me?
reference:
Maybe the issue is at the end, can you post it as well?
yes, this is the end:
remove last comma: }, -> }
oh haha that fixed it. Thank you!
ngl I hate that json doesn't let you use extra commas
is there a way for me to work on my follow alert without repeatedly having to trigger a test event?
I'm using a GIF file and text
I have no idea what that means π I don't know much about coding, learning on the go. Could you tell me how I could try that?
I mean I have local html/js/css files
that I open in my browser
and then I send them off to SE when done
oh so you test it in your local software?
which software do you use?
developing in the SE web editor is not my idea of a good time
I use vscode
but any code editor will do
yes, I just realised that.
okay got it. Will check it out. Thanks! Appreciate all the help π
if you want an example of how I do that
in that, alertbox.html is what goes to SE
and alertbot_browser.html is the same html code but with some additions to make it correct html for my local browser
oh okay. I'll go through this now.
what is seupload? its mentioned in the readme
oh where can I get that tool? or is it only for devs to use?
emm where do I run this "npm -g install" ? >_<
after installing nodejs (nodejs.org), in a terminal
or command prompt as it's known on windows
ahh! got it. Thank you, this has been super helpful.
Hello SE Staff or any Developers who can assist. I've asked for help on this 3 times now with no assistance and remain having this issue. The issue is ever since I moved to SE from Streamlabs and Streamlabs chatbot my sound commands have been super quiet. The sound command volumes are at 100% my obs audio channel is at 100% (0 db) and my audio is being routed through Elgato Wave Link Software. again. I had no issues previously. When I listen to the sound bite from my desktop directly it sounds fine, if not loud. when I listen to it either on SE stream store to preview it or in OBS via the overlay the volume is so much more quiet. The audio channels are being run through the same channel in testing via Wave Link.
Why is it that through SE the volume of my Sound commands are dropped dramatically and can someone help me look into this?
any chance anybody knows how to add stream information back to obs as a dock since the new update?
try typing something in the chat in obs chat. most likely you will need to log into your channel again. once you log in you should be able to see the stream information pop up again
Why does SE_API.store.get() return error if used inside AlertBox's JS tab?
> Uncaught TypeError: Cannot read properties of undefined (reading 'get')
I was looking to get a variable stored into SE_API.store to choose which media to display.
my apologies
Is there a way to get a chatter/viewer list from SE Api?
I was making a request to the twitch tmi url from the widget and it hits a CORS issue
the tmi /chatters?
I don't believe there is a way in the SE endpoint to do it other then collecting a list of active chatters in the widget. (the tmi /chatters can be accessed with a CORS middleware)
Yea I was gonna write a middleman on my private server to hit it, I was just checkin if there was a way to grab them without an external call
I remember a short discussion not to far back ^ and didn't notice if they found another way. But as they mentioned that end point is cached
At least I need to know if that's a bug , cause if it's not I would have to write my own event handler to correctly display alerts..
1 sec; i'll take a look. never tried the store inside an AlertBox
It's not in the custom CSS for the alert box; the SE_API is:
isn't sendMessage the method used by get/set?
possibly? i recall looking into it at one point but gave up on what was i doing. here is the SE_API in a custom widget for reference
ya. it is:
wait so I can bypass the store.get and use directly the sendMessage?
possibly... i've never tried
I need to try the other option is spending the next hours coding my own alertbox... I'll post here updates
π let us know.... i believe it should just be that same call the store.get() is returning
I tried SE_API.sendMessage('store_get', 'current_overlay') , but it isn't working if awaited. It just stops on that line of the script and does anything, no errors too.
I also tried removing the await and it will return over and over a pending promise.
ya. i'm getting a pending promise to that never resolves.
...found another maybe option; GET https://kvstore.streamelements.com/v2/channel/ACCOUNTID/customWidget.KEY
but not sure if you can get the ID and token from alertBox like you can with cusotm widget
are you talking about the data that can be retrieved via onWidgetLoad(obj) event?
if yes, obj.details.channel is avaible
yup. but not sure if the Overlay token will work as a valid Bearer token
so i tried asking in #helpdesk-twitch but im suspecting i was in the wrong chat all along
so the problem is, I'm stuck... I'm running alerts through websocket, and they work perfectly fine with test events aka websocket.on('event:test', ...) returns an event obj, the good stuff. Now, when it comes to livestream though, the alerts simply don't show. I was originally listening to them on websocket.on('event', ...), but tried also doing on event:update, but neither on websocket.on('event') nor on websocket.on('event:update') yield any results, and I can't exactly debug it because i can't trigger "real" alerts; I'm running exactly the same code for all 3 cases though, so real alerts should trigger. Now, I don't know how common it is to run alerts this way (and maybe I'm just extremely off - I'm not sure since I'm not a streamer myself and am just coding a plug-n-play solution for another person to not bother with setting up the alerts).
documentation on this is very limited, and I have no clue what I'm doing wrong, so if anybody has any input, I'd appreciate a lot
EDIT: the only reason i could think up is that oauth2 and jwt token do not authenticate the same way? I'm currently doing it through jwt token just bc i found where that was first and was too lazy to check, but it didn't occur to me for a single moment that the method of authentication can make any difference...
what you mean by overlay token? could you please point out how to obtain ACCOUNTID and customWidget.KEY?
i'm testing only in the custom widget: so ```js
window.addEventListener('onWidgetLoad', obj => {
console.log(obj.detail.channel);
Are you making something completely custom for your alerts or using the SE Overlay editor?
And first thing would be to check that you see the Live alerts going to your Activity Feed; just to make sure the socket is connected correctly to your acocunt
completely custom, but relying on SE to provide me with alert events
i apologize but what's activity feed........
all ive tested is that live alerts appear in OBS
so websocket is connected and is able to receive events
just not the real ones for some reason
the activity feed is here: https://streamelements.com/dashboard/activity . make sure you see the events there first
the real events from the past
Hey... i may be in the wrong section, but im curious how do i add the streamelements store to my twitch?
yeah, I already use this code inside the alertbox; it does return
obj.detail.channel.apiToken and obj.detail.channel.id both are the same on custom widget and alert box
so I replaced ACCOUNTID with obj.detail.channel.id and customWidget.KEY with obj.detail.channel.apiToken
but that is the response > {statusCode: 401, error: 'Unauthorized', message: 'token is missing'}
so i do see those
i can also see that i do, in fact, receive an event upon replaying those events
soooo
it works i guess?
in which case, should i just make the streamer check if the events go through his activity feed in SE?
Give that a go in the #helpdesk-twitch π
hmmm okay its not that simple i see
Correct. Make sure the streamer has events in their activity feed
replaying events sends them on event:test channel
ok im gonna check smth rq and report my findings
wait a second; the KEY is the SE_API KEY: https://kvstore.streamelements.com/v2/channel/ACCOUNTID/customWidget.KEY
i did try matey but noones responeding to anyone there
Can one of you guys help me? Sorry if I'm not supposed to message in here. Desperate
so you would want https://kvstore.streamelements.com/v2/channel/ACCOUNTID/customWidget.current_overlay i believe. and the Token from the onLoad would be a bearer token in a fetch header.
ok
its bad
this is what i get when a real alert is fired
so real alerts have a different structure?
damn
You could just say "no". Sorry to bother
I donno the question π
Sorry, I thought you just ignored it
"Can one of you guys help me? Sorry if I'm not supposed to message in here. Desperate"
I'm stumped. Usually able to solve my own issues. My ISP even said everything should be working. I posted more details in Heldesk-Twitch
oh ya... that is a for sure #helpdesk-twitch or #helpdesk-selive question
Thank you
alright, got it! but which has to be the key for the bearer token into the fetch header?
e.g. headers: { 'Content-Type': 'application/json', } which has to be the "Content-Type" for the bearer token?
why
why streamelements, why
these are absolutely not the same
i found my issue, thanks for the help guys
gonna go rant on github
they should be the same structure... but i can't say for 100%; i never got into testing real events with it. I know there has been a lot of chat recently from ca11 trying to get them working. so might be worth reading some of their past messages?
just tested, and they are not the same structure
see SS above
test event returns an object with two fields, event and listener
while data for the real event is like one level inside
do you guys know how to alter a twitch "about" page so its not just the basic white?
which is very unintuitive, and there is no indication of such which is SAD
agreed. or needs a least documentation
dashboard.twitch.tv/u/YOURNAME/settings/channel
oh thank you, sorry can you give me some help regarding the coding side Id need to make it look actually different?
all mine is atm is
BigMickII
Streaming Games
i believe```
{
'Content-Type': 'application/json',
'Authorization: 'Bearer TOKEN'
}
like in black writting
unsure @crude berry. this is for StreamElements overlays and alerts. Editing the Twitch profile... maybe someone in #general-chat could help?
oh thanks mate ill try there π
that's exactly what I've done; new error comes in
> {statusCode: 401, error: 'Unauthorized', message: 'token contains an invalid number of segments'}
edit: maybe is worth mentioning that I've already tried getting rid of "Bearer " but it didn't work too.
can you try real quick with your main JWT hardcoded in?
...i'm not entirely sure when an overlay token can be used or if if requires full JWT
i have no clue how to debug this ngl
the object template for the real alerts received through the websocket is completely different, i have no clue if data about, say, number of gifted subs is inside or outside the data key
is there really no documentation on this
its nothing like what it points at here
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
and this is where the websocket docs lead me to
should I just copy and paste it from dashboard/account/channels?
ya. just try that for now. set that as your token.
don't want to release that way, but just checking to make sure if call is working as expected
it's working now
ya; i'd say go back there and follow the: https://dev.streamelements.com/docs/kappa/ZG9jOjYxMzcxNTY-connecting-via-websocket-using-o-auth2#json-schema .... it should all match; but in practice i can't say they do.
well crap. that means you did it right; but needs the JWT which is bad because you don't want to use that. I'm not sure what the overlayToken is good for then to be honest? maybe i'm missing something on how to use is π€
oh a blessing
i missed this one completely
it looks like it matches
that's bad to hear.. should we make a feature request or something like that to have at least SE_API.get avaible into AlertBox? or should we contact someone from SE's staff/devs pointing out the problem? both this way will take a lot of time though π¦
i'm trying to figure out how to get the sendMessage to work
let me know if I can help somehow
what i'm finding is that when you call SE_API.sendMessage('store_get', key) it is sent to the SE_API.responses with a random ID that has the promise res/rej functions passed along. So you can grab that and run it... but i'm not sure how to get the id or get the value of it π€
let alertBoxGet = key => {
return new Promise( (res,rej) => {
SE_API.sendMessage('store_get', key).then(d => res(d));
setTimeout(_=> {
let firstKey = Object.keys(SE_API.responses)[0];
let firstObject = SE_API.responses[firstKey];
firstObject.resolve(firstKey);
}, 2000);
});
};
console.log('from sendMsg ', await alertBoxGet('test'));
-> the key it was stored as
so you're able to get the ID that refers to the stored key?
SE_API.sendMessage('store_get', key) is a promise that is never actually resolved or rejected. those functions are sent to SE_API.responses as an Object which can then be resolved. But i'm not seeing where the actually data is being held to return back
I'd love to help you in someway but it's clear that is you the one that is leading the process.. on my side seems like we are trying to achieve something SE's devs don't want us to find. do you know someone from SE that could give us an answer?
I'm just tinkering with it to see if I can get it to work using the .sendMessage. I'll give it an ask and see what I can get for an answer
I really appreciate your help, feel free to tag in case you need something or if you find a solution
what does your badge mean btw?
SE Champion π for helping people with their SE issues and answering questions
they're right, you are quite a champion at those
thanks
. and i'll let you know if/when i hear back from the staff/devs for using the SE_API store in alertbox (also console.log) π have a good one
Is there a way to add fields to an alert for the alertbox? I'd hate to hardcode everything^^"
yes, the same way as always
Call me crazy. But wouldnt it be 10 times easier to just whipped up a blank layer with the alertbox with all the SE_API info you want in it?
In this case you don't use Bearer, but apikey on Authorization. @elfin arch also take a look at it:
window.addEventListener('onWidgetLoad', async function (obj){
const apiToken = obj.detail.channel.apiToken
const id = obj.detail.channel.id
const seAPIFetch = await fetch(`https://kvstore.streamelements.com/v2/channel/${id}/customWidget`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `apikey ${apiToken}`
}
})
const seAPIResponse = await seAPIFetch.json()
console.log(seAPIResponse)
})
this actually works as intended, thank you! how did you discover theAuthorization with apikey in it?
I used to look at the code for every widget in #widget-share and everywhere I saw a custom one (as a JS learning process). In one of them I found this apikey as authorization, so I took a note.
I see; it's crazy the amount of informations that's not documented anyway
what fun is it if everything is documented?
how can i interact with SE_API and can i acces channels/me?
If you are referring to SE_API object from the overlay, you can find information here (Not much, but if you have a specific question, we can try to help if we know the answer): https://github.com/StreamElements/widgets/blob/master/CustomCode.md#se-api
However, if you are talking about the SE API to make API requests using the endpoints, you can interact using any language you prefer (you will find examples from the https://dev.streamelements.com/docs/kappa/YXBpOjc1NTM5-se-api-docs in each endpoint)
Yes, you can access channels/me
Hey guys, where can I submit a feature request/idea?
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.


