#dev-chat

1 messages Β· Page 28 of 1

cerulean rune
#

Hello Staff!
I'm working on a custom widget in StreamElements and it's working perfectly except for one thing:

Is there a possibility to get the SENDER of a gifted SUB in SUBSCRIBER-RECENT?

let data=obj["detail"]["session"]["data"]["subscriber-recent"];
data[0]["name"] // contains the subscriber name
data[0]["sender"] // is always undefined?

I know you can find the SENDER in SUBSCRIBER-LATEST, but I need it in SUBSCRIBER-RECENT.

indigo flume
cerulean rune
#

Yes, I did. Thank you. This page helped me a lot with the code. But I didn't find a solution for my problem.

viral patrol
#

Hi. -recent scopes give only basic information - type, username, amount.

cerulean rune
#

I was afraid of that. But SUBSCRIBER-LATEST doesn't contain a CREATEDAT for some reason, right?
The goal is, to show all subs of a given date (e.g. yesterday) - including the SENDER if the sub was gifted.

Guess this is not possible at the moment?

viral patrol
#

I am checking that. Give me few more minutes

rugged rapids
#

Doesn't the events have a createdAt data:

let recentSubs=data["subscriber-recent"][0];
recentFollows["name"]; // Username,
recentSubs["createdAt"]; // Timestamp like "2018-06-11T08:08:33.180Z",

viral patrol
#

-recent has this data

cerulean rune
#

Yes, but -recent doesn't have a SENDER if it's a gifted sub.
And -latest doesn't have a CREATEDAT for some reason, right?

viral patrol
#

I was wondering if it is possible to reach data from activities via fetch() Unfortunately {"statusCode":403,"error":"Forbidden","message":"missing scope activities:read"}

#

(I was trying to do that using apikey authorization instead of JWT (Which is safer for end user)

#
let channelId="123123123";
let apiKey="apiKey"
let url='https://api.streamelements.com/kappa/v2/activities/'+channelId+'?limit=100&types=subscriber&&minsub=0&origin=overlay&before=2019-05-02T00:00:00.000Z&after=2019-04-02T00:00:00.000Z';
let options={
    method: 'GET',
        headers: new Headers({'Authorization': "apikey "+apiKey})
}
fetch(url,options).then(console.log);
#

If you replace Authorization to use Bearer JWT-TOKEN instead of apikey it should work, but I strongly recommend to not use JWT within overlay, you can use some MITM script

#

Which can be better for your case, as you might want get more than 100 subs (that are in -recent).

#

And this endpoint provides a lot of data (sender is included there).

cerulean rune
#

Wow, thank you very much for your time, effort and tips! πŸ†
I will look into this solution.

And if I still have questions, I'll contact you again. ;)

Have a nice day - and thanks again!

simple jay
#

I saw the Rotate option, but it's not quite what i want.

What i'm searching for is a way for the Eventlist, instead of growing to the right, it grows to the left. that way i can position it to my upper right corner of the stream

real dune
#

is it possible to build a custom widget for followers per stream that display the name with a "flip in x" instead of "slide horizontally"?

verbal hinge
#

Is it possible to add a Netherlands language to this discord?

solemn ice
#

hi im having trouble uploading images to the widges I keep getting a crop layout and wont allow me to upload a image

sharp island
#

@simple jay I don't think we have that in the event list settings, you'd have to use a custom event list and just change the css to position it on the right.

simple jay
#

I'm trying to figure out what code i would have to add to the CSS

viral patrol
#

I see that you are using Arcade Pop event list

#

In that case you need to do two things:

  1. add to .eventFlip in CSS code below:
float: right;
clear: both;
  1. Comment or remove line 188 of JS (to not mess with animation)
    removeEvent(totalEvents - eventsLimit);
#

@simple jay ‴

simple jay
#

OMG

#

That worked!

#

Thank you so very much!

real dune
#

is there a way to edit the default recent followers widget (or a custom one)? all im looking to do is change how the followers are displayed but i cant get it to work in a custom widget

viral patrol
real dune
#

i tried that one, but even the basic version nothing appears when emulating a follow event

pulsar willow
#

Good evening,

I've been on streamelements for some time now and in fact I no longer accepted donations by any other means than via the bits so I could use my event list nerd or die that I have on streamlabs while using streamelements except that recently I wanted to accept donations again and I wanted to know if there was a way and how I could import this event list on streamelements https://nerdordie.com/product/eventpop-custom-eventlist/

Nerd or Die

EventPop is minimalist event list design that uses horizontal space. You'll be able to set up this design in a matter of seconds, and customize to match your channels branding. Easy to setup & configure Will adjust and fit to any length of text and/or name Non-intrusive s...

rugged rapids
#

@ivory fiber const field = fieldData.field;

ivory fiber
#

oo

#

ty

#

do u know how to log something to console? for debug purposes

#

nothing with console.log shows up

rugged rapids
#

console.log(field); should work

ivory fiber
#

huuuuuuuu am so confused. fieldData is undefined apparently

#

u sure it even exists in follow alert custom css?

rugged rapids
#

I think the fields is only working in a custom widget.

ivory fiber
#

oh

#

okee

sharp island
#

fields should be working on alert custom css

unreal jungle
#

I am rewriting your electron app

#

😑

sharp island
#

It's not my electron app.

unreal jungle
#

Perry I expect 4 million sheckles

#

@static wigeon wow when 😑

ivory fiber
#

oh, there's overlay documentation right there in the channel topic 🀦

#

w<

noble wagon
#

Morning all, so I've set up the basic socket example from the older docs but I don't seem to be getting any events back, has there been any changes to the way you lot handle web sockets?

viral patrol
#

Hi. Check message in pinned post

#

There should be a working example of websocket connection

noble wagon
#

Thank you!

winged sorrel
#

I am using a Custom Widget from latest vid on Alpha Gaming Channel on YT. I am trying to receive data on latest followers in the week but no luck. Any ideas?

mild cipher
#

@winged sorrel Try using {count}

winged sorrel
#

aye @mild cipher thank you for helping Harris set that up for us. Is it possible to show a random name from the list of recent followers?

mild cipher
#

With more modifications yes, but unfortunately not with that typical setup 😦

winged sorrel
#

makes sense, its been awhile since Ive last done coding and wanted to make sure i didnt break the widget

digital cape
#

does anyone know if its possible to do iframe with the HTML editor. I want to bring in my restream.io chat

rugged rapids
#

Due to security concerns we do not allow using iframes, so you cannot put external widgets within overlay AFAIK, maybe just as separate browser source in OBS

digital cape
#

ok sounds good. i was just trying to work it into an overlay i was using. i can make it work with obs

#

@mild cipher i used the widget you made with harris to also scroll through my social media platforms. is there any way to change the icons? I would like to use awsomefonts icons for twitter, facebook, youtube, and twitch.

mild cipher
#

That's been setup for use with the custom designed icons, but I'll DM you the modifications to make.

#

@digital cape

arctic zephyr
#

hello ! any idea for create a command who increase or decrease loyalty points with a defined value ? It’s for a command like a « taxΒ Β». thank you for helping !

digital cape
#

@mild cipher thanks

ruby juniper
#

I was wondering if there is a way to add an event listener for an item redemption

mild cipher
#

The listener should be redemption-latest but it's not working for me for some reason. I'm seeing undefined

ruby juniper
#

I tried the same thing and no go

#

window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'redemption-latest') {
update();draw();
}
)};

#

is what i have for now but doesn't seem to work

mild cipher
#

When you try to log obj for onSessionUpdate or onWidgetLoad do you also see TypeError: "can't assign to property "type" on "SE T-shirt": not an object"?

ruby juniper
#

yeah that's what i get

mild cipher
#

I think it might be borked at the moment Thinktastic

ruby juniper
#

oh ok 😒 thank you for your help

mortal wagon
#

How much for somone to design me a custom widget slideshow that looks like this with the ability to easily add / remove images / slides
https://cdn.discordapp.com/attachments/490555075400564746/574379884768657429/template.gif
the outer grey boarder will be like 80% transparent and the animations smoother and then the purple line gets to the end it changes to the next image, WIll also disapear after a rotation of the slides and return for a fresh cycle after some amount of time

mellow sparrow
#

Hi all, just wondering how i change the margin of the image on the follower alerts. The image is sitting out to the left of the text but not sure how to make it appear closer to the text.

#

I had a look at the CSS but not sure what i should change to make it move to the right more

indigo flume
mellow sparrow
#

yes it does

indigo flume
mellow sparrow
#

Oh thank you so much. I will change this now. Thank you again.

indigo flume
#

πŸ‘

hardy oar
#

Question, is it possible to embed the streamstore in to a website?

rugged rapids
jolly trout
#

Hi, I am looking to set up a scroll (credit roll) of Tier 3 subscribers. I have been manually setting it up, so I am curious if it can be generated via api? TIA

viral patrol
#

If you are using credit roll by Grot from widget-share, you can alter just this part of code:

else if (event.type === 'subscriber' && enableSubs == 1) {
          if( sSum < session['subscriber-session']['count'] ) {
            addEvent('subscriber', event.name);
              sSum += 1;
        }
    } 

to

else if (event.type === 'subscriber' && enableSubs == 1) {
          if( sSum < session['subscriber-session']['count'] && parseInt(event.tier)==3000) {
            addEvent('subscriber', event.name);
              sSum += 1;
        }
    } 
#

Not 100% sure about that "event.tier", but I think it should be that

cloud iris
#

Hi, I'm looking to set a custom event list, preferable where the latest event is highlighted over the others. I just added a custom widget and I kinda like that event list with the images and such, but I can't seem to figure out how to properly edit it. For some reason I feel that my edits don't actually reflect. Any pointers on how to easily create something like this?

wooden mango
#

So I'm using the Events Rotator by co6studio and have it set to never stop playing and 0 seconds to restart but for whatever reason it randomly stops playing. Any ideas?

lusty gull
#

Ok so I am using a mod for minecraft called Content Creator Integration. I have personally been using it with StreamLabs, However I have a streamer friend that wants to use my Config/rewards system with Streamelements. I have input my StreamElementsJWTToken with in the config and had confirmation that it has successfully connected. I am in need of testing this rewards system with the emulated Follow, bits, subs, host, raids, Sub bombing, and ect.

On streamlabs if i press test follow the alert is sent through the api into the mod and triggers the reward.
On StreamElements if i press emulate Follow within one of the scenes that i created, the alerts show up on the screen of the overlay however non of that is transfered over the JWTToken for the rewards system testing.

Is there a way that i can test my system by emulating these alerts or does that have to happen live?

mild cipher
#

@lusty gull for the socket, you need to additionally listen on event:test to see the emulated events. However, the structure of these events more geared towards the overlay editor/custom widgets and are slightly different to actual events you'll see on the socket, so keep that in mind

lusty gull
#

We are just calling on the trigger events for donations, follows, cheers, subs, and all that good stuff. The trigger events for those which when sent accross from the API then will also trigger an event within the game. It's more of an interactive standpoint with the viewers.

viral patrol
#

@lusty gull Also keep in mind that you have to enable that option to push event from overlay to websockets:

#

The other way to test is to replay events from activity feed

fading veldt
#

Hmm, how feasible would it be to put together a custom widget which basically shows the aggregated "Top Contributor"? Each cent is 1 point, i.e. 100 bits are 100 points, Tier 3 sub is 2500 points, $10 tip is 1000 points, etc... It's something that has been requested by several streamers rather than having several different widgets for each piece of data. πŸ™‚

mild cipher
#

Quite feasible, only problem I can see is trying to make it retroactive. I suppose you could comb through any available SE session data, but it would only go back so far thinkingani also I'm not 100% sure, but I think it might be somewhere against Twitch TOS to lump bits and tips together

fading veldt
#

That's a good point. Just went over the Bits Acceptable Use Policy and I don't think any of it really applies in this case, though.

civic yoke
#

Is it currently possible to create contests with the api?

viral patrol
#

@fading veldt I've created something that could help you. This is cumulative goal that mixes every aspect of stream, so you can reward for bits, tips, subs and follows. It gives same amount of points for subs. In case it gives points for follows and for subs no matter what money value they are, so there's no 100% monetary value behind - https://github.com/StreamElements/widgets/tree/master/CumulativeGoal

mild cipher
#

@viral patrol speaking of the widget repo, have you seen my PR yet? BlobCookie

viral patrol
#

