#dev-chat

1 messages ยท Page 6 of 1

distant garnet
#

Add or remove points from user
but can i remove points from user? KEKW

#

if this whole thing exist, why doesn't SE have locally ran version for streamers who don't mind keeping it open locally? you know, some people keep other kinds of bots open at all times anyway, wouldn't be THAT much of an issue to have local bot app with more access and direct use of API...

severe shell
distant garnet
#

well, only reason i don't use something like firebot is just because i started with SE, like my little things (kappagen, already existing leaderboard, fact that it works with emotes from bttv, ffz...) i will check streamer.bot, but so far all i want is just very little extra from SE itself, not a replacement for it

#

heck, if there was option to build my own modules (i understand massive limitations would have to exist for that and probably be paid), i'd be willing to actually do that for my own little needs

#

speaking of kappagen... since like 3 days ago my stream deck kappagen buttons seemed to just stop working... think it's SE plugin on elgato deck itself that's borked and if so, where you think i should report that little issue? or that's a third party thing and in no way or form affiliated with this place?

still juniper
distant garnet
#

yeah, but... like... then i have to also host it somewhere or make it run on my streaming device and make sure it always is connected properly and... idk... it's 2023, i want technology to catch up ok?

still juniper
#

I honestly don't understand your issue. If you're fine with a locally running SE app (that's what you're asking for, right?), why aren't you fine with a locally running own app/script for whatever you need? Technology is very caught up, it's just a design decision

distant garnet
#

honestly, because last time i made a standalone app of my own was solid 10 years ago and at this point there are differences between finding IDE to make my own thing and opening np++ to make 300 line long script that i could paste to local SE app as a new module of sorts.

#

and yes, i'm very self aware of how stupid/shallow my issue is at this point. I just want convenient solution... I like SE for what it is. Not even sure if i could move all leaderboard stuff to other kind of bot even if i wanted to.

potent halo
#

What even is your point here?
If you just want a program to interact with some API (for example SE)
just use widely available programs like Insomnia or Postman.

#

Running the whole SE Suite locally isn't really an option btw. (If that's your point)
For example please look at how donations are handled.
The local version would need to setup a donation page, ok.
But the streamer would need to setup stuff like

  • Port Forwarding,
  • DDNS (dynamic ips like in germany) and
  • Some Reverse Proxy for a custom domain
    And then loading times would be atrocious if your further away and offline donations would be impossible
#

Not mentioning the security risks of opening ports btw omegapepelaugh

distant garnet
#

well, yes, i know that... as for insomnia/postman, had no idea those exist, will check them out

hot trout
#

tbh it's perfectly possible to run most of what SE does locally

#

you'd just need a donation page that integrates with paypal or some other payment processor to be publicly available somewhere, but that doesn't need to be on your computer

#

I've thought of making self-hosted alerts and such but tbh it seemed like more work than it's worth given SE does those things well enough with a little help managing the code

soft phoenix
#

So I have some overlaps made for me just fixed images is there a way that I can import them on the website and add widgets to them or do I need to add them to the obs and upload them as a image layer there and then monkey with widgets and such besides

#

Overlays

arctic folio
#

hey, does anyone know are Streameleemnts are planing to fix Content Security Policy errors in future? It spams OBS log so much that I cant see if there are real isues or not and its all on Streamelements side.

severe shell
bronze coral
#

is it possible to make a sub goal transition into a follow goal and then transition into a bit goal

lilac laurel
#

May i ask you where i can find the type list? it's more exhaustive than the one in the official docs at https://dev.streamelements.com/docs/api-docs/861a5d5450bbb-channel but i'm still missing one thing i want to retrieve that shows up in SE activities (youtube memberships) and i don't know how to find it. Replying to this message as it's the one which helped me figure out everything i didn't get from the doc ๐Ÿ˜… so ty for helping me getting things working so far ๐Ÿ™‚

severe shell
lilac laurel
lilac laurel
# severe shell It is on the page you mentioned.

Your post has the following that are not in the doc :

purchase
attribution
event
event:external [minsub=0 mintip=0 mincheer=0 minhost=0]

(also subscriber is also missing from the doc possible values but is in the doc example right bellow) so i'm wondering where you found your own list with all the event:external as i'm missing the youtube membership one

severe shell
lilac laurel
# severe shell I frequently access the SE dashboard with the browser console open, so I see the...

does the dashboard make the same API calls? i don't have any such alerts myself (i don't stream) i'm doing this to help a friend and having them screenshare and F12 to figure out proved, unfruitful as they're not technical ๐Ÿ˜…

You wouldn't happen to have someone with youtube membership/know what event name it is? i tried at random member members membership memberships but none of those worked and i don't have a sample account to test on with dashboard:(

Also do you know where i should report missing doc info per chance?

severe shell
brave tulip
#

Hey guys, I just have been wondering if is it possible to make transition from one group of labels to another after given interval (just like shown on the video) in the Streamelements itself or I need to make custom script for that? casyHm

severe shell
severe shell
lilac laurel
lilac laurel
brave tulip
lilac laurel
#

Found it, seems to be "sponsor", quite far from "membership" but hey if it works it works! ๐Ÿ™‚

severe shell
severe shell
lilac laurel
lilac laurel
severe shell
brave tulip
#

Oh god, I tried it with TwitchAPI lately but I couldn't set it up properly so I gave up ๐Ÿ˜… Is SE API easier than Twitch API to work with?

severe shell
#

You can also get some widgets in #widget-share that could be similar to what you want and look at the code, so you can modify to meet your needs

brave tulip
#

Thanks for you help ๐Ÿ’™ I have been working only with html a css so far so this will take me ages to do but thanks to your suggestions I will get it... in a few years ๐Ÿ˜…

severe shell
brave tulip
#

At the start of this project I thought it will be a few lines of code but when I opened up Twitch API I got stucked at getting the access token ๐Ÿคฃ But thanks for motivation

#

Aren't you opened for commissions? ๐Ÿ˜…

midnight crystal
#

Hello,
Iโ€™m a stream-champ premium user but Iโ€™m totally confused. Can anyone help me?

potent halo
# brave tulip At the start of this project I thought it will be a few lines of code but when I...

Just a little hint to help you on your journey.
The way to get Access Tokens is VERY similar between some big apis.
The truth being.. they are identical. (The basic way is, there are some differences in details)
In fact they are even so identical that there is an official Way to do it:
โญ OAuth 2.0 โญ
That being said.. Most widely used PL's have some implementation for this "protocol"
Again, I'd love to share a link, but the bot would most likely filter it again. So just google "OAuth2", first site should be a nice read for ya

potent halo
severe shell
# brave tulip At the start of this project I thought it will be a few lines of code but when I...

But you don't need to go to the Twitch API or work with oAuth keys, tokens and authentication or anything like that. If you want to create an overlay, everything is already sent to you on the Overlay Editor, you just need to get the values and show them on screen. A little example for you...
Let's say you have this HTML with the text "This is a test text":

<div id="text" class="text">This is a test text</div>

Let's make the text in it a little bigger and change it to blue, just to have something to see. On CSS tab, we have:

.text {
  font-size: 2em;
  color: blue;
}```
Now we want to change the text to something from SE:

```js
// This first line means that when the widget loads, something will happen
window.addEventListener('onWidgetLoad', (obj) => {  
  // The line below show all the values SE has available to you to play once the widget is load. 
  // You can see it on your browser console (F12 or CTRL + SHIFT + i)
  console.log(obj) 

  // Now we are going to change the text "This is a test text" to something from obj
  document.getElementById('text').innerText = `Latest follower: ${obj.detail.session.data["follower-latest"].name}` 
})```
Now you have a custom widget with the latest follower!

Basically, you have `onWidgetLoad`, `onEventReceived` and `onSessionUpdate`. Each one is aimed to be used in different situations with different values. You will find more information on the link I sent to you.
brave tulip
#

Oh my god, you are amazing casyL

brave tulip
keen silo
#

Hey, hope everyone's doing good! โ˜บ๏ธ At the moment there's no support on customizing Donation Goal widgets right? (I mean with HTML and CSS)

hardy walrus
#

@keen silo short of what you see as is no. Would need to make a custom one.

keen silo
severe shell
#

According to their documentation, it is possible. You need to setup a kit, then add it to the head of your html first.
After that you can add your icons

https://fontawesome.com/v6/docs/web/setup/get-started

brave tulip
mystic jewel
#

Good Morning/Evening! I was wondering if there was a way to show fields based on the value of another field?

candid nebula
#

Hola! Mari_WaveOE

#

Does anybody know if streamelements can interact with with the OBS api directly?

#

I have this follow event thingy I made and I was wondering if I can somehow get OBS to toggle the visibility of a blur effect.

severe shell
# candid nebula I have this follow event thingy I made and I was wondering if I can somehow get ...

You can connect to the OBS websocket to trigger almost anything on OBS
https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requests-table-of-contents

You can use the obs-websocket-js to connect to it, add it to HTML tab
<script src='https://cdn.jsdelivr.net/npm/obs-websocket-js'></script>

Documentation here:
https://github.com/obs-websocket-community-projects/obs-websocket-js

Maybe this can work for you, didn't test it:

const obsPort = 4455
const obsPassword = 'YOUR_OBS_WEBSOCKET_PASSWORD'
const obs = new OBSWebSocket();

await obs.connect(`ws://127.0.0.1:${obsPort}`, `${obsPassword}`)
console.log("Connected to OBS...")

// Get Source Filter info
const filterInfo = await obs.call('GetSourceFilter', { sourceName: "YOUR_SOURCE_NAME", filterName: "YOUR_FILTER_NAME" })
console.log(filterInfo)

// Set filter visibility 
const enableFilter = await obs.call('SetSourceFilterEnabled', { sourceName: "YOUR_SOURCE_NAME", filterName: "YOUR_FILTER_NAME", filterEnabled: true })

This will only work when you have the OBS Websocket enabled (on Tools menu) and the overlay imported to your OBS, as it will make a local call.]

candid nebula
lean imp
#

โœŒ๏ธ

brave tulip
#

Can I somehow link image in custom widget code that is hosted on my Streamelements cloud? casyHm

hardy walrus
#

Yup

#

Quickest way is to get it via dev console of your browser.

mystic jewel
severe shell
brave tulip
fathom thistle
#

omg didn't see this since today, sorry! Thanks a lot for searing, i gonna use it for sure, but I was looking for something that could allow me debug my custom chat widget

hardy walrus
#

Yeah.

#

Unfortuantely as I copied the contents of that verbatim it's not possible.

fathom thistle
#

so... there's no way to develop this kind of widget at vs code and try it locally, it's always passing the code to SE

hardy walrus
#

I don't do this kind of thing so I can't really give specifics of how you'd be able to do it at all.

#

I just took it from a pinned message here nd dropped it onto GH.

cyan valve
#

is there a way to subscribe to the event or pubsub directly through se?

dim hound
#

form.asana is still not working

severe shell
#

You mean this one?

uneven oxideBOT
severe shell
#

It is working for me

dim hound
hardy walrus
#

We have been given a new link. 1 sec

#
severe shell
dim hound
old atlas
#

Hello there, I am trying to get an idea on how to create long multifunctional widget as on the screen . It rotates between subs number and goals with the alerts on the sides. It also changes colors. Can anyone help? Thank you (edited)

dry plover
#

Any news on API access requests? I sent 3 in almost 6 months ago now... One of the three was approved 2 months ago, and have had nothing since, despite all 3 being sent within seconds of each other.

I can't do anything because the two that i'm still waiting on are test environments, and I'm not going to start development on the live environment

#

Also, someone was meant to reach out to me with a StreamElements brand kit, but I never ended up hearing from anyone. Any news on that?

severe shell
dry plover
#

Thanks, I'll send one in ๐Ÿ™‚

keen silo
#

hey people, I'm trying to troubleshoot a simple thing but I'm such a noob! ๐Ÿฅฒ

I can't find out how to center the user text-container in the horizontal axis here's the CSS code for it:

