#๐พ-core-development
1 messages ยท Page 238 of 1
now it also handles headers
I only realized that was possible too when dealing with platform indicators yesterday
yeahhh
discord changes the vars depending if the profile theme is light or dark too
it shouldnt be that hard
how should we do it
which
not actually deleted
also vencord adds styles all over the places lmao
some in head
some in root
some in body
trolley
there is messagelogger-deleted-attachment on some random video
bro
item: deleted
who cooked this up
๐ญ
๐
it removes first patch right?
ya
yeah thats better
guh BlurNSFW is fine i think
i have it on and doesnt seem laggy
just keep it for now im lazy
unless you wanna rewrite it

I meann we just did the effort to remove all of these
just to keep one in the end?
guhhhh
the thing is
discord is insane
they put image classes on videos

๐ญ
discoooooord
it's easy to fix if you're okay with playing video being blurred
VIDOE IS LAZYIMG
god damn
and not all images have lazyimg
lol
sometimes they put img with 0 classes
imageWrapper.lazyImg > img
the child has no class
videos have both of those classes on parent too
well
we can make BlurNSFW add better class ig
but then we need to add more patches
which things do we need to target exactly?
I'm kinda confused
just normal images?
videos thumbnails?
yes
have to patch so many places probably
why is that so small
hmm
ig it shouldn't be too hard
yeah it's easy okay
916616
nvm because no way to detect if it's an image or video
also wtf why is devtools so laggy
chrome devtools are laggy and it also makes discord laggy
hmm
what about srcIsAnimated
actually this should only target the thumbnail of videos so whats the issue?
Tbf they got feedback immediately and didn't act on it 
image vs video
use the alt
no
๐
it probably is language dependant
there's literally no way to differentiate
unless you wanna check if src contains mp4 webm etc but that's horrrible
well we can match this
that's where messagelogger adds deleted classname
no this is better
i will do this
alright
i will copy paste ur patch
we are gonna fix discord lag by memoizing everything @austere talon
{
find: ".createElement=",
replacement: {
match: /function (?=.+?\.createElement=(\i))\1\((\i),\i,\i\){/,
replace: "$&$2=$self.getMemoizedComponent($2);"
}
}
MemoSymbol: Symbol.for("react.memo"),
FragmentSymbol: Symbol.for("react.fragment"),
getMemoizedComponent(original: any) {
if (!original || typeof original === "string" || original.$$typeof === this.MemoSymbol || original === this.FragmentSymbol) {
return original;
}
let component = componentCache.get(original);
if (!component) {
component = React.memo(original);
componentCache.set(original, component);
}
return component;
}
LOL
(it works)
I used for a bit and had no issues lmao
u will make a 3rd party client
but yeah that would def need a lot of testing
๐ญ
okay nvm
look at how many memos
actually is this even working

i dont think it's working lol
if it did it would cause many bugs
should we merge @limber skiff
WAIT
NOT YET
COPILOT IS COOKED
I got it working before
anyway should be good now
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
did u run
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
vtest fix-lag
Now testing! 
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
ya
Merging into main 
vtag 1.10.4
Creating release 
soon Venbot will be chief automation
repo management via discord
is this real
|| no ||
very cool honestly
smh i believed u
Would be a bit rough since we're on 1.11.3
what if i made a discord bot that let people edit a git repo
and only let people edit through the bot
send git patches over discord
YOO WHAT
|| fake ||
@fossil inlet Steal my idea
6cccb54 Fix lag caused by poorly written CSS rules (#3198) - Vendicated
[Vendicated/Vencord] branch deleted: fix-lag
no love for dev branch...
guhhhhhhh not on dev ๐ญ
patience my children ๐ญ
HOW MANY PEOPLE LURK THIS CHANNEL ๐ญ
idk occasionally i say some dumb stuff and get reactions from people who cant type here
I only read this channel and #๐งฉ-plugin-development tbh
is it wrong that I treat #๐งฉ-plugin-development as a questions channel
same thing i do 
i lurk this channel way more than #๐งฉ-plugin-development
then i proceed to dump my questions here instead
I lurk occasionally, saw there's a lag fix that's relevant to my interests but not really clear to me what's suddenly causing it and how to avoid it when doing css
most lag I've seen caused by :has()
which didn't lag before but does now
idk just don't use :has ever
I see I see
many crimes are committed in my own plugins
whats wrong with >div 
css goes from right to left. try to avoid patterns where the rightmost selector is generic and the leftmost selector is complex as this will essentially have exponential performance impact. for example, this is catastrophic:
.thing:has(.thing) > *
this is actually such a great idea
billions will make vencord plugins and dont even need github account
I still say we delete both the GitHub and Codeberg repos for Vencord and host everything solely on @dusk blaze โs forgejo
would be great when its down all the time
complaints in #๐ฅ-vencord-support-๐ฅ up 1000%
remember when github was down a few days ago 
fake
@jolly egret dont worry, ill crash it somehow
sudo init 0
guhhh i still dont understand run levels
good
you shouldn't need to
it's legacy stuff anyways
This one seems to hit mine especially hard lol, particularly hovering servers #1285418433042714667 message
according to some guy in support, some themes that lag on vencord don't lag on betterdiscord
probably ๐งข but we should still investigate. maybe it's something about how we insert the styles (average chrome moment, wouldn't even be surprised)
I dunno if it's massively relevant but if you go to the performance tab and enable this in settings, it crashes when it tries to load the profile after recording, which doesn't happen if you uninstall vencord
Which is annoying because it'd probably be pretty useful
Disabled all plugins and tried it and still crashed
maybe cause we put styles in the body which is technically invalid
I dragged all the style tags into head and it didn't seem to change anything
it probably caches tbf
is this on chrome?
or edge
I still had one more :has() in my own fork, oops, even just getting rid of that one makes so much difference
I didnt know chrome also has one
I wouldnt be surprised if this is true
but nah
Most of them were actually on the document element and not the body but I moved them all into head within vencord rather than just dragging and it's no better still
discord must have fucked up somehow and made styles recalculate way more
Kinda crazy that :has() is so detrimental
i think discord F up smth
personally now if i am in vc at some point discord get randomly cooked and hang up even in vanilla
I have a #id > div rule above that has next to no effect comparatively
@median rapids btw are you actually using that plugin
context menus need fixing for it so here you go
Now when I try it this crashes stable with no vencord as well so I guess it was a fluke the first few times I tried somehow
fwiw when it did work I got this
but again that's no vencord
77k matches attempted, only 1000 succeeded lol
I LOVE OVERRIDING CONSOLE METHODS I LOVE BEING ABLE TO JUMP TO WHERE THEY WERE CALLED 
You love React devtools providing absolutely no value by doing this
Can you not just expand the stack
ah okay
i hope this error explodes
the point isn't the warning its the stacktrace
vp consolejanitor
nop
no it doesnt
then it is broken
send ss of settings 
disabling discord loggers is so bad
many are useful
yop
nopppp
yeah we gotta disable that shit
cuz they be pushing to ptb at sunday
And bots are... ugh, should find a way to remove default one 
the current approach of centering things in the message and member list decorators is horrible
Fair enough
I've investigated this. No it is not possible. These variables only accept primitive CSS colors, that is hex and rgb, in semi-rare cases rgba on SOME linux distros, but not all, discord and many themes use cielab, calc and other, which would make this non-functional.
The best I came up with was to maybe introduce a setting, where users can change this to some variable if they use themes, but having themes re-calculate said styling isn't easy either, so I left it as is.
Additionally chro...
@limber skiff pindms is breaking for me after reloads and also i noticed the values get added to userBasedCategoryList infinite times; think you fucked smth up ๐ญ
works fine if i put it back into datastore and reload but every reload after that its broken
dont have time to look into ti more rn so im just leaving it to you :3

this is what i mean btw
So basically it's green light for me to use decorations
Should i do it the way theKodeToad did?
that's outdated tho
how
this is what the current settings look like

got troleld
vesktop wasnt closed properly ๐ญ
works fine now
it wasnt in the app icons but the process was running 
killed it and cleared settings so now it works
@Vendicated once again, manifest only supports primitive colors, this returns oklab(0.323409 0.00288205 -0.0101295) and oklab isn't supported by manifest
that code returns rgb, or at least should. if not, it probably broke in a recent chrome version and we should look into fixing it
no, it returns it correctly, it's simply discord that's changing to cielab, it returns whatever colorspace method is used, so if a theme uses cielab, it will return cielab, if it uses lab, it will return lab, if it uses hls it will return hls, getComputedStyle simply computes and normalizes the values of the color space, it doesnt convert the colorspace into another colorspace
untrue ๐ญ
since CSS introduced fancy color spaces that work outside of RGB
yeah hsl was misspoke
because its within rgb colorspace
but this doesn't work
well
it works for u
because the launch splash is still a full DOM
the controls overlay isnt
it passes whatever string u give it to the OS "for the most part"
yeah i aint writing a matrix multiplication lib for colorspace conversion
i dont even know where to find the colorspace normals to do that
i've done it before, but its not enjoyable
yeah see that uses some fucking normals that they pulled fucknows from where
casual "0.6299787005"
yes that makes sense
function clamp(value, min, max) {
return Math.max(Math.min(value, max), min);
}
const linearToGamma = (c) =>
c >= 0.0031308 ? 1.055 * Math.pow(c, 1 / 2.4) - 0.055 : 12.92 * c;
function oklabToSRGB({L, a, b}) {
var l = L + a * +0.3963377774 + b * +0.2158037573;
var m = L + a * -0.1055613458 + b * -0.0638541728;
var s = L + a * -0.0894841775 + b * -1.2914855480;
// The ** operator here cubes; same as l_*l_*l_ in the C++ example:
l = l ** 3; m = m ** 3; s = s ** 3;
var r = l * +4.0767416621 + m * -3.3077115913 + s * +0.2309699292;
var g = l * -1.2684380046 + m * +2.6097574011 + s * -0.3413193965;
var b = l * -0.0041960863 + m * -0.7034186147 + s * +1.7076147010;
// Convert linear RGB values returned from oklab math to sRGB for our use before returning them:
r = 255 * linearToGamma(r); g = 255 * linearToGamma(g); b = 255 * linearToGamma(b);
// OPTION: clamp r g and b values to the range 0-255; but if you use the values immediately to draw, JavaScript clamps them on use:
r = clamp(r, 0, 255); g = clamp(g, 0, 255); b = clamp(b, 0, 255);
// OPTION: round the values. May not be necessary if you use them immediately for rendering in JavaScript, as JavaScript (also) discards decimals on render:
r = Math.round(r); g = Math.round(g); b = Math.round(b);
return {r, g, b};
}
its flat out easier
to paint oklab to a canvas
then read the pixel colors
as uint8
then convert that to HEX
much slower tho probably
i mean it shouldn't matter but still
we should see if this works
we need it for Vesktop anyway
and you could also use it for your PR
except for the part
where its inside vesktop only
and not a utility
and except for the part where noone is actually reviewing the PR
ยฏ_(ใ)_/ยฏ
also fuck the new refresh is fucking LAGGY
const {arr2hex}=await import('https://esm.sh/uint8-util')
const canvas = document.createElement("canvas")
const ctx = canvas.getContext("2d")
canvas.width = 1
canvas.height = 1
ctx.fillStyle = 'oklab(0.323409 0.00288205 -0.0101295)'
ctx.fillRect(0, 0, 1, 1)
const img = ctx.getImageData(0, 0, 1, 1)
const color = console.log("#"+arr2hex(img.data))
#323239ff
ez
its actually #323238ff but its close enough
considering the colorspace conversion
ah, so thats why my discord is lagging
what am i looking at
discord having a spasm
and constantly re-mounting some padding component
which is re-painting the entire window each frame
i'm doing nothing btw
is that why it's lagging with css
when I was debugging performance it had so many long recalculate style entries
that's why I even thought of CSS being the culprit (and it was), but Discord has to be doing something wrong to cause this
nah its one of many things
css being laggy is another story
i fixed it for the most part by simply doing
* {
will-change: scroll-position
}
that removed all scrolling perf problems
but there are still quite a bit more issues
typing for some reason re-paints the userlist sidebar for each character
and if you're connected to VC, some icons on the left

* {
will-change: all;
}
u cant stop me
almost as insane as nookies' plugin that memoises every discord component
idk if placebo or not but this really feels better
fortunately all doesnt exist, but if it did, it would work the same way as transition all, which means it would apply to stuff like transform, which means it would RESET EACH Z INDEX CONTEXT FOR EACH COMPONENT
open dev tools, open rendering tab, enable paint flashing
and scroll chat
with and without that css
will-change scroll-position doesnt change z index contexts, it preserves them, while rendering scrolling via GPU, so its actually a "free performance" css flag
would probably be better to only apply to the right elements tho, no?
and if it actually makes a difference, why don't they do it
there are very very rare edge cases where that's not the case, but thats only if you were already using will-change or are using transforms on weird properies
i cant tell if you're pretenting or are actually that stupid?
urs seems like it would override other will-change directives
you're expecting basic competence from discord developers?
you're insane
yes, thats exactly why its not backwards compatible, all other will-change properies reset the z-index context
so overriding it, means you no longer reset the z-index context
which is in theory breaking
fortunately discord developers are too retarded to use semi-modern css, so they never used that property
so this is trully a "free perf" case for discord
nah they have it a few times
will-change opacity is rarely useful, because taht only helps when going from not having opacity defined, to having opacity defined
which you'd never do
aka when switching rendering contexts from CPU to GPU
transform3d is useless, because you'd already have it defined too
transform can be useful for togglable animations, but rarely does much
yeah I was wondering about this
since opacity should already be GPU accelerated
^
as u linked above
its good if u dont want to use the transform hack
because it'd override ur other transforms you'd have in animations
but if you havea animations that switch between trasnforms you have other issues
it can be useful if you're doing perspective shit, but discord doesnt do parallax
i wish css had a way to not override
will-change contents is unironically good, but difficult to use
have properties cascade
nono
i mean have a way to merge them
.foo {
transform: translateX(10px);
}
.bar .foo {
transform: translateY(10px) attr(transform);
}
something like this
ah, propery merging
idk how the syntax / naming would look
no it'd be opt in
via some function
like attr(transform)
by default it doesn't merge but you can merge
if you need to opt into it, you might as well just write the transform with multiple properies

effort
1:1 the same effort
you'd need to spare effort to opt in anwaysy
anyways, review webpwa
dont whip me motherfucker
awww
you like that, dont ya
man cant do any suggestive wording
shit gets blocked
i saw ur spendings
50% anime waifu figurines, 30% food, 20% renting a dominatrix
nah im unhinged
there's a difference
i'm highly functional, insane people arent
anyways tell me, do you still support firefox?
does userscript have is_extension defined as true?
nop
yes
web-metadata.ts: Lines 7-19
export let EXTENSION_BASE_URL: string;
export let EXTENSION_VERSION: string;
if (IS_EXTENSION) {
const listener = (e: MessageEvent) => {
if (e.data?.type === "vencord:meta") {
({ EXTENSION_BASE_URL, EXTENSION_VERSION } = e.data.meta);
window.removeEventListener("message", listener);
}
};
window.addEventListener("message", listener);
}
content.js: Lines 14-20
window.postMessage({
type: "vencord:meta",
meta: {
EXTENSION_VERSION: browser.runtime.getManifest().version,
EXTENSION_BASE_URL: browser.runtime.getURL(""),
}
});
oh i will
seems cool enough
yah i know, i also use it in my plugin
because you dont have an "extension only" build target
because web is both vesktop and extension
it makes sense
vesktop is considered both desktop and web
because all web plugins also make sense on vesktop
yeah but ur build targets should be singular, like all compilers do it, and instead have targets defined as array
so instead of doing .web
there's a more specific tag for DiscordDesktop only / Vesktop only but for web there was never a use case for this
cant really think of any other use case than pwa
im sure people would come out with some extension specific plugins
but extension interest overall is low
why cant the PWA work on userscript? besides shortcuts I don't see anything that wouldn't work there
This plugin lets you quickly view role members through a submenu in two contexts:
Dev Context Menu
Message Context Menu
Key Technical Points:
- Chunked Fetching:
Uses FluxDispatcher to dispatch multipleGUILD_MEMBERS_REQUESTevents, ensuring ...
i think same reason that css doesnt work in us
URL.createObjectURL
oh does CSP lock it
yes
ah okay and this is the only way to get pwa working?
yep
it needs to be a specific link element mounted to dom
only way
there actually also used to be a service worker requirement
but they removed that
as in W3C did
TamperMonkey has a CSP bypass but idk if it will work for this
i think it's only for GM_* functions
and ff doesnt have any of these features
why is ff so bad
uuuuh
its bad because it doesnt support a fuckload of W3C standards
but i think your question is more of "why do they arrive at those decisions"
have you tried a data url instead of a blob
but that's not public knowledge, for the most part i assume they dont like draft specs that chrome suggests
idk if discord csp also blocks data urls
no because i have little interest in userscripts
and even less in making only 1/2 a plugin work on userscript only
and then making coniditonal userscript checks for ff and chrome
its just asking for cancer and confusion
especially considering i patch the borwserNotice component
i guess that could be conditional too
uuugh
shivers
naah
if you introduce a separate userscript and extension build target i could
but that means there would be 2 plugins for this
or 3 probably for the core functionality, unless you're okay with importing utility functions across plugins
i wasn't but i will now :p
This plugins automatically detects the 'Join Servers For You' scope in all authorization links you click in your desktop client and strips it out. Effectively not granting that scope to the application.
This plugin can break some apps if they check the scopes you granted them, but that can be easily fixable by just disabling the plugin for little while.
Here is little showcase how it works:
https://github.com/user-attachments/assets/b21965f1-4e9d-4e1a-b1ef-bd413f0c52ef
@austere talon sry for ping, but considering, should this be enabled by default? it feels like the notifications and keybinds should be at least... when looking at other force enabled plugins i'm torn on it
like web context, keybinds and screenshare are, and they fix... what discord is missing and rly should have anyways
this... kinda feels like that? but not all of it?
idk
since you said you'll review it, i'm putting actual effort into this, https://cdn.discordapp.com/emojis/1207393766458007562.webp?size=48&name=kekwolf
capture t and n instead of using them directly, they may change
oh good idea, I completely forgot you can do this
true
[Vendicated/Vencord] New branch created: decorators-gap
fbc0965 Properly wrap decorators to avoid adding margin - Nuckyz
vtest dev2
Now testing! 
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
wait ehh that's the wrong commit
shit, what inspired every1 to fix their css all at once all of a sudden
Lag
not1 gave a fuck before tho
begging for y'all to just come up with One Good Solution soon
that was unrelated lol
AI pr desc 
so true
?
@rugged spire i will take all good solutions add into InRole and make it the ultimate role member viewing plugin
Isn't there already an open PR for this that isn't AI slop
speaking of which i need to merge ryfters pr
the name for it is horror
oh so something did get sorted out?
he PRed improvements of his plugin to mine
ill merge today probably
i should make a rolepopouts plugin
i do feel like a plugin like this should not be in upstream
soooo many will ask "why doesn't it have all members"
add disclaimer icon to modal header
maybe make default enabled hidden setting to show a warning
doesnt have to be hidden
just set a description that explains that it shows a warning to stop people complaining in #๐ฅ-vencord-support-๐ฅ
thought you were talking about my commit
idk
just seen like 3 commits related to css perf
then every1 in theme dev is suddenly rallied around perf
Because a ton of people's discords have been horribly laggy all of a sudden the last few days and fixing the css fixes it
I REALLY want to do this but I can tell it will just be recreating stock UI. PermissionViewer reuse, and a lot of FriendBar components
I was having perf issues even before discord did a discord - perf on on linux is just not as good as I had on windows but might be my cpu/gpu is just clocking much lower when "idle" on linux idk
i will not
it does use member ids endpoint
it's so rare to see somone mention a role anyway
I've changed the decorators API a bit, so now if you want to use them you no longer need to manually add margin or align vertically in messages. If you want those changes just merge dev into your branch
For the NicknameIconsAPI, I will work a bit more in improving PlatformIndicators and then I plan to merge that into dev as well, shouldnt take much
@median rapids I think memoize all breaks mentions lol
@median rapids
works for me
oh clicking them
yeah it does lol
(the plugin leaks memory rn too)
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
yk funnily
they still work in embeds
maybe it's placebo but server switching does seem a little faster
it also breaks clicking the xxx new messages bar
๐ญ
bump plz check this out!! :3
This should use the media proxy only for gif stickers, the cdn otherwise. Also max size is actually 4096
You should never need to fetch the sticker. Messages have all needed information in the sticker_items property.
checked it out :3
lol that's copy pasted from StickerCloner https://github.com/Vendicated/Vencord/blob/main/src/plugins/emoteCloner/index.tsx#L59
index.tsx: Line 59
return `${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${data.id}.${StickerExt[data.format_type]}?size=4096&lossless=true`;

i used it as a base for learning how menu components work
yay will fix tmr
the reason i downscaled to 2k is that it's massive in the chat
but i'll set it back
client theme causes massive lag when starting
and I noticed discord is taking longer to load initially too
it might be because of it
I swear to god why is it not aligned again
horror

actually I want yall opinions
maybe im retarded but they look the same to me
the timestamp looks misaligned in the first
nah pay attention to the center of the volume icon and the "Today" text
yea
exactlyy lmao
when it's perfectly centered it looks worse
welcome to the reality of design lmao
actually centered doesn't necessarily mean it looks centered
20000 force pushes 
we love
I hate how force push fucks up pr sorting ๐ญ
cause it updates all prs
so it resets the last updated
iirc it doesnt fuck with drafts
nop
i was wrong
imma make a selfapp to watch this channel and log all of the force pushes and who does it and then make a graph with that data
do
it's always gonna be me
make the graph but it actually logs nookies mistakes
?remind 7.5hr bump pr
Alright @fossil inlet, in 7 hours and 30 minutes: bump pr
what have you been force pushing ๐ญ
@fossil inlet, <t:1738564087:R>: bump pr
Even though its now a weekday, we should probably push a tag, the last couple times they have reviewed quite quickly so chances are we'll get it in before anything super breaking hits
Is this supposed to be like this?
Yop, decorations without trying to override original ones are good
The only thing that seems to be weird for me is that [ADMIN] comes before [APP], but it messages it goes in another direction
The only thing left is profiles, which currently requires 3 patches
( 1st is to make discord use our tags, 2nd to p...
yop
2nd to prop guild/channel to user profile
Just use SelectedChannelStore - it shouldn't be possible to open a profile for another channel I don't believe
that ^
Idk, seems right for me
or SelectedGuildStore if you only need guild id
I didn't knew it existed
but question, why is guild/channel needed?
Fire
to get permissions
ahh, right
Just use SelectedChannelStore - it shouldn't be possible to open a profile for another channel I don't believe
Fire, I didn't knew that this existed or totally forgot about it. Now i should just wait till new API drops and this plugin going to be gluten patch free
Edit: just remembered the new modal sometimes shows guild profile and sometimes global profile. I suppose that could cause problems.
Eehh, it's still a draft and we have time to see how it behaves, but SelectedStor...
Also profiles don't have any tags by default, so [APP] tags are missing there
I might just render 2 tags at the same time to stay consistent with every other field, but it is worth it?
Toast types changed from enum to strings
lint fail
Yeah I missed a type
@scenic brook did they change on discords end?
Should be good now
Yeah
As opposed to js return e[e.MESSAGE = 0] = "MESSAGE", e[e.SUCCESS = 1] = "SUCCESS", e[e.FAILURE = 2] = "FAILURE", before
formatting smh
Third time lucky
@median rapids can u send me an example of a sticker using the cdn
i have no idea how to find the url for it ๐ญ
wait nvm i could go to the docs it probaly has it
its the same
but yeah
copy discord code
render
crash
Wouldn't it just return 3 no matter what?
are stickers always uploaded as LOTTIE's?
im not sure
cuz like
uhhhhh

i want it to check if it isnt a png or lottie
and then change it to the other endpoint
in a programming perspective it doesn't seem right, but I won't be suprised if it did work
![1,3].includes(data.format_type) - ?

It'd just evaluate to if(3) all the time like hen said
keep it simple, !(data.format_type === 1 || data.format_type === 3); 
how do you- nvm
I would prefer this one, but yeah
nop
most if not all stickers are just images
idk if you can still upload lottie stickers
this does not do what you think it does ๐ญ
why ru doing this backwards dawg
just check if it's a gif and use media proxy, otherwise use cdn
๐ญ
Adds a button to add attachments to an existing message of yours
i've been too lazy to do that but i wanted to
didnt know that was even possible
Wtf
are you shocked at the code quality or the fact that you can even do that
That you can do it
Okay this is just silly... This is the index of the file, you don't need to input a random number just insert the length of the current attachments (that'll be the right number)
is there a reason of why those two are the same but with different names?
nvm ig vencord web is outdated
the plugin was renamed
or better yet just generate a snowflake
i mean yeah that works but its not a snowflake on discords end so generating a snowflake is kinda redundant
it just happens that the current attachment's length is the expected value (its just adding one, not reordering), though anything bigger than the current attachment count works
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
waitForComponent(o=>{let r=o;for(;r!=null;){if(t(r))return!0;if(r.$$typeof)if(r.type)r=r.type;else if(r.render)r=r.render;else return!1;else return!1}return!1}...)
Bad Starts
None
Discord Errors
None
ugh
damn
SearchModal.tsx: Lines 604-619
const setSelectedCallback = useCallback((e: DestinationItem) => {
setSelected((currentSelected: DestinationItem[]) => {
const index = currentSelected.findIndex(item => {
const { type, id } = item;
return type === e.type && id === e.id;
});
if (index === -1) {
return [e, ...currentSelected];
}
currentSelected.splice(index, 1);
return [...currentSelected];
});
}, []);
thanks
so can someone explain to me how it causes a TypeError: Cannot read properties of undefined (reading 'length')
i dont fucking get it
My guess is that currentSelected is undefined and it errors when spread
nop
it doesnt get executed
i can put error throws and console logs none of them do anything when that error happens
neither does changing the dep array do anything
and if i remove the usecallback react complains about rendering less components than expected
vtest dev2
Now testing! 
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
waitForComponent("ref:this.ref,preload:")
Bad Starts
None
Discord Errors
None
guhhhhh this is making me go insane
vtest dev2
Now testing! 
Bad Patches
None
Bad Webpack Finds
waitForComponent("ref:this.ref,overridePositionRef:", "renderPopout:this.renderPopout")
Bad Starts
None
Discord Errors
None
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
ughhhhhh
Multiple people have been complaining about NotificationVolume not working but i don't really wanna test it right now, just thought i'd put it here if it is an actual issue (reporter says nothing so idk if its just user error)
vtest
Now testing! 
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
[Vendicated/Vencord] New comment on pull request #3179: Updated the way animated emojis are detected
@Nuckyz
Any ETA on this getting merged some friends keep complaining that it doesn't copy right.
No rush just wondering?
Bad Patches
None
Bad Webpack Finds
None
Bad Starts
None
Discord Errors
None
@quasi surge there you go
imagine not getting it right now you have to wait another week
a sole leading backslash can escape the capturing group created by \i, leading to a regex syntax error
patch helper used RegExp(//) as a syntax check
and \\i is valid regex
Also profiles don't have any tags by default, so [APP] tags are missing there 
I might actually try my horror setup to check it
1 - discord original tag
2 - I've found a more specific thing
@limber skiff does it look better for you?
That's cool, are you doing the regex replace in vencord or in the ide?
I kinda have to do it in vencord because my plugin is written in java and the regex engine is slightly different
@crude hearth love?
Ew I just reloaded and they gave me visual refresh
can the user/domain lists have a whitelist/blacklist mode when auto-hide is on? there's definitely interest in hiding all by default.
This only act as blacklist when auto-hide is on.
What auto-hide toggle do is just to enable/disable the blacklist mode. I could change how the toggle is named to make it more clear.
how did bro write vencord plugin in java
I've been getting audio sink errors in console that might be related
this is broken too
cannot read properties of undefined
dunno if its just a canary bug tho
Ide
@odd heath do you like?
One of the few parts I envy about writing ts to work with ts lol
Horror
Use some regex library
I need this
It's available as a user-plugin and I'll update my version on the marketplace soon
Okay then we should probably throw something in known issues
the question is why are no patches broken then
i assume something like that would use one
dont think so
ive been getting those for months
they come from the place that gets patched by notificationvolume though
idk i wouldnt be surprised if they related in some way
but im not familiar with how that stuff works
someone should fix this though it spams console a lot lmao
I think it's a discord audio issue because I got them from the place where discord handles call audio
Yeah but if it always happens on all audio played it could prevent the plugin patch from having an effect, no?
hmmmm, ill look at it later 
It patches like 2 lines above the error that's why I'm saying it could be
Also please look at my PR and tell me how tf that error happens ๐ญ I'm losing my mind /srs
yeah something is wrong with notificationvolume 
@odd heath is there an easy way to test without getting a notification
NOP
Open alt and spam dms

Also it only happens on desktop for me
Can you just use the preview button in notification settings?
Yeah I haven't seen any audio error on vesktop either so that'd check out
heres the thing
the only other time ive seen that error was on vesktop
Guh
I had both vesktop and desktop running, vesktop only had the error for the toolbox because of canary and desktop had audio sink errors on stable, I didn't look at canary
Hm
I'll try it again if it happens for me or not
Look at my PR in the meantime pretty please :3
?remind 5pm
Alright @fossil inlet, in 5 hours, 41 minutes and 27 seconds: โฆ
It's a pretty easy fix, I'd pr but I gotta work
idgi
They just added overridePositionRef in the middle of the current popout find
huh
the find just worked for me
did discord do a silly revert
ah no its just fixed on dev
omg im so dumb
Oh lol
cant repro either anymore
on linux
Iirc its fixed on dev
Toolbox, not the audio
it is, yes
Yes notification volume actually affect way more than notifications, by example the mute and the deafen sound or the voice channel join
(and it's why i love this plugin, i have notifications disabled, but lowering the volume of the app without lowering the volume of people is W)
there are two occurences ensureAudio now
_ensureAudio() {
var e;
return this._audio = null !== (e = this._audio) && void 0 !== e ? e : new Promise( (e, t) => {
let i = new Audio;
i.src = n(451343)("./".concat(this.name, ".mp3")),
i.onloadeddata = () => {
i.volume = Vencord.Plugins.plugins["NotificationVolume"].settings.store.notificationVolume / 100 * Math.min(l.Z.getOutputVolume() / 100 * this._volume, 1),
u.isPlatformEmbedded && i.setSinkId(f),
e(i)
}
,
i.onerror = () => t(Error("could not play audio")),
i.onended = () => this._destroyAudio(),
i.load()
}
),
this._audio
async _ensureAudio() {
if (null == this._ensureAudioPromise) {
let e = Vencord.Plugins.plugins["NotificationVolume"].settings.store.notificationVolume / 100 * Math.min(l.Z.getOutputVolume() / 100 * this._volume, 1);
this._ensureAudioPromise = h(this.name).then(t => null == t ? Promise.reject(Error("Failed to load audio: ".concat(this.name))) : (this._audioContext = (0,
a.N)(),
this._gain = new GainNode(this._audioContext),
this._gain.gain.value = e,
u.isPlatformEmbedded && this._audioContext.setSinkId(f),
this._buffer = t,
this._source = this._audioContext.createBufferSource(),
this._source.buffer = t,
this._source.connect(this._gain).connect(this._audioContext.destination),
this._source.loop = !1,
this._source.onended = () => this._destroyAudio(),
Promise.resolve({
context: this._audioContext,
gainNode: this._gain,
source: this._source
}))).catch( () => Promise.reject(Error("Failed to load audio: ".concat(this.name))))
}
return await this._ensureAudioPromise
}
one is the old which the plugin already patched, and which should still be working
how nice of Discord to not mangle those
and it is working
so the question is why patching WebAudioAPISound throwing errors too
one is the replacement of another
it has to be related to this
I was wrong it is this 2024-03_web_audio_api_rollout
@granite sky, <t:1738649742:R>: check if this is true
okay, looked into it, the setSinkId error is not caused by us and is simply malfunctioning discord code
NotificationsVolume works fine with both audio APIs
it still works fine even when erroring, from my tests
honestly, I'd consider blaming electron, I've seen this issue in electron itself when i was fucking around with barebones electron ages ago
sounds play normally
I tried the mute button, calls that method, plays normally and with lower sound
they are just trying to set the sink to "default"
which I'm pretty sure does not work like this and every sink has its proper id
anyways, nothing on us and everything is working
the ones complaining it doesn't work are probably from the extension
I hate to say it but ClientThemes need a rewrite too
try looking for ||'default'
TLDR IIRC there are some cases where deviceId simply isnt returned because chromium
yeah i looked at it the other day and what the fuck is going on there lmao