Oh. I was so blind. Sorry about that!

#

I don't know how could I make so many typos. Thank you so much

mild cipher
#

It happens πŸ˜„

plain radish
#

Hello there! I just bought an overlay and alerts from NerdOrDie and was wondering if it was possible to add it to Streamelements so I can easily use it on OBS Studio? I cant use streamlabs because it makes my game really laggy.

viral patrol
#

If it is not officially supported, you can import it from SL to SE and it should work

karmic bay
#

I feel like I am asking something that may have been asked a lot before... but I am trying to build a costum widget and at this point I want to add some fields, so users can change things easyer without have to delve into code... but I am having issues with the type value, is there a place to see a list of what types will yield what results?

mild cipher
karmic bay
#

@mild cipher yes I have seen it :)
but not quite what I was hoping to find... there is a copple of things, that is seen in standard widgets, but not mentioned in the example... namely what I would call image, video, audio and toggle... but I guess if it is reserved for standard widgets then nothing can be done about it.

#

πŸ€”

#

thank you for getting back to me so quickly tho πŸ˜„

mild cipher
#

@karmic bay For toggle I think checkbox works. Sadly I don't know if there's a way for a custom widget to get to the uploaded assets though 😦

What I've done in the past as a workaround is: a user can upload something to their assets, then with it selected in a image/video widget, then can right click on the preview to obtain the direct link to the upload and then paste that into a text field. It's not ideal but maybe it's on a to-do list πŸ˜„

karmic bay
#

@mild cipher oof, too bad. It would be nice if they added that in at some point. Untill then I guess your workaround is what I will use.
Thank you again for the help πŸ˜„

sharp island
#

What would be the difference between checkbox and toggle?

charred tundra
#

logically, I would assume nothing, but toggle is easier/more intuitive from a UX perspective IMO

sharp island
#

@mild cipher @karmic bay Yeah, you're right, that would be nice if we added that in the near future. But that would be redundant and weird, because I added it this morning.

#
  "someImage": {
    "type": "image-input",
    "label": "Some Image"
  },
  "someVideo": {
    "type": "video-input",
    "label": "Some Video"
  },
  "someSound": {
    "type": "sound-input",
    "label": "Some Audio"
  }```
#

This is all live as of now.

mild cipher
#

You mad man! Thank you! This makes things sooooooo much easier lol

rugged rapids
#

Thank you for this. SEheart

sharp island
#

πŸ˜„

livid lotus
#

i dont know what you did Dylan but THANKS MAN!

mild cipher
#

Let's just say it was a very good thing indeed. For the record, I assume he meant these as being toggles? Although it's more in keeping with the SE style they would be functionally the same as the checkbox though so I guess it doesn't matter

lavish dagger
#

Is it possible to, using the API, tell the bot to execute one of its commands? Say, for example, I want to use the API to execute "song" and print the current song in the chat.

viral patrol
#

Unfortunately not, but you can get song name via one call and then second call to say message on chat.

lavish dagger
#

Ah. Was hoping it was a little easier, but thanks. It'll work either way. Just figured it would be easier if i could consolidate 2 calls down to 1 for simplicity's sake.

lavish dagger
#

Is there any specific reason that the songrequest/../next has a different response format than something like songrequest/../playing ?

#

songrquest/../next returns an object, containing an object song that contains all the data, compared to just returning an object containing the data.

sharp island
#

@livid lotus I was bored.

civic yoke
#

Does anyone know the body params for creating a contest?

karmic bay
#

@sharp island okay, that was quick... way too quick, did you read my mind a year ago or something πŸ‘€

#

and also thank you ❀

sharp island
#

Well, it was on my list pretty much from when we first implemented Custom Fields, we just delayed that part because we wanted to be sure that the Custom Fields worked properly (and because I was needed to help with the SECRET PROJECT #271). The person you can thank for putting it on my list is @viral patrol , but he gives me so many ideas that I could never do them all (especially if I want to finish SECRET PROJECT #312).

#

I try to get one fun UX project done a week (last week it was the new HypeCup physics, this week it's this)

karmic bay
#

of cause πŸ˜ƒ
it was just a strange and fun conincident that I was looking for a solution and then you just add it in a day later πŸ˜†

#

thank you to both you and @viral patrol then I guess >:3

#

πŸ˜„

viral patrol
#

What is a difference between secret project 271 and 312? πŸ€”

real dune
#

41

viral patrol
#

Thank you. I can fall asleep safe tonight XD

sharp island
#

Not really a coincidence, Solovar. I saw you and fyre talking about it and went "you know, I should finish that project" and did so.

lavish dagger
#

@civic yoke body needs to be something along these lines. "options" is an
{"botResponses":true,"title":"This is a test","minBet":10000,"maxBet":100000,"duration":100,"options":[{"title":"First","command":"command1"},{"title":"Second","command":"secondcommand"}],"description":"This is only a test. Do not bet on this contest. Refunds will not be permitted"}
I'd be happy to go over the details if you'd like. Note that this doesn't actually start the contest. it'll return an object very similar, but with several additional fields, including an _id field which you would use when sending the call to start the contest.

#

i also have an example response if you'd like

wheat jackal
#

Hey! I wanted to ask where exactly is the last event "fading" animation located?

rugged rapids
#

The animation is set with keyframes in the CSS tab and at the css option of the elements.

wheat jackal
#

that's for fade-in, i don't see fade out

rugged rapids
#

The fade out is defined in the JS tab at the very bottom.

wheat jackal
#

okay thanks

#

is there a tag for each event?

#

like event-1, event-2?

#

so i could animate using that, not the js?

#

or maybe i can just make it trigger using js

rugged rapids
#

The div element, whis is appended to the main-container, gets an id element-X but X is defined as total events.

wheat jackal
#

so if i have 2 events. the div name is element-2?

#

#event-2

rugged rapids
#

Total events is the total number of events which are in your account on the widget load function. When you add an event, the number gets one up.

#

You can test this, when adding a console.log with the variable totalEvents in line 62.

viral patrol
#

You can use :nth-child() selector

#

As most recent event will always be first child of that eventlist

wheat jackal
#

not sure what do i put before the :nth-child()

viral patrol
#

You can do something like that:

.event-container:nth-child(1) {
  font-weight:bold;
  background-color:rgba(240, 74, 75, 0.8);
}
wheat jackal
#

thanks!

#

but can i animate it tho?

viral patrol
#

You can by adding CSS animation to that

wheat jackal
rugged rapids
wheat jackal
#

oh okay

shut lantern
#

So, I'm coding custom alerts for a friend, alerts which I know work as I have tested them on my own SE. But when we run the exact same code in his SE the username isn't being replaced... Anyone know what is up with that?

charred tundra
#

is your username hardcoded, or what variable are you using? πŸ˜ƒ

shut lantern
#

username is not hardcoded. Figured out the problem, though. I was using external script libraries in one of the version and that messed it up for whatever reason

charred tundra
#

ahhh glad you got it sorted!

pale breach
#

So it appears that ["subscriber-latest"]["amount"] only provides the value of the current streak, not the total number of months subscribed in a channel. Is there a way to get the total months added as a sub-key, so perhaps have two values there: ["subscriber-latest"]["amount"] for the total months subbed and another as ["subscriber-latest"]["streak"] for the current streak? The twitch API makes this available as two separate values (cumulative and streak) so it would be nice to see it available here. Sorry if this has been asked before. Searched but didn't see anything.

misty mortar
#

hey guys

#

Im wondering, is there a way I can request messages per second from a twitch channel?

#

I want to request this number, so that I can use it

mild cipher
#

You could make a custom widget that listens to chat and counts messages as they are sent

misty mortar
#

Thats a workaround yes, but there is no streamelements variable that i can use?

sharp island
#

We don't have a variable for it, no.

copper river
#

So continuing from the conversation in #helpdesk-twitch , is the stuff in the Fields tab only used in JS? I've never fiddled with JS so I'm not sure how to go about using those. Would I have to in order to use them in the CSS/HTML tabs?

#

Or do I basically just need to define them in the json?

#

Never mind, I just tried it and it was fine haha

low sierra
#

@pale breach not yet but it is towards the top of the short term Todo list

pale breach
#

@low sierra Thanks for the follow-up. Glad to hear it is at least on the radar. It is certainly something that would be a good property to have access to.

copper river
#

Is there a way I can use the font selected in the text settings section in the CSS?

#

If not, perhaps that should be a thing haha

#

Being able to use any of those in CSS

mild cipher
#

@copper river do you mean using the font selected with the googleFont field? You will need to add the font variable in two places:

HTML

<link href="https://fonts.googleapis.com/css?family={{someFont}}" rel="stylesheet">

CSS

* {
    font-family: {{someFont}}, sans-serif;
}
copper river
#

I mean the place where you can set all the text options for the default layouts, if you're not using custom CSS

#

My friend couldn't figure out why her changes weren't working until I clarified with her, I figured being about to use the default one in custom CSS would be more intuitive haha

viral patrol
#

Hi. When Custom CSS is enabled for Alertboxes "Text settings" panel is skipped as whole logic/styling is entirely done via custom fields.

copper river
#

Yeah I figured

#

Actually I think Animations do woork

#

Just not the text settings

viral patrol
#

Oh. Right. Animation displays whole box animated. MB

potent prism
#

Hey, got a little question... i'm trying to get a command working that's using a argument... i'm able to use the argument in the response using $(1). But when there is no argument, the command doesn't run, is there a way to let the command run even without the argument being filled?

mild cipher
#

$(1|default value) is usually how I do it. $(touser) is also an alias that sends $(sender) if a target isn't specified

potent prism
#

Thanks, is there any documentation on the chat commands?

mild cipher
potent prism
#

Okay, thanks! The pipe thingy was exactly what i needed

copper river
#

I'm having a trouble with fonts 😦 Trying to do three different selectable fonts for each of three divs but only one is working

#

Oh, well I got one to work...

#

HTML: <div id="secondary-text"> {{subText}} </div>

CSS: ```#secondary-text {
font-family: {{subFont}}, sans-serif;
}


Field: ```  "subFont": {
      "type": "googleFont",
      "label": "Secondary Font",
      "value": "Press Start 2P"
    },```
charred tundra
#

what do the second and third one look like?

copper river
#

second and third?

#

This is the third

#

Oh, it seems to work... just not with that font... I wonder why

charred tundra
#

oh sorry I thought you were trying to add three font selectors

#

that is odd spinning_think

#

are you able to inspect the html there to see what's up?

#

I know I've used console.log before but I can't recall whether inspector works on the editor at the moment

copper river
#

I think it just doesn't like the font I wanted (Press Start 2P)

#

How should I go about sharing what I've made with someone?

pulsar willow
#

Hey guys I dont dev, but I had like a crazy fun idea for a widget, maybe someone likes it as well and wants to work on it.
Idk if Steam API is open but, a widget, that displays your current game steam acievements which rotates the achievements you still need to get, including with progress bar if its like kill 200 enemies.

charred tundra
pulsar willow
#

yhea i dont even code haha, but i thought maybe someone wanted to get the idea!

charred tundra
#

it sounds like a good one!! thanks for sharing! πŸ˜„

pulsar willow
#

Heard Rod is taking a peek at it! 😁

prisma oriole
#

i have a question

zenith folioBOT
#

@prisma oriole Welcome to the support channel! Please let us know how we can assist you today and a member of the support staff will be with you as soon as possible.

rare spear
#

~~ Got redirected here from #helpdesk-twitch , hope someone here can help me figure this out!
I'm trying to set up some alerts for my stream, and I had some issues with my animations changing aspect ratios when I used the upload function.
So I fixed it by just pasting the img url in the CSS, but now I can't figure out how to display the custom message with donations and cheers.
I'm not much of a programmer so sorry if this is a very basic question haha ~~

#

nevermind! I found it PattiShy

charred tundra
#

glad you got it sorted! πŸ˜„ sometimes it helps to explain the issue to someone else annedoEy

rare spear
#

thanks! and yeah, I basically just overlooked something in the documentation it's really silly

narrow belfry
#

What should I use to connect to the websocket thru python?
python-socketio does not seem to work.

#

I could easily spam the activities endpoint but that does not seem like a great solution

midnight orbit
#

i would love to implement a command in my stream that can tell how much time it is until midnight. is there anything like that in any API? i checked decapi and SE but came up empty. any ideas?

viral patrol
#

