#dev-chat

1 messages ยท Page 22 of 1

muted dagger
#

We just reverted everthing and fixed on JS :D

dense brook
#

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.

floral fable
#

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
}
dense brook
#

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;
}```
floral fable
#

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

dense brook
#

Doing that right now, but it removes the background all together.

#

Is it possible to add a background to ONLY the last child?

floral fable
#

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

dense brook
#

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: ;
-.-

indigo flume
#

@dense brook How many items does it have?

dense brook
#

?

indigo flume
#

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

dense brook
#

are you reffering to the things displayed at any given time?

indigo flume
#

sure lets go with that LOLface

dense brook
#

just 5

indigo flume
#

so try adding the last thing to the css

#

ooh wait i missed something in what you talked with Kite

#

let me re-read

dense brook
#

I already added the transparency and the background to the last child.

indigo flume
#

right sorry, you already solved the issue

#

I'm an idiot, sorry HeadBang

dense brook
#

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.

indigo flume
#
.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.

dense brook
#

Got it to work, nice.

indigo flume
#

as for aligning - use margin and padding

dense brook
#

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.

indigo flume
dense brook
#

So I'm trying to figure out if I want to keep them or not.

indigo flume
#

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 LOLface

dense brook
#

For some reason I can't get the Oswald font to work.

#

aaaand nvm, I forgot I had to load in the HTML

dense brook
#

to comment something out in JS I should use /* and */ right

indigo flume
#

use //

#

the /* */ is for html i think and css is something else or again the /* */ way

dense brook
#

how do I close the //

indigo flume
#

you don't

dense brook
#

or does it just comment the line.

indigo flume
#

it comments the entire line

dense brook
#

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

indigo flume
#

well we get paid for knowledge and speed thonkingintensifies

dense brook
#

I do hope that coding inside of SE becomes easier.

cinder lintel
#

ideally, you code outside of SE, and just copy/pasta into the environment

floral fable
#

I have been hooked on Visual Studio Code lately KITEpoggering

dense brook
#

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!

red hull
#

@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)
indigo flume
#

I'm a software dev, not a web dev @red hull ๐Ÿ˜‰

#

So I know the guidelines for what ever language i use at work ๐Ÿ˜‰

red hull
#

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.

floral veldt
#

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

honest bone
#

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.

floral veldt
#

@honest bone thank you I'll look into seeing that will work

dense brook
#

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 /*

dusky mesa
low sierra
#

No, the built in variable uses only 24 hour at this time

dusky mesa
#

Ok thanks

manic ivy
#

<@&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

indigo flume
#

@manic ivy are you talking about custom css or normal alert?

green yarrow
#

@manic ivy I would assume you just switch the variables around KiwiConfused

manic ivy
#

@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

indigo flume
#

Well I'll take a look if I can do something similar

manic ivy
#

awesome !

#

btw your profile pic just made me lmao

indigo flume
manic ivy
snow summit
#

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.

indigo flume
#

@snow summit What do you mean reversing?

lunar flare
#

How do we get to be apart of the beta for Ace Live Streaming?

floral fable
#

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

snow summit
#

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

vocal verge
#

Hall guys

I need help alerts with Custom CSS

How can you display the name? {name}

honest bone
#

{{name}}

vocal verge
#

@honest bone haha so Easy thank you so much ^^

scenic jay
#

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.

mild cipher
#

@scenic jay Socket would be a good option, you can get the redemption as soon as it comes in

scenic jay
#

Thanks @mild cipher , didn't think of that c:

mortal wagon
#

@manic ivy Nice DANSGAME Events list POGGERS

#

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.

scenic jay
#

Is there any way to run commands as the bot? Sorry if this has been asked before.

cinder lintel
#

@scenic jay yes, the API documents are in the channel header

scenic jay
#

That provides ways to get, update, and delete custom commands but not the ability to run any commands?

cinder lintel
#

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
#

Sorry for the slow response. It doesn't allow me to run any commands, just chat as the bot @cinder lintel

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

scenic jay
#

My bad I was having a bit of a special moment when I tried that. Miss typed /timeout -_- thanks for you help

cinder lintel
paper dock
#

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.

pulsar willow
#

Northern Ireland based streamer trying to access the app if anyone has a invite code they would kindly have

zenith folioBOT
#

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

maiden island
#

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?

lirik's video clip

indigo flume
#

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

mild cipher
paper dock
#

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.

indigo flume
#

@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 ๐Ÿ˜‰

paper dock
#

thank you so much @indigo flume

paper dock
#

@indigo flume Tag me when its done or if you have any questions. Really excited to see this!

indigo flume
#

@paper docki already DMed you last night

viral patrol
#

Updated version:

nova parcel
#

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

viral patrol
#

I think that JWT token is not present in headers or it is not in proper way

indigo flume
nova parcel
#

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?

indigo flume
#

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

viral patrol
#

@indigo flume nooo

indigo flume
#

Its not?

viral patrol
#

It has to be JWT Token there if you add points ๐Ÿ˜‰

indigo flume
nova parcel
#

i havnt changed my code and this code worked for a while

viral patrol
#

@nova parcel one sec

nova parcel
#

i dont know why it stopped working

#

np @viral patrol

viral patrol
#
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

nova parcel
#

i have Bearer as part of my jwt_token variable

viral patrol
#

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)

nova parcel
#

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?

viral patrol
#

It is definitely that

nova parcel
#

i also tried to do it with the persons jwt token tho

#

still same error

#

and this previously worked for me

viral patrol
#

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

nova parcel
#

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?

indigo flume
#

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)

nova parcel
#

so then i dont understand why i would be getting this error

#

but it works when adding to my own channel id

viral patrol
#

What is this streamer name?

nova parcel
#

JakeOCE

viral patrol
#

5adad67f9ea27950aa035612

nova parcel
#

yep thats what i got

viral patrol
#

Check if this is channeld you are using

nova parcel
#

it is

viral patrol
#

OK, so now try to check other endpoint

nova parcel
#

which one?

viral patrol
#

I think /channels/channelId

#

method GET

nova parcel
#

alright

viral patrol
#

It does not require token

nova parcel
#

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

viral patrol
#

Yup.

#

I am so confused.

nova parcel
#

me too

viral patrol
#

Especially that it is working with your credentials on your channel

nova parcel
#

yeah

#

even with his jwt token i can still add to my acc but not his

viral patrol
#

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

magic sandal
nova parcel
#

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

viral patrol
#

No problem. You made me smile now ๐Ÿ˜‰

nova parcel
#

the first few characters of our tokens are the exact same

#

welp ill see myself out

viral patrol
#

@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

nova parcel
#

oh interesting

#

but nah my bot is a betting bot

#

for fortnite

#

like whether the streamer will win or lose their game

viral patrol
#

This one is built in

nova parcel
#

mine is easier

#

also once i get around to it imma build in an odds system

#

based off his winrate for the day

gilded nova
#

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.

indigo flume
#

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

viral patrol
#

@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

gilded nova
#

Thank you so much!

vivid fox
fierce frigate
#

reason why customapi would be returning the entire contents of a .php file instead of the echo'd content?

indigo flume
#

@fierce frigate most likely the php is not setup properly or the way you are giving it a variable is wrong

fierce frigate
#

...i mean. literally running CURL on url... then echo $data; lol.

indigo flume
#

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 PepeShrug

fierce frigate
#

k... how long does it wait? and how many char string will it take?

indigo flume
#

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 PepeShrug

fierce frigate
#

kk. i'll look into docs for that.

indigo flume
#

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}

fierce frigate
#

i think i may have found the culprit w/ the bad php rendering.

#

lol.. kk thx @indigo flume

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

fierce frigate
#

it's not. i'm too tired. ๐Ÿ˜ƒ i was wondering wtf lol. just me. need sleep. TY.

indigo flume
#

Its always good to have a rubber duck for debugging LOLface

#

either be a person via some pixels or actual rubber duck

fierce frigate
#

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

zenith folioBOT
indigo flume
#

oooh side scroll - i guess your on a resolution lower then 1080p

fierce frigate
#

13" macbookpro

#

i have a cinema display when at home but not always on it.

viral patrol
#

@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:

  1. short_open_tag is disabled and your script is starting with <? instead of <?php
  2. there is no PHP parser installed
  3. there is no mod_php (or fastcgi) installed
  4. your file has no .php extension
sturdy steeple
#

Hello, can anyone give me an example, how to use the api to send Chat notifyยดs for Follow,sub,host and donation? ๐Ÿ˜ฎ

indigo flume
sturdy steeple
#

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

indigo flume
#

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.

sturdy steeple
#

event listener <-- thats a good hint

#

im now into python, but i cant handle xD its like "read python api -> brain -> response: sdsdfasdfsdf" ๐Ÿ˜„

indigo flume
harsh pawn
mild cipher
#

@harsh pawn Oauth2 implementation is a work in progress I believe. No ETA on it

harsh pawn
#

Thanks @mild cipher

fair marsh
#

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?

cinder lintel
#

@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

fair marsh
#

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

soft badger
#

Hi

mild cipher
#

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!

fair marsh
#

i will try to use this on a sever thanks for the info

pine pendant
#

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! ๐Ÿ˜ƒ

mild cipher
#

@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.
pine pendant
#

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! ๐Ÿ˜ƒ

pine yew
#

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?
mild cipher
#

@pine yew the calculation should be happening inside the function like this:

countdown(subSeconds * data["tier"]);
  • keep in mind tier is usually 1000 for tier 1, 2000 for tier 2, and 3000 for 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));
    }
pine yew
#

@mild cipher Oh god im stupid lol. I didnt see the brackets OMEGALUL

#

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

mild cipher
#

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!

mild cipher
#

@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 Thinktastic

pine yew
#

@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? leclumH seems a bit weird to me and unintuitive

mild cipher
#

@pine yew I'm not really sure either spinning_think 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?

weary dagger
mild cipher
#

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?

indigo flume
#

This is documented by LX in the pinned messages doc file we gathered.

#

Hope it helps

mild cipher
#

Oh, cool thanks @indigo flume SeemsGood I'm blind

#

Oh wait LUL I have the outdated version, that's why I couldn't see it NotLikeThis

viral patrol
#

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

cobalt fable
#

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?

twin ore
#

The default eventlist or custom?

cobalt fable
#

@twin ore would be interesting for both, but more like the Custom because i want to style my own eventlist

twin ore
#

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 SEheart

indigo flume
#

And here I went on a different path NotLikeThis

#

i need to up my googling skills dropthink

cobalt fable
#

@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?

indigo flume
#

Change those 2 from 0 to 5

#

Or actually you may not have this code NotLikeThis

twin ore
#

Yeah, that's lx's edited version isn't it?

indigo flume
#

Just make sure to change the append to prepend and then edit those marked lines I showed

twin ore
#

Yeah, the variables on top are super helpful for quick edits.

indigo flume
#

The code I gave is an upgraded/redone version from LX and it handles events better

cobalt fable
#

@twin ore @indigo flume Thanks a lot!

twin ore
indigo flume
twin ore
#

lx is the legit hero, we're just spreading his coding gospel.

dense brook
#

There is an update on the event manager? I took the custom one and just commented it out

dense brook
#

seems the same to me

dense brook
#

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!

fair marsh
#

is there a way to set up a paid command to increase every time a user uses it

indigo flume
#

@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

cobalt fable
#

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.

mild cipher
#

@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)

cobalt fable
#

Tried it, won't work too :/

mild cipher
#

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.

indigo flume
#

If you are doing custom css for the alert widget, you don't need JS for it.

#

You only need html and css

cobalt fable
#

@mild cipher True that.

mild cipher
#

A hidden element returns 0, but if it shows by default then probably will always be greater than 0.

cobalt fable
#

@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

indigo flume
#

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

cobalt fable
#

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

mild cipher
#

Ooooohh, I completely misread OMEGALUL 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.

indigo flume
#

Because I have this type of custom css for my alert widget I understood what he meant @mild cipher smart

#

But I guess you were on the write track, but JS is needed for the check I guess

cobalt fable
#

Okay so now everybody knows my problem ๐Ÿ˜„ any solutions?

indigo flume
#

Let me see if I can smack something together

fallow trout
#

Thank for the QUICK HOTFIX, on the Goal widgets design.

#

in codesn mode

indigo flume
#
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

cobalt fable
#

@indigo flume

<div id="alert-message">
    {{message}}
</div>

And for the Sub Alert? (i think the "tip-latest" is for donations only)

indigo flume
#

i assume in the CSS you have the sorts of this:

#alert-message{
border stuff here
}
cobalt fable
#

Yes

indigo flume
#

ok, so we on good track then cohhHmm

#

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 NotLikeThis

mild cipher
#

Just to double check, this is in the alert box widget right?

indigo flume
#

I hope so

cobalt fable
#

@indigo flume Same Problem elanumSad
@mild cipher Yes

indigo flume
mild cipher
#

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';
}
cobalt fable
#

@mild cipher now: no message is shown monka

mild cipher
#

Oh LUL adjust the if statement. maybe ```if (message != "")```` ?

