#dev-chat
1 messages · Page 34 of 1
If you need to hide it moving it off out of the scene works, as long as the source itself isn't hidden
Ah ok, I’ll give that a go!
is there a way to trigger the kappagen emote explosion for a web service call?
@mild cipher got it working, appreciate the help. figured it was doing something wrong but wasn't sure
Hi guys! Did u ever heard of app called Greetings for SLOBS? Any chance to find same thing for SE?
what "grettings" does?
@upper bough special gif and music for subs, vips, viewers, mods or for custom username
and u can set your own gif/music, so i put music and gif for my regulars
for example every time when user1 says hi, it plays his song and his gif
@upper bough oh, yes it is! ty so much! i guess it's pretty new one, cos it used to be no widget like this before for se!
and https://github.com/StreamElements/widgets are so much more 😛
Hello! Having an issue trying to get a JSON object from exterior site. Here's the code I'm trying to use:
window.addEventListener('onWidgetLoad', function (obj) {
alert('test');
fetch('https://[url]?locationId=108', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
}).then((response) => {
return response.json();
})
.then((myJson) => {
$('.main-container').append(myJson);
});
});
I don't seem to be getting anything back at all.
h ttps://[url]?locationId=108 is working properly?
Copy/pasting into my browser works as expected
fetch(https://[url]?locationId=108, {})
.then(response => response.json())
.then(myJson => $('.main-container').append(myJson));
});
Tried this. Still no visible return. Updated code:
fetch('https://[url]?locationId=108', {})
.then(response => response.json())
.then(myJson => $('.main-container').append(myJson));
});
long shoot but maybe .main-container miss spelling on html (?)
This code appends nothing to html:
window.addEventListener('onWidgetLoad', function (obj) {
fetch('https://[url]?locationId=108', {})
.then(response => response.json())
.then(myJson => $('.main-container').append(myJson));
});
$('.main-container').append('test')
});
This code prints 'test' to html:
window.addEventListener('onWidgetLoad', function (obj) {
$('.main-container').append('test')
});
If your only goal is to inspect the response, log to console instead. Easier to read 
window.addEventListener('onWidgetLoad', async function (obj) {
const data = await fetch('http://ip.jsontest.com').then(d => d.json());
console.log(data);
});
(You can also check the network tab)