@narrow belfry check pinned message for example of socketio connection

narrow belfry
#

I tried socketio
Gives me a 404 error message

#

Sure, works in JavaScript. But not in Python

viral patrol
#

I just searched this channel for phrase "python" and it seems to be working, maybe there's something different appended to URL in JS/py calls? Unfortunately I am not python developer, so I don't know how to investigate

narrow belfry
#

Okay, thanks. I will look into it.

#

Looked thru the python messages.
None of them is for the websocket

#

I have now looked thru the messages that contains ”websocket”, all of them are using JavaScript

#

1 message was about arduino, but that did not seem to work either

narrow belfry
#

I made the websocket listener in node.js instead...

narrow belfry
#

(fixed with python only)
If anyone would like to connect to the websocket thru python, but without luck.
This is my node.js app which is my solution so far...

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

const port = parseInt(process.argv[process.argv.length-1]);
if (isNaN(port)){
    console.log('The last argument have to be a number!\nExample: "StreamElementsListener.exe 80"');
}

const jwt = process.argv[process.argv.length-2];

console.log('Connecting to: http://127.0.0.1:' + port);
const local_socket = io('http://127.0.0.1:' + port);

// Socket connected
local_socket.on('connect', () => {
    console.log('connected to StreamElements Local Cloudbot!');

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

    // Socket connected
    se_socket.on('connect', () => {
        console.log('connected!');
        se_socket.emit('authenticate', { method: 'jwt', token: jwt });
    });

    // Socket got disconnected
    se_socket.on('disconnect', () => {
        console.log('disconnected from StreamElements!');
    });

    // Socket is authenticated
    se_socket.on('authenticated', () => {
        console.log('Authenticated with StreamElements!');
    });

    // New event received
    se_socket.on('event', (event) => {
        local_socket.emit('StreamElementsEvent', event);
    });
});

// Socket got disconnected
local_socket.on('disconnect', () => {
    console.log('disconnected from StreamElements Local Cloudbot!\nExiting...');
    process.exit();
});

Dependencies:

socket.io-client (npm install socket.io-client --save)

How to run:

node index.js jwt_token local_server_port

I made it into a .exe file thru the pkg node module (npm install pkg -g)

Running it like this in my python file, which includes a flask web-app

subprocess.Popen(os.getcwd() + '\\dependencies\\node\\StreamElementsListener.exe ' + settings['jwt_token'] + ' ' + str(settings['server_port']))
#

Still not tested tho.
Because I have no events LULW

narrow belfry
#

Hi... Am I able to emulate an event?

mild cipher
#

This worked for me:

import socketio

sio = socketio.Client()

token = 'JWT_TOKEN_HERE'

def onConnect():
    print('Connected')
sio.on('connect', onConnect)

def onEvent(data):
    print('Received event: ', data)
sio.on('event', onEvent)

def onEventTest(data):
    print('Received test event: ', data)
sio.on('event:test', onEventTest)

def onDisconnect():
    print('Disconnected')
sio.on('disconnect', onDisconnect)

def onAuthenticated(data):
    print('Authenticated: ', data)
sio.on('authenticated', onAuthenticated)

def main():
    sio.connect('https://realtime.streamelements.com', transports=['websocket'])
    sio.emit('authenticate', { 'method': 'jwt', 'token': token })

if __name__ == '__main__':
    main()
narrow belfry
#

oh, I will try it out, sec

#

It works! thanks. How weird tho, I tried to use socketio yesterday

mild cipher
#

Np! πŸ˜„ You can emulate events from the overlay editor (blue bell at the bottom + make sure the box is ticked) or by replaying events from the dashboard. They come through on event:test

narrow belfry
#

ah, okay. Thanks!

mild cipher
thin mulch
#

Hi there! I was directed here by the SE Support guys in Twitter. I was wondering whether there is a way to get the SE chatbot to show an image (gif specifically) on the stream when a chat command is used?

viral patrol
#

There are two ways to do that:

  1. add image to stream store and add redemptions widget to overlay, then people will be able to "buy" this image on stream with their loyalty points
  2. use custom widget (I think one will be released pretty soon as it is almost ready - in tests now)
narrow belfry
dry plover
#

Hey guys, I'm testing around with the Websockets, and for some reason i'm not receiving any messages in the console. It doesn't seem to trigger the event or authenticated methods - it triggers the connected method though.
I'm using a C# library to do this, instead of JS. Here's the code if you're wondering (obviously removed the seToken variable):

private static void Connect()
        {
            var options = new IO.Options
            {
               Transports = ImmutableList.Create<string>("websocket"),
            };
            
            Socket socket = IO.Socket(new Uri("https://realtime.streamelements.com"), options);

            var authOptions = new Dictionary<string, string>
            {
                {"token", seToken}, {"method", "jwt"}
            };
            
            socket.On(Socket.EVENT_CONNECT, () => { 
                Console.WriteLine("Connected to StreamElements successfully.");
                Console.WriteLine(JsonConvert.SerializeObject(authOptions));
                socket.Emit("authenticate", authOptions);
            });
            socket.On("authenticated", (data) => { Console.WriteLine("Authenticated! - " + JsonConvert.SerializeObject(data)); });
            socket.On(Socket.EVENT_CONNECT_ERROR, (err) => { Console.WriteLine("Failed to connect: " + err); });
            socket.On(Socket.EVENT_DISCONNECT, () => { Console.WriteLine("Disconnected."); });
            socket.On(Socket.EVENT_ERROR, (error) =>
            {
                Console.WriteLine("Encountered error:");
                Console.WriteLine(error);
            });
            socket.On("event", (data) =>
            {
                Console.WriteLine(data);
                Console.WriteLine(JsonConvert.SerializeObject(data));
            });
            Console.ReadLine();
        }
#

The library i'm using is currently SocketIoClientDotNet

midnight orbit
#

@mild cipher you are my hero! Thank you so much! SEheart

viral patrol
#

@dry plover for test events you have to listen to other event type (event:test) you can also listen to event:update and event:reset

dry plover
#

Ohhh okay thank you @viral patrol - so it isn't supposed to respond to me upon connecting?

#

Wrong tag lol narrDerp

viral patrol
#

You will receive events like "connect" or "authenticated" which you are listening to

#

Huh. Sorry for misunderstanding your question in first place.

zenith isle
#

I'm listening to the Websockets server and wondering which event I should look out for to determine if the stream ended or not? Would it be session:reset?

viral patrol
#

session:reset is dispatched 15 minutes after stream ending (to not reset session data on disconnect mid stream)

zenith isle
#

Thanks for the response @viral patrol so are you saying disconnect is a better option? I assumed that means when I as the client disconnect though, right?

thin mulch
#

@viral patrol thanks! For now, then, I'll set up a stream store item for it πŸ˜ƒ

viral patrol
#

@zenith isle disconnect is an event when websocket connection is lost. End of stream event is not dispatched. The best way to listen to it is to listen to twitch directly

dry plover
#

@viral patrol I tried event:test just now but i'm still not receiving anything. I'm also not hitting the Console.WriteLine("Authenticated! - " + JsonConvert.SerializeObject(data)); line inside the authenticated event, so I don't think it's reaching that point

viral patrol
#

I am not C# coder, but if you reach Connected to StreamElements successfully. Then there's something wrong with socket.Emit("authenticate", {"token":"YurJwtToken","method":"jwt"}). Also IDK how does your authOptions work, but maybe this could be the issue?

dry plover
#

I tried hard-coding the JSON object as a string instead of referencing authOptions (just to test whether it was an issue with the dictionary), but that still doesn't work, so i'm not sure if it's just the library being dodgy.

#

I really hope it's not the library to blame, though. I'd rather not have two different socket libraries, because this one does seem to work properly in Streamlabs

viral patrol
#

It shouldn't be, as socket.io works fine with other languages

dry plover
#

Yeah, i'm just not sure if it's the library screwing it up, because socket.io isn't a standard part of .NET, it's a third-party library. I just tried in a different project where I know the socket should work, and it still doesn't do anything. There's no errors, it just does nothing.

#

If the auth credentials were wrong, does it not return an error of any type? Or does it just fail silently?

viral patrol
#

I am not sure as I am not WS person, but maybe there's another event dispatched and there's no listener on your end to it. I am pretty sure that one of our wizards will take a look here.

dry plover
#

That would be greatly appreciated! I'll check if there's any other listeners in the meantime that it could be sending to

viral patrol
#

I think you could listen to error and maybe that will provide some details

#

But I am not 100% certain about that one

dry plover
#

Yeah I believe I also had a listener for that, which wasn't triggered either. I noticed the library has a connect_error or something which could be worth a shot

dry plover
#

Okay I tried adding listeners for CONNECT_ERROR, RECONNECT_ERROR and even RECONNECT_FAILED, but none are ever triggered

lusty pivot
viral patrol
muted dagger
#

Hello guys, I'm trying to test my Top Tip event, but doesn't shows up

#

It shows the normal Tip animation, even when I put some big value on Custom price

#

Zambee on #helpdesk-twitch said to reset session and try again, didn't worked too D:

sharp island
#

@dry plover I notice that your emit is "authenticate" but you're listening to "authenticated"

dry plover
#

@sharp island The socket.Emit("authenticate", authOptions); line? I believe the API documentation shows to send authenticate

sharp island
#

socket.On("authenticated", (data) => { Console.WriteLine("Authenticated! - " + JsonConvert.SerializeObject(data)); });

#

Oh, nevermind, I see.

dry plover
indigo flume
#

@sharp island if you want to give it a shot Thinkies
https://dotnetfiddle.net/p5ffnk
If not, I'll ask Jacob tmrw for some insight and maybe poke Iliya as he might know the closest to C# xd

sharp island
#

I worked in C# for years. πŸ˜ƒ

indigo flume
#

O:

#

That I didn't knew Pog

dry plover
#

TIL PogChamp

sharp island
#

Outside of some side projects (like Mids for City of Heroes), I haven't done anything with it since... 2012?

indigo flume
#

Better then my 1 year experience of doing some mid sized projects for factory robot arms Thinkies

sharp island
#

That fiddle isn't runnable. 😦 Now I have to setup a project and stuff locally...

indigo flume
#

it might be missing 1 method and a nuget package SocketIoClientDotNet