#

It's hard to test since all the test alerts come with a message FeelsBootyMan

cobalt fable
#

Same Problem... And yes i know, the good thing is, i go 2 Resubs yesterday without a message ๐Ÿ˜„

mild cipher
#

oh wait, LUL I got the if the wrong way around

cobalt fable
#

yes i've tested it with

if (message == "")

and still the problem

mild cipher
indigo flume
#
if (message === "")
#

JS has this weird triple equals sign I've noticed in some JS coding

cobalt fable
#

doesn't change anything

mild cipher
#

=== is a stricter form of ==

indigo flume
#

@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 thonkingintensifies

cobalt fable
#

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 elanumH

indigo flume
cobalt fable
#

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 PogChamp "

mild cipher
#

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 ๐Ÿ˜ฆ

viral patrol
#

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)

cobalt fable
#

Ehm. Is it possible, that in OBS Studio the Browser Source is different to the preview in the editor?

#

As you can see, the padding is missing on the second one

indigo flume
#

@cobalt fable Are you using something else to view the editor? Like Firefox?

cobalt fable
#

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?

indigo flume
#

I think yes

#

Only the chat widget shows them properly

cobalt fable
#

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 :/

indigo flume
#

This should answer your question and don't know if its planned

cobalt fable
#

Allright ๐Ÿ˜ฆ then i have to deal with it until it comes (hopefully)

