#dev-chat

1 messages Β· Page 44 of 1

crisp laurel
#

anyone know to code to add a delay to an element appearing?

#

basically i have a video playing and i would like an image to come up 3300ms into the video and dissapear aroudn 12090ms

crisp laurel
#

let timeIn = 4000;
let timeDisplay = 4000;
let timeOut = 400;

#

pretty sure these are the key but ive put them just about everywhere i can thing and nothing

fossil sonnet
#

Hello! How would I go about getting just the message from an alert? I want to process the text message live in a lua or python script in OBS. What would be the simplest way to get the message from streamelemets into the script?
Should I get it through a normal alert and try to parse the message when it comes through? Can I get it in a text file or web link that a text source can use that I can then read from my script? Any other suggestions/ideas?

ashen narwhal
#

can someone help me make a simple edit to a widget?

crisp laurel
#

@ashen narwhal probably not

#

if its very simple i can try, but ive never gotten an answer on this channel ever other than being told to read the exact document i said didnt have the info i wanted

ashen narwhal
#

Ok so can I change who can use a widgets command?

#

@crisp laurel I'll tag you so you see this

patent mauve
#

I'm trying to make a custom widget but don't think I'm knowledgeable enough to make it haha - It sounds simple yet its not - 1. I'm trying to make my mp4 video show and hide based on a time interval 2. Also have it animate in on sub or follow event for 8 seconds also wanting my total subs and followers to be displayed on top of the video.

pale acorn
#

Hello I'm trying to understand the events on Stream Elements, but now i don't understand how to icrease a value when i have a new folloer

#

follower*

#

I really don't understand how to use the event listener

balmy nebula
#

@viral patrol the 'fixed time' feature you added to the credit roll widget doesn't seem to really be working right? it adjusts speed based on how many events are there to an extent, but still has pretty variable timing

steady iron
#

Hey @ashen narwhal what are you trying to do?

#

To set the right expectation: this channel is about developers helping each other, this is done in a voluntary basis, something that is simple in concept may not be so simple when translated into code and if you are just looking to have a widget changed without doing the change yourself, this is specialized work and most people will expect compensation for it.

#

@pale acorn the code you have shared is increasing the same variable "count" when either a new subscribers or followers event happens, what are you trying to achieve?

elfin viper
#

Yo!
When I try to refresh access tokens at "https://api.streamelements.com/oauth2/token?"
I get

error: 'server_error',
error_description:
   'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.'

Is it a server error, or am I sending incorrect credentials?

viral patrol
#

Thank you for reporting this. We are investigating the issue.

elfin viper
#

@viral patrol ok, ty!

viral patrol
#

It seems to be OK for me now. Can you check?

elfin viper
#

Working now! (still got error, but a better error πŸ˜„ )

crisp needle
#

Hi! I have an issue with community gift alerts via AlertBox and a custom widget. After the first alert - "someone is gifting subs!" - there is a long pause which, I assume, is for all gift alerts from that community gift. In custom widget I used SE_API.resumeQueue(); but in AlertBox there are none (the default one is not showing neither the varied one for gifts). How can I skip the "post-community-gift alerts" in both custom widget and AlertBox?

cursive hound
#

Hi. I'm currently using Bananeens 'One Bar to Rule them All' widget, but I'm having trouble having it update when people donate. I'm not sure whether it's because the tip are in AU$ but it's not updating (the default SE one updates though), Does anyone know what the issue could be or Is there anyway to just link the points to equal whatever the dono goal amount is?

hardy walrus
#

@ocean wadi ^^^^^

viral patrol
#

@crisp needle This will be always delayed as Twitch is dispatching those events one after one and we have to parse them.

#

If you have community gift variation and resumeQueue for events that are part of bult gift, there's nothing more you can do to make it go faster

ocean wadi
#

@hardy walrus why ping me ???

hardy walrus
#

Person above me had a question about your widget.

ocean wadi
#

Oh right

#

@cursive hound , for donations, the bar is filled using this formula: rounded amount (1,49=1 / 1,50=2) multiplied by tipPoints. If you have large goals, small donation might not be visible since bar is filled % by %

#

It doesn’t care if it’s €,$,Β£,Β₯ or other

#

The tip points are for 1 unit whichever unit you use

crisp needle
#

Thank you, @viral patrol

cursive hound
#

Ah okay, thanks @ocean wadi I’ll have a look and see if that works

ocean wadi
#

if you want to try things with another bar, just import it a second time and change the very first value in JS tab when editing code : "widgetNumber".

By changing this, you change the storage on SE end therefore the saved points on both bar are different.

cursive hound
#

I think I managed to get it working properly. Not sure why but even a second/new version wouldn't work 50% of the time. Had to recreate a brand new scene and start again - hopefully this continues to work. Thanks for your help!

shut glade
#

Hey guys. I was looking into the API reference, but could not find anything about subscriptions. Is there a way to list all my current subscribers? Thank you!

viral patrol
#

The only way to get a list of your current subscribers is to query Twitch API, not StreamElements

shut glade
#

Thanks, wanted to clarify that. I didn't want to use their OAuth procedure and use your JWT token instead, which is easier

pale acorn
#

@pale acorn the code you have shared is increasing the same variable "count" when either a new subscribers or followers event happens, what are you trying to achieve?
@steady iron To increase "count" depending on the event and try to show it on a goal bar

umbral vigil
#

I'm trying to connect to the SE-Websocket but i never get any response / command line output. What am I doning wrong? My code:

const io = require('socket.io-client');

const streamelementsSocket = io('ws://realtime.streamelements.com', {
    transports: ['websocket']
});

async function setupStreamelementsClient() {
    streamelementsSocket.on('connect', () => {
        console.log('connecting to Streamelements...');
        streamelementsSocket.emit('authenticate', {
            method: 'jwt',
            token: process.env.STREAMELEMENTS_TOKEN
        });
    });
    streamelementsSocket.on('disconnect', () => console.log('disconnect'));
    streamelementsSocket.on('authenticated', () => console.log('authenticated'));
    await io.connect();
}

setupStreamelementsClient(); ```
viral patrol
umbral vigil
#

thx, I will have a look at this.

#

ok, I can't connect because I have a "invalid token". But I also use the exact same token for API-Requests and it works just fine. Any Ideas why this could be the case?

umbral vigil
#

ok, I found my error: The call require('dotenv').config(); was missing and therfore the token was just undefined....

steady iron
#

@pale acorn then it is necessary to have different variables to count for different things (for example countFollower, countSubscriber, etc), and then make the functions to draw the numbers/bars in the HTML, This has to be done manually. If all you need is to have the totals you can simple retrieve the current total from Twitch/StreamElements through their APIs. You can check other custom widgets to have an example like this https://strms.net/one_bar_goal_by_bananeen

reef granite
#

how exactly does the SE_API object work in the custom widget? For instance, if I want to get the current user's channel name without asking for it in the widget json?

#

nvm, I think I figured it out but it looks like obj.detail.channel["username"] is much easier

solid patio
#

I believe this to be the right location: MixItUp app is having api authentication errors when attempting to connect. Has this been brought to anyone's attention to this point?

cedar kiln
#

is there any possibility to add channel point redeem alert?

hardy walrus
#

@cedar kiln there is something in #widget-share for redemptions that require text input but nothing beyond that.

#

@solid patio I had seen someone mention it once on twitter but I can't really do anything beyond that as I'm not sure where the issue is exactly.

solid patio
#

@hardy walrus

sterile lodge
hardy walrus
#

When did you last try klam?

solid patio
#

Last attempt was 3-4 minutes ago, same issue.

hardy walrus
#

Only person offhand I know that could answer this is @viral patrol and not sure when he'll be on.

viral patrol
#

Thank you for pinging me and thank you guys for reporting that issue. I forwarded that to our developers.

fossil sonnet
#

It's about 2 years old so I'm guessing it's obsolete. But if so, could I get some pointers getting it up to todays standard?

vapid sparrow
#

Hello! I have a Widget rotator that uses several Session variables from streamelements API, per searching I came across this URL that describes each one of the objects. https://docs.streamelements.com/reference/sessions

I want to show case the Latest Gifter, but as it seems the object
Object data.subscriber-gifted-latest
String data.subscriber-gifted-latest.name
Integer data.subscriber-gifted-latest.amount
String data.subscriber-gifted-latest.message

Only has the Gift Reciever and not the GIFT SENDER.

I want to show the GIFTER and the latest ammount of gifted Subs

EG: Latest GIFT: username Gifted 10 Subs

elder dragon
#

I can't seem to get my head around gift subs with onEventReceived. I have an object that has the name and amount of the latest subscriber and latest gifter. I'd like to update this real-time with onEventReceived but I am gettin thoroughly confused by the documentation.

#
    case 'subscriber-latest':
      if (obj.detail.event.bulkGifted) {
          state.gift.name = obj.detail.event.name;
          state.gift.amount = obj.detail.event.amount;
      } else if (obj.detail.event.sender) {
          state.sub.name = obj.detail.event.name;
          state.sub.amount = obj.detail.event.amount;
          if (state.sub.amount == 'gift') state.sub.amount = 1;
      } else {
          state.sub.name = obj.detail.event.name;
          state.sub.amount = obj.detail.event.amount;
      }
    break;```
#

This is my current code

crisp needle
#

what's happening you don't want?

#

@elder dragon

elder dragon
#

If I do a single gift it doesn't recognize it as a gift

crisp needle
#

PMs?

elder dragon
#

Not needed. I actually figured it out 20sec ago lol

crisp needle
#

:D

elder dragon
#

I got so annoyed I made a custom widget that logs it and now I finally understand

crisp needle
#

.gifted ?

elder dragon
#

Yeah so bulkgifted = true is multiple gifts, bulkgifted false = 1 gift and bulkgifted = undefined is no gift

crisp needle
#

yep

elder dragon
#

That's what got me hella confused

fossil pier
#

Hi i don't even know If i am asking this in the right place, but since it's something pretty basic I Hope someone here could give a hand, so I have a command called !kill, which kills the tagged user, I would like to know the code so that whenever someone tries to kill one specific user(Ex: !kill Chuck norris), it appears: "You can't kill Chuck norris.".

currently the command is like: "${sender} matou ${1} com um ${random.pick"canivete" "tank" "cano" "revΓ³lver" "pΓ© de cabra" "dedo no boga"} e fugiu..."

coarse gate
#

@elfin arch i really liked your wheel widget, i'm looking for a spin the wheel widget for donations that spins and I do a random thing based on that, you think the widget can be modified for that?

elfin arch
elfin arch
#

^ @coarse gate ... if you want the name of the donator to show on the wheel too; then update the HTML information with the .html file in link as well πŸ˜‰

coarse gate
#

no not donator, but like, i want the wheel to have some options of stuff id do at random. like do 10 push ups or gift a sub etc but the wheel activates when i get a donation of a certain amount. i hope that makes sense

#

Its like Spin the Wheel on SL or Roulette on Twip

timber lark
#

I want to try the "Image Reveal Game" Widget by @elfin arch and I wonder if it's possible to track the wins of people in chat during a session? Maybe some kind of a top 3 leaderboard?

tiny tusk
#

hey there, maybe you can help me again... If a make a chatcommand f.e. "!yummy" and output is "!redeem yummy" its not activating the redeem... is there a way how to trigger the streamshop item with a chatcommand like this?

viral patrol
#

Output should be ${redeem yummy}

tiny tusk
#

Thx!

tall aspen
#

Is there any way to make a custom command that will edit another custom command?

random dragon
#

Hello i have a question. Can we somehow edit someones points from api when we have permission like Bot Supervisor or Editor? Cuz I can edit these points from streamelements page but not from api. Using own jwt i got 403 No channel authorization found

viral patrol
#

@random dragon The streamer may register on jebaited.net and provide you token for points management

random dragon
#

nice domain KEK

viral patrol
#

It uses oauth

random dragon
#

ok thank you Be

viral patrol
#

Example usage may be found in bank heist widget or wheel of fortune on #widget-share

random dragon
#

i want to add level to discord bot

#

when someone get lvl i want to add some points

#

on streamelements points

#

ofc

viral patrol
#

Seems like jebaited.net should suit your purposes as middleware for SE api

random dragon
#

I hope so

#

Thank you again

meager rose
#

I'm interested in how this works

const gifterData = await SE_API.store.get(kvID);

Is this an API wrapper that accesses the StreamElements API?

viral patrol
#

This gets data from SE key/value storage service.

#

There is no full api available from custom widgets due to security.

meager rose
#

thanks

viral patrol
#

@meager rose what functionality are you looking for? Some of them may be covered by jebaited.net middleware for SE API

meager rose
#

oh im just looking through existing widgets and looking at how they work πŸ™‚

#

i will take a look πŸ™‚

viral patrol
#

This is OAuth service that allows noninvasive connection between widgets and SE API.

#

So if your token leaks, your usage will still be limited to selected scopes.

pliant mist
#

Hello guys, I'm new here and I would like to know if there is any way I can place bets to start and pay them through the stream chat, some API that does it in a simpler and easier way than having to go to the site always to start bets and pay them

regal jetty
#