@upper bough, you have been awarded a commendation :star: by @tacit musk for answering a question in #dev-chat. Keep it up! 
Do I have access to a clock of some sort? Maybe a listener or a timer?
Thanks for the help, btw. I was able to move forward
You can do a javascript ticker ?
I'll try that. Thanks
@mild cipher by chance do you have an eta for your website to return? queue system is offline and looks like thefyrewire.com no longer loads (assuming it's related)
Does anyone know what the obj.detail.listener is for a merchandise call is?
merch
window.addEventListener('onEventReceived', function (obj)
{
if (!obj.detail.event) {return;}
if (typeof obj.detail.event.itemId !== "undefined")
{obj.detail.listener = "redemption-latest"}
const listener = obj.detail.listener.split("-")[0];
const event = obj.detail.event;
if (listener === 'follower') {addFollowEvent(event.name);};
if (listener === 'redemption') {addRedemptionEvent(event.name);};
That works..
if (listener === 'merch') {addMerchEvent(event.name);};
Doesn't
Are you saying "merch" should be "event"?
if (event.event.type === 'merch') {addFollowEvent(event.name);};
i didnt change the end part. just the listener
Oh.. So merch is running differently than follow alerts at the moment?
yea
Would that work the same if I removed "listener" all together and just used that?
if (event.event.type === 'follower') {addFollowEvent(event.name);};
just event.type
Gotcha. Thank you. 🙂
yaya no problem cap'n
Is there a list of CSS variables for SE? I have custom code from SL that I'd like to move over, but I'd need to know how best to do so. The importer doesn't work
i just read that existe a channel-points-channel-v1.<channel_id>, to see A custom reward is redeemed in a channel. but need channel:read:redemptions scope
@shadow urchin check channel description
Hey everyone I am currently trying to dynamically check the sub train counter in another widget to trigger an animation if its greater than 10 and I am currently unable to get any data from the sub train widget. I have tried queryselector/queryselectorall and also jquery class searches. Is there something super simple I am missing or is this even possible?
yea
I don't think the default train widget has any open API or custom widget open points
Why not more or less make your own internal counter for it and simulate it and count the subs?
that was my next step.
it seems whenever i grab the session info from the api, the sub points don't add up correctly - eg right now I have 12 sub points, but you guys are showing 8
That is a known issue at the moment
sweet
Its due to a change from Twitch API
and we are working on readjusting to thee change
ok cool
Hi,
Is there a custom way to hype the gifted subs?
Right now it's thanking by just hyping each person who got a gift so when someone donate 10+ it's just a full line of spam from the bot. (an example: https://imgur.com/dWGL3Ce)
I was more thinking of something like this :
"{user} just gifted {amount} of subs! Thank you"
Asked the help center who redirected me there. Thank you
Hi there! I think that there is no way to disable bot announcement for gifted subs.
Hi, hoping im in the right place. I am trying to set up a custom widget using twitches channel points redemption as per their pubsub documentation (as it seems streamelements have not yet implemented this into its own api). I have the websocket working in a demo page, but when i copy/paste it into my widget (with minor modifications to trigger an alert instead) it doesnt seem to work. Is something about streamelements stopping me from having a separate websocket in a widget? and where can I find the code in chromes developer tools so i can debug for myself?
@pastel crystal this is the right place, only, the twitch channel points API is still closed if I'm correct
To get custom redemptions works, as i said the web socket worked on a standalone test page. The hardest part i had was figuring out what my stream ID was.
a screenshot of the working demo. All i changed in the code that i put into SE widget was the action when recieving the message. However i dont see the messages coming in in the network tab.
channel ID is a public entity, but the JWT and overlay token are the things you need to hide
just saying
unless thats the twitch channel id 
those two arent showing here cos this isnt in StreamElements, my issue is porting it into streamelements. Thats the twitch id, which is public, but it took me forever to find it (i eventually found it by opening the channel as a guest, getting an ad watching a video, and checking the "last_preroll_ad" session entry which contained the stream_id of the stream the add was seen on)
but its the only remotely personal data there, other than my name, which is much easier to find. So just being overly cautious
Hello! Could I be directed to documentation for widgets interacting with chat?
Channel description @crisp holly
Yea, I have been trying that. But I'm finding it difficult to locate the info I want
And so why I'm here
@pastel crystal I believe you need to see upon a message received in our chat if the points redemptions are triggered, else you will have to make the overlay widget connect to the twitch pubsub
@crisp holly there is an event for a message
Thanks keizar, I'm trying to connect to the twitch pub sub, and it's working on a separate webpage, but not when I copy the code into a custom widget.
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
const data = obj["detail"]["event"];
if (listener === 'bot:counter' && data.counter === trades)
updatePanel ();
else if (listener === 'message') {
$("#total").html ('test');
$("#total").html (data["text"]);
}
});
Testing the message event and not getting any value for data["text"]. 'test' works as expected. Could anyone help me figure out what I'm doing wrong?
Console shows the object properly as well
nvm. data.data.text seems to work fine
@broken coyote in the Goal Widget ( https://discordapp.com/channels/141203863863558144/457957557470887947/587981932772720671) is there a way to change "Donations" to "Tips"? i've managed to change it in all location except where it's displayed.
there is. let me find it
well. maybe
the lawyer has completed his search 
hahaha
@broken coyote ty
no problem
Tried the method suggested in doc to send a message to chat. Did not seem to even build properly. Did not find anything regarding sending messages in the github doc
I'm probably doing something wrong again
I took the code you pasted before and it worked for me without any problems.
I can read chat just fine. It's sending a message that bewilders me
where can i add the donate goal?
Hey Krexy over at the overlay editor via the website
Over here: https://streamelements.com/dashboard/overlays, click on the pencil to edit and click 'WIDGETS' top right, then search for the donate goal
Oh. Unfortunately you can't send messages directly (or you shouldn't as it could expose your JWT token)
The best way is to create MITM script that will handle just chat and will store your JWT in safe place
Is there a way for me to create a list of user names that want to join lets say a heist mode I created? Someone types in !heist, other people want to !join and then i can roll a 1 or 2 too see if they won or lose?
is that possible for me to create using the current api?
Hey guys, I am still working on my twitch points redemption widget... and progress has been made. However, as I am connecting to twitch directly, i need an Oauth token, is there one that streamelements already has that I can use? or any ideas on how i can get it within the widget?
I have 100% got it working on a localhost webpage, which i have put into obs as a browser source. but cannot figure out how to get it running through Streamelements due to the authorization issue.
Hey everyone, what's the timeline I could expect to hear back from the OAuth application process? I submitted through the form on Friday of last week and I know we obviously just had a long weekend so not rushing, just curious if there's any expectations of how long it takes to review before you would hear back. Thanks!
@shut charm OAuth access due to early stage is granted in batches, I am sure your request is in queue and will be added pretty soon.
@viral patrol Cool thanks. Just wanted to get an idea of if it's something that'll be done relatively soon or if it's more a month+ sort of thing. Thanks for the response!
Hello! I thought I had seen other Twitch channels with custom emotes as an SE loyalty point item. Is that possible?
Can you elaborate what you mean?
I have emotes made that I would like viewers to be able to buy using SE points- is that possible? @indigo flume
Not with our loyalty points, no
Thank you anyway:)
Hi I am using awesome shoutout and made a custom@command That brings up the command for the shout out and nothing was happening yesterday but it’s worked before
@steady iron Rene! @deep arch is having some problems with awesome shoutout
Hi there
Ty @velvet cave
step into my office, please
no worries haha
left you a PM @deep arch
does the merch part have an endpoint on the api?
Event.event.merch
You can trust him. hes a lawyer.
lol thanks
Disregard the addfollower stuff. That was something from some dudes widget
anyone here?
how can i get the url of an asset i uploaded to library
i uploaded it nd a widget im using needs me to define it in the javascript but i cnt find how to get the url
@vital bough Got a second to hop in chitchat?
Does anyone have a list of commands for each site connected to SE and what type and value they produce. Basically mocks for everything since the Alert box doesn't actually trigger the socket API
code nerds, i have a panel i want to slide in from the right whenever the source first activates, how do i do plz? can give cookie...
i want to toggle this on and off in obs,
need a delay to the animation of about 3 seconds, then have it slide in from the right

Personally, I just use the obs motion-effects plugin to move things about the screen (like slide ins and the like). Then you can just have it hot-keyed and slip and slide anytime you want.
How do I get overlays without pc
Check out things like "Go Lightstream"
@simple wraith i'm using your step goal widget for sparks and it doesnt function with the colors and such like it does with follower, sub, tip and bot counter types. is there a way you could update it and have it function with sparks like those do or is that just part of it in the works to make it work like those do?
not sure if i ever got a reply to this, but i currently use strealabs chatbot for its remote parameters script. does SE have something similar where a keyword in chat can change scenes, hide/show sources and play audio files
^ that is a good question, I'll ask around for you @fallen horizon
@trim gate i haven't added sparks functionality, that's been added (graciously) by @mild cipher ; however i don't expect that it should be broken because of this, i'll take a peek.
thank you because sparks doesnt act like the ones i listed do when i cycle through the options.
I some help..... How do I setup a point/coin system for my loyalty store. I do not see where to set it up at?
@proven ember YouTube?
@hardy walrus Mixer
Unfortunately it's a missing feature atm.
No. I was only asking that as it's another one lacking it.
But wasn't aware of mixer either.
🔥
@hardy walrus One more thing. Is there a way for me to add a live video to my overlay? like another stream?
@proven ember I think there is some ways to do that, by just adding a browser source
however, do ask permission of the streamer firstly
I got a fun idea for a widget CodeGuru's
what about a widget that shows a animation/video of the amount of giveaway tickets that has been bought
so if someone buys, lets say, 5 tickets for a giveaway, you'll see 5 tickets falling on your stream 🤔
Morning everyone 🙂 . I need to get a widget/overlay with an image that slides on the screen and slides back off every 10 minutes. Is there one in the templates or anything anywhere that i can use?
Asset rotator widget - the animation settings for the widget work with it as well
Thank you 🙂
Hi guys, can I start and end bets/contests via API? Doc about is missing some infos :/
oh, thanks!
is there a text command to start/end contests without having to access the panel? for mods or channel editors to do that.
or I need to develop a own bot to do this?
BordeauxPrime sent me over here regarding a question I had;
Is it possible to have the auto-tweet message send what game we're playing? 🤔 Like by including {game}?
Hey, haven't really dabbled much with the API yet, and SE's Activity Feed isn't sufficient... what's the best way to see "raw" data for followers etc, including timestamps?
Use case example would be to capture lists of spam bots that followed at the same time. 
Hey @broken coyote Your Chat widget does not remove messages when its been deleted in Chat
Can you maybe do something about it?
I was told to ping here
Alright. Thank you sorry for the ping
I don’t mind
@velvet cave any luck?
and if you have any spare, can you pass it along?
Are there any plans on expanding the API for media requests? I would love to have a previous and next function 🙂
@fallen horizon sorry haven't gotten an answer yet, will poke em again!
anyone have experience with voicemeeter streamdeck integrations? I know it is somewhat off topic
@pulsar willow https://streamelements.com/dashboard/overlays/share/5e2dd4c2274656a9e823ebe0
deleting chat messages works now
ok.. i just submit my first widget 😛

Is it possible to group Fields together for a custom widget?
Hello!
Can someone tell me if there is a way to read the width and height from a widget to utilise it in the CSS file?
I want to use the pixel size of the width of a widget for the size of a background image of an element in this widget.
@sand igloo just add "group":"Group name" to field properties
@pulsar willow This one should give you width of widget:
let width=$("body").width();
Thank you @viral patrol
Can you tell me how to bring this value to the CSS file?
With the values from the fields I can use them in double brackets like {{widgetwidth}}
Oh... to the CSS, not really. You might want to dynamically change CSS definition in JS like:
let width=$("body").width();
$(".yourClass").css('width',width*0.5);
You sir, are awesome! That worked perfectly, Thanks!
Thank you!
I'll try that 👍
might be the wrong place to ask. Does anyone know the CSS to fetch and hide/show something from the SE libary
from the SE libary?
@viral patrol That worked. Thanks a lot 😄
@broken coyote from this
fetch an object from this library and then hide it if another is fetched
basically im trying to work out shrouds colour thing. he has the alert play and then at the bottom of his camera, he has a graphic that changes colour depending on what the alert was
oh bubby.
thats not how it works lol
Ever wanted to make some cool stream graphics like the ones Shroud uses? Well, in this video I show you EXACTLY how you can make some awesome Shroud inspired, animated alerts and use them on your Twitch or Mixer stream.
Animated Gradient Webcam: https://youtu.be/j7p7h5jJEWA ...
yes. the bit at the bottom of his camera as sam showed.
that changes colour. the bit going round is easy enough. i can do that
did you watch the whole video? i mean, he shows how to do the whole thing
this bit.
i did watch the whole video. he explained there is custom code for that bit i circled.
sams video shows how to do the smoke and stuff but for the colour changing logo after each alert it must be a fetch and hide code....right?
https://youtu.be/q38HuH0bKZs?t=106 watch the logo change from blue to yellowish
looks to me its the same animation, just changed colors and layered on top of each other. so when it sees a specific alert it just placed the corresponding color file
there is deff alot more to it then just changing some CSS
yes but the logo stays that colour till next alert goes
that is correct. a alert widget times out. it would have to be done from a normal widget
it could also even be the same animation over and over, and just a color filter applied to it i suppose
which is why im thinking if you use CSS for each individual alert to change out the images for logo then it would be simpler?
a coded colour filter could be it as well true
it would have to have JS to capture the listener
yes so a little more than CSS but seems like it would work? just need to work out how to link the code with the library. (its been like 4 years since i did this coding)
the pinned posts have all your answers
Yeah like Boost say.. JS to make listen the event and bring your fx
yea so a eventTarget.addEventListener()
honestly, what your looking for has some what already made. on the "custom widget", its a event list. so it had all the JS basically done besides some small editing of it
yeah i use the "event list" to start as well
How do you tell if someone who sent a message is a follower?
Make a call to the official Twitch API or an endpoint like DecAPI, then cache the response for the session to avoid spamming requests. https://dev.twitch.tv/docs/api/reference#get-users-follows
Okay, thanks. Is it possible to get and spend loyalty points in a widget?
Get points, yes. Remove points from users, also yes, but requires your JWT token, which is like a combined username and password, so you shouldn't have it out in the open in your widget (i.e. where editors can see it). If you don't have any editors and this widget is purely for yourself, and you know the risk, then you're good. Docs are in this channel's header
!dong
(Alternatively external scripts with controlled access works.)
Okay, Thanks!
how do I reference to have a webm file display in a custom alert?
If anyone would be able to code the alert for me for some $ feel free to reach out 😄
thank you so much!!
hi there, how do i find the https address for an audio clip that i have uploaded into streamelements?
@waxen karma Try right click on the sound in SE library.
@pseudo siren thank you for replying, i have been trying to do that but the options are only this
Browser?
firefox
You can open your media library, go to sounds, press Ctrl + Shift + E to bring up the network tab, then play the sound effect and it should pop up there with the link
thank you @mild cipher (love your widgets btw), im around the mark but cant find the address
Thanks! Lol. Did you play the sound? If it still doesn't appear, then you might need to refresh the page and bring up the network tab before clicking play, in case it was cached
nope 😦 tried loading it into alert and playing, and just playing from media library after refreshing
so if the media was already in an alert (or overlay) its cached and wont show
i got a different file to play and show the mp3
Here, threw this together. https://streamelements.com/dashboard/overlays/share/5e310fbd05360b07ccd431a2 - select the media and it should come up with the link in the console
@mild cipher you are amazing... if i wasnt married you would be in trouble... thank you.
LMAO
anyone have a widget that looks for spesific text in chat? I have a !page {message} command in chat that allows users to page me and my stream deck will blink red with the message they provided. would love to implement this into the stream too somehow
found one I could use as inspiration in #widget-share
@maiden dragon you just need to evaluate the text on each message received, I do it like this:
window.addEventListener('onEventReceived', function (obj) {
let message = data["text"];
And from there you can just check if a certain string is in the message variable
You can use the "includes" function
https://www.w3schools.com/jsref/jsref_includes.asp
ye, currently trying to get it to show whatever text is after the page command on stream too 😄
if you have spaces, you can split the message
ye! the include would work well
For example I do this:
var command = message.split(" ")[0];
var soname = message.split(" ")[1];
Also remove characters like ,.?! if you are going this way
If you want to check if somebody typed Kappa and Kappa! should be detected as well
To remove stuff, you can use something like this, I use this specifically to remove "@"
soname = soname.replace(/[@]/,'');
ye, can regex rite?
yep
also, I suggest making everything lower case when comparing, so the text comparison do not fails due to one character being upper case
Hm, ye that would probably be an good idea
any of you that have coded some really unique Widgets?
I love new ideas to use these things and see what others have created / come up with
You can create really complex things with our editor
Not looking to fill my own stream with a lot of stuff since I love minimalism, but the possibilities here are unlimited
Indeed
I wrote a full game in it.
a friend of mine and me are looking into drawing animations with code only
haha, isnt it always when you just wanna test somethings possibilities haha
I have one good one published, and a few custom ones I have made on commission that are not public. It is not terribly complex, its called Awesome shoutout
looking back at stuff I've coded over the years its all a mess since I've never gotten into coding fully, I just understand it and learn as I go along
@steady iron ye I've seen that one around
doesnt have to be complex to be good tho 😉 the simpler the better a lot of times
it started quite simple, now it has grown quite a lot
So i ran into a Problem trying to reduce my Sources in OBS, I want to have my Overlays in one Overlay. But, how on earth do I add a widget that was made by someone else in one Overlay?
I do not want to copy the code
copy the code is so easy tho? Just requires 4 copies
You sure?
^^^^^
does that one allow you to copy it over to other widgets? 😮
It copies an object, if that object is a custom widget, should do the trick
oo, didn't know thats how it worked
correction: it actually duplicates the entire thing, into the overlay you want
Ye, just tested it
Ahhh. Thanks guys
Gonna try now
But if I were to Copy the object, how would I paste it?
Figured it out. Thanks guys :D
good luck! 😄
What's the difference between mod and supermod
Supermod basically gives char control to boot the bot LUL
Chat
Soooo I want to expand the available responses to a given command using random.pick and an external raw file with ; delimited values... API call? (No external script rn...) Or fetch? Or json? Lol sorry... New to Python
@elfin carbon You might want to take a look at this: https://thefyrewire.com/docs/api/twitch/pastebin/
So Ive been having this issue with a gifted sub event in the event rotator by CO6studios and I cant tell where the gifted subs data is being pulled from becuase it isnt within the Data library.
is it a data collection issue?
From what I see it is grabbed from obj.detail.session.data['subscriber-gifted-latest'] on widget load and then from real time events
anybody know why the tabs on the left side of my streamelements wouldn't be there?
Unrelated to the channel, but make sure you are using anything else different from Edge and its updated to the latest version
ope, sorry. Which channel should I post in regards to the actual site?
I mean, this channel is used for community members to talk about our API, not dashboard UI issues.
If you are on twitch #helpdesk-twitch
and etc
but the advise abotu the browser is still valid regardless
Yeah, I just wanted to know for future reference lol. Thank you!
so im using the custom widget event list. how do i swap out the follow badge for a gif ive uploaded to my library? i have tried replaced the CSS with this <https:// streamelements.com/uploads/Follow-Blue.gif> as i do not see where the badge is linked in the JS file
@velvet cave still no luck on the remote parameters stuff? 😦
I have not been online for today yet sorry! Had some house seeings, I will double check with staff when I get home!
Maybe in the new time someone else can take a look, I'll ask around for ya
@fallen horizon I think it is there:
yea ive amended that code and its not affected anything. so i think either my link is wrong or it doesnt work
If you open that URL in browser - do you see an image?
ive inserted the gif and then opened the image in a new tab and copied that URL. it has now led to a white circle in place of the follow badge
What does the console tab in developer console say for the link?
I mean for tthe link in a new tab. Not in editor.
im not understanding what your asking. when i open the image in a new tab theres is nothing in console
@fallen horizon he means for the url of the image - so paste that into the address bar and see what comes up in the console
i did. theres nothing in console.
And does the image so in the browser like a direct link?
yes the image shows when imported into the editor and then opened in a new tab.
my plan is to remove the text and bars altogether and keep just the badges for each event.
Could you please add Text called Sparkles to the streamelements alert text ?
@languid wigeon If it's a Google font you can specify it yourself within the code..
@fallen horizon i tested that link to the image, and its not working for me. not sure where you got it from
Can you answer this Boost?
you will need a woff of the text you want
@broken coyote https://cdn.streamelements.com/uploads/7881997f-68ad-40d1-9ee2-755f1e7c73f6.gif this one works for showing the image in a new tab but is giving me white squares in the event list
ive downloaded the font but yeah no idea
@font-face {
font-family: 'fontnamehere';
src: url('linktofont.com/genxfiveblocker-webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('linktofont.com/genxfiveblocker-webfont.woff') format('woff') /* Pretty Modern Browsers */
}
let me look @fallen horizon
do i need copy that in box ?
no, thats just how you do it
where do i do that
that gets placed in the css
ok ive enabled custom css its open the box do i have to delete everything in that and replace it with box you did
?
i just sat down at my desk so im not fully awake... but @fallen horizon the image you are replacing is a svg. so its currently set up for a svg/mask.
what is the font
right so ill need to completely replace the css setup. ok. i think nerdordie have some CSS that could work
Sparkles its certain type i do have the link if you need it
i do
want send it in dm ?
no
post it here then ?
yea
.event-follower {
background-image: url('https://cdn.streamelements.com/uploads/7881997f-68ad-40d1-9ee2-755f1e7c73f6.gif');
-webkit-mask-image: url('https://cdn.streamelements.com/static/custom-event-list/follower.svg');
}
@fallen horizon
@languid wigeon they dont have a hosted woff & ttf. so you would need to host it somewhere
what you mean by host it some where
ok thanks anyways
thanks @broken coyote thats worked great and thanks@hardy walrus for helping out too
no problem
ok so every single badge works aside from the green (donations/cheers) badge. it is linked in using same code you gave me boost
shoot me the link for that one
?
.event-tip {
background-image: url('https://cdn.streamelements.com/uploads/bf131b8c-7833-40f4-a753-d36beab78921.gif');
-webkit-mask-image: url('https://cdn.streamelements.com/static/custom-event-list/tip.svg');
}
I dunno why mines wasnt working.i had the same code in that you had
Maybe bad cache?
"wasn't"... is it now?
yes its now working. just now getting rid of the wee symbols(star, heart, arrow etc)
I’m hoping I am asking in the correct area, but I am a little lost trying to figure out some custom alerts. I am currently in the process of having some made, but I am trying to locate a source for the coding. As I am aiming to have my alerts appear in the bottom of the camera - anybody point me in a direction of some source material? Please.
https://www.w3schools.com/ has a ton of information
Thank you, I will stick my head that was and see if I can make head or tail of it. I admit it’s my first attempt, so I may get lost
Hello, im just starting at python and cant understand what am i doing wrong to create contest?
@static wigeon i tried, but not there are error "name 'options' is not defined"
Hello guys i am new to the streaming stuff, and as a developer irl i though why not develop my own stuff, but i am getting a hard time to understand how the custom widget stuff work, any place i can figure out, to start learning basics and climb
sorry i found that as ended the msg, just look up
i'm so sorry
tkx @indigo flume 🙂
no probs
Hey so I cant upload any photos to the editor on streamelements
That's what I get even tho it's in the right formats
@light oracle Please keep the conversation in one channel. Thank you.
is it possible to get a subscriber label for twitch that
shows the names
can be set for the stream session
and has all the standard text animations
there isnt a label that does all of these
It is possible
Hey Mr. Lawyer, you know anything about the SE Mixer integration on the NoD UpLink package?
I just read off that
@viral patrol im within the editor of the Roatator by CO6studios and am still having a hard time figuring out how to make the "subscriber-gifted-latest" event separate from the "latest sub" event. Im trying to make it show the sender of the gifts and how many gifts sent, and also have the rotator show the latest subscriber that wasnt a gift. Is it possible
sorry for the late response
Thanks @broken coyote 
Someday I should really learn how to leverage the power of an API
Console.log(obj); is your friend
Hello! I am looking for a widget similar to what Jameskii uses on his streams that shows the amount of messages and emotes used during the stream, as well as an emote combo counter. I can dm a timestamped video link to show what I mean if needed.
Thank you Mitch.
😉
Hey does anyone know if theres a way to run math through a {count} variable in the overlay editor? I'm trying to subtract 1 from my total sub count
@noble girder $(customapi.api.mathjs.org/v4/?expr=$(channel.subs)-1)
@mild cipher does that work for overlay editor?
@mild cipher hi there, i am using your recent event rotator. i would like to align the text to the right of the field, which i have been able to do in the overlay, but in obslive it appears to the left or center. @indigo flume suggested i contact you directly for assistance.
@noble girder For overlay editor you might want to use custom labels widget from our github and change line https://github.com/StreamElements/widgets/blob/master/CustomLabels/widget.js#L30
FROM:
$(".main-container").html(data[eventType]["name"] + " X" + data[eventType]["amount"]).toLocaleString(userLocale);
TO:
$(".main-container").html(data[eventType]["name"] + " X" + data[eventType]["amount"]-1).toLocaleString(userLocale);
Lmaoo I guess that would work
Hey guys hope everyone is doing well, just wondering if its possible to create a chat command that will earn loyalty points at a 50% chance rate? for example (!earn) will then generate a number from 1-100 : if the number is between 1-50 they will earn X amount of "loyalty points" : if its between 50-100 they get nothing. That would give them a 50% success rate. Do the variables offer such functionality?
PS : I got this far
${random.1-100} - to be used to generate the number
!givepoints ${user} 100 - to reward the user 100 points (hoping i can use a variable for this too)
${count - i feel like i can use a count variable to verify if the number is between 1-50 but not sure which one to use
i tried in the twitch helpdesk and was referred here, Hope you can help! 😄
@waxen karma on line 10 of the CSS, change this to justify-content: flex-end;
@broken anchor there aren't any variables that can add points to users, so the best you can do is have the random number generator command and then have a mod manually give points if the number is 1 - 50. You can give the command a very long user cooldown so that they can only do it once every X hours.
@mild cipher hmmm ok so i cant give points automatically, but can i out put a simple message like "you have found x ${pointsname}" or "you got nothing" instead of displaying the number?
You can do that. If you don't mind quotation marks around the response (due to the nature of the customapi you can't remove them) then you can use this:
$(customapi.https://api.mathjs.org/v4/?expr=$(queryencode 'floor(random()*100)+1 > 50 ? "You got nothing!" : "You found 500 points!"'))
(Otherwise there's another possible customapi but eh)
Actually the other customapi would be easy since it's 50/50
You can achieve the same with default ${random}
True 
Overengineering - I know that feeling 😉
${random.pick 'You got nothing!' 'You found 500 points'}
@mild cipher 👍 thank you, works great
oh damn nice, the custom api seems very powerfull i should look into that more ! but like this we can control the success rate too 😄
You can alter success rate here too!
Do you want 25% chance of winning? ${random.pick 'You got nothing!' 'You got nothing!' 'You got nothing!' 'You found 500 points'}

ohhhhh i get it 😄
sweet, yeah that makes it really simple actually haha
now i just wish the output can be !givepoints ${user} 😖 but no worries, thanks for the help guys !
To prevent creating black holes, the bot can't trigger itself I'm afraid
i can see how it could create a never ending loop yeah 😦
might crash the bot in bulk i assume
either way thank you for the lesson and info 😄
If you don't mind using another bot as a mitm....
I just know when to think outside the box 🧠
Ohhh. About another bot - I think twitch is against that.
Bots shouldn't interact with each other
I wouldn't blame them if it is but I'd assume minute and small usage would be "okay".
I was wondering if there is like any Documentation over Widget variables?
Im Trying to get my Recent Cheers to do the same as my Latest Cheer Widget. Is that possible? to get the bit Emojis to animate like that?
I'm editing my overlays and I want to change the duration of the overlay but when I change it to 5 seconds the text is up for 5 seconds but the animation is still up for 10 seconds. How do I make the animation the same time as the text duration?
@unique mountain https://github.com/StreamElements/widgets/blob/master/CustomCode.md - for your purpose you can just play with default custom code and allow cheers only to pass it.
@simple wraith been a bit since i asked you to take a peek at the way the step goal widget was working. have you seen what i was talking about as far as it doing step highlighting and such?
@trim gate i can't find a way to emulate sparks/embers in SE widget, @mild cipher has added some of that functionality and i can't find it in the converted code. Fyre, can you check how/why embers/sparks are not working? Mixer stuff is beyond me
@trim gate can you send me an editor invite link to your mixer account?
I got a problem importing from DeepBot to StreamElements. What I did: Open DeepBot (I have a VIP account and it is still active). Go to the options and get my security key.
Then go to my StreamElements Import page and click on Import Now (DeepBot) and put in my DeepBot API Secret and click Import now. DeepBot is still active.
It tells me that it is loading in users and 1 second after that I get a screen with "Loading 14041 users...." and 2 buttons. Back and Retry. Even with waiting for an hour nothing happend.
I only got a couple of days left on my subscription on DeepBot and hope this can be fixed before it ends. 😦
hello, i'm using this widget https://strms.net/on-screen-commands_by_zanzer but the videos that play from commands that are larger res than the stream play at their native resolution and I don't know how to scale them, anyone knows how to fix?
Hi, trying to retrieve Store items through
GET https://api.streamelements.com/kappa/v2/store/bitbitbitbit/items
Headers:
Content-Type application/json
Accept application/json
Authorization Bearer <secret>
but I am getting an empty response
[]
@lean jay use your StreamElements channel ID instead of channel name
@crude crest your help is required by @wind elm
Thanks Rene :)
Hello fellows, nice to meet you. I have a doubt. Is there any way to do custom alerts via API? It's for a "custom" payment method.
@pulsar willow It is possible by this endpoint: https://docs.streamelements.com/reference/tips#tipsbychannelpost
thanks, @viral patrol
So I've been using https://cors-anywhere.herokuapp.com/ to forward from streamelements to my server (because my server is using http instead of https). I use the following code..
var xhttp;
xhttp = new XMLHttpRequest();
xhttp.open("GET", "https://cors-anywhere.herokuapp.com/http://www.5thWallGaming.com/TwitchChatbot/index.cfm?Hours=0&Username="+username+"",true);
xhttp.setRequestHeader("Origin","StreamElements.com");
xhttp.send();
but this still fails. Any thoughts on how to get it to work again?
@lusty portal
var username = 'mrboost';
var url = "https://cors-anywhere.herokuapp.com/https://twitch.api.scorpstuff.com/affiliate.php?user="+username+"";
function corsanywhere() {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", url, false);
xmlHttp.send(null);
var result = xmlHttp.responseText;
console.log(result);
}
corsanywhere();
i always know im wrong, or did it the hard way if i see "lx is typing"
This one might get glitchy:
xhttp.setRequestHeader("Origin","StreamElements.com");
as not every environment allows you to set this header
And your function I would do different way to make it AMAZING.
Like AMAZING
like.. turn the roomba on amazing?
function corsanywhere(url) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", url, false);
xmlHttp.send(null);
return xmlHttp.responseText;
}
var username = 'mrboost';
var url = "https://cors-anywhere.herokuapp.com/https://twitch.api.scorpstuff.com/affiliate.php?user="+username+"";
let response = corsanywhere(url);
console.log(response);
lol you would
This way you don't have to alter global variable, but you can corseanywhere("http://afa.asdfgsdg.su/?something=big")
legally I don't believe you'd be allowed to do that....I would have to ask my lawyer
When I do that, I get an error saying that I need to add an origin header.
according to the javascript law 1032c.10... i'll allow it
One moment
"Missing required request header. Must specify one of: origin,x-requested-with"
whats the username you are piping in?
Lance_Lake
Actually, it's pulling from the event.
For the example, it should say "Hey.. @Lance_Lake. Something went wrong pulling up the Action."
@lusty portal
const getCors=(url)=>{
return new Promise(function(resolve, reject) {
fetch(`https://cors-anywhere.herokuapp.com/${url}`,{headers:{'x-requested-with':'xhr'}}).then(resp=>resp.text()).then((data)=>{
resolve(data);
});
});
}
let url="https://twitch.api.scorpstuff.com/affiliate.php?user=JustATest";
getCors(url).then((data)=>{
console.log(data);
});
it does
But it doesn't seem to pass it along.
So... I populate the "let url=" with the URL I want it to go to?
var username = 'Lance_Lake';
const getCors=(url)=>{
return new Promise(function(resolve, reject) {
fetch(`https://cors-anywhere.herokuapp.com/${url}`,{headers:{'x-requested-with':'xhr'}}).then(resp=>resp.text()).then((data)=>{
resolve(data);
});
});
}
let url="http://www.5thWallGaming.com/TwitchChatbot/index.cfm?Hours=0&Username="+username+"";
getCors(url).then((data)=>{
console.log(data);
});
I can't pretend I'm not confused by this.. But I'm trying to fit it into what I have already written. BRB.
Nope.. That didn't work.
window.addEventListener('onEventReceived', function (obj)
{
if (!obj.detail.event) {return;}
const event = obj.detail.event;
if (typeof obj.detail.event.itemId !== "undefined")
{obj.detail.listener = "redemption-latest"}
const getCors=(url)=>
{
return new Promise(function(resolve, reject)
{
fetch(`https://cors-anywhere.herokuapp.com/${url}`,{headers:{'x-requested-with':'xhr'}}).then(resp=>resp.text()).then((data)=>{
resolve(data);
});
});
}
if (event.type === 'follower') {addFollowEvent(event.name);};
}
);
function addFollowEvent(username)
{
let url="http://www.5thWallGaming.com/TwitchChatbot/index.cfm?Hours=0&action=Event&Username="+username+"&Password=RemovedForSecurityReasons&Type=Follow";
getCors(url).then((data)=>{console.log(data);});
};
That's the full code.. So is streamlabs blocking something?
Do you want to display it in the widget instead of console?
If so - replace console.log(data) with something that puts data in widget
I want it to go to that URL when that action (follow) happens.
This is a seperate layer that is hidden.
It was working as I had it before 1-22-2020.
Then it stopped working.
So something changed.. It's nice to know I wasn't blacklisted or some such, but then streamelements must've did something different.
But can you see information in console?
Can you show me how to see the console on the editor in streamelements? 🙂
CTRL+SHIFT+J
.....
It writes to my own console....
I never knew this..
.....
Ok... I may be able to figure this out then..
Give me a sec...
Alertbox doesn't write to console, some time ago custom widget didn't write there as well
Hey LX, your "Latest Youtube Video" widget animations dont play in the overlay editor
Checking it now.
Alright
My Browser's Hardware accel is enabled
I think I have the same enabled as well. Maybe your uBlock/uMatrix or other js/css blocking addon blocks animations plugin?
Does it work in OBS?
Nope
Can you dm editor invitation link to your account so I can investigate it directly there?
Of course
const getCors=(url)=>
{
return new Promise
(
function(resolve, reject)
{
fetch(
`https://cors-anywhere.herokuapp.com/${url}`,
{headers:
{'x-requested-with':'xhr'
}
}
)
.then(resp=>resp.text())
.then(
(data)=>{resolve(data);}
);
}
);
}
window.addEventListener('onEventReceived', function (obj)
{
if (!obj.detail.event) {return;}
const event = obj.detail.event;
if (event.type === 'follower') {addFollowEvent(event.name);};
}
);
function addFollowEvent(username)
{
let url="http://www.5thWallGaming.com/TwitchChatbot/index.cfm?Hours=0&action=Event&Username="+username+"&Password=RemovedForSecurityReasons&Type=Follow";
getCors(url).then((data)=>{console.log(data);});
};
Ok. I give up. Why is this sending 2 URLs?
is it sending the same thing twice?
Maybe you have this overlay twice in OBS?
I don't think I do.. But I will doublecheck..
ugh. obs.live need a test button
I usually click "replay"
3 hours of debugging?
lol
Do you have a rubber ducky sitting with you?
LOL
been there done that
This is not my first time.
and wont be the last
Thanks to both of you for the help.
no prob cap'n
I hope you didn't killed yourself by facepalm. I was pretty close of doing so few times when I did simple mistakes 😉
No.. I'm still alive.. Though dizzy.
I had a sandwich made and I'm going to go watch youtube now and try to live off this shame. 🙂
Just check if you have a sandwitch on your plate and there is no other sandwitches left in kitchen, in the fridge and so on 😉
Is there a way to have a custom widget in multiple overlays but edit the code for all instances?
Not that I am aware of. You would need to copy the widget to the new overlays.
So, if I have a widget that I want to have different field values on each overlay to update the code for all of them I have to pretty much copy the new widget with code and just re input the fields?
Afaik, yes.
I'm trying to do a simple request in the API but I keep getting a "error":"Unauthorized","message":"invalid token"
What does your request look like? Minus the token of course
let data = {message: "I'm a bot!"};
let xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.streamelements.com/kappa/v2/bot/"+owner+"/say");
xhr.setRequestHeader("accept", "application/json");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Bearer '"+JWTtoken+"'");
xhr.send(JSON.stringify(data));
It's in Javascript
There shouldn't be any quotes around the actual token, it's just Authorization: Bearer XXXXXXXX
So "Bearer " + JWTtoken
With the quotes i get {"statusCode":401,"error":"Unauthorized","message":"invalid token"}
Without the quotes i get {"statusCode":403,"error":"Forbidden","message":"No channel authorization found"}
What are you using for owner?
If you're using the channel name, it should be StreamElements channel ID
my channel name 'necrotheif'
Which is also that
I get the same results when I type it like https://api.streamelements.com/kappa/v2/bot/necrotheif/say
You'll want 5e2ce7b63eae7d9a6e6fbb6c
Yay! Thanks! That worked!

Please keep in mind the security risks if you're doing this inside a custom widget by the way, as any editors with access to your account and overlays will be able to find your JWT token in your widget, which is basically your account's password. If you have no editors and this widget is only for you, then you're probably okay
If you have no editors and this widget is only for you, then you're probably okay
^ That is my current situation but is there a way to do it that is safer?
Oh, and I have the JWT as a field so if I share it, it won't have that. right?
I'm afraid you wouldn't be able to share any widget that requires another user to put their token in a custom field- they could have editors or give editors access in the future and their entire account is then compromised.
A much safer approach is to use the oauth2 flow. The bot:write scope gives you access to these bot endpoints. You can apply for access here: https://strms.net/oauth2_request
Ah, so if It got approved for that I could have bot integration with a widget and share it?
Sure. You would need to be able to securely store the user tokens, then you can act as a man-in-the-middle between tokens and the widget, with controlled access
Ohhh... Okay. Got it. Thanks!
I couldn't find any channel dedicated for help with the overlay editor, is it alright to ask here?
If it's custom code related then here is good, otherwise you'll want the helpdesk for your platform
Hey @broken coyote Can I make your widget show one goal?
you can. set the ones you dont want to show to 0
Alright thank you
no problem
Anyone notice a problem with alerts?
The sample alerts work fine and as of 3 hours ago, worked fine when they triggered...
But now, cors isn't sending data anymore.
you have a ton of issues with that thing lol
Yeah.. I know.
I wish there was some other relay I could use or I wish streamelements would let me send data to http addresses.
I think I just need to drop some money and hire someone to make my VM accept https and then I can just go directly to the server.
@zenith folio get in touch with caffeine.tv and start working on offering stream alerts there. We neeeeed it.
@boreal cedar 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.
Can someone explain the difference between bulkGifted and gifted ?
I believe bulkGifted is for when someone gifts multiple subs at once
^
gifted is basically the same, but for 1 individual sub event
but then again if that sub event is a bulkGift then you need to find its amount to see if its 2 or 1000 gifted subs
but gifted is always true no matter how many he gifted right now, right?
yes
so if you are looking for the community gift -> if gifted === 'true' && bulkGift === true => do stuff
if you are doing a sub counter why have it increment by 1
when you can just add that specific amount?
it will be false, thats why you have the else if
I am trying to figure out how to get the number of subs one person gifted over the last month
ah thats different
we do not have a way to track that or provide it via the custom widget api
data["subscriber-gifted-latest"]["amount"] This one is only how many he gifted at one particular time correct?
hm
that should be the all time one
for counts we have recent gifted and all time gifter
I am looking at a custom widget right now that can rotate the text between all follower of the past 2 weeks, all subs of the past 2 weeks etc.
Shouldn't it be possible to do that for gifted subs?
I don't believe you can iterate through the aggregates based on time, only via pages or the last X followers/subs
unless im remembering incorrectly, some of the code gurus might be able to answer that properly
I am not 100% sure how this script here works, but I think it detects sub events, follow events etc. and then adds and saves them. Then the widget selects only values from events that happened in the past 2 weeks
I might be completely wrong
Is there some kind of console where I can log?
F12
thanks
"giftedSub": {
"type": "dropdown",
"label": "Gifted subs only?",
"value": "yes",
"options": {
"yes": "Yes",
"no": "No"
}
},
I have this in my Fields
and I set it in the widget UI to 'YES'
but whenever I check if it is yes, it returns false
if(prefs.giftedSub === 'yes')
what am I doing wrong?
nevermind
I found the answer lol
Debugging software with a rubber ducky
If I have a name of someone, how do I get the total amount of subs they gifted, ever?
Should I iterate over obj["detail"]["session"]["data"]["subscriber-alltime-gifter"] ?
This one is not iteratable AFAIK. It contains just one person.
Unfortunately there is no aggregate over shorter periods.
So I cannot get the total subs they gifted?
You cannot find how many specified person gifted, you can only check who and how many subs were gifted by the #1 sub gifter
hmm
gifted seems to be false if more than 1 sub is gifted at a time
or rather, if I try to do "community gift" thing to test multiple gifted subs
I don't understand when that would be triggered
any one have a great way to have custom alerts triggered from external website, going through the API docs and can't seem to find anything. lets say i have a shop and when some one buys stuff there i want to trigger an alert on stream, any one have some examples or anything i can work from?
Anyone know how to program a countdown timer? I have one for my starting soon screen and would like it to countdown from 5 minutes to zero. Resource point or advice would be amazing
@inland wagon https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event you can check difference between gifted, bulkGifted and isCommunityGift
@simple cove We have a default countdown widget you might use. No coding required.
@kind dock The only ways I can think of is to connect to websockets on your server and listen to events or fetch last order list via REST API every X seconds and display new orders. Some shop services offer webhooks requests as well, so you can use "webhooks to websockets" services and use them.
So there is no way to hook into the merch alert like we can hook into the tipping system ?
I think that the best way is to use webhooks to websockets. It would be "almost" like the tipping I helped you with, but widget will connect directly to websockets, without adding activity to feed.
I found something like: https://hook.io/
i think i need to have a look at this when i'm not sick, because it makes no sense right now how i should go about it
@viral patrol hmm. The widget sounds good, but I wonder how customisable it is.
You can define font settings and time, that's for sure.
hi. does anyone know what i could be doing wrong. i have uploaded my own image for my follower/ donation and ive created a widget for just follower for the moment and have erased the animation only want the txt but when i try to emulate nothing shows up.i have also made sure that that file is above the image file to display butr nothing shows
im sorry im very new i dont understand
Captain, he is talkking about something else i reckon, I'll ask LX if he can help you out
yeah sorry about that
all good
Hi! I think that you need to use custom code for that. Just toggle "Enable custom CSS" then "Open editor" and remove this part:
Oh. Neverming. Found an actual solution 😉
The default widget text settings have -50 as top margin (Text settings => Advanced). Change it to 0 and you should be able to see alert text.
@steady horizon
thanks will check it out
Can I write a twitch bot in C# and somehow interact with StreamElements widgets from that bot?
I've come across a lib for C# that uses Twitch API
What interaction you need?
As there might be no need to write anything external, as custom widgets can listen to chat on their own.
First I need the ability for command parameters (for example !poebot sunder where sunder is a string fetched by the bot if possible), then I need to get data from the path of exile wiki, and I'd be more comfortable to do all this in C# as I have no experience in javascript. Then, ideally the fetched data should pop up on stream as a widget for X amount of time. ^^
So you can get info about skills from a wiki by asking the chat bot, then it shows up on stream
If this is all possible within javascript/streamelements that'd be good too
Oh... Scraping a website via JS in frontend would have a lot of limitations. If you have any place that will give you text response for call https://test.test/?term=sunder, it would be possible. But wiki is whole xhtml, so grabbing that would be problematic.
Text response or JSON object would be the best for that.
the poe wiki uses the mediawiki API https://www.mediawiki.org/wiki/API:Main_page
not sure if this would work
The best I could find with it is: https://pathofexile.gamepedia.com/api.php?action=query&prop=extracts&exsentences=10&exlimit=1&titles=Sunder&explaintext=0&formatversion=2&format=json
that seems to be everything packed into one string but if it only works like that it's fine I could split that up I guess
how did you get that?
I took a look at API docs you gave me and prepared that example
ohhh
sorry I've never done web stuff.. I think I see what u did
Anyway, is it possible to call javascript stuff in Streamelements from C#?
That would make my work a lot easier
I think that could be possible. For example socket.io on both ends - one in JS (client) and one in C# (server)
hmm great!
But it still requires coding in JS to parse events coming from that socket. I think that the best way is just to write the whole stuff in JS.
const getCors = (url) => {
return new Promise
(
function (resolve, reject) {
fetch(
`https://cors-anywhere.herokuapp.com/${url}`,
{
headers:
{
'x-requested-with': 'xhr'
}
}
)
.then(resp => resp.json())
.then(
(data) => {
resolve(data);
}
);
}
);
}
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
if (listener !== "message") return;
console.log(obj.detail);
let message = obj.detail.event.data.text;
if (message.startsWith('!poebot ')) {
message = message.replace('!poebot ', "").replace(' ', '_');
message = message.charAt(0).toUpperCase() + message.substring(1);
getCors(`https://pathofexile.gamepedia.com/api.php?action=query&prop=extracts&exsentences=10&exlimit=1&titles=${message}&explaintext=0&formatversion=2&format=json`).then(obj => {
const text = obj['query']['pages'][0].extract;
$(".main-container").text(text);
});
}
});
Something like that
With that when I typed !poebot sunder in chat I got this:
@inland wagon ⤴️
You're welcome.
another thing I am not sure if doing correctly, if(data.gifted === false && data.bulkGifted === false && data.isCommunityGift === false) Is this the correct way to check if the subscription is NOT a gift and just a normal sub? Not sure if I need isCommunityGift here
I would do that like: if(data.gifted || data.bulkGifted || data.isCommunityGift) return;
kk
hmm how do I emulate a chat message?
one day. i hope to be just like lx
Just write chat message on chat. Don't be afraid to do so 😉
go to the page that account is attached to
oh thanks
with the code all I get is Object { listener: "message", event: {…} } in the console, but the widget doesn't change
event: Object { service: "twitch", data: {…}, renderedText: "!poebot sunder" }
is $(".main-container") not the current widget?
You should leave html untouched from default custom widget, remove CSS and FIELDS and it should be working.
ahh yeah the class was different
thx
Is it possible to keep new line characters in the text?
like, I don't think I can effectively split the string if it goes like this: 5% of Base Attack DamageShockwaves deal 60% less Damage+5 to radiusPlace into an item
You can use different endpoint like: https://pathofexile.gamepedia.com/api.php?action=parse&page=Sunder&prop=text&formatversion=2&format=json
Then create a virtual element of parse.text
Then extract something via DOMDocument
@steady horizon use FFMPEG to convert it to webm: ffmpeg -i currentFile.mov -c:v libvpx-vp9 -pix_fmt yuva420p converted.webm
I have no clue how to do that what do u mean?
u need FFMPEG
huh
@steady horizon https://www.ffmpeg.org/download.html
I guess I should try going the C# route and communicating via sockets
talking to the wiki API should be easier
@inland wagon you will have same issue there - how to extract a part of DOMDocument to be displayed
Thanks @viral patrol
the wiki API can output json php xml txt etc.
so from what I understand I should be able to get properties easily rather than doing text parsing myself
Of course it can.
But in each output you will have same text.
It will just wrap an object into form you specify
For example XML:
then do it in C#
yup
lol
OK. The last try, to show you how to extract needed part, as this seems to be easy:
const getCors = (url) => {
return new Promise
(
function (resolve, reject) {
fetch(
`https://cors-anywhere.herokuapp.com/${url}`,
{
headers:
{
'x-requested-with': 'xhr'
}
}
)
.then(resp => resp.json())
.then(
(data) => {
resolve(data);
}
);
}
);
}
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
if (listener !== "message") return;
console.log(obj.detail);
let message = obj.detail.event.data.text;
if (message.startsWith('!poebot ')) {
message = message.replace('!poebot ', "").replace(' ', '_');
message = message.replace(/^\w/, c => c.toUpperCase());
getCors(`https://pathofexile.gamepedia.com/api.php?action=parse&page=${message}&prop=text&formatversion=2&format=json`).then(obj => {
//There you can change whatever you want to display by class name, -gemdesc seems to be an excerpt
const text = $(obj['parse']['text']).find(".-gemdesc").text();
$(".main-container").text(text);
});
}
});
@inland wagon ⤴️
you're a hero

