#dev-chat

1 messages ยท Page 27 of 1

viral patrol
#

One of them does html entities and second one changes spaces to + characters

gilded elm
#

oh damn that looks useful

#

I was bummed out because I can't open text files to read lines, but this looks like a potential workaround

gilded elm
#

Unrelated, but is it possible for me to make a kind of if( ) statement in the chatbot's responses? Is there an API for that? I'd like to be able to add a response based on what number it ends up reading.

indigo flume
#

Our bot doesn't support an if-else statement unfortunately.

gilded elm
#

it's all good. That would probably be really hard to implement tbh

#

that pastebin api is a game changer. I love it.

indigo flume
#

Thank @mild cipher

viral patrol
#

+1

gilded elm
#

yeah he's pretty awesome

mild cipher
#

Aw thanks! heart_eyes_sob

gilded elm
#

I love this so much.

#

thanks @mild cipher, you're a legend

#

oh my god dude yeah the filter thing would work

#

for my purposes, anyway

#

you actually used a similar tactic in your dungeons and dragons api, by the look of it

#

yeah, you have different responses based on what the filter is. This is incredible.

mild cipher
#

Heh yeah! It occurred to me after the fact that I could've just made a paste with all the responses and numbers with no need for filters, but I guess this way there's still an equal chance no matter how many responses you have for one number compared to another, if that makes sense

static wigeon
#

Hey guys, I'm looking for a few developers that would help test OAuth2 early next week KKona
Feel free to post here or DM me if you are interested.

gilded elm
#

Will OAuth2 be used for an update to the current bot-rename system with ground control?

static wigeon
#

The current goal is to allow developers to use ALL of our apis without JWTs,

gilded elm
#

that would be really nice

wispy pagoda
#
Connection successful!
{'clientId': '<notsureifthisshouldbesecret>', 'channelId': '', '<thistoo>': 'Welcome XD'}
Auth successful!
viral patrol
#

So you are in! I will call Neo then ๐Ÿ˜‰

#

There's no event:test there's a woman in red dress.

wispy pagoda
#

I'm working on a super-hacky super-temporary project for tonight.

#

Til I can flesh out the project more.

viral patrol
#

I love those 'super-temporary' projects that stay for years

wispy pagoda
#

Care for a DM?

wispy pagoda
#

It works enigmaHype

viral patrol
#

Pog

tidal valve
#

Hey friends, new here! Anyone know where I can find a list of events that would trigger the event listener for Websockets? ๐Ÿ˜ƒ

rugged rapids
#

The onyl thing I know where you maybe find these infos are the channel header and the pinned messages. Maybe you can find something via the search function in this channel.

tidal valve
#

Okay I'll keep lookin around, thanks

viral patrol
#

@tidal valve Hi mate. Pinned message has example code you can use. There are also urls to details about those events (their structure).

wintry hinge
#

I'm having some trouble with the points bulk update endpoint

#

I get the error that it's failing because i require mode and users to be set

austere schooner
#

Has the legendary @viral patrol dipped into the coding of the Typeline alert from Nerd or Die. I tried to be a "good boy" and search the Discord server for any info and the pinned messages.
Help (if any) would be appreciated. My animated alert is holding me back from using SE.

viral patrol
mild cipher
#

In case anyone is interested in helping me test this, I've mostly finished up this PUBG stats customapi that pulls directly from PUBG. I've noticed some weird discrepancies in results however (when comparing to trackers), so I'm not sure if there's some sort of issue with their API missing results or something blobshrug

!cmd add !pubg $(customapi.https://api.thefyrewire.com/twitch/pubg/$(channel)?query=$(queryescape $(1:)))

More information: https://pastebin.com/EfAEdPYw

simple jay
#

Am i in the right location if i have a quick question regarding the CSS in Custom Lists?

viral patrol
#

Yes. You reached the rightest place to ask questions about that ๐Ÿ˜‰

pulsar willow
#

Hello, i recently asked your live chat, that told me i should ask here: Is there any possibility to make an command, that shows how much someone already donated to the channel? I have some viewer constanstly asking for it. But i cant find a variable to put into for the chat bot. I know i can show the amount on the Donation page aswell, but other people don't want that their names with the amount are public.

viral patrol
#

Unfortunately It is not possible to interact with SE API from bot

simple jay
#

So i've been importing my old Eventlist from Streamlabs and tried to recreate it as best as i could under SE.

What i'm unable to do is align the Eventlist so it's aligned on the Right Side and Grows to the Left side.

Currently it just does the opposite.

I've tried various options but it doesn't seem to be working and i quit and made a new lookalike using the default one.

But i would love to get my old and simpler designed eventlist.

merry minnow
#

Hello. I'm trying to learn to use the custom api command, but it's getting really confusing. I'm trying to create a command that'll say random lines I put in, but idk how the api work

twin ore
#

The customapi variable isn't its own API. It's to reference an outside API.

merry minnow
#

an outside api???

twin ore
merry minnow
#

Hmm...Okay...I'm still a bit lost. how does it work though if it's an outside api

#

what do I have to do?

twin ore
#

Literally, ${customapi.http://api.scorpstuff.com/dadjokes.php} will return a dad joke. Because that's what that API is built to do.

merry minnow
#

Oooohhhh Now I see. so one more question..this can work with other websites can it?

twin ore
#

Works with any API that outputs text.

merry minnow
#

so If I say...like outlook will it work with that maybe???

twin ore
#

Does Outlook have an API URL that outputs text?

merry minnow
#

No?

twin ore
#

So there you go. You need an API URL that you can put into the customapi variable. ${customapi.URL GOES HERE}

merry minnow
#

I'll mess around with it. thanks for the help

viral patrol
wispy pagoda
#

...huh...I just got an idea.

mild cipher
#

Small update to Pastebin stuff on Fyre API. Pastes that fail on filters and have no untagged lines to fall back return nothing now. That means you can use it to make (pseudo) user-specific commands HYPERS

The user's own username acts as the filter and therefore only lines with their name are returned, and nothing is returned if they aren't in the paste.

Downsides: one paste per command (unless you have multiple people sharing a command and want customised responses for each person), mods/broadcaster can't trigger these commands unless explicitly added to the paste

wispy pagoda
#

Yeah I'm having a conundrum of how I would want to structure this

#

So let's assume I have a starting point of a webserver running on my local LAN with a REST API.

#

(Could also be a websocket, but that's to worry about later)

#

I can't quite make calls to that LAN server from the SEbot, unless I want to expose the server to the outside internet.

#

But, I could do it from the overlays via a custom widget, right?

#

Just put some AJAX calls in the JS.

#

So if I want to route a chat command from the bot to a custom widget is where I kinda feel stuck, don't mind me I'm thinking out loud I guess it's time to do a deeper dive into the documentation and integration.

viral patrol
#

You can use call directly from chat to your LAN endpoint, so basically it is better to read bot response, so you can set privileges and so on. Example:

  1. Command: testcall response ${user} used testcall
  2. Overlay listener for message from user StreamElements with content of ([a-zA-Z0-9]*) used test call
  3. Overlay passes that to your endpoint where your logic gets in
wispy pagoda
#

That is kind of what I was expecting to go with, an overlay widget that listens to chat.

#

Then again the overlay widget could also listen to chat generically instead of just filtering out everything except the SE Bot

eager vale
#

Is there a list of field types for custom widgets?

rugged rapids
eager vale
#

we support all of HTML5 input types (except of file and date/datetime-local).

#

Thanks ๐Ÿ˜„

shell quartz
#

Guys where can i find alertbox customfield documentation?

mild cipher
#

@shell quartz

shell quartz
#

i set some custom fields in json as in example but i can't find how to set after create

mild cipher
#

Oh, you said alertbox, my mistake. I'm not sure if the alertbox supports custom fields, it might be for custom widgets only. I could be wrong though.

shell quartz
edgy garnet
#

question for me ๐Ÿ˜ƒ

#

so restream can read fb chat?

#

Can we have the bot do alerts based on what is read?>

finite heath
#

hi @shell quartz , we still have a bug stopping the alertbox custom fields from being used, but its being worked on

craggy fable
#

Hoping someone can help with this... I'm using the top event rotator widget (https://github.com/StreamElements/widgets/tree/master/TopEventsRotator) and trying to work out how to change the icons from FontAwesome to some custom ones. Possibly the StreamElements ones used in the default custom widget. Any ideas? I've tried a few things, but I'm at a loss

viral patrol
#

You can replace this part (line 100):

<div class="icon">
    <span class="fa ${element.icon}"> </span>
</div>

with:

<div class="icon">
    <img src="${element.icon}">
</div>

And then use URL to image as icon attribute

craggy fable
#

okay, thanks! Will try that out

river crystal
#

hello!

#

It won't let me copy paste the code here like it did on the #helpdesk-twitch channel

viral patrol
#

I think if you have it running on SL then using our import tools you will be able to move this alertbox to StreamElements without any problems.

river crystal
#

I tried that

#

It didn't work

#

It doesn't have anything when I trigger the alert on the imported alert box.

viral patrol
#

Did you enable custom CSS under selected alert/variation?

river crystal
#

yes

#

If I disable it, it works, but not the way it's intended to.

river crystal
#

Still no idea how to help?

#

I'm probably just going to use SteamLabs until this gets figured out. I'll use you guys for everything else, but I'll use StreamLabs for alerts for now.

viral patrol
#

I had really busy evening, so I took a look at this and I see that there will be need to fiddle with that a bit to put everything in place

river crystal
#

Okay. Thanks for looking into it.

zealous schooner
#

i need help

#

how do u add camera for stream elements obs live

vapid iron
viral patrol
#

@river crystal If you could invite me as editor to your SE account I could take a look at this code

river crystal
#

How do I do that @viral patrol

zenith folioBOT
#

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

indigo flume
#

Make sure you give him the link in DMs

viral patrol
#

Fastest fingers in Europe - KeiZar

river crystal
#

I found out

#

Sent.

strong orchid
#

im looking into using the stream marathon timer from widget-share i was wondering is there a way to add different time variables for new subs and resubs?

indigo flume
#

I think you can adjust the time gained in the JS tab when you open the css editor.

strong orchid
#

ye can adjust the times but it seems to be for subs in general

viral patrol
strong orchid
#

ah nice ty @viral patrol is the sub 123 etc the different tiers of subs?

viral patrol
#

It has more than that. You can add tips/follows/hosts/cheers to increase sub marathon time

#

And different tier subs as well ๐Ÿ˜‰

strong orchid
#

its what i was looking for ty, is there a way for it to listen to if a sub in new or resub? as that seems to pick up tiers but doesnt seem to determine if its new or not

viral patrol
#

No. It doesn't check if this is first subscription

strong orchid
#

np thanks, appreciate the help

nova parcel
#

yo

#

not quite sure what im doing wrong here

#

users is an array, is it not?

#

am confused

broken cairn
#

i got an alert made from fiverr, the guy gave me a share link to streamlabs, but i use streamelements, i imported using the chrome extension and it doesn't come up correctly, i think the code is different... what do i need to provide for further help? Here is the code: https://pastebin.com/DNX3JN9a and i attached the gif

charred tundra
#

can you specify expected behavior and what's not working for you?

broken cairn
#

it just doesn't show it

#

the gif doesnt

#

nothing does

#

and i think its the coding but idk how to code

charred tundra
#

do you have a sample of it working on an overlay, maybe in a clip or something?

broken cairn
#

yea

viral patrol
#

From what I see there's nothing fancy in the code so I think if you disable custom alerts you will be able to adjust it to your needs without coding skills

broken cairn
viral patrol
#

Yup. Just plain alert with delayed text should work for you

#

Without flaws

broken cairn
#

@viral patrol how do i disable custom alerts?

viral patrol
#

And you should be OK to go

#

๐Ÿ˜‰

nova parcel
#

Hello

#

Lx would you mind helping me out please :)

broken cairn
#

@viral patrol thank you! ill @ you if i need anymore...

#

@viral patrol how do i make it so the gif doesn't get cut off by borders

viral patrol
#

I don't understand

broken cairn
#

one sec

viral patrol
#

@nova parcel Checking it now

nova parcel
#

Thanks

broken cairn
viral patrol
#

It is posible to center text

#

In text settings you can click "Advanced" and set position

broken cairn
#

@viral patrol it worked, ty. and what about the wings cut off?

viral patrol
#

Unfortunately IDK. Try maybe another option from this screen, or resize alertbox to fit this gif aspect ratio

nova parcel
#

@viral patrol status?

viral patrol
#

OMW

nova parcel
#

Hm?

viral patrol
#

I am using ARC to check this one

nova parcel
#

Well its not usually going to be one person, thats just me testing. I had it as that before but it needs to send out the points to multiple people, and i was having issues with it not dispatching the points to everyone

#

@viral patrol

#

Imma head to sleep, ping me if you know what the problem is :) thanks

viral patrol
#

@nova parcel It worked for me just like that:

nova parcel
#

Wth

#

Hmm ill try tomoz but i should probs add the content type header

#

I dont have that

#

Maybe thats causing the issue?

viral patrol
#

Yes. Definitely that one

nova parcel
#

Alright ez

#

Thanks

nova parcel
#

@viral patrol

#

hmm still not working with the content type header

brittle umbra
#

Is There anyone who knows how to create a cmd to Show the hours of a viewer? Without sum Them up to days?

wary pelican
#

Hello can someone help me to import my watchtimes from streamlabs chatbot to streamelements ?

nova parcel
#

@viral patrol yo do you know what the issue could be?

#

sorry for ping, no one else seems to help

viral patrol
#

No problem about ping. I honestly don't know. I tried the very same request and it worked for me like a charm

nova parcel
#

ugh wtf

#

can you quickly test something for me please @viral patrol

#

in your json can you put users before mode

#

see if that makes any difference

#

cus thats how i have it

viral patrol
#

No worries. Doing it now

nova parcel
#

why does it hate me

viral patrol
#

I can bet it is something really silly

nova parcel
#

probably

#

btw is arc better than postman?

#

on a sidenote

viral patrol
#

I like postman and ARC. Postman if you have prepared environment and workspace, arc if you want to send request without configuration

nova parcel
#

aight cool

#

imma start using arc

#

oh

viral patrol
#

I use both, when I want something fast I pick that one. If I want to do deeper analysis and several endpoints - postman it is

nova parcel
#

its a chrome extension

viral patrol
#

It is standalone

nova parcel
#

oh alright cool

viral patrol
nova parcel
#

that poage is dead

viral patrol
#

ARC Chrome is obsolete

#

This page works for me

nova parcel
#

perfect thanks

pulsar willow
#

``

#

yeet

#

yeet

#

nice

#
yeet```
viral patrol
#

;p

nova parcel
#

?

viral patrol
#

Just a silly emoticon ๐Ÿ˜‰

nova parcel
#

๐Ÿค”

#

oh wait i didnt have the content type header

#

still fucked

viral patrol
#
{
  "users": [
    {
      "username": "testuser123",
      "current": 200
    }
  ],
  "mode": "add"
}
#

this is mine

nova parcel
#

wtf that worked

#

im confused

viral patrol
#

I see it now

#

You have "mode: "add" instead of "mode":"add"

nova parcel
#

ooops

#

alright lemme test in my code

#

if its apparently working now

#

nope got the internal server error again

#

@viral patrol

#

this is my code

#
async def bulk_add_points(channel, data):
    with open('./channels.json') as channels_file:
        content = json.load(channels_file)
        token = content[channel]['token']
        channelid = content[channel]['id']

    async def fetch(session, url):
        async with session.put(url, headers = {"Authorization":token, 'Content-Type': 'application/json'}, data=data) as response:
            return await response.json()

    async def main():
        async with aiohttp.ClientSession() as session:
            r = await fetch(session, f'https://api.streamelements.com/kappa/v2/points/{channelid}')
            logger.info(r)

    await main()
viral patrol
#

is token Bearer JWT

nova parcel
#

ye

#

same token i used in the arc test

viral patrol
#

Try some GET endpoints to check if this is not the issue

nova parcel
#

whats one i can try

viral patrol
#

channels/me

#

Also I wonder if body is sent as casted json or is there anything happening for example you see normal json, but data sent is [Object object]

#

Try to stringify that JSON before sending

nova parcel
#

alright

#

that get request worked btw

viral patrol
#

So it is not auth

#

I think that body is malformed somehow

nova parcel
#

aaaaaaaaaaaa

nova parcel
#

i cant get it to work @viral patrol

#

im so confused

#
async def bulk_add_points(channel, data):
    with open('./channels.json') as channels_file:
        content = json.load(channels_file)
        token = content[channel]['token']
        channelid = content[channel]['id']
        print(data)
        data = json.dumps(data)
        formdata = FormData()
        formdata.add_field('body', data)

    async def fetch(session, url):
        async with session.put(url, headers = {"Authorization":token, 'Content-Type': 'application/json'}, data=formdata) as response:
            return await response.json()

    async def main():
        async with aiohttp.ClientSession() as session:
            r = await fetch(session, f'https://api.streamelements.com/kappa/v2/points/{channelid}')
            logger.info(r)

    await main()```
#

idk what more i can do

nova parcel
#

maybe one of the 21 se.champions or 20 se.staff that are online can help me

#

:)

