#dev-chat

1 messages ยท Page 51 of 1

whole mural
#

itd be fun for mods to risk their modding on a game

hardy walrus
#

Only way possible would be if streamer is using the custom bot name then mods could do it via commands.

#

At least from what I think.

viral patrol
#

@whole mural I think if you use custom bot name (your streaming account), it should be possible to unmod users ๐Ÿ˜‰

whole mural
abstract solar
#

Hello. How can I make such a command ??
command: !message
code: "user" on channel "n" wrote "n" number of messages in the chat

pulsar willow
#

Hi, does anybody know how I can integrate my Webcam into "video on command" so that my viewers still can see my stream while the video is playing?

Someone got an Idea for me? ๐Ÿ™Œ๐Ÿป

wooden isle
#

Does someone know of an API for a custom command that will the date and time (12 hour)?

pulsar willow
#

Does someone know, hot to show up the trackid in a Livestream?

I got 2 Laptops, one for streaming and one for music.. Is there a plugin or something?

whole mural
#

what needs to be changed in this command to make it work with streamelements
$(eval a=$(urlfetch json https://pastebin.com/raw/RL6bTv7T).split(,);a[Math.floor(Math.random()*(a.length-1))])

hardy walrus
#

@elfin arch

elfin arch
#

๐Ÿคฃ

#

what are we trying to do @whole mural

whole mural
#

its suppose to spit back a joke

#

it worked with nb

elfin arch
#

you want a random response from a pastebin?

whole mural
#

people in the stream i mod love this command I set it as !surprise $(random.pick '/timeout $(sender.name) 60 BOOM RIP')

whole mural
elfin arch
#

does that random.pick timeout one work? that is amazing~

whole mural
#

yes it does, it only times them out for 60 seconds

#

i got someone live on stream to pop into this chat (they are from within the wider community) and trolled him with it

elfin arch
#

hahaha. that's awesome.

whole mural
#

boom rip is the timeout reason

elfin arch
#

...there is a pastebin api somewhere; i just gotta find it

whole mural
#

got it $(customapi.https://api.thefyrewire.com/twitch/pastebin/RL6bTv7T?return=&)

elfin arch
#

does that work @whole mural ?

whole mural
#

yes it does

elfin arch
#

hahah nice! cause that was the only one in the chamber

whole mural
#

!cmd add ad /commercial should in theory run a commercial, right?

elfin arch
#

if bot is a editor in twitch; your theory checks out

whole mural
#

is there a way to have a command to both work !commandbase @whole mural and return @user xyz and also work !commandbase xyz outputs

elfin arch
#

?

whole mural
#

it wasnt meant to ping notuser

#

i have $(1) type (!surprise) for a chance to win a free tier 1 sub to xyz but it wont work if i dont @ someone

#

but i want it to work regardless if i want to tag or not

tribal zenith
#

$(1|'')

elfin arch
#

you want it to grab your target or a random user?

#

or ^

whole mural
#

i assume that's similar to if commands in excel, where "" basically means if nothing then display nothing

#

that's not worked, it still wont respond to the command if i dont @ someone

tribal zenith
#

it's a fallback, yes. If no 1st argument is given, it falls back to the value behind the | . In this case it just outputs an empty string then

#

how do yo call it?

#

just !command ?

mortal knotBOT
#

@restive anvil You can add, remove and make changes to custom commands in chat with !command/!cmd flags:

!command add (commandname) (commandresponse) - allows you **to add **a new custom command
!command remove (commandname) - allows you to delete a custom command
!command edit (commandname) (commandresponse) - allows you to edit an existing custom command
!command show (commandname) - allows you to see the raw response of a command before variables are used
!command options (commandname) -(flag) - allows you to change settings for an existing custom command

!command alias basecommand - Shows the alias commands for !basecommand
!command alias add basecommand aliascommand1 aliascommand2 - Adds alias commands !aliascommand1 and !aliascommand2 for command !basecommand
!command alias remove basecommand aliascommand1 - Removes alias command !aliascommand1 from command !basecommand

Valid flags for !cmd options include: -enable -disable -cd (number in seconds) -usercd (number in seconds) -cost (number) -level (number) -type (say, whisper or reply) -count (number)

Syntax example: !cmd options twitter -usercd 60 -type reply -level 250

whole mural
#

this is where the issue is, it works for the latter, but doesn't respond at all without the @ of a viewer

#

it works if i !command . or tag someone, but if i just !command then it doesnt work

elfin arch
#

!command and !cmd are "protected" commands ... so i'm surprised you got that far

whole mural
#

sorry im using !command in place of the actual command

elfin arch
#

ah ok; ... was about to say; ... you sure you using SE bot ๐Ÿ˜‰

whole mural
#

yes, im sure, because this is a lead up to the troll command i leeched from the russian roulette command, to troll people into timing themselves out

#

haha

elfin arch
#

what Reboot said $(1|'') ?

whole mural
#

$(1|'') type (!surprise) for a chance to win a free tier 1 sub to Streamer works if you have a target, but doesnt respond if you dont have a target

elfin arch
#

try with {

whole mural
#

no difference

tribal zenith
#

ah wait no, I was stupid. It's ${$(1)|''}

whole mural
#

ah that one worked

elfin arch
#

^ that looks about right

whole mural
#

but when i copied it across originally, it put the ' ' together which didnt work

#

excellent, i have caught about 20 people with this set of commands

#

thank you all for your help in trolling people

elfin arch
#

๐Ÿคฃ

whole mural
#

currently i use the above command to entice people to use my !surprise command which despite having a random.pick variable, only has one option to pick from, despite the fact i was considering adding /ban option to the /timeout

#

there are some sadists though who enjoy using the !surprise command

elfin arch
#

the /to 5 /to 10 /to80085 it's a a gamble.... ๐Ÿคฃ depends on your community

whole mural
#

im targeting it at long term community members, or people who already have a sub, its a community i am a mod in, i dont have this size community to troll, but i will be adding it when i do

whole mural
#

okay, so the ${$(1)|' ' } doesn't allow for a @'ing someone, but does just allow for !win

#

i somehow got the same person 3 times, before they realised that it wouldnt give a free sub

tribal zenith
#

${@$(1)|''} would be to @ someone

swift jasper
#

do I have to use Obs Live to use the features on my streamdeck such as "mute alerts", "pause alerts" etc.?

#

I guess Im just gonna use Obs Live

dawn kettle
#

how can I increase the size of viewers how have followed, subs, etc. on the credit roll, the headers and list names are increasing, but the usernames are not, when I try it doesn't change

dawn kettle
#

Can someone answer my question please

viral patrol
spiral rapids
#

hello guys, I have a problem on my alert. I use OBS Studio as my software. I made my own alert using custom CSS, but it actually doesn't appear the same as what I made in stream elements. is there anyone who know why is that?

tribal zenith
#

different Chromium versions

#

OBS BrowserSources are always some versions behind and don't always support the newer features of CSS and JS

spiral rapids
#

so it's imposibble even if I use autoprefixer? @tribal zenith

#

I tried convert my CSS using autoprefixer, but it still the same.

tribal zenith
#

it's probably just one line with a special css "function". Are you using min() or max() or something like that anywhere?

spiral rapids
#

yes I use max()

tribal zenith
#

yeah, that's what doesn't work

#

depending on what it is for, you may have to use min-height, max-height for example

spiral rapids
#

oh yeah you're right, I want the username to slide but I need to put limit on it so it doesn't go out from the box. I'll try to use other methods, thank you @tribal zenith

tribal zenith
#

for width and height there are min- and max- prefixes to limit the possible range

spiral rapids
#

okayy I'll try, thank you!

dawn kettle
gleaming laurel
#

Hey guys. I am trying to embed audio into my stream elements overlay that I am building. I want the audio to just play in the background. I figured if I could add it as an audio source, with auto play, and on a loop. Is someone able to assist checking the code to see why this isn't working for me? I put it in and nothing happens.

tribal zenith
sturdy oak
#

That's actually not a bad idea to have your always playing copyright free playlist in your widgets and adjust the audio via OBS

gleaming laurel
#

It's a song I wrote. It's about 30 seconds long. I am on the streamelements wesbite and I created an overlay. I can't figure out how to embed it

tribal zenith
#

In your custom fields you can add

"yourSong":
{
  "type": "sound-input",
  "label": "Sound-File"
}

and in your HTML

<audio autoplay loop>
  <source src="{{yourSong}}" type="audio/mpeg">
</audio>
gleaming laurel
#

Let me give that a shot!

#

@tribal zenith I did that, and nothing happened.

tribal zenith
#

yes, that just added the field. Now you have to go to your widgets settings and upload the sound file there

gleaming laurel
#

Right. It didn't give me the option to upload anything. The settings showed no changes

tribal zenith
#

you might be missing a comma before the new field

gleaming laurel
#

Okay let me check

tribal zenith
#

so you should have a comma after every closing curly bracket }, except the very last one

gleaming laurel
#

I think I got it! Thanks for the help!! ๐Ÿ˜„

tribal zenith
#

no problem. You can adjust the volume in your OBS, if you tell the BrowserSource to route the audio through to OBS. It's a checkbox near the bottom

dawn kettle
#

Can someone help me PLEASE

tribal zenith
#

you can change line 87 in the CSS to font-size: {{fontSize}}px;

tribal zenith
atomic pine
#

Hi clever people, justt wanted to know if when an event occurs is that implement on streamelements end as a queue or is it possible to have multiple events at the same time...just wanted to know if I should be pushing my events to a queue because I only want the widget to process them one at a time.

#

never mind just thought I need to implement a queue anyway due to the animation being 12 seconds...Thanks all the same

tribal zenith
#

if you want more control over it, you could still implement your own queue

atomic pine
#

thtanks Reboot

#

this is exactly what I wanted thank you sir

tribal zenith
#

np. In case you haven't already, you may want to take a look at the whole documentation ๐Ÿ˜„

atomic pine
#

lol yeahh probably a good idea lmao

steady condor
#

is it possible to increment a counter using the api? i only see a way to get the current value in the docs

hard spear
#

Hey where can I find information (documentation, ideally) on the 5th tab that appears when editing widgets ('data')? I'm fairly certain that's new/wasn't there the last time I was working on widgets, don't know how to use it/what it can do and so I'm curious

daring crow
#

Hey! Was wondering if anyone knows if it's possible to have a kappagen widget that plays when someone does X amount of cheer?

So say someone gives you 1000 cheer that can trigger kappagen.

Or if someone could help me setup that up?

pulsar willow
hard spear
#

I think 100 is the upper bound server side (that or 1000) you'll need to split it across multiple requests; I had a similar this I was trying once and it didn't seem worth it tbh

wary tusk
#

Where can I find documentation about pushing to the streamelements API? I just found out about it a moment ago so I would like to look into how I can tap into it from python

whole mural
#

Quick question relating to having used custom CSS for alerts, if adding sounds as well, does that need to be done via the CSS, or is uploading it like normal sufficent? I've just uploaded a sound but the alert isn't even emulating, let alone making the sound

wary tusk
#

@pulsar willow not sure if you are comfortable with coding but you could probably do those requests via for loop

wary tusk
#

Terrific! Thank you!

gloomy kestrel
#

You're welcome!

pulsar willow
#

But I can't get any other users. Even if I will change limit to 1, it's gonna still show me the first 100 users.

#

I think that someone wrote this documentation wrong.

viral patrol
#

That one was replaced with hardcoded limit AFAIK.

pulsar willow
#

Oh, so there is no way I can get users above 100 limit? ๐Ÿ˜ฆ

narrow oxide
#

Hey there! Is there a way to get bits that are donated through extensions on twitch to count towards my bits goal for the week/month? I have an extension that allows viewers to use bits to play sound effects during the stream but these don't count towards my bit goal for the month.
Thanks in advance!

dawn kettle
#

I have been asking my question for 2 days now....can someone PLEASE answer it?

tribal zenith
#

and you already got 2 answers

dawn kettle
#

that I said didn't work, then was totally ignored

tribal zenith
wary tusk
#

Is it possible to push strings to API into an object in a particular scene?

tribal zenith
wary tusk
#

Run a Python script which generates words and pipe those into a text image on the screen in an overlay, as well as relay information about instrumental music playing such as name/producer etc and other information, perhaps additionally coding chat messages to accompany it as well

wary tusk
#

We have a team of streamers working on a unified project and synchronizing things through a streamelements overlay would be quite nice

#

It would be especially nice if I could pass in parameters and change variables in the Stream elements overlay through the API routes, I am not sure how much of that is possible, the only stuff I saw in documentation with regards to the API was for get request nothing about any other type

tribal zenith
#

that sounds like a pretty complex project monkaS
I don't know enough about Python to help you with that, but a more web-based approach would be to use a WebSocket Server.
Multiple clients can synchronously listen to them and you can use the received data in custom widgets to display dynamic contents like text

wary tusk
#

oh I can handle the Python portion

#

no worries there

#

what can you access/change with websockets via Stream Elements?

tribal zenith
#

whatever you want, it's basically a real-time data stream which can emit events. So you can define some events and payloads and then react to them with the given data in the widget by executing your own JS code

#

but you would need your own server of course

fair leaf
#

Hello. Just a question about the Tip API. Is there a way we can accept media request when importing a tip with the API? So far, using both "media" and "songrequest" in the API post has not worked.

whole mural
fair leaf
#

As a custom variation. Would it be possible for let's say a donation variation to be based on which provider was used?

sharp niche
#

is there an offline time api page similar to the watchtime api page?

shell tree
sharp niche
#

yeah

#

similar to

#

I don't see anything in the Docs about it

#

but the bot can get that info so it's gotta be out there somewhere

shell tree
#

To my immediate knowledge, no

#

Nor do I see anything in the API that will do as such

#

But, if youd like to suggest it to our ideas board, feel free!

mortal knotBOT
#

@sharp niche Check out the StreamElements ideas board: https://strms.net/ideas. You'll be able to add ideas, upvote ideas you agree with and track their progress with email notifications. Adding and upvoting ideas also helps the staff know which ideas should be prioritized so please take some time to upvote.

daring crow
#

Is there anyway to have KappaGen activate when people cheer a certain amount? ๐Ÿ˜„

tawdry oyster
#

Hey guys! Quick question: I would like to have my logo on screen (it is a looping webm file) and change the color of the animation once a follower alert was triggered. I was trying to do it via a custom css alert box but I cant figure out how to make the alert animation stay on the screen... It always disappears once the animation time is over eventough I change the css and html code. Is there another way to do that? Thanks Nik

elfin arch
#

what is your skill level of Javascript?

#

.... i'm not great with CSS ๐Ÿคฃ

tawdry oyster
#

Getting back into it! Do you know how to do it in JS?

elfin arch
#

I do.... if i think i understand you correctly

tawdry oyster
#

Awesome! So how does it work?

elfin arch
#

you have a static image (or webM) in your case. when you get an alert you change it to that alert webM for X seconds, then fade back to normal

#

image is always there; you just fade out 1 fade in the other and vice versa

tawdry oyster
#

I don't want the fade back! I want the new webm to stay or replace the old one. Is that also possible?

elfin arch
#

yup.

#

i gotta be quick cause i'm sleep soon; but get your html/css set up; then in JS do the change on the html <image>

tawdry oyster
#

Thanks for your help!

tribal zenith
#

webM is the video format for <video> tags and webP is the image format for <img> tags

deep hull
#

Hey ! I need your help
I'm making a custom widget in streamElements and i would like to have a field appearing only when another field is set to yes.
For example, i have a basic dropdown field with 2 options : "yes" & "no"
When "yes" is active, i want another field to appear below. And when the option is "no" the field disapear.
Is it possible or unfortunately there is no way to do that ?

tribal zenith
#

but you cant update or add fields dynamically

deep hull
#

that's what i thought :/ Thank you Reboot0 !

tribal zenith
#

it's not really a solution to your problem, but you could also set labels, which say that the following options only apply if a certain option was set before

deep hull
#

Yeah i've already done that. I just wanted my fields to be visually more coherent instead of having plenty of unnecessary fields that the user not use

nimble locust
#

I stream on Facebook Gaming.. Can there be a widget to show viewers count on stream? I'm currently using a browser source to my stream stats page on facebook, but is it possible?

hardy walrus
#

@nimble locust Not possible as they don't provide that info.

dull moss
#

is mr boosts minimal chat not compatible with Facebook live? When i try to add it in, it says platform mismatch

hardy walrus
#

That is correct. However I'm sure @broken coyote probably wouldn't mind taking a looksie at it.

broken coyote
#

it is

#

the "widget-share" import is for twitch

#

you will have to import to a twitch provide, then duplicate it over to your FB @dull moss

dull moss
#

@broken coyote thank you! I will do that!

sturdy oak
#

The SE bot work for all three platforms right?

hardy walrus
#

Not facebook.

sturdy oak
#

ahh alright

sturdy oak
#

Can messages be deleted with the SE API

shell tree
#

Single messages?

#

No

royal geyser
#

could someone help me with an JS snippet?

#

i had looked on this ->

            } else if (message == userOptions['command4']) {
                if (!command4_isOnCoolDown()) {
                    let sfx = new Audio("{{audio2}}");
                    sfx.volume = userOptions['volumeaudio2'] * .01;
                    sfx.play();
                    sfx.onended = function () {
                    allowed = true;
                    }
                };   
            };

i had changed it to

            } else if (message == userOptions['command4']) {
                if (!command4_isOnCoolDown()) {
                    let sfx = new Audio("{{audio2}}");
                    sfx.volume = userOptions['volumeaudio2'] * .01;
                    sfx.play();
                    command4_lastSuccessEpoch = Date.now();
                } else {
                    sfx.onended = function () {
                    allowed = true;
                    }
                };   
            };

#

i think, i need sfx.onended in the if, but something is wrong or should i add it so

            } else if (message == userOptions['command4']) {
                if (!command4_isOnCoolDown()) {
                    let sfx = new Audio("{{audio2}}");
                    sfx.volume = userOptions['volumeaudio2'] * .01;
                    sfx.play();
                    command4_lastSuccessEpoch = Date.now();
                    sfx.onended = function () {
                    allowed = true;
                    }
                } else {
                    sfx.onended = function () {
                    allowed = true;
                    }
                };   
            };