mild cipher
#

@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

cobalt fable
#

@mild cipher that would be a lot of work for every cheer emote ๐Ÿ˜„ but it would be interesting to know how to do it

indigo flume
#

there are 5 cheer emotes...excluding the emote cheer emotes thinkingOHNO

#

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 gachigold

cobalt fable
#

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 ResidentSleeper

indigo flume
#

clear cache? thinkdrops

viral patrol
#

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

cobalt fable
#

@indigo flume I did.. but in the editor i didn't worked too after some time
@viral patrol Nope no external libaries.

dense brook
#

Wait does this mean my Marathon widget won't work unless I include the thing in obs as well?

indigo flume
#

@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

dense brook
#

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.

indigo flume
#

I'll try to take a look tmrw, as I have a day off from work.

normal ocean
#

Hi, is it possible to send an alert everytime a viewer interacts with my site?

mild cipher
#

@normal ocean what kind of alert?

normal ocean
#

@mild cipher when a button is clicked on my site it will send a message to my chat saying 'username has done x'

mild cipher
#

@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

normal ocean
#

@mild cipher thank you! Does the user have to be logged into Twitch through my site? Sorry for noob questions.

mild cipher
#

Huh. I dunno where my other reply went but yes, a 'sign in with twitch' type button would involve oauth with twitch.