Hey I'm Trying to make a completely custom alert boxes, got everything working except the font.

I know why it might not be working (unable to find the font) but when I use the exact link I use (points to a website I have) I prompts my browser to download the font. (so it is there) the font is in TTF format and works fine locally but not on SE

Here's the CSS code:

`@font-face
{
font-family: Font;
src: url(http://web.site/font.ttf);
}

.Textbox{font-family: Font;}
`
The way I am referencing this has worked great for me in the past and this has been the only time this hasn't worked for me, Any workarounds?
Not really a Pro at web design just been tinkering with it for years. Cheers!

viral patrol
#

@regal jetty Your font has to be served over https due to browsers security policies

#

One of the easiest way is to enable cloudflare on your domain, so your traffic will be SSL encoded between CF network and user where CF=>your server may be plain http

pliant mist
regal jetty
#

Yeah gotta work out how to enable that

pliant mist
viral patrol
#

I thought you want to create a script/program that will trigger a call to our API to start contest and this is the way you can create and manage one.

empty narwhal
#

hey. is there anyway I can capture in my custom widget when somebody uses channel points ?

viral patrol
#

Only if the Twitch item has user message attached

tame sun
#

it's been like 2 months, is the link from the docs outdated or am I missing something

hardy walrus
#

@viral patrol ^^^^

quiet reef
#

Is anyone able to help me with a custom api command for twitch using stream elements?

elfin arch
#

@timber lark the tracking of wins is not built into the widget. But it would be possible to create an object of winners for the game session and reference back to it for a leaderboard to either announce in chat or add into the visual overlay. Unfortunately, I have no time to work on anything but can give you some suggestions if you want to try and tackle it πŸ™‚

timber lark
#

Unfortunately I have absolutely no skills in JS, CSS etc.
So maybe you can just keep it as a suggestion for a later update, when time is right? πŸ˜‰

regal jetty
#

Pretty sure this suits here but trying to edit my alerts and testing them, worked fine for a while now when I save or test them in the editor (works fine in there) but not on the preview/feed to OBS. Tried refreshing, nope.

high swallowBOT
real dune
#

Yo, code nerds, how hard is it to make a poll that chat can spam the shit out of for voting?

something that can be customisable for colours, icons and text

zealous basin
#

Hey, can't seem to get the font I want to pop up on the alert through CSS. Am I doing this right?

compact haven
#

How do I create a custom alert with html/css like in streamlabs?
I want to migrate streamlabs to elements, but I cant find anywhere where I can put my design and stuff for alerts

cedar kiln
#

Hey, can't seem to get the font I want to pop up on the alert through CSS. Am I doing this right?
@zealous basin did you add @import url('https://fonts.googleapis.com/css?family={fontName}'); ? or link it in your html template?

#

How do I create a custom alert with html/css like in streamlabs?
I want to migrate streamlabs to elements, but I cant find anywhere where I can put my design and stuff for alerts
@compact haven this custom code

zealous basin
#

@zealous basin did you add @import url('https://fonts.googleapis.com/css?family={fontName}'); ? or link it in your html template?
@cedar kiln do I put this in CSS or HTML

reef granite
#

is there a good way to test "session" events with the emulator? It seems that the "event-session" objects don't always exist when testing your custom widget (i.e. "subscriber-session")

#

or should we just assume the number is 0 if the subscriber-session object doesn't exist?

cedar kiln
#

@cedar kiln do I put this in CSS or HTML
@zealous basin that was css..but you could use another code with same effect in html..i think it was not documented, but you can find it from examples

hardy walrus
#

@silk pebble 2 things.

#

It wouldn't be accurate as prime subs do not really track monthly.

silk pebble
#

πŸ€”

hardy walrus
#

I know something that might work but need to see if that's one of the responses it has.

#

@pure drift Regarding your API above it only does age right? No endpoint for streak?

silk pebble
#

@hardy walrus hmm ok tnx. i'll have a look at this πŸ™‚

#

@hardy walrus I have a question about this API. If you give authority to the API for a channel, does this mean that anyone can check on these stats if they just use that channel name instead, or the request will only work if it comes from the channel that authorizes it?

hardy walrus
#

That would be a question for the person I pinged as that's his website.

#

But I think as long as they do the proper link for it technically anyone can once you authorize it.

silk pebble
#

oooh i see

#

I ask because a lot of people don't want things such as their sub count known to viewers, so authorizing this for sub age could also mean anyone else could just make a command in their own channel and just replace the channel name with the channel they want to look up the sub count for.

hardy walrus
#

From what I've seen unless they know that you're using this api there's no way for them to know unless the website has a hiccup.

#

Because the commands list on your public SE doesn't list the actual website.

silk pebble
#

yeh i guess... still... seems a bit weird to allow others to see it if you don't want them to, but hey, maybe there's no way around it. shrug

pure drift
#

@hardy walrus Streak isnt exposed via the API, so yeah, only subage.

@silk pebble Your concern is something I have thought about in the past, but by the time I realized, I didnt wanna drastically change the behavior of the API endpoint. Most people that do use the API have it in their overlay or in a chat command anyways, so its not like theyre trying to hide the info

hardy walrus
#

Figured as much. SeemsGood

silk pebble
#

@pure drift yeh, but allowing access for sub age also means giving access to subcount to anyone that wants to know. oh well. πŸ‘

pure drift
#

Yeah thats a mistake from the past, really.

Not many people use subage and not the either subpoints/count and I discourage people from using subage as it gives information thats pointless to 99% of the channels.
I'll probably deprecate the subage API at some point and then just remove it, since again, its not really information anyone cares about.

silk pebble
#

@pure drift aaah ic. yeh if im honest, i was actually looking into a way of trying to make a leaderboard of sorts for sub age, which doesn't seem like something that could happen with this anyway.

pure drift
#

You'd need to use Twitch's API for that

#

But even then, it doesnt provide subscriber streak, only when the 'subscription' was started. For Prime subscribers, that date resets every month.

silk pebble
#

@pure drift hmmm ic. yeh i mean im not really that savvy when it comes to this stuff. It does seem strange that the mouse hover over a sub badge shows the month total and yet the API doesn't provide that number to be used. πŸ€”

pure drift
#

It's Twitch. Theyve spent a few years building an API that works poorly and saying the old, decent API is deprecated and scheduled for removal.

For me its not strange at all, because I'm used to this kind of crap from them.

silk pebble
#

haha

viral patrol
#

@compact haven You should create regular alertbox and then enable custom code for that:

real dune
distant gale
#

Help

spare knot
#

Hello. Tried to call api to get giveaway joined users, but give this errors. P.s. its all ok with JWT, ChannelID and Giveaway ID, because "send message" api works fine.

harsh cosmos
#

Hello, can I get top gifters list using SE's api? I cannot find it in docs.

viral patrol
#

@spare knot i think there is no devnull subdomain ;)

#

@harsh cosmos it is not provided in API

tender prairie
#

hey i really need help and i dont know ware to go i keep trying to use obs and this is my first time but no matter what i do it only displays black i dont wanna steam or anythings just record my screen and games

high swallowBOT
pulsar willow
#

Hello, I made this alert. Now i want the white line to reveal the name of the follower (infront of the "folgt") and then when it comes back to reveal the "DANKE" it should hide the name of the follower again. Sb have an idea? (Ik i can just make the text appear and dissapear, but then the animation would look kinda wierd.)

viral patrol
#

The only way is to create it in HTML

pulsar willow
#

Oh sadly i dont know HTML but thx anyway

torn saddle
#

hey, i made a custom alert for my stream, but i can't get these two lines to work:

document.querySelector('#container').style.width = document.querySelector('#alert').offsetWidth+60;
document.querySelector('#container').style.marginLeft = "-" + document.querySelector('#container').offsetWidth/2

this works fine in local but not in SE
this should output : (values in px are random for the exemple)

<div id="container" style="width: 500px; margin-left: -250px;">

but instead:

<div id="container" style="margin-left: 0px;">
viral patrol
#

You should use integer values, not strings:

document.querySelector('#container').style.marginLeft = -document.querySelector('#container').offsetWidth/2
torn saddle
#

ok thx, but this does not change anything

#

btw its a tip alert

viral patrol
#

Hmmm. It seems like your offsetWidth returns 0 then. This may be because the content is not populated when you are calling offsetWidth or container is not display:block

#

This is a div, so maybe it is overwritten somewhere to display inline?

torn saddle
#

nope :/ its display:block

#

if you wanna try:

<div id="tipContainer">
    <div id="tipAlert">
        <span class="background"></span>
        <div id="text">
            <div id="username">{{name}}
                <span class="usr-white">{{name}}</span>
                <span class="usr-rose">{{name}}</span>
                <span class="usr-bleu">{{name}}</span>
                <span class="usr-jaune">{{name}}</span>
                <span class="usr-vert">{{name}}</span>
            </div>
            <div id="action">
                <span>text {{amount}}{{currency}} !</span>
            </div>
        </div>
    </div>
</div>
const tipContainer = document.querySelector('#tipContainer');
const tipAlert = document.querySelector('#tipAlert');

tipContainer.style.width = tipAlert.offsetWidth+60;
tipContainer.style.marginLeft = -tipContainer.offsetWidth/2;
viral patrol
#

@torn saddle

tipContainer.style.width = `${tipAlert.offsetWidth+60}px`;
tipContainer.style.marginLeft = `${-tipContainer.offsetWidth / 2}px`;
viral patrol
#

LMK if that worked

#

I was right about casting, but casted it wrong way on first try

torn saddle
#

yes it worked thx !

tribal robin
#

So the Current Game Label widget is pretty nice but does anybody have a guess how to insert a few pixels between the icon and the text?

#

it's a little too tight

dreamy creek
#

Where do i find a channel id?

pliant torrent
#

Is this the proper place to seek CSS/HTML help for custom alerts?

sterile lodge
#

Hello, getting this error again for oauth2.