#
StreamElements streamelements = new StreamElements(null);
            streamelements.StreamElementsAuthenticated += (sender, args) => {
                Console.WriteLine("Authenticated: " + args.data);
                Console.WriteLine(JsonConvert.SerializeObject(args.data));
            };

            streamelements.StreamElementsConnected += (s, o) => {
                Console.WriteLine("Connected - authenticating");
                streamelements.Emit("authenticate", authOptions);
            };

            streamelements.StreamElementsDisconnected += (s, o) =>
            {
                Console.WriteLine("StreamElements Disconnected.");
            };
            streamelements.StreamElementsTestEvent += (sender, args) => {
                Console.WriteLine(JsonConvert.SerializeObject(args.data));
            };```
midnight orbit
indigo flume
#

@vague turret Does your API endpoint return a response?

sharp island
#

@indigo flume what is StreamElementsSocketEventArgs?

indigo flume
#

@dry plover ‴

dry plover
#

Ah, right, there's a separate class for the event args:

class StreamElementsSocketEventArgs
    {
        public object data;

        public StreamElementsSocketEventArgs (object data)
        {
            this.data = data;
        }
    }
sharp island
#

What version of the SocketIoClientDotNet package are you using, @dry plover ?

dry plover
#

1.0.5 I believe

sharp island
#

1.0.2 is the latest...

#

On nuget, that is. Hm

#

Ah. The newer ones are flagged as "prerelease"

dry plover
#

Ahh that makes sense, that confused me too then karqHEHE

sharp island
#

Yeah. It turns out the guy deprecated them in January and removed them from everything.

#

Using versions above 1.0.2 causes warnings now.

#

:/

dry plover
#

Damn, that's unfortunate. Someone mentioned an IBM socket.io library in the issues for SocketIoClientDotNet, but I have no idea how to install it into the project πŸ€” It has no documentation

sharp island
dry plover
#

Yeah, i'm not sure how to reference it πŸ€”

sharp island
#

It appears to not have a release version, meaning you have to download the project and integrate it. Ugh.

#

I can't get this dotnetfiddle to even run, so I can't debug it. Maybe tomorrow I'll sit down and actually break out the VSCode and make a real project.

#

I just need to see the frames of hte websocket and try to get the response. Might have to use fiddler or some other inspector to get the actual things being passed around.

dry plover
#

Okay sounds good. I can't even get the IBM project to load because there's a bunch of non-existent SDKs narrSleepy

sharp island
#

I can't make any promises, because I'm busy on Super Sekret Project #3928.

dry plover
#

No problem, I appreciate the attempts either way!

dry plover
#

After finally getting the IBM project to build, it was a waste of time anyway. When trying to connect to the websocket, it shows an exception message Only 'http' and 'https' schemes are allowed. Parameter name: requestUri - even though the URI starts with https

#

If I use wss:// in the URI instead, I get a HTTP 400 response.

sharp island
#

Oh I read something about the IBM project having problems with certificates

vague turret
mild cipher
#

@vague turret that's returning something with a content-type of application/json? try setting the header to text/plain blobthinking

vague turret
#

@mild cipher Mhm I changed that, but it still doesn't seem to work. Just putting my URL into ${...} should be right?

mild cipher
#

you had it right in your tweet the first time round πŸ˜„ $(customapi.<link>)

vague turret
#

Oh I thought the "customapi." part was just to show theres your cutsomapi in it. Now i get at least an http 400 error πŸ˜„

#

Ah ok but thats a Problem of my api

#

I think I can do this on my own from here on. Thanks!

vague turret
#

Oh the reason it didn't work was, that I just misunderstood the SE $(customapi.<link>) command usage. My endpoint and the content-type (application/json) are accepted fine

cobalt fable
#

Hey. I want to create my own Giveaway Widget because i don't like the Design of the default one, but i dont find any date in the gitHub document and i'm not the best with APIs. Is there an option to get the HTML, CSS and JS from the default widget to customize it? Or can someone help me to set it up? πŸ€”

Thanks a lot ❀

viral patrol
#

Hi. Giveaway events are not dispatched to custom widget, so it is not possible to use one in that case.

cobalt fable
#

FeelsBadMan
Will it be in the future?

#

if not, it would be cool to have more options to custumize the design of the widget

sharp island
#

I'm not aware of any plans, but exposing the events isn't a big deal. Maybe @finite heath is aware of any requests.

narrow belfry
#

Hi, the event event:test is identical to event. Right?

mild cipher
#

The event structures differ slightly, and the listener names are also different (they do not have -latest appended). The only exception is the follow event, which is follow and not follower.

sharp island
#

I'd fix the follow event, but that'd break so many widgets

narrow belfry
#

What is the purpose of event:test if the output isn’t identical to event?
Just to see if the socket works?

#

If so... How sad

quiet kindle
#

Hi there,
It would be reaaaally good to enhance this part :

#

Can't read anything, really difficult to scroll

#

everything take too much space. It would be great to have the possibility to minimize thosse range of icons :

indigo flume
#

I would suggest to move the activity feed on the right side of teh chat like so

quiet kindle
#

Obviously I try it but it take much more place ! πŸ˜ƒ

#

I really think it can be improve by many ways

indigo flume
#

Also to point out - wrong channel.

quiet kindle
#

wich channel I can use (sorry)

#

?

indigo flume
quiet kindle
#

sorry

indigo flume
#

I can ask the devs if this can be adjusted or something, but I can't guarantee anything.

#

As it might break the design of the activity feed

quiet kindle
#

Add an arrow button to minimize the buttons and filter options would be really great

#

Thx so much for your work !

cursive geyser
sharp island
#

To answer your question, @narrow belfry , event:test does get mapped to an identical event. When somebody clicks "emulate follower", it sends an event:test event (which has its own structure), and the overlay receives that message and converts it into the appropriate events. You don't have to listen to event:test at all to receive tests! Tests also go through the normal flow, when appropriate. You just also receive the event:test because we broadcast that, too. This is primarily useful for things that don't have matching events, such as emulating emotes.

narrow belfry
#

Ah, okay. Interesting

dry plover
#

Hey, any luck with that websocket issue? πŸ˜ƒ

weak elk
mild cipher
#

@weak elk should, yes

weak elk
#

@mild cipher thanks !

lusty pivot
#

After adding new tips (via API) in different currencies they all appear as my primary currency in the overlay, but when I go to "Revenue history" section I see the right currencies. Is there any way to solve this?

#

For example when I add a 20 TRY tip I still get a 20 USD tip in my overlay (because I set USD as my primary currency in my settings)

reef granite
#

Is there an easy way to link streamelements alerts to ifttt? For instance, turn on a light when you get a new sub?

viral patrol
reef granite
#

oh cool. I'll check that out. Thanks @viral patrol

#

Oh. It looks like IFTTT will just accept a webhook and trigger something that way so I guess just a simple little xhr request from a custom widget will do it.

finite portal
#

Hi, is there any possibility to test sub, tip, etc. on WebSocket?

sharp island
#

Of course. That's how the emulate feature works in the editor.

finite portal
#

I tried that, but I won't get anything in the WebSocket. When I buy a stream perk, I get an event.

sharp island
#

There's a white list of events that can be passed through the websocket, so it literally has to be one of our events, in the structure they expect.

finite portal
sharp island
#

Well, that's the REST API and it has no relation to the websocket events.

#

Except that the data matches

finite portal
#

and event

#

and here I only get store redemptions. Not subs etc.

sharp island
#

But that doesn't have sockets

#

How are you doing the test? Via the emulate button? If so, the response event you should get is event:test

finite portal
#

I missed the new documentation. Thanks a lot for the info, I'm smarter again. d:D

viral patrol
#

@finite portal Also you can check pinned messages here as they have some examples that can help you with it.

finite portal
#

I see now

#

thanks

summer elm
#

Hi folks. Im playing around in the mighty SE overlays scenario.

Is it possible using the custom css on alert variations to get the bot to issue a chat command?

IE: Variation A might award the user 1000 points, variation B might time them out for one minute and variation C might make them a VIP.

Just want to see if its possible/if anyones tried before I dive in.

#

Im reposting from the help desk, was told to ask here thanks you all! πŸ˜„

#

From what I gather the short answer is "Not Really No"

viral patrol
#

The long answer is - only broadcaster can set vip/mod status, also you would like to call MITM script to connect to our bot (to not paste JWT token as plain text in code editor)

summer elm
#

Thank you very much.

dry plover
#

I've tried 4 different libraries now, still nothing karqWHY

dry plover
#

I'm guessing it's just not possible

hollow ledge
mild cipher
#

You could put your script into a custom widget and listen to a particular event there

#

(well, not the script itself, I mean a call to it)

hollow ledge
#

Yup, I'm following, trying my basic knowledge of JS right now. Thanks.

hollow ledge
#

Got that figured out, thank you @mild cipher. Was able to cast it just as talked about in DM's!

Next things trying to figure out... Where is a users watch time stored? Basically trying to import my watch-time from a SLOBS script so my community can keep their watchtime battle going

hollow ledge
#

When I search in the API Reference for β€œwatch time” and click on it, it gives me a 500 error PepeHands

mild cipher
#

Weird. Something might be up with the docs. In any case, the URL is https://api.streamelements.com/kappa/v2/points/CHANNEL/watchtime where CHANNEL is the SE channel ID

burnt gazelle
#

hey guys is there a way i get my lifx smart bulbs to start flashing for new subs?

mild cipher
#

If you're willing to script something together, their docs look like a good place to start πŸ˜„ https://api.developer.lifx.com/ - there's also an example of a custom widget for a different smart light up above that might be of interest

hollow ledge
#

@mild cipher I appreciate that, but, I was hoping to see the API because I want to add hours watched to the users

mild cipher
#

When searching 'watchtime' try clicking the second suggestion in the dropdown, it worked for me. However there's no PUT or POST option for watchtime, you can only GET

hollow ledge
#

Ahhh damn.. Okay. Thank you.

viral patrol
#

And about calling a PHP script on event - you can do that in Custom Widget or JS in alertbox. In customwidget it would be something like:

window.addEventListener('onEventReceived', function (obj) {
    if (typeof obj.detail.event.itemId !== "undefined") {
        obj.detail.listener = "redemption-latest"
    }
    const listener = obj.detail.listener.split("-")[0];
    const event = obj.detail.event;
    if (listener !== 'subscriber') return;
    fetch(`https://URL/script.php?subscriber=${event.name}`).then((response)=>{
    $(".main-container").html(response);
    });
    });
    ```
Also keep in mind that your php script should send Allow-origin header before any content (basically add as first line):
```php
<?php
header('Access-Control-Allow-Origin: *')

And another thing - OBS Browser Source is Chromium based and StreamElements overlay is served via https, so your content should be also served via https as Chromium will prevent mixed content. You can override it via adding: --allow-running-insecure-content --disable-web-security parameters to OBS shortcut. ). I think this widget (and its manual) will help you as it connects to insecure endpoint (within LAN) on events https://github.com/StreamElements/widgets/tree/master/NanoleafLightingOnEvents

viral patrol
#

@hollow ledge this one as well is for you ‴

hollow ledge
#

@viral patrol Thank you for all that. @mild cipher and I spoke in DM’s and he got me squared away on the PHP/JS thing, I did same as you mentioned but was able to keep it very basic as I’m not fetching any responses at all as I echo” β€œ; on my php script to remove the IFTTT response. As far as the import tool goes, that sounds like it’s perfect, I’ll have to take a look after this morning meeting I’m stuck in lol. I host all my PHP scripts on my own vps so everything is HTTPS. Much appreciated 🀘🏻

foggy dagger
#

How can I resize my alerts because I can resize the box but not the custom movie animation itself

uncut apex
#

hey hey, does anyone know how to trigger a source from a chat command, ive tried the OBS web socket with no luck and a few widgets. can anyone help?

tardy knot
#

can i trigger a tip message, with a url call?

chilly wave
#

I have a problem solving here

#

?

zenith folioBOT
#

@chilly wave Welcome to the support channel! Please let us know how we can assist you today and a member of the support staff will be with you as soon as possible.

viral patrol
#

@foggy dagger To increase size you have to adjust size/height in CSS. For example you can have width:60%;height:60% so it will be adjusted to container

uncut apex
#

@viral patrol, I’ve tried that one, pasted the url in but my issue is the image and the sound file don’t sync, when I tried it with a gif and mp3 file, would it be able to play mp4s so the audio always matched the video? I’ve been trying to get something that would activate a source directly in OBs to prevent this.

broken coyote
#

I would try a web file, much smaller then a mp4

viral patrol
#

@uncut apex You could merge those two files into one to keep sound and video in proper timing. You can do that with ffmpeg: ffmpeg -i animation.gif -i sound.mp3 -c:v libvpx-vp9 -pix_fmt yuva420p file.webm

#

And then you will need to alter the code. I am here to assist if you have any questions

#

Or I will change the code so it will start gif when sound file is buffered enough to start playing

#

Give me 5 minutes πŸ˜‰

#

OK. Instead of that I think I added possibility to add video files there (that will be played along sounds, so you can set volume of sound to 0 just to make video play)

#

As sound is always required

#

I will fix that soon, but I am in a hurry now and wanted to give you something πŸ˜‰

uncut apex
#

@viral patrol, thanks that makes a bit of sense to me, I’m not very keen on Js or Json, I’ve only ever written applications in C# asp.net. The help is much appreciated.

brazen tide
#

Hello, is there a way to send info to elements API to start giveaway? I'm preparing for the stream where I won't be engaged with chat, mods will have to take care of everything, giveaways too, but I don't want to give them dashboard access. I was wondering If I can create custom command to connect to my own API from where I'll send info to elements API (or connect directly to elements API maybe?)

viral patrol
#

@brazen tide ‴

brazen tide
#

@viral patrol thank you! that's amazing!

viral patrol
#

@brazen tide Nie ma sprawy πŸ˜‰

brazen tide
#

πŸ˜„

#

oh, and while I'm on giveaway subject, is there specific event fired when giveaway starts I can listen to on custom js overlay? (so I can show additional txt layer when giveaway is open)

viral patrol
#

Unfortunately I don't know

delicate lotus
#

Hello and good morning, I was hoping someone here could briefly explain how to install a theme to Streamelements from say nerdordie I was assuming you just download said them and upload it to client?

rugged rapids
#

The most overlay providers have explanations on how to add the overlays to StreamElements.

delicate lotus
#

hey thanks Benno

#

sorry for late reply did not have notifications on again thank you

broken coyote
#