what types of elements does $(obj['parse']['text']) contain?
the class names?
It is the whole html from API call
You can see example above
You can use different endpoint like: https://pathofexile.gamepedia.com/api.php?action=parse&page=Sunder&prop=text&formatversion=2&format=json
$ is a jQuery so this assigment is is set text to value of jQuery element made from obj.parse.text
oh so it's a string
I'm trying to figure out how to get all occurences of -mod because there are multiple ones in the HTML
thought I'd use find() in a loop with substrings until the end of the file
Of course you can iterate over it
For example:
let text='';
$(obj['parse']['text']).find(".-mod").each((index,element)=>{
text+=$(element).text()+"<br/>";
});
$(".main-container").html(text);
@viral patrol I tried to install ffmpeg but my cmd is not reconising it ive followed a youtube on how to install but nothing working this system isnt that easy to use
just google online converters. there is tons of them
I think that filesize might be way too big for online converters.
@velvet cave still no luck finding out ? I guess its not by how long weve been waiting
i havent received any feedback no, did no-one send an answer without tagging you?
it could be that someone answered it while i was working or sleeping, which day did you ask again?
Does anyone know if it's possible to make a widget or sumthin to display the streamtitle as a label (just like latest sub or similar)?
(repost from #general-chat )
Sure thing!
@primal flume this one should allow you to display some additional data: https://streamelements.com/dashboard/overlays/share/5e3d4f859b7bf7b57841be9b
@viral patrol thanks a bunch !!
Hi all! I'm looking to make a command to have streamelements say something, similar to the $(queryencode $(1:)) but without the + between read back. Does anyone know how to do this? Echo maybe?
So just $(1:)?
Perfect! Thank you so much @mild cipher
@fallen horizon read up on your query and I do have a project in progress which does this- using commands/chat keywords/channel points to swap scenes/toggle sources, play media popups with a bunch of extra stuff. In closed beta, no ETA yet. - https://twitter.com/MikeyHay/status/1222587904494571520
What's this? A curious new button popped up on Triggerfyre for @Twitch...? 💵
You can now link all your triggers to custom Twitch rewards! Let your viewers use channel points to activate media popups, sound effects and switch scenes and toggle sources in OBS! 🙌 https...
146
Is there a way to ignore the @user? Example !give @pastel raft something. The command I've set for this is "Here you go $(user), this is from $(sender) it's $(1:)!" But because you have to @ a user, the message displayed is " here you go user, this is from sender, it's @ user something!
I ran into a similar issue making a !last command which calls up the last thing a user said, the issue is that if you use it to call up your own last message it just says that you said !last lol
You'll want something like Here you go $(channel $(1)), this is from $(sender), it's $(2:)!
You're amazing!
https://discuss.dev.twitch.tv/t/ip-address-rate-limiting-for-v5-endpoints/24005
Will this effect SE bot or other features?
Effective February 28, 2020, the deprecated Kraken v5 API will be rate limited to an IP address basis of 80 requests per minute. In other words, requests from each IP address using your application are rate limited to 80 requests per minute. These new rate limits will not app...
Says rates will not effect extensions submitted before February 28
curious to why FFZ and moobot + other think it will effect them then. but looks like the updated the post and delayed it now due to backlash
Hi there, I am looking into building a custom widget and I'm curious to know if widget fields etc are available outside the overlay editor? Seems a bit counter intuitive to me to have these controls hidden behind the editor, perhaps in StreamElements OBS?
you can use jsfiddle to make the html and the css, and then go back to se web editor to pit it all together + js and the json file
if you need more info about the events and variables you can jump into the github
but the widget "Custom widget" come with the event list by default so you can guide from there
I mean for the streamer to interact with the fields during a stream, surely they dont have to open the editor for that?
I have been using the editor to develop my widget
you can make your widget react to a specific command or event, but yes the config of the widget is on the web editor
Hmm ok because I was hoping to use button fields as triggers from the streamer
maybe it can just be chat commands
yeah 
You can do buttons, but the editor would have to be open and the streamer would have to press them
is there anything exposed in a custom widget that gets the current total for that event? Like checking the total follow count or total sub count when a new one comes in?
ahhh. for some reason i was only getting a single event logged to my console before, I guess a refresh fixed that so I'm seeing all of them now. Thanks.
so just to clarify, the data i'd get from onSessionUpdate for follower-total will be correct in production, but isn't when emulating a follow, right?
yes
@mild cipher I was wondering, I would rather not use the widget and try to learn a little css and java. I know it’s possible, but I do not have a clue where to start
Think you might have tagged the wrong person lol. In any case you probably mean JavaScript (different to Java). w3schools can be a good jumping off point, but I highly recommend the official MDN docs, which are always kept up to date (lots of w3schools is outdated).
Starting points:
HTML: https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started
CSS: https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/What_is_CSS
JS: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics
Widgets are basically just mini self-contained web apps, like a webpage, but inside a frame. So as long as you know how to do the basics of HTML (structuring it), CSS (styling it) and JS (activating it), then you can make widgets.
You've reached the end of the article — we hope you enjoyed your tour of the very basics of HTML! At this point you should understand what the language looks like, how it works at a basic level, and be able to write a few elements and attributes. This is the perfect place...
CSS (Cascading Style Sheets) allows you to create great-looking web pages, but how does it work under the hood? This article explains what CSS is, with a simple syntax example, and also covers some key terms about the language.
This is also a cute site for learning JS. http://jsforcats.com/ 
@upper bough Hi there! if you're not too busy, could you help me how to have several gifs for each event? I'm not too familiar with JS so i'm having troubles tryna get it to work. This is for your FunnyNotifications widget btw
@pulsar willow for now its meant to have only 1 animated image as "stream mascot" or something like that (lol) and then when event happens some variation of the animated image appears or another gif.
note: wip adding sound to a celebrationImage
oh no I know
I just wanted to know if you could possibly help me make another gif thing
ooh you want to change the behavior ... kk
you are the 2nd person to give me any feedback i willing to do it if its gonna help anyone 😁
i think its really cool for what its worth, I couldn't find anything that remotely resembled it yet
if you'd like, in exchange for helping me I could make basic pixel animations for you if you'd like
You make my day!! give me a couple of hours and ill do it... you dont have to give me anything in exchange but my DMs are open 
sure np! its all I could do to thank you for helping me
Hello, My twitch username is TheEager, My chatstats is giving me 404 for a while now, how to fix this? https://stats.streamelements.com/c/theeager
did you change your name?
i did it like 2 years go 
probably, i wasn't using streamelements in the past tho
thank you ruben 
https://gyazo.com/7572eb0aca08a9049a827ab74fa64a7f got as far as here, but im not sure how to prevent emojis from being matched
I would add ^(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])
I tried something like that this morning
\u isn't used for unicode in re2 syntax i think
I saw something like that: https://stackoverflow.com/questions/35469936/how-do-i-count-all-cells-in-a-column-that-have-emoji
hi all i look for help with a Regular expression Band phrase for Wanna become famous?
Is there a way to have a custom CSS and add another video for alerts?
So youre wanting it to randomly or cycle through videos for alerts?
So I have a custom CSS for like how it should look. In SE editor I can change the sound alert but when I put something in the video alert, the video doesn't play
Are you using the default alerts and just edited the css?
Ahh, theres the nerd weve all learned to love and adore 
Using alerts that I received in a package from NerdorDie @broken coyote When I try adding a video the video doesn't work. Adding a sound just works fine
Borderline
So is this something custom you’ve added? Because that package doesn’t support videos
Nope
Oh okay, and if I make a variation, turn off custom CSS, it works. But how do i make the video smaller without having to downscale my full alert box?
Are you putting the video in SE’s image/video box?
video box
I’m about to put the kids to bed. I’ll get you your answer when I’m done
ok ty @broken coyote
🤪
<div id="videoHolder">
<div id="imgBg" class="bg"></div>
<video id="video" playsinline autoplay><source id="alertImg" src="{{video}}" type="video/webm"></video>
</div>
#videoHolder {
display: inline-block;
overflow: hidden;
position: absolute;
top: 15%;
left: 35%;
}
#videoHolder video {
max-width: 500px;
max-height: 500px;
vertical-align: bottom;
}
@fossil tide
I think there is some kind of filtering on the username going on. When I send in a username of "nickalass", I get sent "nickal***"
When it alerts, I also get this happening..
Is there some setting that I'm not aware of to turn off moderation to the alerts?
If someone on desktop isn't faster I can get what you're looking for.
Wait is this for chat notifications?
Is it chat notifications and alerts?
Yes
Wait..
I don't use chat notifications..
Just alerts.
Would the bot change the alert?
Check the alert settings for a profanity filter
It's the default one. I see no such setting.
Is it only tip alerts?
Do you have that setting checked in your tipping settings?
I’m wondering if it’s being applied to alerts
If it’s enabled can you disable it and test?
Yup. Apparently, tip settings moderate all your alerts.
Indeed.
Not sure if this is the right chat. Can someone tell me the right place to ask about alert emulations not playing in browser or in obs? Thanks in advance
@lunar wraith if you're talking about the alert testing in the SE Overlay editor, next to the button for tests there is a checkbox
Thanks for the reply @carmine atlas - I am aware of the checkmark and have attempted to uncheck and recheck, as well re-establishing my twitch connection and reseting the session data without avail - SOLVED
Posting here because not getting any traction on #helpdesk-twitch
will a timer set for offline only, trigger when running a re-run?
@carmine atlas Asking in multiple channels doesn't help. Only reason I haven't answered is because I don't know.
@hardy walrus i would prefer that answer to no answer
Hello,
I'm having troubles with adding items to store. I'm sending required parameters (name, description) to the endpoint and I'm still getting error, that these two parameters are not set.
@keen ivy Hi, Can you share what you send?
in the current code, I was just posting array, encoded to json, but I remember I was trying it once, and it was working, when I tried it today, it didn't work and throwed the same error https://puu.sh/F8Mna/09dd6ce188.png
this is the error
You should json_encode this array and send it as post body (not post fields).
yes, I have it encoded to json and sent as body
What endpoint are you using?
store/channel/items with POST request
Body for that endpoint is bit more complex from what I see
{
"enabled": true,
"featured": false,
"name": "Test item",
"description": "Test description",
"type": "perk",
"accessLevel": 100,
"cost": 1,
"cooldown": {
"user": 10,
"global": 0
},
"quantity": {
"total": -1
},
"alert": {
"enabled": true,
"graphics": {
"duration": 8
},
"audio": {
"volume": 0.5,
"src": null
}
},
"bot": {
"enabled": true,
"identifier": "TestItem"
},
"userInput": [],
"accessCodes": {
"keys": [],
"mode": "multi"
}
}
There's no storeAddItem function, but you can add it easily
And composer.json contents:
{
"require": {
"guzzlehttp/guzzle":"^6.0",
"league/oauth2-client": "^2.4"
}
}
This one should work
tysm @broken coyote
@viral patrol I might have another problem, I added the function and it works, items are adding to the store, but there is problem, where I can see the item in API calls but I can't find them in dashboard
I copied the structure of existing items, so I know, how to add working item, but they are not showing up
It will be in response or in GET /store/channel/items
yeah, I can get them this way, but what do I need to change/add so they are showing up in store?
@viral patrol found it
I forgot to add
"sources": [
"website"
]
Hello, My twitch username is TheEager, My chatstats is giving me 404 for a while now, how to fix this? https://stats.streamelements.com/c/theeager
Please help me on this one
@lusty pivot what is your previous username on twitch? This happens when you change nickname ( https://stats.streamelements.com/c/YourPreviousNickname should be working in that case). We can merge that, but we need your previous username.
@viral patrol it might be alikhalilifar, but i'm not sure 
I have forwarded it. For next issues, please use helpdesk-twitch as this channel is for coding/API related things helpdesk
@lusty pivot fixed
youre my hero 
is there anyway to call the twitch api to list everyone thats hosting you
@pine marten you can use service in the middle (decapi). You can find integration with them in that widget: https://discordapp.com/channels/141203863863558144/259680142459142144/675311418173685760
@viral patrol i just want to display in the chat cause i streaming directly from xbox and ps4
@pine marten Create a command with response ${customapi.https://decapi.me/twitch/hosts/${channel}?implode=1}
okay so here its customapi
@viral patrol thank you very much, my stream is now 100% SE
I have a question why am I not looking SE.pay?
Maybe a stupid question but where can I find a commandId? 😅
@vital sedge check this https://docs.streamelements.com/reference/commands#botcommandspublicbychannelget
Is a StreamElements discord bot coming soon?
Only planned
I see that Stream Elements records the activity of users including their profile picture, does anyone know the CSS code needed to show that pic in the alerts?
You can use this one to get avatar URL for Twitch https://docs.decapi.me/twitch?endpoint=avatar%2F%3Auser
Is there an API for media requests (videos linked to from a donation)? I'd like the ability to show/hide the on stream video but keep the media playing
Any idea why gift subs are showing up at "undefined" when I use event.user and event.amount?
Hello, i am using "Get current value of counter" (https://docs.streamelements.com/reference/bot#botcountersbychannelandcounterget) but i did not find an API Call to change the counter, it seems to work only by submitting a chat command. Is there an undocumented API call for updating the counters?
@coarse crown You can find all the media request API end points here: https://docs.streamelements.com/reference/songrequests (left side menu)
@lusty portal I would suggest to use console.log() in order to see what type of event you are receiving
@daring patrol The value of the counter can only be set via a chat command and variable
chat command is !editcoun <counter variable name here> <number>
Variable should be ${count <amount>}
The api you linked is mainly used by the overlay to get said counter value from the bot
Yeah, i know the chat command, its kinda annoying to have that written in the chat all the time i update a counter. Is there a reason why its not suppoted by the api?
and show it on the overlay via the default widget
@daring patrol I think that update event might be dispatched via websockets, but I am not 100% sure
Ohh. I am bad at reading today.
I can see SE_API.counters.get('counterName').then(counter => { // counter is of the format { counter, value } }); in the Websocket Documentation. is there also a SE_API.counters.set() function available?
I don't see anywhere in the websocket connection guide any mention of SE_API 
mmh, is there any way to request counter updates via API somewhere?
Ideas Channel maybe?
I think you can check value of GET https://api.streamelements.com/kappa/v2/bot/:channelId/counters/:counterName every second, besides of that... Let me check
I already do the GET request, i need to POST an update to the Value
But you were asking about counter updates. I thought you wanted to get ping when value got updated
No i want to update the counter without having to type chat commands
And about POST/PUT methods - they are not allowed on /:counterName nor on /:counterName/:value
Thats what i am requesting, i need a POST/PUT for Counters in the API, because i am updating a lot and it looks bad in the chat
It gives 404 error instead of 405, but error message states that method is not allowed.
Yes, i know that ...
Yup. Unfortunately it seems like counter is read-only via REST API.
Yes, i know that as well, that's why i am asking, how can i request an API change to get that POST/PUT function implemented, for future use.
Its read only, and thats causing problems in my implementation with my bot. Right now i have to write all counter updates in the chat, which looks bad in my very personal oppinion.
Maybe i just switch to SE_API.store.set('keyName', obj); // stores an object into our database under this keyName (multiple widgets using the same keyName will share the same data). It can be used in the same manner if iam correct and that would be just enough. These Values can be used in Overlay Widgets as well right?
Or does that work only within the Overlay Editor?
Ok than i have to skip that one ... Where can i request API functions to be implemented?
@daring patrol 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.
Thank you very much
Is it possible to have one widget show either the most recent donation or the most recent superchat depending on which came last instead of having two different widgets?
Sure thing, The easiest way to do so is add eventlist instead of label. Enable tip/superchat only and limit displayed events to 1.
@viral patrol Thanks, that could work. Are there more adjustable ways so I can have the amount directly after the name instead of always at the same position and remove the words 'SUPER CHAT' for superchats?
Are there any general documentation or tips for people getting started with making custom widgets?
You can check pinned messages, channel description and our whole widgets repository https://github.com/StreamElements/widgets those combined together will allow you to do amazing stuff 
Excellent, Thanks!
I have a bizarre question, but I am looking at using some custom css for alerts, but I am a little lost. I have enabled custom css and I look at the code and I can get that, but I am unsure of where to start. I would be enterally grateful, if even someone could point me in the direction of changing one alert to my ideas and then I can go from there.
What is your ideas
I want to be able to program my own alert, using a picture / video that I created, say for new follower, that pulls the correct information
Alerts handle the backend(like the variations) for you, so you only need to style your alert with CSS
@simple cove
@indigo flume ah, I see. Can you control everything through that? For example, how the text leaves? Or the padding/alignment and more?