{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request.","state":"........

digital glacier
#

hello friends! I am looking for some on help How to use the query params for the api calls. I want to limit to 1 and ONLY show the most recent tip. building this in node.js. When I call the api, it is giving a long list instead of just 1 and the latest.

viral patrol
#

@pliant torrent Yes. This is the best place to seek help

#

@sterile lodge We are already on it. OAuth2 is in beta ATM and this issue may occur.

#

@digital glacier https://api.streamelements.com/kappa/v2/activities/:channelId?limit=20&types=tip&mintip=1

digital glacier
#

thanks @viral patrol ❀️

#

worked like a charm

next radish
#

anyone in here able to help with a widget commission, its very hard to find anyone in the commissions channel as its mainly filled with gfx artists

lusty pivot
#

guys is streamelements login working for you?

#

i get this YEP

#

and after that i get redirected to twitch and logs me out of twtich

elfin viper
#

@viral patrol I'm getting the same error as last week when trying to refresh access tokens.

error: 'server_error',
error_description:
   'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.'
#

@lusty pivot "Twitch has no control over the content or security of twitch.tv" They got that right OMEGALUL

lusty pivot
#

Twitch just being twitch

#

i think its because of www right? YEP

viral patrol
#

@elfin viper This is strange. From what I see it should be working properly now.

pulsar willow
#

Hi, is there an API that transfers the loyalty points to another account for the same users?

viral patrol
#

The only way to do that is to take points from one account and add them to another.

pulsar willow
#

this manually?

viral patrol
#

Not manually, you can do that via API endpoint: https://docs.streamelements.com/reference/single-user#pointsamountbychannelanduserput

#

So you can authorize with channel1, take points and then add points with authorization from second channel

pulsar willow
#

Tks!

viral patrol
gray schooner
#

is anyone here good with custom CSS? i need help making my donation goal react to incoming donations on streamelements

#

i want it to be like a progress bar, but it doesnt do anything right now. it's just kinda stagnant and wont move as it should

#

i think the code was meant for streamlabs first, but now that i'm copying it over to streamelements, there's a bit of a discrepancy in how information gets interpreted

#

does anyone know how i could maybe pull the JS from the original streamelements tip goal?

#

meaning the built-in widget

unique iris
#

Hi guys.
Is there a way to build a custom chat widget with all the options the current default chat widget has?
The one in github has some stuff, but not all of them.
Like, is there a updated chat widget code somewhere or streamelements is planning on releasing one that reflects the current options we have on the default chat widget?

hardy walrus
tame sparrow
#

@unique iris what options are we talking about

unique iris
#

@hardy walrus thanks sudo!

#

I was looking to replace the ignored nicknames with this (pic) like the default one as well, instead of a list separated by commas like the custom chat has
Is there a documentation for all these controls?

viral patrol
#

@unique iris All of those settings can be done via code. Custom chat widget (either github or widget-share channel) has been created to be a start base for coders that want to change them to their look.

elfin viper
#

@viral patrol This error is now also returned from /authorize

{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request."}

Am I doing something wrong? πŸ™‚

viral patrol
#

I just reported that to our guys 2 minutes ago. Thank you for pinging

elfin viper
#

@viral patrol great, thanks πŸ™‚

viral patrol
#

@elfin viper should be good for now

random dragon
#

@viral patrol after 5 days i ended my project, and jebaited API works as it should Be

viral patrol
#

@random dragon Looks nice! Good job!

#

Also I see not only me is having issues with ISP today πŸ™‚

haughty atlas
#

Morning. I have a question about chat commands with sound effects. Is there a way to have certain sound effects initiate without using !redeem before the command? Or is there a way to use an alias in the commands to trigger the !redeem function without chatters using !redeem before the command

rugged rapids
#

There is a variable {redeem ITEMNAME} you can use in a custom command, to trigger a store item.

haughty atlas
#

@rugged rapids ok does if I have !oops set at the chat command, I’d add an oops sound effect in stream store and then add ${redeem oops} in the response? Or just {redeem oops}

#

Also thank you so much for your help

rugged rapids
#

Add ${redeem ups} in the message field of the command.

haughty atlas
#

Perfect thank you!

haughty atlas
#

Hey @rugged rapids sorry to bug you again. It seems even when I have !oops response set ${redeem oops} it doesn’t play a sound effect. Is there maybe something I need to change on the store side?

hardy walrus
#

Do you have the redemption widget added?

haughty atlas
#

I don’t think so!

hardy walrus
#

That would do it.

haughty atlas
#

@hardy walrus thank you!! does that mean I’ll need to add one for every type of sound effect?

hardy walrus
#

No. This handles anything done for the store. Adding multiple will simply cause an echo.

haughty atlas
#

Ok thank you.

crimson osprey
#

I'm having a hard time with args in a custom command to keep track of multiple counters at one time. Anyone have some insight?

This is what I have right now and I've tried changing things around several times

${count ToshiELO -${1:}} ${count ToshiELO +${2:}} ${count ToshiWIN +${3:}} ${count ToshiLOSS +${4:}}

Basically I want to be able to type !gain+ 0 2300 3 2 - For a 2300 ELO Gain and 3 wins 2 losses

I can do this easily with Streamlabs, but I want to make this work with Streamelements - Please tag me if you have insight or can help

unique umbra
#

Hello I developed an overlay using the socket connection. When I test it on "emulate", it works normally. Now when I receive a real donation, it doesn't work. Is there a different configuration for this?

sour estuary
#

Hi, i'm brazilian, so, maybe some words may be whiten wrong, sorry for that, now my question: Can i (a moderator) create or start a contest via Chat? Or i need the access to dashboard?

torn gulch
#

@sour estuary you can use the #πŸ‡΅πŸ‡ΉοΈ±portuguΓͺs channel

sour estuary
#

ah, didn't see that, thanks

sterile rock
#

What's the easiest way to call the goals, latest sub, etc. from stream elements into python / an obs element?

sterile rock
#

Is there a get / post api for latest followers / subs?

#

StreamElements OAuth2 Application Form The form StreamElements OAuth2 Application Form is no longer accepting responses. Try contacting the owner of the form if you think this is a mistake.

fresh cove
#

Hi there guys, I'm experiencing loads of API oauth2 errors {"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request." ... . This issue seems to be affected a large number of streamers. Any progress or feedback on this issue? I see it was raised above and it was said to be resolved from what I can see.

lusty pivot
#

@elfin viper This is strange. From what I see it should be working properly now.
@viral patrol still not working for me

gray schooner
#

@gray schooner If you want goal widget as custom code, so you can adjust it to your needs: https://github.com/StreamElements/widgets/tree/master/GoalsOverPeriod
@viral patrol i really like this, thank you! how do i incorporate the json file into streamelements? i feel like i'd be doing things the hard way by manually adjusting each piece of code individually. is that the only way to do it?

elfin viper
#

@lusty pivot @viral patrol Not working for me as well now

viral patrol
#

Thank you guys for a report. I forwarded that.

#

@gray schooner JSON file should go to FIELDS tab of custom code editor, then you will have options displayed in left panel.

pliant flume
#

Hi, I'm having some problems adding two different fonts on my css tab... idk why the "follow" text don't recognise the font named "ruido"

viral patrol
#

If you have the font installed on your PC you don't have to use font-face definitions, you just need to use actual font name

pliant flume
#

I mean, I just copy the name on "font-family" ΒΏ

viral patrol
#

What name is displayed when you open "Lemonmilk-lightitalic" from C:\Windows\Fonts ?

#

You should just use this name

#

Do not redefine it as "Ruido"

pliant flume
#

without the .otf

viral patrol
#

Sorry. I had a call

#

Not properties of file

#

Open it

#

Ohh. but..

#

I am blind. Those are two same fonts (same family), you don't have to redefine it

#

So instead: font-family: Ruido you should do:

.username{
  font-family: "Lemon Milk";
  font-style: italic;
}
fresh cove
#

Hi there guys, I'm experiencing loads of API oauth2 errors {"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request." ... . This issue seems to be affected a large number of streamers. Any progress or feedback on this issue? I see it was raised above and it was said to be resolved from what I can see.
@viral patrol any feedback on the above?

viral patrol
pulsar willow
#

The new Clippy Widget, does anyone know how to make the actual animations bigger

viral patrol
#

@pulsar willow The assets there are small resolution so I kept them original so they are not pixelated, but you can go to Code editor, CSS tab and add something like:

body{
  transform: scale(2);
}

And play with the number to fit your needs

fresh cove
#

@viral patrol I was experiencing issues after the time it was marked as resolved but seems to be working now, thank you πŸ™‚

broken pecan
#

getting this error,
{"error":"server_error","error_description":"The authorization server encountered an unexpected condition that prevented it from fulfilling the request.","state":"Qf9y4D2PcNr7x5F6Mnd9314bfa2e344412a63ce9140e42412a"}
a lot

west night
harsh sequoia
#

Hello, I'm currently still experiencing the oAuth token issue despite the resolution. any ideas why?

pliant flume
hardy walrus
#

@pliant flume the last part is needed to specify which channel.

pliant flume
#

Yup, O know... but I'm looking for an api that only shows the link. Without the tittle and all the rest of the text

hardy walrus
#

Ah.

viral patrol
#

@fresh cove @broken pecan @west night We are experiencing problems with our 3rd part applications handshakes. There was a patch introduced yesterday, but it seems that it happened again today. I already notified devs about that.

broken pecan
#

Thanks

hardy walrus
#

Yup, O know... but I'm looking for an api that only shows the link. Without the tittle and all the rest of the text.
@pure drift Any way to not have video info returned from the latest video endpoint?

pure drift
#

@hardy walrus no

hardy walrus
#

Figured as much since there was nothing in the docs.

#

@pliant flume You can't unfortunately.

pliant flume
#

Yeah, I see

#

I used a page that creates a link to ur last video always

#

is a quite slow redirect, but It works

#

and is automated, so... I keep with it

viral patrol
#

@fresh cove @broken pecan @west night fix has been applied. It should be way better now.

fresh cove
#

@viral patrol thank you very much! πŸ™‚

pliant flume
#

Hi, what do I should do to make a text pop out form the bottom of the overlay with a trigger, like a command or some kind?? Coud it be a text and an image? it is possible?

digital glacier
spice citrus
torn gulch
#

@spice citrus go to Text Settings > Advanced > Margins ...

spice citrus
#

and delay in the message?

#

to appear after the animation

torn gulch
#

@spice citrus on the Animation Settings tab > Text appearance delay

viral patrol
#

@digital glacier You can add multiple types &types=cheer&types=follow&types=host and so on.

molten shuttle
#

I'm trying to build a custom "channel funding goal" widget that adds my subs for the month and bits for the month. I am looking everywhere for a guide to figure out how to build a Twitch widget using Streamelements or anything else. Can someone point me in some direction? I'

#

I'm not worried about the graphical part yet.

viral patrol
molten shuttle
#

Thanks!

molten shuttle
#

Question why isn't this working to load my current cheers?

window.addEventListener('onWidgetLoad', function (obj) {
let data=obj["detail"]["session"]["data"];
bits=data["cheer-month"]["amount"];
});

#

I'm trying to just do something very basic so I can understand the functionality, but I'm not sure why it won't at least grab the total month cheers.

viral patrol
#

I think it should load that, but you also may want to initialize "bits"

molten shuttle
#

To initialize bits all I need is "let bits;"

viral patrol
#

Also keep in mind that this data is aggregated from the moment you joined StreamElements

molten shuttle
#

?

viral patrol
#
window.addEventListener('onWidgetLoad', function (obj) {
   let data=obj["detail"]["session"]["data"];
   let bits=data["cheer-month"]["amount"];
});
molten shuttle
#

Ah. Let me try it. Thank you very much btw.

viral patrol
molten shuttle
#

It just says 0. I can't get it to pull up anything. They don't need a JSON field value because I don't need the user to do anything or do they?

#

I am getting the widget to show the value of bits (I think).

viral patrol
#

As for your purpose I would really suggest you CumulativeGoal widget from github and then adjust code to fit your needs.

atomic moth
#

Hi guys and girls. I was wondering if i would be able to edit the official "Contests" widget myself (similar to custom widgets via editor) instead of just fonts etc. or create my own widget? Since i don't really know where/how to start at all, should i better leave it alone? I do know some HTML/CSS/JS, but that whole API thing is new territory for me.

subtle imp
#

hey there, I applied for api usage around 2 months ago (while the form was still active) but I never got a response, any chance I can still get it reviewed?

hardy walrus
#

@viral patrol ^^^^

red viper
#

Hello team,
I’m struggling with an issue in the variations of Sub Alerts. Right now I’m using fields to change the output, although the fields save exactly the same no matter the variation?
Like sub alert is {name} then gifted sub should be {sender} but it seems that when I try to save the variation it changes all of the variations.
I’m using custom CSS btw

naive forum
#

Is it possible to add a browser source as an overlay in a stream elements overlay? If so, how?

digital glacier
plush creek
#

To piggyback on SunsetsBrew's question (he and I are working together on something), we were able to pull multiple types but the min only seems to work for tips

viral patrol
#

@digital glacier https://api.streamelements.com/kappa/v2/activities/:channelId?limit=1008&types=follow&types=subscriber&types=tip&types=cheer&types=host&types=raid&types=merch&types=redemption&types=purchase&minsub=2&mintip=30&mincheer=6&minhost=6

#

@naive forum You can check <iframe src="url"></iframe> but I am not sure if it will fork properly

surreal gale
#

Hey I want to make a picture spin and move around the screen do you know how I can do that ?

viral patrol
surreal gale
#

that would do ! Thx

formal needle
#

I’m not sure where to ask this at but my question is: is there any plans to add trovo alerts and capabilities here for streamelements

red viper
#

is there a way to have the alertbox always showing a background image unless an alert happens?

#

or is the alertbox only shown when an alert happens

strange spruce
#

Hey all, trying to learn how to make a glitch animation in StreamElements for a custom alert. I've been looking elsewhere but I think I've messed up somewhere. Any help would be greatly appreciated!
HTML: <div class="text-container"> <div class="image-container"> <video class="video" autoplay src="https://cdn.streamelements.com/uploads/e74991d7-dc21-40a1-a47a-aac5f4edf758.webm" type="video/webm"> </div> <div> <div class="awsome-text-container"> <span class="username" id="username-container"></span> </div> <p> {{message}} </p> </div> </div>

#

CSS: ```.video {
position: relative;
}

@font-face {
font-family: Hauser;

src: url(\fonts\Hauser.otf);
font-weight: normal;
}

.username {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
text-shadow: 0px 0px 25px black;
font-family: Hauser;
font-style: italic;
}

.username::before, .username::after {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
font-family: Hauser;
font-style: italic;
}

.username::before {
left: 3px;
text-shadow: -2px 0 red;
animation-name: glitch-animation-1;
animation-duration: 2s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: reverse-alternate;
}

.username::after {
left: -3px;
text-shadow: -2px 0 blue;
animation-name: glitch-animation-2;
animation-duration: 2s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: reverse-alternate;
}
/*
@keyframes glitch-animation-1 {
$steps: 20
@for $i from 0 through $steps
#{percentage($i*(1/$steps))}
clip: rect(random(150)+px, 350px, random(150)+px, 30px)
}
@keyframes glitch-animation-2 {
$steps: 20
@for $i from 0 through $steps
#{percentage($i*(1/$steps))}
clip: rect(random(150)+px, 350px, random(150)+px, 30px)
}
*/```

weak sentinel
#

So I am trying to setup stream elements credit roll for OBS...I have it saved the way I want it however all it's showing is the main title and subtitle; its not showing followers, hosts, etc...I have everything checked so it should all be showing up. Am I doing something wrong or is this feature broken?>

tepid hull
#

Is there a variable or api for doing !time in am,pm 12 hr time instead of 24hr time?

The time for (this person) in Sydney Australia is Sunday 13th of September at 3:12pm

Like that.

torn gulch
tepid hull
#

@torn gulch thanks. so how would i actually type it the way i said?

torn gulch
#

@tepid hull message: The time in Sydney Australia is ${customapi.https://decapi.me/misc/time?timezone=Australia/Sydney&format=l%20jS%20\o\f%20F%20\a\t%20h:ia}

tepid hull
#

03:33pm?

#

does it have to have the 0 in front?

torn gulch
#

@tepid hull change the end h:ia -> g:ia

tepid hull
#

sweet thanks for the help πŸ™‚

viral patrol
#

@red viper You can put a static image/video behind alertbox spot.

#

@strange spruce I see that you are trying to use SCSS. Please compile it to raw CSS.

strange spruce
#

@viral patrol sorry, how does one do that?
I’m a noob at this stuff, my b

red viper
#

@viral patrol I have tried that, although the static image shows while the alert is going off. Idk if that makes sense

pulsar willow
#

I've uploaded a file, as .png, how can I refer to it in my code? Is there a thing such as {{uploadeImage1}}?

#

Better yet, is there no way to force streamelements to look up a local directory since it's a widget?

viral patrol
#

@strange spruce I think your code was hosted on jsfiddle, there you can click gear icon on CSS and select "display compiled CSS"

#

@red viper Huh. I may misread that. In that case it is possible, but it would require coding knowledge to make that image disappear when alert is played.

strange spruce
#

Tried that, just says β€œbear with us” for eternity

#

I’ll try again tho

pulsar willow
#

@viral patrol Thanks.

red viper
#

Thanks @viral patrol I have some coding knowledge, I’m just wondering if the alert box always shows or only when an event occurs. Maybe I could add to the icon JS when an alert happens, change the opacity for the alert length.

viral patrol
#

Alertbox is played only on event and then it disappears

#

There are two ways I could think of:

  1. alertbox with green background over image, so when alert appears, background image is covered with green colour which you can remove via chroma key removing in OBS
  2. custom widget that listens to alerts and then hides on new alerts
pulsar willow
#

Is there any way of limiting how far the text can go left (so it doesnt go over the logo)

viral patrol
#

You can set margins of text, so it will be limited to selected area

pulsar willow
#

Oh, where?

viral patrol
#

In text settings, where you set font size/family and so on

#

Margins are in "advanced" tab of that

pulsar willow
#

Ohh thx

#

That only moves the text box somehow.

red viper
#

Thank you! @viral patrol

tepid hull
#

is there a way to fix watchtime from the moment i started actually watching the channel or at least from the moment i started following?

#

only just got streamelements in the channel not long ago so its not working right

hardy walrus
#

Only when loyalty was enabled will it track it afterwards. Nothing before.

tepid hull
#

rip

tired wagon
#

Hello dearest Streamelements Team,

I am a mod on quiet a few Twitch channels and I always try to improove the commands and support them in the best way I can.

Now I've got a problem: 2 Streamers asked me to do a syncdrop command where they only type sth. like !sync in chat and a 5 second countdown in chat appeares like:

Press Battle in 5 seconds...
4...
3...
2...
1...
GO!!

I've seen this in the chat in SwedishLadyC's stream so I know it is quiet possible. Unfortunately she couldn't help me there bc an other person helps her with the commands...

I already searched the great Internets for help and also contacted your helpdesk on the browser site but they refered to this discord.

I would be really greatful if you guys can help me out there

Regards
German

viral patrol
#

Hi! Do you have coding knowledge? If so, you can use jebaited.net proxy service to send messages from custom widget to your chat

tired wagon
#

not yet ^^

tired wagon
#

Hi! Do you have coding knowledge? If so, you can use jebaited.net proxy service to send messages from custom widget to your chat
@viral patrol One last quick question what coding lenguage does this website use? (just so I know the variables I have to use)

viral patrol
#

It is javascript

tired wagon
#

thanks a lot man πŸ˜„

viral patrol
#

Let me rethink this

#
fieldData.token = "thisIsATokenFromJebaitedNet";

const sayMessage = (message) => {
    message = encodeURIComponent(message);
    return new Promise(resolve => {
        fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
            resolve(true)
        })
    });
};

const countDown = () => {

    setTimeout(() => {
        sayMessage("Press battle in 5 seconds...");
    }, 1000)

    setTimeout(() => {
        sayMessage("4");
    }, 2000)

    setTimeout(() => {
        sayMessage("3");
    }, 3000)

    setTimeout(() => {
        sayMessage("2");
    }, 4000)

    setTimeout(() => {
        sayMessage("1");
    }, 5000)

    setTimeout(() => {
        sayMessage("GO!");
    }, 6000)
}

window.addEventListener('onEventReceived', function (obj) {
if (obj.detail.listener !== "message") return;
    let data = obj.detail.event.data;
    if (data.text === "!countdown" && data.nick == userOptions.channelName){
        countDown();
    }
});
#

Something like that

flint sage
#

when I use {tip-latest.amount} it gives me the value as "5" what should I use for it to give me the value as "R $ 5.00"?

wild nymph
#

I was wondering if there was a way to do custom alerts on Streamelements. I'm building a Wordpress Woocommere store, and would love to do alerts for Twitch when someone buys something.

left ice
#

Could anyone in here consider making a widget for a slider? Just text, background and size/speed customisation should do it. The current static text with scroll effect is buggy and does not loop well

novel pond
viral patrol
#

@novel pond AFAIR test alerts update session data for single overlay editor instance, so when you emulate an alert and then reload widget it should have some fake data there.

#

But I am not 100% certain

elder dragon
#

What lx says is correct

novel pond
#

Is it possible to access things like total sub number inside onEventReceived? As far as I've seen it's only inside onWidgetLoad and onSessionUpdate

#

Thanks for that that @viral patrol and @elder dragon

elder dragon
#

Yeah you cant get that on event received

#

But onSessionUpdate is fired on most events except messages and buttons

#

I think

novel pond
#

That's what I thought but when it just ran, it never updated πŸ€”

#

maybe there is just a flaw in my onSessionUpdate even though it's identical to onWidgetLoad

#

and likewise, is there a way to get a hold of fieldData inside onSessionUpdate?

viral patrol
#

You can cast fieldData to global variable so you can access it within onSessionUpdate too

#

And about accessing label data - check "Ultimate text widget" on #widget-share

novel pond
#

Thanks for the heads up on the text widget

#

Figured the global var bit out, thanks πŸ‘

digital glacier
#

Hello, I am working on a shared widget "Video on command by Benno" and it looks like the script is parsing data for subs to be recognized in the userstate, but it was never implemented in the next part (where you can select from the drop down menu), I tried just adding another userState.sub to the ==vip section but it doesnt seem to be working, is there a quick fix for this someone could help me with? ``` //Preparing userState object containing all user flags
let userState = {
'mod': parseInt(data.tags.mod),
'sub': parseInt(data.tags.subscriber),
'vip': (data.tags.badges.indexOf("vip") !== -1),
'broadcaster': (user === userOptions['channelName'])
};

if (!allowed) return;
if ((userState.mod && userOptions['managePermissions'] === 'mods') || ((userState.vip || userState.mod) && (userOptions['managePermissions'] == 'vips')) || userState.broadcaster || (userOptions['otherUsers'].indexOf(user) !== -1)) {
    let video = $("#video");
    let source = $("#source");
    allowed = false;
    video[0].pause();```
viral patrol
digital glacier
#

hmm it looks like that is using the same way that the script is getting info already, so wouldn't || ((userState.vip || userState.mod || **userState.sub**) && (userOptions['managePermissions'] == 'vips') work if I wanted to include subs in the 'vip' permission

viral patrol
#

Yes. Wheel of fortune uses updated version of the script we did with Benno

#

but it is easier to play with "which user should be able to execute command"

#

because of if/else statements being split to separate lines

digital glacier
#

ah ok, I will see if I can stumble through implementing that instead of the older one,

#

I tried just adding the userState.sub section and it did not work

viral patrol
#

Hmmm. Strange. It should work then from what I remember this code

digital glacier
#

this is what I added to try and test, I made sure I have the vip field selected when testing. I can get vids to trigger from the broadcaster, mods, and VIPs, but not subs. ``` //Preparing userState object containing all user flags
let userState = {
'mod': parseInt(data.tags.mod),
'sub': parseInt(data.tags.subscriber),
'vip': (data.tags.badges.indexOf("vip") !== -1),
'broadcaster': (user === userOptions['channelName'])
};

if (!allowed) return;
if ((userState.mod && userOptions['managePermissions'] === 'mods') || ((userState.vip || userState.mod || userState.sub) && (userOptions['managePermissions'] == 'vips')) || userState.broadcaster || (userOptions['otherUsers'].indexOf(user) !== -1)) {
    let video = $("#video");
    let source = $("#source");
    allowed = false;
    video[0].pause();```
viral patrol
#

Seems like it doesn't detect subs. Let me check something

#

'sub': parseInt(data.tags.subscriber) || data.tags.badges.indexOf("founder")!==-1,

digital glacier
#

a ha!

#

the account I am using is a founder account

#

bada boom! @viral patrol πŸ™ πŸ₯³

viral patrol
#

OK. So now I can go to sleep. Everything is working for everybody :-).