normal ocean
#

@mild cipher thanks again... if you're interested in helping would you be able to send me a message?

fair marsh
#

is there a way to set up random.chatter to ignore people who haven't spoken in chat aka lurkers / bots

viral patrol
#

Unfortunately there is no way.

spring cypress
#

do you have websocket? Listen to event?

indigo flume
#

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.

mild cipher
#

@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

spring cypress
#

Thanks @mild cipher

spring cypress
#

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?

indigo flume
#

As long as that script is hosted somewhere else, you can call it with ${customapi.SCRIPTLINKHERE.COM}

spring cypress
#

So !bang $... right??

#

And in that link I add the user, who is banging (in case of)

indigo flume
#

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}}

spring cypress
#

I see, good to know

indigo flume
#

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

spring cypress
#

Okey, thanks

spring cypress
#

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?

indigo flume
#

@spring cypress check pinned messages foe the widget documentation

spring cypress
#

Thanks @indigo flume

spring cypress
#

the socket, just happens some event when the channel is online?

mild cipher
#

@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

spring cypress
#

I see, thanks @mild cipher

#

It would be good if there was something to receive chat messages (create custom commands/scripts)

mild cipher
#

You could use TwitchJS for chat (the community maintained version of tmi.js)

spring cypress
#

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

gaunt shard
#

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.

indigo flume
#

@gaunt shard I think all your questions can be answered by looking up the document in the pinned messages.

gaunt shard
#

thanks, I'll check that out

indigo flume
#

including the session thing for the host/raid ๐Ÿ˜‰

gaunt shard
#

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

indigo flume
#

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.

gaunt shard
#

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

indigo flume
#

Aah right, now I'm looking at the document.

#

well, you can try adding it, mimicking the other event types

gaunt shard
#

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

indigo flume
#

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.

gaunt shard
#

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