nova parcel
#

ok another question

#

with ${customapi}

#

how do i get it to print a json element from the response

#

instead of the whole body

nova parcel
#

ok nvm ill just make the command on my own bot

sharp island
#

@nova parcel I'm pretty sure that the issue is that the data is being posted as form data and not as json. You need to use json=data instead of data=formdata.

nova parcel
#

ohh alright ill give that a go

#

nope still not working

#

same internal server error

sharp island
#

Did you remove the json.dumps()?

#

You want the object, not the string.

nova parcel
#

i did, currently trying to fiddle with getting the mimetype to json

#

aiohttp is having a cry

sharp island
#

Uh, is it literally sending to 'https://api.streamelements.com/kappa/v2/points/{channelid}'?

nova parcel
#

no

#

thats an f string

#

but that error is actually on trying to load the response so i guess it was successful

sharp island
#

Just making sure that the f string has the appropriate variable. ๐Ÿ˜ƒ

#

Yeah, I see it's the response, which is super weird. It should respond with application/json; charset=utf-8 as the content-type.

nova parcel
#

well

#

it seems to be working

#

apart from the malformed response

sharp island
#

Even if I send bad data or to the wrong url, I get a valid response in postman. :/

#

return await response.json(content_type=None) ?

nova parcel
#

even with an application/json accept header it still doesnt return json

#

ill try that

#

no thats what caused the error

sharp island
#

Sorry, copy pasta errors. return await response.json(content_type=None) should tell it to ignore the content type

#

Which is weird. it's definitely returning application/json. Or should be. It's a node server, that's the default. ๐Ÿ˜ƒ

#

I need to step away for now, so best of luck.

nova parcel
#

well its definitely not returning application/json

#

alright all good thanks

#

but its fine, i dont need the response anyway, as long as its actually working now

viral patrol
#

Oh. I know that. As you can see from my ARC screenshot, response is plain text "Created", just check if HTTP code is 200 ๐Ÿ˜‰

#

JSON is returned on error

sharp island
#

Oh, yeah.

#

Most of the PUTs just respond with a "Created"

#

I forgot that

arctic dragon
#

Hello, new here and a novice with programming. Apologies if this is a really nooby question.
I'd like to take our stream points leaderboard and embed it into a page on our website. I'm not really sure where to start, but if anyone is willing to help with this then it would be greatly appreciated. Thanks.

magic egret
#

Hello I'm new here. I mod for a great friend of mine and I want to create a couple of commands that do lists like quotes, I contacted streamelements and they told me I needed to create a custom API. Can someone help me with this?

indigo flume
#

@magic egret What you've been told is basically make your own code that stores an array of text strings, but is called via our ${customapi} variable

#