#

I am happy I stayed bit late today, so you can go forward with your project.

#

Also - if you are self-confident enough with your stuff - I invite you to our code gurus community!

digital glacier
#

haha oh no, I am a learner, I am all copy/paste right now

elder dragon
#

It's really cool! We get a free hoodie ;)

viral patrol
#

But you know what part you should copy paste. Check my initial widgets on #widget-share

#

There were copy of GPL stuff from github with some listeners I created for SE.

#

And boom. Whole widget-share started like that.

digital glacier
#

touche.

viral patrol
#

We got amazing people like Coocla above πŸ˜‰

elder dragon
#

😊 You're making me blush

pure trellis
#

Hey peeps, is there a way to have a dynamic roll command? i.e. !roll # and that # gets put into the random function? Tried with a response of ${sender} rolls a ${random.1-${1}}! but didn't seem to work.
I'll just do it via custom script

wild nymph
#

I was wondering if there was a way to do custom alerts on Streamelements. I'm building a Wordpress Woocommere store, and would love to do alerts for Twitch when someone buys something.
@wild nymph

silk pebble
#

Hi, is there a way of getting the SE chat bot in Twitch to spam a message multiple times with 1 command? (Not a Timer) πŸ€”

snow olive
#

Hey! Can anyone help with css/js PepeHands idk if this will make sense because I’m kind of lost myself, but I’m having trouble finding a way to trigger an animation for an event list in css/ js , im want different animations for the different month subs, 1,2,3,6,9,12. I’ve already added a listener for bits, donations, and follows, but the only field I see for subscribers is β€œsubscriber-latest” I’m trying to have different variations of subscriber months for the reaction animation but there’s only 1, i can’t figure how to put it for specific months

viral patrol
#

@wild nymph Check widget share channel for charity widgets. With coding knowledge you can alter that to fit your needs.

#

@snow olive You can use event.amount to add different styling for row like <div class="sub-${event.amount}">

simple cove
#

Im sure this has been covered before, but I was looking for a way to add a command that would pull data from say steam? So if I had a command called !DBD for example, they could type that in the chat and it would pull say the play time from the steam API and present it in an output

weak sentinel
#

I am trying to get the Credit Roll widget to work correctly in OBS Studio. I have added it as a browser source and it scrolls only with the title and subtitle. It does not display followers, hosts, etc. There is no widget select option in my version of OBS. Can someone point me in the right direction?

earnest karma
#

I'm live streaming work on open source. I'd like to have some gamification. For example, closing of issues in a Github repository would trigger a pretty animated message on the stream that says "issue #412 closed; 10 open issues remaining" or something like that. Before I go diving into the API documentation β€” I thought I'd ask here β€” what's the easiest way to achieve this?

pliant flume
#

Hi, I'm looking for a bot or a plugin for OBS that acts as a listener & chatter from the broadcaster account to give auto vip to anyone that reddems a channelpoint reddem or give mod from a command only avalible for moderators

#

Is there any "easy" way to make itΒΏ

winged epoch
#

!elo

viral patrol
#

@weak sentinel Widget selection is in "layers" tab in left panel. Once you click it, you should have "Settings" tab below. Also when you see just title and subtitle the most likely reason is that you have "shutdown source when not visible" not ticked in browser source settings in obs

#

@earnest karma You can create JS listener to track your github events. And fire alert when there was a new one.

pliant flume
#

Yup, o see... But actually I want a way to control remotly the broadcaster account by chat commands to give VIP and MOD's roles

high quartz
#

I am currently using a JWT token from my client for local testing. But for production this seems insecure since it is a non expiring, full access token. From the docs I see that there is a oAuth endpoint available, but where can I register my app to get the clientID, clientSecret?

hardy walrus
#

@high quartz oAuth applications are closed atm.

high quartz
#

Ah alright, Thanks for the reply. But I guess in the future that would be the approach? Do you guys have a schedule on oAuth?

hardy walrus
#

The process is being reworked. Beyond that no clue as that's outside of my paygrade access.

simple cove
#

Im sure this has been covered before, but I was looking for a way to add a command that would pull data from say steam? So if I had a command called !DBD for example, they could type that in the chat and it would pull say the play time from the steam API and present it in an output
@simple cove Not sure if this went unnoticed and fyrewire did help me once before, but I can not seem to tag him?

viral patrol
#

@mild cipher ‴️ SEheart

sour tulip
sage shell
#

Hi, is there API for pushing song request into queue?