@delicate lotus I know not all of the nerd or die stuff is "drag and drop" for SE. someone them you.havw to manually setup. They should say in there descriptions

delicate lotus
#

hey thanks MRBoost

broken coyote
#

No problem.

#

Not sure where this should go, but I had a question about the wdget submission. I went to add my code to jsfiddle, but I can't fine how to also add my json code.

rugged rapids
#

You can add the Json in the comment section of the submission form, or staff will take a look at it in your overlays, so you don't need to hand it in.

broken coyote
#

Ight I appreciate the info

broken coyote
#

as far as customs widgets go. is there any to share them as being a avg joe?

brazen tide
#

can any1 help me? I don't know how to pass giveawy variables when creating new giveaway via api

#

I'm building custom chat command that will read specfic old giveaway detail, remove winners and such, now I want to send those detail to create a copy of giveaway

#

After getting giveaway details string, I'm using this to pass it, but I'm getting Internal Server Error

                  var gaSource = JSON.parse(this.responseText);
                delete gaSource.totalAmount
                delete gaSource.totalUsers
                delete gaSource._id
                delete gaSource.winners
                delete gaSource.createdAt
                delete gaSource.updatedAt
                delete gaSource.startedAt
                delete gaSource.state
                delete gaSource.endedAt
                if(commands[4]) gaSource.title = commands.splice(0, 3);
                console.log(gaSource);
                xhr.open("POST", "https://api.streamelements.com/kappa/v2/giveaways/"+channel);
                xhr.setRequestHeader('Authorization', 'Bearer '+token);
                xhr.setRequestHeader("accept", "application/json");
                xhr.setRequestHeader("content-type", "application/json");
                xhr.send(gaSource);```
brazen tide
#

nvm got it, had to stringify json, rookie mistake

pallid quartz
#

wondering how I can get my event list from streamlabs working in streamelements, it's heavily based on js/css, when I made a custom widget and added all the html,css,js and custom fields the widget is just blank with nothing there

deep turtle
#

Any idea why the tiltify alerts are not working? Looks like there's a new system where we can no longer copy and past the campaign URLs as we could in the past. Instead we have to link Tiltify to Streamelements. The alerts do not work under the new system.

#

paste*

viral patrol
#

@pallid quartz Hi. Conversion process for widgets like goal, eventlist or chat are more difficult as there has to be code adjustement. If you have a code of that widget on your account you can DM me with link giving me editor access to your account and I can convert that for you.

pallid quartz
#

@viral patrol sure, where can I find that link? or is it just the same link I use to edit the widget?

zenith folioBOT
#

To invite managers to your dashboard, Click on your Channel Name at the top of the dashboard and scroll down to Settings. Click the drop down arrow to expand your channel managers and then create a new invite at one of three access levels (Bot Supervisor, Editor, Full Control) Check this video out for more help: https://youtu.be/zl_h-ttZDF0

pallid quartz
#

thanks

viral patrol
#

I have this widget converted already I just had to check if you purchased that widget. It is ready on your account now πŸ˜‰

#

Have fun!

pallid quartz
#

Thanks!

gaunt orchid
#

Hello, I'm trying to create a custom alert box. So far everything works, except for the subscribers ... This alert will not play. First I tried to separate Tier 1, 2, 3, Prime and Gift, unfortunately without success ... Even without this separation the Subscriber Alert does not work ... Can someone help me? Here is the excerpt from the JS Code:

viral patrol
#

Hi! This code is for "custom widget" and not "alert box"

gaunt orchid
#

yes but you can make a alert box with the custom widget, right?

#

followers, cheer .... are working

viral patrol
#

Let me check that

gaunt orchid
#

iΒ΄m not a fan of the alert box... I want one file for all the alerts. It's so easier to work with and the overview is better, I think

#

ok thanks

#

I do not know if everything works, what I intend to do. I also want to separate the cheers, so 1-99, 100-1000, .... And just the subscribers

viral patrol
#

OK. Found it

#

You had two errors in your code

#
  1. you forwarded "sub" as event type and you were checking if it is "subscriber"
#
  1. You were checking amount variable in addEvent, where there is no amount
#

Fixed code:

if (type === "sub") {
            if (text === 'sub gift') {
                element = `
        <div class="line"></div>
        <div class="line2 line2-${type}"></div>
        <div class="event-container" id="event-${totalEvents}">
        <div class="username-container first-${type}">${text} S2</div>
           <div class="details-container second-${type}">${username}</div>
        </div>`;
            } else {
                element = `
        <div class="line"></div>
        <div class="line2 line2-${type}"></div>
        <div class="event-container" id="event-${totalEvents}">
        <div class="username-container first-${type}">${text} S2</div>
           <div class="details-container second-${type}">${username}</div>
        </div>`;
            }
gaunt orchid
#

ok thank you!!!

pallid quartz
#

@viral patrol can you help me out with getting the usernames font size to go up? was searching through all the code and couldn't find anything to change it, it's really small on stream (left is the converted one)

viral patrol
#

Checking that for you

#

One minute

pallid quartz
#

i found it

#

in css, for .message added font-size: Xpx;

viral patrol
#

I altered the code for you, you can refresh

#

And you will have this box then

pallid quartz
#

ah nice, thanks!

gaunt orchid
#

Hello. I have the following problem with my Custom Widget AlertBox: There is no break between each alert. So as soon as 2 or more alerts are triggered, they are displayed at the same time. Can someone help me maybe? Followers, subs, etc. should be displayed 7 seconds and tips for 14 seconds ...

sharp island
#

Now, somebody is going to come in and tell you that you have to make your own queue and that there are tons of examples for it

#

But they're wrong

#

We've added a brand new feature that handles this exact case

#

We're adding it to the documentation as I type this

quartz gull
#

Nice. I made my own queue πŸ˜€

viral patrol
sacred nimbus
#

Anyone know an api for a Subscriber time command?

viral patrol
#

@sacred nimbus Do you mean ${customapi.https://decapi.me/twitch/subage/${channel}/${touser}} ?

gaunt orchid
#

Thanks for your help! Although I can now prevent the alerts from overlapping, TIP is also just as long as all other alerts ... Is there any way to change the duration of TIP Alerts?

Also, I do not manage to separate Cheers. So 0-99, 100-999, ... I can separate two but not all ... <= 99, <= 999, .... Is there another solution?

gaunt orchid
#

I solved problem # 1. I've created an overlay with the Custom Alerts and an AlertBox. For the AlertBox, I set the audio and length of the alerts. This also automatically makes the alerts of my custom widget so long.

#

If anyone asks why I really want to do it this way and not just use the AlertBox: The Custom Widget gives you a better overview and can make fields for everything and edit them quickly and easily. In the AlertBox you can edit this only awkward ... Now I can change the complete colors, etc. with just one click ... Unfortunately, I can not do it with the variation ... Maybe someone can help me there? (SUB Tier and cheer)

broken coyote
#

question @viral patrol i went to test out this "emotecombosounds" from the github, added in my sound links in the javascript. When i go to test, nothing happens. i can see in console its reading my emotes. but no sound.

viral patrol
#

Try to test it in obs as browser can prevent them from playing

broken coyote
#

i have it launched in a new window

#

chrome window

viral patrol
#

And chrome can prevent it from playing.

broken coyote
viral patrol
#

As it is browser policy so there cannot be hidden media elements

#

In obs it is disabled as it would prevent almost every alertbox from playing

broken coyote
#

i guess what im saying is, i dont even have obs open

floral fable
#

What lx is saying is test it in obs

broken coyote
#

yea have tested in obs. its the same result

viral patrol
#

Can you provide me access to your account so I could investigate that?

#

(of course via DM, not on public channel)

broken coyote
#

sure

gaunt orchid
#

is there a possibility for this: event.amount == "1-99" ??? Or is it not possible to select a range of numbers? I would like to separate the cheers, subs I have already done

viral patrol
#

if (event.amount >= 1 && event.amount =< 99)

gaunt orchid
#

Thank you soooo much... I will try it later

gaunt orchid
#

ok it does not work

#

I also tried "1" and '1', ...

gaunt orchid
#

OMG I got it! Actually easy but I made it hard for myself ... That's what happens when you have no idea about Javascript πŸ˜‰

viral patrol
#

Glad to hear that!

gaunt orchid
#

Thank you again!

random vortex
#

Is there a way to request socket access for another channel? Like, I want to make a subathon timer for other users to use, so I want to get a socket for people's donations, subs, bits cheering and whatnot.

viral patrol
#

Hi. I think that the best idea is to request oauth. However about subathon - you can get that working via custom widget

gaunt orchid
#

ok next problem - Community Gifts. If triggered, Sub Alert will start on each Gifted Sub. So give someone 5 Subs, then I get the first Gifter with the Amount displayed as a Sub and then again 5x Sub Alert ... I would just like it once with Sender and how many Subs he has given away displayed.

viral patrol
#

@gaunt orchid check for event.isCommunityGift - if it is true, just return; without executing any code

gaunt orchid
#

Ok I try it

#

how can i check for normal sub?

viral patrol
gaunt orchid
#

thx

gaunt orchid
#

Duration for subs is 7 seconds. Now not all community gifted subs are shown to me anymore (only once) but the next alert eg. Follower will be displayed after 7 seconds + 7 seconds per gift

#

If anyone gifted 5 Community Subs, it take about 42 seconds for the next Alert to get triggered

viral patrol
#

This is because you have alertbox that is holding that for every sub

#

So you can create a variation for community gifts with same time you are using for this widget

gaunt orchid
#

I can not get it ... It will always display the number of communitygifted subs afterwards as a "normal" sub alert. So not only "sender gifted 5 subs", but also afterwards all 5 subs as a separate alert.

flint sail
#

Hi, I'm testing out the websockets api and even though I get back "Successfully connected to channel channelId" after passing the JWT token, I never get any updates to event. When I emulate events they show up correctly in the OBS browser source using the standard overlay but nothing over socket.io. Am I missing something obvious?

mild cipher
#

Are you listening to event:test too?

flint sail
#

That I am not, is that mentioned anywhere in the documentation?

#

Yeah that seems to solve it. Thanks @mild cipher!

pulsar willow
#

can someone help me where a recent alert in events is only a solid color other then that rest are transparent

#

like this

rugged rapids
#

You can add a custom code widget to your overlay and delete two lines in the CSS tab inside the settings of the custom code widget (select custom code widget > left side: OPEN EDITOR > CSS Tab)

pulsar willow
#

do you know how to make the code?

rugged rapids
#

the default code is already in the custom widget by default. You just need to adjust it by deleting two lines.

pulsar willow
#

but how do i make it where events overlay only the most recent event is solid color rest is transparent

rugged rapids
#

delete two lines in the CSS tab:

  • roughly line 114: background-color: {{backgroundColor}};
  • roughly line 122: /* background: url(https://s3.amazonaws.com/cdn.streamelements.com/static/event-list/patterns/{{theme}}.svg); */
pulsar willow
#

can i screen share w/ you?

rugged rapids
#

Don't have the possibility right now.

#

Select the widget > on the left side: select OPEN EDITOR > switch to CSS Tab > delete two lines mentioned above.

pulsar willow
#

can someone help me see who has taked the most in my chat per day

pulsar willow
#

yes

random vortex
#

@viral patrol - Ah, I see. Well, it's more I wanted to do this as a fun personal project anyways πŸ˜›

pulsar willow
#

I use ground control to run the custom bot name with the oath token. I have a mix of my own bot and stream elements under the same account. Is there a way to keep the custom bot name running headless? On a server in a docker container? Ground control is basically a web app wrapped in electron right?

#

Any devs up in this discord?

tardy knot
#

is it possible to know the twitch login page URL that redirects back to streamer shop? instead of people see the shop first and then have to click the login button

keen ivy
#

is there any way I can change the format of online/offline watched time?

mellow sparrow
#

HI all, What variables would add if I wanted a command to respond with how many wins/loses I have had, in the chat? And how would I update the command to the latest count?

mild cipher
#

@mellow sparrow Assuming your wins counter has a counter name of wins, then you can do $(getcount wins) (same for losses)

If you want a command that viewers/mods can use to increment the count by 1, use $(count wins), which adds 1 and returns the new count.

For a mod-only command that lets you update the count, you can use the inbuilt !editcounter wins 100, which in this case sets the wins count to 100.

Or if you want a dedicated !setwins command, use $(count wins $(1)) which lets you do !setwins 40 to set to 40 or !setwins +5 to add five wins.

mellow sparrow
#

Thank you so much.

#

@mild cipher would i just put the command as !win with a response of missamr has 3 wins today. How would that look as a command? And how do I increment by one/two? Would I use !editcounter wins 100,

mild cipher
#

You could have !win which adds by 1, it would be like:

Woooo missamr won and now has $(count wins) today!

Then !wins would get the count without adding to it:

missamr has $(getcount wins) today

And yep, you can use the editcounter command like you wrote

mellow sparrow
#

Great. Thanks again.

#

Does this just happen per session, or would you be required to "reset" the counter?

mild cipher
#

Counters are persistent across streams so you'd need to reset it manually each time. If you want a !resetwins command to make it easier for mods, you can do

Wins were reset back to $(count wins 0)
mellow sparrow
#

Ok. Will do!

real dune
#

im looking to make a countdown timer,
is there a basic CSS that is used that i could have as a base?

broken coyote
#

i have a super simple countdown timer you can use

viral patrol
#

(for example it is used in stream marathon widget)

real dune
mellow sparrow
#

Is the Spotify integration meant to play songs on stream? Or just show the song playing?!?

rugged rapids
#

It is only showing the song being played on your spotify account.

mellow sparrow
#

Oh so it doesn’t play the song on stream!

vapid iron
#

Correct.

cursive jetty
#

Good day. Having a problem with api call keep getting a server timeout, but only with the stream elements bot. Hitting a page directly or other bots (nightbot) works fine. The api is hitting showbot.tv/b.php. Any ideas?

#

Very intermittent. Sometimes delay before timeout is 5 seconds. Sometimes it’s 20. Sometimes returns fine. Thanks in advance.

zenith folioBOT
#

@sharp shore Please abide by our server rules:

  • No advertisement or stream promotion
  • Respect ALL server members
  • No NSFW/NSFL
edgy plinth
wheat sphinx
#

@cursive jetty this seems to be an issue with your server setup, new connections are very slow sometimes which leads to timeouts. Once a connection is open and keep-alive is enabled, its fine. I suppose nightbot has keep alive enabled and we do not thanking Can you check your config or try another webserver and see if the issues go away?

unreal jungle
#

@wheat sphinx hi sir, how I get oauth token from streamelements? thanks very much from turkey

wheat sphinx
unreal jungle
#

@wheat sphinx thank you my friend, I send you carpet πŸ™‚

undone ibex
#

Hey guys, im not a developer but I have a question I think you guys might be able to help with.
I have just transitionedfrom StreamLabs over to stream elements. I used the chrome extention to import my alert box and that worked great, but I have no had much success bringing in my custom event list.
I have been using this package from Nerd or Die - https://nerdordie.com/product/apex-e-sport-package/
I have tried copy and pasting the HTML/CSS/JS code directly into a blank widget but it doesn't work, I just get a blank box. I also cant see nay way of updating the code on the event list widget.

Any thoughts or help would be greatly appreciated πŸ˜ƒ

Nerd or Die

A contemporary, sleek overlay design aimed at the competitive and E-Sport enthusiasts. We created this pack for streamers who want a clean, professional and visually pleasing design that will work with any game. This pack is quick and easy to install, and doesn't require any ...

viral patrol
#

Hi. Converting event list is more complex process. I think NerdOrDie guys will convert that one soon.

undone ibex
#

ok thanks i will keep a separate browser source for now

glass loom
#

How to see the console.log to aid in troubleshooting of custom widget event handling?

broken coyote
#

Did u open console?

#

F12

lusty pivot
#

Is there any way to set youtube video starting time inside songrequest API request?

indigo flume
#

If the requested song is provided as a YT link and it has a timestamp

#

the video will start from that timestamp

#

But maybe i'm blind but I don't see the requesting endpoint in our docs thonking

lusty pivot
#

You mean ?t=61 query string right? I've already tested that in both panel and as an API request, it doesn't work. FeelsBadMan

wheat jackal
#

Hey, I wanted to ask about this code that I'm trying. I want to toggle class when event is starting to disappear

viral patrol
#

You can try that:

 $(`#event-${eventId}`).addClass('pon').animate({
        opacity: 0
    }, 'slow', function () {
        $(`#event-${eventId}`).remove();
    });
