#๐พ-core-development
1 messages ยท Page 242 of 1
you dont have to make a new pr for each commit bro ๐ญ
please you don't need to close and open a new PR every time you make one change... that's not how git works. you just push your changes and they will automatically be added to your existing PR
and this plugin violates our plugin rules so it won't be accepted anyway
guzh i wanna make that
Maybe they're different in some languages
prob for different parts of the ui
incredible
But probably not
not /j
arrays for settings are an important feature tho 
hack vee
merge
I lost my mind trying to debug your code 
why so
i literally just stole it from discord 
I give you the right to steal my code that does this for the stock icons under the condition that you don't get mad that Discord breaks patches by adding a single character
TRUE STORY BTW
im not there
happened in vencord before
love
i will disptch tinby drones in stuttgarts einzugsgebiet thast will check every single pc of like 2 million ppl 
whats that even
discord is actually in the process of nuking said button anyway
@left sequoia's PR that makes discord work properly as a progressive web app
why is it called web portable web app (unless thats not what it stands for)
whats a rogressive web app ๐ญ
which in theory is possible, but utterly useless
@left sequoia Post haven pwa site show the cursed file handler thing
Installable web apps and other special APIs
its simple tho?
its 3LOC
its a normal thing idfk

The functionality seems cursed until you realize that it's actually a reasonable feature
i see
its reasonable because you dont duplicate chrome processes, instead re-use your already running browser, other than that you get most of the desktop features, a dedicated shortcut, auto-start on boot, global keybinds, notfications etc
settings array better tho
Did you see what I said in #๐งฉ-plugin-development about 2 days ago about settings arrays
NOP
I'm sorry for spamming it wasn't my attention to spam. And second, if I fixed the code to follow the rules of Plugin Rules as you say, would that work for you?
what if plugin that just moves these buttons into one single button
that when hovered opens a tooltip
with the buttons
vencord lore 
thats kinda mid
yop
Unironically I also had this idea
there's no point tho, ui refresh is moving the buttons under the text chat
^^^^^^^
ui refresh will literally come out in 4 years
i was just about to say it would go to waste due to that
from what i've seen they are already doing A/B testing tho?
this is ugly af anyways lol
DISCORD LOVES FOLLOWING STUPID MODERN DESIGN TRENDS OF WASTING SO MUCH SPACE
padding is gut doe
so desperate
u have no idea
shrimply make a huge pr and find out a month after you made it that the whole thing has a major bug
good in moderate amounts
they are literally adding padding to stuff in visual refresh without making the container bigger so the items end up being smaller (server list)
there's not really much that can break? the only thing that could break is the one discord patch where i re-enable the top menu bar on web
I am referencing a PR that I made
isnt that just like vesktop though
exactly
XD
this quite literaly just competes with vesktop
tho from my understanding it will fall short in the "media handling on linux" part, since chromium still doesnt to it well?

but for the pentium with 4gb of ram users this goes hard for reducing resource usage
vesktop aimed to solve screensharing being broken in the past with something that works for most people but it's still not perfect and there is a real place to complain about it so people complain a lot
yeah in my case its a "dont give a fuck, let ur chromium browser of choice handle it"
its entirely an audio and gpu acceleration issue
but problem is, screensharing is hardcoded to 720p30fps
one of those is a vesktop issue that nobody really complains about and the real issue is a chromium moment
guh
i'll make a plugin to fix it on web, but only once webpwa is actually merged
since its a big undertaking, and there's 0 reason to do it, if the base for it isnt merged anyways