mild cipher
#

@simple cove You'll want $(customapi.https://decapi.me/steam/hours/STEAM_0:0:237242754/381210) as a command response

#

@sour tulip replied to you in the other discord, should be resolved now blobsmile

simple cove
#

@mild cipher Thank you. I will test now

charred vortex
#

Hi everyone

I'm trying to create a custom widget and i would like it onWidgetLoad it find the last event (be that last follower, latest sub, whatever). i know i can get it to access specific ones with follower-latest etc, but i want the super last one. how do i get that?

thank you

timber lark
#

@viral patrol Thanks for the Trivia Game! Any idea why ZnakeTTV did not win this round? He was the first one with the correct answer

timber lark
#

I also recognized that after you give to many wrong answers (like spaming all possible answers), you are somehow excluded from the game completely?

viral patrol
#

I think I found the issue there. Preparing a fix

timber lark
#

Nice!!

viral patrol
#

Fix is ready. You were right - game was like "Wrong answer and you are out for future questions". This issue has been fixed.

#

If you want to update your code instead of reconfiguring widget. Add:

contestants = {};

Here (Line #136):

timber lark
#

Thx! I'll do that!

timber lark
viral patrol
#

OMW!

viral patrol
#

@timber lark it is fixed now. Also I fixed a possible issue with messages that contain "/" character

timber lark
#

thx!

viral patrol
#

Thank you for telling me about those problems.

hexed ridge
#

nice widget :) lx
some kind of cooldown would be nice for the "everyone can start questions"-mode. so everyone can do it when they want but not spam it for example.

Also could i suggest two modes? not sure if "easily" possible, when i got time could try to do that myself

  1. "audience joker" - like in "who will be a millionaire" everyone can vote. and depending on the chat vote they all win or all lose.
  2. "everyone can answer" - everyone can answer the question and everyone with the correct answer gets points
void coral
#

hi. where can i find documentation on widgets javascript api?

viral patrol
#

There's one hosted on github => channel topic

void coral
#

oh i didnt see it

#

you know if channel points events are triggered?

viral patrol
#

Twitch channel points can be listened to when redemption contains user message

void coral
#

mmm

#

i see

#

ty!

void coral
#

In addition, is there a way to make custom commands in an advanced way, as using webhooks or something similar?

viral patrol
#

Yes. You can call external calls for services that accept GET method and reply with plaintext.

void coral
#

how can i config that?

viral patrol
#

You need server side script that will reply to your request.

charred vortex
#

assume user1 cheers 100 bits. then he cheers another 100. is there a way to have the alert say user1 - 200 instead of 100?

also, assume user 1 cheers 100 bits, then user2 cheers 101, then user1 cheers another 101. is there a way for the alert to say user 1 - 201?

assuming they are not the top bits

viral patrol
#

@charred vortex unfortunately it is not possible to display alltime tips/cheers amount within alertbox. It is possible in aggregates (like top cheer/tip labels, top list)

charred vortex
#

how about if its not alltime? is there a way to get it from the session?

viral patrol
#

You could create a widget that stores this data and acts as alertbox, but you will need to write that from scratch

charred vortex
#

so it would have to keep track of every event of the session, then check the array for similar events GWgoaThinken

#

speaking of events, I'm trying to create a custom widget and i would like it onWidgetLoad it find the last event (be that last follower, latest sub, whatever). i know i can get it to access specific ones with follower-latest etc, but i want the super last one. how do i get that?

#

i dont know how to save the last event from eventReceived and then get it back next time onWidgetLoad

viral patrol
#

@charred vortex you cannot forward from onEventReceived to onWidgetLoad as onWidgetLoad is triggered only once - on session load. You can do it the other way around, by storing value in global variable (like you should store fieldData or channel data, which is emitted only once)

void coral
#

You need server side script that will reply to your request.
@viral patrol I was asking if from streamelements you could configure a command for having calles a webhook on my own

viral patrol
#

SE bot can send calls to your webhook. SE from the other side doesn't have public webhooks.

charred vortex
#

it might not be the best way to do it, but what im doing right now is im using the data from onEventReceived, putting that in an [] and using a while loop with a switch that has different cases for each type of event (follower, sub etc)

theoretically it then puts it in a global variable but i dont know how to call it at the onWidgetLoad, but i dont know how to define the global variable so that its not overwritten on load

i just want to keep the last event for the next time the widget is loaded

void coral
#

SE bot can send calls to your webhook. SE from the other side doesn't have public webhooks.
@viral patrol and then... how can i configure that call?

viral patrol
#