#

i hope i'm right in this chanel xD

#

Okey, sorry for asking, yes, this was the right one

undone orchid
#

how can I change the "last tip name" with "last user message" via the bot

abstract solar
shell tree
#

Why doesnt it work?

#

Did you replace "username" with your username?

proper mortar
#

I was hoping someone could help me with the Awesome Shoutout widget.....

elfin arch
#

I might be able to; what is the question?

proper mortar
#

When my videos play on streamelements, they're fine. But during live stream there's an echo

elfin arch
#

do you have it open the browser tab too?

proper mortar
#

Not always

elfin arch
#

or have it on different scenes?

proper mortar
#

Does it only need to be on its own scene?

elfin arch
#

if it is on another scene that isn't shut down when source is closed it could still trigger the alert

proper mortar
#

So putting it as it's own source and removing it everywhere else should fix it?

elfin arch
proper mortar
#

Okay, I put it on multiple overlays

#

I'll give it a try. Thank you again, @elfin arch

abstract solar
somber silo
#

It should be ${user} ${urlfetch https://api.streamelements.com/kappa/v2/chatstats/${user}} Works but not exactly, I'm not very good with APIs, cant help you more, sorry

abstract solar
atomic pine
#

Okay so building a custom event queue was fun(had no idea about the pain in the ass but turns out to be good event loop in javascript)....can now take, have events of any length not interfere with the next...happy days!!! My brain hurts, I hate Javascript but starting to love it...Good news have made local test bed now..winning! Till it breaks miserably XD....Thanks for the point to the api @tribal zenith I have read from front to back and in the end had to go with own implementation...All good for future projects now I hope

shadow cairn
#

Hey guys, I was hoping someone could help me set up a goal bar that adds together the combined cash value of both Subs and Donations.

viral patrol
shadow cairn
#

Thanks mate

pulsar willow
#

where on your website can you find commission information ??

cold python
#

hi, can you update a specific counter count through API?

prime tapir
#

Hey guys, how do I get a Client ID for accessing the API?
The docs just point to a broken Google Form.

cold python
#
#

could that help?

prime tapir
#

@cold python They say "Apply for OAuth2 credentials here" but the link is dead

cold python
#

oh, i see, it's not working

viral patrol
#

For personal use you can use JWT authentication (header: Authorization: Bearer YourJWTHere), OAuth2 from what I know is granted to companies tools only.

cold python
#

couldn't post update counter value, probably that option isn't implemented

viral patrol
#

Yes. It is not implemented. The only way to update bot counter value is via bot.

cold python
#

so it seems

prime tapir
atomic pine
#

anyone had an issue where the api doesn't receive messages from chat? if anyone sees a bug please let me know im scratching my head as on other widgets code is working fine.

#
window.addEventListener('onEventReceived', function(obj) {
    if (!obj.detail.event) { return; }
    let listener = obj.detail.listener;
    let evnt = obj.detail.event;
      
    console.log(evnt.data);
    console.log(listener, evnt);
  
  
    console.log("HERE LOUDLY", obj);
    if (listener === "message") {
      const messageData = evnt.data;
      
      let userName = messageData.displayName;
      let message = messageData.text;
      if (userName === broadcaster && message === "!clear_cup") {
        clearCup = true;
        return;
      }


    }
    return;
    
});```
#

im dumb nevermind

#

out of interest the code was working I was in the wrong chat on the wrong account doing the wrong thing lmao...not sure how I get through the day

#

time for a break

left rampart
#

I'm trying to get the total subscribers earned in a session in onWidgetLoad but the documentation seems to be wrong. What key should I use?

#

Nvm. It was non-existent because I myself did not have any subs this session ๐Ÿ™‚

idle vessel
#

Hey pjonp

elfin arch
#

hey. so first up start up a new custom widget

idle vessel
#

kk

elfin arch
#

... for some reason the default one isn't triggering for me ?

idle vessel
#

i think mine is

#

im seeing a bunch of bars

elfin arch
#

if you emulate a redemtion does it show up in the list?

idle vessel
#

yeah, but it is opaque and says "hidden when inactive" at the top

elfin arch
#

1 sec

#

for the JS tab... here is the barebones; i just cleaned up the default code there ```js
window.addEventListener('onEventReceived', function (obj) {
if (!obj.detail.event) return;
if (typeof obj.detail.event.itemId !== "undefined") {
obj.detail.listener = "redemption-latest"
}
const listener = obj.detail.listener.split("-")[0];
const event = obj.detail.event;
if (listener === 'redemption') {
console.log('do something here....');
console.log('event.', event);
console.log('item:', event.item);
console.log('itemId:', event.itemId);
console.log('message:', event.message);
console.log('name:', event.name);
}
});
window.addEventListener('onWidgetLoad', function (obj) {
// do this on load if anytihng needed
});

idle vessel
#

word

elfin arch
#

so now grab your HTML & CSS and override the existing code in those tabs

idle vessel
#

okay it looks like we are getting there. only problem is it says {name} redeemed {item} instead of filling in those things when I emulate a redemption

#

and then it repeatedly flashes that text even after the animation has stopped

elfin arch
#

so in the js... you will need to inject event.name for the name and event.item for the item

idle vessel
#

sorry, can you explain that a bit more? Apologies, very new at this

#

i see where it says those two things in the above code you provided for js

elfin arch
#

so in your HTML; you will have something like <span id="username-container"></span> is now following!

#

then we can grab the "<span>" named username-containter and say: $('#userNameContainer').html(event.name);

#

so HTML ```html
<div class="awsome-text-container">
<span id="username-container"></span>is now following!
<br>
</div>

JS ```js
$('#username-container').html(event.name);
idle vessel
#

got it

viral patrol
elfin arch
#

๐Ÿคฃ good catch. fixed.

idle vessel
#

i think where its tripping me up is my html is a bit different since i had to modify it for some formatting in the css

#

<div class="awsome-text-container">
<span class="username"> {name} </span>
<div class="loyalty"> just redeemed {item}! </div>

#

is what i've got right now

elfin arch
#

add an ID to each of those;

#
<div class="awsome-text-container">
            <span id='username' class="username"> {name} </span>
          <div id='item' class="loyalty"> just redeemed {item}! </div>
idle vessel
#

got it, and then $('#username).html(event.name); goes where in JS?

#

new lin?

elfin arch
#

i got it like this:

#

your '#username needs the end ' tho ๐Ÿ˜‰

idle vessel
#

got it

#

hmmm

#

still showing {name} & {item} in the text and repeating after animation eneds

elfin arch
#

when you emulate a redemption does that change? or is it staying {name} ?

idle vessel
#

sill saying {name} and {item} instead of emulating

#

oh wait

#

hand on

#

hang on

#

nah thought i had it but didnt

elfin arch
#

haha. crap. .... um.... post a screen shot like i did above with the "event received" down

idle vessel
#

wanna see html too?

elfin arch
#

oh; you might not have the "alert" part yet. delete line 21

idle vessel
#

deleted 21, no change

elfin arch
#

also i updated the HTML up a few posts (we were replacing that whole line) and there was an end </div> missing

#

try just this: ```html
<div id='alert' class="text-container">
<div class="image-container">
<img src="https://cdn.streamelements.com/static/alertbox/default.gif">
</div>
<div>
<div class="awsome-text-container">
<span id="username-container" class='username'></span> redeemed <span id="item" class='loyalty'></span>!
</div>
</div>
</div>

#

JS ```js
window.addEventListener('onEventReceived', function (obj) {
if (!obj.detail.event) return;
if (typeof obj.detail.event.itemId !== "undefined") {
obj.detail.listener = "redemption-latest"
}
const listener = obj.detail.listener.split("-")[0];
const event = obj.detail.event;
if (listener === 'redemption') {
const name = event.name;
const item = event.item;
$('#username').html(name);
$('#item').html(item);
$('#alert').addClass('show');
}
});

#

without the alert show

idle vessel
#

damn i had it for a second by copying and pasting your edit to the HTML aboce

#

but i lost the animation in the process and closed out

#

(the animated video)

elfin arch
#

how long is your HTML?

idle vessel
elfin arch
#

copy paste the code i post above; with the show in there; i thin the alert is defaulting to hidden.

#

drop this in the css at the bottom```css
.show {
animation: fadein 1s forwards;
}
.hide {
animation: fadeout 1s forwards;
}
@keyframes fadein {
from {opacity: 0}
to {opacity: 1}
}
@keyframes fadeout {
from {opacity: 1}
to {opacity: 0}
}

idle vessel
#

if i lose the classes then i lose the font formatting fthat goes with the animated video

#

when copying and pasting the html bit

elfin arch
#

you can add them in; edited the HTML post above

idle vessel
#

still eliminated the text formatting

elfin arch
#

you added the CSS i posted to the bottom of what you already had, right?

idle vessel
#

yeah, but already had some keyframe fades in place so i think those are not conflicting

#

this was my original CSS

#

@fontface {
font-family: Berlin Sans FB;
src: url(\fonts\BRLNSR.TTF);
font-weight: normal;
font-style: normal;
}

.awsome-text-container {
position: absolute;
top: 478px;
left: 39%;
width: 460px;
height: 300px;
padding: 10px 0;
font-family: Berlin Sans FB;
text-align: center;
text-shadow: rgba(0, 0, 0, 0.8) 2px 2px 2px;
}

.username {
color: #FFFF;
font-size: 55px;
font-family: Berlin Sans FB;
animation: fadein 10s infinite;
}

.loyalty {
color: #40efc6;
font-size: 35px;
font-family: Berlin Sans FB;
animation: fadein 10s infinite;
}

@keyframes fadein {
0% {
opacity: 0;
}
25% {
opacity: 0;
}
30% {
opacity: 1;
}
94% {
opacity: 1;
}
100% {
opacity: 0;
}
}

elfin arch
#

yup. you have fadein already. so don't use mine

idle vessel
#

this is what's going on

#

it is stuck in a loop of flashing the text and eventually even showed an item name, but it wouldn't play the animation again until i refreshed the page

#

I've unfortunately gotta get to be though so I think I'm gonna call it here for the night and maybe keep looking into it tomorrow

#

i appreciate all your help though

elfin arch
#

yup yup. were i have addClass('show') change the "show" to "loyalty"

#

& also needs 'alert' in the top line of HTML <div id='alert' class="text-container">

idle vessel
#

have got that

#

both added now

#

but still no change

elfin arch
#

๐Ÿค” ... ya it's late for me as well. i like your animation though! post back here and someone should get another step forward

idle vessel
#

thanks! again, you got me much further than i thought i would tonight

#

MVP

#

i really appreciate it

green stream
#

I have an overlay pack that I got from Nerd or Die that I have been customizing in StreamElements. I'm trying to get the widget to show 'person gifted x subs' but it's not giving me customization options for community subs. I tried reaching out to them and they said that I would need to contact StreamElements because the variations are limited to what you guys can provide. I wasn't sure if there was something that I could adjust in the coding to get it to work the way that I would like. Right now if someone gifts subs it shows each person who received a sub and instead of that I was wanting it to just show up like I had said above with the name of the person who gifted and how many.

viral patrol
#

When you create that, only sub gifts that have more than 2 subs will be caught by this variation and following gift events will not trigger additional alerts

green stream
#

This widget doesn't have those options. It's from Nerd or Die. I've used the option that you have shown on ones from StreamElements before.

#

It's driving me crazy lol

viral patrol
#

Oh. It is eventlist.

green stream
#

So I added it to the bottom of the JS field and it comes up with the sub x3 and is still adding the "receivers" on the event list also.

viral patrol
#

It is not on the bottom. The SE wrapper that NoD has needs update to cover that scenario

#

@broken coyote Can you take a look on the thing above? Also remember about backwards compatibility - you should have a new file with updated version of wrapper, so previous deploys don't break ๐Ÿ˜‰

green stream
#

I'm kind of glad that I'm not the only one having issues figuring this out in a direct path. I'm in no way a coder, I have a friend that is but they aren't very familiar with StreamElements code.

viral patrol
#

MrBoost I mentioned above is from Nerd of Die amazing crew. I hope he knows the answer for that one above.

broken coyote
#

i dont believe i have a wrapper with that. let me look

tribal zenith
#
let giftCollection = {}; // { "Username": { amount: 5, recipients: ["a", "b", "c", "d", "e"] }, ... }

// Gift
if(event.gifted && !event.isCommunityGift)
{
  let username = event.name.toLowerCase();
  let sender   = event.sender;
  // process regular gift here
}

// Subbomb - Main
if(event.bulkGifted)
{
  let gifter  = event.sender.toLowerCase();
  let amount  = event.amount;
  
  if(giftCollection[gifter] == undefined) { giftCollection[gifter] = { amount, recipients: [] }; }
  //wait until all gifts are collected
  SE_API.resumeQueue();
}

// Subbomb - Gift
if(event.gifted && event.isCommunityGift)
{      
  let gifter    = event.sender.toLowerCase();
  let recipient = event.name.toLowerCase();
  
  if(giftCollection[gifter] != undefined)
  { 
    giftCollection[gifter].recipients.push(recipient);
    
    if(giftCollection[gifter].amount === giftCollection[gifter].recipients.length)
    {
      let amount     = giftCollection[gifter].amount;
      let recipients = giftCollection[gifter].recipients;
      
      giftCollection[gifter] = undefined;
      // process subbomb gifts here
    }
    else { SE_API.resumeQueue(); }
  }
}
#

wall of text, but that should cover all gift possibilities

green stream
#

Now is there a way to not show the receipients in the event list? just have it as sender gifted x amount, The event list kind of weirds out when it tries to slam 10-20 names into 5 spots.

viral patrol
#

Hmmm. I wonder about what happens on widget load, if that data contains information about community gift as well (like onEventReceived events), if not - it wouldn't be possible to distinct them from regular gifts.

tiny tusk
#

short question about weather api, maybe someone can help

in the moment i use:
${customapi https://api.scorpstuff.com/weather.php?units=metric&city=khonkaen}
what works fine!

but im moving to pattaya but non of the following is working (chonburi is even bigger city then khon kaen)

${customapi https://api.scorpstuff.com/weather.php?units=metric&city=pattaya}
${customapi https://api.scorpstuff.com/weather.php?units=metric&city=nongprue}
${customapi https://api.scorpstuff.com/weather.php?units=metric&city=chonburi}

Any idea? Thanks a lot

chilly siren
#

hey anyone know if theres a way to change a variable (like a counter) in stream elements using an api?

neon phoenix
#

some issues i run into when enabling custom css ,
the animation i uploaded not showing anymore and a dancing shark show up instead
and couldn't figure out how to replace it with the animation i uploaded in streamelements
there is not guidance there like a link for my animation to past or something
is there is a code or something i should put in the html like {image} or something in order to make my animation work instead of that dancing shark ?????
like in streamlabs enabling css does not replace your current file you upload
its just allow you to manipulate it more and thats what im looking for
like adjusting the position of text and pushing to the bottom using margin-top .. extra

austere ore
#

Hey all, how are you guys debugging your widgets? Chrome dev tools and the preview window?

#

is there a widget developer intro guide or something I've missed that will help me debugging?

craggy totem
#

Hello! Is this a good channel to inquire about missing notifications?

deep hull
#

Hi ! Is there a way to detect redemption message via the "onEventReceived" ? When i type a message on my chat it returns me the obj with the listener "message" but how can i know if it's a redemption message ? Are there any specifics propreties in the obj ?
Thanks in advance

broken coyote
#

@green stream if you give me a bit, im in the process of updating the wrapper for SE. it should be done today

green stream
#

@broken coyote thank you I appreciate that

onyx cloak
#

Hello! i need help in departament of payment

broken coyote
#

@green stream should be good now, just reimport from your download

green stream
#

@broken coyote Thank you very much it is working now ๐Ÿฅณ

bright scarab
#

Hey.. Can someone help me ? I'm trying to make my first widget for Twitch but I cannot animate my css classes. I read and saw some tutorials but not successful at all.

elfin arch
#

are you using keyframes in the CSS @bright scarab for animation?

bright scarab
#

yep.. Actually my problem is using my CSS keyframes in JS

#

I was doing all the job on VS Code and everything worked fine but everything stopped when I passed it to Twitch Widgets Page

elfin arch
#

can you post some code of how you are trying it in JS and the class in CSS

#

or drop it in a codepen / jsfiddle

bright scarab
#

and after the first, I want to reset the animation with another SM-logo and '@'

elfin arch
#

are you having this autostart when loaded?

bright scarab
#

nope .. In streamelements, I passed all the animation to css

elfin arch
#

and do you have the code in the "onWidgetLoad" ... just want to check (i know you can't do that with the code pen). give me a min i'll pull it into the SE widget editor

#

ok; so you are triggering it on an event or timer?

bright scarab
#

i want to trigger on an event and repeat infinitely

elfin arch
#

what is the 'logic.js' in the HTML? that isn't going to load

bright scarab
#

is my js file

elfin arch
#

it's not liking that js link (you can remove if it's the same as the stuff in the js tab)

#

and it's not liking the font links

bright scarab
#

but how can I add this personalized font ?

elfin arch
#

i think it needs to be https://db.onlinewebfonts.com/c/82023538f68f7bb9cc6cd054af2a0aa8?family=Riffic with the https

bright scarab
#

Hmmm

elfin arch
bright scarab
elfin arch
#

can you find a google font that would fit your styling?

bright scarab
#

If its necessary, I can use anyone

elfin arch
#

1 sec; let me send you a link to what i got; seems to match what i see in your codeped

#

it didn't like those links for font so i edited them out

bright scarab
#

Thaaaanks

#

But how you find that error related to the font link ?

elfin arch
#

ctrl+shift+i in Chrome

bright scarab
#

aaah ok

#

thanks a lot !! ๐Ÿ˜„

elfin arch
#

no problem! happy coding

fathom agate
#

So I'm in the overlay section: when i want to make custom animations using HTML and Css, how can i do this, because the code I made dont work at all, hav you got an idea?

elfin arch
#

can you post the code you got in a code pen and post the link here?

ebon wagon
#

Hey guys, I am going to write a code to display a d100 dice on-screen. I have @broken coyote's here downloaded just to start from somewhere (btw, loved the design bro)

The idea is to play an RPG session with some friends and I wanted to change how the event works. Instead of making it when someone types it on chat, I want to change for something that is more doable to do with a group of friends, instead of making them type in chat everytime they are going to roll a dice. I don't mind coding that, but I have no ideas on a good way of calling the function, besides having them to write in chat. Does anyone have something in mind?

elfin arch
#

which widget are you starting with?

heavy thistle
#

Just out of curiosity, would it be possible to link woocommerce with an alert widget to streamelements? If something is purchased in woocommerce > alert widget kicks in the stream.

elfin arch
#

i'm not familiar with woocommerce; but if there is a webhook; then yes

sturdy oak
#

tldr, use webhooks only when wesockets aren't there

elfin arch
#

webhooks are for like something that you don't have control over (like when you go online on Twitch you get a webhook)

#

websocket is more controlled and you talked both ways

sturdy oak
#

True

elfin arch
#

at least that is how i understand it ๐Ÿคฃ

ebon wagon
elfin arch
#

how would you imagine it to work best? somehow the user has to interact with your chat.

#

or with the widget

heavy thistle
#

cool cool!

#

working with woocommerce as a shop and it offers a bit more than the SE merch, so would be nice to be able to integrate that into the stream.

#

don't want to undermine the SEmerch function, but ye..

ebon wagon
whole mural
#

I'll ask the minds of this channel, is there a way to have a command that has a cooldown on it respond when it's used during the cooldown to say something to the effect of "This command is cooling down"

elfin arch
#

negative @whole mural. the purpose is to prevent chat spam ๐Ÿ™‚

#

unless you are doing a custom widget custom command work around

fathom agate
#

just unzip the folder and open "index.html" in your browser

#

i would like to make this in streamelements

elfin arch
#

can you post your code in a code pen or jsfiddle?

fathom agate
#

yeah sure just giver me 2secs

fathom agate
#

@elfin arch

fathom agate
#

^
so what should I do if i want to insert this to streamelements? |

neon phoenix
#

any answer for my question up there !!!!

placid lion
#

Is there any endpoint for the merch ?
Maybe to get a image and item name / price

sturdy oak
#

When a merch purchase event happens?

tribal zenith
placid lion
tribal zenith
placid lion
tribal zenith
neon phoenix
#

not only the margin i may want to do other stuff in css while maintaining the animation i uploaded @tribal zenith

tribal zenith
neon phoenix
#

but why !! ... streamLabs has this option so its not hard for streamElmement dev team to implement it too
i was using streamLabs always but i really wanted to shift to streamElmement
and i was hoping to find it flexible enough , the type of overlays i design for my clients require some flexibility in css and javascript sometimes

tribal zenith
whole mural
#

okay another question for the brainbox that is this wonderful place...
AussieITV [Stalker] - Hours: 90.50 - Points: 16830 a streamer I watch has a command where it responds with this text, the breakdown of it is
Name [This text changes as your hours increase] - Watchtimeours: 90.50 - StreamElementsPoints: 16830

This one has eluded me, and the streamer keeps on forgetting to message me with it, so I am hoping that the brains from here know

fathom agate
#

@tribal zenith so if the listerner equals to "follower-latest" i can run a function which triggers the event that anyone has followed?

whole mural
tribal zenith
fathom agate
#

@tribal zenith yeah that's what i meant

#

ok thx ๐Ÿ™‚

#

and what is the string for a sub?

tribal zenith
#

subscriber-latest

fathom agate
#

ok thx is there any list where i can look up

#

oops haha xD

tribal zenith
#

also the event object in your listeners contains a lot of data, for more customised animations

fathom agate
#

yeah that's very useful, streamelements is a very nice thing

blazing mist
#

so ehh how would i make something that when a viewer enters a command the number on my screen goes up

tribal zenith
pseudo ginkgo
#

Hi trying to set up the bot trivia and its saying missing scopes ive gone to jebaited and set up tokens where do i need to add them?

viral patrol
#

Click widget Settings and in left panel there should be a field for that

pseudo ginkgo
#

where do you add the other token?

#

apologies figured it out haha

blazing mist
tribal zenith
blazing mist
#

ok

#

i just realized u made it Kappa

tribal zenith
#

yep and I get the question on how to change it a lot, so I put it in the description ๐Ÿ˜„

blazing mist
#

:D

#

maybe add an option to not have a goal just a counter :)

tribal zenith
#

yeah maybe I'll do that sometime

warm apex
#

is there a way to use the streamelements merch api to show the items on my website and process tranx there? I love the merch store. I'd like to drive all traffic to my website.

whole mural
#

okay another question
AussieITV [Stalker] - Hours: 90.50 - Points: 16830 a streamer I watch has a command where it responds with this text, the breakdown of it is
Name [This text changes as your hours increase] - Watchtimehours: 90.50 - StreamElementsPoints: 16830

hardy walrus
#

They use a different bot as that mentions a "rank" and changing the response isn't possible.

elfin arch
#

^ what Sudo says is probably correct. they are using a different bot. ... but changing the response is possible if you get into the custom API world.

whole mural
#

thanks

elfin arch
#

let me play with something and see if it works

elfin arch
#

๐Ÿคฃ @whole mural .... how good is your javascript skills?

#

.... hahah i'm trying to build this all into a command ... it ain't gonna be fun/easy to change

whole mural
elfin arch
#

๐Ÿคฃ ... alright ; it's not pretty. but it might work ๐Ÿค”

elfin arch
# whole mural Not at all good ๐Ÿ˜‚

try this for a custom command ```js
${user} [

${customapi https://seapitest.pjonp.repl.co/api/eval?string=$(queryencode "

let points = Number('${user.points}'),
res =
points >= 5000 ? 'FIVE PLUS!' :
points >= 4000 ? 'four plus' :
points >= 3000 ? '3 plus' :
points >= 2000 ? '2 plus' :
points >= 1000 ? '1 plus' :
'newb'

res

")}
] - Time: ${user.time_online} - Points: ${user.points}

very little testing
whole mural
#

I've copied that, if you need to delete the code block

#

Thank you

elfin arch
#

i'll leave it in case anyone in the future is looking for a similar code. that API link can always be forked (copied) and you can make your own. (%100 free).

whole mural
#

I'll give it a trial, and let you know how it will go

#

Thanks again

elfin arch
#

fff there are days?!?

whole mural
#

i just copied and pasted what you wrote

elfin arch
#

ya; that code isn't expecting days

elfin arch
#

is there a 'years' thing too ๐Ÿคฃ

whole mural
#

i dont know

elfin arch
#

well shit; ... ya that is gonna break it all. it was expecting an hour break. (by hours) .

#

.... but levels by days seems extreme

#

what if ranks were by points instead of time?

whole mural
#

it seems like streamelements' default is days hours

elfin arch
#

ya. the command is going to run out of characters to parse all of that. but ranks by Points would work

#

i just noticed in the code above breaks because i had to remove the 'hours' check (so a new user with 10 minutes would count as 10+)

whole mural
#

points would work, just means their rank would change with their bets/gambling

elfin arch
#

that's kinda the point of gambling ๐Ÿ˜‰

#

but also means a new person can get gifted/win into top tier

whole mural
#

yeah, im not fussed if its by points

elfin arch
#

code updated above ^ .... 0 testing ๐Ÿคฃ

whole mural
#

] - Time: ${user.time_online} - Points: ${user.points} is this still making it eval the time? because its still showing time and eval erroring

elfin arch
#

let me check; i just did the Discord edit

#

code works for me?

#

did you copy pasta it 100% ?

whole mural
#

${customapi https://seapitest.pjonp.repl.co/api/eval?string=$(queryencode "

let points = Number('${user.points}'),
res =
points >= 5000 ? 'FIVE PLUS!'  :
points >= 4000 ? 'four plus'  :
points >= 3000 ? '3 plus'  :
points >= 2000 ? '2 plus'  :
points >= 1000 ? '1 plus'  :
'newb'

res

")}
 ] - Time: ${user.time_online} - Points: ${user.points}```
elfin arch
#

did you click save on the command?

whole mural
#

it works in my stream

#

but i added it from the chatscreen for another one

#

using cmd add ... code

elfin arch
#

oohhh ... ya... i donno if you can !cmd add this

#

๐Ÿคฃ

whole mural
#

alrightie, il send it to a channel editor then

#

i wonder if the original would of worked then

#

i was doing !cmd add command

elfin arch
#

the original will break because of the days/hours thing

#

it was expecting hours only .... like 0.5 hours (not 30 minutes)

whole mural
#

ah okay

#

i assume that the '1 plus' is the rank and the >= 1000 is the req'd points for the rank?

elfin arch
#

correct; you can change the rank names and the point levels

#

just don't use " ๐Ÿ˜‰

whole mural
#

cheers hahaha

#

thanks for your help @elfin arch

tribal zenith
hardy walrus
#

No.

#

Custom API.

tribal zenith
#

oh, he just sent the whole block as parameter LUL
Alright

vital wadi
#

this one click install for overlays or custom widgets or anything custom, can anyone do that? or is that something you have to get through the Streamelements team?

hardy walrus
#

@vital wadi It's limited to select individuals/brands and things in #widget-share

vital wadi
#

I see, okay thanks

keen dove
#

wavesHellos, I got some labels that I'd like to update with a 2 seconds delay LUL might sound weird. How and what can I do to achieve this?

boreal chasm
#

I have a quick question re: the websockets api. I am trying to use SE Websockets to trigger some custom javascript (in a local browser source for OBS). My connection code looks something like this:

let JWT =
  '<MY JWT TOKEN>';
const socket = io('https://realtime.streamelements.com', {
  transports: ['websocket'],
});

function onConnect() {
    console.log('Successfully connected to the websocket');
    socket.emit('authenticate', {
      method: 'jwt',
      token: JWT,
    });
}

socket.on('connect', onConnect);

What I am seeing- if I go into my SE dashboard, and replay an old event (say a follow or subscribe), I see the event message come through to my websocket. HOWEVER, any actual events that happen through twitch (say a user Follows during my stream) are never forwarded on to the websocket connection (I never see the event message come through). Has anyone seen this before?

viral patrol
#

There are two widgets on widget-share that can use OBS websockets. I think this could be a good way to start. It is the other way around - it doesn't use SE WS, so if you want to use one - the best way is to use replay from activity feed instead of emulation.

boreal chasm
#

@viral patrol- I'm not using OBS websockets.. I am using the stream elements "realtime" websockets api. I was hoping that SE's api could act as a nice twitch --> my js code relay (as Twitch has made things.. tricky to set up with webhooks)

viral patrol
boreal chasm
#

Thanks for the resources.. I'll definitely give them a look.

#

@viral patrol the last code you posted, is exactly what I'm trying to do, however I am seeing the same behavior. If I go into the SE activity feed and replay a follow, it shows up fine. If, however I go and follow my twitch channel with a dummy account (on twitch), the notification never comes through (both in your code and mine). Am I mistaking how SE's API works?

unique ore
#

Hi, I'm trying to create a chat box of my own and want the box that surrounds the username to be of the username's colour, is there a way to call that into the code?

viral patrol
viral patrol
unique ore
viral patrol
#

Yes. So with the code above you have to change background colour instead of font

unique ore
#

If I do that won't it be a constant colour? For example if someone with a red username I'd like it to change the white box to red and then if someone with a blue username it'd change to blue.

boreal chasm
#

@viral patrol- interesting.. I've got preview live checked, but still am not seeing anything. I guess that leads to 2 more questions (if you happen to know). 1) if a user un-follows then re-follows, will SE not send the event? 2) does my stream have to be live in order for it to see the events? (I am currently not streaming, and am monitoring the widget I made in a chrome tab, and am following/unfollowing with a dummy account)

hardy walrus
#

@boreal chasm 1 is not supposed to happen but does unfortunately get triggered excessively sometimes for "some reason". 2 is no but if nothing is triggering or appearing in the activity feed then I can have staff try to resync your connection.

sturdy oak
unique ore
#

Trying to get line 16 to be the colour of whatever account messages the chat box. If there is any suggestions?

viral patrol
#

@unique ore You cannot do it via CSS, you need to specify style inline for that via JS.

unique ore
#

Ahh, thank you. Sorry, relatively new to coding

viral patrol
#

No worries at all! We're her to help.

tribal zenith
#

also not everybody has a username color defined and gets a random color from twitch everytime they join a chat

#

so the displayColor prop may not have a value

royal geyser
#

@viral patrol hey, i added the changed widget on codeshare, but i had added an false link to the pastebin. i hat send you an dm

boreal chasm
#

@hardy walrus and @sturdy oak thanks for the tips. Re- resyncing my connection- if I trigger a test event in the dashboard, it works fine. I'm guessing it might be the un-sub, re-sub thing. I'll make another dummy account and give it a try that way.

lean river
#

is there a way to access the streamelements API from chat? like if we wanted to show some of the chatstats as part of a command?

mortal wagon
#

@lean river check the message in the header ๐Ÿ™‚ the API documentation is there

lean river
#

i have seen the API docs

#

they require oauth2. so I am maybe hoping someone can guide me on avoiding the auth part or how that would be implemented without having a mirror API for this (or if there is one we can use)

vernal breach
#

I got a VERY interesting question......I have a friend who uses the built in Dynamic Discord Link feature for a reason. My question is:

does anyone know of a way to make a command that will pull a dynamic Discord link?

spring lance
#

ok... so I feel I'm probably being an idiot here

#

for example

curl --request GET   
--url https://api.streamelements.com/kappa/v2/sessions/rainbowlacesmusic   
---header 'Accept: application/json' 
--header "Authorization: Bearer <JWT Token>
#

Just gives me

{"statusCode":403,"error":"Forbidden","message":"No channel authorization found"}
#

with the JWT Token

#

and

#
{"statusCode":401,"error":"Unauthorized","message":"jwt malformed"
#

(which led me to use the JWT token in the first place)

#

@here what am I doing wrong?

spring lance
#

anyone here?

elfin arch
#

and i'm not sure about the triple --- before the Accept header (i don't use curl)

spring lance
#

@elfin arch thanks yeh I corrected the --- thing but made no difference and unfortunately the missing " was a typo in discord and not in my terminal ๐Ÿ™„

#

and no, not putting the token between < >

elfin arch
#

๐Ÿค” ... one sec; i'll test the endpoint

#
curl "https://api.streamelements.com/kappa/v2/sessions/5961d0a0c481d33bb8eb95c9" \
 -H "Authorization: Bearer eyJhjoidHdpdGNoIiwi....U" 
#

that gets a 200 response for me. Sorry for asking about the <> i've learned to never assume that everyone knows to not use them ๐Ÿ™‚

lyric wave
#

But apparently, Month just gets the Last 28 days, not the current month

elfin arch
lyric wave
fiery linden
#

how can I do to put the option and to donate with the card for those who want to donate

#

btw i need to assosciate a credit card with my paypal account?

snow summit
#

Is there a way to tether a bot counter to a progress bar?

royal geyser
#

Hey, is there a way to use the loyalty points in widgets? I donโ€˜t had seen it in the api yet.

viral patrol
#

@royal geyser You can check widget-share. The most recent widget by pjonp, bot trivia or heist game.

royal geyser
#

Ah okey i will look on it,

I will try to add this also in the video on command widget ๐Ÿ™‚

For me it worked with global cooldown, i hope it is okey what you get ๐Ÿ™‚

tribal zenith
#

only coming in to self-promote my shit. maybe I should also include my soundcloud Kappa

sturdy oak
viral patrol
unreal kestrel
#

Anybody have any luck or success with accessing or modifying the goal widget data via the API? I am looking through the documentation now and see some references to session data which is close but not the cigar I am looking for.

sturdy oak
#

If yes, then you could use SE.API_save()

viral patrol
#

@unreal kestrel The only way is to use GET on /sessions/:channelId, update value in returned object and use PUT on the same endpoint with payload being JSON.stringify(modifiedObject)

unreal kestrel
tribal zenith
#

can't you use chat counters for that?

unreal kestrel
#

Update the overlay in OBS via chat, I mean.

#

I have an end command that ends stream, updates title, updates category, switches to the starting soon scene and refreshes overlays. I am trying to figure a way to add in a way to reset goals to 0 too.

viral patrol
#

Huh, you can use session based goals

#

Without need to reset them

unreal kestrel
#

That would probably work out well for a sub goal.

viral patrol
#

It allows you to set goals like session/weekly/monthly subs/tips/cheers

unreal kestrel
#

Short term goals and the like.

#

Hmm interesting.

#

Then long term goals, just use the regular goal widget.

tribal zenith
#

you could also reset session data via API, but I guess that clears every field

unreal kestrel
#

This could work, I think, yes.

viral patrol
#

The way I posted above allows you to change values of session data without clearing it completely.

fiery linden
#

how can I do to put the option and to donate with the card for those who want to donate
btw i need to assosciate a credit card with my paypal account?

frank trout
#

question about custom widget and loading libraries via the html bit: i'm using an unsupported/experimental Web API pertaining to animations, something that the current CEF-based browser in OBS does not support, i.e., Element.getAnimations does not exist. I found a polyfill that complements this by supporting the API for older browser versions (namely chrome 56+). Be that as it may, when I add the overlay in OBS, i can see in the logs that getAnimations is not defined. Which is pretty sad Sadge is there any other way around this? i'm guessing the alternative would be trying to recompile obs and a version of obs-browser that suppports a newer version of CEF

frank trout
#

^ disregard, getAnimations is still experimental in the polyfill itself and it doesn't quite behave how the native one does. sorry for expending your time with this

clever roost
#

Hello. I need help. Can i set command for giving loyalty points to random chatter? Something like "!addpoints ${random.chatter} 100" and can i set this i "timers"? Thank you.

hardy walrus
#

No. Has to be manually done by an actual person.

clever roost
royal geyser
#

how could i send my overlay to my friends?

twin ore
tropic finch
royal geyser
#

Thanks all, i hope, the changings of the widget would be added in widget share soon ๐Ÿ™‚ xD if lx had questions, please ping me. ๐Ÿ™‚

tepid hull
#

so i saw this on nightbot on someones stream can streamelements do this too?

hardy walrus
#

@tepid hull Yup. Gimme a sec to find that as it was recently discussed ffor another reason in another channel.

#

${customapi https://api.scorpstuff.com/weather.php?units=metric&city=${pathescape ${1:}}}

${customapi https://api.scorpstuff.com/weather.php?units=imperial&city=${pathescape ${1:}}}

#

2 options ddepending on the numerical format to respond as.

tepid hull
#

what u mean?

hardy walrus
#

C/KPH vs F/MPH

tepid hull
#

oh c and/or F?

#

oh i see

#

wanted to see it side by side

#

thanks i got it โค๏ธ

prime tapir
#

My websocket connection keeps timing out and reconnecting every 30 seconds, anyone know why this happens?

#

It's almost like my client doesn't receive any pings for pingInterval + pingTimeout ms and gives up and reconnects...

royal geyser
#

Hello, i need a little help, i would work with some apiโ€˜s but are there german apiโ€˜s to work with !weather or something?

atomic pine
#

quick question....as far as subscriber events are concerned am I right in thinking events with more than one gift will be covered by "bulkGifted"...and single gift events are covered with "gifted" and the "isCommunityGIft" is sent for each person recieving a gift? meaning If I wanted to output a single message and amount I would side step !isCommunityGift?

#

so kind of if(listener === subscriber-latest && !(event.isCommunityGift)){ do some stuff}

#

the behaviour seems correct but I dont want to count chickens

unreal kestrel
#

I have a custom bot I am running alongside StreamElements with Custom Bot Name. My custom bot and the Custom Bot Name in OBS.Live are the same account.

#

This makes me unable to get my custom bot to run StreamElements commands within their commands.

#

I have a purpose and desire to have my bot respond by running a command in StreamElements.

#

I use it to some success in having my bot run commands of another bot for some things.

#

My only theory is that because they're the same account, it won't run the commands from StreamElements.

#

I was wondering if anybody knew a workaround?

#

It's for a multipurpose, all in one command I am building and one of the steps is running a command I have in StreamElements.

elfin arch
#

what are you trying to do with the client side bot? .... from what i've been testing the default SE bot or "overlay" bot can handle a ton of stuff; minus hooks to Discord and stuff like giving 'offline points'

unreal kestrel
#

I am trying to make my custom bot run !bot mute in chat.

#

And a custom command that enables subscriber only mode.

#

If I run them myself, perfectly fine.

#

If I have my custom modded/editor bot run them, SE doesn't respond.

#

I can get my custom bot to run commands of OTHER bots, it's only the SE bot that won't respond.

elfin arch
#

the SE bot (the one in OBS.Live) will not respond to itself ... its basically if(self) return;

unreal kestrel
#

Yes, I want it to ignore that since my bot is separate but also the same.

elfin arch
#

that would mute OBS.Live bot; but keep your client side one running

unreal kestrel
#

Oh very nice.

#

That'll work very nicely actually I think.

#

And I am sure there's something in the Twitch API about turning on sub only mode too.

#

My command will mute the SE bot, refresh the overlays, turn on subonly mode for 60 seconds then undo everything. That's the end game.

#

So far I only got refreshing the overlays working, haha.

#

Thank you!

elfin arch
#

if you send /subscribers from the SE OBS.Live bot does it not work? i know some of the / commands are hit-miss

#

from client side it should work (i have like 2 followers so i'm far from playing with that ๐Ÿคฃ )

unreal kestrel
#

No it does.

#

I have !son and !soff to turn it on and off.

#

But I can't get my bot to run those either.

#

And last time I tried a slash command in my custom bot, it said oh no no no no.

#

But there was something in the Twitch API to so clears another way.

elfin arch
#

are you using tmi.js ?

unreal kestrel
#

So I am hoping something similiar with sub only modes.

#

Yeah.

elfin arch
#

here's a snip that i have for a channel point redemption that turns on Emote only chat for 5 minutes:

      TWITCHBOT.emoteonly(channel).then((data) => console.log('!!!EMOTE ONLY MODE ENABLED')).catch((err) => console.error(err));
      setTimeout(() => TWITCHBOT.emoteonlyoff(channel).then((data) => console.log('+++EMOTE ONLY MODE DISABLED')).catch((err) => console.error(err)), 5 * 60 * 1000)
unreal kestrel
#

Nice, I think these two links will help very well.

#

Thank you!

elfin arch
#

np. good luck! i like your pyramid ๐Ÿ™‚ well done

unreal kestrel
#

Thanks!

#

Wrote it meself!

granite crown
#

Hi, can I have simple question? I tried to find it here, but without luck.

I am creating my own widget in the overlays and have a problem.

Which js event is triggered, when I switched scene in OBS (without reload page on load checkbox). I just want to run animation after scene switch but without luck... It should be possible, because for example video execute at the start of the scene switch. Thank you

unreal kestrel
#

@elfin arch I made a terrible mistake. We don't use tmi.js

#

๐Ÿ˜ข

#

It's Python, not Javascript. ooof.

tribal zenith
granite crown
#

Thank you!

analog hull
#

Was kindly told by helpdesk that this should go here. It is for twitch. Here goes: the streamelements.com/(profile name) page has two lines that do not reflect custom "point" naming
(profile name) rewards (#) points every (#) minutes. <- "points" instead of (custom name)
Subscribers are rewarded with (#)x points. <- "points" instead of (custom name)
(Ranking)
All followers will recieve (#) (custom name) upon following.

and the rest of the lines reflect the appropriate custom name.
If it is done on purpose, I think it's confusing and breaks cohesion. If it was just a simple oversight (I have them allll the time lol) then I hope this helps!

atomic pine
#

Thanks Reboot, we got it running just wasnt getting when the callback was getting fired...think I have it now. Thanks again

orchid cloud
#

hi i hope this is the right place to put this, apologies if it isn't, but im making all my alerts custom but when i go to emulate them some of them don't update to my changes. the follow alert and the tip alert are working fine but the subscriber alert and cheer alert have not changed when emulated. im not sure what to do or how to get the changes to update
any ideas?

tropic finch
#

u should used the helpdesk with your platform name u stream on tbh, but its fine. That happens cause u are editing the main event, u need to check the variations tab @orchid cloud

fluid turtle
broken coyote
#

not sure why it keeps adding the %

#

but you need to use { } brackets

fluid turtle
#

actually the command is working but it shows just the steam hours. now I want to add 5959hours i played the game with the ms store version

broken coyote
#

you want to add 5959 to 1052?

fluid turtle
#

I want to add 5959 to the variable

broken coyote
#

being it included the word "hours" might be tricky. i personally. have no idea

orchid cloud
#

@tropic finch thank you so much! that has fixed the issue

pulsar willow
#

can someone please fix this glitch with the parameter called 'limit' in chatstats, because it's not doing anything :/

viral patrol
zenith canyon
#

is it possible to have a scroll list of all the current people hosting a channel?

mild cipher
#

@fluid turtle @broken coyote

$(channel) hat bereits $(customapi.https://api.mathjs.org/v4/?expr=$(queryencode "'$(customapi.https://decapi.me/steam/hours/76561197969640039/1172620)'.split(' ')[1] + 5959")) hours in Sea of Thieves
fluid turtle
#

Thank you, I will try that.

#

It's working. Thank you very much!

broken coyote
#

Big dong coming thru @mild cipher

humble leaf
#

Hi there, apologies if this isn't the correct place to ask, would anyone happen to know if SE's chat bot has a variable that I can use to create a counter that counts how many times a user has executed a particular command in chat? (as opposed to an overall counter, which I have already been able to find documentation for)

So for example
!hug $(sender) hugs $(user) - $(sender) has hugged XX people
I'd like to know if there is a variable that can be used to track XX number. Thank you!

elfin arch
#

you could try to do ${count ${user.name}Hugs} for the xx ... depending on how it parses; that might create a counter for each chatter. (so my counter would be "pjonpHugs" if i used it)

humble leaf
#

Oooo, I'll give that a go! Thank you for your suggestion @elfin arch !

twin mauve
#

Hi StreamElements I regularly utilize your browser site for such things as alerts and overlays and they are great. I have a question. Is there a live clock widget that shows my chatters what my current local time is? It would be very helpful if there is one. I sometimes get asked what the time is and would like to have a widget on screen so everyone can see.

#

I have come across a command variable that allows the user to ask however the time doesn't seem to be quite accurate. Also I'm a little new to the custom commands but they look fun and I think they can be a great way for viewer engagement.

#

Thanks in advance

full fulcrum
#

Hi! I only just started streaming, but thanks to my husband's know-how, I'was able to get my stream set up quite nicely. I recently coded a custom widget to add a counter that the chat can engage with. I'll be the first to admit that I know next to nothing about code, but was I able to set up the widget thanks to a guide I found online.

The only thing I want to add and can't set up in StreamElements is an audio element to react every time the chat command updates the counter. The counter itself is for audience engagement and to provide some levity when I'm too in the zone to realize I forgot to switch layers. ๐Ÿ˜…

Tl;dr: I have a custom widget that I want to add sound to so it'll react like an alert, but it's chat prompted

hardy walrus
#

@full fulcrum #widget-share has a " chat doorbell" that triggers on chat messages. Might help ya.

full fulcrum
#

okay...Next question then, is there any way to customize this further so that I can not only add my image but my counter as well?

That and do I put the JS I have currently before or after the code already on this file?

full fulcrum
#

That is such a valid mood

pulsar willow
#

Hello there ! I'm a developper and i'm trying to use stream elements api but it seems like the api docs are broken. My question is, is there a way to trigger an overlay by an http call ? Thanks a lot for the answers !

full fulcrum
#

Btw, I figured it out! I got it to work and it's beautiful!

hardy walrus
#

@full fulcrum helYea

full fulcrum
#

Thanks for the nod in the right direction, Sudo!

neon phoenix
#

guys when i trigger alerts in streamelements i cant hear the sound of the alerts in obs
i only hear them in browser !!!!
any idea ?
i tried the integrated sound in the alerts and i also tried a separated sound same issue

pulsar willow
mortal knotBOT
viral patrol
#

@pulsar willow You cannot send any API calls to overlay as they listen to websockets only (StreamElements native). So if you want your overlay to be triggered by something:

  1. Use websockets
  2. Query your endpoint with interval and if there's a change, then trigger an action
pulsar willow
neon phoenix
#

i re-setup the settings again and restart obs and same thing happen no sound !

#

note : im trigging the alerts using streamelements editor in the browser (Element => follow events)

pulsar willow
pure drift
viral patrol
#

@pulsar willow I don't know what are you trying to achieve, but you can have socket.io service on your end which overlay widget can connect to

pulsar willow
viral patrol
#

A custom widget is basically an iframed webpage which can connect to your endpoint. If you want to show/hide browser sources on those actions, the best way is to use OBS websockets, but if you want just to change a text on scene - the widget listening to websockets is a way to go.

#

But it depends on your setup, custom widget can listen to events, but the documentation for that is basically docs for your socket event, not SE. (Basically whatever you create as .html file that doesn't use innodb/cookies should work as custom widget)

pulsar willow
hollow owl
#

I got pointed to here for some help with regular expression. I heard that streamelements is using golang and I see RE2 on the site. as of now im trying to catch words with spaces in them "foo" and "f oo" using f\so\so. I cant get the command to catch. any help is appriciated.

#

there are asterisk after the "s"

elfin arch
#

me and Regex are not friends; but i would suggest using a website to test; i use https://regexr.com/

hollow owl
#

Oh yes me too. I just used that site to test and it seems that it can find it. I just cant get streamelements to find it

elfin arch
#

hmm let me play with it for a min.

#

do you want to catch 0 (zeros) instead of O's as well?

hollow owl
#

I think if i can get it rolling i can get the rest of the syntax thanks tho

#

https://github.com/google/re2/wiki/Syntax under vim character classes says \s and something is not supported could this cause the problem?

elfin arch
#

i think \s should work... playing with it now

#

again; i'm not great with regex... but something like (?i)[f][\Wf]*[o0][\Wo0]*[o0][\Wo0]? ?

#

the (?i) at the start is the ignore flag

hollow owl
#

oh it seems to work. it looks like i was doing it wrong at the start. I didnt use character set and just a character

#

Thanks I think I can work with that as a template.

elfin arch
#

good luck ๐Ÿ™‚ ... please no more regex ๐Ÿคฃ .... i break stuff with it and it never works how i want

hollow owl
#

Thanks got it to work.a possible bug is if there is an older disabled command that has your RegEx word as a keyword and you have a newer command with the active RegEx filter. the base word wont be captured. ex. old disabled command with keyword foo. new enabled command with RegEx "(?i)[f][\Wf][o0][\Wo0][o0][\Wo0]?" will not capture foo but will capture f oo.

elfin arch
#

๐Ÿค”

mortal knotBOT
elfin arch
#

but that is worth looking into

hollow owl
#

i did part and join

#

still is a probelm

elfin arch
#

do you still have it as a "keyword" on any of your commands?

hollow owl
#

yes

#

im afraid of removing it because it is just a channel I mod for.

#

just incase it isnt actually the problem

#

they added the space variant to their keywords but the new command can catch repeated letter ffoo

elfin arch
#

from my brief testing it goes !commad -> keyword -> regex filters .... it will stop at first found. (but again LIMITED sample size)

hollow owl
#

ah yeah I think thats it even though the command is disabled

#

it is getting caught by the keyword but since its disabled its not replying

elfin arch
#

๐Ÿค” let test it quick

#

yup; it's like it's doing a check "if !foo" -> disabled (stop)

elfin arch
#

thinking about this more. I think that is working as intended and correctly. ... the command/keyword 'foo' is intentionally disabled. Therefore it should not trigger.

ocean spindle
#

Is the Sub Credit Roll broken? Its either scrolling horizontally with the names displayed horizontally, or its also scrolling horizontally but the names displayed vertically, so the ones that are cut off at the bottom, they never show up.

#

just the same names at the topp scrollingt right to left again and again

viral patrol
#

@ocean spindle Check Credit roll widget from widget-share. It should be all ok from there

ocean spindle
#

not just current session

viral patrol
#

Ohh. right

ocean spindle
#

is it possible to just change something in the js to have it query the list of all the subs?

#

cause i can see that subsciber-session is called, so i assume there could be something like -all, or -every

viral patrol
#

If you change JS it may display up to 100 total events or up to 25 subs.

ocean spindle
#

unfortunately i dont know how to do that, and looks like the api documentation is dead?

viral patrol
#

And API docs are up for me.

neon phoenix
#

@mortal knot any solution please , i provided a screenshot of my settings up there as you recommended and the issue still the same

mortal knotBOT
#

Obs.live is a plugin for OBS Studio for the best OBS support, please join their Official Discord @ discord.gg/obsproject

neon phoenix
#

wait a minute Se.support is a bot not a human ๐Ÿ˜‚ my bad i was mentioning him thinking he is someone

neon phoenix
#

i may figure out the reason .. when managing another account as editor (in my case managing my clients overlay) i CAN'T hear the sound in obs when triggering the alerts manually but when using my own account and my own overlay i hear the sounds , so thats very weird and does not make sense so i hope streamElements dev team fix that
because if you give the manager / editor access to edit the overlay for supporting the streamer and mounting his overlay instead of him we should also have access to test the alerts we are designing and mounting fully like hearing the sounds extra

viral patrol
#

Hmm. I have overlays from managed account added to my OBS and they worked just fine.

neon phoenix
#

i didn't say the overlay not working i said when triggering the alert manually by a mod the alert pop up on obs fine but the sound does not ! the sound only can be heard on browser not on obs ..
but when triggering the alerts by the original owner of the account the sound works on OBS + the browser
i was just testing that many many times and confirmed the case , its so strange and logically it shouldn't be that way

obsidian lynx
#

Hi, i'm trying to build my first custom widget, I don't know much about coding in general, so i'm doing it step by step.
At this early stage i'm having an issue with an svg circle that is cutted off by something if it's big enough, like the height of the div/svg isn't enough for containing it (even though i didn't set up any width/height).
Second thing: there's a way to do some calc outside the "content" itself and using it afterwards? (like " number= calc(1 + 1); " and then use the "number" in the attributes)
Sorry for my "down to earth" speak, but i'm not into coding and plus english isn't my first language. Thanks for the help

tribal zenith
obsidian lynx
# tribal zenith SVGs are vectors and scalable. You are probably missing the viewBox attribute or...

Thanks, I checked the viewBox and yes I didn't have anything set, but I solved adding width/height in the css and I'm going to use the Javascript to calculate the correct value.
Another thing, for some reason the custom widget "default" setting (complete blank html/css/js) looks like having some sort of margin, should be 8px, do I need to put a negative margin to compensate or there's some hidden option somewhere that I don't see or know (probably).
I've already tried, blindly, the align-item, top, left attributes and others.
Sorry for bothering with my "first coding lesson" questions, but online tutorials can't answer my questions ๐Ÿ˜…

tribal zenith
obsidian lynx
#

It worked, thanks.
I'm gonna take a much closer look about viewBox (maybe I don't need it for this project, I have just one svg path, but knowledge is knowledge)

tribal zenith
#

yeah, it's not that complex, but it can save you some time in the future ๐Ÿ˜„

fossil star
#

Hi everyone, I'm trying to do a Custom CSS alert where I have the alert text on top of the GIF, but no matter what I do, I can't seem to get the alert text to lay on top of the GIF it's always below it. Sorry for the dumb question, but I'm not sure if the issue is the HTML or the CSS. If anyone is open to DMing, I can send my code over.

tribal zenith
fossil star
tribal zenith
#

so if you set the z-index of the GIF to 3, just set the text to 5 for example

fossil star
#

Thanks! I'm gonna fool around with it and see if I have any luck. ๐Ÿ™‚

tribal zenith
#

without it, nothing will visually change

abstract solar
#

please tell me ... how to display statistics from faceit? Interested in indicators such as: MATCHES, WIN RATE, AVERAGE K / D RATIO and AVERAGE HEADSHOTS%. FeelsBadMan I know about http://api.satont.ru/faceit but I donโ€™t know how to display these indicators BabyRage

tribal zenith
fossil star
tribal zenith
fossil star
tribal zenith
#

if not you can try position: absolute; and then set the same values for them

fossil star
tribal zenith
#

then absolute might be the way

fossil star
tribal zenith
#
position: absolute;
top: 0;
left: 0;

on both should put them in the same spot. The z-index then defines the stacking order

fossil star
tribal zenith
#

width and height should still work on the gif

fossil star
tribal zenith
#

you need to set it on the parent then

#

if the letters have a container around them

fossil star
tribal zenith
#

if you have the default custom css markup, you would have to set the position on .image-container and #awsome-text-container

fossil star
tribal zenith
#

.text-container is the root element here, so you don't really need it on there. You can just move the AlertBox itself around

fossil star
tribal zenith
#

no problem ๐Ÿ˜„

fossil star
edgy violet
#

Hello, is there anyway we can show the new twitch prediction thing on live screen?

#

Or the betting system

burnt shale
#

docs has been down for a while now ... any ETA? I get this message for all endpoints "This endpoint's documentation is currently experiencing difficulties and will be back online shortly."

elfin arch
burnt shale
#

yup, but it auto redirects to https://docs.streamelements.com/reference/giveaways

elfin arch
#

that is the correct link.

burnt shale
#

been that way for ~24hrs now...so gave up waiting and came to ask

elfin arch
#

which endpoint are you looking for?

burnt shale
#

my users are asking for some integration with SE, so I wanted to see what was possible and what features they would enjoy

elfin arch
#

I got the endpoints for get time and get points; and also the add/give points

burnt shale
#

mainly looking for get and add/remove

elfin arch
burnt shale
#

would really prefer a direct api, less hops = less chance something goes wrong....

elfin arch
#

sure; 1 sec. i'll grab what i got

#

all mine is JS code; i got getPoints, add/remove points, bulk add/remove points, get top points, get top minutes

burnt shale
#

thanks!

elfin arch
#

looking into Docs situation; might be a while for a fix. but Devs are aware now

burnt shale
#

thanks...another question if you don't mind. On the websocket connection for tips, I noticed there was no currency property in the "tip-latest" listener. How do people check the currency in which the tip was received? Do I hit the rest API after getting the websocket event?

elfin arch
#

That i'm not sure. I haven't played with the websockets. I'm not even sure if the currency is in the tip object

viral patrol
elfin arch
viral patrol
#

Checking

burnt shale
#

thanks

burnt shale
#

is there an endpoint where we can validate the JWT token? other than adding and then removing 1 point to test

hardy walrus
#

When doing the call it should give the respective response indicating it's invalid.

elfin arch
#

^ was about to say... all end points

burnt shale
#

the get endpoints seem to work without the auth tokens, so only the put endpoints can test it?

elfin arch
#

you can hit https://api.streamelements.com/kappa/v2/points/${process.env.SE_ACCOUNTID}/${username} without the auth header?

burnt shale
#

yeah

elfin arch
#

hmmm ๐Ÿค” ...i check the docks but ๐Ÿคฃ

#

ya try a PUT to check the token?

burnt shale
#

ok - will try to add 0 points, invalid tokens give a 401

elfin arch
#

basically the check is a # based .... i.e token.length === ??? long A.F.

#

i can't hit the endpoint right now; but does that answer it for you? 401 is bad Oauth?

burnt shale
#

yeah - it does.... add 0 points allows me to validate it

burnt shale
#

Has there been any thought/discussion on the subtract points endpoint to give an error when there are insufficient points to remove? Currently it just shows a success message and keeps the points at 0. So to avoid this we would need to make two requests, one to check and then decide if there is sufficient points to actually execute the remove points.

elfin arch
#

not that i know of. it may have been brought up before. but that gets into a more complex system; i.e. if someone wants to bet X amount you need to make sure they have X amount .... then you need to remove X amount from the user (so they can't use it bet on other things) ... then when contest is over do payouts

viral patrol
#

@burnt shale You can query /channels/me endpoint and get userdata

west herald
#

(like is there a way to reset everyone's counter?)

neon phoenix
#

this message show up in stream chat every 1 min or so :
StreamElements : Enter a message
!!!! what is that

full fulcrum
#

hey guys! I thought I tweaked the code for my "Wrong Layer" alarm well enough to only sound off when the chat puts in the command, but I was wrong and it's going off with every single message. Is there someone that can help me set it up to only react to a chat command?

#

the audio script is from the "Chat Doorbell" widget

tribal zenith
full fulcrum
#

I know next to nothing about coding to be honest and have only put it together thanks to a guide and guesswork on what lines go where

#

I've been testing the widget by typing the chat command

#

WAIT! I got it!

tribal zenith
#

so you have probably something like this in your Code

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

  const listener = obj.detail.listener;
  const event    = obj.detail.event;
  
  if(listener === "message")
  {
    // something happens here
  }
});
full fulcrum
#

The only downside is that now the counter isn't showing up

#

I did add those two lines in the audio script

tribal zenith
#

without knowing what your code looks like, we can't really help

full fulcrum
#

sorry, just a moment, getting the screen cap now. My 8y/o needed something lol

tribal zenith
#

yeah, that would trigger everytime any event happens

full fulcrum
#

I managed to get it to react only to the chat command by adding the:

const listener= obj.detail.listener;
const data = obj.detail.event;

to the previous audio script

tribal zenith
#

sorry, yes any message event. You would have to check if the content of the message equals your command

full fulcrum
#

so far it is? I've been typing gibberish into the chat and the sound hasn't been going off for each line

tribal zenith
#

because it has a cooldown

full fulcrum
#

yep, you're right

#

I just tried again lol

#

would the message set up be in html?

#

or is it along the same lines of the bottom code for the counter?

tribal zenith
#
window.addEventListener('onEventReceived', function(obj)
{
  if (!obj.detail.event) { return; }

  const listener = obj.detail.listener;
  const event    = obj.detail.event;
  
  if(listener === "message" && event.renderedText === "!yourCommand" && !isPlaying)
  {
    console.log("Playing");
    isPlaying = true;
    audio.play();
    setTimeout(() => { isPlaying = false; }, cooldown);
  }
  
  else if(listener === "bot:counter" && data.counter === "wrong")
  {
    document.getElementById("wrongcounter").innerText = data.value;
  }
});
full fulcrum
#

gotcha!

#

Thank you Reboot!

tribal zenith
#

you can replace lines 6-29 with that

full fulcrum
#

do I set the cooldown to 0 if I don't want it to have one?

tribal zenith
#

if you set the cooldown time to the length of the audio file, it will only skip if it is already playing. So that's basically "no cooldown"

full fulcrum
#

gotcha, so keep the cooldown above the length of the file

tribal zenith
#

or match it

full fulcrum
#

Got it! Thank you so much for your help Reboot! It's working like a dream now!

tribal zenith
#

no problem ๐Ÿ˜„

full fulcrum
#

Honestly, I might tweak it again for a death counter for a later lets play lol

tribal zenith
#

then you can just copy&paste the else if and change the counter name

full fulcrum
#

Sweet!

#

Also, is there a way to reset the bot to 0 for each stream?

west herald
#

can we do anything we want or is there some rules? (in customwidgets)

viral patrol
#

@west herald Rules are described here: https://strms.net/codeshare Also there are limitations of jailed environment (no InnoDB, no cookies, no origin on external calls)

west herald
#

ok thanks

leaden bay
#

Hi guys, its possible in the overlay editor make the streamelements bot send a message in the chat?

simple mulch
#

Hey all! Very excited to see the Patreon alert widget by @viral patrol , I think it's going to be really helpful to have. I'm in the process of setting it up; I've followed the set up process in the video that was shared, but when I send a test from Patreon, nothing comes up in the overlay. I'm wondering if I'm missing a step in the overlay itself?

There is a test button within the overlay and that is working fine.
If anyone has been playing with this and knows what I'm missing, I'd really appreciate some help. I'm not massively technical so I'm sure I'm just missing something!

obsidian lynx
#

Hi, is it possible to set the width/height automatically in the editor, like for the "text box", for a custom widget?

long beacon
#

Hey there, someone said i should ask in this channel the other day, i am wondering if anyone has made/uses a widget that allows you to have rotating text. not events like follows or subs but blocks of text that will show up and maybe fade away to another block of text? thanks guys and gals ^^

harsh aurora
#

Question for anyone good with the programming stuff in streamelements/streamlabs etc :

I made a 8min video (loop) to put in my obs. The loop is a panel for my stream labels (last follow,last sub, etc).

For visuals, check the loop here (google drive link) : https://drive.google.com/file/d/109D-zC9bRTRH9X1KiCwNKyNNl_T2FomJ/view?usp=sharing

My question is : Does anyone know how I can control the time one of the labels is appearing on my overlay to make it sync with the loop I made?(with any program) (example: latest follower appears after 5 seconds and dissapears after 2mins, latest sub appears at 2:15mins and dissapears at 4:15mins, etc)

I really don't know if this is well explained... hope it was.

elfin arch
#

hey @harsh aurora. as i mentioned you'll need to have the labels created with some custom HTML/CSS/JS.
How I would go about it is from HTML just make a basic "container" for the username. Then in CSS have your styling for font and some animations. In the JS; I would just do a basic timer that matches your animation and updates the "container" in the HTML

harsh aurora
elfin arch
#

I'm not sure; i don't think i've seen any examples posted before.

harsh aurora
#

okay. thanks for the help doe!

elfin arch
#

No problem. sorry i don't have any examples.... but i might try to make up a quick example this week

west herald
#

How can i Get Counter using js? (help pls)

west herald
#

how do i get it when ever i want it

#

so i dont wait for it

viral patrol
#

So the one above is an event triggered on counter update.

west herald
#

ok thanks

digital jewel
#

how do i change this !addcom !leaderboard /me $(eval const api = $(urlfetch json https://dgxfkpkb4zk5c.cloudfront.net/search/affinity/NA/queue/competitive/act/97b6e739-44cc-ffa7-49ad-398ba502ceb0/gameName/GenG HUYNH/tagLine/Smirk); var danny = api.players.find(e => e.puuid === "a21a01a4-ea6c-58a5-9e34-06da18416bb6"); danny ? Huynh is #${danny['leaderboardRank']} on the Leaderboard with ${danny['numberOfWins']} Wins and a Ranked Rating of ${danny['rankedRating']} : 'Huynh is Currently Not Top 500') to a streamelements command

west herald
#

how can i use this

#

(where do i get token from)

west herald
#

ok found it

viral patrol
#

And there's JS class to handle all the stuff for you

west herald
#

which class

viral patrol
#

Something like that

west herald
#

ok thanks

rancid pumice
#

Hello, not sure you encounteres this before, but here goes..
I've been working on a custom event list widget, all on my own SE account. Finally got it to work the way I wanted and all.

Now I wantet to share it with a friend, but here's the problem.
The widget is just empty on any overlay on his account. We tried to create a new blank overlay, copying the codes separately and even duplicating my overlay to his account, but it just stays empty. (But if I dupe his overlay with the widget to my account, it works fine).

viral patrol
#

Maybe that person has no events history (or they cleared them via "reset session data")

rancid pumice
#

Also if it helps, it's edited version of lx's Custom event list, but neither his original version shows for friend

#

Nah, their session is quite lively, he has separate events for follows, subs, tips and cheers and these show correctly

viral patrol
#

You can open console and check what errors were there.

rancid pumice
#

Does this help anything?

#

Actually nevermind, opened it in different browser and found my issue.

#

Thanks for the help! SEheart

#

I missed to define one variable.
Don't quite understand why it worked on one account, but not the other, but at least it works now

digital jewel
#

how do i change this !addcom !leaderboard /me $(eval const api = $(urlfetch json https://dgxfkpkb4zk5c.cloudfront.net/search/affinity/NA/queue/competitive/act/97b6e739-44cc-ffa7-49ad-398ba502ceb0/gameName/GenG HUYNH/tagLine/Smirk); var danny = api.players.find(e => e.puuid === "a21a01a4-ea6c-58a5-9e34-06da18416bb6"); danny ? Huynh is #${danny['leaderboardRank']} on the Leaderboard with ${danny['numberOfWins']} Wins and a Ranked Rating of ${danny['rankedRating']} : 'Huynh is Currently Not Top 500') to a streamelements command

viral patrol
#

@digital jewel You will need to use MITM for that as SE doesn't have eval. Or use eval that is somewhere above, provided by pjonp...

digital jewel
#

What is MITM

viral patrol
#

MITM is "Man in the middle", a proxy server that would parse your query and provide plain text output

#

Check this message, it may be helpful for you about something like that: <#dev-chat message>

digital jewel
#

Ok got it. Thank you!

vocal panther
#

It appears that all of the API reference "is currently experiencing difficulties and will be back online shortly"

#

Anyone know when it might be restored?

hardy walrus
#

@viral patrol ^^^^

west herald
#

why "users" list is not setting to nothing?
(then i check its length it still same usernames) [help]

#

the code is not being reached for some reason ?_?

viral patrol
west herald
simple mulch
#

Heyo! Sorry to repost here - just wondering if anyone has had a similar issue to me with the Patreon alerts widget and might have any advice? Link to my last post with screenshots here ๐Ÿ™‚ #dev-chat message

viral patrol
#

Hmmm. I will contact Patreon in that case as I see no events coming from them.

simple mulch
viral patrol
#

Yup. Seems like Patreon is not dispatching those events at all.

simple mulch
#

If you need any extra screenshots as evidence let me know, happy to share what's going on from my end if it's helpful!

vocal panther
#

The docs are still broken

terse anchor
#

Hey Hey! Question! Is there a way to add a name to a list and everytime you call that command, the custom names you enter would pop up?

For Example: !fan - These people are fans of you're channel: Gamer1, ThisOtherGuy, TwitchinterestingUsername

But these fan names are entered in much similar to adding to a counter? EX: !editcounter name TestName2

And then when you call the command again you get: !fan - These people are fans of you're channel: Gamer1, ThisOtherGuy, TwitchinterestingUsername, TestName2

elfin arch
terse anchor
#

@elfin arch keep them between streams bro

#

Is there a variable for storing things in a list?

#

Also how you been? ๐Ÿ˜‚

elfin arch
#

good good. ... not really with just using the command variables; you'd need to do it with custom widget to store the data.

terse anchor
#

The question then becomes... how complicated is that? ๐Ÿ˜‚

elfin arch
#

haha. not too bad; i'll check around. someone might have already done something similar. I know there is a 'queue' overlay which is close but not a chat response

terse anchor
#

so the idea is you can do !fan and it would say like random.chatters are you're fans or if theres a specific name that says !fan then it calls only the prema names

#

thats in this list

obsidian lynx
#

Is it possible to use a background-image: linear-gradient as a fill/stroke-color for an SVG path?
I dont want to use, if possible, the linearGradient in html because there's some problem rotating it (gradient center not in the svg center).
Or if you know how to center the "html gradient", I saw a tutorial using javascript to calculate the trigonometric position of the gradient center (0,0)... but I dont know how to implement the resulting values in the html (if it works).
Thanks

unkempt lark
vocal panther
#

Hi, the API documentation is still offline. Is there a recommended way to bring this to the attention of staff? I'm new around here.

hardy walrus
#

@vocal panther I had bonked someone yesterday/Sunday but didn't quite get a clear response from them. I'll try again.

vocal panther
#

Thanks

viral patrol
#

Unfortunately docs are down and being worked on currently, but maybe this will provide you some help: <#dev-chat message>

vocal panther
#

I'm looking for arguments such as $(urlfetch)

#

I couldn't get $(querystring) to work so went to find the docs ๐Ÿคทโ€โ™‚๏ธ

viral patrol
#

Ohh. This is not within API