indigo flume
#

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 smart ) you can pretty much for it to grab past couple of raids with ["name] and ["amount"]

gaunt shard
#

cool, I'll take a look

#

And thanks ๐Ÿ˜„

indigo flume
#

As much as I can and understand how these things work my self cohhL

gaunt shard
#

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.

indigo flume
#

you went ham jesus

cinder lintel
#

I know for a fact we track host events, there are recent/latest hosts widgets. as for raids, im not sure

indigo flume
#

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"

gaunt shard
#

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 ๐Ÿ˜„

indigo flume
#

Thats a nice info to know that recent events are up to 25.

gaunt shard
#

Yeah, kind of thing that would be great to document, hehe ๐Ÿ˜‰

gaunt shard
indigo flume
#

Yeah about that 4HEad

#

it should be the actual documentation and explanation for dev.streamelements, as far as I can see, but...its not

cinder lintel
#

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

gaunt shard
#

Documentation is always the last/hardest thing to get done ๐Ÿ˜„

cinder lintel
#

haha, yeah

#

especially with things changing all the time

gaunt shard
#

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.

cinder lintel
#

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

gaunt shard
#

yeah

cinder lintel
#

possible that you could add that server-side, and have the event widget pull from that?

gaunt shard
#

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

cinder lintel
#

xD

#

basically: no use re-inventing the wheel

gaunt shard
#

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

cinder lintel
#

exactly ๐Ÿ˜ƒ We love seeing the cool things people do with the API, plus it helps find things that are missing/bugged

gaunt shard
#

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.

mild cipher
#

@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

viral patrol
#

You can also use current hosting channels from here: https://decapi.me/twitch/hosts/channelName?limit=LIMIT&list

pulsar willow
#

<@&382267076632379392> i wish there is a variable for lastest subscriber

#

in streamelements commands

cinder lintel
pulsar willow
#

no i did not

viral patrol
#

Oh. Create a command !latestsub with response ${customapi https://decapi.me/twitch/latest_sub/YOUR_CHANNEL_NAME}

cinder lintel
#

someone did

#

brain imploding

floral fable
#

it was him, he deleted it kiwaplPolice

viral patrol
#

@pulsar willow I've pasted a command above โคด

pulsar willow
#

thank you

#

it was not me really. i even saw that channel now

cinder lintel
#

that was processed 15 hours ago

pulsar willow
#

it is not idead channel

#

ideas

cinder lintel
#

so I was wrong about the channel, but you still posted it yesterday

pulsar willow
#

yes, helpers were offline so i deleted

cinder lintel
#

lol, hint: Leave the message for when they come online so they can answer it right away

pulsar willow
#

is this authenticate really safe?

viral patrol
#

@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 ๐Ÿ˜‰

pulsar willow
#

okay i get it ๐Ÿ˜„ how about safety ๐Ÿ˜„

viral patrol
#

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)

magic sandal
pulsar willow
#

thank you guys

gaunt shard
#

@mild cipher Thanks, I'll check that out!

pulsar willow
#

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 ๐Ÿ˜ฆ

swift zephyr
#

@pulsar willow prime subscription variation does exist, this is also announced in the chat via chat alerts.

pulsar willow
#

really? i have not seen

#

where is

#

@swift zephyr

swift zephyr
#

@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
#

oh i mean alert for chat

#

in chat alers in modules

swift zephyr
#

@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
#

yes i wish it was not

#

okay ๐Ÿ˜„

swift zephyr
#

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

pulsar willow
#

thanks

ripe garden
#

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"

random karma
#

@viral patrol idk if you're savvy with regex but ^

also, @wheat sphinx

low sierra
#

@ripe garden the beginning of the message or any word that begins with gn?

dense flame
#

how to use this

ripe garden
#

any word that begins with

low sierra
ripe garden
#

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?

indigo flume
low sierra
#

you don't need regex

#

just type gn*

#

and uncheck regex

random karma
#

My life is in shambles

#

Over complicated that by too much

#

Time for bed

ripe garden
#

Well that makes things way simpler.

#

Is there a way to do the same but when it's in the middle of other characters?

low sierra
#

*gn* but that's dangerous

indigo flume
#

*gn* - * stand for EVERYTHING before or after given phrase

ripe garden
#

Understandable.

#

Will that take spaces into account?

low sierra
#

don't believe so

ripe garden
#

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.

woven field
#

Hi guys, can someone have the link of the custom css api (alertbox) please ? ๐Ÿ˜ƒ

indigo flume
#

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.

woven field
#

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 ๐Ÿ˜ƒ

indigo flume
#

I was the one that provided the screenshot - the screenshot is taken from the pinned document in this channel.

woven field
#

Ok, i'm gonna dig more into it then, thanks i guess

indigo flume
#

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)

woven field
#

ok thanks man

indigo flume
#

gif ain't playing for me Squintright

#

nevermind its just huge for its own good keizarDerp

woven field
#

Gif is still compiling too Kappa

indigo flume
#

click on it and then "Open link" - should play in your browser

#

its big and long for discord preview to handle it

woven field
#

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 ^^

indigo flume
#

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

woven field
#

yeah got it ^^

mortal wagon
#

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"

random karma
#

Should be {{amount}} but maybe emulating it doesnt show a number.

mortal wagon
#

๐Ÿ˜ฆ

floral fable
#

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

mortal wagon
#

So how do i fix the test works fine ๐Ÿ˜ฆ

#

Im NOOB

median hatch
#

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.