Like ${customapi https://your.webhook.url/?user=${user}}

void coral
#

mmm

viral patrol
#

@charred vortex All global variables are removed on widget load as script is reinitialized.

#

(Keeping track of 2 conversations got me)

void coral
#

oh great, i didnt see it on variables... really i didnt expect it that easy!

viral patrol
#

@void coral this is bot variable

charred vortex
#

so there is no way to take an event from onEventReceived and store it for next time the widget loads. is there a way to call it like follower-latest but like whatever that last event was

viral patrol
#

You can use SE_API.store() method

charred vortex
#

so onEventReceived * do whatever * and then store the last event using that GWgoaThinken let me check that and i'll be back. thanks lx GWjiangLoveHeart

viral patrol
#

And onWidgetLoad get that stored object

charred vortex
#

yup

charred vortex
#

@viral patrol im back πŸ˜… i havent figure out how to do it yet. even trying to set the value gives me an error. i just copied the line from the github and put it inside the onWidgetLoad to check if its working SE_API.store.set('keyName', obj);

when i try to .get the value it gives me a 404, obviously, since there is nothing there

viral patrol
#

You cannot save whole event, but you can store data.detail

charred vortex
#

so it should be SE_API.store.set('keyName', data["follower-latest"]["name"]); for example?

viral patrol
#

Wait. Why do you want to store that value as you have it in session data on widget load?

#

I thought you wanted to store something else

charred vortex
#

i want to save the last event and use it the next time the widget loads.

#

what i mean is, from the time the stream starts until it ends there are going to be a number of different events. i want to save the last one and use that the next time the stream starts. i cant know if it was a follower, a sub, cheer or tip so i need to store that somehow and then get it back

viral patrol
#

You can check obj.detail.recents then. It has 100 recent activitie, just sort them by date (to be sure) and pick latest one

#

Just like you have custom eventlist widget and limit displayed events to 1

charred vortex
#

i will try it out. thanks again!

charred vortex
#

I did it! PogChamp thanks @viral patrol

sick bluff
#

Do y'all happen to have a list of html span references for things like [sender]?

For example, [name] is <span id ="username-container"></span> but not all of the variables are intuitive

viral patrol
#

@sick bluff Contents of <span id ="username-container"></span> is done by JS, where you can see {name} as templating variable

sick bluff
#

Yes, but I'm not looking to change the contents, just to get the variable itself

#

ah well, JS it is i suppose. Blech.

viral patrol
#

You can create a <div class="yourClassName">{name}</div> and it will be filled with username

sick bluff
#

ah, ty

sick bluff
#

LMAO I could have just used {{sender}}! Oh goodness, I did a dumb

lusty star
#

Looks pretty quiet in here but I have a somewhat urgent last-minute question. I have zero experience and I'm trying to repurpose the wonderful "Level Up Goal" widget to include everything, not just tips. I've been picking apart and repurposing other widgets to get it right but subscriptions are troubling me. Trying to get them to add their actual value i.e. $5 for a single tier 1 sub works fine. But gifting a tier 1 sub does so at double the value, and emulating a single gifted sub seems to return NaN on the bar. I am so lost if anyone has any resources 😭 EDIT: For clarity. EDIT 2: It appears my doubling value was a clerical error on my part, not sure how but it appears fixed. The "Gift" emulate button still seems to be broken, however.

pulsar willow
#

Hello, I have a question regarding chat commands...

I've noticed you cannot input your own custom variables to custom commands. I'm looking at adding a prediction system implemented into my streams where viewers can type in the chat for example: !predict {number input from chat} and have the command say "{user} made a prediction of {number}".

Could this be a possible variable command that could be implemented into for the future?

Thanks.

viral patrol
#

@lusty star gift events have gifted as amount unless it is an initial community gift, which has exact amount of given subs

#

@pulsar willow ${user} made a prediction of ${1:} but it doesn't check if user entered a number

pulsar willow
#

@viral patrol That's it!! Thank you!!!

lusty star
#

@viral patrol Excuse my ineptitude, does that mean that it's impossible to tell if someone gifts a multi-month to a specific person. Say like, 6 months of tier 1 sub? I can do it manually if need be. Thank you so much for your help!

lusty star
#

Well, I've just learned that the emulated alert button doesn't cover a bunch of stuff and so it's definitively broken my widget an hour before going live. Someone hold me πŸ’”

leaden bay
#

Hello Guys, are there any future plans for the widget editor's api to provide the profile photo and latest game from a the user who send
a message for example?

silk pebble
#

Hi, anyone know of a way to make a command that costs a variable amount of points, or maybe a way of having a custom command that just gives their points to StreamElements?

viral patrol
silk pebble
#

@viral patrol oooh, at 1st glance this looks cool. i have 2 quick questions before looking into it too much. 1. Am i able, as a mod, to set up tokens, or i would need to walkthrough the streamer to have them generate a token? 2. a minor thing, but can the response output be ${pointsname} and not points?

viral patrol
#

Unfortunately it cannot reply with ${pointsname} But you can do ${customapi https://api.jebaited.net/addPoints/JEBAITEDTOKEN/${sender}/${random 0-500}?format=amount} ${pointsname}

#

As you can see ?format=amount replies with just points amount

#

And creating tokens as a mod - it is not possible unfortunately. Only a streamer can login into jebaited

silk pebble
#

@viral patrol ah ok, great. so if i can convince them to login to jebaited and get a token, once i have that token they wouldnt need to be involved further, right? πŸ€”

viral patrol
#

That is correct

silk pebble
#

@viral patrol Where can I go to read more about the syntax of those links, such as using the transferPoints tokens? I dont want to keep bothering u with questions. πŸ€”

viral patrol
#

When you click on scope name you will see syntax

silk pebble
#

@viral patrol ooh ok. what is targetChannelToken though? is this not for transferring points from 1 user to another? πŸ€”

viral patrol
#

it is from transferring points from 1 channel to another

#

For transfer between users you can use default command

silk pebble
#

@viral patrol hmmm yeh ok. i thought if it was from 1 user to another i could have it send points via ${1} from the user of the command to StreamElements, sort of creating a customized !give command. oh well

viral patrol
#

You can also use those endpoints from custom widget too (not just bot command). Like bank heist game.

silk pebble
#

@viral patrol so my main goal was to try and let a user type something like !bet 100 which would take 100 points from them and store that bet in a urlfetch, and i would then use a separate command to do stuff with their bet.

viral patrol
#

So I would really go with custom widget to handle all of it

silk pebble
#

@viral patrol hmm ok. im not that advanced with programming yet. maybe i can teach myself how to do it shrug

leaden solstice
#

I’m working on custom alerts in Stream Elements using css coding. Is there anyway way that I can make text that goes past a certain length become a smaller font size?

E.g over 15 characters goes to 40px instead of 60px. Or is there something else other than px that would work for this in Stream Elements. It has to work in stream elements thank you.

viral patrol
graceful stirrup
#

Hey there, I have some problems with my custom widgets.

  1. I have a customized credit roll widget. Once started it rolls the text. But if I switch the szene and wanna go back and see the whole text roll again, it only continues since the last opening. How can i reset it with scene switchting via OBS? The only way I found is too clear the browser cache manually in OBS.
  2. I have an alert box widget an additional customized widget for subgift alerts on the same overlay. In my tests in SE the customized widget does, what I want. But on my Twitch stream via OBS it didn't, it only shows the alert box events. I don't know, what to do or how to debug this :(
    Thanks for helping me!
viral patrol
#

@graceful stirrup

  1. Check "shutdown source when not visible" checkbox in Browser Source settings
  2. you can use console.debug() and change console settings to verbose mode
graceful stirrup
#

@viral patrol Thanks.

  1. Tryd the first tip, but it don't work.
  2. My problem is, that the widget works with the emulate function in the overlay editor, but if anyone gifts really on stream, it doesn't. So if I want to debug it with this way, users have to gift...
viral patrol
#

@graceful stirrup if you are about direct gifts, you can replay them from activity feed

graceful stirrup
#

@viral patrol Okay, I found the problem for my second issue. There are differences between the emulate API responses and the real API responses...

viral patrol
#

And first issue - if shutdown source when not visible doesn't work (it should regather data and restart widget) maybe your OBS cache is somehow scuffed

#

Clear this directory when obs is off %AppData%\obs-studio\plugin_config\obs-browser\Cache

strange spruce
#

Hey all

#

Trying to make before and after duplicates in CSS, but i can't refer to the content of the actual username class correctly in my sub alert

#

Here is the CSS part im concerned about```.username {
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
color: #ffffff;
font-size: 200px;
text-shadow: 0px 0px 25px black;
font-family: Hauser;
font-style: italic;

animation: fadeIn ease 8s;
}

.username::before,.username::after{
content: attr(id);
position: absolute;
text-align: center;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
}

#

the ID part just refers to a string literal called "username-container"

#

how else do I call the username?

lusty harbor
#

i need help with unlinking youtube and linking twitch

high swallowBOT
#

@lusty harbor 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.

manic hound
#

Trying to fetch the list of "watch time" as per the documentation but keep getting this response: { _total: 0, users: [] } – Any ideas? Using JWT + axios on NodeJS

#

Ugh. Figured it out. In case it helps anyone, the channel parameter has to be the ID and not the name of the channel.

frank lake
#

How would I go about grabbing and storing data on every emote used in a chat? Would I need to create a bot for this that would monitor the chat?

thorny rover
#

Is there a widget that will allow me to create an alert that is more than 60 seconds long?

earnest karma
#

@earnest karma You can create JS listener to track your github events. And fire alert when there was a new one.
@viral patrol sounds great. This JS listener β€” in what runtime is it running? I'm missing the implied context.

leaden solstice
#

@viral patrol I can’t seem to get it working

viral patrol
#

@frank lake Hi. Emotes are grabbed in chat by our bot and you can find them on your chat stats page. If you want to do something else, you can use emotes only chat from #widget-share account πŸ™‚

#

@earnest karma Custom widget is CEF running iframe, so whatever works in your browser should work in custom widget too

#

@thorny rover You can create something like that in custom widget (write alertbox from scratch), but this will require you to write own queue system as AFAIK default one cannot be on hold for more than 60 seconds.

timber lark
#

@elfin arch Any chance, that we can get additional sources for your image reveal game? I found one pokemon game and one pokemon+other characters game. One without pokemon would be nice πŸ˜‰

leaden bay
#

It's ok to do ajax call in the overlayer editor?

unkempt sleet
#

Hey, i am wondering how i would go about getting follow and donation events through nodeJS, i have looked at the examples and they dont seem to help much

viral patrol
#

@leaden bay It is absolutely OK to use XHR calls in custom widets

#

@unkempt sleet examples in github hosted docs are for overlay custom widgets that are using internal events that cannot be listened externally. You can use websockets to listen to events from your local nodejs, but you will receive raw events only (and no chat events, you need to listen via other tools like tmi)

unkempt sleet
#

so the raw events include donations and follows?

viral patrol
#

Tips are for sure. I am pretty confident Twitch events are forwarded too.

unkempt sleet
#

oh so anything that streamelements outputs via websockets will come through?

#

would you happen to know a good npm for websockets? ive been trying a few but i dont know what arguments i need to connect and authenticate

viral patrol
unkempt sleet
#

thats browser socket io, it doesnt work the same in nodeJS

#

actually sorry maybe it does

viral patrol
#

I do know that this is browser socketio, but it will work in node as well

#

You just need to declare io as requirement of socketio library

unkempt sleet
#

ahhh i think i found how to make it work

"const io = require('socket.io-client');" is needed, not just "const io = require('socket.io');"

#

thank you for your help

#

oh, it seems to have authenticated no problem, but im not getting any logs out when chat message or follow

viral patrol
#

Chat message won't emit an event, you need external library for that. But follow should be emitted and caught by socket.on('event', (data) => {

unkempt sleet
#

oh my bad, my terminal seems to be bugging, it worked! thank you so much!

viral patrol
unkempt sleet
#

thats ok im using TMI for that, i thought it might be included, follow seemed to work, thanks anyway

viral patrol
#

You're welcome. Glad I could help.

silent osprey
#

oh, i was wondering something, is it possible for a bot with mod permissions to accept redeems in the queue? i am not sure how to word these things to find it in the api
unless there is nothing

viral patrol
#

Are you referring stream store, twitch points or queue system for viewers to play a game with streamer?

silent osprey
#

lx, sorry, i should have been clear! i meant channel points, the twitch points

#

i am receiving the redemptions via pubsub and wanted my bot to process certain ones

viral patrol
#

Unfortunately bot cannot process them, you can use custom widget for it, but by default we receive only events with user text provided

silent osprey
#

oh, okay, thank you, lx!

flint mirage
#

if i wanted my uptime output into a google sheet, where would i put the variable in this code?

#

function doGet(request) {
var ts = (request.parameter.ts || "").trim();

if (ts == '') {
return ContentService.createTextOutput('you need to give me something to do!');
}

SpreadsheetApp.getActiveSheet().appendRow([ts]);

return ContentService.createTextOutput('highlight saved at ');
}

#

i would guess i'd add it to function right?

#

or would it be in "SpreadsheetApp.getActiveSheet().appendRow([ts]);"

lofty wigeon
#

Is there a way for me to send the shoutout command through the sendmsg api for my channel? For example:

#

so it comes through okay, however, the command is not actually executed.

hardy walrus
#

@lofty wigeon bot can't send commands as itself.

#

Spam prevention.

lofty wigeon
#

hmmm ok...

#

is there an end-point for me to get the user's Last Game Played?

#

I had been looking through the Kappa API Doc and didn't see one jump out at me.

lofty wigeon
#

ohhh DUH... oof... was looking through SE api... not twitch... sorry about that. Thanks πŸ™‚

simple cove
#

Is there anyway that the shout-out command can be modified to shop an image on stream? So example it calls an alert which I can customise to fit with my brand?

#

I’m not talking about the widgets though as I find these a little restrict with no experience

elfin arch
#

@timber lark I don't plan on adding anymore to it. But if you want you can use the database and image files from the github as a template if you like to make yourself a custom image list. Best images are 800x800 square (the game will stretch them to that size). I can help with the db file if you have a folder of images with the answer as the filename

haughty atlas
#

Hello! I wanted to know if there is anyway to disable a specific streamelements chat response. Currently I have sfx set up so that when someone types w command like !oops a sound plays. However every time some one uses the command the chat bot responds with β€œuser successfully redeemed oops for 0 points”. I’d like to disable that specific response if possible

hardy walrus
#

Unfortunately not.

haughty atlas
#

Thank you for your response @hardy walrus Is there another way to utilize sound effect commands without using the store?

hardy walrus
#

Not from what I can think of

haughty atlas
#

Ok thank you!

cedar kiln
#

i noticed that date field for custom widget always get parsed to full date, if i need only yyyy-mm-dd, what should i do?

#
    "type": "date",
    "label": "Since",
    "value": "2020-01-01"
  },``` current code
pulsar willow
#

hi

supple thicket
#

Hey! Any way for the amount of months you've been subbed to show with the alert text?

terse delta
#

Hi, is anyone here using the kappa v2 apis? I didnt find on the documentation how to get the client_id

pseudo siren
#

What you need do? πŸ™‚

terse delta
#

Im trying to get the list name of everyone who entered in a giveaway

#

on the website ui, it just show the last 100 users

#

so, do you know how to get the client_id ?

#

is that client_id the same one on twitch dev website?

pseudo siren
terse delta
pseudo siren
#

maybe @viral patrol know more πŸ™‚

terse delta
#

the link you sent me is requiring 2 parameters, -> channel_id and the jwt token

#

so I stil need that channel_id

pseudo siren
#

yes

#

its your streamelements account id

#

you can found it in settings

#

or give me your username on twitch

terse delta
#

my username is japapito

pseudo siren
#

JAPAPITO's StreamElements account ID >>> 5bd68784d4c015e7d0e41a30

high swallowBOT
terse delta
#

i already tried that accountId it is still not working

#

the JWT bearer token is that long one right?

pseudo siren
#

yes

#

do not share it here, just FYI πŸ˜‰

terse delta
#

can I send you on pm?

#

cause Im setting the bearer token and the channel_id

pseudo siren
#

no, i dont need it

terse delta
#

however it still doesnt work

#

Im trying to use the postman to simulate the requests

pseudo siren
#

what tool you using for it?

hardy walrus
#

Postman

pseudo siren
#

oh, yes

#

@terse delta do you want 'List giveaway participants'?

terse delta
#

yes

pseudo siren
#

one sec

terse delta
#

I assume as you can get my accountID you can also take my JWT Token right? so could you try to run that api using my JWT token to check if it is my request problem?

pseudo siren
#

can i know giveaway ID?

terse delta
#

I just created one, the giveaway ID is on the url?

pseudo siren
#

yeh

terse delta
#

Im not sure if that id is the correct -> 5f6a13762cd4dfbf8c5ce27f

#

it should return 0 right?

#

as there are no users there

pseudo siren
#

do you have any oldest ?

terse delta
#

No

#

If you want we can try the another api, that just return the list of giveaways I created

#

but none of them are working

pseudo siren
#

ok, if you trust me, DM me your jwt token

terse delta
#

sure

#

let me send you there

terse delta
#

Hey guys, is there a way to get ALL the entries of a specific giveaway? I just go the last 100 entries using the kappa v3 api

viral patrol
#

They are paginated, you need to use ?offset=100 for next calls

terse delta
#

Oh I see, so if I have 400 results, I will need to do offset=100, and then offset=200, and then offset=300, because the limit is 100?

viral patrol
#

That is correct

terse delta
#

thanks lx, thats solve my problem

terse delta
#

the limit offset and limit is not considering the parameters

viral patrol
#

Hmmm. Seems like /entries endpoint doesn't accept neither limit nor offset

#

Reporting that forward

terse delta
#

ok, I will create a bug ticket for that. If that fixes, I will be able to finish my bot

#

thanks lx

rough edge
#

Hi guys! Hoping someone can help me out here. In a Twitch channel, we have a !quote command with multiple entries. Such as !quote 10 would output some random reply that we have set as a command. I am successfully pulling the command list via a GET request with https://api.streamelements.com/kappa/v2/bot/commands/channel/default - this shows me I do indeed have the quote command. But is it possible to return the responses themselves?

viral patrol
#

@rough edge There is no API nor frontend for quotes management.

rough edge
#

Darn! Thanks for letting me know, I appreciate it. May have to just manually input what I'm wanting to do.

hardy walrus
#

How many quotes do you have?

viral patrol
rough edge
#

@hardy walrus around 40. Basically I'm writing a Python bot for my Discord server. The initial check of the bot would've added the found quotes to my database which could then be automatically added as commands to my server.

#

I will check that out @viral patrol, thank you! I'll try to think of some alternative solution here.

tiny tusk
#

@hardy walrus is there a way how i can add time and temperature to the overlay? and if yes does it need serverpower?

viral patrol
#

@tiny tusk for time you can check #widget-share - there's a widget for clock. For weather, you may want to google for "weather widgets", those are made for websites, but they should work in SE as well.

tiny tusk
#

thank you!

leaden solstice
#

@viral patrol the text fitting issue doesnt work, I copied the code exacty from the git hub and now nothing works

viral patrol
#

The code from github is an example code with fitty.js usage. Of course you will need to adjust code to your needs.

leaden solstice
#

i understand this and I changed what I need, however, it doesnt fit within the specifed area

viral patrol
#

You can check if the specified area is correct by setting border to the styling. Also check if word-wrap display are proper

tough plaza
#

Hey guys, i was wondering if there were any tip goal trackers where u could upload a gif or something that moves as u fill up the bar (for example goku doing a kamehameha where the distance of the kamehameha extends as the tips increase)
i looked in widget share and cant find anything

pliant flume
#

Hello, is there ani api link "easy" to use to get the current playlist of spotify ur listening to?? I mean, I want it to make a chat commands πŸ˜„

hardy walrus
#

@pliant flume There is not as spotify isn't something we can do much with.

#

Partly as their ToS doesn't allow you to play music on stream.

pliant flume
#

I mean, there is an endpoint fro devs from spotify

hardy walrus
#

But that requires more than a simple link to grab the information.

uneven skiff
#

i was told to come over here for documentation for making custom css overlays in stream elements. i want to know what things i can use like {color} {image} or now what I'm stuck on is how to change the animation. is there a list of all the available stuff we can use when making custom overlays?

uneven skiff
chilly moth
#

Okay, I think I've figured out my event list... but could anyone please tell me how I see where all my images that are uploaded to stream elements are saved, in order to access the URL for my event list elements?

viral patrol
#

You can create image-input field in "FIELDS" tab, that will create templating variable with your image URL. You can use it directly in code. Check Overlay Editor docs in channel topic.

#

@uneven skiff Also for you, full list can be found in github hosted docs.

chilly moth
#

@viral patrol I'm not asking how to get the image into my code. If i upload an image to stream elements, so that it shows up as an option when I say "change image" for the standard templates. If I'm making something custom, how do i see a list of all the images I've uploaded to stream elements, and get the url for them, so that i can input them into the code? Such as to make a variable containing the url.

viral patrol
#

@chilly moth As I mentioned above - you need to create image-input field and refer to it in the code. You can check #widget-share channel for real life examples

chilly moth
#

It would help if i could do a search on the full documentation for the image-input you mentioned, but i cannot see a way to do this. I cannot find out where it is in the drop downs. My apologies, but I have complicating matters in my life right now that make things extra difficult, and I'm finding stream elements extremely difficult to work with, which is setting off my mental health. "It's here, go find it" doesn't help someone who knows next to nothing about coding when the location I'm feeling directed to doesn't have anything searchable that i can find. I do appreciate the help, please don't get me wrong. But I'm a touch unstable these days, and while I usually am good at figuring stuff out on my own, my brain isn't working as it usually does.

#

Is there anywhere I can get the documentation as one large text file so that it is searchable? Not so it's broken down into several pages and drop downs? To make it more accessible.

viral patrol
chilly moth
#

Ok. Thank you. When i clicked the channel name at the top on my phone, all i saw was a link that took me to a page with drop downs. It wasn't fully searchable

#

Okay, that is either not what I'm looking for, or I can't see in that documentation how to view the image list. I suppose I'll just have to keep calling my background images from stream labs

viral patrol
#

There is information about image-input and calling a value either as templating variable like ({background}) or via onWidgetLoad fieldData.background

chilly moth
#

Like I said. I know next to nothing about coding. Someone else made my event list for me in the past. I've gotten it semi-working just by pulling the image files from stream labs, and messing around with the size numbers... so I might just stick with that

viral patrol
#

For example create a code that has FIELDS tab:

{
"image1":{
  "type":"image-input",
  "label":"Select Image"
}
}

and HTML:

<img src="{image1}">
chilly moth
#

how does that know which image I want?

viral patrol
#

You will see image selector in fields

chilly moth
#

I'm possibly just too out of it to see it. I try typing that all in and don't see anything like an image list πŸ€·β€β™€οΈ I'll just keep working the way I have, using the URL from the upload to stream labs

pulsar willow
#

Hello all, Im an Hybrid on IT and im looking for resources to start creating my first steamelements widget.
I'm looking for info like, witch IDE is the best to dev a widget, how can I test the widget, questions like that

viral patrol
#

The best way to start is to get a widget from SE github or #widget-share channel and play with it to get comfortable with SE environment

pulsar willow
#

thanks a lot! ima start reading β™₯️

chilly moth
#

Well.... hopefully stream labs doesn't cut off the access to the images, but I have success, just have to finish it for all the different event types, and maybe a few small tweaks

viral patrol
#

You can create fields like @chilly moth

{
    "follower":{
      "type":"image-input",
      "label":"Follower Image"
    },
    "sub":{
      "type":"image-input",
      "label":"Sub Image"
    },
    "tip":{
      "type":"image-input",
      "label":"Tip Image"
    }
}

and then instead of actual URL of your images use {follower},{sub} and so on

chilly moth
#

How does Stream elements know which image goes for the "tip" image?

viral patrol
#

You select that file then

chilly moth
#

That's where I'm confused

viral patrol
#

What do you have in fields rn?

#

Is it empty?

chilly moth
#

I don't know the URL. And everything I've tried from what you've shown, hasn't given me a list

#

I hardcode the background image into the CSS

viral patrol
#

Do you have anything in FIELDS?

chilly moth
#

Yes, all the default stuff for creating an event list

#

I'll have to post the code later

viral patrol
#

Would you mind if we jump for a screenshare session?

chilly moth
#

I don't have time right now. I spent all morning trying to figure out how to get my image URL.. I have to go to a dentist appointment now, then work

#

I'll post the code real quick if I have time after getting ready

#

Or right now.. because I'm OCD...

viral patrol
#

Sure. Please use jsfiddle for HTML/CSS/JS and pastebin for fields

#

So there's no huge spam on this channel

chilly moth
#

I can do screenshots if you want. I have no idea what those things are

#

Otherwise it'll be after work

viral patrol
#

You can dm me with it

chilly moth
#

because again, time constraints. I need to be out the door in half an hour and haven't even eaten yet

high quartz
#

Can somebody maybe point me in the right direction to achieve something like this with the kappa api? I am trying to implement this widget with JS on my site. So far I gathered that Streamelements is collection the subscriber data "manually" since twitch does not provide this via their api..

hasty ember
#

Hey guys, is it possible to connect to a websocket for listening to events. For example i use Twitch PubSub API to do something in Java code when a channel reward is used, i want the same just for donations. Thanks for every answer.

hasty ember
#

@viral patrol Thank you i will check this out!

woven zinc
#

I'm trying to integrate an external donation service and would like it if it could trigger the animations that are already set up.
Is it posible? So far I have this, but it doesn't trigger the animation like an emulated tip does. Thx

socket.on('event', (eventData) => {
  triggerDonation(eventData.message[0]);
});

const triggerDonation = (data) => {
  const emulatedDonation = new CustomEvent("onEventReceived", {
    detail: {
      listener: "tip-latest",
      event: {
        event: {
          type: "tip",
          name: data.from,
          message: data.message,
          amount: data.amount,
          currency: data.currency
        }
    }
  }});

  window.dispatchEvent(emulatedDonation);
}
elder dragon
#

Any way to go around this

#

More info

#

removed bearer and url

gray crow
#

Regarding the roulette widget, I need assistance with this part: Provide jebaited token (botMsg and addPoints) in middleware settings I have the token, noooooo idea where to put it.

pastel saffron
#

I'm having trouble making adjustments to an existing widget that cycles between recent events. I can't figure out how to extend the time between cycles and also the words aren't going down far enough before they vanish. And I have no clue how to get a white box with round edges behind it...

#

I'm also a pleb when it comes to programming

viral patrol
#

@elder dragon the solution for this is to host some of the JS libraries externally.

#

@pastel saffron Which widget are you talking about, maybe tag widget author here, so the best person will be able to reply to you.

pastel saffron
#

thats probably not gonna work since it's harris heller, but my friend and I figured out that the best thing is to use something else. But we don't know how to work with the stuff. Trying to get an image to bounce in and bounce out with the text for a recent event cycle

viral patrol
#

This one uses the same engine as ultimate text widget from widget-share

pastel saffron
#

Yeah I'll check it out

pastel saffron
#

this looks infinitely easier to work with

pastel saffron
#

uhhhh replacing the € with $ for the text breaks the everything for some reason

#

and I'm not in the code

high quartz
#

Sorry to ask again, but I can't figure out how to pull subscriber data from streamelements. Subscription duration to be specific. I would like to include the StreamElements Leaderboard on a website.

rough edge
#

Wanted to update on my quote management API question - I decided the best course of action was to simply scrape the quotes manually and add them to my database. From here on I will just have a custom Twitch bot in the channel at all times running a listener for added quotes, which will then automatically update to the database as well.

arctic saffron
#

anyone know where lauynch overlay is?

#

i dont see it

high swallowBOT
#

@arctic saffron 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.

willow plank
#

I have tried my name "mrbetaskull" and "_id" from the channels reference as well as ProviderId

elfin arch
#

are your sending JWT token in the header or using an API token?

#

you won't be using your name as the Auth; but could use the JWT

willow plank
#

I am using the JWT

#
window.botMessage =(message)=>{
  let callback = $.ajax("https://api.streamelements.com/kappa/v2/bot/mrbetaskull/say", {
    async: false,
    cache: false,
    dataType: 'json',
    method: 'POST',
    data: {
      message: message
    },
    headers: {
      "Content-Type": "application/json",
      "Authorization": `Bearer ${JWT}`
    }
  }).responseJSON;
  console.log(callback);
}

What I'm running

#

The response I get

#
{"statusCode":400,"error":"Bad Request","message":"Bad Request"}
elfin arch
#

ya; not familiar with that code; but it would not be your name, it would be the ID

willow plank
#

I tried _id and ProviderId, so I am asking What ID I need?

#

It just says "channel id"

elfin arch
willow plank
#

Same response as above

#

Not the "Overlay ID" either

elfin arch
#

it's been a while; give me a min; i'll check

willow plank
#

I am coding for someone else, so in the end I do not need my own channel id, but need to test all works first. I'll wait for your reply, please @ me

viral patrol
#

I tried to use your code and it seems like it doesn't send POST but GET request

willow plank
viral patrol
#

Hmmm. Strange πŸ™‚

#

Ohh. Your channelId is wrong as I can see on your screen

willow plank
#

@viral patrol Yes, it is the Channel ID I am trying to figure out -What- channel ID I need to use, have tried 5 different id's by now

#

When I look the documentation it just stated "channel id", but now what id or where I can find it, so I have met a wall I can't climb here

viral patrol
#

It is _id from channels/me endpoint

willow plank
#

same error

viral patrol
#

Erm.. One more thing - where do you want to use it

#

As storing JWT in place that can be reached by somebody is dangerous

willow plank
#

I is behind admin-login for the user I code for, the key is locally stored outside public scope

#

Its just, no matter what id I try, I just get bad request response

viral patrol
#
const JWT="asdasdsad";
const channelId="5aeacfc6b680301301dcb164"
fetch(`https://api.streamelements.com/kappa/v2/bot/5aeacfc6b680301301dcb164/say`, {
  "headers": {
    "authorization": `Bearer ${JWT}`,
    "content-type": "application/json;charset=UTF-8",
    "sec-fetch-site": "same-site"
  },
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": JSON.stringify({"message":"test"}),
  "method": "POST"  
});
#

So I think that with jQuery it may work like:

    method: 'POST',
    data: JSON.stringify({message: message})
elfin arch
viral patrol
#

So it seems like the JSON should be a string. Not an object

willow plank
#

json.stringify made it all work

#

That is not easy to see by the documentation, but it works now!

viral patrol
#

This is jQuery fault

elfin arch
#

LX is a God

#

right next between Mars and Atlas

willow plank
#
window.botMessage =(message)=>{
  let callback = $.ajax("https://api.streamelements.com/kappa/v2/bot/58ceee8a19981e3fde2a5eb2/say", {
    async: false,
    cache: false,
    dataType: 'json',
    method: 'POST',
    data: JSON.stringify({message:message}),
    headers: {
      "Content-Type": "application/json",
      "Authorization": `Bearer ${JWT}`
    }
  }).responseJSON;
  console.log(callback);
}

How I ended up changing the one line, now it all works

viral patrol
#

I wonder why it doesn't parse data as object when you have dataType: 'json',

elfin arch
#

thank you for posting the final; working code πŸ™‚

willow plank
#

I don't know, but glad it worked out, now I can soon deliver the code. Thanks for the help!

viral patrol
#

@willow plank You can also use safer way to send messages - using MITM proxy service like jebaited.net (there is an single scope privileged api token)

elfin arch
#

100% as mention before TWICE don't use your JWT!

viral patrol
#
const sayMessage = (message) => {
    message = encodeURIComponent(message).replace("%2F","%2525");
    return new Promise(resolve => {
        if (fieldData.token.length !== 24) resolve(false);
        fetch(`https://api.jebaited.net/botMsg/${fieldData.token}/${message}`).then(response => response.text()).then((text) => {
            resolve(true)
        })
    });
};
willow plank
#

What would my client have to do to change what?

viral patrol
#

So basically your client would have to register on jebaited.net (it uses OAuth, so it is way safer than exposing JWT). And provide just the token generated there.

#

As for example - JWT leaks, people can interact with API. If token from jebaited leaks, it allows only to send messages via bot and nothing else.

willow plank
#

so in case something goes bad, do they go back to jebaited and change oauth or?

viral patrol
#

And they can delete token on jebaited.net (as they can reset JWT on SE website). But until reset happens, leaked jebaited api token will produce way less damage

high quartz
#

Could the same be used for fetching tips? I quickly logged in for testing but am unsure about the scopes:

viral patrol
#

@high quartz getActivities should allow to do that. With same syntax as there's on SE API

high quartz
#

perfect! thank you. I only use the JWT from a node backend api. But still, I think this is the better approach

#

How secure are requests from a backend service in such a case? I am unfortunately no expert on the subject..

viral patrol
#

@high quartz ```js
let url = 'https://api.jebaited.net/getActivities/' + fieldData.token + '?grabAll=1';
url += &before=${Date.now()};
url += &after=${Date.now() - totalSeconds*1000};
if (fieldData.enablefollower) url += &types=follow;
if (fieldData.enablesubscriber) url += &types=subscriber;
if (fieldData.enabletip) url += &types=tip;
if (fieldData.enablecheer) url += &types=cheer;
fetch(url).then(response => response.json()).then(events => {
//something
});

#

If you are using it for only yourself and nobody else has access to your token, it should be OK.

#

And machine security - it all depends on sysadmin.

high quartz
#

I see, so the token is as safe in the backend as the server the app is running on basically

viral patrol
#

Yup.

willow plank
#

Is there a documentation page for jebaited?

viral patrol
#

All requests are GET, and you can see endpoint info when you click on token type

high quartz
#

Thanks for your help man! And sorry to spam a bit, but I tried to figure this out for a while. Do you know if there is a way to get subscriber duration from streamelemetns API? I opened a new idea, but if it already exists I don't want to generate overhead.

willow plank
#

So all I need to do it GET-Request on https://api.jebaited.net/botMsg/:scope/:escapedMessage and assume escapedMessage is urlencode or rquilevant?

viral patrol
#

message = encodeURIComponent(message).replace("%2F","%2525");

#

Huh... the URL pasted by you is wrong https://api.jebaited.net/botMsg/:scope/:token/:escapedMessage

willow plank
#

:token was just set top botMsg already

pseudo siren
#

Hello :)
Is possible to put accesstoken in URL? like ?accesstoken=xxxx

viral patrol
#

@pseudo siren in SE API or jebaited?

pseudo siren
#

SE

viral patrol
#

I am not aware of anything like that for SE. It requires access token in Authorization header

pseudo siren
#

okay, so not possible

#

thx

dull mist
#

hey all! i'm a front end dev just starting to dip my toe into the world of custom code for streaming with se. does anyone have any recommendations on resources for getting started? i'm hoping to just start with some custom alerts before i get into anything more complicated

hardy walrus
#

@dull mist channel topic should help.

elfin arch
#

welcome @dull mist! and ya what sudo said is the best info for getting the data/triggers. I used to make things in codePen and just copy-pasta it over, changing the trigger to call the function πŸ™‚ good luck, and I hope to see what you can do with the overlays

radiant jungle
#

I have settings set up for an alert but when I turn on the css editor it automatically overwrites what I did even tho I only need it to put everything in caps

viral patrol
#

@radiant jungle custom css is always from scratch. If you want to have just uppercase text:

radiant jungle
#

okay thanks

simple cove
hardy walrus
#

@simple cove unless there is a middle man to obtain the data I don't think so.

#

And as he's the owner of that API it wouldn't to ask him about doing that. @pure drift ^^^^^

simple cove
#

Thank you - Hopefully he will see the ping and get back about it - would be a cool little feature

pure drift
#

Currently there are no plans for supporting Epic Games. I'm not even sure that data is publicly accessible via their API

simple cove
#

Ok thank you - I will have a look around and see if I can find anything

hexed ridge
#

Is there a way to open the editor for the default chat widget?

#

cause i got some css and html that someone made for another platform and i wanted to adjust it so i can use it in streamelements

hardy walrus
manic saddle
#

Good morning! I'm looking for a developer to help a nonprofit client create custom hand-entered donation alerts for OBS and incorporate design / video animations we'd create. We looked at using Tiltify but their take is too much so we'd like the ability to hand-enter donations into the API. There's a few other shoutout / leaderboard / scoreboard functionality we're looking for as well. DM me if this is something you have interest and experience in creating.

manic saddle
#

By the way this will be a paid project obviously. Hit me up!

silent osprey
#

hello, is there a way to get all viewers in a channel/stream via irc or helix?

hardy walrus
#

@silent osprey Looking at twitch docs doesn't appear or I'm blind.

silent osprey
#

yea, i tried looking too, but i could not find anything and hoped i would be blind too and someone knows better

hardy walrus
#

Also could ask in the /r/Twitch discord. Discord. gg/twitchsubreddit

#

In their dev channel. Know they'd have a better set of answers for ya.

near wharf
#

como puedo poner el bot en mi discord ?

naive sorrel
#

Hey, is there a way to perform API actions via a connected web socket?
I'm just wondering if I can do everything through the socket or if I need to have both in order to perform actions and get event notifications.

naive sorrel
#

On more question: I'm trying to connect via web socket on a Node.js application but I'm not getting an 'authenticated' event.
I'm following the example shown here: https://docs.streamelements.com/docs/connecting-via-websocket-using-oauth2
(Adjusted for Node.js.)
I do get a 'connect' event.
It also seems strange to me that the example says "You would need a schema file" and provides one, but none of the code in it uses said file.
Maybe that's what I'm missing?

viral patrol
#

@naive sorrel Hi. authenticated event should happen after you emit authentication. Probably you are trying to authenticate via OAuth, but do you have oauth credentials?

naive sorrel
#

I am.
I use it to connect to Twitch via tmi.js, and that works.

viral patrol
#

And json schema is a file that is a "manual" for emitted events.

#

Oh. This is different OAuth token. tmi.js uses Twitch API OAuth, for websockets with configuration as on website you linked you need to use SE OAuth2 token.

#

You can use JWT instead with the structure i linked above.

naive sorrel
#

Oh, I see.
Ok, I'll use that then, thank you.

#

Yes, that works. πŸ™‚

#

Hmm, I'm not getting events for messages though.
Is the event for messages called "event"?

viral patrol
#

Messages are not forwarded from twitch. You can listen to native SE events there

naive sorrel
#

Oh, ok.
The documentations lists "message - New chat message received" on the "On event" section so I thought it sent updates on chat messages.
Is there some event I can use to test the connection that doesn't require an additional Twitch account or tipping myself?

viral patrol
#

Ohh. JSON schema lists "message" but it is a string that contains user provided message for events like tip/cheer/sub

naive sorrel
#

No, not that.
This:

viral patrol
#

And testing events - I think you can add tips from here https://streamelements.com/dashboard/tipping/list - if you click "Add tip" and select "imported tip" it will emulate session update and event events (but it will recalculate tipping aggregates on your account).

#

And the screen above - this is for "custom widget" and onEventReceived listener there, so within your overlay you don't need to use additional chat connections.

naive sorrel
#

Yeah, I figured it was for overlay widgets only.
The web sockets documentation page links there for the structure of events, so it's a bit of a shame that it's different than you'd expect, but no biggie.
I don't actually need to see messages anyway; I just want to test the connection and see the data of some event message.
If I add a fake tip and then delete it, will it bring it back to the way it was before or does it change some aggregate values permanently?

viral patrol
#

Structure of real time events is described in JSON schema file. Structure of session update is as on github docs. It could be a JSON schema file too (and maybe it even should).

#

And about aggregates - I haven't tested behaviour of that. I think that session reset should recalculate your aggregates

naive sorrel
#

Alright, thank you.
One (hopefully last) question: Is there a way to get notified for store redemptions?
I don't see anything about that in the documentation besides API get/update/delete methods.
Do I need to periodically poll the API for the latest redemptions for it?

#

Oh, I see that the schema specifies that data.items is an array of redeemed items - maybe that's related?
There's no event type listed for that though...

viral patrol
#

I think it should be emitted too, but I haven't checked it before.

naive sorrel
#

Gonna give it a test and see if I get anything.

viral patrol
#

Keep my fingers crossed!

naive sorrel
#

Ok, yes, it does emit an event. =)
Type 'redemption', as one would expect.
It's missing from the schema, might want to add it.
Funnily enough, it does not give an "items" property, but rather a "redemption" property with the name of the item redeemed.
Guess the docs are a bit outdated about that.

elder dragon
#

Is it possible to check for every type of reaction instead of only likes for facebook?

#

As of now we have videolike-latest on onEventReceived but I'd like to be able to get all 7 types of reactions

broken coyote
#

like share, n stuff?

elder dragon
#

Nah so facebook allows you to react with 7 different emotes (One of them is videolike which is covered by se as "Like Event")

#

These ones

broken coyote
#

ahhhhh. that would get bonkers. i see some streams where those things fly up the screen

charred vortex
#

What is the difference between .gifted, .bulkgifted and .iscommunitygift in layman's terms? 0_PotatoSweat so far i have my widget check if the eventReceived .tier = gifted and if true check the amount, but i dont think thats what i need, simply because the alert plays amount times

if i had to guess, .gifted is person a gifting to person b specifically, but what about the other two? GWgoaThinken

#

now it plays the gifted part and then plays the same alert x times depending on how many gifted subs it was, but they all have the same name..

viral patrol
charred vortex
#

Right, i forgot to mention that i'm looking at that right now

#

.gifted - if this is a gift event for viewer
.bulkGifted - if it is INITIAL event of community gift (${event.sender} gifted ${event.amount} subs to community)
.isCommunityGift - if it is one of community gifts train (${event.sender} gifted ${event.name} a sub as part of random giveaway!)

#

i dont understand the difference

#

is .bulkgifted and .iscommunitygift a sub category of .gifted?

viral patrol
#

Example scenario. You have community gift of x>=2:

  • .bulkGifted is emitted once
  • .isCommunityGift is emitted x times (for each viewer that received community gift)
charred vortex
#

so i use .isCommunityGift if its 1 sub and .bulk if its more than 1 so i dont get multiple alerts GWgoaThinken

viral patrol
#

And if you don't want to play additional alerts - check if isCommunityGift is true

charred vortex
#

I dont get it. i do 1 gifted tier 1 and it says gifted = false i do 5, same thing. i press community gifted and then it says bulkgifted = true but gifted = false HR_WaitWhat

#

and if i dont press the community button on the custom alert it says bulk = false and gifted = false

viral patrol
#

Sub gift of 3:

#

As you can see - next 3 have gifted set to true

charred vortex
viral patrol
#

I added console.log to custom widget, to analyse events

#

And expanded that event

charred vortex
#

okay, let me try

viral patrol
#
window.addEventListener('onEventReceived', function (obj) {
    if (!obj.detail.event) {
      return;
    }
    if (typeof obj.detail.event.itemId !== "undefined") {
        obj.detail.listener = "redemption-latest"
    }
    const listener = obj.detail.listener.split("-")[0];
    const event = obj.detail.event;

    if (listener === 'subscriber') {
      console.log(event);
    }
});
charred vortex
#

okay, so bulkgifted is the action of gifting multiple subs and then .gifted is a tag to separate actual subs from gifted GWgoaThinken

#

i dont have much time now, but something like this seems to be working

#
                if (data.isCommunityGift) {
                    console.log("it do be a gift doe");
                      break;
                }
            
                if (data.bulkGifted) {
                      $("#botText2").text("Gifted");
                    amount = data.count;
                }```
#

assume there are other things below this

viral patrol
#
                if (data.isCommunityGift && data.amount>1) {
charred vortex
#

I will work on it more when I have time. Thanks

open ice
#

Hi there! I was wondering if anyone could point me in the right direction?

I am essentially trying to have it so that if a user redeems something with points, it redeems a random item in the store of the same value

100 lp for any 100 lp item in store. Is that possible?

TLDR ive been inspired by scottfalco and want to add a minigame to the stream where a viewer can redeem an item and a random "effect" will happen.

open ice
sturdy rover
#

Hi, super new here, first post - I've written a bit of code that calculates what time of day it is and compares it to preset time stamps , displaying the correct string per time of day for adding as a browser source on stream. Since it's not using any API calls, does that constitute a widget or not?

charred vortex
#

Example scenario. You have community gift of x>=2:

  • .bulkGifted is emitted once
  • .isCommunityGift is emitted x times (for each viewer that received community gift)
    hey @viral patrol, im still having trouble with the code. the problem is that i check for the .bulkGifted, which fires once like you said, but then there are all the other gifted subs that it checks and stalls the entire widget.

i might not be doing the queue system right.. what i do is onEventReceived i check if obj.detail.event.isCommunityGift is false and if it is i push the obj.detail.listener to an [] then use the first event from the queue in a switch. is there a better way? thanks upsideLove

valid falcon
#

is this the right place to ask questions about the embedded overlay dev tool on the site?

dreamy musk
#

hello! total noob on the server. I was wandering where I could find information/documentation to code my own widgets if possible. Thanks!

hardy walrus
#

@dreamy musk Channel topic

viral patrol
#

@sturdy rover Widget doesn't have to use any API. It just needs to be helpful for streamers πŸ™‚

#

@charred vortex If you have widgetDuration property set, you need to resume queue prematurely on events that are not parsed by widget by resumeQueue method of SE_API.

livid agate
#

I created a simple twitch bot that does calculations based on chat activity, word counts etc., could these statistics (that I currently have locally in my node process) be integrated into my stream layout with streamelements, maybe in the form of a widget?

#

basically what in asking is that can i send custom data to widgets

viral patrol
#

@livid agate Of course, but remember, that widgets are sandboxed, so they don't have access to local storage nor cookies.

#

You can receive data in widget via XHR calls.

livid agate
#

perfect, thanks

charred vortex
#

@charred vortex If you have widgetDuration property set, you need to resume queue prematurely on events that are not parsed by widget by resumeQueue method of SE_API.
@viral patrol I do have a widget duration set. I just need to figure out what the rest of your message means and try to use that go fix my problem KEKW thanks

viral patrol
#

Seems like attached example is something that is close to your setup πŸ™‚

charred vortex
#

@viral patrol yeah, i saw that, i just didnt really understand the whole resumeQueue thing. I will look into it more salute

spare knot
#

Hello. Is it possible to receive message when song was skipped? Event or something like that.

pulsar willow
#

Incase a alert requires me to change the font via CSS, which line should I look for?

charred vortex
#

@viral patrol yeah.. i dont know what im doing here. i think my queue "system" is not good enough

blazing tartan
#

Hi so I have and overlay in streamelements thats 720p and I want to make a 1080p one so I copied the 720p one and now I grouped all my layers, I can move them around as 1 but I want resize them as one. How can I resize them as one?

west herald
#

does anyone have a couple mins to slide into my DMs regarding parameter usage for switching scenes via chat.

websockets are connected, yet i cannot seem to get the
$OBSscene("<scene>") to do anything at all. edited for update...

no dm needed..but some help is appreciated.... i have the parameters installed through my chatbot software and when pinging the $OBSScene from chat... it's simply returned to the chat.

lusty harbor
#

how i setup a song playlist

viral patrol
#

@spare knot I am not really into websockets, but I think that event should dispatched emitted there.