#dev-chat
1 messages Β· Page 41 of 1
Hey everyone! Is it possible in a streamelements custom widget to react to an user using twitch channel points buying a channel reward? Not the streamelements usercurrency, but the actual twitch channel currency.
Can't find anything about it in the API
!
Sup everyone . So I really want a dynamic Cam overlay that reacts to followers and such. I have a pretty cool idea what I would like to do, but I have no idea where to begin. I've never done JS , HTML or css before but I am a java and kinda c# dev. any links I can follow ?
@violet basalt your best bet would be https://discordapp.com/channels/141203863863558144/457957557470887947/629266029234880522
Much appreciated. I'll have a look at this. Thank you
hello i have a problem uninstalling streamelements
@steady iron Thank you, you were spot on π
I have to be honest and say that's one of the most cleanest widgets I have ever seen
I have no idea how to use it just yet and how to add in my own events, I'll definitely look at using this
Is anyone here able to cusotmise the rotator slide widget, I am willing to pay for service
Hello guys, I just started out with custom css alerts, got most of the things sorted, but i cant get text-align: center to work. Anything I tried it still aligned it on the left side. Any clue how to fix it? Code:
`
.video {
transform: scale(0.5);
position: relative;
bottom: 325px;
right: 325px;
}
@font-face {
font-family: MoonGloss Display;
src: url(\fonts\MOONGLOSSDISPLAYTHIN.ttf);
font-weight: normal;
font-style: normal;
}
.username{
text-align: center;
display: inline-block;
position: absolute;
margin: auto;
top: 20px;
left: 50px;
color: #FFFFFF;
font-size: 52px;
font-family: MoonGloss Display;
}
.now_following{
position: absolute;
top: 75px;
left: 56px;
color: #FFFFFF;
font-size: 34px;
font-family: MoonGloss Display;
}`
You need to set width to 100% of a text container in order to make text align work
how do i do that?
Add the property
width: 100%;
to the element.
thx
hi!
i woudl like to do a custom alert like this guy tfblade has, cause they look suuuper cool but i have NO IDEA where to start π
Question, do we have an endpoint that listens for events? Eg when someone tips, follows n such?
This site might help answer that: https://docs.streamelements.com/ It's the SE Dev Hub website.
Oh wait, think I found the socket url I was looking for π
Will we have access to hype train events on widgets for streamElements?
The docs do not mention them: https://github.com/StreamElements/widgets/blob/master/CustomCode.md
Asking since the hype train endpoints/webhook have been announcement on Helix π https://discuss.dev.twitch.tv/t/announcing-the-latest-helix-endpoints-and-hype-train-api/26530
Hey, I also have a question about events. Namely about channel point redeeming.
I was wondering how to get access to a "reward-redeemed" event https://dev.twitch.tv/docs/pubsub#example-channel-points-event-message
In https://github.com/StreamElements/widgets/blob/master/CustomCode.md the obj.detail.listener does not have a reward-redeemed option.
To my knowledge, these can't be grabbed by SE
Would I be able to grab it with SE bot, since he can read the chat messages, it would be the same type of event?
No; not with any bot that is in chat
custom channel point event redemption are not passed in chat, only pubsub
if you have a self host bot then it is possible
pjonp, do you know if hype train event are accessible in the events for widgets?
Didn't saw them on the doc, but since the announcement of the webhook was 11 days ago I can think they are not implemented yet π
i'm not sure... i honestly hopeful... but i don't think it will happen.
the same reason there is no SE endpoint to grab the current stream stats/game playing/game art ect.
Too bad, since this info is scoped I can't even spin up my own server to grab these data and send them to a widget.
For stats/game/etc I could simply use my own server has a relay since they are not scoped data
right, exactly... i mean you can spin up your server and grab them ... cause it's a webhook and those require constant ping/pongs
well the hype traine vent requires channel:read:hype_train so i would need people to log in on both SE and my server, would be annoying for them.
Well worst case I'll build my widget outside of SE and move it if it arrives one day π
oh. it is just an endpoint... odd i would think it would be a hook for when it happens (probably both) ... but i guess your set up is more complex then i'm thinking π€£
I think this webhook requires oauth from twitch, then redirection to SE widget would be made by WSS.
are you authorizing on your site with Twitch & permissions or Auth with SE?
There is a hook (scoped) https://dev.twitch.tv/docs/api/webhooks-reference#topic-hype-train-event and API https://dev.twitch.tv/docs/api/reference#get-hype-train-events (scoped too)
At the moment I only set up Twitch auth π (I have other aps running without SE already)
so in order to use that. you need to get the users to agree to that 'scope' with your client.
Yup, that would be the annoying part π
honestly, that is the first time i've seen that scope π€£
announced 11 days ago :p
ah... haha
i donno the server you have running; but basically clear all of the refresh tokens? force login with new scope. hahah not sure how that works and how you handle the refresh token.
Ha don't worry about that π
I can simply ask for people to auth again if they want to use that widget.
But yeah, I'll try to see the ways to link that to SE, or I'll just be patient and hope :p
If you estabilish a WS connection on your end to emit those events, you can listen to them in JS
Yup that was what I was thinking.
How would you recommend setting up this kind on widget for streamers? Don't include any css/js/fields?
So they can simply copy the html that will link to a remote js file that will rebuild the app inside so people don't have to copy/paste tons of stuff and I can fix bugs and people don't have anything to do?
Don't know if there would be some security limitation for that
like
<script src="https://myremovescriptlocation"></script>
<link rel="stylesheet" href="https://myremotecssfile">
<div id="app"></div>
(I basically don't want people to worry about details if they simply want the feature π , so the less they copy/paste the better)
I believe in open source. So the more code the better.
even if new people struggle to install and set it up. at least they learn the 3 fundamental parts. there are 4 tabs. HTML/CSS/JS ... & JSON
That's true π might depend on the project, like I do have some Twitch extension, if I build a widget for them I don't want people to struggle instlaling it (and I need to keep it up to date with the new releases) but for tools that can be used and customized, having a step by step video where they have to place everything would be better yeah, so they can customize.
Hey guys, I think I've read/seen in a youtube video somewhere that you can nest other custom OBS browser sources within a single StreamElements overlay. Am I remembering it wrong or misunderstanding?
Can i bake in many browser sources as a single one using StreamElements?
@pulsar willow It all depends on the source you want to display. Check this https://discordapp.com/channels/141203863863558144/457957557470887947/724540622786134078 widget to get an idea of external sources.
Ah, then either my sources are incompatible or i'm doing something wrong
I'm migrating from streamlabs and setting up follow/host/raid alerts for twitch, mixer and youtube all over again is a lot of work, so i thought i might just nest those inside of streamelements π€£ No wonder it didn't work, guess i'm gonna have to keep two browser sources until i have time to re-build everything.
Does anybody have a facebook rotator widget than can display follower, stars, tips etc?
I tried one provided in the facebook dashboard overlays but it contains twitch stuff instead of facebooks
or is it just a bug?
I have it on my overlay called 'test rotator'
Heya everyone . So I am looking into getting a cam overlay similar to sir Shroud's. I found out that the guys at StreamElements made it for him so I thought the best place to get info is in here .π
Also, trying to google Custom FaceCam overlay widget ' returns almost no results. I can't seem to get any info on how to make anything similar to what shroud has.
I do know it's a custom widget and it's coded.
ohh
https://streamelements.com/dashboard/themes and type "Apex" in search box
This will give you idea how to create something "close" to shroud's
But his setup is way more complex due to dozens of conditions
100% I am not enirley noob at coding . I just need something to work off of. I'd like it to change colours and do cool stuff like his .
@lean dew https://streamelements.com/dashboard/overlays/share/5efb05782bf8436b16f1933e
@viral patrol π thank youuuuuu
We applied for the OAuth2 access for our application.
Does anybody know roughly the current wait time to get accepted/denied?
The OAuth2 access comes in waves, I can ask what the current time would be
@velvet cave I'd appreciate it. π
what is OAuth2
its an authentication method
@viral patrol super thanks for your advice. figured out how to edit and add my own animations over the apex code .. StreamElements made the overlay super easy to use
Next thing I would like is a Goal widget that I can edit
Ok
Hey, what's the recommended wayto scale up text in custom widget to fit the streamer size, do you go with vh or vw on the root font size, then using rem to adapt to the size a streamer sets or is there a better way?
Hey guys, I just imported an alertbox from streamlabs to streamelements, however it dose not work with custom css clicked (i get black text no video) when i unclick custom ccs it kind of works but is all miss aliened and requires a lot of editing to look any thing close to correct, and still I can't seem to change the padding between sub and user message, it feels like the import prosses is missing part of the code required to make it work.
Can anyone help?
This is what I get....
Should look like that.
its ${channel.subs} @cerulean bison
Is there a way for a custom widget to send a message to chat, either as StreamElements or the broadcaster?
Hi,
I added the ' Last message ' command in my friends Twitch channel (Pangkakaa) and it works great with one exception.
Robepower, joderhander last wrote in the channel 292 years 3 months 9 days 23 hours ago. Message: " "
And if i check /user from twitch on the same username the last messages were like in the 24th of February 2020
So far has'nt found anyone else that gets cray cray off like that
and i honestly don't think that Twitch were a thing for like 292 years ago π
Do anyone have some info regarding the last message command from the #command-share ?
It works fine for everyone, but not for the user in the example above.
Maybe the author @violet creek have an idΓ©a
Bordeauxprime told me to try and tag the Author here.
Hey fellow devs! Does anyone know of a way to grab a Twitch user's avatar picture? Similar to how Hype Boss grabs the picture of the last person to beat it.
It looks like it uses a img src URL but I'm not sure how to generate the unique ID. It doesn't use the username in the URL
Nevermind. Just thought to search this text channel and I think I found a couple of options
What is Twomad's Discord?
Literal noob here! is there a way to update the Field values via JS?
Thanks in advance if you can help im kind of stuck 
#π΅πΉοΈ±portuguΓͺs @atomic marlin
Hello, me again. Cant make the text change it's font. Anything im doing wrong?
`.subbed{
position: absolute;
width: 100%;
text-align: center;
top: 150px;
font-size: 52px;
color: #FFFFFF;
font-family: Moon;
}
@font-face{
font-family: Moon;
src: url(\fonts\MOONGLOSSDISPLAYTHIN.ttf);
}`
You are not able to point that to a direct file within your computer. The easiest way for that on Windows would be to install this font on your computer and then use: font-family with full name like
.subbed{
font-family: 'MoonGloss Display Thin'
}
Is there a way for a custom widget to send a message to chat, either as StreamElements or the broadcaster?
@gleaming arch
Anyone any ideas on this?
Check the #widget-share .... bank heist π
@grizzled bear It is not possible to update fields values via JS, but you can store a simple object in kvstore and if it contains data -> override values from fields.
I need help.I set up my alert for my subs but is playing if the sub is one. If is gifted or comunity gift is not working
Are you using the default AlertBox or did you make a custom widget?
Thanks for the screen shot. makes it much easier to help with them!* what platform are you using? Twitch π€ .... let's switch over to that chatroom
twitch
#helpdesk-twitch π
Hi
Hi, my giveaway command has not been working, is there something i need to do?
in fact i don't think any of my alerts are working
When people cheer with tts it sometimes crashes the overlay and doesn't come up with the message, anyone know how to fix this ?
https://streamelements.com/dashboard/bot-modules this page is not saving when u make new text in line for follows and sub and more.. it says saved but when i go back my new text is restore to defoult. why??
@robust raven the bot needs to be in the channel to be able to "save" the message. Maybe the bot doesn't recorded that user. (maybe twitch's APIproblem π€ )
now waiting more than 3 weeks for an api key to work with the oauth api.. does it take really that long?
@wind heron Until then you may want to work locally in your environment with JWT token as Authorization method against our API. Then you just add gateway and replace Authorization: Bearer JWT with Authorization: OAuth oauth2UserToken.
when my bot is set as an editor for another streamers channel, can i perform actions on behalf of that other streamer with the bots JWT Token?
until the api key arrived
is there a full list of all the counters in SE_API.counters for the widgets API? i want the twitch channel's full amount of subs
@tranquil jewel Fairly certain that's for command counters and not channel related info. 
oh, well how can i get the channel's amount of twitch subs then?
Guys, can anyone help me? I'm trying to reset my Goals but, I've already done all the thing and the Goals still there D:
Even waiting the time that SE reset the Goals monthly
Even speaking with NoD they said that should reset on 31st 23:59 UTC
@muted dagger 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
Hi there, I'm looking into custom commands right now, would anyone be able to provide me with more information on how to utilise ${urlfetch} It outputs the body of that webpage, is there a way to do string manipulation on this if you are trying to get a specfic part of this page? If it's an api as in the example under variables how does JSON handling syntax work? I've tried looking for resources on this and have found nothing as of yet
There are no options really with just using the commands; the ${urlfetch} just gives the response back. There is no way to eval() that or run any JS on it
But in the example, they call an API and under the response section they list the value section returned by that api rather than the whole thing? Is that in error or is there some form of JSON handling syntax in order to get this attribute?
hmm... you are right... never noticed that. let me set up a custom command real quick and see what i get.
I did the same, it doesn't give the same result as in the example, it gives the full response
yup. same here:
So is this an error in the documentation?
Or is there hidden syntax? I would love if there was hidden syntax for handling json
ya. i am thinking that is a bad example for the command... but i don't use the custom commands
See what I'm struggling with though, if there's no syntax for handling json why would they implement urlfetch at all? There's no way anyone would ever want to print out the entire html code of a webpage to a user as the user won't understand it
There must at least be string manipulation of some kind available to clean up the response from urlfetch otherwise it's pointless surely?
It's more for APIs that give a direct body response, not a JSON output
That's a vast minority of APIs, most are json these days right?
Even the one in the example is a json api
@livid cargo What website are you using?
Ya. i'm not sure if that is a bad example or if there is a way to grab the Object key; but like for example here is a weather one used popularly https://api.scorpstuff.com/weather.php?units=metric&city=new york
Yeah, ideally I'd like to use the youtube api to return a link to my streamers latest video, I did it in nightbot fairly easily but he's recently moved over to streamelements. Either the example is bad or there is a way to handle the json, and if there is I would really like to know what it is
Is there an alternative to the official youtube api?
You're wanting to grab their latest upload?
Yeah a link to it
For their channel link does it have a user or channel in there?
I have the channel ID saved from the youtube api if it's needed but the link that displays automatically is a user
Lemme have it
The ID or the user?
id
UCc5h7Pz308KNjOunkmw0GOA
I Promised I Would Do This... - Minecraft X Life SMP (12) their latest?
Yep
${customapi.https://decapi.me/youtube/latest_video?id=UCc5h7Pz308KNjOunkmw0GOA}
That'll return the name and the shortened version of the video link.
Ayy that works, thanks. Is there any chance of JSON API handling ever becoming a thing in streamelements or am I just gonna have to find plaintext alternatives from now on?
Check out the StreamElements ideas board: https://strms.net/ideas. You'll be able to add ideas, upvote ideas you agree with, and track their progress with email notifications. Adding and upvoting ideas also helps the staff know which ideas should be prioritized so please take some time to upvote.
Thanks again!
We might get a response from someone else that knows for sure... but defiantly going to look into what you mentioned with that example on the site. I personally just for a 'custom widget' commands π€£
Yeah it just seemed so strange to me that the example they gave didn't work
do widgets have the fetch() api available to them?
Widgets would use the full javascript fetch
@violet creek ah, i see, well this stream has only used Streamelements and Nightbot, and i can see the users text if i do the /user joderhander comand in chat, but the last message thing does not return anything on that specified user, so somehow it has to missed or dropped it 
Ok
Is there a way to add custom CSS to store item redemptions?
Is it possible to accept donations through Amazon Gift Card money or something? I don't really want money put into my bank account or any of that, I just think Amazon funds would be nice so I could purchase new equipment and stuff.
@quick hollow That would be something more appropriate for here. What exactly are you wanting to do?
parse json in a bot command or use eval(kinda like nightbot) if thats possible
We do not have eval and to my knowledge json parsing doesn't work.
oh
In stream elements, is there a calendar widget I can use to some how alert my followers via notification about events, such as when I am going to go live etc? If not, is there something I can cobble together? I would want acount down I can set up, that my twitch followers could get notifications on their phone,or tweets could go out, or emails could be set etc.
I didn't see anything in #widget-share, lots of cool stuff, but not that.
@frigid shell The easiest way for you would be different approach. You can prepare a google calendar on your end and share it with a link with everybody you want to. With that you would be able to manage events, and your viewers would receive notifications just as they do for other regular events.
hello , i need help to rotate a text 30 to 50 degree
@viral patrol @sudo rm -rf /*
@hardy walrus
its sub label
The only way to do so is to recreate it with a custom widget https://strms.net/ultimate-text-widget_by_lx
On the very bottom of this widget options you will see "rotation". It is possible to specify value between -180 and 180
@viral patrol this widget is kinda weird , as you can see if someone have long name it wont show fully unless its moving
@viral patrol i just wanna move the text to the center of the widget
You can add margin-top:30px property to .holder class in CSS
Is there any way to hide fields depending on another's field settings? Like a drop down to select if the user wants a cube or sphere background, and showing different options depending on if you chose cube or sphere?
Negative (at least from my knowledge). The fields are basically 1 way and no way to dynamicaly* alter the options/values
Ahhh alright
Follow up then, are nested groups possible at al? For fields i mean
Hey everyone, I noticed that the iframe where the widget lives is bigger than the div containing it, is it intended?
754.828x578.625px is the height of the iframe, 750.516x574.312px is the height of the div containing it
The div containing the iframe has a overflow hidden, so it cuts the bottom of my widget by like 4px
(Testing on Chrome/mac OS)
Try to add
body{
margin: 0;
}
in CSS as user agent stylesheet defaults that to 8px;
I do have normalize.css already π
.container{
height:100%;
width: 100%;
display: flex;
position: relative;
justify-content: center;
align-items: center;
}
.container:after,.container:before{
content: " ";
left:0;
width:100%;
animation: grow 1s;
height: 0.25rem;
background-color: currentColor;
position: absolute;
}
.container:after{
top:0;
transform-origin: left;
}
.container:before{
bottom:0;
transform-origin: right;
}
@keyframes grow {
from{
transform: scaleX(0);
}
to{
transform: scaleX(1);
}
}
Where JS is:
const width=$("body").width();
const height=$("body").height();
$(".main-container").html(`width: ${width}px height: ${height}px`);
newDiv.classList.add("container")
newDiv.innerText=`height:${window.innerHeight} / width:${window.innerWidth}`
newDiv.style.backgroundColor = fields.backgroundColor;
app.appendChild(newDiv)```
and by removing all the css and the normalize.css,
const app = document.getElementById("app")
app.innerText = `height:${window.innerHeight} / width:${window.innerWidth}`
And the div containing the iframe is still smaller
Still missing around 4px
Ohh. This is iframe-blocker
Yup
And iframe-blocker is empty
As it is just div that helps editor to manipulate (move/resize) frame via mouse
I think I found the problem, which is on the css of the editor from SE.
The <se-widget ...> has a border of around 2.17px (on my case), but a box-sizing: border-box;
So inside, we lose the "4px" because of the border , and I'm missing exactly twice that border. The css should have box-sizing: content-box; instead to keep the same size inside π
If I edit the css manually on the editor to put what I said,, the iframe-blocker and its parent have the same size as the iframe, so it doesn't cut the bottom and the right of the iframe anymore
This is only in editor. In live widget there's no border at all π
Good to know, but a bit annoying to preview correctly π
i never notice things like that because i just margin: auto π
Can someone tell me what criteria apply to the Magic: The Gathering Creator program?
Can you post that in the platform channel that you use @serene hound ? Twitch/Youtube/Facebook ?
@serene hound Please ask your question in one helpdesk channel only. A support volunteer or StreamElements staff member will assist you as soon as they are available. Asking in multiple places will only result in confusion, not faster answers. Thank you for your patience.
@elfin arch You leave some empty space on the side of the widget?
I've been wondering what would be the most practical way to to scale up and down the widgets based on the size defined by the user. For now I just use rem and scale up everything with my font using vh or vmin
i've been making mine 800x800 or 900x900 fixed. then can down-scale in OBS
Ha yeah I see π
i honestly don't know the 'best practice' for size. i personally can't see the benefit of vh/vm with widgets since it's not really a responsive thing. it will always be a fixed size when streaming
Yup, I was mostly thinking if a streamer want to change the ratio/etc, but it would be a case where they have to copy paste the javascript... most of the people simply "import" a widget and customize it of the fields is that it?
ya. that is correct. But everything in fields...
but depending on the widget; like i said mine are all fixed big size because they can be scaled down easy in OBS
then you have streamers that are 720p and some that 4k. so have to remember that as well
Yup :D
If you update the code to fix a bug, is it forwarded to everyone that imported the widget? or by safety they would have to import it again?
the latter. there is no code pushed to widgets already installed
And when deployed, can we use remote scripts, like if I create a widget for my Twitch extension and want to it follow the updates, can I have a remote js file that I can udpate to fit the changes π ?
I understand I would not be able to update the fields, but the logic and data strcuture could change over time (it's been active for a year and half), so i could bug fix, improve the effects, etc
Follow up then, are nested groups possible at al? For fields i mean
@scarlet sorrel
I don't believe so. But i haven't tried personally. so maybe.... but doubtfully π€
Alrighty
@abstract basalt You can adjust CSS/JS via calling external resource.
But you won't be able to update fields definitions
I've seen
<script src="//blah/initial.js"></script>
on few widgets
Good to know π I do have this setup to test locally (so I can have hot reload, etc) and I was wondering how far I can push it π
And JS structure was like onWidgetLoad=(obj)=>{
fielddata=obj.detail.fielddata;
initial();
}
For local development you may also want to try: https://discordapp.com/channels/141203863863558144/259680142459142144/633144423055622165
I will check that π thanks :)
For now I simply link to my snowpack dev server by adding directly the links on the html/JS so I have everything on the editor, but I could try some local tool π
I just use Codepen π€£
I prefer to use my IDE π
Hi, I'm looking into a making a little twitch chat bot to play minigames. Is there anyway to get the time-watched or active viewers? Best I've found so far is using this ```
https://tmi.twitch.tv/group/user/:CHANNEL/chatters
This one seems to be the most accurate, you can call this endpoint and then call https://api.streamelements.com/kappa/v2/points/${channelId}/${username} and store values in your script to avoid another API call for consequent calls when users from /chatters is different (as most of them will be the same most of the time)
cheers
@viral patrol I have one actually and have it set up on a website, but not everyone knows how to subscribe to a google calendar, and not everyone, me included, looks at theirs. I want to set up count down timers and stuff to go to social media such as twitter, or facebook, or even discord all using stream elements.
If I could intagrate the google calendar to do this, maybe it should be possible. I have mee6, but I don't want to delete a web hook if I change events, or decide to set one up last minute.
For Twitch; the user has to opt into the alerts and can get the 'you are live' message. that is up to them to get the push alert to there phone
If you want to alert for other events; then really Discord is the best route to go
anyone else had issues using keyframes and animations in css and that the timing is odd on the first use?
feels like it has to load
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=swap');
* {
font-family: 'Montserrat', sans-serif;
}
@keyframes fade {
0% {
opacity: 0;
}
17% {
opacity: 0;
}
18% {
opacity: 1;
}
62% {
opacity: 1;
}
65% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes vidfade {
0% {
opacity: 0;
}
1% {
opacity: 0;
}
2% {
opacity: 1;
}
97% {
opacity: 1;
}
99% {
opacity: 0;
}
100% {
opacity: 0;
}
}
.toptext {
color: {{topTextColor}};
transform: translateY(-194px);
text-align: center;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
z-index:-3;
position: relative;
animation: fade {{animLength}}ms;
animation-iteration-count: 1;
}
.bottext {
color: {{bottomTextColor}};
transform: translateY(-132.5px);
text-align: center;
font-size: 16px;
font-weight: bold;
text-transform: uppercase;
z-index:-3;
position: relative;
animation: fade {{animLength}}ms;
animation-iteration-count: 1;
}
.text-container {
margin: auto;
display: table;
z-index:1;
position: relative;
animation: vidfade {{animLength}}ms;
animation-iteration-count: 1;
}
Current css is like this. would you do it another way to have it 100% conistant?
redacted
Anyone know how to enable custom CSS for the store redemptions alert? The merchandise alert has it but not store redemptions
@hollow ledge is your url: 'https://url.url/directory/subscribe.php', correct? or possibly subscriber.php? what I see looks correct. Try to add a log after the } else if (listener === 'subscriber') {
URL is correct. Testing outputs says Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx/donation.php. (Reason: CORS header βAccess-Control-Allow-Originβ missing).but it works fine. Gives me same error for Sub too, but, sub doesn't fire the PHP script.
Welp, I'm going to go to bed now. I'm an idiot and had the PHP file pointing to the wrong bash scripts.
Sorry for wasting your time pjonp.
π ... glad you got it fixed... i had no other ideas and I do not know PHP.
LOL
not a problem. happy coding
Thanks π
@orchid sierra; i also do not see the Custom CSS option for the default widget.
@elfin arch hello
do you know how to make this widget move from right to left
instead from left to right
hey π .... which widget?
oh ya ya. i remember now; you added the angle the other day
yes
this oe
one *
jump into the JS* tab and all the way at the bottom; change direction from left to right
line 61 there
no problem π
yes , got it , it looks way better now , but is it possible to make them at the same time and repeat the same way all the time
make them move *
i'm not i understand that. can you give a screen shot of what you have?
.... you have a few of these on an overlay i am guessing?
checking a checkbox in the widgest settings isn't reloading the widget, is there an event for this in onEventReceived i gotta check instead or this a bug? Doesn't seem to be one in the documentation anyway
When you edit the fields it will trigger a refresh or 'onWidgetLoad' not the event received
Yea but its not doing that for me only with checkboxes. Every other field refreshes the widget just fine but checkboxes do nothing
I have several console.logs in my onWidgetLoad too, and it doesn't output anything when checking or unchecking any boxes either. Just nothing happens
... that is odd. i don't have any checkboxes in my layouts. just dropdowns for 'yes' or 'no'. when I switch it to a checkbox it does not hot refresh.
This is a known issue. This is why I prefer dropdowns with yes/no or if there's already a checkbox - i alter number fields that are around with mouse scroll
Ahhh ok, I'll just do that as well then ^^
π€£ .... i might not have any checkboxes because i 'borrow' lx's code for the fields
π thanks though
@viral patrol Are you still maintaining you Custom Chat widget? I have the issue that deleted messages are still shown while timouted messages are purged correctly. Any idea why?
It seems like message-delete events are not forwarded. I am reporting that. Thanks!
Ok, do I have to readd the widget then after a possible fix?
I think it should work after fix, no need to readd this
Hi π Is there a way to add notes to a widget? So I can give instructions to the people that use the widget on how to use it and stuff?
You can add comments in the JS/HTML/CSS tabs and add a text widget to the overlay with instructions.
The goal is to explain the fields and how to customize the widget
To add a text you have to make the overlay bigger than the widget and it would appear when the user import the overlay, or tell them to use some exact dimensions so the text is cut off?
You can hide the text widget layer.
So if my widget is 400px high i would put 800px high and explain to the person to only put a browser view of 400px?
You can input any text in there you need.
You can also take a look at the examples in #widget-share
I see π Could be nice to have a way to have notes or instructions, without using a "hack" π
what Benno said is the best way to add notes to an overlay.
the text areas are hidden and will not show.
the other option is to add a 'readme' .... i'm just finishing mine up π€£
But where do you put that readme π€ ?
on a separate github repo?
(In a way... having a 5th tab where you can put markdown could be cool to pass info π )
ya. i put it all in a github repo with the source
You can also add a field type:"text", label:"readme", value:"https://pastebin.com/etw34g34w/"
That's a good idea, still a bit hacky but cleaner :D
I could have a big repo with my different projects on some folders and some readme in them so I don't end up spamming my github repo π and simply link to the correct ReadMe...
I guess it depends on the length of 'notes' that you need... here is my current (final π€ )
How do you put these bigger texts? like Require a 'raffle' ?
haaaa good to know π
so the 'hidden' gives it a short 'note' and the group puts them all into a single "tab"
I could use that for now π€ I don't need extensive stuff, it's more to explain how people can order stuff on the widget using dropdowns
and the basic customization
ya. and also use the text field when you can for notes like lx mentioned.... you can see in mine i have it 'need botMsg' as the default for a "free" note. (but be sure to handle that default option in the JS π
Yup π I'll do some tests and see what's the best way for my case π
I'm almost do tehcnically on my widget, just need to make it easy to use π
hahaha. ya; i am finishing one myself and first feedback i got was 'too many options' so I removed 60% of them and going to try a 2 field data system; 1 simple for turn key and 1 advanced for all the extras π€£
I removed 50% of the options yesterday, I made a widget to show social networks and wanted to allow people to order & select which one appear... super annoying to do but I ended up with that (I'll add an hidden field on top to explain π )
And to "disable" one you just don't put it on the list
nice! ... i mean what i see there makes sense to me with the numbers π but depends on how you are showing/displaying that data? is it an overlay scroller or sending to chat? maybe First: Second: Third: .... etc
oooh. that is pretty.
This is how it looks at the moment :), but yeah first/second/etc would be better
I'll create a second version, a smaller one, and add a "chat trigger" so mods can type a command to make it appear on the stream
ya. π€£ that was my next question. how are you triggering it? that's the best !socials command i've seen
I mostly see it as a "streamdeck trigger"/mods command
do you plan to share that with the widget share?
Yup, once I'm satisfied with how things look π
π
I wish I had same attitude.
ya. for sure it has to mod trigger
My design skills are so bad I am more like "Let it not break apart"
π€£ .... ya i don't do "pretty" well. but it will work
I mostly look at how some streamer/youtuber show messages and start from there and add my own touch π
This one is based on Alpha gaming lower third on youtube
it looks amazing
Yup, for just chatting it's great π , a bit less for gaming, where people want to leave more space for the content
I like the animation on yours π
The idea was every-tv-station breaking news animation
i love how it pops up "breaking news!"
and ya; now that you said that Breci; it is a more IRL focused area. but that bottom third looks great. (but i really only watch IRL stuff so grain of salt there)
Some gaming streamer liked my animation, but wanted a smaller version, so it uses less space, with an automatic rotation, so I will create both versions :D
But yeah they have different problems in mind π
Is there something in particular to do to detect when a message is deleted in chat?
I'm testing to delete message and it doesn't trigger the onEventReceived event. I do get the event when the message is posted but not deleted
It is already reported issue. It is supposed to work this way.
Ha π Well I'll wait until it's fixed to add that detection in my other widget π
By any chance do you know if there is a way to load GSAP premium plugins (I do pay for the licence already) in a streamelement widget without having to bundle it with like webpack ? (the creator do not provide a CDN for premium plugins, I have to download them and put the manually in a project)
The only way I could think of is too keep it on your own CDN or minimalize it and paste in JS tab
I see, I'll probably see to set up my own CDN with some origin limitation so it can't be used outside of widgets
What REGEX Flavor is stream elements best acquainted for?
I just want to make sure my REGEX works in the correct flavor before adding it to my filters.
Thank You
would there be any reason to why(using proper REGEX) that it would match for a word, then(same REGEX) it does not match.
When using the test in Banned Words?
whats the problem ?? pls help!! i cant try my alerts in obs
ah, I figured it out possibly, if one rule is wrong regex may not suite, then all rules are not going to match, or so it seems
^this only happens if you have "regex button" selected on the ones where the regex does not abide by the syntax.
@fossil meadow Streamelements on top of OBS -> Logout -> login
Is there a way to shoutout youtube channels with a command like you would shoutout twitch channels, or can you only share links?
Hey! I was just wondering, are there any way of adding custom fonts to the streamelements* overlay editor? π I'm trying to add it, but i'm not that good when it comes to programming so i wondered if someone had the code for getting it from google fonts or anything like that! :D
Thanks,
Cameco
@timid tiger 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.
If you mean import gimme a sec to look for something.
So is it just adding the line <link href="https://fonts.googleapis.com/css?family=Proxima+Nova" rel="stylesheet"> on the top of the CSS tab in the editor and restart the website? or am i just stupid xD
For importing the font called Proxima Nova
Forget about it, me being stupid was the answer π
Thanks for the help
HI Guys, need some help Just install streamelemnts to try it out , watch a video got all scenes and my overlay install no issues . The only problem I have is that game capture is a black screen and is put at bottom what can I try to do to fix this. Thanks I've been using streamlabs with no issues on the game capture but I really want to swich to streamelemnts because I think is got all I need for my streams but can get the game capture to work Please help.
Is there a way to take Amazon Gift cards for donations and have alerts for it?
until I find out about registering a business and everything I need to have a PayPal Business account, I'm just going to take contributions where it could still help me, like being able to buy equipment off of Amazon and stuff
I guess there wouldn't be a way to have an alert ehhh
add a space after 58 and put it in 59
ya. crap; i added some other lines; i'll update the screenshot
try the following to trigger the Hype Bar with the FIRST emote in the list:
Add this after line 58: ```js
|| (listener == 'message' && obj.detail.event.data.emotes.filter(i => i.name === emotes[0]).length > 0)
I did that but when in obs i typed a emote and nothing happen not sure if i gotta go live to test it but its late ill ask again in morning
But thanks again @elfin arch
Has to be the first emote in the list: example here with Kappa
So it had to be the first emote to trigger it
Also do i have to be live to test it with the emote
Nope.
Ok thanks
@elfin arch so u were able to get the hype bar to pop up when u type Kappa
yup. it will pop up when using Kappa in the screenshot i have above.
can you send a screen shot of the code you added in the JS? does it pop up when you emulate a $50 tip donation?
And no it only pops up when i emulate a sub or follower @elfin arch
Or cheers or host
ok. the code you added looks correct. can you post a screengrab of the widget setup menu on the left?
ya. try that with Kappa. I didn't check with custom emotes
That's a global twitch actually.
ahhh... ok that was going to be my next thing; was how did you get a Capitol first letter.
Its working thanks so much @elfin arch i must of had a space after SabaPing cause when i changed it back to Kappa it worked so then i changed it back to SabaPing and its still working
π
Thanks again for taking the time to help me out @elfin arch i really appreciate it and i would have never figured it out without your help π€π€
by scrolling this channel I fixed my problem and even learned some stuff π Thnks β€οΈ
hey guys, how do I create a shareable link of my widget? Like the ones in widget share
This feature is not available for public.
So I'm trying to implement the Multigoal widget into my stream, but it seems to work incorrectly. Has anybody managed to use it, or can someone help me fix the issue I have with it?
Is there a way to push custom events to an overlay widget? For example, https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event has a list of possible values for obj.detail.listener, but can I emit my own custom event via websocket?
Looking for someone who can code complex 3d animations for alerts and widgets for gaming streamers. Paid work. Its been a real struggle, Please help
#art-marketplace @lost sierra
hello
https://strms.net/ultimate-text-widget_by_lx can someone tell me how to add {x months } to the subscriber name on this widget
Is that for the most recent sub length?
use this in the field data {subscriber-latest.amount}
but note; that will be 'gift' if it is a gifted sub
hmmmm it cant be fixed ?
to replace the 'gift' with the recent #?
i was playing with the sub code a little bit; but not 100% it will work. give me a second
added this in line 36... not 100% sure it is the correct count though
if(data[key[1]] === 'gift') return sessionData["subscriber-recent"][0].count;
I have a small video that I want to run periodically on my stream without me having to start it myself, are there any plugins that will do this?
Another question is if I was to upload the video to StreamElements how do I go about accessing it via a custom html widget?
So; ya. that was going to be my first question. can you make it a custom widget and run it that way on a timer?
(as in it will be an overlay and always run on a set schedule; until that source is shut down)
*edit: use the built in widget for this ‡οΈ
There is also the asset rotator slide show widget.
the video file is a webm, so erm... which would be the best/easiest way to achieve what I'm after π
Just re-read what @rugged rapids said I'll take a look at that now thanks
I hate losing an evening, not understanding why my code bundle is not working, then I discover it's because the built css got the id and classe changed so it was not working with the template provided to streamElement
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
The .count i believe is grabbing the # of months subbed. so it would be at minimum 1. but i am not 100% on that
hey all, is it technically possible to have a custom HTML code as part of the overlay but in that sense that it would be interactive for the viewers? Say a simple button viewers can click on.
No.
ok thanks, thought so ^^
Only way is with a twitch extension.
are there any that could do that?
Probably not for what you want.
sigh oh ok will keep looking :)Β¨thanks
But your viewers can use chat commands/tips/cheers and other stuff to interact with your widget.
So I guess I could build and extension that would allow me to do that, right? Any idea how complicated it is to get it approved? π
For the clickable part it could.
As far as approval NFC.
What I have in mind is an extension that would allow interoperability between Twitch and BTCPay Server (self-hosted FOSS payment gateway). But I don't even know what is Twitch's stand to Bitcoin at all.
I'd do a hard pass in that case.
Only thing allowed is Bits, nothing with a currency value that can be exchanged for money
The trick with the BTCPay is that there is no exchanging for FIAT money π it's just a gateway, non-custodial so there is nothing more than simple p2p transaction.
but I understand what you are saying, would be probably waste of time
(I've been making twithc extension for almost 2 years to give a bit of context ^^ )
Twitch is extremly careful about anything that could be used as transactional stuff
I even had problems with bits, because the wording on one of my extension was too open
Permissions at each step :/ just thinking how to connect Bitcoin with streamers wordl while keeping Bitcoin best practices π initially, I was looking how to put a simple "pay button" in the stream that would allow the viewer to create an invoice on streamer's end that the viewer could pay = donate. BTCPay Server offers simple HTML code that do all do job.
That would definitly not pass with extension imo, since it's BTC and BTC can in the end be exchanged for money
But you could make a quick POC and submit it to the review team, they will tell you, only them can decide exactly
ok thanks π
I was asked to put this here in case anybody might be able to help me out :)
Hello there :D
I'm busy using the Custom Widget Tool to create an events list in the Overlay editor, and I would really appreciate it if somebody could help me make it bigger? Just dragging the corners does not resize the widget and it remains the same size. Any help as to how I can resize everything to make it bigger would be greatly appreciated. I've got all the CSS and whatnot still on default, so I'm not too phased by just copying and pasting anything there to fix it π
something like this ?
Yeah, it keeps doing that, but I actually want to make everything bigger. The text, the bubbles etc
Try something like this. (the code was too big to post here; but take a look at these CSS objects. The ones that are offset to the left are the ones i changed)
* {
font-family: 'Montserrat', sans-serif;
color: {{fontColor}};
font-size: 28px;
overflow: hidden;
}
...
.event-container {
width: 0px;
height: 50px;
align-items: center;
display: flex;
justify-content: right;
background-color: {{backgroundColor}};
border-radius: 25px;
margin-top: 5px;
animation: 0.6s slide-in;
animation-fill-mode: forwards;
}
...
.username-container {
animation: 1.2s fade-in;
animation-fill-mode: forwards;
display: inline-block;
width: 140px;
font-weight: 400;
margin-top: 0px;
margin-left: 33px;
position:absolute;
}
.details-container {
position: absolute;
animation: 1.2s fade-in;
animation-fill-mode: forwards;
display: inline-block;
right: 0px;
font-weight: 700;
text-align: right;
margin-right: 15px;
margin-left: 85px;
margin-top: 0px;
}
so; for example; in .event-container i changed height, align-items(that was added), border-radius & margin top;
That is perfect! Thank you so much π
looking for help can get my commands to work with OBS
Does anyone have a custom API that allows me to have a !time command that shows a response in non military time, such as AM/PM?
Use a custom API statement like ${customapi.https://decapi.me/misc/time?timezone=Europe/Amsterdam&format=h:i%20A}
documentation of endpoint: https://docs.decapi.me/misc?endpoint=time
hey quick question :T i wanna know where can i find SE sound files for the alerts
default ones
I see there is a βmessageβ listener but it doesnβt seem to be emitted when I type a chat message. Is there something Iβm missing? Iβm currently connecting via websocket.
Widget Request: An alert box that notifies when someone makes a purchase from your Etsy shop. "Someone just purchased 'Sunset Painting' from Etsy!" Bonus points if it can also pull the main listing image for a visual element. π
One of my followers used the Etsy API to send a quick chat message when a sale is made, which is fun, but an on-screen alert would be awesome!
Why is eval being manually blocked inside custom widgets? It seems like a stupid choice, because many modern web libraries depend on it
And there are so many other ways to execute arbitrary code
Hi@crude crest! I love your OnScreen-Command Widget. Unfortunately there is a bug with Twitch-VIPs when I set commands on Sub-only. Even if the VIPs are subs, they can't trigger commands.
I guess I fixed it for me! But I'm not sure if I have to add "founder" there as well?
@timber lark Wouldn't hurt. Besides you'd only find out if it doesn't work.
Hi π I noticed that fonts from my field googleFont didn't change the font of the widget, is there some special thing to do?
I do have font-family: {{fontName}}, sans-serif; in my css, is there something like a dynamic import to do?
This might be to specific to ask for... I'm no programmer but I try to adapt/learn things and change it for my needs. So there is a way to do user specific commands. Zanzer has that in his OnScreen-Command widget. You can add the usernames directly into the js code there and that specific user is able to trigger the command !bobdole.
I would like to go one step further. I would like to change the ["user"] during my stream with a separate command. Something like this:
!superuser Zanzer
Bot: Zanzer is now superuser and is permitted to use the command !bobdole
alertCommands ={
"!bobdole": {
"video": "https://cdn.streamelements.com/uploads/a64a9a9b-bc20-43aa-9018-d6f678112349.mp4",
"user": ["zanzersclone"]
}
};
window.addEventListener('onEventReceived', function (obj) {
if (!obj.detail.event) {
return;
}
const event = obj.detail.event;
if (obj.detail.listener !== "message") return;
var command = event["data"]["text"].split(" ")[0].toLowerCase();
var data = obj.detail.event.data;
var senderName = event["data"]["displayName"].toLowerCase();
if(event["data"]["badges"].length > 0) //Twitch Functionality Only
var badge = event["data"]["badges"][0]["type"];
var isMod = (badge === 'moderator' || badge === 'vip' || badge === 'broadcaster');
var isSub = (badge === 'subscriber'|| badge === 'founder' || badge === 'vip' || badge === 'broadcaster' || badge === 'moderator' );
if(command === stopCommand && isMod)
{
stopVideo();
}
if(command in alertCommands && canAlert && !onCoolDown.includes(command)){
if('sub' in alertCommands[command] && !isSub)
return;
if('mod' in alertCommands[command] && !isMod)
return;
if('user' in alertCommands[command] && !alertCommands[command]["user"].includes(senderName))
return;```
Hi! Is there any chance anyone could help me with coding a custom widget? I got one from another discord server and I was wanting to change some of the icons to custom icons I have, but I have no idea how to code them in. Thanks.
@timber lark You want to add people to a list of permitted users or only have one at a time?
only one at a time
first you would have something like this, so you can change the user assigned
let superUser = "zanzersclone";
alertCommands ={
"!bobdole": {
"video": "https://cdn.streamelements.com/uploads/a64a9a9b-bc20-43aa-9018-d6f678112349.mp4",
"user": [superuser]
}
};
Then you would need to add another command, like
if (command === "!superuser" && isMod){
const target = event["data"]["text"].split(" ")[1];
superUser = target
// send chat message here
}
By head I don't remember how to send a chat message but this could be a good base π
I haven't tested so there might be some problem with it, but I think it shoudl work π
@abstract basalt @import url('https://fonts.googleapis.com/css?family={fontName}:400,{fontWeitht}');
Ha thx, for the font-weight I don't leave the choice on my widget (all predefined) but the font name, totally π
@abstract basalt I tried your suggestion, but it doesn't work. I guess superUser is always "zanzersclone". I guess it always overwrites itself?
Hey anyone can help me with a google script thing? I've repurposed the todo command script, to do betting for round finished before a match. Its the same basic thing, but ive added a few things to it, like i wrote a countdown timer, and hooked the submit into that. So it doesnt accept bets when the countdown isnt running. The only thing left is the ability to run the script from the chat, that works aswell, but for some reason it does not run both the function line, and the return line, so the bot posts a timeout message into chat(the timer starts properly), if the return is the first line, it does that but not the function. heres my hacked together code:
var start = (request.parameter.start || "").trim();
if (start == '1') {
updateCell();
return ContentService.createTextOutput('TippjΓ‘tΓ©k elindult!');
}
else {
if (SpreadsheetApp.getActiveSheet().getRange('C1').getValue() == '0'){
return ContentService.createTextOutput('Nem fut TippjΓ‘tΓ©k');
}
else {
var todo = (request.parameter.todo || "").trim();
if (todo == '') {
return ContentService.createTextOutput('Tippet Γrnod kell!');
}
SpreadsheetApp.getActiveSheet().appendRow([todo]);
return ContentService.createTextOutput('');
}
}
}
function updateCell() {
var date = new Date();
SpreadsheetApp.getActiveSheet().getRange("E5").setValue(date);
SpreadsheetApp.flush();
var s = SpreadsheetApp.getActiveSheet();
var time = s.getRange('F3').getValues();
s.getRange('F2').setValue(time);
for (i=0; i<15; i++){
Utilities.sleep(950);
SpreadsheetApp.getActiveSheet().getRange("E5").setValue(date);
SpreadsheetApp.flush();
}
}```
Anyone could take a look at it? Its could be some really simple thing, but im not that good with scripting.
Is there documentation for facebook and youtube events?
hello, I had custom widget that uses https://docs.streamelements.com/reference/giveaways#giveawaysbychannelget to get current giveaway details, but seems now it is giving error 'Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource. (Reason: CORS header βAccess-Control-Allow-Originβ missing)'. Was something changed regarding this api?
@timber lark the issue is that I only check one badge of the user instead of checking if it's included, I'll get a fix in as soon as I can .
how long does it usually take for an application to get reviewed?
@elder dragon there is. Console.log();
@ocean spindle i am questioning the ```js
for (i=0; i<15; i++){
Utilities.sleep(950);
SpreadsheetApp.getActiveSheet().getRange("E5").setValue(date);
SpreadsheetApp.flush();
}
1st the i might not be defined; try `var i = 0;` ...
2nd .... what is the for loop used for? i don't believe that will work the way you intend it to (i've never used Utilities.sleep()) .... but i don't think that is stopping the loop. so you are basically trying to call all of that code 15 times at the same time.
@elfin arch Its for a countdown clock, the clock works by a =now() function that updates when anything changes in the sheet, so that part of the function sets a value to the E5 cell, that means the =now() updates and the countdown can work.
But since posting ive talked with programmer friend and the issue we run into is, that the bot would have to wait out the whole countdown function, that in this case runs for 15seconds, (actually it would run for like 2-3 minutes. And that gives me the timout. But cant have the response before the countdown script cause it only works if its a "return" and that shuts down everyting after it.
i don't think that for loop is working the way you expect it to. try setting it to i < 1
that's not pausing your JS script; it is stacking 15 calls in the queue. then calling it 15 times 0.95 seconds later in rapid session
but that part of the script works as intended
the countdown works
would that help with the fact that the function has to wait out the entire thing to run before being able to post the return with the proper chat message?
i tried to work around this, by using an onEdit function, where the original script that receives the bot message just edits a cell, and that starts the other one, but the onEdit is limited to edits made by a person, not another function:/
My other idea, that i dont know if feasable, if theres a way to have a the bot ignore the return text on that command, and print out something predefined
you want to 'pause' between the updatecell() and the return in the first if statemanet?
Heres how i see it, and how it should work in my mine: botsends instruction->doGet script runs->recognizes its the instruction to start the countdown->starts countdown-> return message"shit started"->script ends, the problem here is the countdown is too long(naturally) and it times out, but i cant put the return message before the countdown, cause "return" shuts down everything that comes after it in the function. so this is where im stuck
try this for the start ```js
async function doGet(request) {
var start = (request.parameter.start || "").trim();
if (start == '1') {
updateCell();
await (async () => new Promise(resolve => setTimeout(resolve, 10000)))();
return ContentService.createTextOutput('TippjΓ‘tΓ©k elindult!');
}
That will make it an async function and it will Pause for 10 seconds when it gets to the await. then do the return
and again; your for loop.... that might be rate limiting you. it is basically calling all of that 15 times at the same time.
~~maybe you want Utilities.sleep(950 * i ); with the *i to call it every second for 15 seconds? **err stack up delay ~~ nevermind not what you are going for
tried this, and same thing, but the way i understand this is just delaying it even furthur? like update cell take 15sec, ten comes the await part that waits 10sec and then the return, but in reality the return should occure in like 5 seconds or it times out for the bot.
the bot won't time out; or shouldn't
this is what the bot posts in chat "StreamElements: The remote server returned status code 408 Request Timeout"
async function doGet(request) {
var start = (request.parameter.start || "").trim();
if (start == '1') {
updateCell();
console.log('Starting waiting for 30 seconds');
await (async () => new Promise(resolve => setTimeout(resolve, 30000)))();
console.log('its been 30 seconds, now ill return this');
return ContentService.createTextOutput('TippjΓ‘tΓ©k elindult!');
};
try that and watch the log. does it pause for 30 seconds before those logs and the return message?
does it only do logs if i run it from the editor?
cause it doesnt do one if i just initiate it from chat
you'll have to look at where you are running the code from. so if inside a widget, then the widget editor in Chrome console would work
it running in the google script connected to the spreadsheet, if that is what you mean
async function doGet(request) {
var start = (request.parameter.start || "").trim();
if (start == '1') {
let res = await updateCell().catch();
return ContentService.createTextOutput(res);
} else {
if (SpreadsheetApp.getActiveSheet().getRange('C1').getValue() == '0') {
return ContentService.createTextOutput('Nem fut TippjΓ‘tΓ©k');
} else {
var todo = (request.parameter.todo || "").trim();
if (todo == '') {
return ContentService.createTextOutput('Tippet Γrnod kell!');
}
SpreadsheetApp.getActiveSheet().appendRow([todo]);
return ContentService.createTextOutput('');
}
}
};
function updateCell() {
return new Promise(resolve => {
var date = new Date();
SpreadsheetApp.getActiveSheet().getRange("E5").setValue(date);
SpreadsheetApp.flush();
var s = SpreadsheetApp.getActiveSheet();
var time = s.getRange('F3').getValues();
s.getRange('F2').setValue(time);
//removed for loop
Utilities.sleep(950);
SpreadsheetApp.getActiveSheet().getRange("E5").setValue(date);
SpreadsheetApp.flush();
//wait 2 seconds before 'resolve'
setTimeout(() => resolve('TippjΓ‘tΓ©k elindult!'), 2000); //not guaranteed to save.
});
};
try this
This returns <!DOCTYPE html><html><head><link rel="shortcut icon" href="//ssl.gstatic.com/docs/script/images/favicon.ico"><title>Error</title><style type="text/css">body {background-color: #fff; margin: 0; padding: 0;}.errorMessage {font-family: Arial,sans-serif; font-size: 12pt; font-weight: bold; line-height: 150%; padding-top: 25px;}</style></head><body style="margin:20px"><div><img alt="Google Apps Script" Into chat
also the countdown doesnt work anymore
π
idea: could i write the stream elements command response, where the customapi repsonse is just ignored, and i just have it typed in "things working" after the {customapi:stuff}
in that case it doesnt matter that the script cant give the proper response, since the response i want to print out is already in the command response
OH FUCK i did it
IT works
ya; i'm not sure... you got it?
I put it like this in the stream elements command response
${channel${customapi.https://script.google.com/macros/s/SCRIPTCODE/exec?start=$(queryencode "1")}} TippjΓ‘tΓ©k elindult.
Now it prints out "shiringaming TippjΓ‘tΓ©k elindult." π
Something has to be printed before the "tipp..." response, but thats basically fine as long as its not the error message
ok so its a little more bugged then that. So if i put a variable that has a dot in it, it doesnt run the custom api part, and sofar if i put user it doesnt show anything else in the response just what i wrote after it, game and channel printed my name both of the time. So its kinda iffy, but it works the way i wanted
Now the cherry on top would be to change the obs scene when its launched from chat XD
Have you heard about our glorious god and savior obs-websocket?
yeah i just learned
im trying to set it up based on this
but it does not seem to work for me just yet
@glad urchin You busy? Issue with your widget ^^^
its probably not an issue with it, im just not doing it right
They'd be able to answer it anyways.
i installed websocket in obs, i made a seperate overly, with that as a custom widget, i typed in everything used this as mod command: [{ "Command" : "!Goto", "Function" : "GotoScene", "SceneName" : "AlapTipp", "SourceName" : "" }]
i tried my public ip, and also my ip that i have on my network for this computer, and also 127.0.0.1
no dice yet
@ocean spindle Check if you can connect to your OBS via http://t2t2.github.io/obs-tablet-remote/ If so, try to move that overlay into your OBS (as web browser may block cross protocol requests - overlay is HTTPS and connection to OBS may be HTTP)
yep i can
This website uses the same connection method as custom widgets so it should be working the very same way
Maybe you can open console and check if there are any issues displayed there
in the log the only thing showing up is the tablet remote
if i have the overlay that has the scene change widget open in crhome and in the console apart from some facebook js-es its says DevTools failed to load SourceMap: Could not parse content for https://streamelements.com/overlay/scripts/cropper.js.map: Unexpected token < in JSON at position 0
could this be something thats broken?
Nah. This is definitely not related to that
this has almost certainly been asked before, but I haven't found an answer in my quick search. JSON parsing in customapi or no?
counter = 'loss';
window.addEventListener('onEventReceived', function(obj){
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'bot:counter' && data.counter === counter){
document.getElementById("losscounter").innerHTML=data.value;
}
});
const commandName = '!example', //chat command
window.addEventListener('onEventReceived', function(obj) {
if (obj.detail.listener === "message") {
if (obj.detail.event.data.text === commandName && obj.detail.event.data.badges.some(i => i.type === 'broadcaster')) {
//do something when Broadcaster uses !example in chat
};
};
});
wait do I just copy that with my commands in there?
... wait do you want to do something when a command is said in chat or when the counter is updated?
what I have is for a specific command (it won't do anything to the counter)
Updated would be easier
My counter widgets are already set up
For example, all of these that I'm making widgets for are for valorant info
so the one I'm trying to make is for my !rank command which displays my current rank, and I want to make a widget that shows my current rank on my stream when the command is updated
ah ok. yup what you have is correct. what is your HTML ?
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<div class="main-container">
<div class="cr" id="currentrank">Iron 1</div>
<p id="rank">CURRENT RANK:</p>
</div>
ok. so just a few errors i see.... give me a second...
HTML: ```html
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<div class="main-container">
<div class="cr" id="currentrank">Iron 1</div>
<p id="rank">CURRENT RANK:</p><p id='losscounter'>0</p>
</div>
add the `losscounter` id for the JS to target
JS: ```js
//var counter = 'loss'; //removed; not used (added var)
window.addEventListener('onEventReceived', function(obj){
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'bot:counter' && data.counter === counter){
document.getElementById("losscounter").innerHTML=data.value;
}
});
That's for the current rank? Or the loss counter?
the 0 here will be replaced with the value of the counter when the counter changes
No I know, I'm just confused why the loss counter got incorporated into the current rank one unless the counter will display my !rank response
no; it won't. i didn't see where you wanted the document.getElementById("losscounter").innerHTML=data.value; to go? on a different line?
OH big misunderstanding going on rn
so that original code is for the loss counter widget I've already created
No
It's just a response command
So when I type !rank it saying Ametherius' current rank is Gold 1
Though I'm going to change it to say "Gold 1"
I appreciate all your help man
ok... sorry. ya that makes WAAY more sense now. π€£ ... i was not understanding the 'rank' and 'counter'
I'm not quite at the JS part of the course I'm doing, I know HTML and CSS just not JS
But no yeah typing !rank now returns "Gold 3"
hahah ya; i'll let you handle the HTML/CSS part. that's not my favorite. let's try this again....
So I want the <p>CURRENT RANK:</p> to pair with the JS part of returning the response "Gold 3"
const commandName = '!rank', //chat command
botName = 'streamelements'; //botname LOWERCASE!
let waitingForBot = false;
window.addEventListener('onEventReceived', function(obj) {
let data = obj.detail.event.data;
if (obj.detail.listener === "message") {
if (data.text === commandName && data.badges.some(i => i.type === 'broadcaster')) {
//do something when Broadcaster uses !rank in chat
waitingForBot = true; //wait for bot response
} else if (waitingForBot && data.displayName.toLowerCase() === botName) {
waitingForBot = false; //end waiting for bot
document.getElementById("rank").innerHTML = `CURRENT RANK: ${data.text}`;
};
};
});
that should; π€ get you close
the backtick button ` it's the shift ~ key.... then do 3 in a row then js for javascript π
'''js
Ooo cool
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<div class="main-container">
<div class="cr" id="currentrank">Iron 1</div>
<p id="rank">CURRENT RANK:</div>
</div>
I can still use that then?
yup yup.
test it. and let me know if you see any errors. i didn't use an editor for that.
Well there is one thing
...one side note is that it waits for the next response from the bot after you use the command... so it's accessing an API and it takes 10seconds to get a response back... and in that 10secs the bot says something else... your rank will be whatever the bot says π€£
oh. did you want it to replace the Iron 1 part .... hahah i don't know Valerant at all but that does sound like a rank
document.getElementById("currentrank").innerHTML = data.text;
Yes I did want it to replace the Iron 1
Cause now it's bugged even more xD
Nevermind I fixed it but the iron 1 is still there
hahah without seeing the visual it is a little harder. ...but i didn't read the HTML fully to see you already had that container in there for the 'currentrank'. send a screenshot when you are done. i'm curious how it looks
Do you want it when it's all styled with CSS?
just what you are seeing now; is it all bugged still?
or did switching it to the # 'currentrank' work?
so typing !rank now properly shows my current rank, I'm assuming it'll stay there until typed again
ALSO how do I input png files into my code I've looked everywhere
Sweet cool, so last couple questions, can we make that widget replace the iron 1 when UPDATED rather than when it's typed in chat? and what is the chat command for updating a command
so you want it to say ```
Gold 3
CURRENT RANK: GOLD 3
no I just want it to say
CURRENT RANK: GOLD 3
But change when I update the command not when the command is prompted in chat
this isn't for LoL... right? it's for valorant?
It's for VALORANT they have similar ranks lol
Iron, Silver, Gold, Plat, Diamond, Immortal, Radiant
And only 3 Tiers per division, so it goes gold 1 then gold 2 then gold 3 is the highest then you go up to plat
ok. just wanted to check. π€£
Yeah so My widget is ALMOST ready for publishing just gotta iron out the last bit
so if you don't want the "iron 1" part can you just remove that div? <div class="cr" id="currentrank">Iron 1</div> ?
i left it in my example because i wasn't sure what the difference was there of if it was a placeholder. so now it should just be a single line: 'CURRENTRANK: GOLD'
whatever you have in the HTML is what it will start at when the widget loads or is reloaded... then the !rank command will update that
Yes it does, but that one only works when it's prompted in chat
You said you could get it to change when the command is updated
when the counter is updated?
not the counter but the command, so when I change it to say like Gold 2, without the thing disappearing it changes to gold 2 when I change it
are you changing the !rank command in chat like !command edit !rank Gold 2
I wasn't before because I didn't know the command for it xD
Does someone know what browser and its version is used on the softwares like obs/slobs/xsplit/etc for browser views :)?
I'd like to make sure my code will be compatible. π
I haven't run into any issues with OBS.live (OBS) when I write for Chrome. (no -webkit or alternates in the CSS).
const commandName = '!rank', //chat command
botName = 'streamelements'; //botname LOWERCASE!
let waitingForBot = false;
window.addEventListener('onEventReceived', function(obj) {
let data = obj.detail.event.data;
if (obj.detail.listener === "message") {
if (data.text === commandName && data.badges.some(i => i.type === 'broadcaster')) {
//do something when Broadcaster uses !rank in chat
waitingForBot = true; //wait for bot response
} else if (data.text.toLowerCase().startsWith(`!command edit ${commandName}`) && data.badges.some(i => i.type === 'broadcaster')) {
//do something when Broadcaster uses !command edit ${commandName}
let rank = data.text.replace(`!command edit ${commandName}`,'').trim();
document.getElementById("rank").innerHTML = `CURRENT RANK: ${rank}`;
} else if (waitingForBot && data.displayName.toLowerCase() === botName) {
waitingForBot = false; //end waiting for bot
document.getElementById("rank").innerHTML = `CURRENT RANK: ${data.text}`;
};
};
});
@hollow glade so this adds in the middle 'else if' so if you use !command edit !rank Gold 2 it will grab the Gold 2 from your command
opps i see an error in there
I was just gonna say, it's not working like you said it would good sir xD
updated it ;P try that
niice! 
So I'm gonna have to type !rank before each stream cause every time I reload my overlay it goes away
correct.
But changing scenes doesn't affect it so that's good to know
or you can edit the HTML before/each stream for it to default to that
correct. but if you have 'shutdown source' checked it would default back. it resets whenever the source is loaded
No I don't have shutdown source and won't turn it on for that reason
I love StreamElements so much
I can't even find custom widget creation on StreamLabs for my friend lol

The only thing is I have the wins/loss/rank all as separate widgets, haha
I would suggest you build it all in 1 widget. but i'll let you take it from here π
Yeah I'm pretty sure I just have to combine all the divs and CSS and JS into one widget xD
Thank you for all your help man
yup yup. you can make one pretty overlay with the HTML/CSS π much easier to edit and move around between scenes too!
and no problem. happy coding!
@elfin arch You still here bro?
Is there anything I can do for you if he's not around?
Well I have consolidated all of the previous work we did earlier into 1 widget, however I seem to be running into a couple walls here
And it's super hard to explain
I followed your conversation. What seems to be the issue?
Alright, so for whatever reason my wins and losses counters are reversed
https://gyazo.com/9e138dafa7f0f61f5bcef50d63f0f332
Like that
I want them the other way around
as well as the fact that my wins counter is only going up when the losses counter is changed
i'm tied up for a little bit @hollow glade ... but if you can post some code for lx. he can for sure help ya out if he is free
we didn't get into that counter much so the html & js you got for it
if (listener === 'bot:counter')
if (data.counter === "wins"){
document.getElementById("winscounter").innerHTML=data.value;
} else if (data.counter === "losses"){
document.getElementById("losscounter").innerHTML=data.value;
}
}
This is what I would do there.
Add that onto what I already have?
I would suggest replacing part of code you have for updating value
I had to change around my HTML code as well maybe it's an issue with that?
I can post that for you
Please do, preferably via https://jsfiddle.net/ so there's no big block of code on channel
Woah never used that site before still new to coding xD
Paste the code on that website, click "save" and then paste link here.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Think I did that right
You forgot about JS part
Click save and paste new link please
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@hollow glade https://jsfiddle.net/se7ftuwj/
The issue which was in your code is that you set a value to "win" then to "loss" but not within the scope that was to update counter so it stayed loss for whole time after init
Weird, it's still doing it. Both wins and loss counters are going up only when the loss counter is changed
Let me recheck that
The current rank one works as intended it's just the counters that don't work
That did the trick
But it will not display data on widget load from what I see
No it won't it, I have to type !rank at the start of each stream
If I reload my overlays I have to retype !rank
There's a lot more I want to do with this Widget but it would take a long time I just wanted to have a lazy way of updating the data xD
@hollow glade https://jsfiddle.net/se7ftuwj/2/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
I like that! You guys rock!
This is why I love SE
@viral patrol Is there a reason when I try and add a border to the HUD all the text yeets itself outta the box?
I am not sure if I understood you correctly
Sorry I'm really tired, over tired so that may have sounded weird, but whenever I try and add a border to the container, all the text shoots out of the container
Is it this widget somehow broken, or are you talking about something else?
Hmmm. This is because of CSS. You should have overflow: hidden and some other stuff. But text out of the box - it is a classic one
The widget is actually working exactly how I wanted it too now, just the styling is not working, I'm probably just too tired and missing something
Yup
Missed that one for sure
I've been trying so hard to get this done the way I want it that I'm just so tired now xD
I am not really good with CSS, but I think this is because of overflow and/or box size
It is the best to take a break. You can do it in 5 minutes when you are focused instead of wasting 5 hours when you are tired.
I appreciate all your help both of you
@viral patrol You helped me get it exactly how I wanted it now I wanna share it with friends
If you need help with css at some point feel free to ping me π
I'm looking to add external URL's into my SE Overlays.
(Minimising my Overlays in SE; I have SO MANY!!)
These external URL's provides info from games like;
Apex - Shows the character being used & Stream kills for that session with said character.
PUBG- Shows; Kills, K/D, Wins, Deaths
How do I do this?? :/
u can use iframe, object or embed @thick mantle
Not possible.
@elfin arch In the wheel spin widget is it possible to add users to the wheel so they are always an option? Like If I wanted to add a "giveaway" spot that is always there is that possible?
not currently no.
it's just 'active chatters' no fixed spaces on there
Do you have yourself in the ignored users?
try this @paper dock
around line 246 chatters.push({text: "GIVEAWAY"});
if you want to force a color use chatters.push({text: "GIVEAWAY", fillStyle:'red'});
It worked but it gave 2 spots for some reason
no problem
try if(chatters.findIndex(i => i.text === 'GIVEAWAY') === -1) chatters.push({text: "GIVEAWAY", fillStyle:'red'});
yes that worked, now what would I do if I wanted to add anoher option, just copy and paste that and change 'GIVEAWAY' to somethin else?
yup yup. just make new lines with what you want to add
but they will probably be next to each other
alright thats fine
Alright thanks! Also is there any reason why its just cheer and tip and no sub support?
for a sub event to start it?
i will think about adding that as an option for a single sub event or gift sub. but ya it's tip based or manually start
Gotcha, I just thought it would be cool for the wheel to trigger for a sub event as well
Hello! I have a problem with a Tip Goal widget. In my language, we write 1234,56 $ instead of $1,234.56. How can I change the text formatting? Sorry if thatβs a wrong topic. If so, do let me know where should I ask it.
Besides, the built-in number formatting doesnβt seem to work either.
Try this widget instead: https://streamelements.com/dashboard/overlays/share/5e75d15f19ecd8116978a6c8
It should have proper number formatting for your needs
(But it has different design)
Wow! Thanks for your quick reply! The link didnβt work (βplatform mismatchβ), but I appreciate your help anyway. Looks like there are other widgets apart from the built-in. Where can one find it?
@crisp latch https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod you can install this widget from here
Many thanks! Iβll give it a try!
Just create "Custom widget" and paste contents of each file from this repo to proper tabs of code editor and you should be good to go
Got it. Will do!
Does anyone know if it is possible to adjust the HYPEBOSS health via commands? Right now the only way to health changes is from follows, subs, donations, etc... Is there any possible way I could create a command that would do X amount of damage when triggered? I would love to have a command people could redeem for points to knock some health off the hypeboss.
Not that i know off
which value of emoji should i send in custom tips to show it.? i am send emoji in my program written in java it is showing ? in place of emoji. Do i have to parse it ?
I'm starting to beta test my widget with some streamers, is there a way to either access someone else overlay (so I can copy/paste the values for them), or share a widget without filling the form?
You have to be an editor on their account; request a link here
So once someone add me as a editor on streamelements I can create them an overlay, copy the values and done π ?
you can 'log in' there account and edit their overlays. ya
Awesome, that will be way easier than giving them the full step by step guide π
yes. exactly. you can 'manage' it for them.
screenshot of working code @elfin arch
this code doesnt work
all i want to change is the font to my web font rather than the one the author chose
i figured all i needed to do was change where the css gets the font from
but ive missed something i guess
give me a minute to install these. and thanks
thank you for even looking at this - its appreciated
Hey @elfin arch thank you for all the help the other night.
not a problem @hollow glade. im thankful that lx jumped in and set the settings to save too!
So I have to add one more counter now js is not my strong suit @elfin arch
@elfin arch Does anyone know if it is possible to adjust the HYPEBOSS health via commands? Right now the only way to health changes is from follows, subs, donations, etc... Is there any possible way I could create a command that would do X amount of damage when triggered? I would love to have a command people could redeem for points to knock some health off the hypeboss. is there anything like this possible?
I don't believe that is possible @paper dock
@elfin arch How do I make the widget I made shareable? Like so my friends can download it and modify it
They have to add you as an Editor and you can share the overlay.
Oh
or send them the code and help them built it
Only the widgets that get submitted to #widget-share get global links for everyone to use
Would that widget find any "!win" command or JUST from streamelements chatbot?
the last code i see is: https://jsfiddle.net/se7ftuwj/2/
and that looks for the Broadcaster (you) to say !rank ... then it reads the next message from 'streamelements' or what you have set as botname
Ohh ok
Oh I wanted to ask, cause I was gonna add a "draw" command for ties, and tried to figure out the JS code but couldn't haha, I got all the CSS and HTMl written
@elfin arch You know last night you were showing me how to add custom names to the wheel.. Would it be possible for it to not add viewers to the wheel and just have the custom slots I add? Is there a section of code I can remove or change so it doesnt gather viewers
I thought there would be, I tried to figure it out, and I think I got close but I didn't wanna mess everything up
thank you!
can you post an updated jsfiddle @hollow glade
try this @paper dock
just add a return after that build chatter list comment
I erased all the lines I tried to make for the draw command so everything you see in the current jsfiddle is current
@elfin arch
so the code is !rank now
you want to add a !draw in there too that edits a different value
The new one now actually waits for me to update my !rank command and then finds that, but I'm talking about another counter command like the wins and losses
oh so not a draw command. but add a counter so win, loss, tie counters
not adding a command; just the tie counter?
just the tie counter like the wins and losses
ahh ok. give me a minute
So I can write in the HTML for it and put it on jsfiddle for you
the counter is called "tie"
the command is gonna be !draw
hold up, I'll throw my html in there so it's easier
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
In that same link?
it's fun but also challenging π and with all coding small bugs or typos that hurt
π it's a fun journey and never ends. just practice and build stuff, break it, then fix it. hahaha. Widgets are a great way to practice. happy coding 
For the built in chatbot, is there a variable that captures the WHOLE group of text after a command?
can you give an example @lusty portal ? do you want ${1:} ?
Yes.. ${1:} is EXACTLY what I was looking for. Thank you. π
π
I was told to come here and check how I might go about accomplishing something. Iβm look to put the x12 months part of my design like it is in this image on an alert.
I can only see a way to put it where the name is currently.
Iβm wanting inside the border to just be the name of the raid/host/tip/sub etc and have the additional info above and/or below the border.
I was told this would require me to code it. Is this just some HTML/CSS or what direction should I head?
The βre-subscriberβ text is baked into the alert animation itβs just the amount/duration but thatβs missing.
I was wondering if there is a way to add a command that can disable/enable another command, similarly to the enable/disable sfx default command. I know we can't nest a command inside of another for security reasons, otherwise i would just use the !cmd options ... with some arguments to pass in. We were hoping to have this command available to all regular mods and not just me who has supermod/dashboard privilege's. Thank you.
@tardy pollen You can create a variation when months subscribed >= 2 (so it is always resubscriber) and prepare this alert in HTML/CSS only.
Ok, that's what I was wanting to confirm, I have NO idea what I'm doing so I'm learning as I go. I have a few alerts like bits, tips and resubs that have variables I want to show but couldn't figure out where to even start.
Is there anywhere you'd recommend looking for learning centered around alerts etc or is this pretty much a learn as you go sport?
The easiest way I could think of is to grab default "custom alertbox" and adjust it to own needs.
Using that you will learn a lot faster than creating from scratch.
Yeah I was thinking of finding something similar and pick it apart to see how they did it.
Hey um... I am not quite good with programing, but lets say i want to create a widget that displays randomly selected quotes, saved in my profile by the !quote command. How can i do that?
@cedar rivet Unfortunately there's no way to access bot quotes from overlay. But you could have one using thefyrewire's pastebin.
Okay. Thanks!
Is there some way to make a widget react to a streamdeck? Like you press a button on the streamdeck, it make an animation starts ?
hm, why @abstract basalt ? - You can trigger scenes/sources at your streaming program via streamdeck
Because my last widget is made to show socials network and i would like to give the streamer a way to make it appear by pressing a button on the steamdeck, i already have a chat command trigger but it's just for "something more" :D
Howdies. Support request: I'm using this command: "${customapi.https://api.scorpstuff.com/forecast.php?units=metric&city=$dummyormsg}" It worked always w no probs. before disabled Streamlabs Chatbot. Now after added it to SE cmds & using only SE Bot it gives me this error: [ERROR: YOU MUST SPECIFY A LOCATION] Even when clearly writing cmd w location like before. How to fix ?
Asking for mercy to help me out with Event Rotator By CO6STUDIOS. How to make it to show up only from one side, not jump from right to left?
@abstract basalt why not just have it so the widget is always on, and when the streamdeck icon is clicked it simply turns on the scene and shows on stream. Basically the same thing
@fair bay ... try this; add a new Custom Widget on your overlay; i'll post code here in a minute
html: empty
css: empty
javascript: ```js
window.addEventListener('onWidgetLoad', obj => {
let loadingSound = obj.detail.fieldData.loadingSound;
if(!loadingSound) return;
loadingSound = new Audio(loadingSound);
loadingSound.volume = obj.detail.fieldData.loadingSoundVolume;
loadingSound.play();
});
fields: ```json
{
"loadingSound": {
"type": "sound-input",
"label": "Loading Sound",
"value": ""
},
"loadingSoundVolume": {
"type": "slider",
"label": "Loading Sound Volume",
"value": 1,
"min": 0,
"max": 1,
"steps": 0.05
}
}
this info in a new custom widget @fair bay . Delete the info already in CSS and JS tabs. This is the only info you need.
sweet I will give it a try shortly
@elfin arch can I control the volume somehow?
@elfin arch can I make it stop if I switch scenes
Volume should be able to add a attribute; i think is volume=1 for max. or 100. i'll have to look it up.
It should stop when you switch the scene if you have it 'shut down' when not in use. but i have not tested that
perfect got it to stop with the scene shutdown
@elfin arch how do I add attribute for volume?
by the way thanks for everything so far
not a problem.... looking at the volume thing. looks like it's not an attribute but can set it in JS. one minute
try the updated code above @fair bay. all tabs changed.
@elfin arch Hey for the wheel widget is there anyway to get it to say something on the wheel but it report the winner as something else? For example: I want wheel to say 100x but in the chat just say 100
it will always respond with the text on the wheel for the the {winner}* {chatter} value @paper dock. So if you change the text to 100x it would respond with that.
if i remember correctly; you switched it to all static values and not usernames?
i guess i would need to see a screen shot of your current wheel; do you have like 'bankrupt' spots and only want the 'x' added to numbers?
Hello, I'm creating my own custom EventList, so far I have the Recents showing up with the onWidgetLoad part, however with the onWidgetReceived part, the new event clears the list - any idea on how to fix this so every event that comes through on onWidgetReceived gets added to the top of the list?
Are you adding a new container to the HTML when an event is received or overriding everything?
if (obj.detail.listener === "stars-latest") {
let name = obj.detail.event.name;
let amount = obj.detail.event.amount;
document.getElementById('main').innerHTML += `
<li class="{eventType}">
<div id="eventBox">
<div id="eventImg"><img src="https://i.imgur.com/xEao98F.png" width=40></div>
<div id="eMsg">Hey <span id="fbName">${name}</span>,<br> Thanks For The <span id="fbName">${amount}</span> Stars!</div>
</div>
</li>`;
}```
so ^^ that adds to the list at the bottom
'stars-latest' must be like a youtube or facebook thing?
facebook yeah
ok. cool (just getting a reference) π and that does not work?
it adds the event to the bottom of the list
ill take a screenshot
the event list is only meant to be 5 events long
i'm wondering if i'm missing something
thank you for the code and screen π makes it much easier to help. are you trying to add to the top of list?
yeah
is your #main an UL (unordered list?) basically you adding it to the bottom now with the += i'm guessing
main is the only div under html
window.addEventListener('onEventReceived', function (obj) {
if (obj.detail.listener === "stars-latest") {
let name = obj.detail.event.name;
let amount = obj.detail.event.amount;
let newStarInfo = `
<li class="{eventType}">
<div id="eventBox">
<div id="eventImg"><img src="https://i.imgur.com/xEao98F.png" width=40></div>
<div id="eMsg">Hey <span id="fbName">${name}</span>,<br> Thanks For The <span id="fbName">${amount}</span> Stars!</div>
</div>
</li>`
let mainContainer = document.getElementById('main');
mainContainer.insertAdjacentHTML("afterbegin", newStarInfo);
// mainContainer.lastChild.remove() //remove last item
}
//}); //missing from OP
try something like this @knotty thorn; broke your 'html' part into a variable then set it to the 'first' container inside of #main (so it should pop up first).
awesome thank you ill try that now
@elfin arch Sorry, I just seen that, So Basically I want it to say 100x or 50x on the wheel but want it to spit out just the number.. So whatever the wheel lands on it runs !outcome {chatter} which would be !outcome 50 and that then triggers a command to do a calculation to add points to the chat. but if it does 50x it kinda messes it up
ahh. ya. i lurked your vod a little and think i know what your going for.
i'll post ya an updated jsfiddle to update the JS code
Howdies. Support request: I'm using this command: "${customapi.https://api.scorpstuff.com/forecast.php?units=metric&city=$dummyormsg}" It worked always w no probs. before disabled Streamlabs Chatbot. Now after added it to SE cmds & using only SE Bot it gives me this error: [ERROR: YOU MUST SPECIFY A LOCATION] Even when clearly writing cmd w location like before. How to fix ?
${customapi.https://api.scorpstuff.com/forecast.php?units=metric&city=${1:}} can work when you type !forecast City
@viral patrol Ty for noticing my assist request. Put it on last night 1st time, but it was missed by some others & other requests after were not. Bows down You have any guess why didn't work like that with SE's bot, but did with Ankhbot a.k.a currently streamlabs chatbot ?
@trim bronze maybe you had a cooldown set, so some next requests were ignored by bot?
@trim bronze maybe you had a cooldown set, so some next requests were ignored by bot? @viral patrol <- Hmm could be & yeah that brings up the other question. Maybe cd was on cause by default cd's were set to huge numbers & now gotta find out detail about it. Does Cooldown amount in cmds section mean seconds or minutes ?
I mean there are some numbers like 600 by default so i assume it means seconds. Asking cause in Streamlabs Chatbot mins are used. I'm transfering S.Chatbot's functions to SE so be good to know. If in mins at SE then there's a lot of configuring to do. Np as gonna do today w good music playing on background.
It is seconds for sure.
@viral patrol Thought so, but had to ask even felt dumb π So they're opposite from S.Chatbot. Alright so it takes a bit more counting if want to have cd at lets say 12mins, but no biggy π Maybe SE changes them to mins some day. Ty for your time, wish you good day π
@elfin arch I got 3 wheels workin perfectly, I was just workin on a donation wheel now.. So basically.. When someone donates it triggers a wheel and 25x = 25 x the donated amount and its just a pet peeve having it say 25 instead of 25x on the wheel is all. I just thought maybe the value could be somethin different than the text on the wheel
yup yup. just making the fiddle now @paper dock replace all the JS code in a NEW widget. and also change the CSS part at the bottom from 2000px to -200px for it slide in from the left if you want that
what ya mean replace all the code in a new widget!? I got 4 diff wheel widgets. All do diff things
i mean make a new widget for this wheel. or if you already had 1 set up then just the JS part.
you don't have 4 wheels built into 1 widget.... or do you?
no, 4 wheels all in diff widgets
all diff browser sources
i have a sub wheel that auto spins, a wheel that randomly selects a viewers from chat to get points, a wheel of doom, and now workin on this donation wheel
hahah. ya i saw a lot of wheel action in your VoD π€£
haha YES they love it
they can redeem the wheels using channel points and it auto triggers
basically at the top is a 'testData' object. fill that in with what you want. "text" is what is shown on the wheel, "fillStyle" is color can be a text color like 'red' or hex # '#000000'. if it's not there is it randomly chosen. 'res' for the response you want for {chatter}
https://jsfiddle.net/sdf8ghqk/
Then in the setup options you want; 'show wheel on load' = yes & show testdata on load checked. (and ignore winner in the game settings to no)
is there any way to just add that res command to the wheel I had already got started on?
or should I move everything over to that JS u just sent me
click the fork button on that link; post your JS code in there. save and send me the link back
i don't think so; but maybe. we were just 'pushing' things into the array and not building it correctly.
where is the save button
ya I clicked fork
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
did I do it right
all my stuff is on like line 246
not done yet tho ima add more options but thats what I got right now
no. try again. click the save. it looks like it sent back the code that i had
i will just switch it to this new code, what is the code to get it so it picks someone on the leftside of the wheel?
pointerAngle then whats the number?
got it
is there no custom editor for stars goal?
@elfin arch got it all workin, now just gotta add the rest of the wheel options. I appreciate it!
what were u talkin about earlier when you said from 2000 to -200?
that would make it slide in from screen left instead of screen right.
ahh okay cool
also a longshot but is there anyway to get streamelements to respond via a whisper instead of the chat
like the outcome the bot responds !winner {chatter} is there anyway I could get it to send !winner {chatter} to a whisper?
negative on that. the whisper is disabled cause some people abuse that for scam stuff
gotcha
@elfin arch did u see all the diff wheels I made with the wheel? I love it! Thank you so much for this widget. Took me alot of thinkin on how to incorporate and get it to work with my other bot but its been great
do you have any option in https://streamelements.com/dashboard/themes on the widgets tab @knotty thorn ? i don't have a FB account so i can't check
haha it looked sweet @paper dock i was scrubbing the Vod and it was a wheel; then a wheel there. then some giveaway one (which if i must say has great options but not pretty π€£ ... don't think i can do the sub odds). and the chat responses were sweet. well done.
ya sorry @knotty thorn i'm not familiar with FB (i didn't even know 'stars' where a thing π€£ , i'm guessing that is like 'bits'?). but i do like the event list you have created. looks great!
i'm going to assume what i posted earlier either worked or you made it work π
thanks man - yeah they're exactly the same as bits - lil difference is fb share more revenue the higher the stars are donated - eg 9525 stars = $100 USD = $95.25 to streamer, $4.75 to fb - but that's if they choose to donate the full amount
also working on everything else, so ill make it work - otherwise ill ask in here π
@elfin arch yes the ugly wheel you seen is what I used before I found this wheel haha
Ive been trying to figure away to automize my wheels forever and was finally able to do so
in the next few nights Im going to make a giveaway wheel to replace that ugly one LUL
that interface it nice with adding people. and the 'odds' chance. i just am not sure about the 'click here' to spin for that website
hey guys can i add a currency system to my chatbot
hey guys can i add a currency system to my chatbot
?????????????/
????///
you literally gace 0.1seconds to respond before spamming ???????
lol
Can we?????
but streamelements comes with a currency bot you can enable in the "loyalty" area
please ask in the correct #help-desk channel π
thankks
dude reminded me of my ex gf, thinks spamming ????? is gonna get me to respond faster LUL
π€£ .... i sent you 10 texts! you never responded (it's been 2 minutes)
...anyways; with that wheel there is a 'raffle mode' that populates the wheel when enbaled and shown on screen
... but there is no 'spin until you say stop' mode
yes I use the raffle mode for one my wheels,
on my channel points u can start the "points wheel" and people gotta type whatever the person chooses to enter LMAO
someone redeemed it and made everyone type Dak Prescott is the best QB today
hahah. ya i saw that one. π€£ at least it wasn't 'Brady'
if you have other ide a for other options let me know. It's not ment to be a 'static' wheel though; just have it with active chatters listed (no fixed values)
@elfin arch Oh I know, I originally added it just for the viewer one but I liked it so much I was like can there please be a way to use this wheel to replace my other ones
haha
do u think there can ever be an option to add a sound for the duration of the spin?
instead of for just the ticks
ya. it can start a sound when it starts and stop at the end. don't think it can do both a background and tick sound though
oh so if i upload a sound into that area it will actually play through the whole spin?
i thought it said it had to be really short
i can show you the edits for that
yeah ill try it out, cuz hell I can just add the ticks to the audio file itsself, no one will ever know lol
may not work on the wheels with the viewers but on the static ones it could work
let me test it real quick
also this may seem silly, I know u said I can set the colors of each block, but I prefer just randomfill, if I do do randomfill though is there anyway I can prevent them from being a certain color? Like random fill EXCEPT this color
i have it around line 340 (with that last code i posted) but in the startSpin() function
if (playSound) playSoundEffect(); //sound
okay sweet I will mess around with it, thank you
then in endSpin()