example being: ${customapi.https://you-link-here.com/add-new-quote-query}

#

So the code behind that link will be yours, as our quote default commands has basic functions like just adding, removing and showing the quotes

viral patrol
indigo flume
#

heck, i forgot fyrewire did that KMS

arctic dragon
#

Any advice for me?

viral patrol
#

Huh. There's no easy start. I would recommend to ask on your stream if there's anybody with coding skills to help you write a tool. Our API documentation is open and posted in subject of this channel

#

If you have some coding skills remember that whole data exchange should be not client side but server side, as this exchange contains confidential authorization details

#

Second thought is that you could do it for side for points leaderboard, you call check how does that data is transmitted on your SE leaderboard public page. Just open network tab in chrome Dev tools and check requests. This will give you a lot of knowledge

night vine
#

I'm trying to implement some overlay goal edit/reset commands into my bot, where do i get my SE token?

#

(i don't see anywhere on my dashboard i can view/generate one, am i to just copy and paste the one from a browser inspector on an XHR event?)

viral patrol
#

For that purpose you need to use JWT as apikey that you can obtain onWidgetLoad has no writing permissions. You should be aware, that this value is stored as plain text in your overlay code, so if your overlay URL leaks to anybody, they will have access to do almost anything with your account (including sending fake tips, removing tips from history and even changing your PayPal address for future tips)

zenith folioBOT
night vine
#

ah, i totally missed that little switch, thanks!
the token should be safe, my bots scripts and config files aren't accessible from the outside and i don't need overlay URLs since for what i'm doing it looks like i just need to update session data fusOK

#

i'm so happy to see some proper documentation for once

viral patrol
#

We don't want to scary devs away with messy docs ๐Ÿ˜‰

quick spruce
#

Hey there, this is a repost as I've been directed here.
Hey there, I noticed on stream yesterday that my Cheer alert seems to not show up. I get the sound, but no image and no TTS was working. I imported my Alerts from SL and use a Nerd or Die pack. I've just gone into my overlays and it still doesn't show, but all my other Alerts do. Testing them back on SL the alert and TTS works fine. These did work before, so I imported them again and the new import has the same issue. Not sure what to do from here.

cobalt laurel
#

Hello! So I'm trying to use a custom font from my computer but certain ones arent showing in the overlay editor. Is it something additional i need to do?

charred tundra
#

You have to type in computer installed font names manually @cobalt laurel ๐Ÿ˜ƒ

rugged rapids
#

Steps to use a custom font:

  1. Install the font on the streaming PC or choose a pre-installed windows font.
  2. In the overlay widget settings, select Text Settings
  3. Enable Custom Font
  4. Type the name of the font as it appears in the windows font directory (This is usually C:\Windows\Fonts)

Note: After installing fonts, the browser and OBS must be restarted for the font to appear.

viral patrol
#

@quick spruce Hi. Please ping me tomorrow, so I will be able to look on your account and investigate it.

sleek panther
#

Hi, I was redirected here since I can't get the TopEventsRotator to work. I've copy-pasted the code in to a custom widget and tried filling out the data on the left panel but nothing shows up. What do?

cobalt laurel
#

@rugged rapids still not working.. I tried that prior

rugged rapids
#

Try to mess around with the name of the font you type in the field on the se overlay manager, like you don't need to input the bold version of the font, you can do this with the settings in the overlay I think.

viral patrol
#

@sleek panther Hi. I am here to help you. I just created that widget on my own account and it worked. If it is possible - please send me Editor link to your account and I will take a look at it, to see what went wrong.

cobalt laurel
#

@rugged rapids sadly its not showing for me ๐Ÿ˜ฆ

#

it works for other fonts but not certain ones for some reason

#

is it because its setup with a different language setting in mind? it works when US keyboard as well

#

nvm.. megaman 2 does work as well.. hmm

rugged rapids
#

can you provide me a download link for a font which is not working, so I can try to implement it myself please?

cobalt laurel
#

sure

#

I tried putting the font name together.. using hyphens and even typing it with or without caps @rugged rapids maybe it's just not compatiple with the font type?

rugged rapids
#

I really don't know why, but I can't get it to work either. Maybe another support has any ideas.

cobalt laurel
#

i hope so ToT I need it for my overlay design

charred tundra
#

it's possible the font is corrupted in a way that makes web-use not possible, are you able to get it to work properly in a regular HTML page on your computer?

cobalt laurel
#

outside of css?

charred tundra
#

with CSS in a local HTML page on your computer

#

just to test whether it's possible in a straightforward format

cobalt laurel
#

i guess it doesnt work... boo... i can use it on custom css with different sources tho.. hm

viral patrol
#

@cobalt laurel Hi! There's a small bug that some of the fonts are not displayed. It's gonna be fixed (but I don't know any ETA on that).

cobalt laurel
#

oh cool.. hope its sooner than later xD @viral patrol thanks for the heads up

pulsar willow
#

nvm ^^^ found it in the title of channel

dense kelp
#

coud be posible to chnage the way that obs.live shows the title of the transmitions?

viral patrol
#

@dense kelp #helpdesk-selive - this would be a channel with perfect people to answer your question

dense kelp
#

ok thx

eternal wyvern
#

I am making a little chat game python script that rewards points via the StreamElements API. However, is it possible to process commands and returned responses directly through the StreamElements bot? I currently have it interfacing with the chat through a testing Twitch account, but it would be great if I could incorporate this directly into StreamElements instead of using a separate "bot" account. Is this possible? Google hasn't been helpful... thanks!

mild cipher
eternal wyvern
#

@mild cipher Thank you so much for your guidance! Canโ€™t wait to implement this!

mellow sparrow
#

Hi all, Just wondering if anyone has a command to replay a clip or say 15 seconds of the stream?

rugged rapids
mellow sparrow
#

@rugged rapids thank you!

crimson mason
#

Hey guys, I was sent here to ask this: Is there a way to get a video widget to play by typing in a !keyword in chat?

charred tundra
#

you'll still have to code it yourself, but the API docs and all that are available in the description and some other helpful resources are in the pins

viral patrol
#

HTML:

<video id="video" playsinline style="opacity:0;width:100%; height:100%"><source id="webm" src="https://URL.to/file.webm" type="video/webm"></video>

JS:

let vid = document.getElementById("video");
window.addEventListener('onEventReceived', function (obj) {
    if (obj.detail.listener !== 'message') return;
    let data = obj.detail.event.data;
    let message = data['text'].toLowerCase();
    if (message==="!playVideo"){
        vid.play();
    }
});

vid
  .on("play", function () {vid.style.opacity = "1";)
  .on("pause ended", function() {vid.style.opacity = "0";)
  .on("playing", function () {vid.style.opacity = "1";);
#

Something like that should work

#

Every user will be able to play video, there are no debouncers nor cooldowns

#

@crimson mason โคด

solid helm
#

@viral patrol Hello. KiwaPlay has send me to you. And I really hope you can help me with a problem. It might be just a small thing, but it would help me alot!

viral patrol
#

Bring it on ๐Ÿ˜‰

#

I hope I can help as well

indigo flume
#

Construct an AI so smart it becomes Skynet cohhEvil

#

seems simple enough

viral patrol
#

typing for long time. I think it actually may be skynet

solid helm
#

I bought some stuff from NerdorDie, some animations and widgets. Everything works fine with StreamElements but one single part. The Eventlist wdget just doesnt show up. All alerts are working properly, but this widget won't. I asked KiwaPlay and she told me, that it is because of it was written for StreamLabs and StreamLabs is using a kind of simplified css code.

#

The new Skynet is called Gerrit ๐Ÿ˜‰

viral patrol
#

Which package do you have?

solid helm
#

Ehm. An alert package? lol I guess I have to check this out first ๐Ÿ˜ƒ Just a second. But to mention this, yes it was an alert package with the event list wdget added

viral patrol
#

But what is the name of that package you have

solid helm
#

alright, just a sec

#

Or some more. Sorry. Uplink is the name of the package

#

When I use it in StreamLabs there is no problem, but I would prefer StreamElements tbh

#

And it's just the eventlist

viral patrol
#

Can you give me editor URL to your channel, so I can do that?

#

Deleted this message. I hope I was the first who clicked this link

indigo flume
#

If you managed to get the invite, then you did ๐Ÿ˜‰

viral patrol
#

Yup. Got it. Webpage was still loading for me

gilded elm
#

Is there a way to ban specific users from using chat commands?

cobalt laurel
#

i hope the custom fonts can be fixed soon ToT

fickle cairn
#

Does anyone know if its possible to make a custom bot command that sends a URL request to some address and returns the results?

charred tundra
#

I use customapi for that @fickle cairn

fickle cairn
#

could you link me to the relevant docs please?

charred tundra
#

just look under the variables in the bot section ๐Ÿ˜ƒ

rocky herald
#

Hey, im making a shop thing for a friends stream, where if you redeem an item you get an item in a minecraft server, everything is finished, but i need to verify that the details entered when redeemed corresponds to a user that is online on the server, dont really know how the variables and stuff works, im fairly new to programming and only language i know is java, so i would appreciate any help ๐Ÿ˜ƒ

young saffron
#

@cobalt laurel were you ever able to get the megaman font to work? I'm trying to use the same font for a client

cobalt laurel
#

nope @young saffron

young saffron
#

@cobalt laurel theres a google font called press start that is also 8 bit and doesn't work. weird

cobalt laurel
#

sadly it isnt the font i wanna use.

normal kestrel
#

Hiย !

static wigeon
#

Did you put your accessToken in the accessToken variable?

normal kestrel
#

yes
but it doesn't try to authenticate

auth is started in onConnect fonction.
So i should connect and then authenticate.
i never go on onConnect fonction. socket.on('connecte', onConnect) is never catch

#

oh โ€ฆ i change my node version, its ok

#

sorry for the noise

static wigeon
#

no worries

unreal glen
#

OAuth doesn't exist yet, right?

mild cipher
#

@unreal glen It's in beta. Let @static wigeon know if you'd like to join and help test!

lost sage
#

streamelements is not importing my streamlabs alert correctly because it is missing features :(
is anyone available to help me do a custom css to fix it?

static wigeon
#

@unreal glen If you could explain your use case I'm sure we could include you in the beta.

unreal glen
#

@static wigeon was planning to do a tool to automatically update commands based on local text files or other sources (like current spotify song) and since I'd release it I'd prefer OAuth to telling the user to copy some long code from the site

#

idk if that's in ground control already cause it's not available on linux

idle bobcat
#

Does anyone know what the JS code for the top sub gifter "type" is? I'm adjusting a widget made by @viral patrol and I can't seem to find it anywhere.

viral patrol
#

@idle bobcat It is subscriber-alltime-gifter

idle bobcat
#

Ur tha goat. Is there a list of these commands written somewhere?

viral patrol
reef granite
#

Is there a "separator" or "fieldset" available for the field json in custom widgets? Would be nice to organize things a little more when settings get a little unruly.

viral patrol
#

There's none of them ATM.

reef granite
#

Strangely, if I create a new json field, the "value" isn't being set as default in my widget. It's just blank on the settings pane until I fill it in. Is this a known issue?

viral patrol
#

It is being fixed soon to populate default values

reef granite
#

Gotcha. Thanks.

marsh fossil
#

Hi, im new to Javascript, im just curious what the time is set to, is it ms? on a function like this:

#

timer = setTimeout( function() {
$('#last_sub').removeClass('play left');
}, 20000 );
}

mild cipher
#

The delay for setTimeout is in milliseconds, yes.

marsh fossil
#

Great thank you.

simple jay
#

Quick Question to Custom Widget! When i add a default Widget, i always seem to have a missing field being loaded.

This happens both on my custom one and the default it loads when adding to the scene!

What could be the cause for this?

naive flume
#

Would it be possible to get an API for a most recent instagram post?

charred tundra
#

if you're set up to use the Instagram API, I don't see why not

naive flume
#

where can I find that @charred tundra ?

charred tundra
#

looks like they're deprecating that one so follow the link to the new version

naive flume
#

hm, is there already an API set up for it?

charred tundra
#

yes, right up there. you'll have to follow Instagram API tutorials to figure out how to pull in the latest image from a particular feed. try Googling a bit to see if you can find any code that already exists.

naive flume
#

gotcha, thanks much man ๐Ÿ˜ƒ If i have any further questions mind if I pm you?

charred tundra
#

you can but for the best help it's best if you post here, I work a lot and have a ton of travel coming up so I won't always be able to get back to you

#

if you share here at least someone else might be able to pitch in ๐Ÿ˜ƒ

oblique trellis
#

does anyone know if there are open source alerts anywhere of chatting alerts? IE Vip has returned to chat for the first time on stream, an alert pops up on stream? There is a pay per month app on stream labs that I want to replicate, as i think all coding should be open source. if anyone has clues lemme know

reef granite
#

is it possible to do a !shoutout command that automatically shouts out the last person who raided/hosted instead of needing to type a name as well?

viral patrol
#

I think I would do that even more automatically. Via chat alerts module. So after raid shootout would be automatically

acoustic olive
#

I was hoping someone here could help me. I have !addquote working and saving the quotes to http://twitch.center/customapi/addquote I was wondering whaty I need to change the url to so streamelements will return a random quote from that list

charred tundra
#

do you have the API docs for that service?

#

I had a look at the main homepage and I'm not seeing a quotes area

acoustic olive
#

I have been given editor status to try fix some of the command issues on someone elses channel so I wont have access to everything....

charred tundra
#

right, but I'm just looking for the documentation so I could figure out how to get you the quotes returned

#

it's not a StreamElements API so I have nothing to work with otherwise ๐Ÿ˜‰

acoustic olive
#

does that help?

charred tundra
#

kind of hold on you should remove your token from that message though for the future

#

safety-wise

#

either delete it or edit the message

acoustic olive
#

okay....

#

lets see what I can get out of it

#

thanks ๐Ÿ˜„

charred tundra
#

good luck! if you can find documentation for the API you'll get much farther ๐Ÿ˜„

mild cipher
#

@acoustic olive in case you haven't found it yet, the guide for that customapi can be found here: https://community.nightdev.com/t/customapi-quote-system/7871

The link to generate the URLs/tokens produces two different tokens, one for getting a quote from the list, and one for adding/removing quotes. I'm not 100% sure if there's a way to retrieve the former from the latter, if you've lost said token :/

acoustic olive
#

@mild cipher I am still trying to work it out... I will definately give that guide a read.

#

Thank you !!

charred tundra
#

heya @acoustic olive so since I don't use this API, @rugged rapids helped me understand how they use it, and I have now drafted up some StreamElement specific docs for this based on the commands that work for them in their stream (...incoming!)

#

===== Unofficial StreamElement Command Docs for Twitch.Center Quote API =====

Visit this link to generate your tokens: https://twitch.center/customapi/quote/generate

DISPLAYTOKEN = Your API's display token (this is the shorter token)
EDITTOKEN = Your API's edit token (this is the longer token)

You can access your quote list at https://twitch.center/customapi/quote/list?token=DISPLAYTOKEN

## Return a Random Quote ##

USAGE: !quote

RETURN VALUE:

${customapi.http://twitch.center/customapi/quote?token=DISPLAYTOKEN&no_id=1}

Note: You can remove &no_id=1 if you would like returned values to be numbered.

## Return a Specific Quote ##

USAGE: !findquote 1

RETURN VALUE:

${customapi.http://twitch.center/customapi/quote?token=DISPLAYTOKEN&data=${1}&no_id=1}

Note: You can use quote numbers or words to search for specific quotes. Example, !findquote crazy frog would also work.

## Add a Quote ##

Known issue: Especially long quotes get cut off when added via chat.

USAGE: !addquote Your quote content here.

RETURN VALUE:

${customapi.http://twitch.center/customapi/addquote?token=EDITTOKEN&data=${1:}}

## Delete a Quote ##

USAGE: !delquote 1

RETURN VALUE:

${customapi.http://twitch.center/customapi/delquote?token=EDITTOKEN&data=${1:}}

Note: You can delete ALL quotes by adding &clear=1 to the end of the call.


For your own research you can also refer to the Nightbot documentation of this API https://community.nightdev.com/t/customapi-quote-system/7871

indigo flume
#

@mild cipher Didn't you had a quote api endpoint on your API?

acoustic olive
#

Wow thats exactly what I need I think. going to start testing it now !!

indigo flume
rugged rapids
#

you might want to make at least the !delquote 1 and !addquote for moderators.

mild cipher
#

@indigo flume I think you're thinking of the multi command? ๐Ÿค” SE already has a quote system, but it's nice to have more options parrot

indigo flume
#

Our quote command is barebones to be honest PepeLaugh

#

but Benno reminded me that you had the pastebin end point

viral patrol
#

It was Quote API for Read Only purposes

indigo flume
#

which is close, but doesn't allow adding new quotes via commands.

viral patrol
#

๐Ÿ˜‰

rugged rapids
#

note that there might be an issue when adding quotes via chat, cause it is somehow restiricted in length. You can also add them by making a url with the quote and just put it in your browser and send it "away". In the browser no ; allowed.

mild cipher
#

Ahh right, I see now lol

#

Ah you should probably add a queryencode to that data param so stuff doesn't break it?

charred tundra
#

someone could probably test it to figure out character count limits but I have used all my time for the day writing the docs ๐Ÿ˜›

indigo flume
#

character count limit on our side or the API's side?

charred tundra
#

the API, I'm guessing ยฏ_(ใƒ„)_/ยฏ

#

or possibly Twitch chat limitations

indigo flume
#

Twitch Chat message character limit: 499
Streamelements chat message character limit: 450 (if above 450, the bot replies with a 2nd reply)

rugged rapids
#

no, not the API I think. cause with adding it just via the urlit is fine, it has to be twitch or SE. ๐Ÿค”

indigo flume
#

for the API, you might have to 'count' the ${customapi} variable and the link, so 499 minus those character xd

mild cipher
#

It could be non-URL-safe characters cutting off the message. &data=${queryencode ${1:}} should help that

#

That was a real pain to type on mobile PepeHands

charred tundra
#

if someone wants to test it out and it works I can update the docs ๐Ÿ˜„ again I am in no position to be testing things at the moment

indigo flume
#

You don't know true pain until you write html/css/js in code quote like @viral patrol did some months ago FeelsPeakMan

#

i also tried it and gave up on answering

mild cipher
#

Are you sure he didn't just copypasta it from a different IDE? bloblul

indigo flume
#

while doing BBQ and being on the phone? thonking

viral patrol
#

@mild cipher I am beyond that. Wrote my own environment to be able to use IDE. This helped me a lot

real dune
#

big brain smarty pants, i call upon your smartiness. i have this custom widget that shows day/date/time in one of my scenes. it works fine apart from one issue.

the way the widget works is the current day is highlighted in red.
the issue is on sunday the widget goes forward to the next week however it doesnt show the sunday.

if i put the code here could someone take a look to see if there is a way to change the day the widget changes? ta SEheart

charred tundra
#

Feel free to share, if I have a bit of time tomorrow Iโ€™ll take a peek!

real dune
charred tundra
#

I wish whoever wrote this added some comment documentation NotLikeThis Iโ€™ll definitely have to wait till I can touch the code

marsh fossil
#

Could someone help, im learning how to edit this code (slowly) but i cant seem to prevent a 20 second delay when i load up OBS before it starts displaying. I've been playing with the times and the intervals are correct its just this wierd start up/delay which i cant figure out.

#

as soon as i open obs i need it to display the first follower. (its out of sync with the graphics ive made else).

strange dagger
#

I switched from SLOBS to SE. Imported my alerts as instructed. All of the imported alerts, except the Tips, work and appear as expected when I test the newly imported alert box. How do I fix it so the tips will appear as expected?

quartz gull
#

hmmm alerts seem to have been stopped working since yesterday

zenith folioBOT
quartz gull
#

dont work live or in editor at all

#

sec

#

nope dont work at all :/

real dune
#

Try make a new blank overlay and adding the alert widget

quartz gull
#

one old one worked but not the one I am using as the main one. not sure why it doesnt work. did something change on the custim widget?

#

custom*

real dune
#

Is it a custom widget you are using for your alerts?

quartz gull
#

yes, with code that worked yesterday

real dune
#

Copy the code (not the widget) over to the new overlay and give it a test

quartz gull
#

didnt work :/... hmm

charred tundra
#

I had the same issue today, streamed way longer than expected so pretty worn out but gonna dig around soon. Code that's worked just fine suddenly didn't trigger for events today, emulated or live.

quartz gull
#

same for me, I checked the debug console and it seems to get the events but not trigger any of the code

mild cipher
#

I'm glad I'm not the only one getting issues with custom widgets today, none of the message events have been coming through ๐Ÿ˜ฆ I've tried both FF and Chrome but nada

quartz gull
#

omg if @mild cipher have issues then there is a a real problem

mild cipher
#

You flatter me sir

quartz gull
#

not at all ๐Ÿ˜ƒ

viral patrol
#

Huh. I was checking messages and they worked for me. No cannot read postMessage property of null errors

sharp island
#

Just chat messages have problems?

mild cipher
#

Not sure. Tried messages again and still nope ๐Ÿ˜ฆ was working fine yesterday. Haven't really been using events today, but just added a fresh custom widget and sent a test event and nothing happened either Thinktastic

quartz gull
#

well the alert console log triggers the correct event but the alert doesnt show at all, not in editor and not live, no clue what the problem is. also same as thefyrewire

sharp island
#

on it

#

I found the hamster and put it back in the wheel

#

If you reload the overlay, it should work now

mild cipher
#

Awesome, works again pkingSuperHype

sharp island
#

@quartz gull give it a shot

#

Ditto @charred tundra and @viral patrol

quartz gull
#

yes works, ty โค

viral patrol
#

Yup. Custom Widget receives events now. You're da man.

charred tundra
#

Sounds like it works!! Will test when Iโ€™m at my computer again mischaHype

charred tundra
#

looks good for me!! thanks for the fast help ๐Ÿ˜ƒ

mild cipher
#

Oof, I think something happened to the docs

charred tundra
#

looks like SSL is expired?

#

or something, it redirected while I was away and now it looks right

mild cipher
#

Ah, all good now ๐Ÿ‘€

final talon
#

I was wondering if I can create a !clip command using API. Need help.

charred tundra
#

I don't know if that's possible with the SE API ๐Ÿค”

mild cipher
final talon
#

ok

fringe nebula
#

how do you put text over the video in alertbox custom css? do I need to have the text & video under the same container or is there another better way? I'd like to keep the text centered horizontally, but be able to adjust the vertical placement.

viral patrol
#

Hi. To put text over a video you need two divs with same position and different z-indexes.

fringe nebula
#

@viral patrol Could you give me an example how to write that in html/css?

viral patrol
#

I think that easiest way to do that is to not use custom CSS if text is not styled totally customized way. You can use default alertbox and position text.

#

For example:

#

And you should be fine to go with that

#

And if you insist on custom CSS. Hold on a second

#

HTML:

      <video id="video" width=100% height=100% autoplay volume="{{videoVolume}}">
        <source src="{{video}}" type="video/webm">
      </video>
    <div id="text">
        <div id="announcement">{{announcement}}</div>
        <div id="message">{{message}}</div>
    </div>

CSS

#video{
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: -5;
}

#text{
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
}
#

Something like that

fringe nebula
#

Ok thanks.

real dune
#

any coding gurus that could help me quick? im looking to get 3 separate counters here. when i change the code to get the second counter the 0 in the first position will disappear SEheart

charred tundra
#

@real dune not related to this issue, but IDK if you've also gotten your calendar issue sorted, I haven't forgotten it I've just been swamped! I'm off to TC EU in the morning so probably won't get to it this weekend but will try to look at it sometime next week

real dune
#

no worries bud, theres no rush with that : )

#

im just getting things sorted for upcoming streams down the line : )

charred tundra
#

okay cool ๐Ÿ˜„

#

also for this one I feel like there may be a same-named DIV somewhere, do you have the link to the whole thing? if it's simple like that it's a quick fix, if it's like the calendar with complex math then not so fast ๐Ÿ˜›

real dune
#

ive gone through and set names for all 3, but i will give link and code : )

#

you can upload these codes into the respective fields

charred tundra
#

okay I might not be able to fix it at the moment as quickly as I was hoping but it's definitely something in the JavaScript, I think the storage/rendering is a bit off

real dune
#

no worries, i will continue to press random buttons ๐Ÿ˜

charred tundra
#

๐Ÿ˜„

#

definitely the var store keeps being overwritten

real dune
#

fixed one issues, created another one : )

charred tundra
#

haha oh no

#

this is almost working

function counter(state = 0, action) {
  switch (action.type) {
    case 'INCREMENT':
      return state + 1;
    case 'DECREMENT':
      return state - 1;
    case 'RESET':
      return 0;      
    default:
      return state;
  }
}

function render(id) {
  document.querySelector(id).innerText = store1.getState();
}
function render2(id) {
  document.querySelector(id).innerText = store2.getState();
}
function render3(id) {
  document.querySelector(id).innerText = store3.getState();
}

var store1 = Redux.createStore(counter);
var store2 = Redux.createStore(counter);
var store3 = Redux.createStore(counter);

store1.subscribe(render('#counter'));
store2.subscribe(render2('#counter2'));
store3.subscribe(render3('#counter3'));
render();

document.querySelector('#increment').addEventListener('click', function(){
  store1.dispatch({ type:'INCREMENT' })
});

document.querySelector('#decrement').addEventListener('click', function(){
  store1.dispatch({ type:'DECREMENT' })
});

document.querySelector('#reset').addEventListener('click', function(){
  store1.dispatch({ type:'RESET' })
});

document.querySelector('#increment2').addEventListener('click', function(){
  store2.dispatch({ type:'INCREMENT' })
});

document.querySelector('#decrement2').addEventListener('click', function(){
  store2.dispatch({ type:'DECREMENT' })
});

document.querySelector('#reset2').addEventListener('click', function(){
  store2.dispatch({ type:'RESET' })
});

document.querySelector('#increment3').addEventListener('click', function(){
  store3.dispatch({ type:'INCREMENT' })
});

document.querySelector('#decrement3').addEventListener('click', function(){
  store3.dispatch({ type:'DECREMENT' })
});

document.querySelector('#reset3').addEventListener('click', function(){
  store3.dispatch({ type:'RESET' })
});
#

just to share before I go to bed

real dune
#

this is where im at. i got the displays working but only 1 set of buttons working : (

#

who ever made coding this hard needs a slap

charred tundra
#

woooohoo your code with updated store variables works

real dune
#

YOU BEAUTIFUL PERSON

#

thank you buddy, much appreciated

real dune
#

and with a simple "interact" i can now update them on obs. thank you @charred tundra xx

alpine gale
#

Is there a branding/press kit available?
EDIT: Found it ๐Ÿ˜ƒ

pulsar willow
#

obs live for youtube

viral patrol
#

@pulsar willow Unfortunately there's no OBS.Live for youtube yet.

sleek panther
#

I can't find the key for latest person to gift a sub anywhere. data["subscriber-gifted-latest"] is the latest person to receive a gifted sub but can't find one for the latest to gift a sub. and "subscriber-gifter-latest" didn't work.

rugged rapids
#

data["subscriber-alltime-gifter"] an array of data["subscriber-alltime-gifter"]["name"]" - Name of latest gifter data["subscriber-alltime-gifter"]["amount"] - Number of gifted subs data["subscriber-gifted-latest"] an array of data["subscriber-gifted-latest"]["name"]" - Name of latest gifter data["subscriber-gifted-latest"]["amount"] - Number of gifted subs data["subscriber-gifted-session"]["count"] - Number of gifted subs during session

idle bobcat
#

Yeah, we saw this ^^ but both of those are wrong. The first shows the the name of the all time highest gifter, the second shows the name of the lasted receiver of a gifted sub. Neither shows the latest gifter

#

and subscriber-gifter-latest doesn't work

sleek panther
#

hypothetically, if ["subscriber-gifted-latest"]["name"] were to be the one we're looking for. How would one go about implementing that in a line that is currently:
type: "tip-alltime-top-donation",
would this work?
type: "subscriber-gifted-latest", "name",

idle bobcat
#

Still shows the latest receiver, not the sender

viral patrol
#

Just checked that, there's no sender of latest gift

idle bobcat
#

That's what I thought, Thanks for the help

mild cipher
#

Doesn't subscriber-gifted-latest contain a message like "<latest-gifter> gifted a Tier 1 sub to <recipient>! They have given X Gift Subs in the channel!"? What if you just split off the first word of the message, which would be the name of the latest gifter?

const latestGifter = obj.detail.session.data['subscriber-gifted-latest'].message.split(' ')[0];
viral patrol
#

That's a great idea!

mild cipher
#

Pog @sleek panther @idle bobcat see if it works for your needs!

strong root
#

Is the sharing for YouTube overlays bugged on import or is the link different than the Twitch one?

#

I know you can't share cross platform, but is the link format the same?

real dune
#

what sharing link are you talking about? is it the link for giving access?

strong root
#

No. When you create an overlay set and share it with others

#

I'm converting our packs over from SL to be fully functional with SE. The Twitch share works flawlessly. The YouTube one just sends me in a loop.

#

NVM. That's where people are actively sharing. LUL

real dune
#

hmmm, the 2 most un-user friendly things, SL and YT...

if its just a loading loop maybe clear the cache and close chrome, reopen and try again, making sure you have both SE and SL windows open and logged in.

strong root
#

Just to clarify, this is sharing from one SE account to another SE account

viral patrol
#

Hello there ๐Ÿ˜‰

#

Overlay share is platform specific

strong root
#

Correct

viral patrol
#

Just because there is other widget set for both of them

strong root
#

This is from a YouTube SE share link to another YouTube SE account

viral patrol
#

Huh. I think it should work without any issues.

#

Let me check for one of your links ๐Ÿ˜‰

mild cipher
#

@chrome violet I think you can do something like $(count $(sender)) if you want a counter to track by the person using the command

idle bobcat
#

@mild cipher That's a cool idea. Where would that code go in the JS? I just tried adding it and it broke the whole thing, haha

#

With the latest gifted sender, that is

chrome violet
#

@mild cipher, in the example, I would be trying to count the person who is being punched. I would like to everyone to be able to use the command on another user's name in chat.

#

Thank you for also replying, ๐Ÿ˜„ @mild cipher

mild cipher
#

@idle bobcat are you using the custom widget? Depending how you have it set up, it would probably go inside the onWidgetLoad event

#

If you get stuck, DM me the set up and I can probably advise better smile1 || I tried to message yesterday and failed miserably lol ||

#

@chrome violet in that case use $(1) instead, which captures the first word after the command, so something like

!cmd add !punch $(sender) punched $(1) $(count $(1)) times!

thefyrewire punched StreamElements 5 times!
thefyrewire punched StreamElements 6 times!
thefyrewire punched H4MSt4H 3 times!
thefyrewire punched H4MSt4H 4 times!

should do the trick

#

Keep in mind that it'll keep count of anything after the command, including non-usernames

#

Also something to bear in mind is that the count is then tied to the username or word. So !punch death might accidentally increment the death counter if the name of your death counter is death. It also means if you're planning to have similar commands in the future you need to make a new counter name that tracks by user

#

Just about to eat something but I'll be back, there's something I want to try

mild cipher
#

Okay, back smile1 I think I worked something out. This might look monkaSS but stick with me, it mitigates the problems I mentioned earlier.

!cmd edit !punch $(1) has been punched $(count  $(customapi.https://api.thefyrewire.com/twitch/pastebin/6aKRWbRj?target=$(1)&args=punch)) times!

The problem with using $(count $(1)) is that anyone who knows the name of a counter can easily mess with it, so we need something a hardcoded prefix like punch_thefyrewire. Unfortunately the counter doesn't seem to like punch_$(1) and doesn't parse it properly.

The workaround is getting the parsed counter name via a customapi. The paste is here: https://pastebin.com/6aKRWbRj - you don't need to make your own, and it should work for anyone else wanting to use the same setup.

It essentially returns this: punch/thefyrewire, which is then used as the counter name. If I do !punch H4MST4H, the counter name becomes punch/H4MST4H, and so on. This should ensure none of your other counters are triggered.

It also means you can easily duplicate the command and change the identifier, which gives you an entirely new set of individual user/word-tracked counters. i.e. I copy-pasted it and made a new hug command, because hugging > punching MiniK

To clarify, if you want to make a new set, just change args=punch to something else, e.g. args=hug

Hope that helped!

chrome violet
#

Thank you so much, @mild cipher! I'm getting ready for work, and can't play with it now, but I'll play with it as soon as I get there and have a moment! I highly appreciate your help.

muted dagger
#

Any dev here have the Predator overlay from NoD? I would ask for a help to transfer everything that i bought to StreamElements if there's is someone that could help, would help me so much <3
Gonna just tag @viral patrol in case that he have it already

muted dagger
#

Holy the alerts import seems to work perfectly, need to test just more thing to have sure, but if it is, i would just ask for help about chatbox i think

narrow belfry
viral patrol
#

Yup. This is it. I think it should be in documentation

narrow belfry
#

No, I canโ€™t find it there

#

Nah, canโ€™t be it. I donโ€™t get it

viral patrol
#

Channel is channel ID not a channel name

#

And for that endpoint you need to use authorization header

narrow belfry
#

Yeah

muted dagger
#

Guys there's any method to do a custom merch alert? Can't find D:

charred tundra
#

I think you could probably do one using a custom widget, but mobile wonโ€™t let me click or view the reference link in the channel description so I canโ€™t easily check anneThinking

muted dagger
#

Hm, i got the code that is on SL, maybe need some adjust to work on SE?

charred tundra
#

Oh yeah if youโ€™re just copy pasting youโ€™ll want to go through and figure out what needs to get updated

muted dagger
#

Oh i don't know that much to update the code, but thank you anne, gonna see if someone can help me later

#

Maybe the timezone isn't good right now

charred tundra
#

Yeah and right now is TwitchCon EU so a lot of the team is very busy with that ๐Ÿ˜ƒ

muted dagger
#

Oh I see, no problem I can wait :D

mellow sparrow
#

Hi. Is there anyone to set a sub goal counter for each day? When I look at the widgets, it only gives me a total subs for my channel where I want to it to be for a 24 hour and like 5 for the day so would look like Sub Goal today : 1/5 with the one incrementing every time someone subscribes!

charred tundra
#

You can reset your goal data before starting stream under Data > Goals @mellow sparrow

viral patrol
#

Also there's custom widget where you can set goals over periods (like session, week, month)

#

@muted dagger Unfortunately only automated conversion from SL is available ATM. I haven't seen Chat widget from that package, so I don't know how long can it take to convert it to SE.

muted dagger
#

@viral patrol Oh if you need anything i'll be glad to sent you anything that you want, there's some things that can be really useful, the Chatbox and Goal Widgets that are pretty nice and beautiful, so just if you have some time and wanna convert, I'm here to send you anything that you need :)

narrow belfry
#

oh well... The documentation looks 1 million times better on desktop, was on my phone before...

restive prism
#

is there way to state a quote, then delete that same quote?

rugged rapids
#

you can use !quote <nr> to state the quote and !quote remove <nr> to delete the quote

restive prism
#

so, i need to be able to get a random quote, and remove that random quote at the same time.

rugged rapids
#

you can type in !quote to get a random quote and then use !quote remove <nr> to remove the quote. Both in one command is not possible atm.

restive prism
#

damn

#

im assuming i need to edit "DISPLAYTOKEN" to something?

rugged rapids
#

I think you can't set this in the command response. You can get the display token from the link described at the very beginning of the guide.

restive prism
#

@rugged rapids thanks, didnt read

vale fossil
#

so i bought theses custom alerts and there from movegraph there not working at all on my obs.live how can i get my custom stuff to work

#

?

rugged rapids
#

As soon as someone has time, he/she'll answer you.

vale fossil
#

yup well i hope a pm will be sent

rugged rapids
#

Most likely you will get a ping here in this channel.

rugged rapids
#

^user left the server.

muted dagger
#

It's a custom CSS

#

I really don't know where to look, tried to found something in the code about 'text' or 'message' but no success

torn kiln
#

Hey boys, is oauth via API still wip? Wondering if there's any eta for it, I'd love to have automated way to get users' JWT tokens ๐Ÿ˜ฆ

low sierra
#

It's in testing at the moment. @static wigeon may be able to give you early access

torn kiln
#

Oh I would love to give it a spin!

muted dagger
#

Any good soul to help me remove that text or just move it a little bit?

#

It's a CSS code btw

rugged rapids
#

I can try to have a look, but can't promise you to solve the issue.

viral patrol
#

Check HTML part for {{userMessage}} and just remove it

#

It should disappear then

muted dagger
#

Lol sorry for the late answer, gonna check this <3

#

@rugged rapids lx always being a god helping me, but thank you so much for your kindness too <3

rugged rapids
#

lx is just the best! SEheart you are welcome.

pulsar willow
#

Hi! I'm having problems setting up my custom alerts! I've setup the .html file putting in it a webm video but the text is not displayed.. what am I doing wrong?

viral patrol
#

@pulsar willow Can you paste your HTML code please?

#

I think that your text is appearing, but below video. And video is 100% of container height, so text is displayed, but out of a container

pulsar willow
#

Yes the video is up the text 100% but the video duration is 5 secs and the alert durations is 7 secs so, when the video get hide I should see the text..

#

Seems like added the css for "video" following the link you sent, the text appear correctly

pulsar willow
#

Is it possible to add gradient as color fo the text and also a stroke to the text too? I know that is possible using in css.. Wondering if your stuff support this.

viral patrol
#

Custom CSS Editor is working with all CSS directives, so you can add gradient, text stroke and so on

static wigeon
#

@torn kiln send me a DM and weโ€™ll sort it out later today.

#

Iโ€™m currently traveling home from twitchcon.

pulsar willow
#

HTML

<div class="text-container">
    <video id="video" width=100% height=100% autoplay volume="{{videoVolume}}">
        <source src="{{video}}" type="video/webm">
      </video>
    <div class="awsome-text-container">
        <span id="username-container"></span>
      </div>
</div>

CSS

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }

  71.40% {
    opacity: 0;
  }
  
  74.00% {
    opacity: 1;
  }
  
  97.61% {
    opacity: 1;
  }
  
  99% {
    opacity: 0;
  }
  
  100% {
    opacity: 0;
  }
}

.image-container {
    margin: auto;
    display: table;
      position: static;
}

.text-container{
    text-align: center;
    margin: auto;
    position: absolute;
}

.awsome-text-container {
      text-align: center;
    position: absolute;
    animation-name: fadeInOut;
      animation-delay: 0s;
      animation-duration: 7.00s;
      top: 20%;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
}

.awsome-text-container span{
    text-transform: uppercase;
      /*gradient*/
      background: linear-gradient(180deg, #0685ff 0%, #022fa2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
      /*outline*/
      -webkit-text-stroke-width: 2.5px;
    -webkit-text-stroke-color: white;
      /*font desc*/
    font-size: 100px;
      font-family: 'Funhouse', sans-serif;
}

JS

const name = '{{name}}';
const userNameContainer = document.querySelector('#username-container');
userNameContainer.innerHTML = name
#

is someone able to tell me why the follower name is not showing up?

pulsar willow
#

please?

viral patrol
#

It is displayed but like I said before - out of view.

#

This is your code

#

And as you can see, there is div with proper name, but you need to position it correctly

pulsar willow
#

@viral patrol

.text-container{
    text-align: center;
    margin: auto;
    position: static;
}

isn't this enough? obv not but why?

charred tundra
#

Youโ€™ll want position absolute and look up how to center those kinds of elements, if this was about centering on top of the other thing

viral patrol
#

Position static places text under video

#

And video is set to 100%

#

So it is out of the box

#

Use snippet I have you earlier and adjust it to your needs

restive axle
#

Hello, i've got some problems with my custom widget for the last follower. Custom widgt because i wanted to add custom css to the last follower name. My problem is that it shows the correct last follower name in the web but not in my OBS when import the overlay as Browser source. It displays another pseudo. Why is that ? Can somebody help me please. I'm running out of ideas to fix it

charred tundra
#

Have you made sure to save the changes?

restive axle
#

Yes. I can see the overlay reseting on my OBS when i'm saving it but still.. it shows a value different from what I see on streamelements.com

pulsar willow
pulsar willow
#

anybody?

pulsar willow
#

please?

muted dagger
#

Hello, any good soul can tell me if this would be the path to change the color of my alerts message?

#alert-user-message {
  width: 600px;
  position: absolute;
  bottom: -80px;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  text-shadow: 0px 0px 1px #000, 0px 0px 2px #000, 0px 0px 3px #000, 0px 0px 4px #000, 0px 0px 5px #000;
}```
indigo flume
#

i don't see css color: red;

muted dagger
#

Oh should have something like this that you sent on the code? Maybe i'm lost haha

indigo flume
#

well unless there is a global ID that handles the color of the text

#

i onlysee the text-shadow being adjusted

muted dagger
#

Ohh gonna se if there's some global ID too i forgot that

#
:root {
  --accentColor: #E39D3D;
  --shapeMainColor: #FFFFFF;
  
  --introTextColor: #FFFFFF;
  --introTopSize: 50px;
  --introBotSize: 50px;
  
  --nameBarBg: #2e302d;
  --nameBarHighlight: #40433e;
  --nameBarTextColor: #FFF;
  --nameBarFontSize: 50px;
  --shiftText: -2px;
  
  --shapeScale: calc(100 * .01);
  
  --floatingOffset: -100px;
}```
#

Maybe here Hm

rugged rapids
#

there are some global color variables like --nameBarTextColor: #FFF

#

but I think no color is set for the root element,

muted dagger
#

Yeah my background is black, and the message is black too, that's why i'm having a little conflict to find on the code haha

rugged rapids
#

can you send me the whole CSS code via PM please, so I can try to take a look.

muted dagger
#

Sure

muted dagger
#

@indigo flume we already fixed the problem, was really about that what you told about the color: #XXX; thank you so much <3

indigo flume
night coral
mortal wagon
#

Has the way tips are pulled from the system changed recently (not sure how long my widgets been broke) but its updating subs but not tips ?

rugged rapids
#

@mortal wagon Haven't noticed any change.

mortal wagon
#

hmmm well iv not touched anything and the "tip" side of things broke ๐Ÿ˜ฆ

#

it ok its KeiZars widget he coded for me so ill let him look just wanted to know if anything was recently changed, Iv let him know its broken anyway ๐Ÿ˜„

cobalt laurel
#

nooo my font isnt working still

strong orchid
#

hi, im using the marathon timer from the widget share and while testing ive noticed when a community sub comes in its adding time for the gifter aswell as the amount of subs gifted. is there a way to determine if the sub is a community sub? thanks

viral patrol
strong orchid
#

nice thanks

cobalt laurel
#

So does the overlay editor not take bitmap style custom fonts?

magic flare
#

May I add a comment on StreamElements and OBS

raven orchid
#

im trying to stream with stream elements obs and i want it to stream the game on my xbox HELP

vapid iron
barren oriole
#

Is there a way to transfer my Muxy alerts to StreamElements?

indigo flume
#

this is what I see in the dev console

#

With this error attached to it

#

So I think its actually breaking when trying to process the {{message}} as it provides the cheer emotes

final zinc
#

Yeah

#

Exactly

#

Because it would work in Muxy via their internal {bit_image} iirc

#

So if I can find something similar for SE, or perhaps bypass it, it'd be cool

indigo flume
#

So far it seems that the {{rawMessage}} allows the alert to show, but not the text it self.

final zinc
#

Right

indigo flume
#

ooh wait

#

im an idiot

#

its {{messageRaw}} not the other way around

#

let me try

final zinc
#

It works

#

lol

indigo flume
#

yea there we go

#

but it makes the cheeremotes as pure text

final zinc
#

Now, the emotes showing up in the text, since it's now a plain raw text

indigo flume
#

So heres the thing

#

You see how both brackets are different colored?

final zinc
#

Yea, it means something isn't proper

indigo flume
#

There is an extra " somewhere with the {{message}} that is breaking the string

#

Remember to provide proper styling for .alertbox-message-emote class

#

I think this is very important and that might be actually breaking the message

final zinc
#

Definitely sounds like it

#

So I'm missing that

indigo flume
#

Seems plausible to me

#

Any changes I've made to the code I've not saved.

#

So for now, good luck PepeLaugh

#

I don't want to bust your code to be honest

final zinc
#

Oh, feel free to save em

#

I have them backed up

#

That way I can just work off what you made

indigo flume
#

I just made test change to the string: ["{{message}}"] and tried to add an additional quote or escape characters

#

but it didn't help much, so in the end I think you need to try and style the .alertbox-message-emote PepeLaugh

final zinc
#

Gotcha, I'll see what I can do lol

#

Oh boy

#

Thanks for the help!

indigo flume
#

maybe force show it with visibilty: show or how ever was that thing

final zinc
#

Yeah, I'll have to see if I can deal with it later. My tired brain is making it hard to focus lol. Thanks again for the help @indigo flume

indigo flume
#

Sure

muted dagger
#

Just coming here to say thank you very much to @rugged rapids for all the help and the patience to help me with a lot of things, you're amazing man, hope that you have great things on your life because do this quality of support that you did for me, is the least that i can wish to you, would like to tag @viral patrol too, two great guys that i want to highlight here, thank you <3

#

And sorry if i wrote something wrong, trying to get better on my english <3

viral patrol
#

No worries Pain, I ensure you that you were not a pain for us ๐Ÿ˜‰

muted dagger
#

Haha <3

static wigeon
elder wolf
#

Wonder: Is it possible to get watchtime via the "API" instead? : )

mild cipher
elder wolf
#

Oh... the doc page has been moved...

#

That explain a lot

#

So.. I am guess it is not possible to go by a userid to select their specific as the command does huh? Cheers btw :)

mild cipher
#

Haha yeah if something looks like it went missing or moved, check the channel header in case the link changed again

#

Also I don't think that's a thing sadly. But I don't think there's a limit to the limit parameter, so you could technically return every user, cache and lookup in that

elder wolf
#

Hmm.. so technically I guess I could just get the cached "sub amount" and then use it as the limit to grab all the watchtime of all subs, because that is the only thing I am really interested of ๐Ÿ˜ƒ Yeah I guess that might be working! Cheers @mild cipher

#

Or wait... hmm... that wont really work.. since it would return anyone and not only subs loeyaDERP

#

Okay nope... it would be way too many users to try cache then since the channel is a few million viewers in total I believe

mild cipher
#

Yeah, unfortunately that would be a problem rip For a channel that large it could be worth looking at making your own sub watchtime tracker I guess

simple jay
#

So whatever custom eventlist i create, there is always a empty "Follower" that i can't manage to get rid of. For example, my latest follower "MysteryRat65" should be on top but everytime i reload the source it resets back to that empty one.

Anyone have a idea what could be causing this? Thank you.

simple jay
#

Wait did i post this in the wrong Channel?

viral patrol
simple jay
#

That's the thing, my Latest Follower is not Empty

rugged rapids
#

Is there an empty entry in the followers data list?

simple jay
#

Where is the data list?

rugged rapids
simple jay
#

Only empty thing is Recent Tips

rugged rapids
#

Can you try to delete the name of the latest follower in the latest follower line. Save the changes. reload the page, put the name back in > save changes and open overlay with the event list.

#

Please do not delete the bubble in recent followers.

simple jay
#

Wait a second

#

ร–MFG

#

Can it be that the empty bubble next to Reedster97

rugged rapids
#

Possible, yes.

#

I am not 100% sure on this.

simple jay
#

Yeah...ok

#

that was the issue

#

i cant believe it was rightz in front of me lol

#

Thank you Benno

#

Also lx ๐Ÿ˜ƒ

cobalt laurel
#

whelp. time to see if my fonts work in the editor ๐Ÿ˜„

#

aaand nope....

#

ToT

viral patrol
#

What fonts are not working? I think every font that can be used within chrome should be able to be used without any issues

harsh osprey
#

so @rugged rapids sent me this link https://github.com/StreamElements/widgets/tree/master/UserQueue and directed me to this channel if i had questions. So I understand the code somewhat . I have never added custom code into stream elements. How would I go about this if I wanted to attempt the user queue code in the link? I mod for a streamer and we currently have a queue command through nightbot but we really like stream elements and want to incorporate everything through streamelements so we can just rely on 1 bot instead of multiples

rugged rapids
#

Add a custom widget to your overlay, add the html to the html tab and the .json in the fields. Then reload your overlay and see if it is working.

harsh osprey
#

Okay will do @rugged rapids thanks!!!!

chrome violet
#

Hello! @mild cipher are you around by chance?

#

I guess maybe anyone can answer.. when you make a command that uses a name, is it possible to make the command work by just the spelling of the name and not so much name + character, and or @ added?

mild cipher
#

@chrome violet try using $(channel $(1))

chrome violet
#

You're too dang awesome..... thank you so much!

#

Your command works like a champ!~ ๐Ÿ˜‰ @mild cipher

#

Thank you again for all of your help with it, I 100% appreciate it.

ruby juniper
#

I was wondering if someone could help me I just made an alert using css and js it works fine on the website when testing but as a brower source it only plays the first alert then stops Thank you in advanced

cobalt laurel
#

@viral patrol it was my Custom Fonts that werent working... Turns out I had to do type in the font I wanted to use THEN use CSS edit to change the font to that.... It's weird.

viral patrol
#

If you are using custom code box - you have to set font within it.

cobalt laurel
#

@viral patrol except that the font i use doesnt work

viral patrol
#

Huh. What font are you trying to use and what widget?

cobalt laurel
viral patrol
#

Try to put font name in quotation marks

#

@cobalt laurel โคด

cobalt laurel
#

QUOTATION??! what wizardry is this @viral patrol i will try it out

viral patrol
#

Also you need to install that font on your computer

cobalt laurel
#

of course. I already had it on my computer ๐Ÿ˜ƒ

#

IT WORKS!! THANK YOU @viral patrol

sharp island
#

The reason is that in CSS, the font family property requires font names to be either one word, or surrounded in quotation marks. That's so you can do multiple fonts with fallback (font-family: "megaten 20xx", sans-serif;)

#

The custom font property is just an override to the font-family property

low sierra
terse cloud
#

Quick question. Is there a way to add image containers to custom widgets? Say I design a custom icon for bits and subs, would that be easy to add?

rugged rapids
#

You can add it via html and css I think.

terse cloud
#

Essentially I want to have a last events rotator, that just fades between the last follow, sub, cheer and tip events, with the x{amount}, and a small icon next to each one that I've designed

rugged rapids
#

You can add an image container to the html and fill it within the CSS.

terse cloud
#

Yeah I'm after something a lot simpler

viral patrol
#

You can use variations and create different image for each amount you want to use.

terse cloud
#

I'm looking to create something similar to the last events rotator. I designed this in mind.

I simply want each event to either pop up/fade/rotate in - display the latest user with the variables (either latest follower, donator, cheerer etc) with an icon and the amount of months, tip size, bits number etc.

How difficult would it be to create something like that inside of the custom widget inside of Stream Elements?

I'd love to be able to speak to someone who can either guide me to the correct resources, or who can make it themselves as an example. I'm reaching out here, and I apologise if it's not the correct place or is out of place in general on the Discord

#

Looking at the Last Events rotator, it seems to be going in the right direction, but I have no clue how I'd be able to modify the CSS/HTML to work in my favour

viral patrol
woven field
#

Hi, how can i share a widget i made from custom widgets to my friends without sending them copy/pasted code please ? And also to allow me to update the inital code from the "main source"

viral patrol
#

You cannot autopopulate code to users that are using your widget as they can alter code. You can ask them to add you Editor privileges, so you will be able to edit overlays on their account.

woven field
#

Ok i see, thanks @viral patrol

woven field
#

Hi, does the event listener (from custom widgets) covers stream info changes (title or game) by any chance even if it's delayed ?

low sierra
#

It does not @woven field

slim sphinx
#

Gonna place it here due to being relevant for devs: boys, verify Ideas Login Page Twitter api, i have tried and it says that the token is too old

deft meadow
#

Anyone here to help?

ruby juniper
#

I was wondering if someone could help me. Is there a way to hide an image when an alert starts then show it when itโ€™s finished?

viral patrol
#

You can put that image in custom code and onEventReceived with type you specify just set opacity to 0

ruby juniper
#

Iโ€™m not sure if I follow. So I have an animation using css and I want it over an existing image. But the separate image still shows and I want that image to hide.

#

Thank you for your fast response

viral patrol
#

Oh. You need to use custom widget instead of raw image in case you want to bind any events to it (such as hiding on events)

#

So then you can write a code that will react to events.

ruby juniper
#

How do I add the image within the custom widget? Through url?

rugged rapids
#

I think so.

viral patrol
#

<img src="url"> But if you are not into coding, this can be overwhelming

#

Then you need to do something within JS for example something like that:

window.addEventListener('onEventReceived', function (obj) {
    if (typeof obj.detail.event.itemId !== "undefined") {
        obj.detail.listener = "redemption-latest"
    }
    const listener = obj.detail.listener.split("-")[0];
    
    if (listener==='subscriber'){
    $("img").hide().delay(12000).show();
    }
});
}
#

This should hide image on new subscriber event for 12 seconds.

ruby juniper
#

Thank you for your help I really appreciate it

copper pine
#

i'm trying to import my streamlabs event list into streamelements, what do i have to do in order to make it work?

#

i've tried copying the html/css/js/cutsom fields to no avail

viral patrol
#

Unfortunately conversion of eventlist/chat is more than copy paste of code. You will have to merge it with code we currently provide for eventlist (either version of code that is automatically provided upon creating custom widget or custom event list from our github repository https://github.com/StreamElements/widgets )

next remnant
#

So for the TTS api there is only voice and text that can be sent to the GET request?

#

Where's the SSML option :)

#

also how did the tts api get developed for tts I only know that AWS provides that but the StreamElements API is even more friendly, there is no AWS auth, you can modify it, but there is only text and voice and no other options available :(

narrow belfry
#

hi, am I able to tell the API to send a message in chat?

narrow belfry
rugged rapids
#

The one I linked is an updated version I think.

narrow belfry
#

"https://api.streamelements.com/kappa/v2/bot/" + account + "/say?message=hi"
This seem to be how it should be done but no success

rugged rapids
#

It is not the accout name, it is the account id and the header has to include the bearer token. And the content of this request it an Json object with {"message":"<your message>"}

narrow belfry
#

yeah I sent that

#

okay

#
def sendMessage(message):
    res = requests.post("https://api.streamelements.com/kappa/v2/bot/" + account + "/say?message=hi", headers={"Content-Type":"json", "Authorization": "Bearer " + auth})
    return res.text
#

other endpoints works so the variable account is right

#

is there a body={"message":"hi"}

mild cipher
#

json={"message":"hi"}

narrow belfry
#

Okayy O_o

terse cloud
#

Looking for some assistance on HTML/CSS importing through the custom widget. I want to import a font I have via the head of the HTML and make a <p> text string utilise that font.

It's an icon based font I want to use in conjunction with some normal text. For example {heart icon} {recent follower} -- the recent follower would be in the normal font and the heart icon would be the custom font I would be importing.

I just need some assistance on making sure i'm doing it right

mild cipher
#

How are you doing it atm? smile1

terse cloud
#

Is it possible to chat outside of SE?

#

It's a little convoluted, but essentially I have a link from a website that's hosting the font directly, and it's saying I need to import that into the HTML and give it a class in the HTML referencing the font @mild cipher

#

Never mind I think I did it...

#

But bear with me

#

Nope. As soon as I add another font to the CSS it breaks which is where I'm going wrong

mild cipher
#

(also yes we go to DMs if you prefer)

terse cloud
#

I'll throw you a message

narrow belfry
#

new follower, new sub, new host, new cheer, new donation events?

viral patrol
#

@narrow belfry check pinned message for some details

narrow belfry
#

Does not tell me what events it returns

#

okay found a github page

viral patrol
#

Yup. I didn't include it in this post, but added reference to manual file

noble wagon
#

Hello all, I was having a look through the docs and through the pinned items in this channel, and couldn't figured out the best way to interact with the song request API, is there a way to do this via a web socket? if not is this something I would have to poll?

I'm specifically trying to get the current song.

viral patrol
noble wagon
#

@viral patrol Thank you, is there docs on how to generate the JWT? I'm assuming I shouldn' t be using the one assigned to my user.

I'm currently making an extension and would like to interface with the song-request api, so wouldn't want to the token to be assigned to myself, maybe my application.

mild cipher
#

oauth2 is currently in beta, and songrequest is one of the available scopes. If you would like to request access, I think you can get in touch with @static wigeon

noble wagon
#

Oww that sounds awesome.

strong orchid
#

in the widget data, tip is as 1 decimal place is there a way to change that? as atm a 4.20 donation shows as 4.2

mild cipher
#
data.amount.toFixed(2).replace(/[.,]00$/, "").toLocaleString()
// 4 -> "4"
// 4.2 -> "4.20"
viral patrol
#

Another approach if you want to display it with separators or other locale stuff:

data.amount.toLocaleString("en-US",{style: 'currency',currency:"USD",minimumFractionDigits:data.amount===Math.round(data.amount)?0:2});
// 4 -> "$4"
// 4.2 -> "$4.20"
// 5000 -> "$5,000"

You also replace en-US with your locale, for example Arabic Egypt ar-eg, then 5000=>"ูฅูฌู ู ู ย US$"

arctic zephyr
#

Hi ! Iโ€™m looking to do a custom command with loyalty points like a ยซย taxย ยป. What variable can I use or where I can found variables for loyalty points ?

viral patrol
#

You can find variables in bot commands section of SE Dashboard

clear mesa
#

Afternoon! I recently imported my alerts from streamlabs into streamelements. Every alert is working except my tip alert. I installed the extension through chrome and followed the steps correctly. I tried testing it in the overlay editor as well but nothing is happening. The tip alert does work in the streamlabs program so I have eliminated whether it is the alert itself. Any help would be appreciated.

cobalt laurel
#

is it possible to remove the badges from the twitch chat? or am i missing something?

viral patrol
#

@clear mesa I could take a peek there

#

@cobalt laurel If you are referring to chat widget - I think it is not possible there, but you can achieve that with custom chat widget from our github

clear mesa
#

@viral patrol sorry wasn't on discord on the time of your message. I should be on all day, let me know if you can help me.

#

thanks\

viral patrol
#

Hi. Sure thing. People need sleep and timezones are tricky for us.

mellow sparrow
#

Just checking to see if there is a !queue command at all? To play with viewers where they enter a queue?

little rain
#

I'm interested in learning more about custom apis and using them in commands. I've done some searches and I did come across https://docs.decapi.me/ but I was hoping someone could point me in the right direction of more reading materials.

indigo flume
#

@mellow sparrow check our github linked in the channel description. Theres a queueu command in the main widgets folder

little rain
indigo flume
#

@little rain imo that is the best custom api for twitch chat

#

Our API is not really meant to be used as chat commands. Unless you are building your own chat bot that proccesses the json and says in chat what is needed and properly formatted

little rain
#

yeah, that's the conclusion I came to, just wasn't sure if I'd missed something in terms of like parameters

#

so what exactly is the !song command calling in this case?

indigo flume
#

Current song

little rain
#

Ok so not a variable available for use in custom commands?

indigo flume
little rain
#

hmm I've looked around but can't seem to figure out the values for the query 'provider' - any hints?

indigo flume
#

Asking, hold on.

little rain
#

ty!

indigo flume
#

I think thats the wrong endpoint i gave you. I was sleepy when i looked at the end points.

#

if you are building your own bot for this.

viral patrol
#

Or you can use some MITM script that will get this value, parse it and return a string. for example (sr.php file):

<?php
$channel=$_GET['channel'];
$data=json_decode(file_get_contents('https://api.streamelements.com/kappa/v2/songrequest/'.$channel.'/playing'));
echo $data->title;

Then call this script via ${customapi.http://url.to.script/sr.php?channel=YourChannelId}

#

I think that there are some free php hostings you could use for that

little rain
#

ah lovely, thank you for all your help, this gives me a starting point ๐Ÿ˜ƒ

unreal jungle
indigo flume
#

where is that?

turbid zodiac
#

hhey guyz whats this api need for and what it does??? please โค

rugged rapids
unreal jungle
#

@indigo flume AWS LULW

#

I was deploying some shit earlier LULW

mellow sparrow
#

Hi all, I cant get the queue command to work with the what github code is? Is there something i need to change in the code its self to get it to work?

sharp island
#

So... anybody want to help me test something with the Hype Cup?

cobalt laurel
#

I would if I was home @sharp island

pulsar willow
#

Hello. Why don't !watchtime command work for one of the channels i moderate for, it just says 0 secs watched.

rugged rapids
#

are the loaylty points enabled?

pulsar willow
#

let me check

#

is it the !points command?

rugged rapids
#

The loyalty system has to be enabled, to be able to use the !watchtime.

pulsar willow
#

it's on

#

but when i do the command it says 0 secs watched

#

what is the lotalty system

rugged rapids
pulsar willow
#

oh only that needs to on

#

it's was off now it's on

#

Thank you for the help!

quartz gull
#

cant find the thing I am searching for. Was there a way to get emotes to show up in alerts in customwidget? like the data.message on tips and cheers?

rugged rapids
#

@quartz gull There is a variable {{message}} which will catch the HTML user message attached to event (sub, cheer, tip)

quartz gull
#

even in a custom-widget?

rugged rapids
#

I have just tested it in an custom CSS option of an alert box. I am sorry, I can't provide any info on a custom widget. Maybe another supporter has any ideas.

quartz gull
#

ahh, np. I know someone had some parser for the bits message, but cannot seem to find it when I search ๐Ÿ˜ƒ

rugged rapids
sharp island
#

Sorry, emote parsing is not done automatically in custom-widgets, only in custom alert boxes.

#

Now that we have an SE_API, it's something we can add and is somewhere in our backlog.

quartz gull
#

nice nice

mild cipher
#

@quartz gull Is the parser thing maybe the third message down in the pinned messages? ๐Ÿ˜„

rugged rapids
simple jay
#

Is there a similar toggle like in Streamlabs to Flip the X / Y Axis. For Example in Eventlists?

sharp island
#

There's a rotation feature (which pretty much all widgets can use), and some specific widgets have the ability to control the orientation of the elements.

polar storm
#

I am trying to implement audio commands into my stream. Is there a way to make it work without entering the word !redeem before an actual item name?

rugged rapids
#

You can create a custom command with the variable ${redeem <itemname>}

polar storm
#

@rugged rapids got ya, and is there a way to prevent redemption message from appearing in the chat?

rugged rapids
#

no, there is not.

polar storm
#

Ok, thanks for the help!

mellow sparrow
#

Anyone know how to get the custom user queue working? Do I need to add a Key or anything?

hallow rampart
#

hey how do i stop the stream elements bot posting in my chat whenever they tweet?

twin ore
#

Hey @hallow rampart don't forget you have the super special #dreamteam channel to ask for assistance in. ๐Ÿ˜ƒ

#

But that's the Twitter module in the Modules section of your account. We can disable or edit it if you'd like, or show you how.