wheat jackal
#

I don't think that works

wheat jackal
#

but now i don't have the reveal lol

wheat jackal
#

omg. it was the fill forwards animation

#

such a simple fix

#

@viral patrol thanks you so much <3

fierce elk
#

Hey. I have the Polycolor eventlist from NerdorDie. I was wondering if it is possible to get this integrated with stream elements donations instead of streamlabs?

viral patrol
#

Hi there! If you can - please DM me your editor access link and some code from package (so I can confirm you already have this package) then I will give you converted version.

bronze rapids
floral fable
#

That would have nothing to do with what this channel is for. You would need to have that stream being captured in a source in your broadcasting software. Has nothing to do with the API

viral patrol
#

@bronze rapids Hi there - if you are about to use JS serverside or as something that is on your computer - then sure, yes (as you don't want to provide your personal token within client-side stuff). Example of that:

let channelId=`123456789abcdef`;
let apikey=`yourOverlayToken`; // can be found here https://streamelements.com/dashboard/account/channels
fetch(`https://api.streamelements.com/kappa/v2/sessions/${channelId}`, {"headers":{"accept":"application/json, text/plain, */*","authorization":`apikey `${apikey}},"body":null,"method":"GET","mode":"cors"});

And about the second case - if you want to have a listener of chat within overlay on StreamElements you can just listen to onEventReceived where listener property is set to message`. Example for that: https://github.com/StreamElements/widgets/tree/master/CustomChat
You can also use tmi.js (or Twitch-js) to listen to chat on something external.

silver prawn
#

i would like to ask if everyone in the server is an auto generated robot with generated texts

rugged rapids
#

No, definetly not.

silver prawn
#

can you go live?i will subscribe

rugged rapids
#

I am not affiliate at this time. But thx.

silver prawn
#

who is the creator of this server?

viral patrol
#

Creator of this server is [Object]

#

And remember, there is no spoon

mellow sparrow
#

my apologies @floral fable it was not my intention to cause undue work. I just wasnt sure where to post it. I shall delete it immediately.

shell dirge
#

Hey there friends! I reached out via the help button on the streamelements website regarding uploading a NerdOrDie theme. Sean quickly replied and said it was possible. I've been struggling to find a way to make it upload easily so he suggested to reach out here can anyone help me?

#

I'm using the stealth theme

viral patrol
#

I think that there's one click installation link within package downloaded from NoD website

pliant bridge
#

Hi, with who I can talk for a League of legends custom command? I want to create the !elo command

shell dirge
#

For alerts, there appears to be a one click installation, but not for the overlay. @viral patrol

viral patrol
#

Oh. In that case the easiest way is to use OBS.Live importer from StreamLabs OBS. This tool takes care of migrating most of the assets from them. I think this is the only option when there's no overlay link provided by NoD guys.

shell dirge
pliant bridge
#

ill wait for my turn πŸ˜ƒ

#

πŸ˜ƒ

tribal moat
shell dirge
#

@tribal moat Legend indeed. I appreciate you letting me know. I'm going to dig around and see if there's any issues. Will report back with success/failure as I really want to switch from SLOBS to SE, ONCE and for ALL. πŸ˜ƒ

pliant bridge
#

no onaa can answer me?

tribal moat
empty cairn
#

I've been trying to figure out a way to Extract the WatchTime of users using the API, I have yet to find a way on how to. I've gone to https://developers.streamelements.com/ and checked the documentation out but it doesn't appear to have anything regarding WatchTime. I've assumed that the point system is linked with WatchTime (I know that WatchTime is linked to the Loyalty System) and the PUT does contain timeOnline which could be the WatchTime of users? If someone could help me out and point me towards the right direction on how I could Extract the WatchTime of all the Users it would help me big time.

zenith folioBOT
#

10 minutes of watchtime are given to those in chat when the loyalty points are handed out (every 10 minutes). Therefore, loyalty must be enabled for watchtime to work properly. There is no direct link between watchtime and all-time points. It can’t be calculated from the amount of all-time points a user has because subs may earn points at a faster rate and !bonus all command increases all-time points for users in chat at that time. Giving points to a single user does NOT affect all-time, only when giving to all in chat.

indigo flume
#

Also note this ‴

atomic mesa
#

can anyone edit the following code so it also includes who followed me?

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link href="https://fonts.googleapis.com/css?family={{fontFamily}}:400,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css"/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href='//static1.squarespace.com/static/59626b932cba5ea9874ee38d/t/5cca210ee2c4831672765349/1556750606848/swdoctor-twitch-icons-webfont.woff' rel='stylesheet' type='text/css'>
<div class="container">

</div>

viral patrol
#

You can put {{name}} in place where you want to display username of person who is this action about (follower, subscriber, tipper, hoster, cheerer or raider)

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js%22%3E</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js%22%3E</script>
<link href="https://fonts.googleapis.com/css?family=%7B%7BfontFamily%7D%7D:400,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css%22/%3E
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
      integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href='//static1.squarespace.com/static/59626b932cba5ea9874ee38d/t/5cca210ee2c4831672765349/1556750606848/swdoctor-twitch-icons-webfont.woff' rel='stylesheet' type='text/css'>
<div class="container">
{{name}}
</div>
#

But I think there might be more things lacking in that code

#

Please refer to our overlay editor documentation (in channel's title)

atomic mesa
#

i got it from alpha gaming, he made it for all his twitch followers and made it public download.

broken coyote
#

that is "rotating feed" follower should be a option already pre programmed in

#

u can change it under "event type" 1, 2, or 3

#

@mild cipher didn't you make that widget?

atomic mesa
#

her name is on it, so i'm gonna say i assume so, but no idea why alpha gaming is claiming he made it xD

#

if she did make it, i'd request for the follow, host and raid to be added, very please

broken coyote
#

*his

#

*he

atomic mesa
#

his*

#

he*

broken coyote
#

those are all already in it

atomic mesa
#

theyre not showing in the widget though

broken coyote
atomic mesa
#

thats resub and cheer

broken coyote
#

click them.

atomic mesa
#

oh shit

#

i can change them??

broken coyote
#

the down arrow indicates its a drop down.

atomic mesa
#

mind blown

#

mrboost

#

more like mrimheretohelpallday

broken coyote
#

lol

atomic mesa
#

okay

#

second question

#

is there a way to center the widget to the box, it's at the top of the box so it makes it awkward to make it look like its vanishing behind a frame

#

as instead of doing an animation, it just clips out of frame

#

does that make sense

broken coyote
#

not sure im following

atomic mesa
#

okay so

broken coyote
#

can u screen shot

atomic mesa
#

yeah

#

see how it at the top?

#

if i was gonna put a webcam frame ontop of it, i want to to animate so it drops below the frame, then on change, goes back up and repeats for all alerts

#

but because its at the top of the box, there's no area to show the effect happening

broken coyote
#

I'm not going to lie. Im not following

atomic mesa
#

im gonna cry

#

1 sec

broken coyote
#

Um. Ok

atomic mesa
#

nvm i fixed it

broken coyote
#

Roger ol bub

strong root
#

Quick question. When using custom code for alerts, the default animation in and out settings are not changing. What did I do wrong. It animates in by sliding down, the animates out by sliding up. I have it set to None for both

#

If you could just ping me when ya see my message. i know most are either sleeping or busy

indigo flume
#

@strong root When you click on the widget, the main animation affects the entire widget, but for each individual alert type, you can have a different animation, including for the variations.

strong root
#

Where do I find that? I wasn’t able to locate it per alert type

indigo flume
strong root
#

That’s available when custom code is on? I’m not seeing it

indigo flume
#

Huh ok, it seems it was changed and the widget animation tab is being removed when the custom code is enabled thonking

#

Ok I think this is a bug, but which part I'm not sure

#

Will report it for QA and devs and see how it should be

#

For now I suggest to turn off the custom code option and adjust the animations as shown in the video

#

then turn on the custom code

strong root
#

Coolio. Shall give that a try. I appreciate you.

strong root
#

Hey @indigo flume That work around worked. Thanks again!

next remnant
formal summit
#

Wondering if anyone can help here. I'm trying to download the update for OBS.Live but everytime I click update it says "Failed downloading software update package". Is there anyway to fix this?

rugged rapids
#

What OBS Studio version are you on (top left)?

formal summit
#

V23.2.1

rugged rapids
#

Best to download the update at the OBS.Live page manually again and install this.

molten comet
#

is there a variable that copies whatever I type and record it?

#

for instance, I paste a link in a command and whenever I use this command it shows the last link I pasted?

formal summit
#

Yeah Benno I don't know whats wrong. I'm assuming it has to do with my laptop and how it's still windows 7. I'm working on getting a streaming and gaming pc soon so ill just wait on that.

rugged rapids
#

So you cannot install the freshly downloaded file?

formal summit
#

I go to the OBS.Live page and download it manually just fine but when OBS opens, it says it needs an update. I click it and it says that^^^

rugged rapids
#

What version of OBS.Live have you installed atm (lower right)?

formal summit
#

First time installing obs.live today

rugged rapids
#

I recommend installing the latest version of OBS Studio (23.2.1) and then download OBS.Live from the website and install just the plugin on top of it. This should guarantee you the latest version.

formal summit
#

Appreciate it

#

Okay so now I see where it says V19.5.27.394 is that right?

#

bottom right of obs

rugged rapids
#

yes, this is the latest I think.

formal summit
#

Alrighty, thanks for the help

brittle cobalt
#

I imported my alerts from Streamlabs, and the text is no where aligned where I need it to be even after trying all the preset layouts

sharp island
#

@next remnant It goes to Google's services.

next remnant
#

Ah, I've seen that one before, but I didn't register on it. hm, Amazon and Google seems to have that TTS thing, not sure where they get the TTS from.
I was wondering how, because I wanted to look if SSML could be added to the TTS API.

Thanks for the reply!

sharp island
#

Alas, it wouldn't work because SSML requires a different API structure. It's possible for us to implement in the future.

ancient maple
#

I've been trying since I met you guys at Gamescom last year to switch my alerts and everything over from StreamLabs but I can't get any of my custom CSS to work

sharp island
#

We generally support the same API as SL, so most of what works there should work here.

ancient maple
#

I copy pasted it but it doesn't work

#

tried re-writing it from scratch too but I just get default alert when I do

#

or I get this:

sharp island
#

Well, the shark is probably because you still have the default variations there and your code is only applied to the base (which is overridden when a variation works)

ancient maple
#

fair enough, idk why I can't get the alert working at all though.

amber mantle
#

Hey, simple question, can I do chatbot commands like !set asdf, then !get and the bot says "asdf" ? I am a developer. Would I have to have my own python script running on the side or is there some other way?

hollow ledge
#

was XHR disabled in custom JS?

broken coyote
#

not that im aware of, i know there was a widget that just got added with xml

hollow ledge
#

Hmm

#

My custom widget stopped working

#

But if its in my event and event triggers, nothing happens

#

sorry for spam; in gmae xD

broken coyote
#

does it work if u run it from the overlay editor?

hollow ledge
#

Nope

#

It did yesterday or the day before when I was testing

broken coyote
#

have you checked console for any errors?

hollow ledge
#

facepalm no

hollow ledge
#

@broken coyote I have now, I don't see any errors.

#

Okay, I have am more so leaning towarsd teh fact that something was changed on SE's side. I used one of the Pre-Made overlays for testing and havent edited it since i got it working; it no longer works

broken coyote
#

hm. not sure then. thats above my pay grade. support is thin on the weekends

hollow ledge
#

What would be best for me to do? Spent several hours working on this and for it to just not work, especially on my first stream, makes me feel sad

broken coyote
#

im honestly not sure, ive never messed with xml stuff honestly

hollow ledge
#

XML?

broken coyote
#

XMLHttpRequest (XHR)

hollow ledge
#

Ahhh

#

Well... who would be best to contact is what I mean to ask last message lol

broken coyote
#

lx or thefreywire.

hollow ledge
#

Thanks.

viral patrol
#

@hollow ledge Hello there! The first possible idea that comes to my mind is that your php script doesn't have Allow-Origin: * header sent, so XHR call from your JS just bounces off it.

#

If calling that URL via something else works fine this could be one of issues.

#

Second one - there might be protocol mismatch - SE is served via HTTPS and your script might be via HTTP, so chromium security policy blocked that request (this could be fixed by adding execution params to OBS --allow-running-insecure-content --disable-web-security

charred tundra
#

question: I'm setting up a private donation campaign through my website (I would use GoFundMe but they don't offer an API of any kind), I will theoretically be able to push info via API from there to StreamElements to a custom widget when a new donation comes in. however, I've never set up something to "monitor" or listen to pushed actions from an API... I'm not 100% what verbage or whatever I should be looking for to figure out how to listen for new events so I can create a custom alert for incoming donations. any pointers on where to start for this?

#

(it's a huge $$ goal that I plan to raise for something personal and I'll also be approaching family/friends about it so I'd like a proper landing page for a multi-stage fundraising campaign, otherwise I'd just set a stream goal through regular tips)

sharp island
#

Both of lx's issues should have shown up in the console if there was a problem - under the network tab, if not the main console itself. @hollow ledge

#

@charred tundra You have a couple of options, anne. The custom widget can do virtually anything, so it's just a question of fetching the data from your API (either via polling, or websockets, or EventSource), sticking them into a queue, and then playing them from that queue.

charred tundra
#

okay, thanks!! I just wasn't sure what the right terms were to start my research. this is helpful πŸ˜„

visual canyon
#

Hey! I was informed to come on over here and ask this:

Hey, just curious if any Staff know a codec within Stream Elements to program a chat command to shut off alert box.

The reason why I ask is because a Streamer I mod for (averages 90ish viewers) had a dono come in while she was in the top 3 of pubg. Maybe a command like !soundsoff !soundson for Moderators to switch off and on during those intense situations

pulsar willow
#

He team, is there a "kill" custom command that I can use? Like !kill username with a varaity of random responses. Phantom bot has it but I really want to stay with streamelements only tbh

#

Also: Do we have a host counter? For my stream I really want to show off hosts with a counter to reach πŸ˜ƒ

viral patrol
#

@pulsar willow You can use /timeout ${touser} 60 ${sender} got you killed with ${random.pick 'axe' 'teaspoon' 'bare hands'} (If I understand question correctly). Of course this command should have a price set, so people won't abuse that

#

And about host counter - you can store your hosts within SE_API kvstore (it accepts simple objects) and then display them or analyse them.

#

So onEventReceived - if listener is host-latest then hosts[obj.detail.event.name]=obj.detail.event.amount; and push hosts object SE to kvstore

hollow ledge
#

Turns out it was my .htaccess rewrite causing the issue? Thanks again guys. ALways stupid shit on my end lol

#

@sharp island Thanks for that; I was only looking in console and it was showing up with no errors; when I looked in networking I was able to see it was hitting a 301 code

sharp island
#

Glad to help

pulsar willow
#

thanks @viral patrol

viral patrol
#

np mate πŸ˜‰ Glad I could help

hoary jackal
#

Hey guys, quick question, does SE have websockets available to receive incoming tips/cheers/subs/etc.?

rugged rapids
#

Check the pinned messages please. Most likely this is the info you are searching for.

hoary jackal
#

cool, thank you πŸ™

glad solar
#

Dunno if this is the right place, but im looking for some documentation on the custom widget stuff. I wanna make custom text fields that can be changed from commands in chat by mods.

indigo flume
glad solar
#

thx

gaunt orchid
gaunt orchid
#

@glad solar Do you want eg. change fieldData "fontSize" via the chat? Do you mean this? I create a custom widget myself and this can change the fieldData (eg. change "fontSize" from 15 to 30 via the chat), but once the widget is reloaded these changed settings are gone.

glad solar
#

Naaah i just want to change what it says. The size n stuff just has to stay the same.

low sierra
#

I believe @viral patrol already made this widget or something similar

pseudo siren
#

How can RegEx use and streamelements bot? (some example, please)

viral patrol
#

AFAIK we use RE2 for Regular Expressions in bot.

low sierra
#

golang

silk dome
#

Hey, I am a partnered streamer on Mixer and work as a software dev in the day. I'm sure yall are working on making Stream Elements available on mixer as soon as possible. I wanted to make myself available to you if you need someone's stream to test things on, or just need someone on the mixer side to work with in anyway .

low sierra
#

Hey @silk dome thanks for messaging. We'll be sure to contact you if we have any questions and/or need test partners on the platform πŸ‘

edgy needle
#

Would it be possible to have a sub train timer trigger stuff popping up/sounds playing when the timer reaches a certain time?

turbid perch
#

Hey. Wondering if it's possible to get a Twitch channels custom commands via API/

rugged rapids
turbid perch
#

Appreciate it

#

@rugged rapids Where do I find the token and the channel id?

#

I found them btw

rugged rapids
hoary jackal
#

Question for anyone who can help:

The StreamElements websockets provides a different data structure for live events vs testing events, but I can't find any documentation for the live events (which makes it impossible to test without using literal live subscriptions/bits/tips).

The data structure supplied at https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-event for testing events:

{ listener: 'follower-latest',
  event:
   { type: 'follower',
     name: 'Ardelia',
     amount: 23,
     count: 49,
     items: [ [Object], [Object], [Object], [Object], [Object] ],
     tier: '1000',
     isTest: true } }

The data structure, that I can't find documentation for, for live events:

{ _id: '5d13e558dc46db79b76f6f68',
  channel: '5928b89431f4ec2a365dba77',
  type: 'follow',
  provider: 'twitch',
  data:
   { username: 'ardelia',
     avatar:
      'https://static-cdn.jtvnw.net/jtv_user_pictures/test-id-profile_image-300x300.jpg',
     items: [] },
  createdAt: '2019-06-26T21:36:24.865Z',
  updatedAt: '2019-06-26T21:36:24.865Z' }

Is there documentation that covers these somewhere since they are different?

civic yoke
#

Having some issues with adding points to users

#

Getting "No Authentication found

#



var requestOptions = {
    url: "",
    headers: {
        "Authorization": token,
        "Client-ID": keys.clientid,
        "Content-Type": "application/json"
    }
};```
#
        request.put(requestOptions, function(error, response, body){
            if(error) throw error;
            console.log(response);
        });```
low sierra
#

I'm not a dev so forgive me if this is wrong but the word Bearer might be missing before the token?

#

someone more knowledgeable can chime in if this isn't it

civic yoke
#

That is a good idea but my token variable is "Bearer TOKEN"

#

So I'm not sure if that is the issue

#

This was working

#

But they seemed to have gotten rid of the addpoints section in the docs

viral patrol
#

@civic yoke Hi! I see that you have channelName instead of channelId in url. I think that should work then

pulsar willow
#

Hi! So I just bought EventPop, what do I need to change so it works in StreamElements?

hoary jackal
#

Would love if anyone could help out if you have any info on the websocket question I posted above πŸ˜ƒ can copy/paste if need be πŸ‘

civic yoke
#

Hope I didn't cover you up

hoary jackal
#

Nah, no worries mate

civic yoke
#

Thank you @viral patrol That did work. I was using the room id not the _id

gaunt orchid
arctic agate
#

hello is there a way if u do !topic that it changes the text on my overlays

gaunt orchid
#

@arctic agate hello, yes there is a way... I'm working on something like this. I can give you the preliminary draft on pastebin if you want.

arctic agate
#

@gaunt orchid can i have it or?

gaunt orchid
#

Yes... One moment

arctic agate
#

okay ty πŸ˜„

broken coyote
#

#sharingiscaring

gaunt orchid
#

All the Message things

arctic agate
#

ty

gaunt orchid
#

You're welcome

#

If you have questions, just ask

arctic agate
#

okay

gaunt orchid
#

To delete a the topic: "!yourCommand reset"

broken coyote
#

@coral thunder

#

is that the font color?

rare spindle
#

@low sierra sorry for the ping. I have three questions. Firstly, is there anyway to use the Challenge Royale extension from desktop without a Chrome window?

Second, can we have scenes linked in OBS to auto-responses? So if I BRB I can put a little timer as to when I'm back or a description as to what I am doing.

Third, what's possible to control from my phone? Can I start my stream and modify stuff from my phone like timers?

low sierra
#

@rare spindle this is the channel for developers so let's move to #helpdesk-twitch

celest gull
#

Hi guys I was directed here by the helpdesk crew to see if there might be away you can help me solve some questions I have.

I am setting up a Dungeons and Dragons stream and am looking at different forms of monetization on the channel. After some discussion and research I have decided that our channel would like to use different formats of goals.

Essentially there would be 5 different Goals on screen (percentage based progression bars). But instead of having them tied directly to either Donations and Bits, I would like them connected to a command or hashtag. This is best seen in this "c" team clip https://www.twitch.tv/pennyarcade/clip/SteamyAgreeableElkPipeHype which is what I am trying to emulate.

Is this at all possible using custom commands and custom widgets?

Twitch

Clip of PennyArcade Playing Dungeons & Dragons - Clipped by clivecne

β–Ά Play video
sharp island
#

Absolutely

#

The way to go, @celest gull is the bot counter command + event

#

And then you can make a bot command that will update the value

celest gull
#

Omg thank you I have been racking my brain over this for a few days.

celest gull
#

To further my question here. @sharp island

Could it be possible to attach this to the CumulativeGoal widget? My idea is to allow viewers to essentially put the command into their donation or bits to then send the amount to the according goal.

eg;
viewer: 1000xbits !playerone
adds Xamount to playerones goal.

celest gull
#

Also, to save myself some time do you know anyone who would take commissions for such a job?

viral patrol
#

This will be possible soon ;)

#

And as every SE service it will be available for free

viral patrol
#

Hey! I told you it is gonna be for free!

sharp island
#

I'll take the money, though.

#

Also @celest gull anything is possible. That certainly is, if a little complicated.

lusty pivot
#

Hey. Why tips leaderboard is not getting updated after changing/deleting tips? Is there any way to reset the cache?

#

I even waited for like 10 days but I still cannot get rid of them

lusty pivot
#

I even deleted some of them but they are still showing up in tips leaderboard.

low sierra
#

@lusty pivot Which tips leaderboard?

#

There are multiple places where a leaderboard is visible for tips

lusty pivot
low sierra
#

Currently there are two APIs where tip data is pulled from and I believe this is the reason for this. You are updating the data in one API but the tip page is not seeing that change. We are working on solving this issue. Perhaps @sharp island can share some more info on this

lusty pivot
#

It's like SE internal redis cache or something FeelsBadMan

finite heath
#

its because our tips data is aggregated from the activities

#

and when deleting the tip, the activity isn't deleted

#

i dont know of a solution other than having a dev delete the activities, which isnt something we can do very often...
are you looking to remove all tips, or only specific ones?

lusty pivot
#

Is there a way to either delete or modify activities from API?

finite heath
#

I don't know, sorry

#

Best to wait for one of our more talented staff members

lusty pivot
#

Even in the panel I can't find any buttons or a setting to reset/delete my activities. FeelsBadMan

proud trail
#

Can I use the API to determine things like: when songrequests are added/promoted/skipped/started, etc?

coarse gate
#

I was forwarded to here by streamelements customer support, hopefullty somone could help me out, i'm trying to embed a websource into the editor using Widgets > Custom Widget > Open Editor > HTML, but trying iframe does not show my websource correctly. If I use a youtube embed iframe or facebook, it seems to be working well. Maybe its my websource idk, but it works correctly if i use it in OBS, although im sure its not the same. Hoping anyone could help out.

#

If it works correctly, it would be be a red rectangle (bottom half), currently looks like this:

indigo flume
#

Streamlabs customer support? peepoZoom

#

I think that was me

lusty pivot
#

Tips yearly leaderboard aggregates from activities and there is no option to reset leaderboard or delete activities. FeelsBadMan

viral patrol
#

I hope StreamLabs forwards people here!

#

And about that issue - iframes are disabled due security concerns (along with IndexedDB and cookies)

proud trail
#

are there audit logs kept? e.g. to see which of your moderators/managers did something bad

rugged rapids
#

Afaik, there are no audit logs.

proud trail
#

is there a place i can suggest it πŸ€”

zenith folioBOT
#

@proud trail Check out the new ideas board https://strms.net/ideas. You'll be able to add your ideas, upvote others that you like, 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 the features that you’d like. The #πŸ’­οΈ±feedback-and-ideas channel is best used for discussing ideas already on the board.

proud trail
pulsar willow
#

How do i do math inside a command? all i could find was something like ${eval 2+2}

viral patrol
#

You can call mathjs via customapi

#

${customapi.https://api.mathjs.org/v4/?expr=2+2}

pulsar willow
#

Thanks.
I am brand new to apis and i had another question about them. i was just wondering how to pull one number from a response body, i made a reddit post but i got no help so far.

#

i guess i cant post the link here so if you could help can i pm you it?

#

also would i be able to get the number from one api and post it to the math in that api?

viral patrol
#

Yes you can, just nest those

#

For example: ${customapi.https://api.mathjs.org/v4/?expr=${customapi.https://api.mathjs.org/v4/?expr=${1}-3}*2} will do USER_INPUT-3 first then multiply result by two

pulsar willow
#

tyvm

#

I really need to know is how to pull 0.8787346221 from the response {"rates{"EUR":0.8787346221},"base":"USD","date":"2019-06-28"} when you request a response from https://api.exchangeratesapi.io/latest?base=USD&symbols=EUR

viral patrol
#

Yup.

broken coyote
#

im a idiot

#

disreguard what i said

viral patrol
#

@broken coyote I can't find it as plain number

broken coyote
#

how about a widget? lol

broken coyote
#

I can't find it as a plain number either.

viral patrol
#

It won't work as bot command then and displaying current exchange ratio is unnecessary I think

pulsar willow
#

we end up converting a lot so i was just gonna make a command to convert user input automagically

#

i appreciate the help

broken coyote
#

Do u only do USD to eur?

pulsar willow
#

well i would have !convertusd and !converteur. one would get that exchange rate and multiple the user input and the other divide by it

broken coyote
#

Could make a widget so that. It just would display it in screen

pulsar willow
#

it can only be a command

broken coyote
#

Well yea. You could type !converteur and it would spit it out on screen

pulsar willow
#

lol that wont work for me, im not the streamer, just a mod trying to help the chat.

#

im just looking for an api that will spit out a clean number, i cant believe they all just use the same damn format

mild cipher
#

https://api.thefyrewire.com/twitch/exchangerates/EUR?symbols=USD&mode=1 blobsmirk

broken coyote
#

Lol I knew it

vapid iron
pulsar willow
#

i love you

broken coyote
#

@mild cipher and his API witchcraft

vapid iron
pulsar willow
#

why does ${1} USD is ${customapi.https://api.mathjs.org/v4/?expr=${customapi.https://api.thefyrewire.com/twitch/exchangerates/USD?symbols=EUR&mode=1} * ${1} } EUR not work?

broken coyote
#

${customapi.https://api.thefyrewire.com/twitch/exchangerates/EUR?symbols=USD&mode=1}

pulsar willow
#

that part works, its the putting into the equation that doesnt

viral patrol
#

@mild cipher not to be picky, you can add parameter: amount so it automagically multiplies result by amount

charred tundra
#

@pulsar willow I think you're missing a curly quote as well

pulsar willow
#

where?

viral patrol
#

@pulsar willow and this code above might not work because there are spaces

pulsar willow
#

oh let me see

charred tundra
#

you have an extra closing curly bracket, not sure where you meant to put the opening bracket

#

unless I'm reading it wrong

#

oh I see, you're adding it all in the customapi. variable

#

I didn't see you had customapi inside another customapi inception

broken coyote
#

${customapi.https://api.mathjs.org/v4/?expr=${customapi.https://api.thefyrewire.com/twitch/exchangerates/EUR?symbols=USD&mode=1}*${1}}

pulsar willow
#

spaces didnt help

broken coyote
#

that works

pulsar willow
#

i feel like an idiot i am so sorry. i was just testing the command and not adding a user input

broken coyote
#

if anyone would ever sit in my channel and see all the random stuff i type in, their head would explode

pulsar willow
#

is there a way to round it to 2 decimal places

#

nvm i found how

pulsar willow
#

seriously thank you everyone. it works exactly how i wanted it.

mild cipher
#

Yes! I could add a convert function too (and probably will), unfortunately I had to head out as soon as I posted it. I'm fairly sure there's already a currency exchange customapi floating around somewhere though πŸ€” but glad to see you got it!

cursive glade
#

Hey guys! I was sent here from #helpdesk-twitch! I was wondering if there was any way to get a command put together so that my viewers could add info to a list, specifically a level code from Mario maker, using a command like !add levelcode and then see this list by doing !list

coarse gate
#

sorry not streamlabs, streamelemets lol

#

and yea it was you @indigo flume haha

viral patrol
hollow ledge
#

How is Shroud's custom overlay achieved? Custom JS / CSS + Video effects? Always been curious.

broken coyote
#

the alert is layed over the cam

#

when the alert triggers, its just lpays on top so it looks like its the same file

viral patrol
#

Of course it is possible to achieve way more with combining custom widget and alertboxes

broken coyote
sharp island
#

I wrote Shroud's custom overlay and it's entirely Custom Widgets.

#

With video files, css transitions and css animations and so forth.

hollow ledge
#

@sharp island Thanks, that's what I figured, just was looking to make something with custom animations/effects like that, good job sir. @broken coyote Thanks for that.

pulsar willow
#

how do i format a custom title set command? (default doesnt work.) i tried ${settitle "${1}"} and ${settitle ${1}} but both dont work because the first sets the title to ${1} and the second just sets it to the first word of your title because you need the quotes for more than one word.

low sierra
#

Try ${settitle "$(1:)"}

pulsar willow
#

that would set the title to ${1:}

low sierra
#

curious, what is wrong with the default !settitle command ?

pulsar willow
#

idk it just stopped working lol

low sierra
#

let's fix that instead since that is what this custom command would do πŸ˜„

#

settitle is for pre-written titles

#

the variable

#

what's your channel name?

pulsar willow
#

well setgame was broken too but i was able to fix that in the same way i am trying to now

low sierra
unreal jungle
#

queries and shit for activity log stay the same in the new api ?

weak elk
#

should ${customapi} be back up and working ? Still getting 502 errors

sharp island
#

AFAIK everything should be working?

viral patrol
#

Try to open URL in customapi call on your browser if it replies with data

#

502 error is usually served via service you are calling

cunning tapir
#

I am getting 502 errors on any calls using $(urlfetch), even tried Google

steady iron
#

Hello! I have recently started messing with customization of notifications, I am trying to get a command from Twitch chat to trigger an event, which would be picked up by Streamelements and then use CSS/HTML/Javascript to launch a dynamic notification using a parameter from the command. I have no problem with the coding part, I just don't know how to get the chat command and make it trigger an event.

Is this possible? And if it is, where could I find the right documentation for that?

broken coyote
steady iron
#

Thank you very much @broken coyote !

broken coyote
#

no problem!

steady iron
#

I was just seeing it at the top and facepalming

broken coyote
#

haha been there done that

steady iron
#

@broken coyote Thank you once again. It only took me a couple of hours, but I made it work LuL

broken coyote
#

no problem man. glad u got it working!

steady iron
#

I think it's funny not many people are using something like that, although maybe some are, it's just that we do not notice

#

Now I can do dynamic shoutouts, with Ricardo Milos dancing

#

success

broken coyote
pulsar willow
#

I would like to make a command to list games the streamer has played already as well as a status such as finished, on going, new/not played game, or suggested. i would have 1 command open to everyone like !gamelist that will just list the games and show status and then have ones for mods that i can "!gamelistadd" where it will add the current game to the list or "!gameliststatus finished" to change the status. I assume it would need to use some sort of api to allow all the commands to use the same list so thats why i post here but i have no idea where to start with this command.

indigo flume
pulsar willow
#

am i able to write to the list from the stream chat?

indigo flume
#

As far as I can tell - no. pastebin doesn't allow this

#

only reading from the pastebin

pulsar willow
#

if anybody knows another api i can use to do that please @ me. thanks!

willow wyvern
#

@static wigeon , hey, support on StreamElements website told me, that you can help with the client ID and secret for oAuth. Tell me please, where can we talk about it?

static wigeon
#

sure

#

What's your use case for OAuth?

willow wyvern
#

How can we integrate it? Can we get client ID and secret?

static wigeon
#

I'll give you the credentials when i know a little more about your project πŸ˜„

#

Give me a tl;dr of the integration you have in mind

willow wyvern
#

Well, I can tell you about it personally, not in the chat if you don't mind πŸ‘€

static wigeon
#

Sure, add me on discord.