#dev-chat
1 messages ยท Page 22 of 1
in the custom widget for the event list. How do I make each event that is further removed from the most recent one drop more oppacity.
in the defualt code for the custom event list it is all handled in the container, in the CSS, with the opacity tags
.event-container {
width: 0px;
height: 38px;
display: flex;
justify-content: right;
margin-top: 5px;
animation: 1.6s slide-in;
animation-fill-mode: forwards;
text-align: center;
font-weight: 700;
opacity: .2;
transition: opacity 600ms;
}
.event-container:last-child {
opacity: 1
}
.event-container:nth-last-child(2) {
opacity: .7
}
.event-container:nth-last-child(3) {
opacity: .5
}
.event-container:nth-last-child(4) {
opacity: .3
}
my event container looks A LOT different.
width: 0px;
height: 25px;
display: flex;
justify-content: right;
background-color: rgba(16, 66, 128, 0.8);
border-radius: 0px;
margin-top: 3px;
animation: 0.6s slide-in;
animation-fill-mode: forwards;
}```
ok, then it looks like you would need to add the logic for the opacity, and use the last-child and nth-last-child to control the fading opacity
Doing that right now, but it removes the background all together.
Is it possible to add a background to ONLY the last child?
pretty sure that would involve nesting containers, and I have no idea how to handle that, I know enough to trial and error, and get myself into trouble
damn, it is pretty much the only step beyond figuring out how to comment certain things out properly to mimic most of my old widget.
Figured out how to just add the background color to the last child.
I forgot to add a damn: ;
-.-
@dense brook How many items does it have?
?
The rotator, how many items does it have?
as in follow/sub/tip/cheer/host/raid?
Bcs you can add css .event-container:nth-last-child(4) { opacity: .3 }
as a test
are you reffering to the things displayed at any given time?
sure lets go with that 
just 5
so try adding the last thing to the css
ooh wait i missed something in what you talked with Kite
let me re-read

I already added the transparency and the background to the last child.
At this point I'm just trying to remove some stuff, re-allign some things and make it so that the font shows up with capitals.
But It seems I may have to dive into the JS for this.
I don't need to see the host and the raids etc.
.lowercase {
text-transform: lowercase;
}
uppercase - makes all of the letters in the selected text uppercase.
If you want the first letter to be capitalized:
capitalize capitalizes the first letter of each word in the selected text.
Got it to work, nice.
as for aligning - use margin and padding
another step closer.
Yeah I'm trying to figure out how to allign, at it may seem connected to the images added within the container itself.
Use these for reference: https://www.w3schools.com/cssref/pr_text_text-align.asp & https://www.w3schools.com/css/css_align.asp
So I'm trying to figure out if I want to keep them or not.
I used both those as reference once, when I had to align a text ON TOP of an image background, but then align them side by side 
For some reason I can't get the Oswald font to work.
aaaand nvm, I forgot I had to load in the HTML
to comment something out in JS I should use /* and */ right
use //
the /* */ is for html i think and css is something else or again the /* */ way
how do I close the //
you don't
or does it just comment the line.
it comments the entire line
ah
Seems /* works too as long as you close it with */
So I think I got my widget to work the way I want.... give or take.
Now to get into smoothing out the animation ... with code?
whatever coders are being paid. it isn't enough
well we get paid for knowledge and speed 
I do hope that coding inside of SE becomes easier.
ideally, you code outside of SE, and just copy/pasta into the environment
I have been hooked on Visual Studio Code lately 
Ideally I also know how to code ๐
My kingdom for the ability to run the widget while keeping the code open so I can just ctrl Z if it all goes wrong!
@indigo flume <!-- comment--> is for HTML. /* comment */ is valid in most other languages as a multi-line comment. Some only use them as doc comments such as:
* This is my App
*
* Some other info or maybe what the variables are
*/```
Sorry we were just talking about style guides at work and I wanted to pipe in on the comments thing :P
But for a general 1 line comment, you should use `//`
If your code is good enough (proper naming) you shouldn't need comments (special cases obviously happen)
I'm a software dev, not a web dev @red hull ๐
So I know the guidelines for what ever language i use at work ๐
Haha all good. I'm moving towards full stack so I'm learning more crap and that my use of single quotes might change because of other languages I may use.
Hey I have a question, is there a way to remove or give an option to replace the pepe meme emote when using the redeem command? Not sure if this is the proper section to post this
This is not the proper place for it, you would need to ask in #helpdesk-twitch ... but the answer is, go to your dashboard and enable the !pepes command, and then use the !pepes command in chat to disable all pepes.
@honest bone thank you I'll look into seeing that will work
I'm using comments not to comment but to disable pieces of code without having to remove them incase I want to turn them on later.
Right now I don't want hosts to show up and followers so I commented that out.
if I ever want to turn it back on ... remove the /*
Is it possible to write the time zone variable to respond with EST 12hr format rather than 24hr clock?
No, the built in variable uses only 24 hour at this time
Ok thanks
<@&382267076632379392> is there a way to make the "resub" "amount of bits" and all that go on the left hand side before the name in a seperate container ? kinda like on DansGaming stream
@manic ivy are you talking about custom css or normal alert?
@manic ivy I would assume you just switch the variables around 
@indigo flume @green yarrow I'm talking about Custom CSS ( event list )
i'd like it more square but yeah the amounts and stuff i'd like for them to be on the left in a different container
Well I'll take a look if I can do something similar


Hey I tried everything for this but I can't seem to do it... Anyone have luck on reversing how the custom event list works?
Can't seem to get it down correctly.
@snow summit What do you mean reversing?
How do we get to be apart of the beta for Ace Live Streaming?
Codes for the StreamElements Live app were being handed out at Gamescom. This channel is also for support with using API and other custom code stuff, questions like that are best placed in #general-chat
@indigo flume Right now the events line up from the top going to the bottom. I'm trying to get it to line up horizontally. However, when a new event is to be added, it seems that it adds on the far left... but the list moves it to the far right instead.
Hall guys
I need help alerts with Custom CSS
How can you display the name? {name}
{{name}}
@honest bone haha so Easy thank you so much ^^
Hi, what would be the best way to check for redemptions of a certain item? I am aware that I can get redemptions through the API but I would like to avoid polling if possible.
@scenic jay Socket would be a good option, you can get the redemption as soon as it comes in
Thanks @mild cipher , didn't think of that c:
@manic ivy Nice DANSGAME Events list 
DansGames events list is a little more complex than what he showed and was designed by Chris Hansen
as it contains his his alerts inside the events list aswell.
Is there any way to run commands as the bot? Sorry if this has been asked before.
@scenic jay yes, the API documents are in the channel header
That provides ways to get, update, and delete custom commands but not the ability to run any commands?
I know there is a way, I had someone create a program to run timers and commands at the same time across multiple channels
@scenic jay https://dev.streamelements.com/#bot, check out the bot/{channel}/say endpoint
Sorry for the slow response. It doesn't allow me to run any commands, just chat as the bot @cinder lintel
right, which is what a command is. So combine it with the get of the chat commands:
GET this command text
TALK this text
The bot is run off the API. Everything is. So if the bot does it, you can do it
My bad I was having a bit of a special moment when I tried that. Miss typed /timeout -_- thanks for you help

Hey are there any developers in here that would like to develop a small thing for my stream.. Willing to pay! Here is whats needed: I would like a bar on my stream and it gradually fill as Subs, Tips, Bits, Follows, etc come in.. Once the bar fills it makes a noise and then resets but is a different collor and says x2 at the top.. Once that fill.. Repeat.. Diff color but says x3 at the top.. Please reach out to me if this is something you could do for me.
Northern Ireland based streamer trying to access the app if anyone has a invite code they would kindly have
@pulsar willow The app is currently in closed beta, keys were given away at the Gamescom in Cologne, Germany.
Please wait and stay tuned for the open beta.
Hi,
My question is: We need a coder that can code something like this (Watch bottom animation):
https://www.streamerclips.com/twitch/lirik/RockyHonestHerdDatSheffy
For example LOLIZ112 has a subscribed for 7 months (as you can see on the link i sent you).
The problem is now, we dont have coders that can code a animation with the users name so that it looks
like it moves in the bottom logo.
What we can do is create animations and we will do so like you see in the background of that name "LOLIZ112".
So the only thing you have to code is the name popup and move it inside the bottom logo. (We will send you a screen overlay for that)
Can you suggest someone that can do this please?
@maiden island Thats a tall order on its self and SE Devs are currently busy with other stuff, including the designers.
What I can do instead is point out that the variables for sub/tip or what ever Lirik's alert shows there, can be located in the pinned messages here. If you can find some free lancer dev who may be willing to do this, then at least you can provide him with the variables for the overlay.
You could use a jquery plugin like lettering.js to split the name into individual, animatable <spans>, then loop through each letter and generate a random animation duration so the letters are offset. Additionally you could calculate the distance of each letter from say, the middle-most letter and move it horizontally to give the appearance of moving to a central point.
Hey are there any developers in here that would like to develop a small thing for my stream.. Willing to pay! Here is whats needed: I would like a bar on my stream and it gradually fill as Subs, Tips, Bits, Follows, etc come in.. Once the bar fills it makes a noise and then resets but is a different collor and says x2 at the top.. Once that fill.. Repeat.. Diff color but says x3 at the top.. Please reach out to me if this is something you could do for me.
@paper dock I actually started working on your idea today when I had 30 minutes at my work and I got to some point with it, but haven't touched it when I got home. I am willing to try and do it for you, but I'm not going for the money, more for the learning experience of it.
To reassure you, so far it looks like I'm going in the right direction with your idea, just need to fiddle with the JS ๐
thank you so much @indigo flume
@indigo flume Tag me when its done or if you have any questions. Really excited to see this!
@paper docki already DMed you last night
hey im not sure if im missing something glaringly obvious but im getting this error when trying to add points to a user {"statusCode":403,"error":"Forbidden","message":"No channel authorization found"} and im 100% sure the channel id and JWT Token are correct
I think that JWT token is not present in headers or it is not in proper way
@nova parcel https://developers.streamelements.com/endpoints/points - You don't need the JWT token as far as I can see
oh
ok
this is my code btw r = requests.put('https://api.streamelements.com/kappa/v2/points/'+jake_id+'/'+user+'/'+amount, headers = {"Authorization":jwt_token}, ) print(r.text)
so i dont need the header?
Yea like LX said, the JWT token is not present in the headers, so you can just skip it
If you see the example in the link I provided:
https://api.streamelements.com/kappa/v2/points/:channel/:user/:amount
@indigo flume nooo
Its not?
It has to be JWT Token there if you add points ๐

i havnt changed my code and this code worked for a while
@nova parcel one sec
r = requests.put('https://api.streamelements.com/kappa/v2/points/'+jake_id+'/'+user+'/'+amount,
headers = {"Authorization":"Bearer "+jwt_token},
)
print(r.text)
Something like that
i have Bearer as part of my jwt_token variable
Oh
You might want to debug it somehow, will print(request) provide you info? (I don't know python)
OK. I was wrong too. Auth seems to be OK, as it would be error 401
Maybe check URL if it is proper (maybe token is OK, but there's something wrong with channelId)
well im 100% sure that the channel id is correct, but it isnt my channel id, it does however work with my channel id
could it just be something to do with that its not my channel id?
It is definitely that
i also tried to do it with the persons jwt token tho
still same error
and this previously worked for me
I am not sure if this could work if you have "full control" permissions, but definitely should work with pair userA_channel_id userA_JWT_Token
well ive only got Editor permission for his channel but i still get the same error when using his JWT Token
is there like ip checking or something?
I've used another streamer's JWT token on my own Ground Control, so that should not be a problem(even though I have full control on their account)
so then i dont understand why i would be getting this error
but it works when adding to my own channel id

What is this streamer name?
JakeOCE
5adad67f9ea27950aa035612
yep thats what i got
Check if this is channeld you are using
it is
OK, so now try to check other endpoint
which one?
alright
It does not require token
alrighty
{"profile":{"headerImage":"https://cdn.streamelements.com/static/user/profile_header_default.png","title":"jakeoce's profile"},"provider":"twitch","_id":"5adad67f9ea27950aa035612","avatar":"https://static-cdn.jtvnw.net/jtv_user_pictures/beece3b7-a97e-4ffb-a920-d2478fdf0c7b-profile_image-300x300.jpg","username":"jakeoce","alias":"jakeoce","displayName":"JakeOCE","providerId":"136301538","isPartner":false,"broadcasterType":"affiliate","inactive":false}
is working fine
Especially that it is working with your credentials on your channel
Wait, what?!
You shouldn't be able to do that
OK. Try to change JWT Token to "DummyStuff"
Maybe it is overwritten by your JWT token somewhere
You shouldn't be able to add points to your account with his token
oh
my
fucking
god
im legit stupid
my clipboard just wasnt working properly from my comp to vps
sdfpgioDUSFHgiopu h
im sorry for wasting your time
it is now working
No problem. You made me smile now ๐
@nova parcel if your script is going to be accessible over HTTP, you might like widget Wheel of fortune
There is a variable, that might make use of your endpoint:
let URL_TO_SCRIPT = ''; //Set value of this to your API man-in-the-middle if you want points to be added automatically. Request sent is GET URL_TO_SCRIPT?name=SUB_NAME&prize=PRIZE
oh interesting
but nah my bot is a betting bot
for fortnite
like whether the streamer will win or lose their game
This one is built in
@nova parcel https://streamelements.com/dashboard/contests/
mine is easier
also once i get around to it imma build in an odds system
based off his winrate for the day
Hi, I was directed here via reddit for a command I'm hoping to create for the steamer I'm channel editor for, simply he would like a command that would do the 99 bottles of milk song counting down using a singular command. Is this even possible and if so can anyone help as I'm new to SE amd struggling. Thanks in advance.
We do not have a chat variable that does a countdown only a count up. My suggestion would be to make a script and host it somewhere an call it via the ${customapi} variable
@gilded nova Create a command:
!bottle
Response: ${customapi.http://api.mathjs.org/v4/?expr=99-${getcount bottles}} bottles of beer on the wall, ${customapi.http://api.mathjs.org/v4/?expr=99-${getcount bottles}} bottles of beer. Take one down and pass it around, ${customapi.http://api.mathjs.org/v4/?expr=99-${count bottles}} bottles of beer on the wall.
If you want to reset it just use command !editcounter bottles 0
Thank you so much!
Destiny 2 command
$(customapi.https://destinycommand.com/api/command?query=${1:}&token=1535590918616088649&default_console=ps)
Optional: theย default_consoleย parameter can be changed to eitherย pc, xbox or ps
reason why customapi would be returning the entire contents of a .php file instead of the echo'd content?
@fierce frigate most likely the php is not setup properly or the way you are giving it a variable is wrong
...i mean. literally running CURL on url... then echo $data; lol.
I don't know PHP, but do i know that ${customapi} goes to the given link and awaits w/e the link should return and I guess in this case the link returns the entire content of the php 
k... how long does it wait? and how many char string will it take?
the default command response character limit is 400, but thats if you add/edit the command via the dashboard. I think you can override the character limit for a response via the !command add/edit <command-name> <response> via the twitch chat 
kk. i'll look into docs for that.
so you cna have a link thats like ${customapi.http(s)://yourveryvery.long/?=link-here-that-i'm-dramatically-making-it-big-for-the-sake-of-showing-but-it-wont-be-400-character}
i think i may have found the culprit w/ the bad php rendering.
lol.. kk thx @indigo flume
If its something on our side, please let me know as I'm interested and planning on using/learning php for a thing
it's not. i'm too tired. ๐ i was wondering wtf lol. just me. need sleep. TY.
Its always good to have a rubber duck for debugging 
either be a person via some pixels or actual rubber duck
but i'll tell you what tho.... how i WISH the edit/del buttons in the /dashboard/bot/commands/custom/ where on the left... this side-scroll business is killin me
@fierce frigate Here is the StreamElements Ideas Board: https://strms.net/ideas
yup. it's on there. https://streamelements.helprace.com/i1027-some-dashboard-ui-suggestions-requests
13" macbookpro
i have a cinema display when at home but not always on it.
@fierce frigate Hi! If it is returning full content of PHP file instead of executing it, there is no PHP parser running, there might be several reasons to that:
- short_open_tag is disabled and your script is starting with
<?instead of<?php - there is no PHP parser installed
- there is no mod_php (or fastcgi) installed
- your file has no
.phpextension
Hello, can anyone give me an example, how to use the api to send Chat notifyยดs for Follow,sub,host and donation? ๐ฎ
@sturdy steeple We already have such a module for the bot. Go here: https://streamelements.com/dashboard/bot/modules and scroll down and use "Chat Alerts"
Yas
but thats not synchron with my script ๐
other brands for alert things and stuff... have maybe after 5 secs write that in chat.. and thats to long
I'm not following. What other brands?
Also, you want to make your own chat alert module, that is connected to our alerts and then connect it to twitch chat? You're better of looking at Twitch's API on how to connect a bot account to the chat and then have an event listener on their API.
event listener <-- thats a good hint
im now into python, but i cant handle xD its like "read python api -> brain -> response: sdsdfasdfsdf" ๐
@sturdy steeple https://dev.twitch.tv/docs/api/ this is the newest twitch API, to which I suggest looking into how to hook your script to.
Are there any plans to provide a way to authenticate a third party app to retrieve an access token to use on the streamers behalf? ie. how StreamLabs allows you to register an app: <dev.streamlabs.com/docs/register-your-application> or Twitch <dev.twitch.tv/docs/authentication/>
@harsh pawn Oauth2 implementation is a work in progress I believe. No ETA on it
https://developers.streamelements.com/oauth2 ๐ at least the placeholder docs are there lol
Thanks @mild cipher
I want to make a Hug command that pulls a random user and I have this setup and working but is there a way I could setup the command to count how many times a said user has been hugged?
@fair marsh I haven't thought about this before, but it could be possible by bringing together $(count variableName) and $(user), something like $(count $(user)), though the problem is getting the randomness to it. There isnt a way to store a variable name directly, though it could be possible through the useage of a third party
its an interesting idea though
i've been playing with trying to assign random.chatter to a variable using a different API but so far other then making a custom bot i haven't found a way to make this happen in StreamElements
Hi
Here's my attempt (but unfortunately it requires a server).
Since using two $(random.chatter) variables in the same command results in two different people, I looked at using keyvalue.xyz to store stuff, but since the resulting URL is unique it's probably impossible to curl it in the same command while letting the $(count $(user)) counter do its thing (I guess you could store the value yourself but I felt like SE already does a good job with it).
I tried to focus on returning the same random chatter instead, that way the counter can increment as normal for each person. I ended up sending the random chatter to a PHP script which posts to a server and puts in a key-value pair (with the channel, in case you want to share with friends). Then I call the same script which gets the last set chatter of that channel. Since this is done in one go it essentially just returns the same random chatter. (I could probably forgo the script and do a GET right to the server but ๐คท )
Then the counter increments the count of that person.
I don't have my own server, or else I'd keep it up indefinitely ๐ฆ but if you want to try it/see what the syntax looks like:
!command add !hug $(sender) hugged $(customapi.thefyrewire.uphero.com/public/return_same_chatter.php?channel=$(channel)&chatter=$(random.chatter)) $(count $(customapi.thefyrewire.uphero.com/public/return_same_chatter.php?channel=$(channel))) times!
i will try to use this on a sever thanks for the info
Hello peoples! Question... is there a way to force fake notifications in SE? I have a bot that can post out to the web and i'd like to hook into the API to have SE respond with an alert if a user types a command in chat. Is this possible? Further... would there be a way to pass a gif url with that post to have the notification show that gif? Thanks in advance for any help. ๐
scrolling back a bit i see that Oauth is still in progress, so probably no go on this
if anyone has any suggestions, please @ me and i'll check back in. Thanks! ๐
@pine pendant You can force 'fake notifications' by connecting to socket and emitting an event like this:
streamelements.emit('event:test', {
listener: 'follower-latest',
event: {
amount: 5,
count: 35,
isTest: true,
name: 'test mcgee',
tier: 'prime',
type: 'follower'
}
});
- but this would show up a follower alert. I would probably look at making a custom html script that connects to chat and listens for the command then display the 'alert' in that, that way you can easily pass in a gif url to use as well. Additionally no need for any authentication stuff, you can listen to chat silently without an identity.
Interesting... i'm not super skilled with this, but i'll do some digging on what you have here and see what i can make of it. I appreciate it! ๐
Hey I have a question considering the streammarathon widget provided in #widget-share. I changed the script a bit so that it would consider the Tier of the sub:
[...] else if (listener === 'subscriber-latest') {
countdown(subSeconds) * data["tier"];```
Sadly that doesnt seem to do the trick tho, is there anything I did wrong?
@pine yew the calculation should be happening inside the function like this:
countdown(subSeconds * data["tier"]);
- keep in mind tier is usually
1000for tier 1,2000for tier 2, and3000for tier 3. You might also see 'prime' as a tier, which it probably won't you multiplying by. You could add a check in. I'm assuming you'll treat a prime sub as a tier 1, so just the regular seconds then, and divide the other tiers by 1000 to make them x2 and x3 respectively.
else if (listener === 'subscriber-latest') {
if (data["tier"] === 'prime') {
countdown(subSeconds);
} else {
countdown(subSeconds * (data["tier"]/1000));
}
@mild cipher Oh god im stupid lol. I didnt see the brackets 
Are you sure about 1000-2000-3000 instead of 1-2-3? In the pinned custom event list it says its 1-3 ๐ค Thanks so much tho and oh boy I feel stupid
No prob lol. And ahh okay, maybe it's modified before it arrives? I'm basing that off what I usually see in the socket ๐ you can always try and let us know!
@pine yew In a vanilla custom event list, I modified data.amount to data.tier for the sub then sent a tier 1 sub and it comes up as 1000 
@mild cipher I mean I guess it's 1000 then, maybe the pinned document should get updated to make that clear then.
Also what is the reason for it being 1000/2000/3000?
seems a bit weird to me and unintuitive
@pine yew I'm not really sure either
I guess maybe it helps the tier stand out in the raw twitch message so you could see it at a glance, and maybe helps prevent it getting overlooked as an arbitrary number?
Hello i find a bug in the Bot Command, i use the Bot in German and the Command if i use !songqueue or !songlist the Bot speak the wrong Link https://StreamElements.com/esteban_playzsongrequest he lost the " / " after alieas, if i use it in English the link works fine, can anyone help i canยดt Edit the command ๐ฆ
Is there anyway to reference an uploaded media file in the custom HTML? I couldn't see a variable for it. Something like {{img}}? Or will it need to be hosted somewhere else?
@mild cipher
This is documented by LX in the pinned messages doc file we gathered.
Hope it helps
Oh, cool thanks @indigo flume
I'm blind
Oh wait
I have the outdated version, that's why I couldn't see it 
Sorry for those tricky updates ๐
@mild cipher you can also rmb click on icon of image/video and get URL of that, so you can host multiple webm/images
I have a question: I want to Flip the Eventlist, so the newest alert ist on Top on the Eventlist and then chronological below it, the other ones. How am i able to do this?
The default eventlist or custom?
@twin ore would be interesting for both, but more like the Custom because i want to style my own eventlist
Juuuust a sec.
This is where you change it
$('.main-container').append(element)
became
$('.main-container').prepend(element)
Credit to @viral patrol for this by the way 
@twin ore Thanks a lot! (also to @viral patrol ) and how can i set up, that only Host and Raids with a minimum amount of 5 Viewers is shown in the eventlist?
Yeah, that's lx's edited version isn't it?
@cobalt fable http://jsfiddle.net/cuxg98n6/ use this code for the custom event list
Just make sure to change the append to prepend and then edit those marked lines I showed
Yeah, the variables on top are super helpful for quick edits.
The code I gave is an upgraded/redone version from LX and it handles events better
@twin ore @indigo flume Thanks a lot!


lx is the legit hero, we're just spreading his coding gospel.
There is an update on the event manager? I took the custom one and just commented it out
seems the same to me
Never mind, I just updated the custom code on my one, seems to have improved ordering after loading as well as ease of turning of and on certain elements.
No need for massive amount of // spam here!
is there a way to set up a paid command to increase every time a user uses it
@fair marsh You may need an API call for it to work, but I'm not sure if the API call allows adjustments to costs. If you know a programmer friend you may ask them to take a look into our API here: https://dev.streamelements.com/#bot_commands
Currentliy i am building my own Alertbox with custom CSS and i want, if there is no Resub/Donation Message, the div to be hidden.
I have a padding inside the box, but if there is no message, a black box is shown with no text in it. and i want to hide it.
Here is my JS Code:
window.addEventListener('onWidgetLoad', function (obj) {
'use strict';
var messageBox = document.getElementById("alert-message").offsetHeight;
if (messageBox > 0) {
document.getElementById("alert-message").style.padding = "1em";
}
})
But this won't work.
@cobalt fable Have you tried style.display = "none"?
(Also "use strict"; goes at the very top)
(usually I guess. unless you only wanted it for one function in which case ignore me)
Tried it, won't work too :/
Wouldn't it be better to check if message itself exists rather than if offsetHeight is greater than 0? I think that it might always be greater than 0, regardless of if there's a message or not, but I could be wrong.
If you are doing custom css for the alert widget, you don't need JS for it.
You only need html and css
@mild cipher True that.
A hidden element returns 0, but if it shows by default then probably will always be greater than 0.
@mild cipher you have an example? ๐
@indigo flume Yes, but the Problem is, that i have a padding on the Message Box, but if someone ReSubs with no message, a black empty box is shown. I need a solution to disable the box if there is no message
I'll give you my own code that handles the tips
or show you at least how I handle it with no JS.
This is still for the alert widget ONLY and not CUSTOM EVENT LIST widget
my JS has a code that triggers a delayed sound and thats it
basically the custom css for the alert widget overrides the predefined settings on the left
This is how it looks like with a message
and this without
and the grey box happens, because i have a padding on this box.
and i want, that this box dissapear when no message is written
Ooooohh, I completely misread
I kept thinking event list instead of alertbox and was like, why do they wanna put messages in the event list?! But that makes more sense. So yeah, custom stuff for each alert is better suited to the individual alertbox css/html and not custom event list.
Because I have this type of custom css for my alert widget I understood what he meant @mild cipher 
But I guess you were on the write track, but JS is needed for the check I guess
Okay so now everybody knows my problem ๐ any solutions?
Let me see if I can smack something together
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'tip-latest') {
document.getElementById("alert-message").style.display = "inherit";
} else{
document.getElementById("alert-message").style.display = "none";
}
});```
@cobalt fable I'm not sure on what values and how they need to be placed into the
document.getElementById("alert-message").style.display = ????;
part, but I assume its "none" for hidden and "inherit" for to show
also, alert-message is the actual message...what is the name of the <div> class that holds the actual box?
because you need to add display: none; for it and then change the document.getElementByID("DIV NAME HERE")
Not sure if we add the JS listener if you need to have the message handler as well
btw, I'm still learning stuff about CSS my self, so its not my strong point
and I may have not made it properly

@indigo flume
<div id="alert-message">
{{message}}
</div>
And for the Sub Alert? (i think the "tip-latest" is for donations only)
i assume in the CSS you have the sorts of this:
#alert-message{
border stuff here
}
Yes
ok, so we on good track then 
if (listener === 'subscriber-latest') is for the sub alert
Do test it out, as I assume by adding the event listener in the JS, we may be breaking the message to show 
Just to double check, this is in the alert box widget right?
@indigo flume Same Problem 
@mild cipher Yes

In that case, KeiZar is right, there's no need to add an event listener into JS. Back up your current JS code into notepad or something and then delete everything and try this:
let message = document.getElementById('alert-message').innerHTML;
if (message) {
document.getElementById('alert-message').style.display = 'none';
}
@mild cipher now: no message is shown 
Oh
adjust the if statement. maybe ```if (message != "")```` ?
It's hard to test since all the test alerts come with a message 
Same Problem... And yes i know, the good thing is, i go 2 Resubs yesterday without a message ๐
oh wait, LUL I got the if the wrong way around
yes i've tested it with
if (message == "")
and still the problem

if (message === "")

JS has this weird triple equals sign I've noticed in some JS coding
doesn't change anything
=== is a stricter form of ==
@cobalt fable Ok so, at the moment the block hides and shows properly, BUT the message is not there right? I think I remember I saw somewhere where you can access the {{message}} html declaration directly in JS
I think it was $('message').text or something 
I found my solution and its like my first intention just without the
window.addEventListener('onEventReceived', function(obj)
This works now if in css is no padding definded:
var message = document.getElementById('alert-message').offsetHeight;
if (message > 0) {
document.getElementById('alert-message').style.padding = '1em';
}
But thanks a lot to @indigo flume and @mild cipher for your time and help 

Okay next question ๐ (sorry if i am asking so much but i'm new and i want everything to be perfect ^^=
is it possible to show Emotes in the Resub Message? like if someone writes: "Love your Stream PogChamp" the Alert shows: "Love your Stream
"
The only way to parse emotes efficiently requires the raw twitch message (containing the location of the emotes in the message) which I don't think you get supplied ๐ฆ
I wonder if (typeof(message) != "undefined") or if (typeof(something) != "string")
Huh, but I think it is always defined
Oh. I know
if( message.length>0)
Ehm. Is it possible, that in OBS Studio the Browser Source is different to the preview in the editor?
In Editor:
in OBS Studio:
As you can see, the padding is missing on the second one
@cobalt fable Are you using something else to view the editor? Like Firefox?
found my issue. In OBS was a css who prevented some stuff
Is it intended, that the Cheer Emotes which are used for Cheering aren't shown up in the Message in the Alert? Only the Text Version?
Will it come in the future? My Old Alert system was able to show these (and emotes) and it would be sad if this woudn't be possible anymore :/
Allright ๐ฆ then i have to deal with it until it comes (hopefully)
@cobalt fable for the time being, if you wanted you could maybe write a function to parse out the cheermotes in the cheer message, so that it would only show my name is bill
@mild cipher that would be a lot of work for every cheer emote ๐ but it would be interesting to know how to do it
there are 5 cheer emotes...excluding the emote cheer emotes 
but one way is, you can get the message, split into arrow, for each it and if anything matches for example "cheer" with a number on the back -> remove and then append the array back to a normal message and you are golden 
Hm. I don't know how to do this, but it's not important right now.
And i think the Overlay Manager is quite bugged with custom css, especially with JS. Because my problem before was solved, but after i refreshed the page (i saved before) my JS won't work anymore, or it just workes in the Editor, or just works in OBS but everywhere is different 
clear cache? 
There might be another issue with that. If you use external libraries (like jQuery) they will work within editor, but you need to include them to work in OBS as well
@indigo flume I did.. but in the editor i didn't worked too after some time
@viral patrol Nope no external libaries.
Wait does this mean my Marathon widget won't work unless I include the thing in obs as well?
@dense brook If you've removed the countdown.jquery line LX mentioned, you still see the 0hour0minute0second thing and it still tracks properly, but it looses its "default" styling
The above I think is not related to the marathon widget
The above is related to the alert widget it self
ah
I haven't removed it, because I have no clue how to style it proper.
but If I don't remove it, it does rely on a jquery, hence I was confused.
I'll try to take a look tmrw, as I have a day off from work.
Hi, is it possible to send an alert everytime a viewer interacts with my site?
@normal ocean what kind of alert?
@mild cipher when a button is clicked on my site it will send a message to my chat saying 'username has done x'
@normal ocean if you don't need anything to appear on screen and only in chat, you can POST to the /bot/{channel}/say endpoint to make the bot say something in chat ๐ Documentation here: https://dev.streamelements.com
@mild cipher thank you! Does the user have to be logged into Twitch through my site? Sorry for noob questions.
Huh. I dunno where my other reply went but yes, a 'sign in with twitch' type button would involve oauth with twitch.
@mild cipher thanks again... if you're interested in helping would you be able to send me a message?
is there a way to set up random.chatter to ignore people who haven't spoken in chat aka lurkers / bots
Unfortunately there is no way.
do you have websocket? Listen to event?
Afaik we listen to Twitch's websockets atm as that is the latest API way/version they have. As for our API we don't have, afaik. Check the channel's descriotion for the 2 links.
@spring cypress there is a streamelements socket, but no official documentation yet. Search in this discord for this: socket from:Styler#0001 and it'll bring up a snippet to get you started
Thanks @mild cipher
Also.. another question... can we have a self script, like create a bang script with things that I want, custom, and use it on streamelements?
As long as that script is hosted somewhere else, you can call it with ${customapi.SCRIPTLINKHERE.COM}
So !bang $... right??
And in that link I add the user, who is banging (in case of)
I have no idea what you mean by bang script
but depending how you build it and what parameters it expects and what it returns, the command can be like this:
Command name: !bang
Response: ${customapi.http://CUSTOMSCRIPTHERE.com/?=${user}}
I see, good to know
if nothing is set after !bang the user of the command is set in the ${user}, but if you want the user of the command AND the @ person, then add /?=${sender}+${user} or how ever the script expects parameters
Okey, thanks
any widget documentation, so we can know what to use on JS side?
Also... socket, I see the docs, thanks for that @mild cipher what events does that receive? any chat message or the alerts (follow/sub/resub) things like that?
@spring cypress check pinned messages foe the widget documentation
Thanks @indigo flume
the socket, just happens some event when the channel is online?
@spring cypress only alerts. Event types will be the usual name (follow, tip, cheer, host, raid), but note that subscriptions appear as subscriber and not subscription. To receive test events (i.e. sent from overlay editor or replayed from dashboard), you need to listen on event:test as well. The event types are the same, but have -latest appended to the end like in the widget documentation (note that it'll be follower-latest). The payload structures are also slightly different between test events and actual events, but you can console log and inspect these
I see, thanks @mild cipher
It would be good if there was something to receive chat messages (create custom commands/scripts)
You could use TwitchJS for chat (the community maintained version of tmi.js)
Interesting, use twitchjs and send commands to streamelements
Or something else
But thanks!!
Gonna really think in how do a few ideas
Like hug/bang/spook (countable) commands, and count it per user
The counter for elements with an easy shortcut to increase it (like in labs), things like that
Use for obs webscoket
I've been working with the "Custom Event List" widget lately and noticed that the data is lacking in a few important areas, and was hoping that it could be resolved (should be an easy fix). Right now there is session data for Subs, Followers, Tips, and Bits, but not Hosts and Raids. Those are both needed. It would also be amazing if there were a list of active chatters for the session. The reason I want all these is so I can take the widget concept being used as "end credits" and make it more robust like others I've seen for Stream Labs that include a lot of stuff that we don't have here on Stream Elements. Also, is there a good documentation repository for everything available to us when using the "Custom Event List" widget? Seems like a link to that documentation location should be a part of the widget description.
@gaunt shard I think all your questions can be answered by looking up the document in the pinned messages.
thanks, I'll check that out
including the session thing for the host/raid ๐
well the session thing does not appear to be an option now. I looked at all the data
in "onWidgetLoad" obj.detail.session.data did not have session data for Raids or Hosts
Are you referring tot he end credits widget not having that?
If yes, you can add it and poke the person who made it, so that they can update the widget.
it has a blank raids data object that does not seem to populate even with past raids, and a hosts object that has old hosts but nothing session-sepecific
yes I am, but I can't add things for data that does not exist, that's the concern
session specific data collections do not appear to exist for Raids and Hosts
everything else yes, just not raids and hosts, looks like it may have been an oversight
Aah right, now I'm looking at the document.
well, you can try adding it, mimicking the other event types
https://dev.streamelements.com/#sessions__channel__get looking at the "response" tab (sadly deep linking is not possible with this documentation framework)
host-recent is an option but it includes hosts that go back fairly far (not sure what the timeframe is) I'm using that now, but because it's for multiple sessions the same hosting channels are listed many times. There is also host-latest, but that's not explained. The documentation seems to outline the response but does not provide descriptions for what the values represent, so it's almost like not having documentation.
I was able to scrape the response object on my own, so sofar the docs are not providing new information
I can give you a code base you can use to track past hosts/raids as to the amount and names if you'd like. Not sure if its going to help you
But atm I'm looking at it and it can help out, if you do onWidgetLoad when switching scenes to it.
And there doe s not appear to be response objects for Raids. Wondering if that's just not supported yet? I know we can alert for raids, so you would think it would be in the API
http://jsfiddle.net/cuxg98n6/ - so this JSfiddle is for a better custom event list. If you take a look at how the onWidgetLoad js part happens, it just checks previous events. If you can make a loop(and I think you can, cuz yo
) you can pretty much for it to grab past couple of raids with ["name] and ["amount"]
As much as I can and understand how these things work my self 
Haha, well based on the docs and the limited amount of examples out there it would seem this stuff is all rather new, so I think we are all having to figure it out on our own for the most part, so the help is great ๐
This looks pretty close to what is going on in the Custom Events List credits widget example. The only difference is the credits example uses the count for session-specific data to limit the number of followers/tips/donations/etc to just those from the current session. The problem is that if session data is not stored by Stream Elements for Raids or Hosts (which it appears it is not being stored, or available from the API) I would just have to pick an arbitrary number of recent raids/hosts to show manually. And so far looking at data from my own stream, raid events have not appeared even when there were recent raids.
I know for a fact we track host events, there are recent/latest hosts widgets. as for raids, im not sure
Raids are more or less hosts...just covered as something else
but yea I'm looking at my label data and I see "Recent Hosts"
hosts appear to be working fine (just not available at a session level)
So I just looped through all data in obj.detail.recents and there are plenty of hosts, but 0 raids. And I was raided a couple times last night.
And many of these events date back quite a few days ago. How long a time period this data collection represents is not apparent though.
That makes sense, because the documentation for the results does not list raid data.
So hosts-recent appears to store 25 events, and hosts-latest is just the single latest host. Ideally there would be session-specific data for hosts like everything else, and raids just don't appear to exist. That said, it's awesome having access to this data as a developer ๐
Thats a nice info to know that recent events are up to 25.
Yeah, kind of thing that would be great to document, hehe ๐
Also looks like https://developers.streamelements.com/ is not finished
Yeah about that 
it should be the actual documentation and explanation for dev.streamelements, as far as I can see, but...its not
the developers one is going to replace the dev one, as it will have the most up to date information. Once someone gets around to actually finishing the docs
Documentation is always the last/hardest thing to get done ๐
I've been looking to see if there was a way to include "active chatters" names in the credits as well, but it's looking like that might not be possible at the moment. Don't see an endpoint for that.

I know chat stats have a way to be pulled, but the only way I could think of using those would be to track and record the differences. It is a good idea, just needs more programatical solutions built
yeah
possible that you could add that server-side, and have the event widget pull from that?
oh yeah, the irony is I could be doing all of this from inside my own overlay rather than from inside the stream elements overlay. But I wanted to try and use SE to its fullest. My overlay is built on top of a sockets IRC client so it's listening to chat for commands so it can change states, play videos, animated gifs, and all kinds of stuff specific to what I'm doing at the time. I could have it store all this stuff for the session, but I'd rather not go down that road right now! hehe
oh yeah, done that enough times! hehe
plus by developing around SE I can help push SE to become better. We need more people taking advantage of the API and all
exactly ๐ We love seeing the cool things people do with the API, plus it helps find things that are missing/bugged
And I love seeing those things too! I would not be making this end credits screen had someone not got that ball rolling. I love seeing what others are coming up with
For now I've given up on using session data like the current credits widget example, since session data is not available for hosts. And it looks like the way it was designed it could never show more than 25 results any way. So if you had 50 followers during the stream only 25 could ever be listed since that's what is stored in obj.detail.session.data But 25 should be enough hopefully. Wish raids were included, but it looks like those are not supported via the API yet.
@gaunt shard I use this endpoint to return all current hosters (but understandably it doesn't track amount of viewers). For the Geek & Sundry channel it returned 925 hosters just now, so not sure if it's limited, but probably not suitable for large channels anyway lol.
https://api.crunchprank.net/twitch/hosts/CHANNEL?implode
You can also use current hosting channels from here: https://decapi.me/twitch/hosts/channelName?limit=LIMIT&list
<@&382267076632379392> i wish there is a variable for lastest subscriber
in streamelements commands
I beleive you posted about that already in #๐ญ๏ธฑfeedback-and-ideas, yesterday
no i did not
Oh. Create a command !latestsub with response ${customapi https://decapi.me/twitch/latest_sub/YOUR_CHANNEL_NAME}
it was him, he deleted it 
@pulsar willow I've pasted a command above โคด
so I was wrong about the channel, but you still posted it yesterday
yes, helpers were offline so i deleted
lol, hint: Leave the message for when they come online so they can answer it right away
is this authenticate really safe?
@pulsar willow we work in different timezones, and some of specialized staff will get to questions of their profession when they wake up
Especially on this channel ๐
okay i get it ๐ how about safety ๐
It is good to leave a message and wait to be tagged. If it doesn't happen, just reask.
Safety of that command?
It is safe.
And to be more precise - there is no auth, no data is passed elsewhere (just information that somebody asked for channelName latest subscriber)

thank you guys
@mild cipher Thanks, I'll check that out!
hi again ๐ i wish there is chat subscriber notification for twitch prime subs on streamelements ๐ i know streamelements has sub chat notification but there is option for twitch prime ๐ฆ
@pulsar willow prime subscription variation does exist, this is also announced in the chat via chat alerts.
@pulsar willow alertbox > subscription (advanced) > variations > select the tier there, you can make a specific variation there. otherwise you get a basic sub alert for prime.
@pulsar willow chatalerts do not have settings for that, but the bot will announce the sub, does not matter if prime, 4,99 or 24,99 - all subalerts are combined there.
@pulsar willow also this is the developer channel, we can continue in helpdesk-twitch if you wish, wrong place for that ๐
@pulsar willow you can post the idea (check #๐ญ๏ธฑfeedback-and-ideas ) to add the variable "tier" to the chatalert, right now it has only user, amount and message, not the tier. If people like that idea, it could be implemented.
thanks
Hey guys, I'm trying to get a regex filter to work at the moment and having no success. Want to make sure my syntax is correct.
````\bg\s*n ` gi``` is what I have right now, and I'm just trying to auto filter phrases that start with "gn"
@viral patrol idk if you're savvy with regex but ^
also, @wheat sphinx
@ripe garden the beginning of the message or any word that begins with gn?
how to use this
any word that begins with
@dense flame wrong channel, please use #helpdesk-twitch
I was trying / \bg\s*n /gi but that wasn't working
So I tried looking up Google syntax and landed on what I posted above
But that wasn't working either.
Is it the spaces?
If you'd like to tackle this your self still and find REGEX interesting here is a cheat sheet I can recommend: https://www.rexegg.com/regex-quickstart.html
Well that makes things way simpler.
Is there a way to do the same but when it's in the middle of other characters?
*gn* but that's dangerous
*gn* - * stand for EVERYTHING before or after given phrase
don't believe so
Ah ok. That'll work for now. Thanks. If it gets fuzzy I can foodle with it. Appreciate the help.
I now have a cursory understanding of regex that I didn't before.
Hi guys, can someone have the link of the custom css api (alertbox) please ? ๐
Check pinned messages for the variables if thats what you are looking for.
If you want to customize the Alert widget it self, you won't need to poke in the JS too much if not at all.
Sean from the support sent me screenshot from one of SE Custom Code Gurus with inside some vars like {{name}} {{video}} etc so i was wondering where it is ๐
I was the one that provided the screenshot - the screenshot is taken from the pinned document in this channel.
Ok, i'm gonna dig more into it then, thanks i guess
But like I said, you don't need to adjust the JS or do anything with it to process events, as its already done via the widget it self. Just add the {{name}}/{{amount}} variables like so:
(sorry for laggy gif - was compiling something when I took it, which lagged my laptop)
ok thanks man
Gif is still compiling too Kappa
click on it and then "Open link" - should play in your browser
its big and long for discord preview to handle it
oh yeah i just saw it
i was wondering where is the code insideby default first because mine was full empty on all tabs but now i can start from your exemple ^^
When you don't have custom css enabled, the styling is controlled by the menu on the left side. If you enable Custom CSS, sometimes the images and sounds you've placed won't play until you force them via the html+css
yeah got it ^^
ok so non of these are working for my host alert
<div class="message" style="text-transform: uppercase;">
with {{count}} viewers
</div>
<div class="message" style="text-transform: uppercase;">
with {{amount}} viewers
</div>
Just Shows "With Viewers"
Should be {{amount}} but maybe emulating it doesnt show a number.
๐ฆ
pretty sure its in the pinned doc, also has been mentioned by other users in here before
To receive test events (i.e. sent from overlay editor or replayed from dashboard), you need to listen on event:test as well. The event types are the same, but have -latest appended to the end like in the widget documentation (note that it'll be follower-latest). The payload structures are also slightly different between test events and actual events, but you can console log and inspect these
seems like what you are seeing, but I am not 100% sure on that
Asking here, thanks for the tip. Looking for a possible solution to this: VarenDerpsAroundPC: Not really a "help" sort of question but I am looking for the ability to respond upon a user cheering bits with "user just cheered XX bits and has cheered XX total bits" I can't seem to get the total bits part to work. Cheers.
In that scenario you need to aggregate this data somewhere outside StreamElements as we have no such scope.
lx could ya help me fix my issue the {{amount}} shows find when testing but not in OBS
@viral patrol
Works for me like a charm - went to custom CSS then I pasted:
<div class="message" style="text-transform: uppercase;">
{{name}} is hosting me with {{amount}} viewers
</div>
.message{
color:#ffffff;
}
@median hatch it is probably possible to fetch a user's total bits in the channel using the Get Bits Leaderboard in the new twitch api, but the setup would be more complicated as you wouldn't be able to make the chat alerts module make that kind of request.
Potentially you could use the custom event list widget to receive the bits event, then make the total bits request, then use the streamelements bot say endpoint to post the message to chat? It's slightly roundabout but it might work.
@floral fable that's related to the socket API in particular, I think the streamelement widgets are already smart about receiving test events (at least from what I've seen) ๐
That makes complete sense, I probably should have scrolled up further and read more 
I had a go at the idea I had and it seems to work moderately well. When the widget loads it refreshes and sets an access token with the helix bits:read scope and also gets and sets the streamelements channel id for later. Then when a cheer happens it get the cheerer's twitch ID from their username and looks this up against the bits leaderboard, which returns their total bits cheered in the channel. Finally it pings the streamelements bot to say the message in chat.
It's all contained in a JS-only custom event widget, so potentially if the cheer message was turned off in the chat alerts module, this could be used instead. Only con is probably an extra second delay because of pinging around those different endpoints. If anyone wants to try it dm me! I didn't really want to dump random code in here.
^ i like this
Hello , is it possible to get css or html from muxy and add it on SE
or do i have to write the whole code again ?
โคด Sorted - needed to only edit the html tags 
Looking over the current API documentation for the points section, it looks I can use get/points/{channel}/{user} to find out how many points a user has and I can use delete/points/{channel}/{user} to completely reset a users points. Is there as way to remove a set amount of points? say I wanted to remove 50 points from a user would it be delete50/points/{channel}/{user}?
add a negative amount of points
I didn't even think of the adding a negative amount of points like @cinder lintel suggested. so it would be put/points/{channel}/{user}/-50?

@ruby atlas if you use GET you will get points, if you use PUT method to /points/{channelId}/{userId}/-50 - this scope adds or removes points. There is no endpoint to set exact value. Instead of that you can use DELETE (to reset) then PUT (to set value)
PUT POST GET DELETE are not an element of path, those are HTTP methods used to perform selected action.
Is anyone using mIRC to lookup users streamelements points and add/remove points from users? If so, what does your code/script look like?
thanks @viral patrol for the info
It's been good 10 years I wrote last part of mIRC script
does anyone have and is willing to share some simple code to customize the goals?
@young saffron i may have something but i'm still working on it
@indigo flume cool, Iโd appreciate it.
Question about the new Update, that the Cheer Emotes are shown in the UserMessage Alert. They doesn't show, if i am using custom CSS. How can i enable this with my custom CSS alerts? 
Can anyone help me with the css text position ? .. I just can't get it right ๐ฆ
@cobalt fable you need to fetch the cheermotes that are available on your channel from twitch. Then you need to parse the incoming message and check every word against the map, if it is there, just replace it with an image tag. Beware of possible XSS loopholes tho
Twitch api for cheermotes: https://api.twitch.tv/kraken/bits/actions?api_version=5&channel_id=[TWITCH_ID]
You should have something like this
const split = message.split(' ').map(word => {
const cheermote = cheerHash[word];
if (cheermote) {
const cheerAmount = CheermoteRegex.exec(cheermote.name)[2];
return `<img class="alertbox-message-emote" alt="${cheermote.name}" src="${cheermote.urls['2']}"/>`;
}
return word;
});
so i just put the code example into my JS Part of CustomCSS? @wheat kelp
It won't just work if you paste it. You need to fetch the available cheermotes for your channel and then convert that into a data structure.
It's just a snippet to point you in the right direction ๐
@wheat kelp Can you tell me (can be in a private message too) how to do this? i could send you my Custom CSS Code if you need it
it would be so nice, if you could do this 
I need help for that too. I bought an alert and it said I could c&p the HTML,CSS and JS from SL to SE but whenever I enable custom CSS, the shark alert goes up. And I even updated the video..
Can you check the HTML part if it contains {video}/{name} type tags in them? If yes, just add another pair of {} around them.
also hi Spooderwamen 
eyy Keizar 
oh ok Ill try thanks!!
I have here this <source src="{image}" type="video/webm">
is it for subs and follows and such alerts, btw?
ok, so JS should be fairly empty unless it contains variables and such
JS has the most text 
anything that has {} around it yea?
if you have this: <source src="{image}" type="video/webm"> change it to this:
<source src="{{video}}" type="video/webm">
oh ok ! ill try
image in a video html tag 
omg this is a pain in the a**. @indigo flume could we dm? :3
@cinder flicker you can also DM me 
excuse me
My chat bot Will respond to the keywords that its said
pls help me
@pulsar willow how did you set up your command?
Is the bot in chat?
Is the bot mod? Or is he Timed-Out/Banned?
@indigo flume So I tried it but now everything vanished because it doesnt take the video for a reason
only Fill in keywords
bot discover keywords
it will Reply immediately
but Respond have keywords
Why can't I stream.....
@night coral Thats a bit rude. They were both helped already.
k
can anyone assist me how to build the same design of the Even List from SLOBS into the one from Stream Elements. The SLOBS Event List theme is called Slick !
Anyone ??
I would do it, but not now as its 1:40AM and most likely not tomorrow or the next few days.
Any CSS artists any good with Custom EVENTS list ?
I'm after customizing my names to something like this ?
http://chrisis.live/s/1537777623_8.png
The * will be a bullet point but my font in PS doesn't let me use the symbol ๐
I dont know how to customise JS with CSS >.< I can use basic old code iv got but no idea what im doing so id end up breaking it and then asking 1000 questions lol
@indigo flume when eva you get time , i really would like to have the same look and get out of everything in my overlay from streamlabs and have them all from SE
Don't expect me to do it anytime soon really. I do this in my free time.
I'm wondering if someone might be able to help. I'm trying to set a command that allows users to see the currently playing song in chat. i DO NOT use song request. I'm using a custom command !song or !nowplaying...with a response of $(lastfm username). i have lastfm linked to my Spotify. This command works with nightbot however i cant seem to get it to work with SE. I'm assuming the variable is wrong. anyone have a suggestion? thanks
@young saffron Hi there, did you see the last comment under #command-share ? That works for me.
Hey guys, do you have a Wordpress integration?
A wordpress plug-in that allows you to implement some of your features onto a website
Yep
Our features? No, unfortunately and I don't think this is planned.
Ok, do you see any issues doing so using your API? Some of the websites I build for twitch streamers would really like to use you guys
I can't really say that. If you have the API in front of you and can extract stuff from it, then go ahead and do is.
But do note, that some API calls may want a JWT token, which may pose a security risk
and afaik, wordpress ain't that safe really 
Ya, you have to add a layer on top of Wordpress. Vanilla isnโt the best
Who should I talk to about if WP is on the roadmap? Omer?
Really, I'm not sure, I can poke internally, but I don't think Wordpress is in the roadmap at all, as this is the first time I've seen someone ask about it
Thanks dude, Iโd appreciate it
@karmic parrot Heyo
we don't have WP on our roadmap, but I'd love to see something you created that is relevant so I can better understand how it would look
Also to point out, if you haven't seen it already @karmic parrot the API docs are in the channel description 
@finite heath I havenโt built it yet, basic gist is that if I am going to create it (since you donโt have it or plan to) it would make sense for me to build it for reuse
just to see if we're on the same page, you're thinking about a page on a website that has extra data that we have as widgets, for example "top tipper of the week" etc. ?
Yep
cool, cool
New to chatbot code writing so looking for a little help. Anyone have an example of script/code to use with mIRC to look up a users total StreamElements point value for my channel? I would also like to write a script/code that would remove a set amount of points too. Any help would greatly be appreciated.
@ruby atlas those are already built into our API, you just need to call the functions (as long as you have the username). The API docs are listed in the header to this channel
@cinder lintel thanks, I have been looking it over and trying to figure out how I can use it in mIRC but think I am missing something. Thats why I was asking for an example. I am very new to chatbot scripting.
Is there a sepcific reason you are using mIRC?
@cinder lintel probably a bigger project than I can handle but I'm going to wright a bot to run a special kind of raffle/giveaway and the one built into streamelements chatbot isn't going to do what I'm looking for.
Mind if I ask more questions? When I do projects like this, I like to break it out into the different parts and pieces, and work on one at a time. Basically, what is the goal of this giveaway module? If you want, my DMs are open. I like breaking apart problems into easier to handle parts
Sorry, so new that I don't know what DMs are. I've got to run but will be back on tomorrow to ask/answer more questions.
xD no problem
https://realtime.streamelements.com I can't seem to connect to it for the life of me. Always getting xhr poll error
I'm setting the method and token from when the connect event is triggered, but still nothing. I tried SSL handling too.
@night coral Have you tried using the exact snippet Styler posted?
I'm not using JavaScript but i'm still using the socket.io library and one of their ported languages.
I already understand his snippet. I have a structure that already handles emitters fine. I just can't connect to it.
Which language? 
Java/Kotlin
Pretty sure it's the SSL (HTTPS) that is fucking it up.
Edit: I think I solved it. I just read the transports and changed it to the "websocket" transporter.
"Welcome XD" That's the response message lol
@mild cipher I can't even test the "event" emitter. The replay action on activities (web interface) doesn't get called in this socket. (You know to replay an activity)
@night coral Listen on event:test for test events and events replayed from the dashboard
Is there a public list of socket.io events?
And why are they formatted differently. Now I have to make a system for each type rather then them all having their own event aswell.
The event types for tests events are the same as for the widgets, so those are in the widget documentation in the pinned posts. The real events have the same name, but without -latest (also it's follow instead of follower / follower-latest)
As for the different structures, idk lol.
This is a host
{
"createdAt":"2018-09-26T22:16:23.747Z",
"data":{
"amount":0,
"avatar":"https://static-cdn.jtvnw.net/jtv_user_pictures/b7436820-af5d-44cf-a3b2-088407dec892-profile_image-300x300.png",
"username":"CitricBot"
},
"provider":"twitch",
"channel":"59a8a4ab4123360b55996d7e",
"_id":"5bac053750af700ded3eadd3",
"type":"host"
}
Where as follows are
{
"listener":"follower-latest",
"event":{
"name":"citricbot",
"avatar":"https://static-cdn.jtvnw.net/jtv_user_pictures/b7436820-af5d-44cf-a3b2-088407dec892-profile_image-300x300.png"
}
}
That's stupid, but I guess it's not a problem for the language i'm using.
Thanks for the help with the event names.
Np! 
@night coral My redemptions seem to work fine for both real and test alerts but I appear to be missing some data that yours has? 
test redemption:
Also the socket api is technically still wip I believe, which is why there are no public docs for it yet, I'm sure it'll be updated and improved over time
Mine looks like a more updated one, so i'm sticking with that. I don't know how it can be different.
Also here is my API i'm building by the way https://github.com/TheLimeGlass/StreamElements-Java-API
hi guys - I want to send an alert to my broadcast when a form is filled in on a website, can it be done with the SE API?
I can build the info in PHP, and add the info into an API SEND, but I tried this with SL (who ive completely dropped now) and it failed every time ๐ฆ
We need to subscribe to the said alert you want send, afaik, and you can't forcefully send us one, without us actually processing the event message you send
I'll ask internally just in case
@indigo flume basically I want to do something like a donation alert, with custom text and animation
but how to get the info from the website to the alert on completion of a request form
so you want to get an alert from twitch about a sub/follow, process it your self and then send us what you've processed?
noooooo, I have a request form on my own website, for a track, from vinyl and I want it to appear on screen when I'm broadcasting (part of my stream is vinyl record playing as background music)
the appearance I want to the like a donation alert, with customised text
Aah..well I think you can build your widget/script/w-e you have there and then load it some JS with our custom widget.
how exactly I'm not sure 
customizing the text and alert type, is part of the html/css
so can I send the information to SE via the API, and then use HTML/CSS to display it?
or would the html need to read the database every say 30 seconds, and if found, display something
this is the API - not sure you can send anything custom built type ones besides the one open so far
i may also be talking out of my ass, but judging from what you want to do, you will have to make the JS in the custom widget call your website to pull data from it.
and have it check your form every lets say 15-20-30 seconds for a new event or something
and then trigger JS code to pop up an alert animation you've built with html+css
and display said message
seems more simpler then trying to send stuff towards our API 
that in itself isn't difficult in PHP, I can do that and make it set a field in the table as displayed
as long as PHP is supported in the HTML tab
Other thing is, you don't get direct access to the back-end database of the overlay, besides the variables documented in the pinned messages and open API locations
I'm not sure really if the overlay supports PHP...test it out with the "Custom Widget" designed open to implement custom widgets and stuff people want coded
might not be able to do it then, thats a shame, it would be great to have it, so people can see that the request has been delivered
If it does, just poke me real quick as I want to know this info for a project I have in my hands 
will do
trying noew
sorta kinda works I think
looks like you need to do the db stuff in JS though
which is not something I know how to do, simple echo's seem to be ok
if you can echo from PHP and have the JS pick it up, then you can build it with variables to what you want i guess
i don't know PHP my self, but have been fiddling with JS for some time now and still learning it my self 
unless the screen is missing something when its displaying ......
which I think is possible
I have the PHP script already, and it works, I just need to find a way to get it onto the broadcast screen
well I guess I'll leave it for now and try and work out another way of doing ti
maybe get OBS to refresh a webpage every 30 seconds and create my own thing might be the easiest option
So that I'm clear, you have a form on your website, that when you fill with info and submit, posts to your php script, that you then want to relay to your streamelements overlay? @brazen heath
@mild cipher pretty much
there are only certain parts of the form that are to be relayed, but the PHP deals with that
@indigo flume look promising .... I just need to find an unused alert type ... probably the store item, as it will cost loyalty points to redeem a request
I may be thinking and talking way over my head and ass, but if you send us the form as an event, you can have your widget look for that specific event type using this check:
sounds possible ....
I think maybe something like phpsocket.io would work. You can emit a 'test' event of the tip type that would trigger a tip alert with your form's data. (You can't emit any 'real' events because obviously these are dealt with on SE's side and have proper IDs). These would be spoofed alerts, but would still show up on the overlay.
What I meant is, he can disguise his form as a redemption(store item) as a help
to find a solution 
@mild cipher www.phpsocket.io can not be found
It's a library, not a site ๐ https://github.com/walkor/phpsocket.io
A server side alternative implementation of socket.io in PHP based on workerman. - walkor/phpsocket.io
If you don't have a server it's probably safer to do it within that PHP script itself, just because as KeiZar said, you need the JWT token to emit events, and definitely not a good idea to expose that in any client-side type thing, like a public form. So as long as you're emitting the event from something server-side you should be okay.
I have full access to my webserver
@mild cipher DM, so I can show you what it is in detail?
May have to head out in a moment but sure
@brazen heath you can make an AJAX call to your PHP script and display whatever it returns, for example I did something like that to display song playing on spotify:
window.setInterval(function(){
var url = 'https://URL/spotify.php';
fetch(url)
.then(function(response) {
response.text().then(function(text) {
document.getElementById('spotify-song').textContent = text;
});
});
}, 5000);
remember to set the headers in PHP, so they can be accessed with AJAX calls:
<?php
header("Access-Control-Allow-Origin: *");
- this should be on beginning of file, so no other headers are sent before
Could use a little help. I am using Custom CSS for Alert Box, using the Alert widget example for adding video:
<video id="video" playsinline autoplay muted style="width:100%; height:100%"><source id="webm" src="{{video}}" type="video/webm"></video>
However if I remove the 'muted' attribute, it doesn't show the video anymore. I want it to play the video without being muted. Ideas?
I think that's due to the recent autoplay policies which don't allow unmuted videos to be autoplayed 
@wispy wigeon this policy doesn't affect OBS as far as I know, so you should be able to see it on stream
@viral patrol You are correct. When testing the alert in stream elements overlay editor, I have to keep the muted attribute so I can see the video in the editor. After testing in overlay editor, I remove the muted attribute, save, and then load it in OBS and the video does display and play correctly.
Im looking for a code for my foon
@mellow pewter The app is currently in closed beta, and is expected to be available to the public by mid October.
If you'd like to assist with beta testing, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
Question about custom css for alert box. Is there a way to get profile picture of the raider/host ?
Or maybe there is a way to get user id so i could just do twitch api request since it does not require an authentication?
Definitely possibly, I just don't have the coding knowledge to do it
There are some folks in here who occasionally have some free time and might be able to help
@devout moss You don't need a bearer token (the authentication you mentioned) but you do need a client ID. You can register a twitch app to get that, then pass it in the header of an ajax call to the Helix Get Users endpoint, passing in the user's username (make sure to specify ?login= to use username instead of ID). The returned data will have the user's profile picture url in it.
@devout moss you can also make a call to decapi.me to get user avatar. https://docs.decapi.me/twitch?endpoint=avatar%2F%3Auser
But remember. Streamer takes full responsibility for what is shown on stream, so user with violating avatar can put you into trouble
@mild cipher Yes, that's what I thought I would do.
@viral patrol I somehow missed it, was trying to find it under /twitch/user... Thank you!
I just tried to do a request with Jquery Ajax (that's what i supposed to do, right?) but I thought JQuery was included in SE, isn't it? ($ is not defined)
It is not included by default. You should do it via script tag from external CDN
Hey has anything changed with tip when using websockets lately?
I need a command that has the amount of subs I have and not have to update manually
@deep raptor the code you would need for the custom command is this:
$(customapi.https://decapi.me/twitch/subcount/$(channel))
you have to authorize the command the first time you use it, then it works.
Thank you
@midnight orbit We have a variable for that 
i didnt find it 
ok, you screenshotted even. wow. i need more coffee and more braincells. mea culpa @indigo flume

Hi everyone. Is there a way to place an embed code into the CSS Editor in the Custom Widget block to have an item display in realtime on an overlay?
Hi all - was wondering where I can register an OAuth Client for SE?
Is this about the rename of the bot?
@indigo flume Was that RE: my message?
yes
Nah - it's about the StreamElements API, I'm assuming I need to use OAuth to get access tokens for users - there's nowhere on the old or new docs that gives a link for my to register/request an OAuth Client
I'm not sure you actually need oAuth token for that. Afaik channelid and/or channel name is enough
Docs show endpoints are protected by JWT tokens https://dev.streamelements.com/#streams__channel__get
For example this one wants just channel iD: https://dev.streamelements.com/#points__channel__put
Thats for the headers afaik where you need to provide the JWT token, but thats a security risk to have the JWT token hosted publicly somewhere.
Unless you have your own server and have it protected
My point being, how do I fetch a JWT? The doc does otherwise state "OAuth" so I can only assume there's an OAuth flow I can hook in to
As far as I know, oauth is planned, but not implemented yet. you would need people to provide the JWT token
Thanks @cinder lintel - that's a shame, how do users go about fetching their JWTs? Is that the "Personal Access Token" on-site?
@alpine gale You can find your JWT token on your account channels page: https://streamelements.com/dashboard/account/channels
(Don't forget to click on "Show Secrets")
Thats how
Brilliant, thanks both
Hello , for the custom sub alert , I want to make a variation for the resub .. can I just leave the text container for the resub too but adding a new class for the amount of months ?
If you want to have a custom resub variation, you will have to do some JS coding to check the amount of moths so that in the end it will trigger the proper text
you mean this ?
let amount = '{{amount}}';
amountToCheck();
function amountToCheck(){
if (amount > 1){
document.getElementById('amountHolder').style.display = `inline`;
}else{
document.getElementById('amountHolder').style.display = 'none';
}};```
<div class="sign-text">
<p>
{{name}} <br>
has just subscribed<br>
<p id="amountHolder">for {{amount}} months</p>
</p>
</div>```
the thing is .. it's showing me the amount of resubb
i just want to move the gif
where i want to
Check the HTML I provided and the JS as well
So in this code's case, if the amounts of resubs is above 1 month, it will show the amount of subs via the text, else it will show something else like "Welcome to the sub club"
If you want to do something else fancy, then thats up to you to figure out position and what not ๐
I'm giving you the basis of the JS code needed to check the amount of months and how to attach it to the {{amount}} or the HTML
the problem is i don't know where to add the position of that giff
in the CSS
Is the video part of the main <div>?
I think yes .. but i'm not sure
if class .image-container has some CSS attached to it, most likely your video is inheriting it.
it has this
hello
Ok, so try changing the top, left and bottom from percentage base to actual pixel points and see what happens
help me
What is the issue?
I can't help if I don't know what the issue is.
Take it up in #helpdesk-twitch please ๐
i use youtube
Ok, then #helpdesk-youtube
This is about coding, not general problems.
ok
like this ? or should i delete width and height ?
I only said top bottom and left, not width and height
by default video files are 100%
in those aspects
I see
100% for an image and video means, their OWN sizes
or at least thats how I've seen it
now it's not showing the image at all
wait wait wait, are you adding those in the .image-container? Don't do that
adjust the ones i said for the video class it self
๐
I'll leave you with this, as I need to go to bed - 2:20AM
just google "css position" if this doesn't help or "css margin"
got it , thank you ^^ and have a good night
Hello! I have a help question for the Widget share Coding process for changing fonts, rearranging order.
for the event rotator
im trying to figure out where in the code i need to change a font, and would also like to know if its possible to change the wording at all?
I saw it
Am on mobile
Camt really explain on mobile
Will be able to in ~30 mins
@languid escarp
Here is a crash course for the font and if you want to play with something
to change wording on "latest" just change it in the <p> tag
if you want to change wording on something else, its most likely in the JS code.
I have to go again.
awesome! Whenever you get back @indigo flume is there a way to make the text stay center in in one spot (say over an overlay) so that it stays even and also is it possible to change the wording a bit? Im trying it my self and am kinda just jacking it all up cuz idk how coding works haha. I got the other part down though! ๐
@languid escarp https://www.w3schools.com/cssref/pr_text_text-align.asp - for centering text
For wording, like I said its in the JS code on 2 locations
Ooh wait its in 1 location
actually 2, sorry
Sweet thanks! is there a way to change the text color or add outline to words via code? or should i just make a secondary layer and try to match it? and also can i change the color of half the text? Like for say if i wanted Follow to be purple w/ white background BUT the person who actually followed to be white text with black outline?
sorry if im being confusing because i have it basically where i want it but am working out some tweaks and want to make sure im not overcomlicating my process haha
h1 {
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: black;
}```
add the 2 lines in your p span {} in the css tab
for the outline
and you want to have follow to be different then the actual name?
thats a bit tricky to tell you how..I think
I will most likely have to try it out my self
so basically.
I want to try and have the follow, sub, dono, bitts, the actualy names of who did those things to have a differnt color. and im currently trying to figure out how to remove parenthesis around bitts and donations and for subs remove parenthesis and just add an X after the months subbed.
if that makes sense lol
I fully understand everything.
It just harder to help you do it, then to make it my self for example.
Yes, it is possible, it requires seperating them out into different sections in the HTML and labeling them, then changing the CSS to edit those parts. Keizer will show you the details
If only it was that simple @cinder lintel 
Unfortunately, for this widget it ain't like that 
if its too difficult to explain you can take your time haha im not streaming today so ican figure it all out lmao. im also available for screen share if thats an option
screenshare ain't an option for coding session ๐
haha, if it was just basic text, it would be that simple. But magic makes it more complex xD
oh for sure haha
i know nothing about coding either so its cool to learn some of this stuff as an entry to it lmao
thanks for the help haha
actually
for the font size.
Where in the css should i put that in? ive tried a few different spots but nothing seems to work. Same with Center margining
font-size: 15px; this the line you need and also place it in side the p span {} bracket as well
I installed the application but I do not have an invitation please someone can help me
@pulsar willow Please don't spam all the channels like that. Ask in 1 place and you will be answered! Check #helpdesk-twitch for your answer/info.
Question for whoever it may concern, does the current "Filtered Words" input under Tip Settings > Tip Moderation support regular expressions, I'm assisting someone that would benefit much more from a regex similar to (?i)off([^\A-Za-z]*|)stream than a bunch of words in the input box
Currently no but this is planned @heady coral
the idea is to expand the bot banned words filters to activity filtering
We introduce new event, you can listen to. It is called onSessionUpdate. It is triggered every time session data is updated, and provides full info about it (the same info you get with onWidgetLoad).
hey question about the custom widget thing.
does the onEventRecieved event also pass the subscription tier (<obj>.detail.event.tier) if the event is a subscription?
can't find it in the documentation under this specific event, but I can find it under onWidgetLoad weirdly
ohh got it thanks
Hello , what should i use in the html code for the sub gift ?
will it be the same code as in the subscriber ones ? ๐ค
{{sender}} for the gifter
yes
any idea why my gif is not appearing but only the text ?
Do you have your gif attached like:
<img src="{image}"/>?
u mean this ?
yes. Make that into {{image}}
I forgot about it as well.
By the way .. is it possible to make a specific viewer alert ?
like when that person resubs it will be a unique alert
sorta yes. With JS
is it a complicate one ?
On event receive{
Check obs.data.name if == <name of user>
if yes
show his alert
hide default style
if no - don't do anything
}
more or less 
so if i add the name of the user and i add this at the subscribe alert JS, would work ๐ค ?
this is just pseudo code to show you how it should look. Actual code is a lot longer
pseudo code is used to just to show code concept/idea/pattern, that can be implemented by any language
oh I see but that has never been made till now right?
let amount = '{{amount}}';
amountToCheck();
function amountToCheck(){
if (amount > 1){
document.getElementById('amountHolder').style.display = `inline`;
}else{
document.getElementById('amountHolder').style.display = 'none';
}};```
this is my code to check resub months
and I was told I can skip using this, but in your case, you can use it.







@indigo flume