viral patrol
#

In that scenario you need to aggregate this data somewhere outside StreamElements as we have no such scope.

mortal wagon
#

lx could ya help me fix my issue the {{amount}} shows find when testing but not in OBS

#

@viral patrol

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; 
}
mortal wagon
#

hmmm

#

dm'd you the code @viral patrol

#

fixed it i think.

mild cipher
#

@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) ๐Ÿ˜„

floral fable
#

BlobSpilledCoffee That makes complete sense, I probably should have scrolled up further and read more FacePalm

mild cipher
#

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.

mortal wagon
#

^ i like this

craggy ermine
#

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 ?

indigo flume
#

โคด Sorted - needed to only edit the html tags cavsalute

ruby atlas
#

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}?

cinder lintel
#

add a negative amount of points

twin ore
#

@ruby atlas I think you're looking for /points/{channel}/{user}/{amount}

ruby atlas
#

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?

cinder lintel
viral patrol
#

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

ruby atlas
#

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

viral patrol
#

It's been good 10 years I wrote last part of mIRC script

young saffron
#

does anyone have and is willing to share some simple code to customize the goals?

indigo flume
#

@young saffron i may have something but i'm still working on it

young saffron
#

@indigo flume cool, Iโ€™d appreciate it.

cobalt fable
#

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? spinning_think

craggy ermine
#

Can anyone help me with the css text position ? .. I just can't get it right ๐Ÿ˜ฆ

wheat kelp
#

@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;
    });
cobalt fable
#

so i just put the code example into my JS Part of CustomCSS? @wheat kelp

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 ๐Ÿ˜ƒ

cobalt fable
#

@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 FeelsGoodMan

cinder flicker
#

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..

indigo flume
#

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 KiwiHi

cinder flicker
#

eyy Keizar kiwaplGasm

#

oh ok Ill try thanks!!

#

I have here this <source src="{image}" type="video/webm">

indigo flume
#

is it for subs and follows and such alerts, btw?

cinder flicker
#

I only want it for cheers, host, raids

#

but yeah alerts in general

indigo flume
#

ok, so JS should be fairly empty unless it contains variables and such

cinder flicker
#

JS has the most text LUL

indigo flume
#

but in the html any {image}/{name} needs to be changes as {{image}}/{{name}}

#

BUT

cinder flicker
#

anything that has {} around it yea?

indigo flume
#

if you have this: <source src="{image}" type="video/webm"> change it to this:
<source src="{{video}}" type="video/webm">

cinder flicker
#

oh ok ! ill try

indigo flume
#

image in a video html tag cohhN

cinder flicker
#

omg this is a pain in the a**. @indigo flume could we dm? :3

green yarrow
#

@cinder flicker you can also DM me Kappa

pulsar willow
#

excuse me
My chat bot Will respond to the keywords that its said
pls help me

green yarrow
#

@pulsar willow how did you set up your command?

#

Is the bot in chat?

#

Is the bot mod? Or is he Timed-Out/Banned?

cinder flicker
#

@indigo flume So I tried it but now everything vanished because it doesnt take the video for a reason

indigo flume
pulsar willow
#

only Fill in keywords

#

bot discover keywords
it will Reply immediately

#

but Respond have keywords

dry lark
#

Why can't I stream.....

indigo flume
#

@night coral Thats a bit rude. They were both helped already.

night coral
#

k

autumn glacier
autumn glacier
#

Anyone ??

indigo flume
#

I would do it, but not now as its 1:40AM and most likely not tomorrow or the next few days.

mortal wagon
#

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

autumn glacier
#

@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

indigo flume
#

Don't expect me to do it anytime soon really. I do this in my free time.

young saffron
#

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

arctic terrace
#

@young saffron Hi there, did you see the last comment under #command-share ? That works for me.

young saffron
#

no i didnt but ill take a look thanks

#

@arctic terrace it works, thanks a lot

karmic parrot
#

Hey guys, do you have a Wordpress integration?

indigo flume
#

What do you mean by that?

#

integrate your stream in wordpress or?

karmic parrot
#

A wordpress plug-in that allows you to implement some of your features onto a website

#

Yep

indigo flume
#

Our features? No, unfortunately and I don't think this is planned.

karmic parrot
#

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

indigo flume
#

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 PepeShrug

karmic parrot
#

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?

indigo flume
#

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

karmic parrot
#

Thanks dude, Iโ€™d appreciate it

finite heath
#

@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

indigo flume
#

Also to point out, if you haven't seen it already @karmic parrot the API docs are in the channel description PepeLaugh

karmic parrot
#

@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

finite heath
#

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. ?

karmic parrot
#

Yep

finite heath
#

cool, cool