.awsome-text-container { position: absolute; top: 25%; text-align: center; font-size: 16px; font-weight: bold; background-color: #fe4f8a; padding: 8px 16px; display: inline-block; border-radius: 8px; margin: auto; visibility: hidden; opacity: 0; animation: expand 0.5s cubic-bezier(0.02, 0.46, 0.08, 0.98) 3.5s, fadeOut 0.5s ease-out 8s forwards; animation-fill-mode: forwards; }

Anyone can help me out?

keen silo
#

Added:
left: 50%; transform: translateX(-50%);

then removed the animations and now it seems like it's always centered

Idk maybe the animations were creating issues?

lone night
#

Hello guys, I am kinda noob at this but for quite some time I am looking for a way to customize store redemptions overlay much more (as alert overlays). Is there any possible approach? Maybe I am blind, but I can not see "Custom CSS" button or something like that. If you have any idea, you are great! If not... let it go Hmmm

mystic jewel
#

I was wondering if there was a way to edit chat widget code locally? I know about the localdev testing environment but I know chat messages aren't supported.

keen silo
mystic jewel
#

Also, I was wondering why streamelements is being so selective with who gets access to the one-click share.

hot trout
#

there's basically no security built into that so my assumption is they don't want you sending one-click share links to people and being able to then run almost whatever javascript code on their computer

#

so they gatekeep it to people that seem reasonably trustworthy

lone flower
#

My app just got approved after 7 months, lets gooooo!

#

I mean I've had to move to Streamlabs to do my integration by now, but on the off-chance that we'll use SE again in the future, I'm good :)

vital solstice
#

Hello, how do you reference the chat line in css? Iโ€™m using stream elements overlay as a browser source and using the custom css box in obs. The .twitch-chat class works, but .chat-line has no effect. Pls help

floral badger
#

How to share a overlay? (i created something to work together with streamerbot i would like users to be able to install the overlaay with a press of a button

severe shell
#

However, if you want more customizable chat widgets, you can get some from #widget-share

uneven oxideBOT
hardy walrus
#

Otherwise it is not available for general users.

floral badger
#

oke its send

vital solstice
vital solstice
severe shell
vital solstice
tiny lake
#

Hello, I am creating a custom widget and I want to get a random chatter, but I don't know how. Is there any way to achieve this?

severe shell
untold radish
#

Hello there, I want to create a command that counts the time since I updated another command and takes the last information in the description of that command. Example: !test returns "A a | B b | C c" and !timetest returns "C c has been running for X hours and Y minutes". Can anyone help me how to do this?

severe shell
# untold radish Hello there, I want to create a command that counts the time since I updated ano...

Commands in Streamelements are not connected to each other and you cannot run a command to update another command.

You would need to update two commands at about the same time, !test and !timetest. That could be done with an external API with access to your account and permission to modify commands.
So, when you ran !test, the command !test would send information to the external API which would be able to change the !timetest command as well

Not something very complicated to a developer, but it is something very specific and donโ€™t think there is anything like that available publicly.

frigid dagger
#

I'm adding a subscriber count of the month in my custom widget, but it only appear when I simulate sub and I want it to show ever

#
window.addEventListener('onSessionUpdate', function (obj) {
  const data = obj.detail.session;
  
  $("#subcount").html(data["subscriber-month"]["count"]);
  
});
#

this is my code

#

What I do for it show everytime?

severe shell
# frigid dagger I'm adding a subscriber count of the month in my custom widget, but it only appe...

You would also need to add the same data to appear when the widget loads, this can be done with onWidgetLoad. However, there are some bugs on it, especially when the session data is reset. When the data is reset, sometimes some keys are deleted and only recreated after the event happens (i.e. a new subscriber). So it is good to check first if the key exists, so you can add a placeholder in case it doesn't.

window.addEventListener('onWidgetLoad', function (obj) {
  const data = obj.detail.session.data;
  const subscriberMonthCount = data["subscriber-month"] ? data["subscriber-month"]["count"] : 0
  
  $("#subcount").html(subscriberMonthCount);
  
});```
frigid dagger
#

Thanks so much for it!!!!!

#

I tried use onWidgetLoad before, it was invisible now I understand why.

frigid dagger
#

How I show the name of all gifted subs?

lone night
plush dawn
#

i need help with my streamlabs

#

@severe shell

severe shell
severe shell
lone night
languid zephyr
#

tram, Alstom, red thin detail, futuristic mnml design, rtxon, glass Reflections, neon line lighting, hyperrealistic, 8k -

hot trout
#

dall-e is that way ๐Ÿ‘‰

surreal elm
#

Hello everyone, could anyone help me with something I want to do? The thing is that I would like to see the top chatters in my channel but monthly. Streamelements provides the all time top chatters. Is there a way (command, webpage...) to get that info?

severe shell
lapis plover
#

I'm currently trying to make a "Recent Patreon Pledge" label, but no idea onto how. I followed a video for a Patreon Alert, so I would imagine that leads me in the right direction. Can anyone help me?

severe shell
lapis plover
#

SET UP PATREON ALERTS INSIDE STREAM
ELEMENTS

That's the name. I'm trying to make a label to show the name of the most recent Patreon Backer. Like recent follower or highest donor.

severe shell
severe shell
ebon flare
#

I'm sorry I'm getting back to you after so long, some health stuff kept me for a while.
I tried .gifted and I tried .bulkGifted but neither seems to be triggering? It's still adding regular sub events rather than giftsubs.
Also, I tried switching the entire system into a switch as you suggested, but it seems to be throwing an error somewhere? And even VSCommunity doesn't seem to be able to syntax check the code for some reason. I'm probably doing something wrong there.
Would it be ok if I sent you the entire JS? It's a bit long, but I think I can upload a .txt file here.
Thank you again so so much!

hardy walrus
#

If the contexts are too big to send as message it will defacto upload as message.txt

ebon flare
hardy walrus
#

I'm derp when it comes to API things

ebon flare
#

Lmao fair

hardy walrus
#

And are you doing it on the old or new editor?

ebon flare
#

I do also need help in making a sort of multi-array in JS too

potent halo
#

Currently bit busy I'll look into it later

ebon flare
ebon flare
ebon flare
#

I'm just using Notepad++ and then pasting the code into the JS section of the streamelements editor webpage

hardy walrus
#

Old and new editor.

#

The newer one is lacking things docwise but that's being worked on.

ebon flare
hardy walrus
#

Yup that's the older one. Newer one will be what you want to switch to in the future but lot more dev friendly than this one.

hardy walrus
#

same place but elements tab.

ebon flare
#

Interesting

#

@hardy walrus I'm guessing you're like REALLY decent at JS?

#

๐Ÿ‘‰๐Ÿ‘ˆ

hardy walrus
#

I wasn't joking when I said derp

ebon flare
hardy walrus
#

API/Coding is all the same book to me kekwiguess

#

But there's people here who can definitely answer your questions about this.

ebon flare
hardy walrus
#

I came from the SLCB insider knowledge and being able to RTFM swiftSmart

potent halo
#

Not everything in SE requieres coding

ebon flare
#

I'm just trying some final "throwing shit at the wall" type stuff before I send over my code

#

Uncaught SyntaxError: missing : after case label

#

I hate errors that don't give a line number

potent halo
#

strg+f "case"
Somewhere it's just missing a colon

#

Also "multi-array":

var my_array = [[1,2,3,4],[5,6,7,8]];
ebon flare
#

Uncaught SyntaxError: expected expression, got ':'

potent halo
#

huh

ebon flare
potent halo
#

line 69 missing colon + indentation error

ebon flare
#

@potent halo I'm sorry if I'm demanding a lot from you.
I want/need to add gift subs to this, and then as a bonus I need to total the subs and bits and have addEvent run only once per person. So it shows "So-so gifted 6 subs" instead of "So-so gifted 5 subs" and then "So-so gifted 2 subs", for example. Does that make sense? And same for bits.
Ideally each name would show once and then it would list everything that they did during the stream? I think that would be nice.
What do you think?

potent halo
#

line 143 missing ';'

ebon flare
# potent halo line 143 missing ';'

Are you checking these manually? Or do you have a good software that checks for you? Cuz neither the SE editor nor Notepad++ checks errors

potent halo
#

Just manually looking over the code

#

some stuff just peeks out if you have 5 years+ under the hood

ebon flare
potent halo
#

Have enough stuff to do already kekw

#

I'll check your code about that "gifted" not working tho

ebon flare
# potent halo Not doing your work. I'm up for small questions and problems

Not "doing" the work for me, but just telling me what to do after looking at how the code works currently.
Like, I don't even know what code executes when the credits start rolling, to do some array work there.
I just know window.addEventListener('onWidgetLoad', function(obj){} runs when OBS starts, and window.addEventListener('onEventReceived', function(obj){} runs whenever a viewer does something.

ebon flare
hardy walrus
#

You'd be starting from scratch. Only thing that's transfered between old and new is any assets you've uploaded.

ebon flare
hardy walrus
ebon flare
#

Ok ๐Ÿฅบ

#

Cuz the events don't have a "on scene load"

#

I'm used to Unity 3D coding

#

All this SE stuff is new to me

#

And YouTube doesn't help

#

Idk where else to go

wanton cliff
#

I'm not sure where else to post this, can anyone at StreamElements have a look? Is it policy to not provide API access to third party developers? StreamLabs is willing to work with them, creating integrations that allow to make monetization interact with other software than OBS, and I would like to continue using StreamElements for my tips, but it's sad it seems to limit my options in terms of third party software usage!

hardy walrus
#

It's not that we're "Closed" to applications but approval in general has been "fuckywucky".

still juniper
potent halo
potent halo
#

That being said I had a deadline for my project so that's that

still juniper
#

People usually wait months for their approval. Your case is definitely an outlier, and tbh it doesn't speak well for SE. Queues should be respected, but welp.

potent halo
#

Yeah ik. That stuff is not right to do. I'm grateful tho.
Also.. While it's not okay security wise, one could ask the user for their jwt token. And store that securely.
Ik that's bad but hey better than waiting for a year omegapepelaugh

untold radish
ebon flare
severe shell
rustic root
#

Hi devs! I'd like to add the option to harvey's subathon widget to add up time when someone sends a superchat. I've editted the code but its giving me issues, can someone please help in this regard?

severe shell
rustic root
#

The issue is I wanted to the superchat/subs and tips to add time to the timer in this widget. The widget by default is created to be used for twitch. The sub and tips thing was working fine, but bits weren't needed so i replaced them with superchat everywhere, now the code seems to be little broken and isn't serving the purpose.

severe shell
rustic root
#

Can i send you those via DM? or I should send it here?

severe shell
rustic root
hot trout
#

well problem one is you renamed one of your variables wrong, the second superchat_time should be superchat_currency

merry brook
#

Hi Im DinosaurPlayzGames

hot trout
#

also, did you add fields for that stuff?

rustic root
hot trout
#

you added references to fields, to set things like the minimum amount for superchats, but you don't show that you added that to the fields tab

#

if you don't do that (and fix the double-declared variable) it'll break

hot trout
#

did you fix the double-declared variable

rustic root
#

Let me change it, but the way the widget is showing up is broken, i don't know why

rustic root
hot trout
#

you need to change it where all the arrows are

#

you can't declare a variable twice

rustic root
#

But my point is, why the widget is not showing up properly? is that also due to these values?

hot trout
#

yes

rustic root
# hot trout yes

But its still not showing up properly, not the alert, but the widget itself is showing weirdly

hot trout
#

check your console

rustic root
hot trout
#

again check the console

#

it will probably have an error in it

rustic root
hot trout
#

yes

rustic root
hot trout
#

such as?

rustic root
hot trout
#

see if there are any that mention your code

rustic root
hot trout
#

unfortunately streamelements adds a bunch of errors and warnings that aren't actually a problem

rustic root
hot trout
#

there's almost certainly an error in there somewhere that relates to the actual widget

#

you're gonna have to find it and fix it

#

oh I see it already

#

you didn't remove one of the references to bits

rustic root
#

I'll check it ๐Ÿ‘

rustic root
#

@hot trout There were few instances of bits in there and removing them all and replacing them with the superchat variable worked, Thank you so much, i appreciate your help ๐Ÿ˜Š

rustic root
#

It would be really helpful if you tell me what variable should i use for youtube members? I want to add that in this code too

severe shell
pulsar willow
#

I have created a custom overlay for my contests but i cant edit contest overlay only thing i can edit is custom widget but overlay doesnt synchronize with my contests

left rampart
#

Hi all. I originally planned to ask if we had access to Tiltify donations in Custom Widgets because I wanted to add it to my Incentives widget, but Discord search gave me an answer from a year ago.

its because its a 3rd party, meaning that this is the reason we are not exposing those alerts, because technically you can hook to Tiltify on their API as well.

So, I guess I'm just checking to see if this stance has been reconsidered at all? Honestly, it doesn't really make sense to me, considering that almost every event we do have access to is also aggregated from 3rd party APIs like Twitch, YT, etc.

brave tulip
#

Hey, Overlay I made for my friend that I have coded few weeks ago is not updating on obs but it is updating on streamelements site, what should I do?

severe shell
candid nebula
#

Heyo! Iโ€™ve developed a custom widget. What is the best method to share it? Besides just hosting the code and making others copy and paste everything. Is there any plug-n-play solution that streamelements offers?

hot trout
candid nebula
#

Is there no way to just export stuff? Since streamelements does support importing overlays through csv, no?

hot trout
#

unfortunately the only ways that I know of are the above widget share, the share links that aren't generally available, and copying and pasting

#

... that don't involve external tools

candid nebula
hot trout
#

no you can't import overlays using csv

#

just viewer points and watchtime

candid nebula
#

Ouh oki!

#

I didnโ€™t notice that thank you!

summer orchid
severe shell
summer orchid
severe shell
# summer orchid Yha, sadly it does not give any option for "Redemption" interactions. Like name ...

Yeah, that isn't available at the moment. But for the redeemer you can use {name}. As regards the store item name, it isn't available at the moment.

But just to be clear: Channel Point reward is a Twitch item, which is not supported by Streamelements. We are talking about Streamelements store items available here: https://streamelements.com/dashboard/store/items

I would suggest that you go to #elements-editor-widgets20, but I've just seen you posted the same in there.

summer orchid
# severe shell Yeah, that isn't available at the moment. But for the redeemer you can use `{nam...

Yha I posted here first, and later got re-directed to that place, and when someone replies here, I still want to continue the conversation since you in this case took time to reply, and its also possible that you knew something that the other person did not know.

And regarding "Its a Twitch thing and not a SE thing" .. well I dont agree with that.
Because if that is the logic, then SE should not support, Subscriptions / Followers / Raids and so on. (Only Twitch Things)
SE is meant to support what happens on Twitch, and Channel Points are a part of Twitch integration, that SE is adding bonus to.
So SE should definitely support every aspect that is related to streaming/Twitch, IMHO.

brave tulip
#

@severe shell Could you help me with coding "Overlay labels refresh" using On event or On Session Update (which one of them is better) Should I refresh the whole overlay or just those individual labels? casyT

#

Sorry for the ping in advance ๐Ÿ˜…

severe shell
severe shell
hot trout
#

(to be fair, why SE still does not support Channel Points is a reasonable question given how long they have been available)

opaque wasp
#

Inconsistency between SE test events and Twitch events is killing me lately

ancient lynx
#

Hey guys! Wondering if someone can give me a hand here. I am building a custom goal widget, and lets say I set the goal to 10 subs. So, my goal currently counts the gained subs properly but I want to be able to store this number somewhere so let say I have 20 subs right now, and I set the goal to 10 more subs, and in my next stream I gain 2 subs, now I have 22 and 8 remaining to get to my goal, but let's say the next stream I don't gain any sub, still 22 subs and 8 remaining, but how can I store this number somewhere? Because if I use session data, I won't be able to access my first stream data, right? So if in my third stream I gain 5 subs, now I have 27 subs and 3 remaining to my goal. The problem I'm facing is when the widget reloads (because of session update or any other possible scenario), how can I store the amount of subs I am gaining since I started my goal? I thought about using SE_API.store, but not sure if that's the best way, any idea?

#

Also, I set a key in SE_API.store, can I delete that key? I was just testing and not sure if I can do that

severe shell
# ancient lynx Also, I set a key in SE_API.store, can I delete that key? I was just testing and...

You cannot delete the key, but you can change its value the way you want. You can even create a key with multiple keys inside, but every time you change one key, you will need to send all keys again (which is not a problem if you use SE_API.store.get() before to get the current keys and values).

Why not use the GOALS values that are already available in https://streamelements.com/dashboard/session/goals ?
You are right, SESSION DATA will reset 5 minutes after stream finishes, but GOALS information does not reset unless you do it manually.

ancient lynx
sand haven
#

hi! i wanna make my own widgets and streaming elements but i dont know how to code whats a good way to start? i see a lot of cool stuff but im lost

severe shell
brave tulip
brave tulip
#

I was trying to use docs to somehow put it together but I think I am missing something.

window.addEventListener('onEventReceived', function (obj) {
    const listener = obj.detail.listener;
    const data = obj.detail.event;
        if (data.listener === 'follower-latest') {
            document.getElementById('follower').innerText = `${obj.detail.session.data["follower-latest"].name}`
        }
});
ancient lynx
brave tulip
#

It's not updating at all

brave tulip
#

Or it's not working for emulated follows?

ancient lynx
#

I see the mistake here. You are calling your function ย onEventReceived but trying to access obj.detail.session instead to update the follower name. obj.detail.session is accessible from onSessionUpdate event or onWidgetLoad event, so maybe you want to create an object that contains the data from obj.detail.session once your widget loads and then access this obj on every event received, or just access obj.detail.event on every event received, as this also contains some data like name or amount @brave tulip

brave tulip
#

I am not that good at javascript to do that so I need some guidance with that ๐Ÿ˜… I am reading your message for few times now and I am trying to get what are you trying to tell me, that bad I am

brave tulip
#

Okay, I have managed to do that. It's messy but it's working now. Thanks for all the help. If someone want the code I will be more than happy to give them ๐Ÿ™‚

ancient lynx
tepid ocean
#

Hello all, I'm looking for a widget. A kind of counter.
When a defined keyword typed in chat, that counter will go up. (Need some limits, cooldowns etc.) Any idea?

opaque wasp
tepid ocean
pulsar willow
#

Good afternoon, I have a question. I don't know if it's the right place, but I'm having a problem with custom widgets. It turns out that I need a widget to load the information when they change scenes since it is lost. The information is being saved on SE_API store. It is not updating it either even when the widget is loaded (and it has a function that takes care of that, which I already tried and it works correctly but the action is not triggered automatically)

#

I have a command that helps me but I don't like it

severe shell
pulsar willow
severe shell
mortal wagon
#

How on SE do I use images Iv uploaded in a slideshow using custom HTML / CSS / JS

Iv never messed with Field data before.

severe shell
lunar beacon
#

i tried the above code to get an array of recent gifters.. but it doesn't seem to be working. can someone help?

lunar beacon
#

can anyone tell me which object has the array for latest gifted subs??

severe shell
novel isle
#

Hi everyone, please let me know if this question is better for another channel
I am hoping to display my Twitch channel point rewards request queue on stream. Either as an stream elements overlay or through a chat message with a stream elements command. I don't want any actions to be taken, I just want to display the information. Like display what was redeemed and by who and have it listed in order from oldest to newest. Is this something that is possible? I've looked quite a bit online but it seems to be a niche request so I haven't found any videos/instructions. If possible, could anyone point me in the right direction to start?

Right now I use an OBS browser source that just pulls and displays the queue on stream and it looks the same way it would look if the streamer opened up the request queue URL. This is working okay but it doesn't look great and takes up more space than I'd like.
Thank you!

vital wadi
#

how can I check if a message is from the broadcaster? To check for mod I use data.tags.mod and for subscriber I use data.tags.subscriber, but there isn't a broadcaster (or follower) tag. Any tips?

hot trout
#

broadcaster badge?

severe shell
brave tulip
#

I don't know where to ask this but can I somehow set maximum amount of tickets that user can buy in stream store? casyHm

knotty jolt
#

Hi, I'm trying to make command which skips alerts, using custom widget inside overlay. But i can't trigger the event 'event:skip' am I doing something wrong?

const settings = {};

window.addEventListener("onEventReceived", function (obj) {
  if (!obj.detail.event) {
    return;
  }

  const event = obj.detail.event;
  const { data } = event;

  const badges = data.tags.badges;


  if (!(badges.includes("broadcaster") || badges.includes("moderator"))) {
    return;
  }

  if (!data.text.startsWith("!skip2")) {
    return;
  }

  stopAlert();
});

function stopAlert() {
  const emulated = new CustomEvent("onEventReceived", {
    detail: {
      listener: "event:skip",
      event: null,
    },
  });
  window.dispatchEvent(emulated);
}

ancient lynx
ancient lynx
brave tulip
knotty jolt
#

but i have no idea how can i trigger

#

event:skip

thick parrot
#

please let me know if this question is meant for another channel:

I found this Widged Credit Roll
And the Credits are only for the Last Stream is it possible to make it for the last month of streaming?

ancient lynx
knotty jolt
#

console okay, what about alerts do they got skiped?

ancient lynx
# knotty jolt console okay, what about alerts do they got skiped?

What I understand from the SE docs, is that event:skip is just for you to know that the user wants to skip, but not sure if sending the event using window.dispatchEvent will skip alerts by itself, maybe you have to implement that too for the widgets? I'm not really sure about this but

severe shell
# novel isle Hi everyone, please let me know if this question is better for another channel I...

I was looking into that some time ago. As Streamelements does not have support for Twitch Channel Points (unless the redemption has a text message input), that would need to be created. The way I found was using Twitch pubsub websocket connection. As we don't need authentication to read the redemptions, we can connect using a custom widget.

I didn't do what you asked, but the connection is ready to use if you want. When you redeem any channel point, it will show the image on overlay and show information on browser console:

<div id='text' class='text'>Twitch pubsub</div>
<div id='redemption' class='redemption'></div>
* {
  font-size: 2rem;
  font-family: Agency FB;
}

.redemption {
  width: 130px;
  height: 130px;
  border-radius: 50%;
}
azure wave
#

Does anyone know where I could find the badge names for youtube live chat members?

severe shell
# knotty jolt Hi, I'm trying to make command which skips alerts, using custom widget inside ov...

I know how to do it using the API. You can load the channel ID and apiToken from onWidgetLoad and use it on your stopAlert():

window.addEventListener('onWidgetLoad', async (obj) => { 
  id = obj.detail.channel.id
  apiToken = obj.detail.channel.apiToken
})

window.addEventListener("onEventReceived", function (obj) {
  // [...]
  // The rest of your code etc etc etc 
  // more code here etc etc etc
  // [...]
  stopAlert();
})

function stopAlert() {
  fetch(`https://api.streamelements.com/kappa/v2/channels/${id}/socket`, {
    method: 'POST',
    headers: {
      'Content-type': 'application/json',
      Authorization: `apikey ${apiToken}` 
    },
    body: '{"event": "event:skip", "data": {}}'
  })
}
severe shell
severe shell
severe shell
thick parrot
severe shell
thick parrot
severe shell
thick parrot
thick parrot
thick parrot
severe shell
thick parrot
#

i only see 1

severe shell
thick parrot
#

25

#

can you tell me whats here at your setting

#

i never made any changes on tha side thats why im confused

severe shell
thick parrot
#

but do you have it on 25?

#

ok ill try later thanks alot ๐Ÿ™‚

severe shell
# thick parrot but do you have it on 25?

Mine is above 100 (not mine, but one of the streamers I tested the overlay)... This is the counter of how many subscribers you have during that stream. The overlay takes that number and shows the list (with a limit of 25, as it is the limit from SE)

tribal sleet
#

I've been working on a custom widget that shows an animation and the value of a counter that I made with the chat bot.
it works fine but I was checking the browser console and I get this error:
Uncaught TypeError: data is undefined <anonymous> about:srcdoc:193 <anonymous> about:srcdoc:34 bindEvent about:srcdoc:7 <anonymous> about:srcdoc:13
is there a way to know what part of the code is causing that error?
it works fine but I want to figure out why i get that error

severe shell
tribal sleet
#

I know it shows a line number there but those line don't even have code or is a comment
My code is only 87 lines so far.
So that line numbers aren't correct

severe shell
tribal sleet
thick parrot
thick parrot
scenic latch
#

Can't seem how to make the custom widget send respond messages in chat? Anyone know how to do it?

ancient lynx
#

Does anyone know if bulkgifted events are working properly? I am emulating some subs from SE dashboard but it won't show the bulkgifted property in my obj. However, if I do emulate using the emulate bell inside widget, it shows the property, is this a bug or am I missing something?

severe shell
severe shell
scenic latch
severe shell
scenic latch
severe shell
scenic latch
# severe shell Sure, the code in there is open for anyone

Okay, I'm trying to make a custom giveaway widget. But the hardest is to make the subluck feature. Rn I add subs to one array and other to the other and trying to get a random of one of them, but there is more chance it will choose a sub. But it's buggy. - Do you have any idea how it could be better?

severe shell
# scenic latch Okay, I'm trying to make a custom giveaway widget. But the hardest is to make th...

Without seeing what you did, it is hard to know.
I am lazy right now, so I asked chat gpt and after some interactions, this is the result. We put the code to run 100 times to make sure the selection is correct. subLuck is how much the arraySubscribers will be selected compared to arrayUsers. You can remove the loop and adapt to your code.

const subLuck = 2;
const arraySubscribers = ['sub1', 'sub2', 'sub3', 'sub4', 'sub5', 'sub1', 'sub2', 'sub3', 'sub4', 'sub5'];
const arrayUsers = ['user1', 'user2', 'user3', 'user4', 'user5', 'user1', 'user2', 'user3', 'user4', 'user5'];

const numSubscribers = arraySubscribers.length;
const numUsers = arrayUsers.length;
let user = 0;
let subs = 0;

// Calculate the probability of selecting a subscriber vs a regular user
const subscriberProbability = (subLuck * numUsers) / (subLuck * numUsers + numSubscribers);
console.log("Subscriber probability: " + subscriberProbability);

for (let i = 0; i < 100; i++) {
  // Generate a random number between 0 and 1
  const randomProb = Math.random();

  // If the random number is less than the subscriber probability, select a subscriber
  if (randomProb < subscriberProbability) {
    const randomNum = Math.floor(Math.random() * numSubscribers);
    console.log("Selected subscriber: " + arraySubscribers[randomNum]);
    subs++;
  } else {
    // Otherwise, select a regular user
    const randomNum = Math.floor(Math.random() * numUsers);
    console.log("Selected user: " + arrayUsers[randomNum]);
    user++;
  }
}

console.log("Subscribers: " + subs);
console.log("Users: " + user);
ancient lynx
opaque wasp
ancient lynx
opaque wasp
#

I don't know exactly they should be working on those things tho, the docs should be up to date anyway so stick with what you see in there

uneven oxideBOT
#

@honest obsidian โคต๏ธ

Read and follow our server rules:

  • We do not tolerate toxicity! Treat the community team, staff, and all members with respect.
  • No advertisement or channel promotion, anywhere on the server.
  • No NSFW/NSFL
  • No unsolicited DMs or friend requests to server members

Make sure to read the #welcome in any server you join.

mortal wagon
#

Could someone please help me with my custom widget... I suck with JS and don't care if someone steals the code.
https://codepen.io/TheCynicalKitty-the-sasster/pen/KKGBqGp

Its breaking on the 2nd rotation and I don't know why, I was also trying to make it all slide in from the right (border slideshow and progress bar).

On a new Cycle the Progress bar is frozen until the 2nd image.
I also tried to make it so the images would slide ONTOP of one another but well that didnt work.
The WHOLE thing is also meant to slide in from the left not the image

Tried getting chatGPT to help but it made it way way worse XD

gentle barn
#

Hi, how can I share my custom widgets?

severe shell
# gentle barn Hi, how can I share my custom widgets?

You have some options:

In case you are using the new Elements Editor:

Considering you are using the Overlay Editor:

  • If you want to share with the community, you can fill this form: https://strms.net/codeshare
  • In case you just to send to a friend, you can ask him to add you as editor on their SE dashboard.
  • Alternatively, you can use this tool I made to share with a friend just using a simple code: https://seapi.c4ldas.com.br/overlays
scenic latch
#

@severe shell Hey do you know a workaround to send "#" with jebaitet.net? The encoded is "%23" but It don't send in the chat

severe shell
scenic latch
#

I have a funtion like this

function sendMessage(message) {
        var encodedMessage = encodeURIComponent(message)
        fetch(`https://api.jebaited.net/botMsg/${fieldData.jebaitedToken}/${encodedMessage}`)
    }```
Then I just use ```js
sendMessage(`${user} #${arrayUsers.indexOf(user) + 1}`);```
scenic latch
severe shell
#

๐Ÿ™‚

gentle barn
severe shell
gentle barn
hot trout
#

that api exists

#

it's just undocumented

#

I use it in my own tool to put overlays in yaml files as well

gentle barn
hot trout
#

no, if there were, it would be documented

#

it's not meant to be used by other people than streamelements, but it's there if you can figure it out for yourself

frosty timber
#

Hey guys I have a simple (i hope) question but I can't figure it out for the life of me, I am using a rotating feed widget, specifically the alpha rotating feed and for some reason only my tip alerts are capitalizing the users names and the rest are all stuck in lower caps for follow, subs etc

#

Does anyone know how to edit the CSS or the like to fix this?

hot trout
#

there's a problem in streamelements where a lot of the time it uses the user's username (which is all lowercase) instead of their displayname

#

in my alerts I have to specifically ask twitch for it because SE simply doesn't send it

severe shell
severe shell
spice harbor
#

is there a way to get a list of all viewers who joined via a raid?

#

i see obj.detail.listener has a raid-latest event type. not sure if the SE event emulator shows account names.

essentially i'm looking to grab a list of raiders and use decapi twitch avatar endpoint to grab avatars to use in a css animation to personalize the raiding experience and show some love. not sure if that's possible.

spice harbor
#

I used a console log to try to get the information via an emulation event in SE Widget creator. not seeing anything that looks like this. hope this is enough due diligence to ask for help. ๐Ÿ˜›

hot trout
#

it's not possible because twitch doesn't provide that information

thick parrot
#

Im looking for someone who can help me to make the Credit Roll Widget from Session to Recent.

hot trout
#

twitch just added an alerts service of their own

#

but while it lets you use custom html and css, it won't let you use javascript

#

so it's useless to me

severe shell
toxic shuttle
#

Hey everyone. I need some help with editing text on an alert for patreon, any help is appreciated. after following the steps in this video https://www.youtube.com/watch?v=kHXXXF0DYBM, I cant seem to find a way to edit the text through SE overlays editing. I want to change the "all access patreon" text to a different text. I also want to add an image of my choice when it pops up? Is this doable? This is how it looks now without editing it.

severe shell
toxic shuttle
severe shell
toxic shuttle
zenith pulsar
#

Who do we inform about inaccuracy in the Session Data Reference?

#

I'm sure anyone smart enough to be on this page would know what the variables are, but doesn't hurt to fix it if it's easy to do.

tiny kindle
#

How do you compress a link to a single word, like if I wanted it to say โ€˜click hereโ€™ and the โ€˜hereโ€™ is a link somewhere.

zenith pulsar
#

In Markdown language?

#

HTML would be

<a href="URL">Word</a>

#

I don't know what you mean, but those are the common ones that come to mind.

tiny kindle
zenith pulsar
#

There is a page for HTML on custom widgets, but I think you need to give more explanation about what you're trying to accomplish.

tiny kindle
# zenith pulsar There is a page for HTML on custom widgets, but I think you need to give more ex...

Iโ€™m trying to add from twitch chat this message: Nuke carries are being suspended for now as ${channel} focuses on Ranked and !giveaway. In the meantime, you can explore the Looking for Squad channel in the discord here https://discord.com/channels/1036439290802094170/1064259350123778088

I just want the โ€˜hereโ€™ to be a link to that discord channel instead of the entire link to be displayed. Obviously on discord itโ€™s not showing the link, but on twitch it does and I donโ€™t want the link visible.

zenith pulsar
#

I don't know if that's possible in chat due to cybersecurity. The only link replacement I've seen in chat is via Amazon where they link to Prime and other stuff. It'd be problematic for anyone to post a transformed link because people are pretty stupid.

#

Myself included.

severe shell
gentle barn
#

Hi, How can I change the preview image of overlays?

zenith pulsar
#

I'm trying to make a custom credits scene based on "Credit Roll - by Grot" from widget share.

I want to include chat messages and emote usage in the credits scene, but I'm running into an issue with parsing all of the events.

The original code looks like this:

    const recents = obj.recents;
    let session = obj.session.data;
    let sums = {};
    for (let eventIndex in recents) {
        const event = recents[eventIndex];
        if (typeof sums[event.type] === "undefined") sums[event.type] = 0;
        if (!fieldData[`enable${event.type}`]) continue;
        if (event.type === 'tip') {
            if (typeof session['tip-count'] === "undefined") continue;
            if (sums['tip'] < session['tip-count']['count']) {
                addEvent('tip', event.name, event.name + " - <span class='amount'>" + event.amount + '</span>' + userCurrency.symbol, event.amount);
                sums[event.type]++;
            }
        } else if (['cheer', 'stars', 'embers'].indexOf(event.type) !== -1) {
            if (typeof session[`${event.type}-session`] === "undefined") continue;
            if (sums[event.type] < session[`${event.type}-session`]['amount']) {
                addEvent(event.type, event.name, event.name + " - <span class='amount'>" + event.amount + '</span>', event.amount);
                sums[event.type] += event.amount;
            }
        } else if (sums[event.type] < session[`${event.type}-session`]['count']) {
            if (typeof session[`${event.type}-session`] === "undefined") continue;
            addEvent(event.type, event.name, event.name, 1);
            sums[event.type]++;
        }
    }
};

window.addEventListener('onEventReceived', function (obj) {
    const skippable = ["bot:counter", "event:test", "event:skip", "message"];
    const listener = obj.detail.listener;
    if (skippable.indexOf(listener) !== -1) return;
    const event = obj.detail.event;
    if (event.type === 'tip') {
        addEvent('tip', event.name, event.name + " - <span class='amount'>" + event.amount + '</span>' + userCurrency.symbol, event.amount);
    } else if (['cheer', 'stars', 'embers'].indexOf(event.type) !== -1) {
        addEvent(event.type, event.name, event.name + " - <span class='amount'>" + event.amount + '</span>', event.amount);
    } else {
        addEvent(event.type, event.name, event.name, 1);
    }


    var mq = $('.marquee').marquee('destroy').marquee(options);
});```

but I don't think that will work with messages events since they are not going to be in obj.recents (as far as I can tell)
zenith pulsar
#

MAybe this code block isn't needed for what I'm trying to accomplish. The parseEvents section of the code doesn't seem as important if I'm only interested in new events that happened within the current stream. parseEvents is only called during an onWidgetLoad eventListener.

obtuse isle
#

As it seems to a lot of people are messing with concept of credits... Is it possible to get more than last 25 subs/follows/cheerers/tippers from the stream session? Aka. There is more than 25 unique subs/follows/cheerers/tippers and I would like to get all of them from this session... Based on what I see merged recent caps at 150 and all "separate lists" cap at 25 in 'onWidgetLoad' data...

spice harbor
#

Iโ€™m pretty sure the credits widget by Grot appends events to the HTML. I havenโ€™t tested, but I donโ€™t think thereโ€™s a (reasonable) limit to the number of items you can append. As long as you donโ€™t reload the widget, the html wonโ€™t go away. You can download that widget from #widget-share and emulate 26 followers real fast to test.

obtuse isle
# spice harbor Iโ€™m pretty sure the credits widget by Grot appends events to the HTML. I havenโ€™t...

Yep this much I know, itโ€™s not really about appending, itโ€™s about data returned by the eventโ€ฆ here comes the problem. What Iโ€™m making is outro screen exclusive so itโ€™s not loaded all the time and opens only on the outro screen is open to reset animations but no matter how many events there were on stream โ€œrecentโ€ object hold max 150 last events and โ€œtypeโ€ specific recent events holds max 25 latests so if there were more โ€œeventsโ€ before they will not be in the arrays. No matter, I already solved it with usage of activity api endpoint cause I donโ€™t want to and donโ€™t need to actively add new events when outro screen starts itโ€™s things (not friendly for animations anyway)

past surge
#

Does anyone know if it is possible to create a command on stream elements that plays an animation on stream and increments a counter at the same time?

severe shell
vital wadi
#

I have the logic to choose a random chatter and I want to give them a special badge for the duration of the stream. Ive added the badge to their badges array but it doesnt seem to be showing up when they chat. 1. is that possible to do? 2. If yes, once it's in the badges array where should I look to add it to the message?

hot trout
#

you can't change people's badges

hot trout
#

the closest you could get is with an on-stream widget, where you could modify it to recognise that chatter and slot in the badge

tribal sleet
#

hey devs, I have a question that's not entirely related to SE.
I'm making an animated graph with the channel points, the type you usually see on Reddit and Twitter that show the progress over time.
I want to put the profile picture of everybody that appears on the graph, the tool I'm using allows that flourish.studio by putting an image url in a column.

Does anyone knows how could I get the profile picture url from the followers list?
or it might be too complicated?

severe shell
# tribal sleet hey devs, I have a question that's not entirely related to SE. I'm making an ani...

It depends on how you are getting the followers list.
For example, if using the Twitch API, you can get the username (or user ID) and send to "Get Users" endpoint (https://dev.twitch.tv/docs/api/reference/#get-users). The profile picture is the key "profile_image_url" from the response. You can send 100 user IDs / usernames per request

If you are getting the data from another source, it will be in another way.

tribal sleet
stuck violet
#

Does anybody know why user levels keep automatically syncing to the user's twitch role once they type one message?

#

Used to be able to just set the role and it not auto sync but now the roles automatically set from Moderator back down to VIP

lost sage
#

can anyone advise me on how to create a field to select text animations?

severe shell
stuck violet
#

@severe shell this is occuring with super moderator too

severe shell
# lost sage can anyone advise me on how to create a field to select text animations?

FIELDS use JSON structure, so you would create something like this:

{
  "itemVariableName": {
    "type": "",
    "label": "",
    "value": ""
  }
}```
More information here: 
https://dev.streamelements.com/docs/widgets/ec99002224803-code-editor#json
lost sage
#

thanks i will check it!

severe shell
stuck violet
mortal haven
#

I am also having issues with super moderator as is a friend. When someone is set as super moderator as soon as they type they go right back to moderator

chilly swan
#

I currently have the same issue as well, my super moderator roles keeps resetting back to moderator since a week ago. It was working just fine before.

frigid dagger
#

Hey! I'm using this code for make the subcount combo of my subtrain

  const dataa = _.detail.session.data;
  const subscriberMonthCount = dataa["subscriber-month"] ? dataa["subscriber-month"]["count"] : 0;
  
  $("#subcount").html(subscriberMonthCount);
```The problem is.. it don't update in real-time when I receive sub
#

what I need to do?

severe shell
frigid dagger
#

Yes, it was in onWidgetLoad

#

Now how I do for it always show?

#

I keep the old code and added it, and it update... but I'm not sure if it is the best way

severe shell
#

onWidgetLoad only runs when the widget is started (or refreshed). Everything after that is not "captured"

frigid dagger
#

it's all working now, thanks so much!!!!

proven elbow
#

Hello, im looking for a way to program a chat command, wich viewers can write a "Keyword" in the chat and get 10 points. Im looking for the variable of !addpoints in the format like this "${user} has ${user.points} ${pointsname}" how is it called? Is it possible to have the command like for example ${addpoints.10.user} so every user writing the "keyword" in the chat the addpoints command automatically add 10 points to his loyality account

severe shell
plain olive
#

Hello, I'm trying to set up a text-to-speech command that says the sender name followed by what they said. Something like:
${redeem tts ${sender} said ${0:}}

#

But I can not concatenate both the sender and the message.
I just hear ${redeem tts ${sender}}.

Note:
In testing
${redeem tts ${0:}}
$0: gave the full message, $1: clips the first word

ocean dome
#

Still appears to an issue for me. Has this not been fixed over the last 9 months?

plain olive
#

OK, solved my question, I needed to enclose the message in double quotes:
${redeem tts "${sender} said ${0:}"}

frigid dagger
#

I want show the name in my subtrain of all gifted subs every 1 second based in the amount. I don't know do it

but I understand the basic of basic

#

I said every second because it's the animation time I use

#

instead of bits, imagine the alert with the sender name and the amount of gifted people

#

and when the alert finish show the name of all gifted peoples base in the amount

frigid dagger
#

I'm trying do it for months....

viral stag
#

yo il y a du Fr

frigid dagger
#

?

#

I don't speak english

viral stag
#

yes i speak French

frigid dagger
#

nice

#

do you know how can I show all lastest gifted subs?

#

๐Ÿ˜ฎโ€๐Ÿ’จ

brave tulip
#

Is there any tool to convert store redemptions into excel sheet? casyT

severe shell
#

Iโ€™ve never seen that anywhere, maybe someone has created, but cannot remember anyone posting that here.

But what page exactly are you referring to? The store page? The page that lists the users that redeemed the items from store? The page the user see their own items redeemed?
You can send the page link if you want.

brave tulip
#

The first one, the list of redeemed store items

severe shell
# brave tulip The first one, the list of redeemed store items

The store page is generated from a JSON response from this API endpoint:

https://api.streamelements.com/kappa/v2/store/ACCOUNT_ID/items
(ACCOUNT_ID can be found here: https://streamelements.com/dashboard/account/channels)

You can get the output of the endpoint and put it into this website to convert it to CSV (excel sheet). Just scroll down and follow the 3 steps on the page (you can also skip the step 2, the default options are good enough). At the end you will see the result and can download it:
https://www.convertcsv.com/json-to-csv.htm

glacial drum
#

Hello guys and girls, a question.

Can you add websites/URLs inside a streamelements overlay?

In order not to be creating multiple browsers in obs.

glacial forge
#

Hi, I noticed that StreamElements variable ${time.country/city} does not work. I have noticed that !so are not working still, so not sure if that's just part and parcel with the interruptions with Twitch which are blocking from SE in working properly. If someone else knows a substitute let me know especially if the bot is working as intended. Thank you

visual falcon
#

Hey I am a mod for a streamer and want to add a commad which will give me exact time for the user input location
This is the syntax i am want the user to type
!time [Location] and the output should be whatever the time is in 12hour clock format
For example ; !time London --> It's currently 10:20 AM here in London
Please give me the text I should be putting in twitch chat to get this working

severe shell
severe shell
severe shell
# visual falcon Hey I am a mod for a streamer and want to add a commad which will give me exact ...

Unless you use specific cities, that would not be perfect or easy task, as time zones are based in areas, not in cities. Another information to be taken into consideration is that there are many cities with the same name around the world (i.e.: Melbourne in Australia and in USA).
There is an oficial list of cities used in time zones, called tz list or zoneinfo:

https://en.m.wikipedia.org/wiki/List_of_tz_database_time_zones

Outside those cities from the list, one would have an application to understand the location typed by the user and locate the nearest timezone to provide the correct answer.

This is a list of time zones from release 2023c of the tz database.

proven elbow
#

when i do !songqueue in chat and press the link its always rederecting me to the landing page can u please fix?

#

i can se the que in the dashboard but our mods cant

#

otherwise i have to give every single mod dashboard access

#

wich i dont want to

hardy walrus
proven elbow
#

thanks its working

#

then i have another problem when i request some songs i get @proven elbow, der Song internal server error konnte nicht hinzugefรผgt werden

hardy walrus
#

That unfortunately is something that happens at times. Can only wait and try again.

proven elbow
#

its a specific song other songs work fine, so there is nothing i can do about that atm?

#

its called HEAVY RAIN by Fler

hardy walrus
#

Are you requestiong by link/video id or by name?

proven elbow
#

both

#

both didnt work

uneven oxideBOT
#

If you need to fill out a support ticket, please use the command !ticket in chat, following the subject of your issue! For example, please type "!ticket My chatbot isn't working", and then follow the prompts from our bot!

hardy walrus
#

Do that for me so they can pass that to the devs to look at.

proven elbow
#

ok i will do after the stream ty

opaque wasp
severe shell
opaque wasp
#

Yep, it isn't working

severe shell
opaque wasp
severe shell
opaque wasp
severe shell
#

Yeah, just remove one of the items from the array

{
"mode": "add",
"users": [
{
"current": 200,
"username": "testuser123"
}
~~ , ~~
~~ { ~~
"current": -5,
"username: "anotherUser"
~~ } ~~
]
}

opaque wasp
#

Gotcha, docs could be easier to read but once you use the enpoints at least in the response you can see what you're doing wrong.

severe shell
opaque wasp
severe shell
# opaque wasp Any clue on why it isn't subtracting anything?

I've just tried and it isn't working for negative numbers, indeed. To make things easier, I went to the leaderboard page and checked on console how the endpoint is called. This is the working way (the way you were trying before is actually working):

const username = 'c4ldas'
const amount = -100

const response = await fetch(`https://api.streamelements.com/kappa/v2/points/${channel_id}/${username}/${amount}`, {
    method: 'PUT', 
    headers: {
      'content-type': 'application/json',
      'Authorization': `Bearer ${JWT_TOKEN}` 
    }                               
})
console.log(await response.json()) // {"channel":"CHANNEL_ID","username":"c4ldas","amount":-100,"newAmount":99820,"message":"Removed -100 points to user c4ldas"}

I tried that and worked successfully. No body needed

brave tulip
subtle slate
#

what should I put in the regex if I want both the upper and lowercase keyword to trigger the command

patent whale
#

Anyone know how I would modify this Custom Widget "One Bar To Rule Them All"/#widget-share message to add a new LabelPosition for it, it would be nice to have it on the inside of the bar, so I can make it match my other bars, any help in the right direction would be great, thank you โค๏ธ

patent whale
severe shell
# brave tulip Sorry, I couldn't get to this earlier. I used the link and it only gave me the l...

Well, in this case you could use the endpoint from here, but it asks for all fields, which are not totally necessary:
https://dev.streamelements.com/docs/api-docs/a10503ee6ad98-channel-redemptions-search

Another option would be to go to https://reqbin.com and make the request from there.

In the address (where it shows google.com) you can put this (replace Account_ID for your account ID):
https://api.streamelements.com/kappa/v2/store/ACCOUNT_ID/redemptions/search?offset=0&limit=100&sort={"updatedAt":-1}

In Authorization > Token, you will put your JWT token (This is like your password, so take care of it and do not share it with anyone).

Account ID and JWT token can be found here (click on "Show secrets" to reveal your JWT Token): https://streamelements.com/dashboard/account/channels

In Headers, you will put:
accept: application/json

Click on Send button. The response will be generated and the right side. Copy it and follow the part I told you to convert it to CSV.

severe shell
indigo dawn
#

hallo, im a bit new to developing custom widgets, i was wondering if there was something like console.log i could use to see if code is working properly, or what the best way to check if theres any errors would be? thanks!

severe shell
indigo dawn
severe shell
indigo dawn
#

i'm working with this code, and for some reason its returning 4/5/2023 even though its 6/8 and it worked earlier? is this an se thing or should i look elsewhere?

#

when i had the year one as date.getYear() it was returning 123 for some reason too

still juniper
#

I very much doubt that worked earlier as you would've expected since you're using wrong functions or in an incorrect way. getDay returns the day of week (so a Thursday is 4), getMonth returns values in range 0-11 (so June is 5), and getYear, which is btw deprecated, doesn't return full years (it returns the current year minus 1900, so yeah, 123 would be the correct return value). You probably just want to use toLocaleDateString and toLocaleTimeString with the proper formatting options

indigo dawn
potent hornet
#

I'm live testing a train widget I built from scratch (Twitch). Someone just gifted 10 Tier 1 subs to the community. I got 10 subscriber-latest events, but not an additional one for the actual gifter and the bulk gifted amount (checked the onEventReceived handler before any filtering takes place). Is that usual? Is there a different event to look for to get that it was a bulk community gift of x subs?

#

This is where my console.log is at:

regal steppe
#

So I've written a NodeJS bot that in response to a Twitch Channel Points redeem sends a request to the SE API /points/:channel endpoint to add points to all users in chat (via requesting the chatter list and building the array as required by the API). However when I send the request only 7 out of about 100 or so chatters are getting the added points. (perhaps due to http request limit?)
I have confirmed that I am putting all chatters into the array, just that SE is only accepting 7. I have considered an alternative to split my array into chunks of 7 but does anyone have a better solution, I also want this to scale to 1000 or so chatters when required

#

I was just getting my bot to type !addpoints all 500 into chat but since its now easier to fetch Twitch chatters I thought I'd see if I could accomplish the same thing using the API

rigid dome
#

Is there a way to get twitch channel point redemptions through onEventReceived? i didnt see anything in the docs

hardy walrus
#

@rigid dome we do not have any integration with channel points yet unfortunately.

rigid dome
#

dang, is there any plan for it to be added in the future?

hardy walrus
#

It's on the list of things we've yelled at them to add but nothing solid yet.

severe shell
# rigid dome Is there a way to get twitch channel point redemptions through onEventReceived? ...

If you connect directly to Twitch pubsub, it is possible to get Twitch Channel Points redemption.
In the widget below, it connects to Twitch pubsub and every time a channel point reward is redeemed, it shows some information on console and the redemption image on screen during 20 seconds. But you can do whatever you want with that, changing the function redemptionRedeemed() (line 60):

Twitch Pubsub - Twitch channel points
https://streamelements.com/dashboard/overlays/share/6485fdee73031689652625b5

Let me know if that works for you.

#

As the eventTopic community-points-channel-v1.${providerId} is public (it is what is shown on Twitch chat), it does not require authentication nor token.

#

But it is not officially supported and it can change or removed in the future, as it happened some time ago.

rigid dome
elder dragon
median halo
#

Hey everyone! Any custom code available that lets you separate the viewers tip message from the alert text for the default streamelements alert widget. For example I'd like on the left of my screen to say "so and so tipped $1.00" and on the right side of my screen show the message they sent me. As it is now, I have to include their message with {message} and it bundles them all together. I had originally expected the 'secondary text' was the user message, so I'm not sure what that text section is for if not that.

vocal cedar
#

Hello, is there a code to make random number generator that includes negative numbers?

severe shell
vocal cedar
severe shell
frail veldt
#

You could also generate between 0 and 200 and subtract 100 (to remove decapi as a dependency | if it goes down, your widget goes down)

Missed the above reply.

dim hound
#

Where can i find the amount of subscribed months in an [message] event in onEventReceived event listener?

#

someone can confirm if it's here?

vague coyote
#

are tips' amount always in the same currency, or do I have to convert currencies based on userCurrency?

severe shell
severe shell
# dim hound someone can confirm if it's here?

That option only informs whether the user is subscribed "1" or not "0" (the value is a string, by the way).
In onEventReceived there isn't a key for that, but the amount of months can be found in obj.detail.event.data.tags["badge-info"].
When "subscribed" value is "1". It will show like badge-info: "subscriber/25", which indicates 25 months, otherwise it will be blank: badge-info: ""

rigid dome
#

Can you save to Data variables through JS?
Or is there another simple way to save small amounts of data from an overlay? (keeping track of a highscore between sessions?)

severe shell
# rigid dome Can you save to Data variables through JS? Or is there another simple way to sa...

If you referring to custom widgets, you can save and retrieve it using SE_API. It is a small database of key/value

keyname is the keyname you want to save
obj is the information you want to save/retrieve

In the example below, keyname is points and the rest of the object is the obj

points: {
  c4ldas: 310,
  sez: 200, 
  paul: 600
}```

Use `SE_API.store.set('points', {c4ldas:310,sez:200,paul:600} )` to store an object with the values you want

Use `SE_API.store.get('points').then(obj => { console.log(obj) })` to retrieve the object.

Obs: when you store an information with a key, the previous value will be overwritten.
rigid dome
regal glen
#

Is there a way to call two Api's in a command? for example
The main command calls the pastebin and the line it gets is this to lead it to another pastebin? Like chaining Api's together.

User Walk down street: ${customapi.https://api.thefyrewire.com/twitch/pastebin?key=Paste_key}

regal glen
gaunt thistle
#

I have a twitch extensions and right now when someone does a transaction through it. It sends a message in chat. People want alerts. I am looking to allow users to link StreamElements so I can have the extension send an API command to play an alert on an overlay that they choose. Something close to that.

Before I read the docs I applied for OAuth knowing I would need it. At the time I don't have the endpoint developed on my backend server to handle this but I will create it. So when it asked for a redirect url I just linked to my extension in Twitch's Extension page. I see no way to edit the form to correct the issue.

I assume they may approve or deny but ultimately what I filled in there would need to change to my backend servers route that I create to handle this. Hopefully I'm not the first one to do something silly like that, worse case I will just have to fill it all out again if they reject it.

severe shell
vague coyote
#

me when websocket api is not at all what the docs say it is

rigid dome
#

Is it possible to send chat messages from a widget overlay?

severe shell
rigid dome
#

got it, thank you again!

ripe verge
#

Will you be adding Kick soon?

hardy walrus
#

When they provide an API to do so maybe but not until then.

weak bolt
#

is it possible to filter people from the ${random.chatter} variable?

weak bolt
#

pain, thank you for the reply

potent halo
#

Okay I'm dumbfounded.
Short: Events only trigger with extrem delay

I'm emulating events in the overlay atm.
Whenever I send any event (example is a sub) this pops up in the console

22:18:16.434 [QUEUE]: Broadcasting event (subscriber-latest)
22:18:16.434 se-widget-custom-event-list(id: 1) - event:subscriber-latest
22:18:16.439 [QUEUE]: Adding widget:1 to playing

then the event gets processed by my logic.
But if I trigger a event right after [QUEUE]: playing the event only fires after this line

22:18:31.443 [QUEUE]: Removing widget:1 from playing

Didn't change anything afaik.
Copying doesn't fix it. Other Overlays are not affected.

Any ideas?

still juniper
#

That is the expected behaviour when you lock the event queue in your widget (for 15s in this case), events are only processed after it's resumed. So the question is if you're locking the queue or not (using the widgetDuration field) (or if any other widgets in the overlay are locking it)

potent halo
#

Oh man thank you.
I copied some of the example code for fields including widgetDuration
Although it wasn't in fields anymore it was still in data.

ancient lynx
#

hi! does anyone know if SE is updating something related to events? I keep getting different key names for the same event. So for raids, I've been using event.sender to see who sent the raid, then I realized it changed to event.name, then couple days ago changed again to event.sender and today it is event.name again, is this a bug or is it an intended change? All this is for twitch events, not sure if it's the same for other platforms

opaque wasp
#

is there a way to detect if an event is being replayed from Activities feed?

onyx barn
#

does anyone know where to go for customer live chat support?

uneven oxideBOT
#

@onyx barn โคต๏ธ

If you need to fill out a support ticket, please use the command !ticket in chat, following the subject of your issue! For example, please type "!ticket My chatbot isn't working", and then follow the prompts from our bot!

fierce dove
#

I'm getting those error messages in console when I try to store values with the SE_API. I'm not advanced enough to understand them though, is my call wrong?

SE_API.store.set('marathonTimer', {
  duration: duration,
  paused: paused
});
rare canopy
#

Hello, is it possible to display fields conditionally on StreamElements widgets? For instance, if a certain checkbox is activated, I would like to show a dropdown next to it. Otherwise, I don't want the dropdown to be displayed.

opaque wasp
severe shell
# fierce dove I'm getting those error messages in console when I try to store values with the ...

Just ignore it... It is just a report and it is internal to Streamelements, nothing we can do. But it works with no problem.
In case the console is getting full of those messages, a workaround would be creating a new overlay and duplicate your widgets to that new overlay. It worked for me (but sometimes the annoying messages appear again during code edits, so I just do that when I usually finished with my code)

rare canopy
severe shell
kind tusk
#

When i try to upload wav files im getting this error:

Possibly unhandled rejection: {"data":{"statusCode":415,"error":"Unsupported Media Type","message":"audio/wav expected but got audio/wave"},"status":415

Im 100% sure this files are standrd 16bit PCM wavs. I exported them multiply times and also checken via mediainfo.

Is this a bug?

hardy walrus
#

I've seen people mention issues with wav. Use mp3.

manic oxide
#

i have a question and i need some help

#

it involves commands and i have a idea nd i dont know how to excute it

#

i want to make a "Quote Command" but i dont have the best understandiong of how to create commands with the coding and such, but i want it t ogo along the lines of
$[sender] has Qouted $[user] "$[user.lastmessage]"

#

So for instants someone says something weird in chat, and someone wants to quote it, and it can send a message saying its been quoted, as a fun little moment in chat, if anyone can help me understand how to do

lapis trail
#

hey there, how could i grab the latest events from an stream like latest follower, cheer, subscriber etc using the Streamelements api and my JWT access token?

lean verge
#

I wish there was a way to filter that output before it's sent to me, I'm trying to set up an esp32 and the 50 KB it replies is a bit to much.

#

A workaround i'm probably gonna have to end up doing is to set up a webserver of my own to do the web request towards SE, and have my esp32 poll my own server.

rough shadow
#

I think I may have been sent here by error, but I might as well ask.

I am a Pokemon Unite grassroots tournament organizer. We recently finished regionals for all regions in the world. Half of the teams that qualified were not awarded travel awards (travel stipend), and a vast majority can't afford the travel. A few community figures, content creators, and organizers are banding together to create a fundraiser to engage the community in funding these teams that did not receive a travel stipend.

In my ticket that I wrote, I had asked if streamelements would be usable for this type of use case. We have 6 content creators streaming simultaneously, and I was going to use streamelements tipping system and overlay to display incoming donations and overall donations received. My question was, can this overlay be used simultaneously across 6 streamers.

The moderator in the ticket said, "Unfortunately that would be a custom widget that would need to be built. We recommend reaching out in our #developers-community channel here in discord. This channel can be found under the "Creative" section.",

I am confused on which part would need to be a custom widget. I had tested out the overlay maker, and it already has those options, so I assume its use of the overlay across 6 streams?

#

Unless I'm not understanding streamelements capabilities, I would like any assistance on making a widget for any of the problems that I am not aware of

#

This is slightly urgent as we have received outside funding to host a tournament on July 8th, and an inhouse event on July 9th as the participating inhouse users are only available on that day. Flights to Japan are ever increasing in price, so we are trying to rush the fundraising process.

rigid dome
#

im looking to protect my code for a widget from being redistributed. What's the best way to go about this?

I saw someone else append a .js file to the widget html from their server? is this the best option?

severe shell
severe shell
# rough shadow I think I may have been sent here by error, but I might as well ask. I am a Pok...

Tips on Streamelements are tied to the account. So if you go to overlay Editor and create an alert for tipping, that will be for your stream. When another user creates an overlay with a tipping alert, that will be only for their stream.
I'm not sure if I understood it correctly, but what I got is that you have 6 people streaming from their own accounts and you want to show the tippings from any channels in all of them, is that correct?
If so, the "easiest" way to do that would be the 6 streamers create an overlay each with tipping alert and add the 6 overlays to each OBS. That way, each streamer would have their own overlay + 5 overlays from other streamers. Once Streamer2 received a donation, it would show up in all live streams.

In case this is not what you want, let us know so we can think of something different together.

rough shadow
#

@severe shell Can the same be done with 1 account, and that overlay shared amongst all the streamers?

severe shell
rough shadow
#

Does that account have to be live? Or can the main organizer have an account, and the overlay would still udpate

#

while they aren't live

severe shell
#

It doesn't need to be live, as long as the donation goes to the overlay owner account.

Example:
**Streamer1 **is the main account, **streamer2 **and **streamer3 **are two different streamers.
You create an overlay on streamer1 account, and add that overlay to **streamer2 **and **streamer3 **OBS.
Once streamer1 receives a donation, the alert will be sent to **streamer2 **and **streamer3 **OBS and appear on screen (like if it was from their accounts).

#

Just remember to use the donation link for streamer1 so people can donate to the correct account

rough shadow
#

sweet

severe shell
rough shadow
#

then yeah, our use case works. Just have to bring on a handful of moderators to populate spreadsheets of milestones/incentives/raffles, pretty much how tiltify works

#

Another question. Can we add "admins" to the streamelement page to handle that kind of operation? Or is it tied to the person account and can't be shared

#

I haven't taken a deep dive on streamelements, so I don't know its flexibility

severe shell
rough shadow
#

Ahh I see. Okay, thank you for the help!

severe shell
#

But if you just share the overlay link for OBS, they won't be able to change anything

#

That's the link you will share with other streamers

rough shadow
#

My ticket was just updated with this response

If you're not using a supported platform for charity, such as tiltify or DonorDrive, you will need to find a way to track it via a custom widget. That is where the custom portion would come in. I highly recommend reaching out in the #developers-Community to see if this is possible. Again that can be found in our discord under the "Creative" Tab.

But I assume if a user has editor status on my twitch account, they can view the dashboard, where tips are displayed

severe shell
rough shadow
#

oh, okay xD

severe shell
#

If you want to give Bot Supervisor, Editor or Full Controle role to someone, you can generate an invite link here:
https://streamelements.com/dashboard/account/channels

Select the role you want to give to them and click on Generate Invite Link. Send the link to the person and once they clicked, it will have the role in your account.

rough shadow
#

I actually JUST opened that lol

severe shell
#

๐Ÿ˜„

rough shadow
#

okay cool, this should work then. Thank you!

severe shell
#

That's how it is going to appear for you:

rough shadow
#

And I would just ask editors to sit in "Activity Feed" with filter set to "Tips".

#

Does the Activity Feed update live?

severe shell
rough shadow
#

And does the tip message display in the activity feed?

severe shell
rough shadow
#

Sweet, it'll make the mods job easier

solemn viper
#

i think overlay are brok

gusty crest
#

hey all, I was looking for a goal widget that displays twitch charity donations, does anyone have one?

#

I use other goal widgets but none of them have the option to display charity donations

shrewd gale
#

Hello guys, how do I have to program my command if I want a currency converter? Example: I enter in the chat !10dollar and then want as a response the converted value in euro. Is it possible to have one command for all currencies or do i have to create a separate command for each currency?

bright geyser
#

hey, I want to ask becouse i cannot find it in documentation, is there any way I can read message when it apper by program ? I have this:

#
import time
import requests

headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer TOKEN'
}
url = f'https://api.streamelements.com/kappa/v2/bot/ID'

def fetch_chat_messages():
    response = requests.get(url, headers=headers)
    chat_messages = response.json()
    handle_chat_messages(chat_messages)

def handle_chat_messages(chat_messages):
        print(chat_messages)


while True:
    fetch_chat_messages()
    time.sleep(5)  ```
#

I know there should be maybe some other option or not use .../bot/..., can somebody give me some hint ?

severe shell
celest cypress
#

Hello,
I hope I'm right here.
Does anyone know of a way to only display "normal subs" (twitch) in a counter, i.e. without gifted and prime subs?
Is there any way to display this with a widget?
Many thanks in advance

Greets Tad

bright geyser
# severe shell That endpoint is to get bot information. There is no endpoint from Streamelement...

oh ok and can I use / commands (for example /ban nickname) with streamelements api ? I think this dont work on / commands


url = "https://api.streamelements.com/kappa/v2/bot/XXX/say"

payload = { "message": " /ban test" }
headers = {
    "Accept": "application/json; charset=utf-8",
    "Content-Type": "application/json",
    "Authorization": "Bearer XXX"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json()) ```
severe shell
severe shell
celest cypress
bright geyser
severe shell
steep remnant
viral forge
#

who knows how to fix this

steep remnant
#

ะ•ัั‚ัŒ ะบั‚ะพ ะฝะธะฑัƒะดัŒ

robust zodiac
hardy walrus
#

It is with Windows. Mac is only up to v27.

severe shell
dusky tree
#

Is there a way to remove bots or certain names from !top online? Can I change their access level or what? Basically bots are in the top 5

hardy walrus
#

It is not possible.

#

Now you can block them from earning loyalty and modify their points/hours to zero but nothing as is.

dusky tree
#

ok thanks

#

!top online current works but I don't think I can reset their watchtime like I can with points. So not sure how to get rid of the bots

EDIT: I think the only way is to nuke the bot usernames?

severe shell
dusky tree
#

Is there a way to get the username of the top# (1-5) from leaderboard?

I want to modify !top points slightly but I can't find the template. I wanted to add top 10 instead of 5

Can the rank pass $args value?

${user.time_online_rank_1}
$(user.points_rank.1)

hardy walrus
#

there is no variable based method for specific ranks.

dusky tree
#

What about modify the top online (originating from top points) command to remove the (minutes)? It's not really legible since it's not converted to the same format that watchtime has in days/hours. Was hoping to remove the minutes possibly.

From

Top 5 Minutes spent watching the Stream: 1. streamelements (XXXX), 2. kushed (XXXX)

To

Top 5 Minutes spent watching the Stream: 1. streamelements 2. kushed, 3. username

hardy walrus
#

These specific commands/variables are hardcoded with their responses.

dusky tree
#

Ok thanks. Was worth asking. Looks like the template is $(user) has $(user.points) $(pointsname) and is rank $(user.points_rank) on the leaderboard. but we are very limited on our end. Maybe in the future! I will see if I can request it somewhere

wooden basin
#

Hello there,
Is there a way to oAuth and connect to the Twitch user API inside a Custom Widget? I basically want to fetch all Twitch Subscribers for a specific broadcaster. Or maybe I am overthinking it? Is there any other way to do it with the SE API?

severe shell
# wooden basin Hello there, Is there a way to oAuth and connect to the Twitch user API inside a...

It is not possible to connect directly to Twitch API using custom widget. You would need the user to generate a token externally first. For that, you will need to have a webpage so the user can authorize your application to collect the users. After getting that token (that lasts 60 days) you can use it in your custom widget. After 60 days, the user needs to generate a new one again.

In case you want to go through that process, I can explain how you can do that. But basically it is:

1 - You will need to register an application on Twitch dev console on the page below. Where it says OAuth Redirect URLs, you need to add a server that will be used as a callback page
https://dev.twitch.tv/console/apps/create

2 - In order to get all Twitch subscribers, you would need to use this endpoint:
https://dev.twitch.tv/docs/api/reference/#get-broadcaster-subscriptions

3 - That endpoint needs "user access token" that includes the scope channel:read:subscriptions

4 - In order to get the "user access token", the easiest way would be following the "Implicit grant flow" steps, where you don't use a server, but just a client-side JavaScript app page to collect the token. This is how to get it:
https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#implicit-grant-flow
The token will last around 60 days, then it will need to be regenerated

#

SE API does not have an endpoint to retrieve all Twitch subscribers

marsh pike
#

hi, I'm pretty new to this and I'm making a custom chat box. I'm trying to have the alignment of the messages alternate after every message (sort of like a text message conversation). I've been trying for a while but I'm completely lost, does anyone know how I would implement this?

inland pebble
#

Hey everyone! I need help creating a custom command that goes a little beyond the basic command. I would like to create a command that generates a random number from a selection with a small group of those number being picked at a much smaller percentage rate. I.e. I want the command to choose a measurement anywhere from 3-10 inches with a very small chance, maybe around 5%, that it chooses 1 millimeter instead. Unfortunately, I dont have the coding experience to know how to do this myself yet

placid hazel
drifting torrent
#

I need some help, anyone experienced with setting up webhooks for streamelements or streamlabs to listen for donations and spawn characters in unity?

severe shell
severe shell
# drifting torrent I need some help, anyone experienced with setting up webhooks for streamelements...

Not webhooks, but you can connect to WebSocket using socket.io and when a donation is received, you will receive some "event:update" (around 9 of them) and one called just "event". The "event" object looks like this:

{
    "type": "tip",
    "provider": "twitch",
    "channel": "5f2de5dd9a474a2c2dc4d0ab",
    "createdAt": "2023-07-12T09:51:48.199Z",
    "data": {
        "amount": 53,
        "currency": "BRL",
        "username": "carlos",
        "tipId": "64ae77b49a63e14680e300f2",
        "message": "This is a message from the tip",
        "avatar": "https://cdn.streamelements.com/static/default-avatar.png"
    },
    "_id": "64ae77b438c43b8e350161d4",
    "updatedAt": "2023-07-12T09:51:48.199Z",
    "activityId": "64ae77b438c43b8e350161d4"
}```

You can use this information to spwn your charaters in your application. If you want to test a donation (with kind of real data, not emulated), you can go to SE revenue history (https://streamelements.com/dashboard/tipping/list) and click on "Add a Tip" button. Fill the fields and make sure to select "Imported tip", so that will trigger a real tip in real time on Streamelements (with alertbox and everything).

If you have questions, just ask here in this channel and we will try to help.
severe shell
# inland pebble Hey everyone! I need help creating a custom command that goes a little beyond th...

Chat commands are very simple ways to automate something, however, they do not have much logic calculations to be able to do what you want.
In order to have 5% of something, you should have 20 different options, so each one would represent 5%. A very basic option would be repeating the same value 19 times and the 20th you put 1. Not very smart or efficient, but would work anyway. Just keep in mind the character limit in the command.

${random.pick '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '${random.3-10}' '1'} mm

In case you want the 10 to be part of the measurement, change the values to random.3-11

severe shell
# marsh pike hi, I'm pretty new to this and I'm making a custom chat box. I'm trying to have ...

Are you very new with what exactly? What do you have so far?
In order to achieve alternate positioning messages, you will need to understand CSS, to position each text in each side. Here you can find some help, just need to adjust to your needs:
https://stackoverflow.com/questions/57843422/how-to-best-alternate-chat-bubbles-positioning-with-css

#

SE API does not have support to read chat messages, unless you are doing it in a custom widget, so you could receive the chat events via onEventReceived

window.addEventListener('onEventReceived', async (obj) => {
  if(obj.detail.listener != 'message') return
  console.log(`${obj.detail.event.data.displayName}: ${obj.detail.event.data.text}`)
  // Your code here
})```
I have very basic experience with Youtube API, so would not be able to answer how hard it is to apply to quota increase.
Maybe you could forward the message from custom widget to a server that you have doing a POST request, so you can handle it externally. Probably that's what I would do.
drifting torrent
severe shell
chilly island
#

Hi all, I'm trying to fetch activities. This is a one-off (I need to count gift subs by gifter for a certain time period). I tried using the React data in the activity feed but it was missing data, so I'm trying to paginate through IDEA's HTTP client.

I've got a request like:

Accept: application/json```

I'm using `Authorization: Bearer <jwt token as grabbed from page>`

And I'm getting 403.  Am I missing a step?  Do I need to convert the JWT somehow?
still juniper
#

That endpoint requires oAuth, JWT can't be used

tiny sleet
#

(Hopefully) Quick JS question:
Is there a way to check if a message event is from a follower? On the custom widget event page I'm seeing that you can check for Mod or Sub using tags.mod or tags.subscriber respectively, but I don't see a Follower field. Is there any way to check for that? Maybe via bages if there's not a dedicated follower field?

severe shell
tiny sleet
#

Unfortunate, ty for letting me know

vital wadi
#

Wondering if there is a way to 'inject code' into the editor when someone opens the StreamElements widget. For my widget I have some images that are fetched from a url. If I wanted to let people customize this widget with their own images, adding their own url , is there a way to somehow get those urls into the code? Not exactly sure I'm coming at this from the right direction...

severe shell
brave tulip
#

Is there any way to use SE with Kick? (sorry if this should be for other channel)

hardy walrus
#

There is not.

brave tulip
hardy walrus
#

Will? 99% sure yes.
When? No clue.

brave tulip
#

I hope it will be done really soon, it would help setting up kick streaming quickly. Thank you for response โค๏ธ

vital wadi
severe shell
vital wadi
glacial flume
#

Hi, i have an issue with the songify api connection. Does anybody know this software? It shows the song title played in spotify in the stream chat.

I made a customized "!song" command for this and connected the songify api with the command, but since a few days it suddenly stopped working.

@${user} Der aktuell gespielte Song ist: ${customapi.https://api.songify.rocks/v2/getsong.php?id=8af5ecee-2d5d-4548-93e7-f0f5a857938b}

The answer i get is: StreamElements: @DGamez1992 Der aktuell gespielte Song ist: unable to make request.

flat parrot
#

Hi everyone - how long does it take to get a reply to an OAuth Application? I submitted one a couple weeks ago and have not received a reply yet. Thank you!

fading terrace
#

I have an issue where I accidentally signed into jebaited.net while signed into Youtube via streamelements. I meant to sign in through Twitch, so when I signed out on StreamElements and signed back in with the correct Twitch account, and tried signing into jebaited.net again with that, but now I'm stuck in a loop where it always brings me back to /login and never auths for /tokens despite returning a 200.

Tried signing in via incognito, different browser, and they all fail to login. Stuck in that login loop.

sweet saffron
shell sedge
#

Hi. I'm creating a command for scratch cards. The problem is that I can't find the variable for the bot to add a reward along with the message 'User x has won x ${pointsname}. Does anyone have any ideas?

severe shell
severe shell
severe shell
fading terrace
#

Still having the issue where it lets us login with Youtube fine, but when logging into Twitch it stays in the login loop.

@viral patrol Is this something you've seen before with jebaited? Would love to get this resolved pretty quickly.

Context: #dev-chat message

Update: Tried VPN, 3 browsers, FireFox containers, and even mobile and it's literally only an issue when trying to login into the Twitch SE account. It lets us log into the Youtube one fine, but that's the one we accidentally logged into at the start when we meant to select Twitch.

placid flame
#

Hi all, got an API help question. I'm a little confused readin the streamelements API, is it possible to send a request to execute a command? I only see get command list/info, create, update and delete commands.

bleak geyser
#

is it possible to download the sounds annd videos ive imported into SE?

severe shell
severe shell
# bleak geyser is it possible to download the sounds annd videos ive imported into SE?

Yes with the video. Open an alertbox and select the option to change the video. That will open the gallery, just click on the vertical three dots and select "download"

As regards the sound, it is a bit complicated, as you will need to open the browser console.
Open the alertbox and select to change the sound. Then, open the browser console, go to Network tab, play the sound from the gallery and a new link will appear in the network tab. Right-click on the link and select "open in a new tab".

bleak geyser
#

Thanksss sooooooo muchhhhhhhh

fading terrace
drifting torrent
uneven oxideBOT
#

You can find your JWT token on your account channels page (Show Secrets to reveal the token): https://streamelements.com/dashboard/account/channels

READ ME: This is a private security token. Do NOT share this token here or other public places, only with a StreamElements staff member in private.

fading terrace
#

Seem to get 401 no matter what when trying to use the tester anyway.

drifting torrent
granite adder
#

Hello everyone! Just need help on setting up the awesome shoutout by ReneChiquete .. It is specifically design for twitch livestream ... Is there a possibility that I can use this widget in facebook live? If so, hpw can I set it up? Does it has something to do with the configuration editor?

hardy walrus
#

@granite adder given it relies on functions not available on FB it isn't possible as is.

severe shell
severe shell
drifting torrent
severe shell
drifting torrent
# severe shell You can put your script here, just remove your JWT and we are fine ๐Ÿ™‚

I keep getting this in console whenever I add:

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

E:\chat-example-master\index.js:7
const socket = io('https://realtime.streamelements.com', {
^

TypeError: io is not a function
at Object.<anonymous> (E:\chat-example-master\index.js:7:16)
at Module._compile (node:internal/modules/cjs/loader:1233:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_ma
in:83:12)
at node:internal/main/run_main_module:23:47

Even though I have correct dependencies at least I think

granite adder
hardy walrus
#

There is not given their API is very lacking and even moreso with chat given there's not even bot support.

granite adder
fading terrace
#

I'm able to get the live test working via the api subdomain, but when I go to actaully use it in widgets it seems the body is dropped and no message is actually sent.

#

Pretty sure my fetch is correct, am I missing something obvious?

#

When testing here it returns the message, which makes me assume it was successful in sending it. And it does here, but not with my fetch method.

severe shell
fading terrace
#

There's no error message, I shared above the request to streamelements returns a 200 and show that the body of the request shows message

fading terrace
#

And obviously the JWT is set.

severe shell
fading terrace
#

Ah that might be it, lemmie check.

severe shell
#

Content-type is added automatically in the API webpage and it does not inform it is a required option... But when we check an example code, it is in there

fading terrace
#

Yeah that was it.

#

I'm so used to my HttpClient's providing tha tautomatically from context lol.

#

Thanks for the help! noctapL

shrewd copper
bleak geyser
#

when i log in with a custom bot it doesnt work

#

i press send test message and nothing pops up

vital wadi
#

I made a widget, but the code is visible and direct links to images and videos are in it, I don't want people to be able to mess with it. How would I go about hosting a JS file on my website that contains this widget, and then just linking to that JS file in a script and have the widget work, without the code visible. I've seen it done. I bought a stream pet widget that did it this way. Any ideas?

severe shell
# vital wadi I made a widget, but the code is visible and direct links to images and videos a...

Well, you have some ways (all of them not recommended):
1 - You can simply put a link to the JS file in the HTML tab using <script src="https://link/to/your/file.js"></script>, but the person can simply follow the link and see your code in there.

2 - Having a backend server to process all the information you want and use the widget just to connect to your backend sending only the basic information you need. You will need to keep this backend alive for as long as the widget is working.

3 - Obfuscate the code. This is really not recommended, once reverting is possible sometimes. But even reverting, in case you are not able to provide support, nobody from community will be able to help efficiently in case the widget needs some help.

severe shell
still juniper
#

3 - Obfuscate the code
Is this even allowed by StreamElements? Doesn't seem like a good idea from the security perspective

severe shell
still juniper
#

yep, I was referring to being approved rather than working

severe shell
upper pumice
#

Hoping for some help. Was wanting to edit/add custom CSS for SE channel total follower count. I found the element in chrome developer tools and could edit things there, but I can't seem to get OBS CSS to stick. I tried all the classes, but I can't seem to get anything working in OBS.

vital wadi
vital wadi
hardy walrus
#

There's nothing in the other tabs?

vital wadi
#

nope

vital wadi
still juniper
#

They're using an inline <script> to append a different <script> inside a #script div? Something tells me they don't know what they're doing...

That said, js is all you need if you know what you're doing. You can generate/insert html/styles from it. But honestly if at this point you don't know this, you probably shouldn't be trying to do what you're trying to do

severe shell
vital wadi
#

Yes I'm aware of html and styles in JS. CSS animations can be made in JS too? It's not so much about seeing my code as it is about still having some control over it once its out there

severe shell
#

By the way, I understand that this doesn't concern me, and that your question is not related to that, but I feel like I should say this in case someone else is also reading the conversation, to understand the situation.

it is about still having some control over it once its out there

In my opinion, that is the main issue. I wouldn't trust a widget that can be modified anytime by an external script unless that person was from my inner circle or had some known reputation.

This example will be a bit extreme, but who would guarantee that the widget wouldn't show an NSFW image/video in the middle of my stream someday just because the dev wanted to pull a "prank" on my stream (and possibly risk getting banned)?
We have been helping people who bought widgets before and don't have official support, usually because the creator is not available anymore, or for any other reason. Seeing the code is the best option to understand what is happening.

robust flame
#

Hi, does someone knows a Python Lib for Streamelements?

I want to interact with ideally my python bot when there are some sub, bits, donation received.

#

With Donations i mean donations via Streamelements

severe shell
robust flame
#

Oh, there is a WS from SE? ๐Ÿ™‚

#

Is it planned to add Python lib for the SE WS?

severe shell
robust flame
robust flame
#

@severe shell are there no Ping/Pongs?

severe shell
devout cobalt
#

Can I add timed announcements on mobile?

gray dome
#

Anyone know of how to have a sub count/goal for paid subs? As the new 350 paid subs gives us 70/30, would be good to push. Thanks

severe shell
hot trout
#

for partner plus it's only paid recurring subs

#

no gifts, no prime

#

and afaik tier 2/3 don't count for more than tier 1

ancient lynx
#

SE events are not currently working, either those simulated from the overlay editor either those that are repeated from the user dashboard, anyone knows what is going on?

#

there is some kind of problem with some requests

wet mauve
ancient lynx
wise fog
#

Hey! I already contacted the support about my project of making end credits and they suggested I ask here :).

I would like to know if there is a better solution than this to get the followers, subs, raids and cheers from two different days, let me explain :
Let's say the streamer starts the stream at 9pm and it ends after midnight, the end credits would need to display the new events from both before AND after midnight of this same stream.
For now, the solution I have is to get the date of the current day and the date of the previous day. My concern is that the credits will display information from both today and yesterday if both days have a different stream.
I'd like to know if there's a way of getting the stream's info instead of the day's info.

Here's the code I'm using :

data['follower-recent'].forEach(function(f) {
  var streamDate = new Date().toISOString().split('T')[0];
  //previous day
  var previousDate = new Date()
  previousDate.setDate(previousDate.getDate()-1)
  var formattedPreviousDate = previousDate.toISOString().split('T')[0];
       
  if((f.createdAt.indexOf(streamDate) >= 0) || (f.createdAt.indexOf(formattedPreviousDate) >= 0)){
      followers.push(f.name);
  };        
});```
Support suggested I use the sessionData reference but I can't manage to make it work :/
Here's the link they gave me https://dev.streamelements.com/docs/elements--sdk/ibpaihxhl77ot-session-data-reference
severe shell
severe shell
# wise fog Hey! I already contacted the support about my project of making end credits and ...

It depends on where you are creating the widget. Are you using the Overlay Editor or the new Elements (Beta)? The link you sent is to use on the new Elements (Beta).

As I'm only experienced on Overlay Editor, my suggestions will be based on that. To start, you can check the Credits Roll by Grot and use it as a base.
#widget-share message

I would suggest using the session data as well, as usually they reset 15 minutes after the end of each stream. So if a person streams for 3 days non-stop, the session will still be the same until the stream is ended. You can check it here:
https://streamelements.com/dashboard/session/settings
Go to Settings tab and confirm if the option "Reset session 15 min after each stream end" is selected

1 - Using the option above, the only "problem" is that Session data only stores the last 25 tips, 25 cheers, 25 followers, 25 subscribers, etc.

2 - Another option would be getting each user and store them in an array or object in yout code, so you can store as many users as you want. The problem is in case the widget is reloaded, the data will be lost and will start collecting data again from scratch (usually that's not a big problem, as overlays normally reset due to OBS being restarted or manually by the streamer).

3 - To solve the issue in 2, you can store the data on SE_API, using SE_API.store.set() and SE_API.store.get()
https://dev.streamelements.com/docs/widgets/186263f447d1d-custom-widget#se-api
You just need to remember to clear the data when starting the stream so it will not get old data.

wise fog
# severe shell It depends on where you are creating the widget. Are you using the `Overlay Edit...

Thanks for the answer.
I'm using the Overlay Editor to create it, so I'll take a look at the widget you suggested.
As the widget is not created for me but for someone who doesn't know a thing about code, I won't be using the API, even myself don't know how to code this so I won't try to hand it to someone who doesn't even know HTML ^^'
Why is it so hard to get this info and display it ahahah

severe shell
wise fog
ancient lynx
severe shell
# hot trout no gifts, no prime

Hmm, so that would be only available from Twitch API because we need to get previous subscribers. But I think there isn't any for that. At least I couldn't find it.

severe shell
ancient lynx
slender jungle
#

I'm not sure this is the right place to bring this up, so if I should move to a different channel or something do let me know.

I'm attempting to come up with a gameplan to do an animated chat bubble behind what chatters say. Any ideas on how I would do this would be great. I'm a baby when it comes to coding so even if there's a specific language I should focus on learning first to figure this out would be appreciated. I have a static image and 30 frame animated bubble already. Perhaps there's a way to Javascript in behind each message and fade out at the same time?

vital wadi
lapis trail
#

Hey there, is it possible to take an variable value out of another Streamelements Widget so i can set there an Text like "1342" in an widget named "Test" and put it in an text element in an Widget called "Result"

severe shell
# lapis trail Hey there, is it possible to take an variable value out of another Streamelement...

Exchange information between widgets are only available using SE_API, which is like a small database. More information here: https://dev.streamelements.com/docs/widgets/186263f447d1d-custom-widget#se-api

You can insert information using: SE_API.store.set('keyName', obj) and get information using SE_API.store.get('keyName'), i.e.:

obj = {
  username: 'c4ldas',
  points: 30
}

SE_API.store.set('information', obj) // it will store the information { username: 'c4ldas', points: 30 } to the database called "information"

SE_API.store.get('information').then( res => {
  console.log(res) // { username: 'c4ldas', points: 30 }
})```
lapis trail
#

Oh that will be really usefull, thank you very much!

lapis trail
severe shell
lapis trail
#

And I could imagine that the async dosn't have enought time to save the information

#

Or does the alertBox dosnt support the API?

severe shell
#

I mean, SE_API.store specifically

lapis trail
#

Oh alright, thanks - Then i have to find another way to save variables from an alertBox - Maybe you know another way - Becaus i am trying to get the username that follows and put it in an custom overlay in an text element (I make an overlay and the overlay should display the latest follower, bits, Subs etc.)

severe shell
lapis trail
#

The bar looks like this:

#

I think i can work with the widgets that should work for mine if i change the code a little bit

#

Thank you very much again!

severe shell
# lapis trail

You know you can always use the Labels inside the overlay editor, right? So you don't need to work with the trouble of saving data or anything

Blue + sign > Labels > Followers > Latest > Latest follower

lapis trail
severe shell
#

If you have any questions after that, feel free to ask here

lapis trail
#

Nice, big thanks again - Have a nice day!

coarse osprey
#

Hey all, I was wondering if anyone in here knew a way to connect obs or stream elements to Spotify so my viewers can request songs and queue them to what Iโ€™m listening to?

proud spade
coarse osprey
peak nexus
#

Hi, I'm trying my hand at the SE:API at the moment and on the website it says that if you make a SE_API.store.set, you can receive an event from any other widget. But for me this event is only received from the same widget, can someone help me how to receive this also with another widget?

hardy walrus
#

@peak nexus think some of the conversation above may be of help.

severe shell
peak nexus
#

Does this also work with two different widgets

#

Because in my case, i have a widget were the se_api.store.set function is and i want to get this event in another widget

severe shell
dim hound
#

What's the best way of having an users profile that's typing a message thru the widget? Because I made some tests with decapi.me API and when there's a message flood, an error occurs saying because of "Too Many Requests"

severe shell
dim hound
severe shell
# dim hound What I meant by profile is actually the profile IMAGE

Hmm, the profile picture is not available from chat messages, so the only possible options would be using the official Twitch API or decapi (which collects the information from Twitch API)

If you still want to use decapi (because it is easier), a recommendation is that you cache the profile picture URL for each user so you won't need to hit constantly the API and end up getting "Too many requests"

grizzled rock
#

I want to develop my own API that outputs random fun facts in German through the ${customapi} variable in StreamElements bot. When I enter the IP of my server in the browser (ip-of-the-server:port/random-facts), I get randomly displayed facts stored in the .json file. However, when I enter the IP in the bot, I only receive the message 'unable to make a request.' I'm quite a beginner in programming and hope that someone here can help me.

severe shell
severe shell
grizzled rock
severe shell
# grizzled rock It's a windows server to which I connect via remote desktop.

Unless the IP address from that Windows server is available publicly, it is not going to be able to access that server.
For example, IP address starting with:
192.168.*.*, 172.16.*.* or any address known as "Class C" are not available publicly.

If you have no idea what I am talking about, you can ask to a friend from another place to access the address you informed and confirm if they are able to see the fact on the browser (ip-of-the-server:port/random-facts).
Does that server have a public hostname? It is easier to access than using IP address.

grizzled rock
grizzled rock
severe shell
grizzled rock
severe shell
#

An alternative is creating an account on replit.com or similar website and host your code in there.

grizzled rock
severe shell
#

They have https natively

grizzled rock
severe shell
frigid dagger
#

I'm having a problem with my custom alerts. Every time I change the scene in OBS, the alerts that have already appeared repeat again.

severe shell
ionic terrace
#

Hi, I was wondering if it is possible to create a custom command for twitch to display the information in a person's about section/bio. Would this custom api be possible?

rigid dome
#

what's the easiest way to send a widget to another person?

I'm currently having them make a new overly with a custom widget and copying all the HTML/CSS/JS/Fields/Data by hand.. is there a simpler or quicker way?

gray dome
#

Any update on the organic paid sub counter? For the updated rule of 350 paid subs getting us 70/30. Thanks

wheat palm
#

Hi does anyone faced with this issue before?
I am trying to authorize user with link https://streamelements.com/oauth2/authorize?client_id=xxxxxxx&response_type=code&scope=channel%3Aread&redirect_uri=https%3A%2F%2Floky.shop but whatever i do always receive
"The redirect uri does not match"
response.

hardy walrus
#

Are you already approved with your app?

wheat palm
wheat palm
severe shell
severe shell
wheat palm
#

but lmao

#

I can't visit url but if sent request to endpoint with bearer token of my account it works

#

Is there a reasonable explanation for this?

wheat palm
severe shell
# wheat palm i filled the form and got creds

Ok great, if you received the credentials from streamelements after fill the form, that's right.
Just to test, try to change the encoded characters from the URL and replace with characters without them:

https://streamelements.com/oauth2/authorize?client_id=xxxxxxx&response_type=code&scope=channel:read&redirect_uri=https://loky.shop

wheat palm
#

i tried almost every way to fill uri

#

I mean most funny part of this issue is

#

for other client-ids you can type any uri

#

like for this client id

#

๐Ÿ˜„

#

do you have any idea about it ? @severe shell ๐Ÿ˜›

severe shell
severe shell
wheat palm
#

::D

severe shell
#

You can

robust flame
#

Hi, is it possible to do following with StreamElements:

For each certain amount of x bits / y subs / z donations via StreamElements a part of the screen should be unhidden from a picture (toggle unhide/hide) for a certain amount of time?

severe shell
# robust flame Hi, is it possible to do following with StreamElements: For each certain amount...

It is, you will need to create a custom widget for that using HTML, CSS and JS.

You can read the amount of bits, subs and donations from onEventReceived. You can find more information here: https://dev.streamelements.com/docs/widgets/6707a030af0b9-custom-widget-events#on-event

The values you are looking for are:

obj.detail.listener == 'subscriber-latest' // subscriber
obj.detail.listener == 'tip-latest' // donation```
And then, you can check the values of `obj.detail.event.amount`. Well, you will need to work on some variations, as gifted subscriptions, amount of subscriptions and things like that.
robust flame
severe shell
robust flame
#

Python is the only programmer language i know ^^

So i need to learn HTML, CSS and JS?

severe shell
robust flame
#

So, that overlay editor gives me access to the events from SE Websockets, right?

With JS i can then set the toggle function, html contains the pic i want to hide/unhide and css is for positioning, right?

hardy walrus
#

Lemme find a widget that may help you

robust flame
hardy walrus
#

It designed to reveal in patches as the video shows but shouldn't hurt to tweak for full reveal #widget-share message

severe shell
hardy walrus
opaque wasp
#

How is this possible that this account is missing the cheer-session parameter?

severe shell
robust flame
#

@hardy walrus @severe shell thank you i will check these samples ๐Ÿ™‚

dusty pilot
#

I received my oauth2 details recently but I'm having issues with the authorize endpoint
In all honesty I also forgot which redirect URI I provided on the form as it was a while a go. I sent an email to get the uri confirmed and still waiting on a response.

In the meantime, I just wanted to check that it is infact a bad redirect URI that is causing the issue.

I get the following response when hitting oauth2/authorize

{
    "error": "invalid_request",
    "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
}

I have client_id, redirect_uri and response_type as params

severe shell
dusty pilot
#

I had this commented out in my code so I glanced over it. (I think because the docs say its not required)
I still get the same error with scope being passed.

severe shell
dusty pilot
#

Trick: You can check your correct redirect URI from browser console, when run the link above, even when you put the wrong one
Lifesaver!

Yeah thats working now, cheers!
Looks like it just needed the correct redirect_uri

dusty pilot
#

To follow up on the above, after using the returned code for the /token endpoint I get

{error: 'unauthorized_client', error_description: 'The client is not authorized to request a token using this method.'}

JS Test Snippet

fetch('https://api.streamelements.com/oauth2/token', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
  },
  body: `grant_type=authorization_code&client_id=${clientId}&client_secret=${clientSecret}&code=${code}&redirect_uri=${redirectUri}`,
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

NotLikeThis

rigid dome
#

is there a widget event for when the user goes live or ends stream? or when a session starts/ends?

frigid dagger
#

it's possible remove the message div when haven't no message?

severe shell
frigid dagger
#

like the name appear and in one second it update to the next

severe shell
frigid dagger
#

for the alert, I will show the name name of gifter, and in my subtrain I want show name of all subscribers gifteds

#

like a array

severe shell
# rigid dome is there a widget event for when the user goes live or ends stream? or when a se...

There is a Websocket event when the user goes live.
Event name: "stream:update"
Data: true (yes, the data is only the boolean true)

As for awidget, not exactly. But you can use a trick. Activate the chat bot module "Live Announcements" (Streamelements dashboard > Chatbot > Modules > Live Announcements), and choose a specific text.
When you go live, the bot will send that specific message on your chat. Just capture the message using onEventReceived, confirm the message is from Streamelmements and the content is the same, and you have it.

You can also use an endpoint that informs if the user is live, but you would need your JWT and that's not a good option for a widget. You can also use
https://api.streamelements.com/kappa/v2/streams/ACCOUNT_ID/live
Method: GET
Authorization: Bearer JWT_TOKEN (you can also use oAuth ACCESS_TOKEN)
accept: application/json

rigid dome
severe shell
# frigid dagger for the alert, I will show the name name of gifter, and in my subtrain I want sh...

I don't remember exactly how SE groups the community subscription, but I'm sure they do not put everything in just one event. I know one of the events show how many community gifts were given and there is one for each user subscribed.
In each one of them, there is a groupCommunityId key (or something similar) that uses the same key. So I believe you would take that ID and group the users in that event.

Unfortunately, I don't have the schema for community sub gift. And the emulate option does not provide the same information as the real event.

wraith anchor
#

Is there a way to set up a field in a custom widget to accept custom fonts - like you would do in the Text Settings of the default chatbox? I want to allow the font type to be changed, but allow custom fonts as well instead of only google fonts to be selected from the dropdown

frigid dagger
severe shell
# wraith anchor Is there a way to set up a field in a custom widget to accept custom fonts - lik...

Yes, you can create a googlefont field and a text field. If the user types the custom font name in that text field, that will be used, otherwise, the googleFont will be selected.
The googleFont name you are going to use in CSS like you normally use and the text field you can use on JS checking if there is any value in it. If so, just change the font style to that.

window.addEventListener('onWidgetLoad', (obj) => {
  fieldData = obj.detail.fieldData
  if(fieldData.customFont != ""){
    document.getDocumentById('YOUR_DIV').style.fontFamily = fieldData.customFont
  }
})```
There are some widgets using that. I recently created one that does that: 
**Top Subgifters by session**
https://streamelements.com/dashboard/overlays/share/64b179e81c578cf96f011145
wraith anchor
severe shell
# frigid dagger Like.. use the numbers of gifted people and take the last gifted persons based o...

Yeah, something like that. One of the events show how many gifts were sent and the ID.
Then, you can check the next alerts to compare if the group ID is the same. Once you have the same amount, you stop counting.

Well, I'm just providing a rough idea of how that could be done. Maybe there are easier ways, but since I don't have the values of each event, my line of thinking went in this direction.

frigid dagger
#

directly in DM

tribal zenith
radiant hound
#

Random question, but does anyone have a working widget or tips for a working widget for a YT chat? I'm struggling with keeping a YT chat working. They work 1x and then don't come on the next stream.

hardy walrus
#

Unfortunately any of the custom chat widgets made in the server are for twitch only and youtube themselves don't make it easy as it's a "queued" chat basically.

radiant hound
#

Thanks!

#

Not great news but it is what it is

#

they work - 1x, and then they stop. thats the part that stinks

severe shell
severe shell
frigid dagger
subtle geode
#

my se chatbox isnt displaying messages, any idea how to fix this?

severe shell
severe shell
rigid dome
severe shell
# rigid dome How do you get a link to an overlay like that for sharing?

I shared some overlays I made with the community (#widget-share) and got sharing permissions after they went published.
But you can use the new Elements (Beta) that has the option to share your creation natively.
https://www.youtube.com/watch?v=QEVXVRANlag

In case you still want to use the old Overlay Editor, you can also apply for one-click overlay sharing here:
https://strms.net/shareoverlay_request

Alternatively, you can use this tool I made to share with a friend just using a simple code: https://seapi.c4ldas.com.br/overlays (instructions here: https://github.com/c4ldas/c4ldas-seapi#readme)

frigid dagger
severe shell
frigid dagger
#

I didnt know this

#

let me check here

candid nebula
#

Ah I need to apply for OAuth T^T

#

Ack- Can I not apply as an individual?

severe shell
candid nebula
candid nebula
#

Wonderful!! Thank you so much!

pulsar willow
#

I have an issue where the css/js of a custom widget is not consistent with the same local file browser source code

#

tl;dw there's a news ticker, after 1 minute it plays a chime and a blue news ticker appears next to the logo, it goes from right to left, goes away for 30 seconds, and then a new news ticker appears every 30 seconds until the end of time - this works in browser source but not in the streamelements overlay

candid nebula
#

For some reason timing is weird when I have both running at once, at least for me.

pulsar willow
severe shell
# pulsar willow

Honestly, I didn't get what you want exactly.
Also, it would be good to understand the issue if you share the code you are using. Maybe there is some CSS or JS option that is not available on either OBS or SE Overlay

pulsar willow
#

separating it to css/js or putting it all in the same place yields the same results

pulsar willow
#

i tried to use chatgpt to refactor it to find a workaround, nope

still juniper
# pulsar willow Putting all in the html, this works as a local file, but doesn't work in streame...

If that works in a local file as you're expecting is by pure luck / unknown reasons, because you have a couple of issues. First, you have bad timings / a race condition-ish. The issue is here:

        let tick = () => {
            changeText();
            tickerContainer.style.transform = "translateY(0%)";
            setTimeout(() => {
                audio.play();
                tickerContainer.style.transform = "translateY(100%)";
                tickerText.style.animation = "none";
                tickerText.offsetWidth; 
                tickerText.style.animation = null; 
            }, 60000);
        };

        setInterval(tick, 30000);

You're scheduling tick to run every 30s, but every tick call schedules some stuff (tone + hiding of ticker) 60s later. So, let's assume a time base in which 0 is the time at which tick is called for the first time. You update the text and show the ticker at 0, and schedule it to hide at 60. However, at 60 you're also running tick for the 3rd time, so the code is showing and hiding the ticker at the very same moment. Now the real question is what it does first, showing or hiding it. If it shows it and then hides it in the same half a second (so to speak), the ticker will never be visible.

Once that's solved and your blue bar is shown, still no text will be visible after the first tick run, because you're removing the text animation and never resetting/re-applying it, so your text will be hidden in the left side offscreen

rigid dome
#

is there a nice way to get streamlabs (i know sorry..) dono info into a stream elements widget?

The widget is meant to track subs/bits/donos, however some people are telling me they prefer using streamlabs for donos, so it's putting me in a real pickle

hardy walrus
#

And not to say we won't help you do it but because we don't know how their system operates it isn't something we can help with without only being able to help with half of it.

wintry geyser
#

so i tried to use chatgpt to make a csgo case roll overlay and the code i got does not display the roll at all

#

what can i do to make this work im not a fan of the whole wheel spin

hardy walrus
#

What do you want it to look like at least? MS Paint pic preferred aha

wintry geyser
#

kinda like a csgo case roll but i can change the images and names to what i want (gif for ref)

hardy walrus
#

Yeah. That's what I was figuring LULW

wintry geyser
candid nebula
#

@severe shell Apologies for the ping! But could I dm you my prototype? Itโ€™s a different take on your widget installer and would love to hear what you think!

severe shell
# rigid dome is there a nice way to get streamlabs (i know sorry..) dono info into a stream e...

Is there a way? Yes... Is there a nice way? Definitely no! Too much work for a simple thing. It would be easier if the streamer just changed to Streamelements donation or try to design a Streamlabs overlay instead.

Well, how to make it work in Streamelements overlay:
Create an application on Streamlabs, have the user to authorize your API, obtain the access_token and use that to get a socket token. From the Streamelements widget, create a connection to Streamlabs Socket API, and monitor for donations.

rigid dome
severe shell
severe shell