this is the only thing i'm not sure about in the entire PR: https://github.com/Vendicated/Vencord/pull/2994/files#diff-b32300293009f0ca27672bfd87c981507c954f5b005f3a507651914a340d82c1
idk how else to define types for this
is this a typescript not having support for standard web apis moment
ts doesnt type shit thats only in some browsers
^
which is why i added it, but idk if adding it as global is a good idea
settings.tsx: Lines 213-214
// @ts-ignore Typescript will add userAgentData IMMEDIATELY
|| navigator.userAgentData?.brands?.find(b => b.brand === "Chromium" || b.brand === "Google Chrome")?.version
idk what ur practices for that are
I was going to mention this
My brain too eepy
gonna bump u down a cliff soon
bump
as long as it doesnt take six months 
Fix the plugin (it didn't work)
tfw dms
it doesn't work in dms because it uses the wrong input type
that fix is likely valid
though don't like them putting themselves as an author for that though
it says I can contribute fix freely in CONTRIBUTING.md
ah
the echo command from MoreCommands also uses the BOT type so that also can't be used in dms but i don't think thats a big deal lol
thats the only use left that haven't been changed
Wonder why users make it so cryptic though and then get confused when the devs close their PRs
like at least say why its broken (or why you think that)
Sorry for misunderstanding! The plugin does work, it just doesn't work in DMS. Try to be more specific next time
Thank you for the fix

@austere talon i think you should make the reporter link to the workflow run if its too long for a message
maybe
if thats even possible
Try to be more specific next time
comes off as a bit blunt and rude
not in my opinion
yeah sounds fine
idk how else you'd say it
i mean maybe "Could you be more specific next time?"
that's about the same level of passive-aggressiveness
??
you're insane
Okay
nop
it's true
guh
didnt say i dont agree with it, i just dont like the way it comes off
someone tell discord to enable concatenate modules optimization
they have modules which just export a single string
It has some very
behaviour
they already had it enabled in the past
Not saying it won't work for them, but I've ran into some interesting issues with it
@Feathers8 because many PRs or even 1-line simple fixes stagnate for months to years and maintainers decide which plugins can exist rather than users/devs, due to everything being centralized.
It is possible to open devtools in the QuickCSS editor, which serves little purpose since it's impossible to inject anything into it, and can cause confusion in case it is accidentally focused instead of the main app.
incredible
someone smart enough to use quickcss should be smart enough to know the context of their devtools window
this is just a bad idea, most users, while not using devtools themselves, at least know how to close them. there is no harm in keeping them open.
anyone that could get confused by which window devtools is open in for more than a few seconds, wont be using it them the first place
i have used devtools in quickcss before for debugging csp issues
Thatโs actually a really valid use case
i've used quickcss to check if vencord fixed the extension
cuz when its broken it flat out dont open
XD
yeah this pull request was a bad idea
had to screenshot some stuff related to quickcss devtools for vee
because it just broke all of a sudden for the chrome extension for some reason

I fixed it btw
well
i didn't
it fixed itself
idk how or why
Like
I could reproduce the whitescreen
made some unrelated changes (updated esbuild from v15 (very old) to v24)
but with those changes it works again lol
maybe it was some esbuild bug or smth
Like all I did was update the bundler config, I didn't change anything about the quickcss window or updated the library or anything
gotta love changing nothing and it fixing itself lmao
@austere talon what if we decrease the time considered slow for a patch if testing in stable
since it runs way less times (which means more unlikely it to have a slow patch that is false)
and then we can increase a bit in other builds to avoid this #1337479880849362994 message
if a patch has constant 3+ ms that means it is slow, for example
and if we keep increasing the number we cant catch that
how is that even a slow patch 
its just raw text
nah its just the engine shitting itself
wonder how long it takes if you just remove the lookbehind and add $&
love
https://discord.com/developers/docs/events/gateway#sharding someone will make a plugin to implement this
@dusk blaze will
Alright @fossil inlet, in 2 days: not a terrible idea
real
what is a shard

i'm unfortunately not That One Person In Particular Who Knows Fucking Everything About The Inner Workings Of Discord Without Being An Intern And No I Am Not Saying They Should I Just Have An Avid Dislike For Them

Allows you to split gateway events across multiple connections
oooo
It's used when bots are in tons of servers

But I still don't understand what's the point of implementing it on a user
Same
also kinda shady if you can do it at all it'll probably ban you
Content
https://github.com/Vencord/Vesktop/issues/1094#issuecomment-2659837206
@Vendicated I'm not allowed to write what I wish for you here, but you and your colleagues are pretty pathetic
Request Agreement
- [x] I have read the requirements for opening an issue above
Vesktop icon turned me gay ๐ค๐
Says the pathetic person who cares about a some words and colours 
Can confirm
Ever since I started using vesktop I turned into a girl
I haven't used vesktop myself so I resisted somewhat but I've seen the icon and it was traumatising
๐คฃ i sadly now wear developer socks and use arch linux since i joined this discord e^i/10 rating for the icon
LOL
i'm sure nvidia would be happy to ear they have such people in their team
iirc gameworks is like epic with unreal source
they have a bot that adds you to the org so you can access the source
i forgot why
the actual org is https://github.com/nvidia
ah ic likely with the CLA or smth
ye i think
COLORS is fucking goated tho
i wish we got to see more
peak animation
I want multiple gateways...
it works perfectly actually lol
what did you do lol
i've thinked about making some kind of weird modification to discord client to have multiple discord accounts active at once on a single instance to basically explode that limit
but every time i'm thinking this is way too hard for me to tackle, i'll just continue using the 4 available discord
for little context i'm in near 700* servers due to being active in many different kind of communities such as mc modding, other games, school stuff, etc
* 4 clients is fine-ish for now as i'm only really regulary active in like 350 of these
nothing good 
fixed it, just a quick jumpscare 
You may have a problem
wall of text
i'm trying not to
yes, at some point i was doing translations for a lot of stuff so i needed to stay in all the servers to get the pings and be able to contribute before the release
i could do some cleanup at this point since with my internship and my bachelor's thesis to finish uni, i don't have time to commit to stuff anymore
that would be nearly impossible to do
discord client is not designed to work like that
there is the option to build a client from the ground up with the unofficial user API docs, but you'd need to be mad to try that
people have tried that time and time again
i feel like it would be eaiser to just make a custom client
how many suceeded ๐
Is there no version history e.g. tracking the old code and seeing everything they change whenever they push an update, and not just the strings?
Because I really do wish to be able to see what discord did to break my patch
Your best bet is catching it in between canary and stable so you can look at the before and after
not officially
im working on something to do that on and off, so dont expect it any time in the future
I happend to only realise when my stable started crashing
I see
I mean I could start archiving old versions
and then vscode diff files?
your best bet is to locally cache a working build, then compare with what you see in devtools
isnt there a discord build archive
iirc just regular diffing doesn't work because there's a lot of noise from their bundler
this would be great for me
yea, but thats not formatted or split into modules iirc
oh
also from their intl system
ehhhhh ive had mixed results
best thing is just visually comparing with browser
man
An archive of Discord builds for all platforms.
ooo i know someone who is still on an older client version and i'll just ask them to give me the problem snippet
those look like native archives
oh yeah
what is a native archive
@torpid vessel still working on web archives ig
Descriรงรฃo
Este plugin adiciona um botรฃo ร interface do Discord para simular o estado de "mudo" e "surdo".
Como usar
- Ative o plugin nas configuraรงรตes do Vencord.
- Um botรฃo "๐คซ" aparecerรก no canto inferior direito da tela.
- Clique no botรฃo para ativar/desativar a funcionalidade.
- Use o botรฃo "โ" para desativar tudo e remover os botรตes.
Captura de Tela

what do i get from this?
I have results
but i'm not sure what to do here
the replace is just broken
my favourite event
didn't you say the find broke in #๐งฉ-plugin-development
this is my patch
the find broke like half a year ago
and i fixed it to this
what it is currently
well I mean
I didn't mean it in the way as if my find is broken
my patch for that find is broken
i see how that's misleading
what is the find for
okay then here it is
// [EXTRACTED] WebpackModule374005
// WARNING: This module was extracted to be more easily readable.
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
0,function(e,t,n){n.d(t,{b:()=>I});var i=n(200651),l=n(192379),r=n(393238),a=n(540059),s=n(720734),o=n(840780),c=n(235555),d=n(746508),u=n(210724),h=n(905423),m=n(316173),p=n(410575),g=n(981631),_=n(388032),f=n(195093);function E(e){let t=(0,h.Z)(e=>{let{guildId:t}=e;return t});return(0,i.jsx)(o.Z,{...e,guildId:t})}function I(){let e=(0,a.Q3)("AppPanels"),t=l.useRef(null);return(0,r.P)(t,t=>{let{height:n}=t;e&&document.body.style.setProperty("--custom-app-panels-height","".concat(n,"px"))},[]),(0,i.jsxs)("section",{ref:t,className:f.panels,"aria-label":_.intl.string(_.t.StREWF),children:[e&&(0,i.jsx)(m.Z,{}),(0,i.jsx)(u.Z,{}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(p.Z,{section:g.jXE.ACTIVITY_PANEL,children:(0,i.jsx)(E,{className:f.activityPanel})}),(0,i.jsx)(p.Z,{section:g.jXE.RTC_CONNECTION_PANEL,children:(0,i.jsx)(d.Z,{})}),(0,i.jsx)(p.Z,{section:g.jXE.ACCOUNT_PANEL,children:(0,i.jsx)(s.Z,{})})]})}}
//# sourceURL=ExtractedWebpackModule374005
It's probably old enough for your old patch to work
okay ty :D
You are amazing yippie
nookies smh
what?
give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime
he is asking for a diff from the old module and the new
I have the old module, so I just gave it to them
no trick to get it, I just have a client open for days without changes
literally nothing to teach lol
Oh, I see
I was wondering
wait no, i'm still wondering
why does it say extracted?
?remind monday finish live reporter + diffing + formatted modules + history
Alright @fossil inlet, in 3 days: finish live reporter + diffing + formatted modules + history
i meant teach them how to find the new bit
I used a vencord utility for extracting it
first off just test if your old patch works on it
yup one second
then if it matches it means it's the old one you want
just look what changed from the new one and adjust it
seems like it works
๐ญ
lmao
are you sure that's what it matched before?
I mean
I mean
No i'm not really sure lmao
maybe?
I mean it seems like it works
are you sure
yeah it fits in
lmao
...?
I love colorblindness
are you colorblind?
LOL
I was looking and couldnt find where the third group was
because I only saw two colors

the green and the blue
how can i copy a part of the code as minified?
btw
or can i minify it myself
okay done
Well
It changes what it matches
It goes to the function above instead
okay I shall
it says this when i try to run the patch:
oh wait
one sec
I don't exactly know what this means
I just assumed this means the match fails
just run the patch in the patch helper in settings
this by the way
eaiser to find out whats wrong
means after the replacement applied your code is invalid JS
oh i forgot about that
hm
man i would love to have the settings button right about now
that completely nuked my user panel
๐ญ
is there a hotkey to open settings?
wait nevermind
i'll just remove the patch first
that is strange
it adds an additional quote
(no)
๐ญ

...
that it's not your fault
i see
it's just the patch helper and dev companion broke
but the actual patch still works
and if it doesnt it's not because the patch is broken but something else
yeah
this only impacted patch helper and dev companion
or else everything would be broken
and they are not
hmm
yippiee
but then again
the function's second and third param are undefined
which is odd
this being undefined is expected
hm
did it use to have?
likely not the issue then
yeah
const modifyWebSocket = () => {
WebSocket.prototype.send = function(data) {
if (isFakeDeafenEnabled && data instanceof ArrayBuffer) {
const decodedData = textDecoder.decode(data);
if (decodedData.includes("self_deaf")) {
const modifiedData = decodedData.replace('"self_mute":false', '"NiceOneDiscord"');
const encoder = new TextEncoder();
data = encoder.encode(modifiedData).buffer;
}
}
this.originalSend.apply(this, [data]);
};
};
sweet baby jesus
i saw that ๐ญ
would discord notice "NiceOneDiscord"
it's overriding the websocket send
i know that, but i forggot the websocket used json
I do think it used to have now, because the error is because the third param "functionArguments" is empty in Reflect.apply()
and this is the first time this is causing an issue
componentResult = Reflect.apply(oldComponent, thisContext, functionArguments || []);
doing this fixed the issue
but only made it go down the line
you love AI
it probably picked this up from some of the existing FakeDeafen plugin
it's not his code
wdym i never published mine
@limber skiff didnt discord add react-dnd a bit ago
since ages
lmao

lovely
tbh it might be better to just copy and paste it so i dont have to rely on a find
theres one in a github gist iirc
vencord users always taking my bait
love the unused var
i found it in discords source bu searching from the source on npm 
@long stream did you ever test again if you can still get old upload limit by changing the build number?
just ask an aliucord user 
one of my friends did and they confirmed it didn't work iirc
@astral birch hii im pretty sure it was u
me but I got nitro
file uploads are limited to 10mb everywhere
@fossil inlet holy shit
I was right, by making patched source be the same string used as the eval JS doesnt make a new string for the source
it's the same reference
yeah
kinda
eval(patchedSrc)... original.patchedSrc = patchedSrc
instead of let patched eval(...) ... original.patchedSrc = patched.toString()
it was a guess I did and it turned out to be correct
another guess was that when you use a Proxy it's handler is a single referenced shared among all
and that was also right, so we do avoid creating a lot of new functions and closures
love
@limber skiff does this happen for you when clicking on the gift button
Vencord: v1.11.4 โข 8773d057b (Dev) - 14 Feb 2025
Client: canary ~ Vesktop v1.5.4
Platform: Linux x86_64
โ ๏ธ Vencord DevBuild
โ ๏ธ Has UserPlugins
not running my horrorcode
should we be
nop
why does it error tho
oh my god it's returning a module from discord wreq
ngl huge discovery
that means my implementation has some issues
yes, catching it is incorrect, but it should also not be having issues
okay I know why
horror
is has 0 total scrobbles
bro
I told you this was gonna happen ๐ญ
guhhhh
it is because of that but not really
the issue is we ended up catching an instance we shouldnt be
I know how to fix it breaking stripe webpack instance
but I also need a way to ignore it
if you can fix the error, cant you just remove it right after its added (as soon as you can check the baseurl prop or something else like that)
I can fix it
but it is not how I want
okay
I need an old sentry build before we started erroring it to disable
I have a good idea, I just need to check something
this got more complex than I wanted it to be
im in hopital :c
An ampersand was missing, causing the logs to show a warning, this fixes that.
That seems more like a faulty config imo...
Though I guess requiring ampersand for explicitness isn't completely unreasonable
this has nothing to do with missing an &, it's just that our bundler was outdated and didn't support css nesting yet, but that was recently addressed via https://github.com/Vendicated/Vencord/commit/5196c2adc0fe348d66dacde7e04d3247f58dc073
I would like to have the vimium browser plugin available, now it doesn't need to be a vencord specific plugin.
does vencord support JS injections? or any way i can grab browser plugin in vencord?
or any patch i can put on vencord to enable this?
Check out how vencord loads the react devtools extension
yeah, just went through that ig i just need to replace the url there to pt at vimium and do the build.
I've just looked at the vimium documentation; I don't think it would be as simple as just injecting their extension (for example, what element to scroll, the vomnibar isnt really needed or compatible)
Have you tried vimium with vencord in your browser?
I would HIGHLY recommend trying that before attempting to inject the extension with Vencord (so you don't get disappointed that it doesn't work after you put a lot of effort in)
isn't electron chrome extension support very limited?
I have not, but one of my frnd uses it on browser with vencord, vencord is injected via tampermonkey
how well does it work?
iirc last time someone tried to get vimium working it didnt.. sooo
better off reimplementing it as a plugin
he says it works fine, and tbh i just want a few of it's features like f one and some other,
as it is obvious F will fail coz discord client won't have another tab option.
I was thinking if vencord could extend discord's keybinding ability somehow, and then user can map their suited binds for stuff.
Implementation of modes like insert and normal will be overkill and overimplementation. just switching focus and clicking on available stuff how vimium highlights and does will be nice.
is there an easy way to extract a webpack module?
turn on consoleshortcuts and use wpex
@limber skiff thoughts on an extension for regex101 to get it to support \i
I wonder if monkey patching RegExp is enough
Sorry we must sell enterprise license ๐
@fossil inlet do you love github being used as an issue tracker
Nop
regexr is, it doesn't have as many regex flavors, but it kinda doesn't matter
gskinner/regexr
Does vencord have an API thing that lets me add a button above my user panel?
because I managed to fix whatever was broken, the regex was missing a \)\}
it does not
There's usually apis for things if there are multiple plugins that use them
btw
the way you are wrapping the old components you dont even need to pass this or functionArguments (they actually dont do anything how you did it)
by wrapping you create a closure which means they would alrady have access to any variable they used to do before
so just wrap and call the function normally
const componentResult = oldComponent()
either wrap, look how you wrap it
function(){$1}
so by calling that function with functionArguments it does not change anything, because your function doesnt even name any arguments
idk honestly
You're right
@fossil inlet you are not gonna believe how much more work I had to do just because of this stripe thing
still finishing it
Oh lord
I'm scared
but basically because I dont wanna hardcode discord endpoint here
I had to take another route which ended up being super complex
vtest dev2
Now testing! 
Seems like everything is working fine (for now) 
FakeNitro (took 6.2ms):
ID: 937889
Match: ```
/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/
okay I think that is it
@limber skiff love all the comments in the new patch webpack
Will make things a lot easier when I go to understand it 
kinda tempted to make a plugin which converts all translates into translate3ds
oh right i got distracted and forgot to elaborate
translate3d is INSANELY faster than just normal translate
on a scale of "its unfunny"
i have a wild idea for a plugin
allow the laptop camera to take pictures just like on the mobile app
Youre lucky Im not at my computer
....why?
i dont have access to my 1984 gif folder
I'm not sure how you could do this
Really? Thought translate(x,y) was identical to translate3d(x,y,0)
I might be crazy but couldn't you just regex it on css chunks
I mean replace the CSS chunks
Idk if thats possible
by deleting and re-creating the element, yes
if i had not nuked all the UWP apps
also the goal is to basically have better integration
instead of doing smth like opening OBS, taking a screenshot and pasting i could just click the + select the camera and done like on mobile
insane windows debloater moment
@fossil inlet, <t:1739516579:R>: not a terrible idea
functionality wise yes!
rendering wise nO!
translate3d doesnt cause any paint updates
while it does cause render updates, because duh it needs to render to display, it doesnt cause paint updates, which is insane cuz u can make entire animation or render updates using JS without any paint updates
this could help out a lot when it comes to massive discord servers esp for moderation and the amount of roles they have
moderation
just use the FUCKING member tab
I'm sure users are very interested that it uses FluxDispatcher
maybe it's a good thing ven doesn't allow custom plugins by default
i think vee should accept all pull requests
vtest dev2
Now testing! 
why haven't we done this before lol
Seems like everything is working fine (for now) 
Seems like everything is working fine (for now) 
vtest dev2
Now testing! 
my discord is fucked rn
waitForStore("DraftStore")
waitForStore("UserStore")
waitForStore("UserProfileStore")
waitForStore("ChannelStore")
waitForStore("SelectedChannelStore")
waitForStore("SelectedGuildStore")
waitForStore("GuildStore")
waitForStore("GuildMemberStore")
waitForStore("RelationshipStore")
waitForStore("PermissionStore")
waitForStore("PresenceStore")
waitForStore("ReadStateStore")
waitForStore("GuildChannelStore")
waitForStore("MessageStore")
waitForStore("WindowStore")
waitForStore("EmojiStore")
waitForStore("ThemeStore")
mapMangledModule("defaultLocale:"en-US"", {
t: (m) => m[props[0]] !== void 0...
})
findStore("ChannelRTCStore")
findStore("ExpandedGuildFolderStore")
findStore("SortedGuildStore")
findStore("AuthSessionsStore")
findStore("ApplicationStreamPreviewStore")
findStore("ApplicationStreamingStore")
findStore("ClientThemesBackgroundStore")
findStore("StickersStore")
findStore("StickersStore")
findStore("UserSettingsProtoStore")
findStore("RunningGameStore")
findStore("UserAffinitiesStore")
findStore("GuildMemberCountStore")
findStore("ChannelMemberStore")
findStore("ThreadMemberListStore")
findStore("PrivateChannelSortStore")
findStore("SessionsStore")
findStore("ActiveJoinedThreadsStore")
findStore("GuildAvailabilityStore")
findStore("UserGuildJoinRequestStore")
proxyLazyWebpack(() => {
const { Store } = Flux;
const SpotifySocket = findByProps("getActiveSocketAndDevice");
const SpotifyAPI = findByPro...)
findStore("TypingStore")
findStore("UserGuildSettingsStore")
findStore("VoiceStateStore")
findStore("MediaEngineStore")
findStore("PendingReplyStore")
Seems like everything is working fine (for now) 
jumpscare
tbh this doesnt seem that bad because its all stores
find a way to fix stores and it works
Now testing! 
how?
i tried checking a few commits ago and the issue was still there
meh
what if they remove that method
and finding every time is meh too
if you really wanna do this, create a Record<string, Store> once and just get it from there
how long does it take to test 
that's bad
what if they end up loading a store lazily
what happened...
main has outdated workflow so it wont work
husk
yea, i get the same issues
on main
IntlMessagesProxy
love
sending messages works at least
peak
nop
๐ญ
refresh then u can
how lmao
what the FUCK
think they reverted whatever they made? nvm
why
for some reason my vesktop works again
this should be easy to fix
most sane vencord function
Gulf of Vencord renamed to Gulf of BetterDiscord
btw idk if this is a bug or a config issue on my end but if you click on the "click here to restart to apply settings" from cloud sync while on discord desktop it wont start again (on arch)
de2565a get rid of unnecessary optional chaining - Vendicated
but this makes it so we can't find i18n anymore so we need a solution for that
how does that work
^
because it returns thing for EVERYTHING
all findByProps calls will return it
rip canary
didnt read anything above award
real
mb veev
@austere talon making a pr on discord intl to add a symbol to their proxy
Symbol.for("webpackFinds.shouldIgnore")
this try catch is stupid
anyways let me take a look later
to try to find a better solution
โฆ chaining through a single method.
The chainMessagesObjects method should work with both literals and proxies interchangeably, meaning any consuming code can call it with two arbitrary messages...
the culprit
what if we check for these instead?
the proxy isn't
ah
my solution is better
because it future proves
it will work for any proxy that behaves like this
why not symbol then
because stuff might not expect symbols / only do it for strings
it's safer to use a string
TODO: fix i18n webpack finding
lol this is unused
oh they have a lot of instances
63252
63252: function(e, t, n) {
"use strict";
n.d(t, {
Z: () => s
});
let {createLoader: i} = n(469918)
, r = i({
bg: () => n.e("50698").then(n.t.bind(n, 705533, 19)),
cs: () => n.e("76030").then(n.t.bind(n, 563837, 19)),
da: () => n.e("49423").then(n.t.bind(n, 868293, 19)),
de: () => n.e("290").then(n.t.bind(n, 617342, 19)),
el: () => n.e("3088").then(n.t.bind(n, 828314, 19)),
"en-GB": () => n.e("99931").then(n.t.bind(n, 765828, 19)),
"es-419": () => n.e("625").then(n.t.bind(n, 162790, 19)),
"es-ES": () => n.e("21310").then(n.t.bind(n, 18398, 19)),
fi: () => n.e("14478").then(n.t.bind(n, 362667, 19)),
fr: () => n.e("25724").then(n.t.bind(n, 142594, 19)),
hi: () => n.e("36050").then(n.t.bind(n, 197010, 19)),
hr: () => n.e("37952").then(n.t.bind(n, 597512, 19)),
hu: () => n.e("56577").then(n.t.bind(n, 30612, 19)),
id: () => n.e("58055").then(n.t.bind(n, 121594, 19)),
it: () => n.e("24327").then(n.t.bind(n, 167375, 19)),
ja: () => n.e("12129").then(n.t.bind(n, 931104, 19)),
ko: () => n.e("80770").then(n.t.bind(n, 543409, 19)),
lt: () => n.e("67463").then(n.t.bind(n, 621118, 19)),
nl: () => n.e("8815").then(n.t.bind(n, 465509, 19)),
no: () => n.e("11600").then(n.t.bind(n, 81518, 19)),
pl: () => n.e("12645").then(n.t.bind(n, 729987, 19)),
"pt-BR": () => n.e("25621").then(n.t.bind(n, 247443, 19)),
ro: () => n.e("88255").then(n.t.bind(n, 953154, 19)),
ru: () => n.e("31744").then(n.t.bind(n, 761684, 19)),
"sv-SE": () => n.e("13040").then(n.t.bind(n, 377289, 19)),
th: () => n.e("53885").then(n.t.bind(n, 158575, 19)),
tr: () => n.e("38618").then(n.t.bind(n, 985333, 19)),
uk: () => n.e("71699").then(n.t.bind(n, 570604, 19)),
vi: () => n.e("14039").then(n.t.bind(n, 156039, 19)),
"zh-CN": () => n.e("22417").then(n.t.bind(n, 211714, 19)),
"zh-TW": () => n.e("40270").then(n.t.bind(n, 234597, 19)),
"en-US": () => n.e("76180").then(n.bind(n, 485464))
}, "en-US")
, {makeMessagesProxy: a} = n(469918)
, s = a(r)
},
finding this with webpack find is pain anyway
we can mapMangledModule it
the way i18n works changed too
different api
oh nvm
but their i18n module also exports the stupid proxy
we could refactor the blacklisting
so it doesn't blacklist the entire module but rather only bad exports
but for that we also need to patch webpack so doesn't make exports unconfigurable
yep
gotta monkey patch it
ye
and completely re implement wreq.d
im doing that rn
๐ญ
then move that hack to _shouldIgnoreValue
and instead of doing allNonEnumerable, make the single export non enumerable
yes i removed it
oh yeah this is straight up wrong anyway lol
and wouldnt do anything
my brain turned off
okay yeah remove it
i can't be devilbro... so over
devilbro my beloved 
why doesnt this use findByProps
we can't mapMangledModule it
cause t is also that shitty proxy
we can't get t here
two solutions:
- change i18n to findByProps
- add an
includeBlacklistedargument to mapMangledModule
Fixes the vc-special-hyperlink and its hyperlink text effect.
@limber skiff thoughts?
I dont see why lmao
lmaoo
anyways use Reflect.defineProperty
that doesn't error if it's somehow not configurable
?
2
it's kinda difficult to do
mapMangledModule checks including inherited
we have to recurse over the object prototype
ehmm
cursed
what if
you add the proxied values into another export
inside a wrapper
and then you check that into mapMangledModule
Honestly only pushed this cause it threw a warning into the build log. Either works. Didn't know if it actually broke anything.
ill look in a bit
instead of nested just look for the top level non enumerable keys @austere talon
and concat with the normal Object.keys
no need to check for all the prototype
nah that doesnt work
how tho?
well
actually
it doesnt work with classes anyway
because class properties are non enumerable by default
lol
but this is still better
and performance impact is irrelevant
funniest shit ever
BD is unaffected
wanna know why
because of their stupid module "censoring" https://github.com/BetterDiscord/BetterDiscord/blob/development/src/betterdiscord/webpack/shared.ts#L6-L13
shared.ts: Lines 6-13
export const wrapFilter = (filter: Webpack.Filter): Webpack.Filter => (exports, module, moduleId) => {
try {
if (exports instanceof Window) return false;
if (exports?.default?.remove && exports?.default?.set && exports?.default?.clear && exports?.default?.get && !exports?.default?.sort) return false;
if (exports.remove && exports.set && exports.clear && exports.get && !exports.sort) return false;
if (exports?.default?.getToken || exports?.default?.getEmail || exports?.default?.showToken) return false;
if (exports.getToken || exports.getEmail || exports.showToken) return false;
return filter(exports, module, moduleId);
actually it is affected but only if you do manual byProps filter
LMAOOO
anyway we need to merge this fix FAST
and push to main
if we want to test webpack changes for more time we need to cherry pick this onto main
they might push tomorrow
okay ill review in a bit wait
Does this even affect anything ๐ญ
Couldn't you still make a token logger
that is already fixed in the development branch (by updating our bundler), just not in main yet
Reflect.defineProperty(exports, key, {
if (typeof exports !== "object") {
_shouldIgnoreValue already handles null
export function _blacklistBadModules(requireCache: NonNullable<AnyWebpackRequire["c"]>, exports: ModuleExports, moduleId: PropertyKey) {
// Overwrite Webpack's defineExports function to define the export descriptors configurable.
// This is needed so we can later blacklist specific exports from Webpack search by making them non-enumerable
If I understood correctly this is a fallback, so it should say it
let me change mapMangledModule a bit
@austere talon it doesn't matter
they do the same
expect Reflect doesn't throw
which is better, what if it's not configurable somehow?
The Reflect.defineProperty() static method is like Object.defineProperty() but returns a Boolean
then we would want to keep the same behaviour aka have it throw
well but webpack is meant to not just break
using a different method than it usually does is dumb
yeah
well technically the behaviour is very slightly different but it doesn't matter
even if us modifying it somehow broke it, we would actually want it to throw instead of swallowing it silently
btw we are very luck webpack even uses wreq.d for it so it's this easily patchable lol
imagine if they hardcoded it or referenced it from a local variable
they make everything so easy lol
lmao yeah
all the important things are assigned to the function
there's no reason for them to even put anything on the function
it could all be local variables
I mean some they need
well tbf in some websites m and c aren't exported for whatever reason
but that's easy to fix
but others nop
bd just hardcoded those names
but they made it so that you can't even find i18n
lol
either that or nested export search doesn't work
I think it's the latter actually
nothing against zerebos but they are just merging everything at this point, with barely any review
no he does review
but yeah he doesn't care about BD that much anymore
like what even is this
but genuinely, some commits dont even make sense and they are merged
it's so you can call React components as functions and get their exports lol
"Add wrap in hook"
they need it so they can monkeypatch things
that explains nothing
yeah the commit message sucks
BD installer does the same thing when u press repair xd
oh my god...
I think it is pretty insane that the discord breaking update just happend and it's already in current fixing, i really really have to appreciate this, tysm vencord team
yeah we normally try to always fix these huge changes before they hit stable
ik you guys tried to change before stable, but discord only update for me like 1h ago and its surprising how fast it is
yea yea ik i use canary x3
this isn't a bad idea tho I thought about a vencord safe mode too (last time vc broke)
we should add that