ruby atlas
#

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.

cinder lintel
#

@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

ruby atlas
#

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

cinder lintel
#

Is there a sepcific reason you are using mIRC?

ruby atlas
#

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

cinder lintel
#

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

ruby atlas
#

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.

cinder lintel
#

xD no problem

night coral
#

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.

mild cipher
#

@night coral Have you tried using the exact snippet Styler posted?

night coral
#

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.

mild cipher
#

Which language? pkingThink

night coral
#

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

night coral
#

@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)

mild cipher
#

@night coral Listen on event:test for test events and events replayed from the dashboard

night coral
#

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.

mild cipher
#

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.

night coral
#

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.

mild cipher
#

Np! pkingSuperHype

mild cipher
#

@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? thinkingglare

#

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

night coral
#

Mine looks like a more updated one, so i'm sticking with that. I don't know how it can be different.

brazen heath
#

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 ๐Ÿ˜ฆ

indigo flume
#

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

brazen heath
#

@indigo flume basically I want to do something like a donation alert, with custom text and animation

indigo flume
#

Well you can do a custom CSS for the alert widget

#

with html and css only

brazen heath
#

but how to get the info from the website to the alert on completion of a request form

indigo flume
#

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?

brazen heath
#

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

indigo flume
#

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 PepeShrug

#

customizing the text and alert type, is part of the html/css

brazen heath
#

so can I send the information to SE via the API, and then use HTML/CSS to display it?

indigo flume
brazen heath
#

or would the html need to read the database every say 30 seconds, and if found, display something

indigo flume
#

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 PepeShrug

brazen heath
#

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

indigo flume
#

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

brazen heath
#

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

indigo flume
#

If it does, just poke me real quick as I want to know this info for a project I have in my hands PepeLaugh

brazen heath
#

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

indigo flume
#

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

brazen heath
#

or maybe now

#

not*

indigo flume
#

i don't know PHP my self, but have been fiddling with JS for some time now and still learning it my self PepeShrug

brazen heath
#

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

indigo flume
#

maybe this will help?

mild cipher
#

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

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

indigo flume
#

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:

brazen heath
#

sounds possible ....

mild cipher
#

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.

indigo flume
#

What I meant is, he can disguise his form as a redemption(store item) as a help

#

to find a solution PepeShrug

brazen heath
mild cipher
#

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.

brazen heath
#

I have full access to my webserver

#

@mild cipher DM, so I can show you what it is in detail?

mild cipher
#

May have to head out in a moment but sure

viral patrol
#

@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
wispy wigeon
#

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?

mild cipher
#

I think that's due to the recent autoplay policies which don't allow unmuted videos to be autoplayed Thinktastic

viral patrol
#

@wispy wigeon this policy doesn't affect OBS as far as I know, so you should be able to see it on stream

wispy wigeon
#

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

mellow pewter
#

Im looking for a code for my foon

zenith folioBOT
#

@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

devout moss
#

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?

low sierra
#

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

mild cipher
#

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

viral patrol
#

But remember. Streamer takes full responsibility for what is shown on stream, so user with violating avatar can put you into trouble

devout moss
#

@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)

viral patrol
#

It is not included by default. You should do it via script tag from external CDN

nova hedge
#

Hey has anything changed with tip when using websockets lately?

deep raptor
#

I need a command that has the amount of subs I have and not have to update manually

indigo flume
#

@green yarrow โคด cohhL

green yarrow
#

Ohhh nice are those new? KITEPoggers @indigo flume

#

I member that it wasn't possible FeelsSadHug

midnight orbit
#

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

deep raptor
#

Thank you

indigo flume
#

@midnight orbit We have a variable for that Froge_poof

midnight orbit
#

i didnt find it monka

#

ok, you screenshotted even. wow. i need more coffee and more braincells. mea culpa @indigo flume

indigo flume
crimson flower
#

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?

alpine gale
#

Hi all - was wondering where I can register an OAuth Client for SE?

indigo flume
#

Is this about the rename of the bot?

alpine gale
#

@indigo flume Was that RE: my message?

indigo flume
#

yes

alpine gale
#

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

indigo flume
#

I'm not sure you actually need oAuth token for that. Afaik channelid and/or channel name is enough

alpine gale
indigo flume
alpine gale
indigo flume
#

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

alpine gale
#

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

cinder lintel
#

As far as I know, oauth is planned, but not implemented yet. you would need people to provide the JWT token

indigo flume
#

You can't fetch a JWT token of a user - thats protected

#

and what Scalper said

alpine gale
#

Thanks @cinder lintel - that's a shame, how do users go about fetching their JWTs? Is that the "Personal Access Token" on-site?

