#dev-chat
1 messages Β· Page 43 of 1
https://docs.streamelements.com/reference/ is this still the URL to use for API references?
no
My goal is to create a website with a button that clears out all previous redemptions. I am sharing the ground control app window to kind of show a "queue" of redemptions
Yeah. I'll have to defer that to someone more knowledgeable.
@hardy walrus this is the error I am getting: {"statusCode":403,"error":"Forbidden","message":"No channel authorization found"}
when using javascript, xhr.sendRequestHeader("Authorization","Bearer <token goes here>");
Yeah. You're wanting something beyond what I can even comprehend.
ok
Hi, I was trying to make the bot send a custom message from a custom widget, but can't seem to make it post it. It gives a 20X response but I see no message in chat:
const botSendMessage = msg => {
const headers = {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
'Authorization': `Bearer ${jwtToken}`
};
fetch(`https://api.streamelements.com/kappa/v2/bot/${channelID}/say`, {
method: 'post',
headers,
body: JSON.stringify({"message":msg})
});
}
Anyone can help? thx
You have 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8', header but you are sending application/json
Also I recommend not to use something where you have jwtToken as overlay widget. If your overlay url leaks it may cause a lot of troubles (for local environment it is all OK). You may want to use MITM proxy for those details that will prevent possible harm (as it is over OAuth and you provide limited scope tokens in overlay, so in case of leak person will be able to use that limited scope). Example of usage: https://discordapp.com/channels/141203863863558144/457957557470887947/714523237819875358
@woven zinc ‴οΈ
Does anyone know of a way to make a bot that allows Moderators to switch OBS scenes from twitch chat?
Thanks!
Hi, i try to use the API to create store items. I have a name and a description because they seem the only params that are needed but now i get an Internal Server Error. Any ideas? π
@warped bridge Payload of that request should be something like:
{
"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"
}
}
Okay, i will try it. thank you
@crude crest Did you have time to check on the volume modification of specific items, in the auto shoutout widget?
Anyone have any experience using a stream deck to make background URL calls and somehow update StreamElements overlay javascript? Just trying to increment/decrement a javascript counter in my overlay using my stream deck.
Hi guys, I was asking this question in the helpdesk for Twitch
Basically I have an animation, but I was wondering if there was a way to flip/mirror the animation
Like for example this one, I would like to flip it so Charmander jumps from the left side and sprays to the right.
I know it's not a normal feature in StreamElements
But is there maybe a code?
Why not just ask the people from Alpha Gaming to make it mirrored 
Hahaha
Well, we've tried and I had someone do it, but they do a green screen behind it
But then putting it into Adobe, mirroring it and then removing the greenscreen and then converting the file to webm
It removes some of the quality

@gloomy helm ffmpeg -i input.webm -vf vflip -c:a copy output.webm
@coarse gate Remove that part from CSS code:
You can also change it to lower value, so you have rounded corners
thank you appreciate it

