#developers
1 messages · Page 6 of 1
are you able to merge that on it's own. I'll have to dig into highlights for pinned message support
#developers message Troy explained what the event-api in the monorepo is
so technically both I guess
is the usage the same as the old one
or a new doc comig out soon?
good question.. I'm not sure. As far as I'm aware, there were some small modifications but it should be pretty much the same right now
it was an in-place replacement yes to reduce server costs
new api will come out later
also who made the new discord icons
they're nice
it was @solemn widget
there you have it, thanks Niklas 
did cors get enabled?
@real sorrel You're working on chatterino7 right?
Can you tell me how do you currently render paints in chatterino?
The current paint system is heavily tied to css properties but chatterino seems to be 100% c++
Do you use some sort of web renderer or do you just compute it all yourself?
Chat client for https://twitch.tv. Contribute to SevenTV/chatterino7 development by creating an account on GitHub.
seems like just
qt gradients
and stuff
I see
As treu said, it's everything done in qt
I'm asking because I was thinking about making the new paint system plain css
But that's not a good idea then
qt ||
||
Otherwise, this would be the format for the new api:
{
"layers": [
{
"type": "single_color",
"data": 16711680,
"opacity": 1
},
{
"type": "linear_gradient",
"data": {
"angle": 0,
"repeating": false,
"stops": [
{
"at": 0,
"color": 16711680
},
{
"at": 1,
"color": 65280
}
]
},
"opacity": 0.1
},
{
"type": "radial_gradient",
"data": {
"angle": 0,
"repeating": true,
"stops": [
{
"at": 0,
"color": 16711680
},
{
"at": 1,
"color": 65280
}
],
"shape": "ellipse"
},
"opacity": 1
},
{
"type": "image",
"data": "01HT54Y68ETMF2GNFYJS52ZPYE",
"opacity": 0.5
}
],
"shadows": [
{
"color": 16711680,
"offset_x": 0,
"offset_y": 0,
"blur": 10
},
{
"color": 65280,
"offset_x": 0,
"offset_y": 0,
"blur": 10
}
]
}
yeah it needs to be like that to be cross platformish
to be fair
you could just like
make a thing to directly ship css instead as long as you also keep something like this
for like the extensions and other things which will want to integrate with it
as long as I can parse it it's fine, but I don't really want to refactor a bunch of stuff, so JSON would be pog
Ye will keep it json then
I'm not sure if that's a good idea 
yeah idk
The only new thing you'll have to implement is layers
But that shouldn't be too complicated
will that be on the v3 or v4 endpoint?
oh and for chatterino updates: the client will now try v2, v3, and v4 in that order to search for updates (it ignores the html from v4 currently)
I'm not sure how the version numbering on the API is right now
I know v3 is the current rest api
@south flare whenever you’re free I’d appreciate if you could take a look at this pr https://github.com/SevenTV/Extension/pull/1022 
Is the new extension repo good to open pr's too or are you all still working on it? I dont wanna open one if you guys are still working on reqriting it
I’m not sure if they’re accepting new features right now. It’s mainly been bug fixes
ok thx!
when I get requested the cdn gif url i got this large string but idk how to decode it
forgive my potential ignorance, but could that be the file itself?
hmmm
assuming there's more to it than just what I can see in the screenshot
its a pretty long string
it does say "file" so I'd assume it's literally just the gif in text form
the url is also there
it looks like U int8 to me
no i put that there
ah
i saved it as a txt and changed it to .png and its a broken file
so i dont think i can do that directly
well it would probably be a gif if anything, right?
no im getting it from the .png
ah
from cdn
text editors would also probably screw up the bytes by changing them to characters it thinks you want
depends on the text editor
hex editor would probably work
still couldnt do it
const res = await fetch(url)
const imageblob = await res.blob();
emoteList[emote]['file'] = {imageblob};
when I fetch the cdn .gif api and send it back to the front end its empty
this is the res I get from the 7tv response
nvm i fixxed it
used array buffer instead
how many emotes does discord api limit?
I think if there is a limit, the best bet would be asking the user to create a bot and give me its credentials
per hour 
What about this idea?
even bots has the same rate limit iirc
Does that matter if I ask the user to make the bot?
does anyone know how i could embed 7tv emotes to a different website/platform
i made my own kind of chatroom and would like to have 7tv emotes here
is the code for the extension public by any chance i could probably copy alot of it and just adjust
ok nvm i found it
You just need emote id
and then call it with the api
Chatterino7 v7.5.0-beta.1 is released, feel free to try it out (it doesn't appear in the updater for now): https://github.com/SevenTV/chatterino7/releases/tag/v7.5.0-beta.1 Also please @ me if you experience bugs!
well first i need to know if text xyz is an emote in the first place
but im gonna look at code now jukst woke u

7TV Developer Portal.
do the query endpoints work from here?
the one using a path works fine with a twitch id
but going by a username is a empty jsonb
like this works fine
chatterino 2.5.0
forsenforsenforsenfosernoseforsnofsnoefoesnfrseofsoern
this doc is currently partially outdated
what are you trying to do
get my emotes working on my own website
so i dont have twitch ids
but ill just hardcode my twitch id
since idk how else todo it
just sucks because if my friends stream here aswell my id is hardcoded
could use twitch api but extra effort
you can use this get request to get the twitch id from twitch name
https://api.ivr.fi/v2/twitch/user?login={username}
you can then get the 7tv id from the twitch id from:
https://7tv.io/v3/users/twitch/{twitchID} at ['user']['id']
also the current active emote set for twitch at ['user']['connections']["platform" == "TWITCH"]['emote_set']
thanks alot got it
How do you get the namepaint of a user? I've been trying to figure it out but can't find it in the api docs or anything. I just wanna know how to go from username or user id to getting their chosen namepaint image/gradient etc.
Also badges
for now, you can use GQL requests to fetch those data.
To see how to use them, you can check the gql requests in your browser's Network tab.
For your case, you can use GetUserCosmetics to get the users' owned cosmetics, as well as the current equipped ones ("selected" == true). e.g:
Payload:
{
"operationName": "GetUserCosmetics",
"variables": {
"id": "60ae3cb1b2ecb0150521fa1f"
},
"query": "query GetUserCosmetics($id: ObjectID!) {\n user(id: $id) {\n id\n cosmetics {\n id\n kind\n selected\n __typename\n }\n __typename\n }\n}"
}
Response:
{
"data": {
"user": {
"id": "60ae3cb1b2ecb0150521fa1f",
"cosmetics": [
{
"id": "62f98190e46eb00e438a6970",
"kind": "BADGE",
"selected": true,
"__typename": "UserCosmetic"
},
{
"id": "62f97c05e46eb00e438a696a",
"kind": "BADGE",
"selected": false,
"__typename": "UserCosmetic"
},
{
"id": "61bedf64b6b41ea54419bbb1",
"kind": "PAINT",
"selected": false,
"__typename": "UserCosmetic"
},
...
This only returns the id of the cosmetics. Use GetCosmetics to get the name, as well as its components (color gradients, background image, etc). e.g:
Payload:
{
"operationName": "GetCosmestics",
"variables": {
"list": [
"62f98190e46eb00e438a6970",
"62f97c05e46eb00e438a696a",
...
]
},
"query": "query GetCosmestics($list: [ObjectID!]) {\n cosmetics(list: $list) {\n paints {\n id\n kind\n name\n function\n color\n angle\n shape\n image_url\n repeat\n stops {\n at\n color\n __typename\n }\n shadows {\n x_offset\n y_offset\n radius\n color\n __typename\n }\n __typename\n }\n badges {\n id\n kind\n name\n tooltip\n tag\n __typename\n }\n __typename\n }\n}"
}
Response:
{
"data": {
"cosmetics": {
"paints": [
{
"id": "61bede3db6b41ea54419bbb0",
"kind": "",
"name": "Candy Cane",
"function": "LINEAR_GRADIENT",
"color": -10197761,
"angle": 45,
"shape": null,
"image_url": null,
"repeat": true,
...
@quick ibex can you tell me more about this bug? https://7tv.app/emote-sets/61390d6af7977b64f644b941
Idk how it is anymore, but you were able to set the set size to anything below the max limit

What you snoopin around my account for 
I'm currently working on transferring the database from the old MongoDB thing to the new sql based model and I discovered those sets because they have a set size below 0.
There's only one other user who has sets with this bug
So I'm thinking about how to handle this
Yea, can still set them negative
When you were first able to have multiple sets it was made so your set size became your acconts "max allowed set size". Later on the api checked if the user had a negative max size and considered that "priveleged", so i was able to set any size then 
But my > 1000 size sets were reverted 
Or were they 
I've had lots of fun exploiting parts of the api over the years 
oh man
how does this guy handle random things like the trending page in a pretty decent way but fuck THIS up

It was done on purpose, you could set it to anything below your current limit and couldn’t go back up IIRC
Because at the time people were fucking around with 7TV’s gql api
people abusing it ended up having less emote slots 
that was before sets were a thing

"query GetCosmestics" misspelled in the api 
there's also "query Annoucement" 
getAir 
Hey all! I'm trying to write my own app incorporating 7tv emotes, but more than half the time, I'm getting CORS errors when trying to load the image files themselves. E.g.
Access to image at 'https://cdn.7tv.app/emote/60aec2196cfcffe15f4e4f93/2x.webp' from origin '[my site]' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Anybody know how I could resolve, or general thoughts on what to try? Pls ping if so, and thanks in advance! 
Cause cors is enabled
You’d have to do it in the backend
it's a quick 'n dirty web app that doesn't have a back-end
guess I'll have to decide if I care enough to make one, prob won't
thanks for the confirmation that I wasn't just missing something dumb
You can just used cdn and put that in an image element src
how do you mean?
I just wanna render the image, don't care about downloading the file
in case that distinction is relevant
but broadly yes
ok so what framework are you using?
I just do
const response = await fetch(`https://7tv.io/v3/emotes/${encodeURIComponent(searchQuery)}`);
to fetch the api
and then to get the src i do
const data = await response.json();
const emoteUrl = data.animated ? data.host.url + '/4x.gif' : data.host.url + '/4x.png';
oh I have the URL already, the first data fetch request goes through fine
but like trying to render e.g. https://cdn.7tv.app/emote/60aec2196cfcffe15f4e4f93/2x.webp gives me CORS issues
the data files only return webp or avi
yes
ok so
have you tried this?
I was going off the returned file names, I'll try with gif instead of webp/avi
just try data.host.url + '/4x.gif'
403 forbidden
send code
what specific code are you looking for? it's literally just the url you said, data.host.url + '/4x.gif' - e.g. https://cdn.7tv.app/emote/60aec2196cfcffe15f4e4f93/4x.gif
this emote isnt a gif
its a png
thats why here i did the ? shit
yeah yeah that's 100% my bad, brain fried
I was testing animated emotes all before this and just copied the wrong link
good now?
also the url takes a little time to load sometimes
so I use onLoad={handleLoad} inside my image element
which just makes a loading circle thing
or maybe you can load the 1x first cause that takes less time

it does work now! tysm, never would have guessed that on my own
really appreciate the help, have a good one
@strange owl is there a setting to disable raider highlight
why is cors only disabled on png??
gif and webp have them enabled
nvm it was just cached
how did that fix it for that guy then 
yeah it’s in the 7TV settings
I was working on another PR that just uses Twitch’s chat highlight settings, but I wasn’t sure if it was worth submitting.
I see what is the setting called
Show Raiders (Moderator only) under Highlights > Built-In
In retrospect, it might be better for it's default value to be false instead (I just copied the default values for Twitch's chat highlights).
She was first trying to get the image file first but because she doesn’t need the file just the render, I got her to just use the link
if they put the cdn link in an img tag it will still be behind cors no?
you are tho
the browser still downloads it
that would defeat the whole purpose of cors
it has to download it to render it 
wdym by embed
?
well yea it has to 
And the img element bypasses it?
no
discord proxies all images through their servers
it should give the missing image icon
so they basically download them to their servers
if it can into cors
and then give them to you
That’s not what happens
I get the image
for whatever reason i didnt get cors on a png with cache disabled 
I didn’t do anything with cache
its automatic, you dont manage the cache
dev tools has a checkbox to disable cache is what im saying
(from disk cache)
it workes
so it never actually made the request
yea
where do you see from disk cache
status code
from what domain
local host

nono im just confused why it worked
unless localhost doesnt enforce cors
do it on google.com
ok yea makes sense

its the image element doing the magic
do the image tag with cache disabled
but we just saw it didnt use cache
was it not this one?
what if img just bypasses all cors
oh img src GETs are considered simple requests
so it doesnt use cors
but then what was that guys original issue?
was he not doing the same thing? 
they werent making the request correctly
or
no
they were tryign to get with avif?
i think he was using fetch
can you make fetch into simple?
it has to follow some conditions to be considered simple
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. CORS also relies on a mechanism by which browsers make a "preflight" request to the server hosting the cross-origin resource, in ord...
if they dont, then an OPTIONS preflight is sent
how does 7tv handle it on twitch?
there was some drama a bit ago with this and a different emote provider 
do they get the image once someone types the emote on twitch
if i were to guess they fetch all the sets enabled for that channel
personal is a little different, but similar idea
i think it gets the emotes one by one
oh wait i see what you mean now
oh right there are different resolutions requests 
i was thinking about the emote menu
for some it uses .avif and others it doesnt

and personal has a whole different url
wtf
i meant the url
thats a twitch emote
static-cdn.jtvnw.net is twitch's domain
none of these use cache tho
Sup, sup! Quick question about rate limiting, is there a specific set of requests/time? Before I hit 429? Thx
if you're talking about the gql api its in the headers of the response, not sure about the rest api
It's just between the API and downloading some emotes, I'll just make a request to the users emote set and lookup an emote and then download it, don't know if they got the same rate limit, diferent none...
Do I run the api and the extension locally to get it to work?
you dont need to run the api yourself, you can point it to the public one in your env file
pretty sure its this
It doesn’t show up in the vue devtools?
which one do yall use?
our new backend design concept
its joever
new update soon
Is there rate limit on v1?
v1?
ont he api there are but they arent veyr good
wdym not good
like its a low amount?
no like not well built and well limited
some routes have limits some dont
and its all over the place
im not sure what v1 api ur talking abt
discord api has the best error messages
message: '401: Unauthorized', code: 0
check your headers and tokens
whats wrong with that error message
discord has one of the best documentations, https://discord.com/developers/docs/topics/opcodes-and-status-codes#http
mass upload works
Ok i have two paths now
either
I make this open source and finish it by added emote set uploads
orrrr
do that same thing but make one that I host and people can login and shit
doesnt this already exist, or is this different
probably does I think it does everything on discord tho
it’s not open source
And I’m using a website
oh neat
@south flare I'd appreciate if you could take a look at this whenever you have time
https://github.com/SevenTV/Extension/pull/1028
sure
I am currently facing an issue I described in #1204105649244479518
https://discord.com/channels/817075418054000661/1232270358640595006
Any help would be greatly appreciated
Use https://7tv.io/v3/users/<user_id> to get the user info
Their emote sets will be listed under ['emote_sets']
the current active emote set for twitch at ['connections']{"platform" == "TWITCH"}['emote_set']
thanks but how do I get the user_id to begin with? Is it the same as on twitch, or is there some API call I missed while reading the docs?
Twitch id =/= 7tv id
You can check your 7tv id in the url of your 7tv profile page
e.g. mine is 60ae3cb1b2ecb0150521fa1f and my profile is at https://7tv.app/users/60ae3cb1b2ecb0150521fa1f
you can use the following get request to get the twitch id from twitch name
https://api.ivr.fi/v2/twitch/user?login={username}
you can then get the 7tv id from the twitch id from:
https://7tv.io/v3/users/twitch/{twitchID} at ['user']['id']
Also the API doc at https://7tv.io/ is outdated btw, and so far no one is working on updating it since there will be a newer api
Ask here instead for some pointers
7TV Developer Portal.
thanks! that solved my issues! I just didn't think there was a subsection based on the platform, so instead of
https://7tv.io/v3/users/twitch/{twitchID} I attempted to call https://7tv.io/v3/users/{twitchID} which obviously didn't work.
Thanks for your help 😄

@south flare https://github.com/SevenTV/Extension/pull/1030
can u take a look at this
ok heres the thingy i made https://github.com/WutIsHummus/7tv2DiscordLocal/tree/main
soon
why dont yall make it a paid thing for subs only
like 7tv to discord
missing an opportunity right here
bc discord has emote upload rate limit and it isnt feasible to server thousands of discord server owners with this service
nvm this number
hello does any one know is it possible to integrated 7tv to embed twitch chat ?
it’s already inside twitch chat
It’s not currently possible, the extension wont be getting any new updates just bug fixes. The future rewrite of it would probably support embeds.
on the google chrome browser my 7tv extension occasionally stops working and only fixes if I close and reopen the browser (I have fixed my issue after hours of trying to refresh to try to fix it but I thought I would give u guys a heads up on that issue)
ok , is there a api i would aviable to use for it maybe i could use a js script to make it possible or phase php ?
7TV Developer Portal.
most of the thing in the doc is not working nor outdated
@south flare could you take a look at my prs whenever you have time 
the bot is disabled
Just wanted to post that the ONLY reason I still have FFZ installed is because of its audio compressor, which makes every stream way better to watch. I'd love if 7tv added something similar so I can just have this one extension to rule them all 👌
next extension
release the beta version already
it doesnt exist
System-wide compression is so much nicer
than an extension that ONLY works on twitch streams
That may be true, but for work reasons, I view things as they are produce on my PC. The only exception is twitch
Oh yeah forgot you can have an account and no membership
Not renewing it until I get a macbook
omeScrajj
peepoTalk "Connection Closed: 1005"
Why does it just close connection with no reason?
1005 seems like a cloudflare error
It's the WebSocket code tho, no? Hmm
Eh nevermind it sounds unlikely
I mean, it's believable since during development I accidentally hammered the WS server with lots of reconnects
Like a lot a lot
Sorry 

probably wasn't noticable with the average traffic eventapi sees
omeScrajj
It's working fine and then suddenly server just disconnects with 1005 (which means no reason given in WebSockets)
Working fine for like half a second
It's probably a problem on my side, but still, am confused
ive never seen 1005 from eventapi, only 1006 when its down and 1001 from cloudflare
weird
Found the problem. In short: JS type coercion did me dirty again
Use typescript then

True

Doin a little testin https://i.imgur.com/IRu0o1b.png

lookin good 
main problem is that the current implementation (that has been in the extension for more than a year now) uses 3rd party cookies which are being deprecated
wdym by that 
showing when emotes are added, removed, or renamed?
no the preview for emotes and a button to add them from chat
there is a preview for emotes already when you add / remove / rename them
as in, it posts the emote itself in chat with the name in brackets
as for adding it from chat, I wouldn't even know how to best implement that with the whole CORS and API stuff
I suppose what would need to be done is request the emote via the api and then if the emote is publicly listed show it
Or blur it or tmsg if it's not
Well requesting the emote isn't the problem
I assume at least
Moreso the part of adding it from chat through a button / embed on the emote 😄
Since I do like the idea of that, that a user can just post a link to an emote and one of the mods / editors (or the streamer) can just add it from within chat, instead of navigating to the 7TV page and adding it there
this would be huge
would it though?
Opening the emote in a new tab and adding it there isn't that many more steps
it's a lot more convenient to just enable emotes in chat
the website sometimes take a lot longer to load the emotes
Mhm that part I can get behind, yeah
But again, authorization wise I'm really not sure how to best implement that
and for streamers, most of them would have to drag the tab outside of the stream view in case it's a horse cock or anything tos
is it possible to just show embed for the streamer and their editors?
Well the thing is, you need to somehow authorize a call over to 7TV's API to add the emote
And you don't have a token or authorization code available on Twitch
ic
I have never considered that the extension itself never required user auth until you mentioned it just now
Lemme confirm again
The login button in the extension settings popup is purely cosmetic right?
I can't say anything about the 7TV extension unfortunately
One thing tho
For logging into 7tv.app via Kick
The extension is able to set the auth in the local storage of 7tv.app or 7tv.io, so it might also probably able to get the auth value?
Maybe something like a cross-domain local storage can help you get the info in the local storage from 7tv.app, check if the 7tv id matches with the channel, the gets the auth and do the add emote request?
That'd require an update to the FrankerFaceZ extension on Chrome and Firefox to add 7tv.app and 7tv.io to the authorized domains list
Are these requests meant to show up any time an emote is hovered when I have 2 streams open at the same time or is something bricked?
https://s4.ezgif.com/tmp/ezgif-4-6876a7e3e6.gif
Originally it actually logged in, but anatole changed it so it was more cosmetic
However if you log out and back in you set a cookie on 7tv.io which is in included as a 3rd party cookie when making requests to the api, so it works
Google is removing 3rd party cookies soon tho
Can maybe reimplement how it was before it was changed
Or maybe we can set partition key on the 7tv.io cookie so it can be used from when doing requests from twitch?
Dunno much about cookies tho
Old implementation was basically for the extension to ask for permission to access 7tv.app. then grab the token from there
You have caching disabled by default when opening dev tools
idk if its me or theres some experiment preventing 7tv nightly from working correctly
yea 7tv is unusable for me at the moment, switching back to ffz
ok nvm even ffz broken
stupid experiment
yeah

thats pog
pretty neat
faster than the actual website 
It’s sped up 

does anyone know hot to convert the colors from GetCosmetics to hex colors? so something like -1310760961?
and what kind of colors are they?
its an encoded way to have colors
as a single integer
color = -757935361
r = (color >> 24) & 0xff
g = (color >> 16) & 0xff
b = (color >> 8) & 0xff
a = (color >> 0) & 0xff
print(r, g, b, a)
210 210 210 255
you basically need to shift some bits around
to get back all the values
I couldn't remember what this method was called
I was trying to look it up
bitshifting
well yeah but is this not a standard/common way to store a color as a single integer?
is that larger/smaller than the signed integer?
surely there's a reason for it
instead of just using hex

const DecimalToStringRGBA = (num: number): string => {
const r = (num >>> 24) & 0xff;
const g = (num >>> 16) & 0xff;
const b = (num >>> 8) & 0xff;
const a = num & 0xff;
return `rgba(${r}, ${g}, ${b}, ${(a / 255).toFixed(3)})`;
};
i use this for my chat overlay
im pretty sure you took this from the source code of the extension 
probably, been a while dont remember
The Web Extension for 7TV, bringing new features, emotes, vanity and performance to Twitch, Kick & YouTube - SevenTV/Extension
i dont know how legal taking code from a non open source thing is
actually
as long as you're not selling it i guess you should be fine
its Apache 2.0 with common clause
ye
selling a chat overlay lol
actually would be able to sell it since commons clause says "a product or service whose value derives, entirely or substantially, from the functionality of the Software"
don't think a bitshifting function counts as "substantially"
yeah i doubt it
just noticed the licensor
anatole coming to sue me
curious on the legal standing of that business
can I somehow check whether a user is a 7tv sub?
I think a user would have the subscriber role, which I think is a specific number in the users roles array
okay i'll look
its a uuid, should look something like this. not sure what the subscriber uuid is tho
easiest way is to check for their sub role on 7tv.app i guess
here i found a array of every role type
01 at the end
lol
i mean its a bitshifting function, not much you can change
Honestly I doubt this would be ... copyrightable, it's way too generic
this subpixel smoothing looks really contrasty
like mostly primary colors
it seems to work well though
Could Love some Devs acknowledging these issues of times past ❤️ #1095926095192277003 message
@south flare
..?
Need elp with laptop what should I get to program
something with at least 16gb of ram
it depends what you're coding

Simple coding for learning? Most laptop can do
hello guys, im having some issues with hidding the recommended channels on twitch, and since for some reason i cant post in the bugs-and-issues channel im gonna share it here
so, when i expand the left sidebar the recommended channels are hidden
but if I collapse it they are not anymore
is there a way to fix this?
i always use twitch having the left side bar collapsed
this are my settings in the 7tv extension
I’m gonna buy a MacBook Air
Get a referbished M2
Linux is the solution to your computer not owning you

Companies after forking Linux and playwalling it with a tos that goes against the spirit of foss

don’t use them
I wasn't going to
Why refurb?
cheaper
Ive gotten refurb stuff a few times
Looks identical to brand new stuff
Cheaper
The preformance boost from M2 to m4 isn't that much and won't really be noticeable for your tasks
Look at Best Buy refurbished
I got a 1200 laptop for 400
And my friend got 1400 for 600
Wonder if it's 'cuz of padding/or alt lines
how does 7tv get the recent chat history from before you joined?
Using this service: https://recent-messages.robotty.de/
are you sure? i just tried getting a chats history using that after loading the channels page in my browser and seeing 7tv load the chat history, but it said that its bot had not joined that channel
are you referring to recent chat messages? they're generally around 50 messages
when i open a chat or reload i see previous messages like this
im trying to figure out where 7tv pulls this data from
that data is provided by twitch, natively it also has this behavior
oh it only does it when signed in 
i opened an inprivate window to make sure it wasnt twitch doing it but i wasnt signed in
yes that is correct
yea that's just twitch although u can only query their gql api if you logged in with twitch's client id
when u make the request you need to provide an auth token and a client id
but the auth token is only valid if it came from the client id
and only twitch's is whitelisted
you dont need auth for most queries, just client id
yeah but for chat history u do
oh ur right my b
that WIP site looks clean 
New redesign 
Please focus on immediately improving search 
📺 Descubre nuestra plataforma de televisión en línea: streaming, programación a la carta y más. ¡Suscríbete en https://t.co/l0ONv9k3O6 y disfruta #TuTelevisión como nunca antes! ❤️🚀


I actually made a 7TV logo with sharp 120° angles like that
It’s probably in #design-general somewhere
I’ll have to find it to compare
7
Fix your Twitch extension doesn't open up fully just a thin line and clears the chat ever 1 to 2 messages
devs just fix it

great idea
Not Doc, apperantly..?
Vring vack: "YEAHVUT7TV", don't vall ov Thy wall, Humpty
#help-old message
any idea?
solved with zooming to 90%
Cool armor
this is the design that won for the new entitlement system

ill fix the i and a swap
it's happening
I'm guessing there's some work going on with events.7tv.io/v3 ?
my bot is freaking out at me complaining that it can't query it so has backed off and is now waiting a long time before reconnects
Not that we know of
Hmm okay I’ll look when I get home
Hetzner took us down
it happened at exactly 2pm
hetzner blackhole'd our ips because we had too many open connections

so what happens now
how dare they. Thanks for looking into it 
i fixed it
Yeah I saw 🙂 appreciate it
self ddos 
I wish discord had a way to “slow ping” people
For when you @ everyone in large servers
It would ping people over a user-specified period
Instead of all at once
All due respect, shouldn't it be on developers to make sure this doesn't happen?
As to how, I have no idea. I'm a simple
I only know the worse "scale"
i think its actually how many requests we do to stripe
its not even OUR API thats lagging
its stripes limit
and thus it becomes us
Oh really? I didn't even know it hit stripe's API
I just typed in the code and it said success - already subbed btw
we have to create the subs somehow
That makes more sense now. Thank you for the clarification
r u supposed to get the sub badge for the 3 day trail or just the paint
did you see any sub badges
It’s just a regular subscription
You you get 5 monthly paint and the badge if you’re eligible
7tv Update around the corner :FeelsStrongMan
:
:
:
@quick ibex why does putting country code in the box here produce different results from using groups? the group only has 2 emotes for some reason 
Country codes uses the api to filter for country, meaning you can query up to the limit for that given country. The group only filters on the "already queried" emotes. Just set the limit much higher while using the grouping.
ahh okay
I don't mind just using the code, was just curious, is there any other benefit to it?
(in my case it's one flag, one language)
no

The query should be slightly more performant i guess
This is the first time I've actually seen the country selector
Yea, made it not long ago
It looks good
Although I mean like, the separate queues per-country has been a thing for a while too, right? It's my first time seeing anything related to that
nope
I thought they were
api has had the ability to query by country, but not the website
ah
Who pinged me
Quick question does anyone think the current 7tv website is clunky
not clunky mostly backend issues
but the front end will also get a facelift too
can we pin this please? it's very helpful
u can bookmark those 2 links with your username
then edit the url to others in the future
its not about me, its about others, im sure others like me whenever they come to channels like these check pinned messages for important changes/announcements, i believe it would be helpful.. so many good things get buried by the tens of thousands of messages
also, question about the API, is there a way to get the zero-width attribute of an emote?
and if someone can explain what the flags attribute is 🙂
if it has "flags": 256, then it's zero-width
check the meaning of the flags here:
https://github.com/SevenTV/Website/blob/01d690c62a9978ecc64c972632fa500f837513c9/src/structures/Emote.ts#L59
ah, thank you! documentation is a bit tricky to be found but i was on the right path by pure coincidence 😅
if you are not familiar with bit-wise calculation
PRIVATE = 1,
LISTED = 2,
ZERO_WIDTH = 256,
PERSONAL_USE = 512
PERSONAL_USE_REJECTED = 1024,
but i think LISTED, PERSONAL_USE and PERSONAL_USE_REJECTED is not used
those can be checked from the "state" value
you can just paste it in the console to see the result 
but if it's private and zero width isn't the flag value different
so u can't check for an exact value
bitmask the flag you want and check if its 0
int flag = 0b100000001; // = 257
int is_private = (flag & (1 << 0)) != 0;
int is_zw = (flag & (1 << 8)) != 0;
something like that
depends on the language
if thats what you mean

the emote query of the v3 api is not working for me 
maybe im just stupid idk
oh its a
gql thing
yea I know how to do it I was just saying that
Is there anywhere I can find a full schema doc for the v3 api or do I just gotta figure it out myself lol
7TV Developer Portal.
The 7TV API | https://7tv.io/v3. Contribute to SevenTV/API development by creating an account on GitHub.
thanks, exactly what I was looking for
Anatole
thank you so much

why the fuck does the 7tv api show the NNYS 2023 set 3 times for me (I do own it) but 2 times for another account that doesn't even own the set?
And then no times for other accounts? So weird. And someone else in general said they do own it and it shows up twice.
So how am I supposed to programatically determine who owns this set if the number of times it appears isn't even consistent?
I used the /users/twitch/<user-id> endpoint for this btw
is it permanent or for a while?
only for a while
if you use gql you can request users by connection as well and for emote sets enable entitled and it should work, so something like
query MyQuery {
userByConnection(id: "135078647", platform: TWITCH) {
emote_sets(entitled: true) {
id
name
}
}
}
returns this for my account
{
"data": {
"userByConnection": {
"emote_sets": [
{
"id": "6116bc79446a415801b1b70d",
"name": "水の鳥's Emotes"
},
{
"id": "6320c315b5b851e2f4c1e37e",
"name": "ente"
},
{
"id": "632e05f02cfbb9c4a99577f4",
"name": "forsen"
},
{
"id": "63a9e26be98a476bfba07026",
"name": "Personal Emotes"
},
{
"id": "64a9ebba4d31004fca147dc9",
"name": "marin"
},
{
"id": "65195df03dc6f84f99aa2cad",
"name": "test link"
},
{
"id": "6664dbad6baf48349280a13b",
"name": "ente"
},
{
"id": "6664dce55e2229f4f6ebed1c",
"name": "forsen"
},
{
"id": "64f610be8bef73096908e237",
"name": "Fantasy | 7TV Sub Event 2023"
},
{
"id": "65786294a80ced4d1d9f55ff",
"name": "NNYS 2023"
}
]
}
}
}
it shouldnt show up if someone doesnt have it
https://cloud.hasura.io/public/graphiql?endpoint=https://7tv.io/v3/gql you can test it here
forsen
well then the problem is it doesn't differentiate between personal and channel emotes
I'm coding a chat overlay and when a user speaks in the channel I'm loading their personal emotes to be used in the overlay, so I need just the personal emote sets they have not the channel emote sets
But I could just call without entitled and then with entitled and filter out the ones that return without entitled. Just seems a bit silly 
you can request the emote sets flags
so if you send gql query MyQuery { userByConnection(id: "135078647", platform: TWITCH) { emote_sets(entitled: true) { flags name id } } } you get ```
{
"data": {
"userByConnection": {
"emote_sets": [
{
"flags": 0,
"name": "水の鳥's Emotes",
"id": "6116bc79446a415801b1b70d"
},
{
"flags": 0,
"name": "ente",
"id": "6320c315b5b851e2f4c1e37e"
},
{
"flags": 0,
"name": "forsen",
"id": "632e05f02cfbb9c4a99577f4"
},
{
"flags": 4,
"name": "Personal Emotes",
"id": "63a9e26be98a476bfba07026"
},
{
"flags": 0,
"name": "marin",
"id": "64a9ebba4d31004fca147dc9"
},
{
"flags": 0,
"name": "test link",
"id": "65195df03dc6f84f99aa2cad"
},
{
"flags": 0,
"name": "ente",
"id": "6664dbad6baf48349280a13b"
},
{
"flags": 0,
"name": "forsen",
"id": "6664dce55e2229f4f6ebed1c"
},
{
"flags": 4,
"name": "Fantasy | 7TV Sub Event 2023",
"id": "64f610be8bef73096908e237"
},
{
"flags": 4,
"name": "NNYS 2023",
"id": "65786294a80ced4d1d9f55ff"
}
]
}
}
}
Oh personal have 4 

thank you 
np
also consider checking if the third bit is set instead of just checking if the flags field equals 4 since there might also be other flags set in some rare cases (I think? Thats how it works for emote flags at least)
not too sure tho if that can happen on emote set flags too
it should be very rare cases anyway
not sure what you mean by that
well so there are other flags besides just personal like immutable or commercial that have different values. the Commertial flag is 8 or the immutable flag is 1
so if a set is immutable and private
it might return 5
in the fflags
because 4 + 1
but im not sure if that can happen on emote sets
The 7TV API | https://7tv.io/v3. Contribute to SevenTV/API development by creating an account on GitHub.
these are the flags
there arent that many

Actually now that i think about it you might also want to check for the commercial flag which is 8
idk if there are any sets like that already but i think that flag would imply something similar to personal emotes except you purchased the set
Anyone know who the Dungeon Mistress is? 
Me
Kathy
yoo


So I noticed that on Chatterino7 all animated emotes seem to run on a global clock so that they are always synced with their start times. But I notice the 7tv browser extension does not do anything like this so emotes are not in sync with each other. Is this just not possible with how browsers work? Was looking to implement it in a chat overlay I'm making but it's way too advanced for me.
The only thing I could come up with is set the img src to empty and back to the image for all currently shown img elements whenever a new one appears. It works but it's laggy with a lot of images and causes all emotes to start over when a new emote appears in chat.
Any help would be appreciated 
Chatterino7 Example
7tv extension example
browser abstraction
it's a per browser behaviour afaik
firefox emotes start their animation each time they spawn i think
but chromium might do something else
I see. Yeah it seems chromium just loads them once and then every time that same image appears again it's on the same clock. So there isn't a way to just keep them in sync like Chatterino7 does it?
so you're making an overlay right?

there's somewhat of a possibility that you would be able to load the images within a <canvas> and then play them manually but other than that, i'm really not sure how else you could do it
we couldn't solve this with the 7tv extension as its a browser thing
okay thank you I'll look into canvases
why do u care so much abt sync 
uhm ....?
brave browser
plus the server gives me 4 random numbers after my nickname every time I click refresh
I test different browsers, firefox, same thing
i am unlink my clollection from yt and kick
its gonna always happen if your first connection isnt twitch
I have another question about the founder's badge. I couldn't unlock it, I don't know why?
You only get it if you subbed the first month or so of 7tv
Because some emotes are designed to be used separately and also together and they don't work if the emotes aren't synced
I know it would be a breaking change for implementations but I think it'd make more sense to define paint drop-shadows using em instead of px so that it's not font-size dependent. Right now if you use px for the drop shadow and have a 48px font-size it's 1/3rd the size it should be according to the font-size used on the 7tv website for usernames being 16px.
Does someone happen to have the relevant code snippet for the 7tv extension that gets a random color for a user that doesn't have an assigned color? Just wanna see if it's pure random or a function I can copy so that I can sync the random color with my chat overlay
if you mean grayname coloring then its client side
on twitch it just picks one of the colors from the default twitch colors
so its one of these
oh oops
i randomly found the values
for all the colors
in the chatterino repo
Gotcha
'#0000FF': 'blue',
'#8A2BE2': 'blue_violet',
'#5F9EA0': 'cadet_blue',
'#D2691E': 'chocolate',
'#FF7F50': 'coral',
'#1E90FF': 'dodger_blue',
'#B22222': 'firebrick',
'#DAA520': 'golden_rod',
'#008000': 'green',
'#FF69B4': 'hot_pink',
'#FF4500': 'orange_red',
'#FF0000': 'red',
'#2E8B57': 'sea_green',
'#00FF7F': 'spring_green',
'#9ACD32': 'yellow_green'
};``` in case you want the hex ones
I already have those and was picking a random one from them but didn't know if there was a way to sync it, but seems not so oh well
decimal color
const TWITCH_COLORS: &'static [u32] = &[
16711680, // Red
255, // Blue,
65280, // Green
11346466, // Fire Brick
16744272, // Coral
10145074, // Yellow Green
16729344, // Orange Red
3050327, // Sea Green
14329120, // Goldenrod
13789470, // Chocolate
6266528, // Cadet Blue
2003199, // Dodger Blue
16738740, // Hot Pink
9055202, // Blue Violet
65407, // Spring Green
];
I remember a channel that would ban you if you used spring green and didn’t change it after being warned

Hi,
I wanna to track personal user emotes on multiple twitch channels. If I subscribe via WS on the channel events on the multiple channels, how can I track the result, from which channel the event came?
the channel and actor data are provided in the dispatches so you'd just parse it for which channel is which
I keep getting only system user
Real user https://7tv.io/v3/users/twitch/713262081
And my event
But that is my d.body.id https://7tv.io/v3/users/65786294a80ced4d1d9f55ff
Check the screenshoot
Is the same system user
have you tried adding or removing emotes, are you getting dispatches for those
Nope, Its note mine emotes. This private emotes of random user in the chat of the current channel
cond = {
'ctx': "channel",
'platform': "TWITCH",
'id': str(channel_id),
}
...
{
"op": 35,
"d": {
"type": "emote_set.*",
"condition": cond}
i use the cond = { "object_id": "emote set id" } for the condition on emote_set.update, i haven't tried using channel context
Hi, I'm trying to create a extension from scratch to add badges from our community to next to twitch chat-user, but cannot access to the proper target to create a mutationObserver, can you give me hint???
the extension is open source
source available
Does anyone know why on Chatterino7 when a user that has 7tv cosmetics chats from a different client that doesn't use 7tv cosmetics, their cosmetics just don't load at all for me? Why does their client affect what my client loads?
7tv has a "presence" system, where the client periodically sends a ping that its in chat to inform the server to tell other people in the chat your cosmetics
if you dont send your presence to the server the server doesnt know that you're in chat
so it doesnt distribute your cosmetics to everyone else
it's basically the best solution we can come up with that doesnt involve putting a bot to listen to every chat ever
who thought of this? 
I would just make the client store a list of seen chatters and if they haven't been seen chatting for x minutes then stop checking for their cosmetics
yes
this solution has a very bad problem though
if you're in a chat with like 200K people they would have to query all the chatters in chat and ask the 7tv servers for whether or not they have cosmetics
is it not possible to just send extra irc data
so this means that if 1 person chats, 200k other people will have to ask the server, and that'll happen with every message
or does twitch remove any invalid ones when it goes from server to all clients
I see
you can send some custom data using the client-nonce tag but it's iffy
yea ok
i dont remember the exact reason for them not doing it but it's mostly because twitch staff asked not to do it
well it's also just
if there's any other thing
that uses that hack
to send more data
it will be incompatible
yeah that approach also limits it to twitch only
you wouldn't be able to add cosmetics to like kick with this type of system
or youtube
no I mean like
sending more irc data would mean that u add a nonce tag and then the value would be encrypted data correct?
I guess the only other way to mitigate it would be to create a cached 7tv cosmetics data per channel so every client would check and update from that one source for what channel they are in and that one source would be the thing that updates based on people chatting instead of the thousands of clients.
it would be incompatible but pretty much no one does anything with client-nonce's, they're made so you can check that your message actually got sent into chat or whatever
but if u do that and there's another extension that does the same thing it won't merge the tags correct?
it's only used by the twitch web chat
no one does that though
if 7tv does it other people will 
Does this solution make sense? Or was this also considered and decided against
yeah thats certainly possible

actually
i think that's how badges worked originally in older 7tv versions
you just had a huge json file with user ids and badge ids
Well I'm assuming that was global though not per channel right? Which I could see being very bad very quickly
yeah it was global
doesn't bttv do that 
yes
the thing with our cosmetics is that we want appealing real-time cosmetic updates
yeah
yeah
that's the reason that 7tv moved away from that method
because the update times were too long
But yeah that's why I said storing it per channel for active chatters so that it would still be manageable size
i think the laziest solution to this problem would be to have a mix of our current thing with cached cosmetics but storing all the people who chatted in a specific chat and publically displaying them would probably be a privacy issue
so idk
I mean I guess? But if you just store people that were active the last 10m it's really not much and you could literally just see that by being in the chat yourself
yeah but wouldn't you just end up with the same problem then
no because the instant they chat again their cosmetics are checked for again
if they send presence to the server
I think we're thinking about this differently
maybe
The thing I am thinking of doesn't include presense at all. It just checks the cosmetics for anyone actively chatting in the channel and stores that info for all clients to see in that channel.
So basically:
- person chats in chat
- server that checks for people chatting in that channel checks for that new person's cosmetics and stores it in a cache for the channel (and adds them to a list to check for updates periodically)
- The other people using a 7tv client just periodically check the channel cache for users with cosmetics to display them
- that person hasn't been seen in 10m so their cache is removed.
yes so basically your solution involves having a bot in the channel right
which would watch people in the chat
I guess yeah but could just be an anon bot like justinfan
twitch might get rid off anon connections soon
they've been experimenting with that
7tv tried having a bot and everyone lost their minds
but they had a named non-anon bot
ban 7tvbot
Yeah I guess that's a concern. So far they haven't
anon or not it could still be a pretty iffy issue
night lost his mind you mean


even if the bot would be open source you cant make sure the server runs the exact same build, it's an interesting privacy issue
Yes but it was also many chatters in here
yeah true
night
analtoe
assic
i don’t want my data stolen!!!
I mean that's the case with anything open source though
yes
but it's a server issue
if you compile chatterino from scratch you can be sure there isn't any spyware in it
true
you cant check if the server is running any kind of tracking on it
because you dont have access to it
Just give everyone access to the server 
I think 7tv is widespread enough that people would be ok with having the bot in their chat, BUT a different solution would be ideal
Well non-anon bots are definitely limited by Twitch now if not modded
don't remember the number of channels they can be in but it's not much
what if u selfbot?
for example, troy selfbot himself instead of 7tvbot
decentralized self-botting 
surely people wont ban him for stalking right? 
everyone snitches reports on the other uses in chats
funny thing but breaks the twitch tos
7tv extension checks other chatters and sends the data to 7tv to check for badges and cache it for that channel
would be cool tho
oh yeah here it is. But they don't mention justinfan https://discuss.dev.twitch.com/t/giving-broadcasters-control-concurrent-join-limits-for-irc-and-eventsub/54997?page=2
the embed preview text is funny
ah

sorry for asking this here, im having a problem with the 7tv, who can i talk to try and fix it?
usually helps if you describe the problem
ask to ask
Yo wsg brotha



that was my guess




nice