zenith folioBOT
indigo flume
#

Thats how

alpine gale
#

Brilliant, thanks both

craggy ermine
#

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 ?

indigo flume
#

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

craggy ermine
indigo flume
#
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>```
craggy ermine
#

the thing is .. it's showing me the amount of resubb

#

i just want to move the gif

#

where i want to

indigo flume
#

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 ๐Ÿ˜ƒ

craggy ermine
indigo flume
#

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

craggy ermine
#

the problem is i don't know where to add the position of that giff

indigo flume
#

in the CSS

craggy ermine
#

I'm trying here cuz the class is called video but nothing happends

indigo flume
#

Is the video part of the main <div>?

craggy ermine
indigo flume
#

if class .image-container has some CSS attached to it, most likely your video is inheriting it.

craggy ermine
pulsar willow
#

hello

indigo flume
#

Ok, so try changing the top, left and bottom from percentage base to actual pixel points and see what happens

pulsar willow
#

help me

indigo flume
#

What is the issue?

pulsar willow
#

ok

#

its the bot

indigo flume
#

I can't help if I don't know what the issue is.

pulsar willow
#

when i go live

#

the bot doesnt talk in chat

#

and i made it moderator

indigo flume
pulsar willow
#

i use youtube

indigo flume
pulsar willow
#

i did

#

xD

indigo flume
#

This is about coding, not general problems.

pulsar willow
#

ok

craggy ermine
indigo flume
#

I only said top bottom and left, not width and height

#

by default video files are 100%

#

in those aspects

craggy ermine
#

I see

indigo flume
#

100% for an image and video means, their OWN sizes

#

or at least thats how I've seen it

craggy ermine
#

now it's not showing the image at all

indigo flume
#

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

#

๐Ÿ˜„

craggy ermine
#

๐Ÿ˜„

#

oh

#

dont read dat lol

indigo flume
#

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"

craggy ermine
#

got it , thank you ^^ and have a good night

languid escarp
#

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?

languid escarp
#

@indigo flume

#

Sorry to tag just wanted make sure some1 saw it Haha

indigo flume
#

I saw it

#

Am on mobile

#

Camt really explain on mobile

#

Will be able to in ~30 mins

indigo flume
#

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.

languid escarp
#

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! ๐Ÿ˜†

indigo flume
#

For wording, like I said its in the JS code on 2 locations

#

Ooh wait its in 1 location

#

actually 2, sorry

languid escarp
#

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

indigo flume
#
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

languid escarp
#

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

indigo flume
#

I fully understand everything.

#

It just harder to help you do it, then to make it my self for example.

cinder lintel
#

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

indigo flume
#

If only it was that simple @cinder lintel thinkies

#

Unfortunately, for this widget it ain't like that FeelsDankMan

languid escarp
#

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

indigo flume
#

screenshare ain't an option for coding session ๐Ÿ˜„

cinder lintel
#

haha, if it was just basic text, it would be that simple. But magic makes it more complex xD

languid escarp
#

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

languid escarp
#

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

indigo flume
#

font-size: 15px; this the line you need and also place it in side the p span {} bracket as well

languid escarp
#

cool got that thanks

#

actually dont need center now. looks nicer this way haha

pulsar willow
#

I installed the application but I do not have an invitation please someone can help me

indigo flume
#

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

heady coral
#

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

low sierra
#

Currently no but this is planned @heady coral

#

the idea is to expand the bot banned words filters to activity filtering

viral patrol
#

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).

gritty aurora
#

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

indigo flume
#

@gritty aurora Basically this โคด

gritty aurora
#

ohh got it thanks

craggy ermine
#

Hello , what should i use in the html code for the sub gift ?

#

will it be the same code as in the subscriber ones ? ๐Ÿค”

indigo flume
#

{{sender}} for the gifter

craggy ermine
#

Thank you

indigo flume
#

yes

craggy ermine
#

any idea why my gif is not appearing but only the text ?

viral patrol
#

Do you have your gif attached like:
<img src="{image}"/>?

craggy ermine
indigo flume
#

yes. Make that into {{image}}

craggy ermine
#

God i always forget double {}

#

thanks

viral patrol
#

I forgot about it as well.

craggy ermine
#

By the way .. is it possible to make a specific viewer alert ?

#

like when that person resubs it will be a unique alert

indigo flume
#

sorta yes. With JS

craggy ermine
#

is it a complicate one ?

indigo flume
#

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 cohhLUL

craggy ermine
#

so if i add the name of the user and i add this at the subscribe alert JS, would work ๐Ÿค” ?

indigo flume
#

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

craggy ermine
#

oh I see but that has never been made till now right?

indigo flume
#
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.