Does anyone have a custom API bankheist minigame command?
check #widget-share π
geezz; that was more buried then i thought; https://discordapp.com/channels/141203863863558144/457957557470887947/714523237819875358
it is an overlay; you are correct. that is not an 'official' widget.
there is no API support for that.
@viral patrol the ffmpeg -i input.webm -vf vflip -c:a copy output.webm code
is this for Stream Elements CSS
or is this for ffmpeg command
It is not. It is external app that can do video manipulation from command line
Thought so
Yup. Ffmpeg
CSS is something like transform: scaleX(-1);
(on a phone rn so I can't confirm if this does the trick with video elements)
All good, I will just try to flip the file itself
I hope it doesn't lose quality or come back with a black background is all
Copy parameter copies codec and pixel format so it should be ok
dont know if this is the right spot to ask or not...but before when i would go live using stream elements... as i clicked go live it brought up a small window from stream elements asking if i wanted to use stream elements or use like my facebook dashboard to create the 'title, description... etc' now when i click go live it doesnt pop up and forces me to use facebooks ... is this a new update? or did i mess something up and not realize it?
not having to have obs + the facebook dashboard made my stream and game run so much smoother and i love stream elements for that.
Hi, i want to create an EventList Custom Widget but I don't know where to start.
I can't ask someone here to practically to build one for me so I just need some good indications for some tutorials.
Thank you
@vernal wave i think you should ask in #helpdesk-facebook
Hey, how can I get the most recent sub gifter in OnWidgetLoad? data["subscriber-alltime-gifter"] seems not working and there's no -recent for sub gifters in GitHub CustomCode.md document.
OK, I found out, i didn't have to add [0] at the end of data["subscriber-alltime-gifter"].
I hope i am in the right area. Is there a command to randomally play audio sounds ?
hey i want to use like http://google.com/?q=${user.lastmessage} but when user.lastmessage is containing spaces it would cut off the link. is there any way to encode the url to avoid it?
@lusty pivot I'm on mobile so it'd be a PITA to look for it but in the channel topic for #helpdesk-twitch has the variables. Offhand I don't remember the exact one but it it'll do exactly that. I'd also replace that with ${1}.
hello! i'm looking for some help or for a smart guy π wanna get widget for chat command (any, but more like !hello or any kind of it) so it will trigger video+audio & also count how many times user used it, probably with some personal gratz (video+audio again) for user who visited stream & said "!hello" 50/100 etc. times, so settings should be - cooldown per user (24 hours for example); vips/sub+vips/followers - who allowed to use; and some more variables to choose how many times a guy should visit to gratz him; and also a way to set any custom command for it π probably i ask too much, but.. who knows.. π
just got an idea.. maybe such widget already exists
that is a LOT to ask @visual thunder .... but for your ref: https://discordapp.com/channels/141203863863558144/457957557470887947/637230012109553664
and have that trigger on command to start may not be too hard.
@lusty pivot ${pathescape ${1:}}
@elfin arch yeah, i know, thats a lot ^^ but that would be one of the best widget at SE's dashboard>themes > widgets
i'll try to find it out by myself, if thats possible, but maybe some smart developer gotta accept this "challenge" and create it
if you want to take it on yourself; i will try to help. and i know others will help as well.
okay, thank you, i'll try to learn smth to try it
Hey there, I'm a bit new to this and I'm having trouble figuring out where to register a redirect URI. I'm trying to follow this page: https://docs.streamelements.com/docs/getting-started-1 Also is the client_id just my streamelements account ID?
Unfortunately at this moment OAuth2 applications are on hold.
Ah ok, any idea when they'll be back?
We have no ETA on that. The OAuth2 access is limited and we are investigating and developing solution that can be reliable before we reopen requests form.
Hi,
folks don't know if there is a way to a command that computes another command?
Example:
! age
Answer: Your age is 20
! age
Answer: Your age is 30
And here's what I want.
! avgage
Answer: The average age for today's stream is 25 (2 people used the / age command).
Is there anyway to get the bot to announce if you've entered a giveaway?
You can enable that in the giveaway settings, when you create it.
doh, so if the giveaway is active I'm out of luck
What exactly is the emotes per minute endpoint looking at? If the epm of an emote is 257 does that mean it was used that many times in the last minute?
@gloomy maple you can create custom commands ...
-
!age
response message:Your age is ${count ageusers "+${1}"} - Total records ${count countage}. -
!avgage
response message:Average age of this stream is ${customapi.https://twitch.center/customapi/math?expr=${getcount ageusers}/${getcount countage}} years (${getcount countage} users used the command - !age years ). -
!resetage
response message:Reseting counters (age - ${count ageusers 0}; users - ${count countage 0}) ...
hi guys, they said to me come here because I need a personalized code
Hello! When you create a custom widget, how do you manage to queue the alerts?
Trying to edit an overlay with custom CSS and I cannot find where to get the 'Sender' and 'Amount' containers with animation adding in to Variations.
Where as username-Container is linked to 'wobble' animation what can I add to allow {Sender} and {amount} to wobble
It seems like message-delete events are not forwarded. I am reporting that. Thanks!
@viral patrol Sorry to ping you - do you know if this was ever resolved? I'm attempting to log the event but it doesn't seem like its coming through so I think not?
If it do it without custom CSS the Amount and/or Sender Wiggles, but when I go into CSS editing I cannot find a way how to set that but the Username does
@vernal marsh The value is written in that alert is in JS tab (as it splits text to letters)
@flat parrot I have no updates on that one.
17 days have passed, nothing new about oauth credentials request
Ey guys is there a way to loop a custom widget?
I want the tips to pop up for x amount seconds and stay off for x amount seconds and repeat, without a tip to trigger it
you want to 'emulate' a tip every X seconds?
yeah
i think thats what im going for,been looking at repeat funtion stuff but can't make head or tails from it
so to send a test or 'emulated' alert; would be like in the Overlay link in the topic of this channel. It is hidden in there, but basically:
Wait is that only gonna work on a button click?
no; just the highlighted text. put that in an interval loop with the donation information to loop
@toxic pewter Hmmm. Better way to go is to get https://github.com/StreamElements/widgets/tree/master/CustomEventList, set it for tips only and create a loop over array of latest tips.
π Thanks i'll try that, total noob with this
How can I add a custom font from url for alerts
The custom code doesnt work properly to show the text
hi can anyone help me because i am trying to upload a custom alert but for some reason text over image option is not showing the text
I want to add a custom font like SF Compact Display, But I can only do it via custom css code, and if i do that then the text doesnt show
@unique thistle Google Fonts
More than 900 google fonts are supported at this time. You can preview them here: https://fonts.google.com/
Custom Fonts
Steps:
- Install the font on the streaming PC or choose a pre-installed windows font.
- In the overlay widget settings, select Text Settings
- Enable Custom Font
- Type the name of the font as it appears in the windows font directory (This is usually
C:\Windows\Fonts)
Note: After installing fonts, the browser and OBS must be restarted for the font to appear.
@jagged arrow Check margins as they remain the same, so the positioning may be off when you change display template
Does the emotes per minute endpoint just look at which emotes were used in the last minute?
Thanks, But I managed to do it a different way, I left the custom font as SF Compact Display and on my website I grabbed the @font-face part and put that in the custom css option for browser in obs
Nope im too dumb for this thanks anyway guys
@viral patrol I understand the value for the animation is written under the JS tab but the code given only allows Username to 'Wiggle' and not {Amount} or {Sender} to which I am trying to implement the animation on to.
I am able to add in text form the {Amount} and {Sender} but all my attempts into adding is code to allow this to animate also breaks the id username-container to break showing.
Ps. Trying to add this to Sub variations.
I have gotten the Amount to work now after looking at the code from host amount, but still no look getting sender to animate. Eg. username-container, amount-container and sender-container?
So I got it working. Had to add the 'Sender' Code above all others in order to work
@viral patrol Copy and pasted everything but now it only shows followers
Checking it rn
I have updated the code. Line 41 should be
if (fieldData[`${event.type}-include`] !== "yes") return;
π nice thanks
so is this then correct? or should it point to sumwhere specific?
setInterval(() => {
$(".main-container").show();
}, 2500);
that does not look correct to me @toxic pewter ... can you go to jsfiddle.net and post your HTML and JS there; save and post the link back here?
basically with that code you posted is telling the ".main" class to show itself every 2.5 seconds.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@elfin arch
anyone know the code to pull sub data from the goal progress instead of total subs? i care about sub points not my actualyl number of subs
basically im pretty certain this is the line of code i want to pull from streamelements session data>goals instead of total subscribers
$('#Subcount').text(data["subscriber-{{goalrange}}"]["count"]);
i also found this = data["subscriber-goal"]["amount"]
but that all pulls from total subscribers not the session data of goals i can set manually
Does anyone know if there is an update of the speech API endpoint block ( https://discordapp.com/channels/141203863863558144/259680142459142144/733814716488744970 )?
Hello, is it possible for custom widgets to send information to other custom widgets? Please @ me if you have an answer!
hey there, is there a way to show / hide a layer in the overlay with the api?
also, are there webhooks (or something else) for events?
specifically, looking for notifications of stream store redemptions
and possibly commands
π¦ π¦ π¦ π¦ π¦
@real bronze To my knowledge no change.
But thanks for the response.
Is there a place to get actual customer service when my overlays wont save and i'm getting a ton of erros in the console.
Sorry for asking again but I just really wanna figure this out. What exactly does the "emotes per minute" endpoint show? I'm not having trouble getting the data, I just don't understand it. Is it showing which emotes were used in the past minute and how many times? Or something else?
can someone help me with my Custom Widget, I just want to invert X and Y proportions and they told me that I need a custom code
does anyone know what would cause text not to show up in front of the animated alert? Even when you select for the option to do so?
@elder cipher Text not showing up over your alerts? Go to the Advanced Text Settings and set the top margin to 50, you can work your way to the right position from there.
I hope this is the right place to ask. Does anyone know if i can get the output of !weather command in german and another question... can i add a city so the the result of !weather is always the weather of munich?
seems like its not possible to add a command !munich and output is "!weather munich" ... its not activating the !weather command
The only way I can think of is ${customapi https://api.scorpstuff.com/weather.php?units=metric&city=Munich}
And even then it would still output into English.
I guess it's not really a dev specific question..but is there a way to let the bot announce when the game category changes?
@viral patrol Thx a lot that helps already! @hardy walrus true but better then nothing...just thought maybe there are international api alteratives around?!
To my knowledge no.
do you guys know a code to output a local time?
However you can always ask @analog sequoia if they'd be willing to add strings to translate to specified languages in the response.
The reason I pinged them is because the link above is his api.
${time.Europe/Berlin} is working
One last question for now :P
I saw some guys have a command to exchage currency ... for example !howmuchis 10 and output is f.e. in yen
is that possible with SE?
Running behind at work so can't give exact thing but this is what you want https://docs.decapi.me/misc?endpoint=currency
thx ill take a look
@hardy walrus yep thats exactly what i want but im not able to create the correct code π¦
but i found it on google with that info
THANKS a lot
${customapi.https://decapi.me/misc/currency?from=eur&to=usd&value=$(queryencode $(1:))&round=1}
sorry, one of the design decisions I made when I started my site was NOT to do custom formatting (ie. match the formatting provided in the url bar) or translations. It just makes it way to complicated, and I wanted to keep things simple and easy to use
Figured as much. Didn't hurt to ask at least.
it makes it harder not just to write, but also for people to use
Hello π I was directed here for assistance. I'm logged into Streamelements.com I am unable replace stock animations/audio for both; Sub/Cheer. I've loaded in 3 different animations & confirmed these loaded animations were playing in the thumbnail. However, when I "emulate" the Sub/Cheer the default animation/audio still plays not what I loaded. NOTE: All other alerts where swapped out without issue, it's only these two that are stuck on the "Default."
THIS ISSUE IS STILL UNRESOLVED.
Is there anyway to develop widgets locally or do you have to use the stream elements editor?
Check the pinned messages. there is a way to set up an local environment. ... but i have no experience using it.
I write my code locally then copy pasta over to test.
@terse raft ^^
Thanks, Iβll check the pins again. I couldnβt find anything
Would anyone know how I can import a picture using the editor?
@hollow stone Please confirm, that you edited all variations of sub/cheer alerts as well
@true urchin https://github.com/StreamElements/widgets/blob/master/CustomCode.md#alert-widget - check line with {{image}}
Hi, does anyone know if any custom API for a dictionary has been made to search for a word in Twitch chat? π€
Hello, having a hard time with @broken coyote Ultimate chat widget, just looking for a way to add volume sliders to each of the video and audio portions but not having any luck as this is the first time I have tried editing a widget. But adding
},
"volumevid1": {
"type": "slider",
"label": "Video1 volume: ",
"min": 1,
"max":100,
"value":50
Under the video did add a field underneath everything but did nothing so I'm doing something wrong just don't know what
You will need to control the overall volume from obs @clear escarp
@viral patrol Thank you for the response π Yes, iβve swapped out 3 full alert packages. ALL packages, work for ALL alerts, EXCEPT the two mentioned; Subscriber & Cheer. After selecting the new video file, you can see the video playing on the thumbnail confirming the new video file was selected. However, the Default alert animations/audio fires when those 2 are βemulated.β
@broken coyote thanks for the answer bud awesome widget keep it up
Sure, just pm me π
Hi! What do you think is the best way to apply CSS alert animations via JS? I am experimenting with adding .animate class to div but removing it in setTimeout() seems to break everything. In a series of events they overlap despite setting the hidden widgetDuration field. Can you help me with that?
anyone else getting an error when you try to log into the site?
I am
upstream connect error or disconnect/reset before headers. reset reason: connection termination?
Hello, somebody knows why the "Credit Roll - by Grot widget" dont update automatically when I click on my ending scene? There is something I have to do before to lanch it?
I think that with that scene you should have "shutdown source when not visible" as it loads items on widget load
I think that with that scene you should have "shutdown source when not visible" as it loads items on widget load
@viral patrol I'll try, ty
Hello, i'm trying to create a chat command for twitch that displays the currently queued redemptions. Viewers can redeem certain challenges with their channel points and the streamer has to do them. A lot of viewers ask on what place in queue their redemption is currently at. I think i need to use the ${customapi.link-to-api.com} variable and fetch the data from api.streamelements.com ... but i don't know much about this stuff. I would be glad if someone could help me.
I don't believe you can do that with a basic chat command. You would need a custom set up or custom API to make the list with https://docs.streamelements.com/reference/redemptions#get-my-store-redemptions-by-channel-id
i found this site you posted, but i dont know how to do it, i'm not a programmer ... i don't even know how to start. My hope was that it would be pretty easy to set up
there is no API that I have seen the will make a list of redemptions. π€ someone else has seen or knows something different.
I think I would go with that: https://thefyrewire.com/docs/api/twitch/queue/#required-parameters
So users can use a command that will put new item to the queue list
i will look into it thx
@viral patrol that was exactly it!! Ty so much π
You are welcome!
@crisp needle .... GSAP or (greensock . com); seeing what others here have made with it (the free tools) and playing with it; it's amazing. but ya outside of that is the jQuery add/remove class()
im just trying to figure out how to get text in streamelements to slide up from the bottom of the screen, stay up for like 10 seconds, and then drop down. i need 2 texts to rotate going up and down
exactly 20 days passed, no API request response, I've rolled out the update I'd have to do, got no complaints, but that's cuz there wasn't actually anyone who needs to use streamelements currency system. I can't wait for tomorrow when someone will actually have to use streamelements one, then they screw up copy pasting the JWT token, then getting annoyed. then after a few hours I'm like "did you test it?" and they're like "I don't know how to use this thing" [happened to me when I was using twitch tokens wrong and people had to copy paste them and apparently that's really hard to do]
after creating an overlay in streamelements how can I send it to someone without it being my stats, how do I send them the "code" for the entire overlay but it syncs to their stats (ex: latest follower, latest sub)?
I applied for APi access about 1 month ago, how long does it usually take to get an answer? π
@pulsar willow We found the issue. The solution for that is to go to code editor of Season of Subgiving widget and change
subsQueue[data.sender] = {
total: data['amount'],
subs: []
}
To:
subsQueue[data.displayName] = {
total: data['amount'],
subs: []
}
And regarding OAuth2 access - it is currently on hold. We have no ETA when we will solve the issue that holds us from dispatching new credentials.
@night laurel @tame sun ^^^^^
@viral patrol Nice! That's very good news. Thank you very much π π
What do you mean with OAuth2 access? Is that part of this issue?
Nah. The second part was an answer for something else
That's for those I mentioned.
Ah, ok.
Thanks for the info and your help π
Hey, question about the Credit Roll widget. How do I get it to display a list of people who chatted during my stream?
We don't store chatter list from your stream, so Credit Roll has no source of that data. It could be done with external data source.
Ah, ok. thanks for getting back to me. I won't be able to figure that out, but maybe I can have a friend who knows how to code look into how to do that.
Does anyone know how to stop the Credits Roll from looping? I want it to play through once and that's it.
@random pebble
Change:
$('.marquee').marquee({
speed: fieldData.marqueeSpeed,
gap: fieldData.gap,
delayBeforeStart: 0,
startVisible: true,
direction: fieldData.direction,
duplicated: fieldData.duplicated
});
To:
$('.marquee')
.bind('finished', function () {
$(this).marquee('destroy');
})
.marquee({
speed: fieldData.marqueeSpeed,
gap: fieldData.gap,
delayBeforeStart: 0,
startVisible: true,
direction: fieldData.direction,
duplicated: fieldData.duplicated
});
In JS code
Thank you! @viral patrol
Wait, the Widget I'm using doesn't seem to have any of that info...
window.addEventListener('onWidgetLoad', function(obj) {
const recents = obj.detail.recents;
let session = obj.detail.session.data;
let fieldData=obj.detail.fieldData;
userCurrency = obj.detail.currency;
for (eventIndex in recents){
const event = recents[eventIndex];
if (!fieldData[`enable${event.type}`]) continue;
if (event.type === 'follower') {
if( fSum < session['follower-session']['count'] ) {
addEvent('follower', event.name);
fSum += 1;
}
} else if (event.type === 'subscriber') {
if( sSum < session['subscriber-session']['count'] ) {
addEvent('subscriber', event.name);
sSum += 1;
}
} else if (event.type === 'cheer') {
if( cSum < session['cheer-session']['amount'] ) {
addEvent('cheer', event.name + " - " + event.amount);
cSum += event.amount;
}
} else if (event.type === 'tip') {
if( tSum < session['tip-count']['count'] ) {
addEvent('tip', event.name + " - " + event.amount + '' + userCurrency.symbol);
tSum += 1;
}
}
}
});
function addEvent(type, entry) {
const element = `<li class="people-list__item">${entry}</li>`
$('.'+type).append(element)
$('.'+type).css('display', 'flex');
$('.'+type).closest('.credits-sections__item').css('display', 'block');
} ```
Check this URL: https://strms.net/credit_roll-by_grot
I don't know how to change it to the correct type of text, but that's what my JS looks like. @viral patrol
Am I using the wrong one?
Oooooh, I'll do that now.
Haven't changed anything yet, but this one isn't displaying anything on screen...
It should show data from your most recent stream
Strange, I streamed yesterday and it's showing nothing.
There should be followers and subscribers to show but nothing is showing up. It's not even showing me the Header and Thank You Note
Checking one more time
Oh. It is not showing anything as there may be no events. You can increase number of recent events here
Ah! Got data to use now
Seems to all be working perfectly, thank you for the help!
Hello, our team applied for OAuth2 credentials the beginning of July.
But we haven't heard anything as of yet, is this a typical wait time?
@teal dust #dev-chat message
@hardy walrus Okay, so I guess I'll just keep waiting. Thanks
Anyone know where to find the username for streamelements? I'm stuck here
Hello devs
Can you guys make something similar to streamlabs obs chat game overlay where I can see my chat while playing which is not visible on stream
Hi Devs! Running into an issue with a default chat widget showing duplicate messages through Facebook Gaming. Anything to be done about this one? SE Support recommended I come and ping this group. Thanks!
@whole orchid It's a known issue atm.
@sturdy oak Officially no. Otherwise this is viable if you use twitch.
If you have 1 monitor and/or would like the chat overlay on screen, please look at the link below.
Please note this is not a plugin for OBS and not maintained by SE.
https://github.com/baffler/Transparent-Twitch-Chat-Overlay
Hi
Hello π
I want to embed the API (in js field) of a my custom widget overlay
@hardy walrus ok I see thank you
Can i do this ?
You can make XHR calls to any external service served over https from JS
var data = null;
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.streamelements.com/kappa/v2/points/channel/top");
xhr.setRequestHeader("accept", "application/json");
xhr.setRequestHeader("content-type", "Content-Type");
xhr.send(data);
this is the code that i need
One moment
I am preparing a snippet for you
ok
let apiKey, channelId;
const showUsers = (users) => {
console.log(users);
// play with your userlist here
}
function getUsers() {
fetch(`https://api.streamelements.com/kappa/v2/points/${channelId}/top`, {
headers: {
'Authorization': 'apikey ' + apiKey
}
}).then(response => response.json()).then(obj => {
showUsers(obj);
});
}
window.addEventListener('onWidgetLoad', function (obj) {
apiKey = obj.detail.channel.apiToken;
channelId = obj.detail.channel.id;
getUsers();
});
I would do it like this.
@viral patrol Work like a charm !
@viral patrol in console.log i can see the array with name and points
@viral patrol But i have a question
@viral patrol this variables "let apiKey, channelId;" are already defined in the wrapper ?
Those are set in:
window.addEventListener('onWidgetLoad', function (obj) {
apiKey = obj.detail.channel.apiToken; // <= here
channelId = obj.detail.channel.id; // <= and here
getUsers();
});
Those variables *
They are global variables, so you can call getUsers() function in any scope and it should trigger showUsers with updated data
You can set an interval for 5 minutes to keep it updated
@viral patrol Yes, you can call it by obj.detail.channel.apiToken; because it is in an Streamelements wrapper
You can set an interval for 5 minutes to keep it updated
@viral patrol yes i have alredy think this
You cannot query obj.detail.channel.apiToken outside of onWidgetLoad as it is forwarded in this event only
You cannot query
obj.detail.channel.apiTokenoutside ofonWidgetLoadas it is forwarded in this event only
@viral patrol Ok
Those are set in:
window.addEventListener('onWidgetLoad', function (obj) { apiKey = obj.detail.channel.apiToken; // <= here channelId = obj.detail.channel.id; // <= and here getUsers(); });
@viral patrol This aren't in the documentation
@viral patrol why you delcare variables with let and not with var keyword ?
Is possible to get username without lowercase ?
We keep them lowercase as user can change their display name pretty often.
We keep them lowercase as user can change their display name pretty often.
@viral patrol Ok, the answer is no ?
Yes. The answer is "no". π
You made me struggle with writing "yes" answer which is "no" π
Yes. The answer is "no". π
@viral patrol Thx π
def OauthToken():
os.startfile("https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=[REDACTED]&redirect_uri=https://twitchapps.com/tokengen/&scope=channel%3Aread%3Aredemptions")
return
Does this look right? When I go to https://twitchapps.com/tokengen/&scope=channel%3Aread%3Aredemptions I get a 404.
I don't know if that client ID is mine or not, but something seems wrong here. How do I find out my client ID to make sure my ID is what is being sent?
This is because you have & for very first parameter, it should be ?
Also - if you are referring to twitchapps - this client id is their application
So you won't be able to change it to your own redirect_uri
Ok.. The first one should have been obvious to me. Thank you.. The second one.. I'm in over my head.
Someone made up a script that checks the channel rewards... and it was always iffy..
and I'm trying to fix it.. Not knowing Python..
So the redirect, as I see it, is dealing with id.twitch.tv. Not twitchapps.
But ok.. The client ID is there's..
Ohh. The generated oauth:token via this website will be your
I think I'm going to have to get this remade by someone. Because it worked before, but now it doesn't again.
I suspect that something changed on the twitch app side of things or something.
Is there anyone who wants to make a few bucks to either take a look at this script (or write a new one) that upon a reward being sent, types a command in chat?
and by command, I mean just text. Not a command command.
π hi there,
Looking to make a custom widget, just wondering if there is like a sandbox/local dev setup I should be looking to use so I can preview stuff as I work?
I did have a little look at the git repo but couldn't see anything about it.
Not done a lot of frontend dev π
thanks @viral patrol π
bp
Hi.
I created custom widget, how i can share him to url like that (https://streamelements.com/dashboard/overlays/share/ my overlay id)?
@pearl plover Follow these steps to grant managers/moderators access to your dashboard:
- Click on your Channel Name at the top of the dashboard and select Settings
- 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
The person you want to do it with needs to do that.
Hm... I planned shared widget link in youtube with viewers
I have an overlay (alert box) in my streamelements that covers my hud to make a color change on my hud if a get a sub or follow etc. But the secondary text gets pushed so far down that its out of the picture. Is there any way to separatley move the secondary text? (my text is really close to my hud)
Is it possible to type !points on the discord and appear in the message on the discord? i need
How do I make a 'subcount' command?
For the amount of current subscribers??
(Only going to be used to keep track for myself.)
Something like this??
${customapi.https: //twitch/subcount/accountname}
@thick mantle u can help me pls
Anyone able to fill me in on how i'd add a custom font to a custom widget? this one has the google fonts but I'd like to use sf pro display regular.
@pulsar willow please, don't ping the members.
@thick mantle you can create a custom command and use the variable ${channel.subs} ... and if necessary, adjust the count with ${customapi.https://twitch.center/customapi/math?expr=${channel.subs}-1}
hello, so one of the widgets allows for "Streamer+mods+vips" to trigger it with an additional field for individuals, is there a short code for all subscribers i can throw in there like one of the {$subs} or soemthing
i think its this line in the js " if ((userState.mod && userOptions['managePermissions'] === 'mods') || ((userState.vip || userState.mod) && (userOptions['managePermissions'] == 'vips')) || userState.broadcaster || (userOptions['otherUsers'].indexOf(user) !== -1)) {
let video = $("#video");
let source = $("#source");"
I need help of a JS specialist. :D
I want to change something in the Season of Subgiving widget! I use the train in this widget and I love it. I would like to add a delay for the train to start after a sub bomb, because I want the standard subgift alert to happen first (standard alertbox). I guess it is quite simple to do that, but I'm absolutely not familiar with JS.
You should have a delay if you have both of then on same overlay.
Also there is a small fix for that widget described here: https://discordapp.com/channels/141203863863558144/259680142459142144/742996138885644308
It is on different overlays and I would like to adjust the delay (like 5-10 seconds depending on the standard alert).
Something like... event happens (sub bomb), then wait 10 seconds, then go on with the script
It's more like pausing the script for a while π
I'm wondering if there is a code you could place in widgets that enables you to have each widget share the same timer, like an overall system clock or internet clock. That way if I have two widgets showing data at a 15 second interval they are on the same 15 seconds nicely synced.
@timber lark You can wrap selected code in setTimeout:
thanks! I'll try!
can anyone explain how Sam's widget go seamless from the alert directly back to the feed starting from the most recent event so that it keeps a flow instead of just jumping back to it's rotation behind the alert? https://www.twitch.tv/samwoodhall/clip/CloudyAbrasiveSwallowPeteZaroll this clip shows it well
lol that's a tough task I don't believe he coded it. I'm sure he could help a bit though, did leave his help section on the discord a message (:
This is not an alert but "event list" from what I see
So there is a new event added to list - play an animation, then rotate it from there
And sound - sound could be from a regular alertbox which is "sound only"
ah that would make much more sense
so now I'm missing the understanding of the new event taking priority, triggering the animation, and then rotating from that point.
lol hope that didn't wake you sam
Yeah itβs something I had commissioned
@terse cloud your stream is an amazing example of good widgets. People love something like that, you are doing amazing work
that's what I thought you had mentioned, so I came seeking the gurus
Thanks @viral patrol
Iβve just gone through the process of protecting the design of it all. Iβve had so many people ask if Iβm giving it away and the concepts of it all are pretty new so Iβve just trademarked the design and concept of it it along with my logo
Good move, visual identity should be protected
People can still use it and make their own version. Itβs just my version is protected against people buying it and selling it on as their own etc. More of a protection thing for myself and others
And yeah exactly. The ideas Iβve had get copied and reproduced so easily
ah yeah that's good, def don't want to sell or have credit come my way. I'm really just trying to get the understanding of syncing the transitions between the current event and the previous metrics
Itβs almost like people like what I do π€
Oh yeah course. Wasnβt insinuating that at all
so I've used a feed in the past, very similar to the alpha one and I couldn't figure out how to do what you eventually did with it
so now I skip the feed and have my alerts drop down, but trying to get it all in one bar. ignore the video over my cam that's just for fun on certain streams https://www.twitch.tv/baldandbearded/clip/SaltyProudNigiriNinjaGrumpy
@median halo I would do something like:
window.addEventListener('onEventReceived', function (obj) {
if (typeof obj.detail.event.itemId !== "undefined") {
obj.detail.listener = "redemption-latest"
}
const listener = obj.detail.listener.split("-")[0];
if (listener !=="subscriber" && listener !== "tip" && listener !=="cheer") return;
const event = obj.detail.event;
event.type = listener;
parseEvent(event);
});
const parseEvent=(event)=>{
stopAnimation(); //stop current animation, so it won't play new slides
updateSlide(event); //prepare updateSlide function that will play animation just like new alert;
setTimeout(()=>{ //Set timeout before continue
currentSlide=event.type; //set current slide to that one updated
startAnimation(); //start animation from this point
},5000);
}
ok I'll try and tinker with this
Addevent needs a timer.
where should that fall Dyna?
@crisp laurel And back to you: I think it would be userState.sub
@viral patrol what is the 5000 doing in the code you posted?
It is time of holding animation paused in milliseconds
Also - all function names are made up there and this is more description than actual to-go solution. You have to expand it π
@timber lark You can wrap selected code in
setTimeout:
@viral patrol I'm sorry. I guess I need a more detailed instruction for dummies. I tried this:
setTimeout(function(){ subsQueue[data.sender].subs.push(data.name);
if (subsQueue[data.sender].total <= subsQueue[data.sender].subs.length) {
console.log("Playing animation");
displaySubs(subsQueue[data.sender].subs, data.sender)
delete subsQueue[data.sender];
return;}, 10000);
}```
Hi
This is my code
How can i write my code as code snippet like this
@viral patrol I'm sorry. I guess I need a more detailed instruction for dummies. I tried this ? :
I would change your loop to something like:
const showUsers = (users) => { console.log(users); // play with your userlist here let mag=""; for (let i in users) { mag+= users.users[i].username + " -- " + users.users[i].points + "<br>"; } } document.getElementById("demo").innerHTML = mag; }@viral patrol Ok less is better
setTimeout(function(){ subsQueue[data.sender].subs.push(data.name);
if (subsQueue[data.sender].total <= subsQueue[data.sender].subs.length) {
console.log("Playing animation");
displaySubs(subsQueue[data.sender].subs, data.sender)
delete subsQueue[data.sender];
return;}, 10000);
}```
@timber lark
Those examples above should postpone animation play for 10 seonds
Those examples above should postpone animation play for 10 seonds
@viral patrol I know
Why colors for keywords does't work ?
let apiKey, channelId;
const showUsers = (users) => {
console.log(users);
// play with your userlist here
let i = 0;
let mag;
let f;
for (i; i <= 99; i++) {
f = users.users[i].username + " -- " + users.users[i].points + "<br>";
if (mag === undefined) {
mag = f;
} else {
mag = mag + f;
}
}
document.getElementById("demo").innerHTML = mag;
}
function getUsers() {
fetch(`https://api.streamelements.com/kappa/v2/points/${channelId}/top`, {
headers: {
'Authorization': 'apikey ' + apiKey
}
}).then(response => response.json()).then(obj => {
showUsers(obj);
});
}
window.addEventListener('onWidgetLoad', function (obj) {
apiKey = obj.detail.channel.apiToken;
channelId = obj.detail.channel.id;
getUsers();
});
@viral patrol this is your code of yesterday with some changes that i made
I have only 1 problem now
I would change your loop to something like:
const showUsers = (users) => {
console.log(users);
// play with your userlist here
let mag = "";
for (let i in users) {
mag += users.users[i].username + " -- " + users.users[i].points + "<br>";
}
document.getElementById("demo").innerHTML = mag;
}
@main orchid asked about this matter, any code guru's who can help him out?
'Hi, i've been asked to stream a pool match next week and I need a scoreboard. I would wondering if anybody could recommend any good widgets for this. i would need to have a name either side, score either side, and race to whatever amount of games they are playing'
I would change your loop to something like:
const showUsers = (users) => { console.log(users); // play with your userlist here let mag=""; for (let i in users) { mag+= users.users[i].username + " -- " + users.users[i].points + "<br>"; } } document.getElementById("demo").innerHTML = mag; }@viral patrol Ok less is better
@viral patrol Sorry for my rudimental code but i come from C/C++
@viral patrol The API call lock array langht to 100
Why ? I need all user list
This is because it gives you top users. Calling for whole list is resource heavy (as you may have thousands of users there)
I would change your loop to something like:
const showUsers = (users) => { console.log(users); // play with your userlist here let mag=""; for (let i in users) { mag+= users.users[i].username + " -- " + users.users[i].points + "<br>"; } } document.getElementById("demo").innerHTML = mag; }
@viral patrol There is an extra brace at line 8
Oh. Right. I was rewriting it in Discord, so without automated syntax check
const showUsers = (users) => {
console.log(users);
// play with your userlist here
let mag="";
for (let i in users) {
mag+= users.users[i].username + " -- " + users.users[i].points + "<br>";
}
document.getElementById("demo").innerHTML = mag;
}
const showUsers = (users) => {
console.log(users);
// play with your userlist here
let mag="";
for (let i in users) {
mag+= users.users[i].username + " -- " + users.users[i].points + "<br>";
}
document.getElementById("demo").innerHTML = mag;
}
@viral patrol Done
but it still doesn't work
Uncaught (in promise) TypeError: users.users[i] is undefined
showUsers about:srcdoc:119
getUsers about:srcdoc:132
promise callback*getUsers about:srcdoc:131
<anonymous> about:srcdoc:141
<anonymous> about:srcdoc:53
EventListener.handleEvent* about:srcdoc:46
My old code work
const showUsers = (users) => {
console.log(users);
// play with your userlist here
let i = 0;
let mag;
let f;
for (i; i <= 99; i++) {
f = users.users[i].username + " -- " + users.users[i].points + "<br>";
if (mag === undefined) {
mag = f;
} else {
mag = mag + f;
}
}
document.getElementById("demo").innerHTML = mag;
}
Ohh. right
I am stupid
const showUsers = (data) => {
console.log(data);
// play with your userlist here
let mag="";
for (let i in data.users) {
mag+= data.users[i].username + " -- " + data.users[i].points + "<br>";
}
document.getElementById("demo").innerHTML = mag;
}
Ok
I was iterating on one object and tried to get property of other object.
Hmmm.
I am checking that code now, to be sure if it works
OK. There was one leftover
And I changed users to data for main scope, so it is data.users instead of users.users which looked silly
yes
const showUsers = (data) => {
console.log(data);
// play with your userlist here
let mag="";
for (let i in data.users) {
mag+= data.users[i].username + " -- " + data.users[i].points + "<br>";
}
document.getElementById("demo").innerHTML = mag;
}
the error appened because we can't call 2 objects with same name. It's right ?
No. It was before we were iterating on data when mag was created on data.users
Ok, we could have solved everything with a single change
I would change your loop to something like:
const showUsers = (users) => { console.log(users); // play with your userlist here let mag = ""; for (let i in users --> repleace this with --> users.users) { mag += users.users[i].username + " -- " + users.users[i].points + "<br>"; } document.getElementById("demo").innerHTML = mag; }
@viral patrol
But call the response data "data" and not "users" is a better way, because we also have an array in the object (that is an array of objects) named "users"
it's right ?
Yes. Definitely
Hello! How do I make a command with a specific number? For exemple: "I have 100 total wins." and with other command ( ${count wins +1 ) start counting from 100
Just have a command with response ${count wins 100}
for example, I have one that I change the wins of the day, but at the end of that command I wanted to update the total number I have in the game. like " !wins+ " response: " today wins: 1 ; total wins: 101 "
So you can have two counters like Today wins: ${getcount todayWins} total: ${getcount totalWins} and reset todayWins everyday
but with ${getcount totalWins} how i can put it starting with a specific number?
You can set initial value like !editcounter totalWins 100
But you won't have to if you use both commands from start
oh I see! it worked! thanksss
it is possible to change !followage default command (I want to change just to add /me) I didnt like this one
π ${customapi https://decapi.me/twitch/followage/${channel}/${channel ${touser}}}
@edgy lantern unfortunately not the default and unless you have your own endpoint you're stuck with what others give.
@hardy walrus okok, thank you 
Though I know from experience you can change the length specified in the response from that domain.
hmmm, how?
1 sec

I can't think hard for it atm as I'm on my way home but the big at the bottom is the part you'd add.
variable ${customapi.https://decapi.me/twitch/followage/${channel}/${1|${sender}}}
@hardy walrus I'll try
ok forget, I don't know how to add this "precision" parameter 
There's a bit at the top of the link that goes back to the main page and explains it.
I tried, I really dont know...
I got a invite for stream elements for the YouTube page I manage but it gave me a "error message"
roleplay.missing
scope
invitations:manage
@edgy lantern https://decapi.me/twitch/followage/${channel}/${1|${sender}}/?precision=X ... select the precision type: 1 - 6 or the default: 0
oh thank you @torn gulch !! 
How do i create a new bot to greet new viewers
Is there a documentation / list for the available javascript events for developing the widgets?
Was only able to find in the docs documentation for the REST API calls, not javascript events of the widgets themselves
Oh fantastic thanks a lot @viral patrol π
@viral patrol Hi boss
I have another problem, now with css
I want to use my custom font but i can't upload the font file on streamelements, i have alredy tried to use an external url in my css attribute but it doesn't work
This is my CSS :
/* Font - MrGrieves-Regular */
@font-face {
font-family: 'MrGrieves-Regular';
src: url('https://www.maglacava.it/fonts/MrGrieves-Regular.eot'); /* IE9 Compat Modes */
src: url('https://www.maglacava.it/fonts/MrGrieves-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://www.maglacava.it/fonts/MrGrieves-Regular.woff') format('woff'), /* Pretty Modern Browsers */
url('https://www.maglacava.it/fonts/MrGrieves-Regular.woff2') format('woff2'), /* Super Modern Browsers */
url('https://www.maglacava.it/fonts/MrGrieves-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('https://www.maglacava.it/fonts/MrGrieves-Regular.svg#svgFontName') format('svg'); /* Legacy iOS */
}
body {
font-family: 'MrGrieves-Regular', Fallback, sans-serif;
}
You can also install that font on your streaming PC and restart OBS after that
Then your font should be displayed properly
And you specify that in that overlay.
Custom fonts only apply to where you specify it.
@hardy walrus From obs ?
@hardy walrus ok, but i can set it from obs ?
@viral patrol Why i can't use custom css to load my font from an external url ?
You can, but your server has to use proper CORS headers
Yes
This is the problem, when i try to see file in my folder from https webserver return an forbidden message
Hey,
I wanted to apply for OAuth2 credentials for my application, but the link to the Google Form mentioned in the documentation is dead. Is there currently a way to apply for OAuth2 credentials? I am aware, that I can use the JWT-Token instead, but the user is not comfortable with providing that due to the unlimited access to all data, with OAuth2 the user can see what the application is able to access.
@hybrid seal Applications are currently on hold unfortunately.
@hardy walrus That's a pity, but thank you for the fast answer!
in my elements with the overlay, im busy with the subs but i see i can add and {amount} to it. will thjis be my subs amount?
If I set my widget data subscribers goal to 0, and emulate a single subscriber, the actual session data is still remaining at 0 right?
Also the subscribers goal does not reset after any amount of time until either manually changed or when pressing the "Reset goals" button correct?
@pulsar willow You cannot change single server into CDN, but if you want to have proper headers: https://enable-cors.org/server_apache.html
And for CDN you can sign up for cloudflare
The subscribers goal progress ticks by +1 for every subscriber right?
@viral patrol
No matter what type of sub, gifted or normal
@viral patrol new i'm tring to add cors parameters in my .htaccess
@hushed ibex correct
Great, thanks
Is it possible to add the advanced text options you have with alerts to custom widgets? I've heard that you can use windows installed fonts on there and I was wondering how I would do the same with a custom coded widget.
If you have a font installed you can just type name in font-family
Any way to make the media request widget's song title text scroll? Some song titles are quite lengthy and it would be nice to not have a huge widget.
easiest 'custom font' is to use the "type": "googleFont", for a list of all Google fonts π ... but yea; you can override that with a local font style
There is no way (that i know of) to edit the built-in widgets, including the Media Request
k, thx. I will throw it in ideas
there is a way to do a math calc on the Alertbox widget using the alert message, like ${customapi.https://twitch.center/customapi/math?expr={amount}*10} or ${customapi.https://twitch.center/customapi/math?expr={amount}%2A10} ?
So I wanted to ask -- for the timer widget, how does it manage to its time in the capture window with the one in the widget? I tried writing my own and when it's captured it acts as a separate window on load, which means that it reloads and starts from scratch.
Hi
@viral patrol Hi boss
in my top leadbord if i delete some users like me and bots it will be deleted forever or not ?
You have to add those usernames to ignore list
@viral patrol where is ignore list ?
@pulsar willow https://streamelements.com/dashboard/loyalty on the bottom. Also please keep this channel for developer's stuff related discussions. For generic inquiries jump to #helpdesk-twitch
@pulsar willow https://streamelements.com/dashboard/loyalty on the bottom. Also please keep this channel for developer's stuff related discussions. For generic inquiries jump to #helpdesk-twitch
@viral patrol ok, sorry
Guys Iβm sorry im asking everywhere and I need assistance my twitch stat tracker is not updating with the stream any idea how to fix this
would anyone be able to help me understand why my html script is not running in SE alert but its working fine in my Visual Studio
Hmm is there any way to forward a donation from a external system to streamelements, just wondering since i know it can be done with other "alert providers" - the reason im asking is actually im thinking about doing a mobilepay system for denmark, and it would be rather needed to be able to foward a donation via api to trigger the notification to popup
Hello !
I would like to know for those who customize their alerts, someone has already successfully implemented this css module:
mix-blend-mode: difference;
It's working in all the alert widget but not on the rest of the overlay, has someone found a solution to this problem?
*I had thought of putting the div that makes the difference as a child of the body / div #overlay but I can't even make a poor console.log
(and sorry if my english is bad
)*
I have some questions about custom widgets: Is there a way to implement streamer triggered "alerts" into them. So i can start certain actions with a hotkey or streamdeck ? Is it possible to stack sources ? On hotkey: video plays, transitions into looped video.
(For more explications of my problem
)
Can anyone help me figure out why this is not working when I trigger my follower alert?
Here is the CSS
it works fine in the html doc
Here is what it looks like in browser
figured it out
@tired plinth About console functions, please use console.debug, and check your messages in verbose log level. About mix-blend-mode - Alert is a separate iframe, so it doesn't have access to whatever is beneath it (outside of DOM)
So; I'm looking for a site that shows how many subs you currently have
There's this one that works perfectly as a command.
${customapi.https://twitch.center/customapi/math?expr=${channel.subs}}
(Just to keep track for myself) BUT!!
What if I wanted to make it a 'sub goal' thing.......
https://twitch.center/customapi/math?expr=ACCOUNT.NAME
Tried this; didn't work.
Came back with " ??? "
@thick mantle You can take that widget and apply math in JS code: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
thank you so much @viral patrol you are a real champion
https://github.com/StreamElements/widgets/blob/master/GoalsOverPeriod/widget.js#L82 in first line of updateBar function can add count = count - 1; so it will reduce real count by 1
And to make that work - create a custom widget, open editor, paste contents of each file from this directory to corresponding tab of code editor (JSON file goes to FIELDS tab)
Okay, still no idea what I'm doing. π
Hmmm. Where do you want to display it?
Overlay or chat?
If you want a command with sub goal, you can just add /100 like ${channel.subs}/100
So it will be displayed like 12/100
im wanting to make a scrolling textbox that has my most recent follower and my most recent sub how would i get the data of those to be added to the scorller
@paper snow Check that widget: https://discordapp.com/channels/141203863863558144/457957557470887947/694507700977008671
thx
anyone thats good with creating custom widgets on streamelements? im looking for an event rotator that fits the diplay of my overlay, i have already looked in the widget-share chat but none of the designs fits what i need, if someone could help me out then i would really appreciate it. i would even pay a small fee for the service if its needed, feel free to reach out in PM
@viral patrol does that widget update automaticly when a new sub/follower happens??
It does
Have you registered recently?
yea
Widget will get first sub when it happens after your joining StreamElements
We have no data about the past
okay that makes scence
Do you want is as a text, or as progress bar?
Text
https://discordapp.com/channels/141203863863558144/457957557470887947/694507700977008671 And in widget text you can type {subscriber-total.count}/100
Awesome; I'll check it out now
What's the query for "Sub points"??
That widget is amazing btw!!
You can use those: https://github.com/StreamElements/widgets/blob/master/CustomCode.md#possible-keys-within-data but change it to proper format as above
Awesome! β€οΈ
Soooo; I have another question......
I currently have x5 subs
The 'sub points' widget you linked also says 5 sub points. BUT, on twitch it says I only have 4 sub points..... π€
What's the go there??
Do I just have to offset it by x1 ??
@viral patrol
Unfortunately Twitch API is kinda messy when it comes to sharing sub count and sub points.
So with us subpoints=subcount.
And you are counted in as well (even if your account is not giving you sub points)
I'm having a tough time getting my image masks to work in css, and for the life of me I cannot figure out what is going on. Maybe someone can offer some guidance. I have an alpha/black png mask uploaded into stream elements, when applied to the main container with '-webkit-mask-image' and a fixed position, its cuts a window through my layout for my camera; all great. I decide to change the mask, so I delete the uploaded file and reupload some more masks to try. 1: The old mask still works, url and everything, even though it was deleted. 2: replacing the url with any of the new mask files results in a blank image, as if the entire thing is masked. How does stream elements handle deleted files? I'm not sure if this is the root of my issue, but is it strange that the url still works?
The easiest way is to handle mask-image as it is in "gradient webcam" widget on #widget-share
@viral patrol Thanks, Ill look into it, but this still is not making any sense.
.main-container { width: 1920px; height: 1080px; position: absolute; -webkit-mask-image: url(https://cdn.streamelements.com/uploads/57c69188-36dd-4201-98a0-ff3a2f55af87.png); -webkit-mask-attachment: fixed; }
File is still cached in our CDN even if it is deleted from our servers
above code works perfectly fine with https://cdn.streamelements.com/uploads/757b01ad-02e9-494e-9008-104d15067e6e.png *this is the deleted original file
And if you want to have easier management:
CSS:
-webkit-mask-image: url({maskImage});
FIELDS:
"maskImage":{
"type":"image-input",
"label":"mask-image"
}
Which will produce nice input field for that image
Also the issue with mask-images - it is a known issue that CDN provider presents incorrect headers (this affects not only StreamElements) and caches them.
ok, thanks for the guidance, maybe using fields will get me around the caching issue
if not, ill look into that widget you mentioned
This is why I suggested gradient webcam widget which has "cache invalidator" when there's an issue with accessing on first call
Awesome, thank you
@viral patrol I'm getting a βplatform mismatchβ on the gradient webcam share link. I'm relatively new to streamelements, is there something I need to do to get access?
Oh. That widget is for Twitch (but it is platform independent)
ah, im on youtube
Let me prepare jsfiddle for it
@crystal frigate https://jsfiddle.net/4a8b0d67/ and custom fields are here: https://pastebin.com/RL58bveT
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Cool, thank you for the help
lol, running the widget fixed my problem in my original, probably because of the cacheCheck
I am happy it works for you π
Does anyone have any examples of custom text animations on the alerts? (not even sure if this is possible) I'd like to make my own animation
Those animations are from animate.css package. You can create your own animation when you enable custom CSS and create a widget from scratch
thanks @viral patrol. so i can probably get away with altering the default alert code as i can see each letter of the name is being wrapped by a span here. I think the confusion came in because I initially saw all of these and was wondering how it relates as I didnt see any of the widget events within the default alert box widget code https://github.com/StreamElements/widgets
Check this as custom alert: https://github.com/StreamElements/widgets/tree/master/AlertboxTextFit
Ohhh. It has no wiggle and other stuff
btw for all of these custom widgets in this repo, i would have to copy/paste them into a custom widget within SE to test them out right?
there's no auto installer type of thing (similar to installing packages on sublime) for these repo widgets?
how do you set your follower/sub goal
@copper notch TBH there's installer located on https://jebaited.net
In "Overlay importer" section.
Can we please have the Api trigger when an Alertbox alert is tested. When other apps use the SE Api thereβs nothing that triggers it other than a live alert causing users to think thereβs an issue
When you listen to that event it should containisTest property
It doesnβt send to the Socket api at all
Hi, I am trying to create a widget and wondered if the fields section supports multiple pages or nested content in the same way that variants in alerts are created?
Also wondered if there was any documentation available in regards to what the widgets can access from the chat etc.
There is no such detailed way, like for the variations for the normal alert box with custom widgets.
You can create groups with "group": "GROUPNAME".
Take a look here for the events we recieve: https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
Hi, so I am trying to include 2 additional sliders into a pre-made rotator widget, however despite making a few changes to line data etc, it prevented me from being able to read the field data and I am wondering what I need to do to make the copied code work. Thank you
If I type it in incorrectly the fields disappear leaving only the Open Editor.
Can you share the field data code uploaded to https://pastebin.com/ please.
is there a way to parse a JSON response within the streamelements chatbot?
Thanks @rugged rapids ! π
@boreal ridge
You can't parse JSON nor write logic within custom command. It gives you plain text response it got from remote URL. If you want to have logic, it should be included in requested url's script
thanks Benno! that's unfortunate, but good to know at least.
@rugged rapids Thank you, this is from the fields tab of StreamElements https://pastebin.com/Q7aYkZBT Thank you
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.
If I copy that code into the fields tab, I can access all the fields in the fields section on the left.
I want to add additional fields though and it errors out when I attempt to do that @rugged rapids
What I gave you is the default field text
Please give me the fields data with the things you tried to add.
Okay, hang on
I don't know what to do, the text isn't pasting now
Its fine, I'll just hire a coder to resolve this. Thanks Benno
Check if you have a proper network card selected here:
Sometimes it tries to use your wifi card, when you are connected via eth only
@viral patrol no it does not fix my problem
What is the issue you have? Can't you start stream or is it something else?
@viral patrol i am not able to stream my obs is not capture my internet speed in 2000 bitrate my obs network is red
@knotty sandal check this tool https://r1ch.net/projects/twitchtest
@viral patrol
Seems like something is throttling your upload to 2.5 mbit
It is your ISP issue most likely, you can run a speed test with some distance server (not running by your ISP)
@viral patrol i am from india and we dont have twitch server
i am showing you my inter net speed on speed test.net
@viral patrol
@viral patrol this is my internet speed
@rugged rapids Sorry to tag you I have a question for you regarding your Social Media Rotator widget, how can I create a shadow around text? Thank you
Add the css classes.
I need a CSS education, I'll pass this over to my coder
I wish you were for hire Benno, I'd pay you if you weren't busy
@knotty sandal Sorry. I had a call. Are you using different ISP for speedtest? Usually providers are throttling on the exit from their network.
To check if it is the issue on exit from your country
(as you have to do when you are connecting to Twitch)
Ohh. So same could apply here. If you have YT servers in India, please use server in same country, but not your ISP
Otherwise, select different country
As this issue seems to be throttling on exit of your ISP network
i was getting this issue after obs live get update and i have also reinstall the obs live also @viral patrol
@viral patrol and i have use obs live since 2 year but i never get this issue
And your speedtest result for other ISP or abroad displays that you have better upload?
Speedtest within same network is not reliable, as I mentioned above.
Upload here seems fine (but download is really throttled).
@viral patrol yes singapore server download speed is throttled
@viral patrol so what should i do in my obs
Try to change your server to backup rtmp for YT: rtmp://b.rtmp.youtube.com/live2?backup=1
Also - I am not too confident with YT (I take care of developers/API related questions on this channel)
@viral patrol thanks for helping me
@viral patrol but i am not able to open this link
It is a link for OBS:
@viral patrol ok thanks
How to add browsers source in SE Editor
It is not possible due security reasons
Curious if it's possible to grab total loyalty points in the system without cycling through every user.
for a channel
Will the SE_API.ResumeQueue() function only work when testing in the streamelements overlay editor or is it functional on the standalone SETest with a JWT token (I haven't dived into the simulation files to see what's going on there yet)?
If I use the static text widget, is it possible to use variables? Or do I have to use a custom widget? I added {game} to the text but it just removes it completely and leaves a blank space in the widget text
ResumeQueue method will work only in overlay editor/live overlay. I created SETest way before ResumeQueue was introduced. It covers just several types of events that are received by onEventReceived listener.
what happened to the API form requests, like "we are having issues, we'll solve them soon" literally 1 month and 1 week
Is it possible to flush old fieldData fields? I have old fields I'd like to get rid of π
and no, the field doesn't actually exist under fields
Does resizing a custom code widget in the overlay editor trigger a βbrowser resizeβ event? I want to create a widget that can adapt to the size of its widget box.
I'm looking to develop a spinning wheel for like a random pick between objects. Is there anything similar to this?
Hi, wondering if someone can help, i mod for a streamer, and he has changed to StreamElements, i have managed to move all his command to SE but there is one that we need that i cant move over from nightbot. This is the command (It counts down to Tuesday each week, so if ran now it would let you how long till next Tuesday 5PM)
Time until next reset: $(countdown $(eval h=17+0;n=new Date();s=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()+(2-n.getUTCDay())%7,(h%24+24)%24));if(s<n)s.setDate(s.getDate()+7);s.toLocaleTimeString("en-US",{hour12:true,month:"numeric",day:"numeric",year:"numeric"}).replace(/\//g," ").replace(/,/g,"").replace(/(?=\b\d\b)/g,"0")+" "+Intl.DateTimeFormat().resolvedOptions().timeZone))
Nightbot can understand the eval command but SE does not, Can anyone help me convert this.
I'm trying to make a JQuery HTTP request on a custom widget but the request is being blocked with "CORS Missing Allow Origin". Is this an issue on the StreamElements side of things or the endpoint I am requesting?
For reference, I'm able to request this endpoint in other ways (i.e. a urlfetch by a bot). I just can't seem to make it work on a widget.
Thank you @rugged rapids
@stray tide Unfortunately there's no simple way to flush them.
@obsidian imp Resizing custom code widget doesn't trigger resize event, it reloads whole contents.
@sinful obsidian Unfortunately there is no JS eval in bot. You could do that ${time.until ${customapi https://script.url/date}} Where this endpoint provides you proper date like:
<?php
echo date(DATE_ATOM,strtotime("next Tuesday 5 PM"));
@clear oasis This is definitely endpoint issue, that doesn't have header access control allow origin set to wildcard, so you could call it via custom widget.
Hi ! I'm learning how to make new widget by studying other's one, first being the StreamElements default one available on github. I got two questions :
-
I'm quite interested at how default Alertbox widget allow to add (what seems to be) any number of Alert variants, but I can't seem to find the code allowing that in the code repository. There are two type of Alert Widget in the files and I can't figure out how it is done. To the point I'm wondering if this is actually the code used for the default widget. Some other widget configurations (in the editor) do not match their json description, so... Is that repository the one for the default widget ? https://github.com/StreamElements/widgets Or where can I find such code, if possible ?
-
I'd like to add a widget that react to a specific combination of emote in chat. I read in the doc widget/StreamElement API doesn't actually receive event for channel message (and I can guess why). I can find a sniplet to connect to chat but I'm wondering what credential I should use. I'm already using a specific account for chat bot (using OBS.Live, so locally), I suppose I can't connect with that credential from StreamElements. How to best proceed ? Do I need an other bot account again ?
Actually, I got a 3rd one :
3. I also read in the doc StreamElements does not yet natively register to Channel point redemption (and we need to connect to chat again, as far as I understood). Any idea when that'll be available ? (like a few months ? before the end of the year ?)
@native pasture
- Variations are available in "alertbox" widget only. Other widgets (Custom widget) don't have that feature
- Chat is not available for YT only, but if you are using Twitch/FB: https://github.com/StreamElements/widgets/tree/master/EmoteComboSounds
- I have no clue about that one, but you may want to check: https://overlays.thefyrewire.com/widgets/triggerfyre/
@obsidian imp Resizing custom code widget doesn't trigger resize event, it reloads whole contents.
@viral patrol That makes sense, but Iβm not seeing that in my editor (jQuery never receives the page load event after resize). Maybe I have to leave the overlay and then open it back up after making the change?
@viral patrol Thanks for the response. Why would a bot's urlfetch be able to reach the endpoint but not a custom widget? I guess I'm asking what urlfetch actually does.
what language does the bot use? Im reading up on interaction within a VR game which would free me up. Apprantly python is the way forward
This may be something that is easily fixed, but I'm bumping my head trying to work it out.. is there a script that will take 99 divided by 50 (for example) and return a 1 instead of a 2? An INT command basically?
or a command within the chatbot that will do this that I'm not finding any documentation for?
@lusty portal use math.ceil() in python
math.ceil() function rounds up to the next full integer
Ok. Thanks. π
np
@clear oasis Bot doesn't care about response headers so it can display contents. Browsers (like OBS) have security that check this stuff before parsing external resource.
@obsidian imp jQuery will have document ready or you can listen to onWidgetLoad event
@zinc spire @lusty portal math.floor() as ceil will go to next value π
@viral patrol Iβll try listening to the load event. Thanks!
Thanks @viral patrol
@viral patrol Thanks so much for the help
wondering if anyone could help i been trying to make the tip goal but it doesnt let me set the starting amount to 0 only how much u been donated throughout my whole twitch career
Hey, sorry, asking again because I didn't really get an answer the first time and this is something of an involved question
If anyone's familiar with the timer widget that's available on streamelements, I'd like to ask if anyone knows how it's synced to a remote version rather than instanced for capture with OBS -- is the original creator around somewhere, maybe? Or is anyone familiar?
(Is there anyone I can ping for this sort of thing? I'm reasonably familiar with code already and I'm asking mainly because I can't seem to find an answer anywhere else due to how much of a specialized question this is.)
@round crypt why don't you just manually set it to zero? You could subtract an arbitrary amount from where you want it to start at, after all; you could certainly subtract the current value of the donated amount; that'll set it to zero for personal usage, if you want to make it a publicly available widget you could add a place to enter a value, or you could remotely store the startup value somewhere the first time someone opens/uses the widget.
@round crypt To reset goals:
- from the Overlay Editor > Session data on top right (monitor symbol) > Goals tab > reset progress of desired goal
- from the Dashboard > Activity feed on the left > Widget data on the right > Goals tab -> reset progress of desired goal
Note: Goal widgets (progress) only counts up and doesn't go down automatically, if you loose followers/subs.
You can also use widgets that reset automatically: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
@inland skiff Which timer widget are you referring to? Countdown?
What would be the easiest way to combine the se data from youtube and twitch?
My guess is creating 2 socket.io connections and grabbing the data from there
Yes, that widget. @viral patrol
This is just a regular intervals that just updates time remaining. There is nothing fancy behind it. It relies only in JavaScript AFAIK
is there anyone here who takes commissions? Im thinking of buying some maybe a couple of months later, so I am just inspecting about prices and all.
If so, then please message me. I will reply when I next come online.
Hey - would anyone be able to assist in having usernames that exceed a certain size to dynamically scale down to fit within a certain area? This is for AlertBox alerts.
Is it posible to change a command response through an overlay?
Maybe some kind of javascript function or something?
What would you like to achieve?
@magic notch I created something like that some time ago: https://github.com/StreamElements/widgets/tree/master/AlertboxTextFit This may help you create something around this code (which has automated text fit included).
What would you like to achieve?
@viral patrol Many things, but for example a command that gets session data (like subs from today) or one that updates a countdown/countup timer
Unfortunately it is not possible ATM, but this is a brilliant idea
Oh π¦ Well, i guess I can just make posts to a personal website and then from there change the command through api
but yes, it would be awesome if we could through overlays
how long do the access tokens for oauth2 last? and is there anyway to refresh to make them last longer?
You should receive expires in your token which will have be time in seconds (the best is to store expiresAt set to timestamp) and refreshToken that could be used to generate new accessToken: https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/
Is there a way using stream elements to have it set each time a person cheers it displays the over all amount they have given to the channel?
Say when someone cheers 100 bits but has cheered 1000 before it would show an overall total of 1100 as a chat message
Unfortunately there's nothing like that available.
has anyone gotten this to work? https://discordapp.com/channels/141203863863558144/457957557470887947/623835460938104834
idk if im in the right chat but I was wanting to know if and how i can copy all my alerts from one theme and put it on another theme?
Chat Commands >> !pause >> Command Keywords -- refuses to save any command keywords, tried in multiple browsers.
Hello! Can anyone explain how I should write the command aliases or command keywords to recognize combinations of words and symbols. For example, I would like a user to be able to write "dead :)" and have chat bot respond "${user} just mocked your death! You have been mocked ${count} times!". I can get it to work if I only write one word in the aliases or keyword section but not if I want it to only recognize "dead :)". Thanks!
Please if anyone can help im just trying to get a better on screen readout of the current giveaway I am starting and the only other one I can find(https://discordapp.com/channels/141203863863558144/457957557470887947/623835460938104834) doesnt pull any information and the default one has no customization at all
or at least if there is a way to view the code of deault modules, the docs.streamelements has code that doesnt match anything in use that i can see
function getGiveaway() {
let newDataRequest = {
method: 'GET',
url: https://api.streamelements.com/kappa/v2/giveaways/${channelId}/,
headers: {
'Authorization': 'apikey ' + apiKey
}
};
this has to be the problem section, but nothing here https://docs.streamelements.com/reference/single-giveaway#giveawaysbychannelandgiveawayidget helps at all, even the javascript section isnt even the same coding language
Hi, I would like to know if you have the possibility of configuring a command that, via chat, returns the name of the VLC source that is being reproduced on the live? # indicated by @torn gulch
@crisp laurel Code on docs covers giveaways this widget queries
But if you want to check docs for JS code used as custom widget, you may want to check this: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
@rugged rapids on your video on command widget is there an easy way to make it work for all users and not just mod's and vip's?
I recommend to use the stream store for that purpose.
Any plans on introducing a queue system/command?
@wicked basalt Check this out: https://thefyrewire.com/kappa/queue/setup
thank you
@viral patrol you just sent me the link I said doesn't hold any information. The docs Javascript section isn't Javascript and not a single section of the coding examples match any of the coding used by any of the custom widgets. Which are the only ones you can view the codes on because for some reason the default widgets codes are kept secret
Almost every single functionality in default widgets can be done by JS and provided examples are used in custom widgets.
(BBL)
Hi! π I just see some streamer was do custom widget by himself and I want to do it by myself. I try searching how to do it and found that I need HTML, CSS, JS and JSON but I only similar to HTML and CSS. Where I can learn about JS and JSON (also intermediate HTML, CSS if needed) for do a custom widget.
@tender siren Check this: https://github.com/StreamElements/widgets/blob/master/CustomCode.md and the whole repo
@warm anvil what kind of commissions.
Is there a way using stream elements to have it set each time a person cheers it displays the over all amount they have given to the channel?
Say when someone cheers 100 bits but has cheered 1000 before it would show an overall total of 1100 as a chat message
@dry latch Actually @viral patrol is both right and wrong. There may not be anything publicly available, however, This is EASSSSSY to do.
@viral patrol Many things, but for example a command [...] that updates a countdown/countup timer
@tulip river This is totally possible. I currently do this.
If anyone's familiar with the timer widget that's available on streamelements, I'd like to ask if anyone knows how it's synced to a remote version rather than instanced for capture with OBS -- is the original creator around somewhere, maybe? Or is anyone familiar?
@inland skiff Timers are usually instanced, as doing more than instanced requires some technical knowledge. However, it can be done by using cookies I believe. (If OBS can do that, which I believe it does...because my custom stuff wouldn't be working if it didnt)... Basically, you set the timer information as a cookie, and it will remember from the cookies rather than a variable instance.
I'm trying to make a JQuery HTTP request on a custom widget but the request is being blocked with "CORS Missing Allow Origin". Is this an issue on the StreamElements side of things or the endpoint I am requesting?
@clear oasis You could possibly use an iframe to get the information. Set the source to where you're sending the request.
well that is good to know. If you could help me I will love it
Hi! I'm trying to make a custom CSS widget in overlays which uses the loyalty points information. I was wondering if there is a why to get the loyalty information for a season, mainly who is in the top 10 and how many points they have?
@silk plank for your own channel?
@tame sparrow Yep, for my own channel. Trying to make an overlay where I show the Top 10 leaders on the leader board. Wanted to animate it so I was wondering if there is a way to get the raw information. That way I can give it different fonts and animations using CSS keyframes.
You can query this URL: https://api.streamelements.com/kappa/v2/points/${channelId}/top for your toplist
How does SE get the raw points? There's an API endpoint for a user's channel points from twitch? @viral patrol
https://api.streamelements.com/kappa/v2/points/:channelId/:username
@viral patrol I'm asking about how they get the points from twitch.
We don't have anything with twitch channel points.
@pallid scarab About Credit roll - ensure that the overlay that has the credit roll widget inside has "shutdown source when not visible" ticked
@hardy walrus but...but...
https://api.streamelements.com/kappa/v2/points/:channelId/:username
@viral patrol
This endpoint is for SE loyalty points
ohhhh
The only way to get Twitch points redemptions is to use pubsub
You may also check this tool https://overlays.thefyrewire.com/widgets/triggerfyre/
@tulip river This is totally possible. I currently do this.
@tame sparrow how?
@tulip river what was the original question? I can't find it.
@tulip river what was the original question? I can't find it.
@tame sparrow changing a command from an overlay (from the custom css/js part)
@tulip river ah, I found it. You can take the data from the widget, and then push it to cookies, or a website to store the data, then pull the data on chat command
ye, i was thinking that way of doing it, but wanted to know if there was a way to do it without pushing data away from SE
How are you trying to use it? Are you outputting to chat, or storing the data, or does the overlay do something on the screen to show the data?
You won't be able to use cookies in custom widget (as it states in docs - no cookies nor indexeddb due to browser security policy). You would have to use external middleware.
I believe there are ways around that.
Give me a sec. Testing out my idea.
as for timers, you'll have to roll your own, but you can use cookies/php session data to deal with persistent timers
PHP session data will not work with bot command as it is different session happening.
How are you trying to use it? Are you outputting to chat, or storing the data, or does the overlay do something on the screen to show the data?
@tame sparrow well, I have some fields for the countup/countdown to put the date there
So what I was thinking was to run the "function" to change the command if that did exist every time the load overlay function got activated
but if that change command function doesn't exist, I guess I would send that date to my server and from there do the customapi command
but don't like that idea at all
what do you mean change the command?
edit it
which you could do, I'm just curious. give me an example of what you mean
Hmmm. I think you could use this: https://keyvalue.xyz/
So your overlay updates value via POST request to keyvalye.xyz endpoint, and your command has ${customapi https://api.keyvalue.xyz/a17766c6/myKey}
which you could do, I'm just curious. give me an example of what you mean
@tame sparrow if someone does a 24h livestream for example, this guy could just go to the overlay and change the date from the fields section
and then overlay and command gets updated without having him to update the command as well
Ohh. keyvalue.xyz values expire after time of not being used.
So this is not a way to go as doing 24hrs stream is not a thing that happens often
Also each user should provide their own keyvalue.xyz URL
yes, that's the problem more or less, I could do it with my own server
oh, you can still do it just fine.
But like more the idea of doing everything in SE
without using external servers, etc
you can do it within SE if you want. You can also do it by running a local host server on your local machine
right now, if you want to use SE, what do you mean change the command?
update/change/edit the response of a command
hmmm not at all
From what I understand. Scenario:
You have a command "!hello" with response "Hello Monday!"
And you have an overlay that changes day of week in that command itself
yes
oh thats easy sauce
And what I wrote on the start, it cannot be (in a safe way) done within overlay alone, without MITM proxy
exactly that, that when overlay loads it sends the new data provided in the fields (in the case of the countup timer, the starting date) and update it on the response command
you would need 800 lines to do it.
well, not necessarily 800
you need to connect to chat via javascript and websocket
then parse the chat, and whenver people send that command, you make it send a message to chat after figuring out which day it is
Again - there's MITM, and end user would have to provide Twitch OAuth token in widget config. Each change in widget would call "!cmd update test new response!"
not true. You just need your user authorization key, and your client-id.
but that way you are not updating the command of streamelements
you dont need to, you're going to check for the command from chat responses
but how would the bot answer the command?
you will receive the chat message in there, and you will be responding, not the bot. it will be 'you' replying the message
hmmm yeah, before going to that solution I'm making the post in my server thing xDD
that looks more complicated for casual users than placing a customapi from my website
This way it would require rewriting whole "command like" stuff, like permissions, cooldowns and other stuff within widget. Then end user (typical streamer, with regular technical knowledge would have to provide their OAuth chat credentials in custom widget)
I totally agree
This way it would require rewriting whole "command like" stuff, like permissions, cooldowns and other stuff within widget. Then end user (typical streamer, with regular technical knowledge would have to provide their OAuth chat credentials in custom widget)
@viral patrol true
You're correct. However, if you want this functionality, it's doable.
as far as i'm aware, this is for @tulip river only?
Yes yes, of course it is doable, like everything in programming xDD
you want the next and best thing, you don't care about how viable it is to implement for everyone, you make it, and show it off.
You care about this stuff when it comes to user experience.
That's correct
as far as i'm aware, this is for @tulip river only?
@tame sparrow well im not streamer, just got that idea by working off with some streamers
so maybe I could give them a "better experience" than spamming me in whatsapp everytime they want a timer
if it's just non graphical widget and it doesn't show up as an overlay, it shouldn't be done in SE π€·
That probably would be more work than even requiring authorization
How do i comment something out in HTML ?
I dont want a div to show anymore but dont want to "delete it" incase i want it back later
nvm got it
Hello people, i'm just starting to the development in streamelements and i have a lot of questions
I want to increase the number in the variable count when some StreamElements options triggers
But i don't know how to read streamelements events
`
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const datas = obj.detail.event;
});
`@pale acorn
More detailed information about received event: https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event
howdy! i'm looking for a way to add an appearance delay to grot's credit roll widget, as well as a "roll time" that will change the speed of the credits depending on how many people are in them. both are easily changeable options in the streamlabs credit roll widget, but i'm here instead because uuuhhhh nothing from streamlabs ever seems to work right! lol
as for the delay, i know you can simply set a render delay filter on the source in OBS, but mine only seems to allow me to set it to up to 5 seconds, when i need it to be 10.
@balmy nebula You can find updated version of that widget on #widget-share channel
oh woops! just made the switch from labs to elements today so my b!
is there....supposed to be something in the sidebar settings that will do those things i'm talking about?
When you click widget and "settings" in left panel, you will be able to adjust stuff
oh yeah I knew about that, but none of the stuff in there seems to be for the specific thing i mentioned which i'm trying to do. I know next to nothing about the actual coding side of these things, so i just figured i'd ask in here to see if anyone else has done that with it before.
@wet steppe OBS > Settings > Advanced > Scroll down > Enable or disable Browser Source Hardware Acceleration, depending on its current state > Restart OBS (This does not apply for OBS on Mac)
https://i.imgur.com/ggMe9ZE.png
Great! I'm grateful....thank you
@balmy nebula I just added that "start delay" for you there, just reinstall the widget. About "roll time" - speed is static, so if you have 100 events it will not go ridiculously fast
thanks very much!
the thing is that i actually made an outro video that includes a section of relatively blank screen for credits (it's exactly 53 seconds) so really i WANT it to go faster if there's a bunch of events, or conversely slower if there's not that many
either way, i want it to always take that exact amount of time to start coming out of the bottom of the screen to when it will be all the way scrolled above the top
again, i don't know much about the development of this stuff, so i'm unsure if that's asking for a lot or not lol
I have added this, please reinstall the widget one more time
@balmy nebula ‴οΈ
I think that there will be more streamers looking for those features
does the no-loop fix that you gave someone a couple weeks ago still work with this?
that may also be a good feature to throw in
Quick question π with SE & OBS ( ans possibly vmix), can I use modules in javascript ? So I can use the import syntax π
I think it is available only for script tags that type is module.
`
window.addEventListener('onEventReceived', function(obj) {const listener = obj.detail.listener; const datas = obj.detail.event;});
`@pale acorn
@tame sparrow ty
Hey guys,
Is it possible to create an overlay that displays messages from only one viewer?
Explaining;
I would update a string in a Google Sheets cell. In that cell, i'd put viewer names.
The overlay then would filter the entire chat to display only that viewer messages.
working as some sort of "private talk" with that viewer in question
Sure
All chat messages are sent as events, so you can filter them and print the ones you care about
Does anyone know of a way to automate when someone wins a draw in streamelements that I can !addpoints automatically to the winner?
or at least grab their name as variable and I had points at a push of button?
nvm
All chat messages are sent as events, so you can filter them and print the ones you care about
@sharp island
How would i start making this? now i don't know how.
Could you give me something to start?
I'll try to learn and develop it π
I think there are some existing chat widgets you can look at and use as the basis.
ok, thanks!
I have TTS on my Cheer active but I want to limit how long someone can put their message so they don't spam things. How would I do this?
I was just streaming, and when I received a follow, only the audio for the follow played. The video didn't appear, no matter what I did. I tried to go to the Streamelements Overlay Editor, but I received an "Invalid Authorization Token" notification. How can I fix this?
@dim stream give me a moment and I'll get you an example.
`
var cooldown = false;
var chatTimer = setTimeout(()=>{
cooldown = false;
}, cooldowntime*1000);
OnMessage.push(eventdata=>{
if(!cooldown){
cooldown = true;
soundclip.play();
chatTimer = setTimeout(()=>{
cooldown = false;
}, cooldowntime*1000);
}
});`
@dim stream The above code can be placed in the bit notification closure you would have. It would only play when the cooldown time has passed.
If you want to preserve messages (as this will block anyone else sending bits to you) you should use an array to push the messages to instead, and then take them from the array at an interval.
@muted moon try resetting your cookies and closing your browsers. Then go to stream elements and reauthenticate your twitch when you login.
Also to the above. If sound is played it means that overlay works most likely, but animation is either out of canvas (your browser source is not 1920x1080) or covered by other layers in OBS (keep alerts browser source as top one in browser sources)
Can someone tell me how to make a chat command for countdown ... so that i can set a date and time and respons ist hwo many days hours ect left ... or stopwatch then the other way
Is that possible with SE? Thx
$(countdown sep 11 2020 08:40:00 PM CET) didnt work for me
I need some help with the Alert Widget from Breci. How do I change the font for the text?
@abstract basalt
@tiny tusk ${time.until 2020-09-11T20:40:00Z}
Normally you have a dropdown to select a google font π Settings=> Customization=>Select a font
I dont have that
dm me a screenshot of your customization tab plz π
On it
@viral patrol Thx a lot. Do you also have the recipe for "since date"
Can someone help me?
Is there a way to change the way the contests reward payout?
I just want it to be double or nothing rather than distributing it between all participants
because many times people wont vote on the other option at all
This is not possible to change payout of contests.
hey guys I need ur help, I got new alerts made and when I select the font to be played over the image it doesnt show at all, please help π
Check text position as it is -50 top by default. Adjust that to display your text
Howdy, is anyone around atm ?
The Streamelements Support account on Twitter asked me to ask my question here:
I need the text box to always remain the set size+position, and the text to adjust in size to fill it at the maximum size that doesn't "clip" outside the box. Right now I have "Dynamic Font" turned on, but it makes the font extend beyond the box for short names.
Can someone help me how to get this to work? I can ofc manually set a text size, but that's looking quite a lot worse for shorter names.
You can check this one: https://github.com/StreamElements/widgets/tree/master/CustomLabels @primal raft - create a custom widget and paste contents of each file from there to corresponding tabs of custom code editor
JSON goes to FIELDS tab
So I came here looking for @steady iron regarding his awesome shoutout overlay. I'm having an issue with the image and text for the shout out being cut off and no matter what I try its still cuts out. SO I need some assistance
Iβm wanting to hire someone to do something probably fairly simple. I want a donation goal widget that is an icon or my logo or something that fills up as it completed
oh thanks man
Would someone please help? How do I render and import a small video for alert animations? What format does it need to be in for the alpha layers to work? and what can fit under the 30mb requirements?
I'm using Movie Studio Platinum.
@vernal holly The best results you will get with webm libvpx-vp9 file. To get to that I was usually rendering to mov format, then I was transcoding that file to webm via ffmpeg (https://ffmpeg.org):
ffmpeg -i inputFile.mov -c:v libvpx-vp9 -pix_fmt yuva420p outputFile.webm
will the alpha layers work if they're a mov first?
If you select color range RGB + Alpha, they will
This is a screen from AfterEffects:
how do i "--enable-libvpx"
What OS do you have?
Did you compile it on your own, or did you get a precompiled package?
precompiled exe for windows
do i need to get the build and re-compile with the option enabled?
Hmmm. That is odd. I was sure precompiled version has libvpx already enabled
I see that 4.3.1 release has libvpx enabled:
You have a typo there in command as syntax is -c:v and you have -c only
nice! that's doing ... something haha
LMK if that worked out.
aweome, looks like video with alpha worked
no sound though
do i have to do the sound file separately?
Sound should be copied from original file automatically
ahhh ok ok.. it just wasn't showing in the stream elements editor, i see it when i do an emulated follow
that's great, thank you so much
You are welcome
is there any way to store donation history from another platform(saweria, INA, $IDR) that could be used in event list widget? i could get the data from said platform via SSE, but then i couldnt store the history, so that when the widget is refreshed/reloaded, the history is gone and it would only display StreamElement's logs
hello, working on a widget, i want to get the cheer emotes used in a cheer and the total value of bits cheered. as far as it seems, the cheer event itself does not contain the emotes in the message, so i would need to check the emotes in the emotes array of every message, parse all the cheer urls and check that they are surely cheer emotes and calculate the value there as well? seems so hacky
To get the total amount you can use {amount} templating variable. To get emotes - they are in {message} as img tags or you can parse {messageRaw} like [A-Z][A-Za-z]+[0-9]+
oh, thank you! as what would i need to parse {message}? it says, it is an html message, but looking at the example value, it confuses me a bit
Hello, there are any way to delete current playing song through api?
@silent osprey If you want to get exact value attached to cheermote, this is the way. Total cheer amount is in {amount} templating variable
@spare knot https://api.streamelements.com/kappa/v2/songrequest/:channelId/skip method: POST, body is just an empty JSON object ({})
@viral patrol oh okay, but how can i use it? i assume it is html as the example, so i would need to parse it as html dom?
Yes. {message} contains HTML, you can parse it as DOM, or you can find phrases that are <img [.*?]>([0-9]*) (img with closing > non-greedy and following number)
@viral patrol thank you very much!
yes, thank you for your help too!
With custom widgets, is there a way to see what the latest event that happened is?
Thinking like an event list but with a single entry so it's only showing the latest event. Can't use the default event list as I need to represent the latest event with a gif as opposed to actually showing the name or text
So if the latest event is a follow, it'll be X.gif and if the latest event is a sub, it'll be Y.gif
Of course, you have recents array which has all the recent events, then you can sort it by date and take last element to show it on widget load, then you can use onEventReceived listener
okay cool thanks!
is there documentation? couldn't find anything on https://docs.streamelements.com/
You can find it here: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
this https://strms.net/credit_roll-by_grot widget is not working? Am i maybe doing something wrong? I finded it in #widget-share so i think it should work?!
okay so if I run recents and sort it based on what the docs say, I get recents[0] as the oldest event. Shouldn't this be the latest event?
let recents=obj.detail.recents;
recents.sort(function (a, b) {
return Date.parse(a.createdAt) - Date.parse(b.createdAt);
});
I've gotten around this by just reversing the sort - return Date.parse(b.createdAt) - Date.parse(a.createdAt); but is this the way? Or am I missing something here?
how i logoff ground control?
Delete the JWT token in the settings.
is there a way to share a custom widget with someone beyond just sending them 4 widget files to copy paste?
this https://strms.net/credit_roll-by_grot widget is not working? Am i maybe doing something wrong? I finded it in #widget-share so i think it should work?!
just wondering: is it possible to get json code animations being playing in the Sub alert widget?
Is something down with the oauth api right now?
Receiving this error: {"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request."}
hey, when i do
window.addEventListener('onEventReceived', (obj) => {
const amount = parseInt('{{amount}}');
console.log(amount);
}
it always prints NaN for every single event, i thought the template variables get auto-populated?
is this because i attempt to use it at the wrong spot?
@silent osprey {amount} is within alertbox custom code. In custom Code editor it is obj.detail.event.amount
If event has this property
@inland lynx You can play any animation that is supported by web browsers. But for JSON you will have to host those files remotely on your own or paste them directly within JS tab as object.
@viral patrol oh, okay, getting the {message} with the image sources in custom code is not feasible? i checked out obj.detail.event.message and it was just raw text, i would really like to get the attached cheer emotes on a cheer event in custom code
I think that you should read it by message listener not cheer-latest and then validate it if it was a cheer.
ah, and then i need to calculate the cheer amount myself, correct?
Yes
If you want to have cumulative cheer amount you can get cheer-latest and it has amount property, but if you want "per emote" you have to parse message on your own
this https://strms.net/credit_roll-by_grot widget is not working? Am i maybe doing something wrong? I finded it in #widget-share so i think it should work?!
@hushed hazel ^^^^
i have sended grot a dm before , but no answer, but grot maybe dont answer dm
It's been a while since he has spoken but hopefully he'll pop in with a reply here.
okay thanks
is there a reliable pattern for cheer emotes to ensure they are actually real cheer emotes?
i was considering for looking at the end of the attached emotes in the message, but there is also the twitch emote Squid1, which makes this task a headache
i think they always start lowercase, correct?
the message event seems not to be triggered when i cheer, so i cannot even really test it in the emulator :(
@eternal whale This widget needs to have "shutdown source when not visible" ticked in OBS to work (that requirement is no longer present, just reinstall widget from the link you pasted).
Currently I am maintaining this widget
How to get the avatar of sharer or star sender?
I don't know an endpoint that can translate username to avatar for FB. Sorry.
hi all. not sure if right channel, but I would like to learn how to develop widgets/animations for SE. what am I supposed to learn? CSS, HMTL, JS? Iβm not exactly sure where to start π
Hi, my IP seems to be shadowbanned from the api... Yesterday it was working as intended and today it will not connect. Tho, if I connect on another IP, it will work. Can someone help me out?
@spiral bluff cloudflare which is in the middle is having issues. I hope they are getting fine soon
@vital furnace That is correct. Most of them are js/CSS
@viral patrol thanks! are both languages required for them to work?
You can create CSS animations, but it is easier to manipulate elements via JS
But you can also create animation in aftereffects/animate on other software and just display text
Iβm looking to do something pretty basic to start out. is it possible to create animations in after effects and then use JS to embed the names of users? I want βlx just subscribed!β but I donβt want the SE text on top of an animated gif. I want in inside the animation.
Hi.
I was looking for some help in google for an "AddPoints" command for SE and found this topic: https://streamelements.helprace.com/i519-provide-an-addpoints-variable#item_comment_block_65151.
Is there any way to disable text output with the jebaited.net solution? It's in english and my public speaks spanish.
I am looking to do a command that lists usernames on a google doc after running the command. All I would need it to do is to take the name and list them on the document.
Iβm looking to do something pretty basic to start out. is it possible to create animations in after effects and then use JS to embed the names of users? I want βlx just subscribed!β but I donβt want the SE text on top of an animated gif. I want in inside the animation.
@vital furnace I don't know if it's possible. But if it is, you're probably gonna find a solution in youtube.
--url https://api.streamelements.com/kappa/v2/tips/5e2f22976eebaf64baada4a5 \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"amount":"1","donation.amount":"1","userId":"1","donation.user.username":"test","donation.user.email":"test@hotmail.com","provider":"mollie","donation.message":"test2","donation.currency":"EUR","imported":"false"}'```
```{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}```
How can i fix this?
Hi.
I was looking for some help in google for an "AddPoints" command for SE and found this topic: https://streamelements.helprace.com/i519-provide-an-addpoints-variable#item_comment_block_65151.
Is there any way to disable text output with the jebaited.net solution? It's in english and my public speaks spanish.
@sand sable I'm not quite sure what you want to accive. The SE-Loyalty-System has a itegrated !addpoints-Command. These also a API-Endpoint for adding Points via REST-Request (https://docs.streamelements.com/reference/single-user#pointsamountbychannelanduserput)
@sand sable I'm not quite sure what you want to accive. The SE-Loyalty-System has a itegrated !addpoints-Command. These also a API-Endpoint for adding Points via REST-Request (https://docs.streamelements.com/reference/single-user#pointsamountbychannelanduserput)
@umbral vigil What I'm trying to get here it's a command that everyone can use, with a variable that gives a specific amount of loyalty points.
Something like a Daily Bonus, but manual.
I don't know how / if you can create this in Streamelements, but you can create this for sure when useing a self developed chat bot for this and the API-Endpoint mentioned above.
why can't i use streamelements https://obsproject.com/logs/RFcwaIhGrm3UZ9Xq D:
I don't know how / if you can create this in Streamelements, but you can create this for sure when useing a self developed chat bot for this and the API-Endpoint mentioned above.
@umbral vigil Currently, that's not an option for me. I don't know anything about programming. I'm just trying to learn haha.
@fallow vapor Your payload seems wrong: {"currency":"GBP","payFees":true,"user":{"username":"test","email":"test@test.test"},"amount":2,"message":"test message","imported":true}
@sand sable You can use output that has just a number returned: ?format=amount like ${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount} Which will add 0-500 points to user which called that command and will output just a number. So you can use Your daily chest contained ${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount} gold! Come back tomorrow!
Aiigtt thx man, realy helped!
@sand sable You can use output that has just a number returned:
?format=amountlike${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount}Which will add 0-500 points to user which called that command and will output just a number. So you can useYour daily chest contained ${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount} gold! Come back tomorrow!
@viral patrol Thank you very much. It worked.
Hello guys, I'm trying to make my own follower goal bar, but i don't know how to increase with the SE events functions, so it would be a huge help if someone can explain that to me
`//Main container
const progress = document.querySelector('.progress');
//Progress attributes
const count = {amount: 0}; //Current number of people.
const goal = {{goal}}; //Our goal
const percentage = (count.amount * 100) / goal; //Current percentage in favor of my goal and my count.
//-----------------------------------------------------------
//Here we set a new percentage into the HTML file.
document.getElementById('percentage').innerHTML = (percentage) + '%';
//Here we set a timeout for the animation startup.
setTimeout(() =>
{
progress.style.width = percentage + '%';
progress.style.opacity = 1;
}, 500)
//Here we add the latest amount to our count const.
const addAmount = (add) =>
{
count.amount += add;
return;
}
window.addEventListener('onEventRecieved', function (obj)
{
const listener = obj.detail.listener;
const datas = obj["detail"]["event"];
if(listener = "followe-latest")
{
addAmount(1);
}
});`
Hi again.
Now I'm trying to configure this widget:
https://pastebin.com/0zxD5ay9
https://jsfiddle.net/zanzer/mov5hzsf
(It's Custom Greeting by Zanzer)
And I can't seem to find the part where you configure the greetings for new users.
It's supposed to have one, or at least that's what I understood.
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.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@crude crest ^^^


