#πΎ-core-development
1 messages Β· Page 192 of 1
aka my first js project
show show show 
Object.values(wreq(wp.findModuleId("makeRequest: queueing"))).find(m => m.post)
@median rapids
sorry im insane
still cool if you managed to make a working thing with no prior knowledge 
import { promises as fs } from "fs";
import path from "path";
function loadResource(bundle: string, path: string): Promise<Buffer> {
return fs.readFile(path.join(VENCORD_DATA_DIR, `${bundle}.asar/${path}`));
}

hey so i forgot whats the vesktop command to switch to stable it finally got hit with the update lol
thx
NO
it's public pretty sure
dear god
whats the vesktop command to ban someone i don't like from the entire platform
import { readFile } from "fs/promises";
import { join } from "path";
// bundle and path better be trusted and not be coming from renderer...
function loadResource(bundle: string, path: string): Promise<Buffer> {
return readFile(join(VENCORD_DATA_DIR, `/${bundle}.asar/${path}`));
}
importing entire modules is evil...
/unreal
that sort of thing is a native anyway
whats tha
i think u accidently cut off a bit, can you show more?
you should scroll to the right a bit
it's not my token
just something i cant shjare

omg toker??
a bit transphobic....
oh i should delete that
then on the extension zip...
share it with me π₯Ί
i promise i wont leek
oki
oh ik what it is 
sillyv
dolfies can actually do this
tf is this
web-metadata.ts: Line 7
export let EXTENSION_BASE_URL: string;
nah their ui would never look so good
fetch(new URL("/locales/en.json", EXTENSION_BASE_URL))
this should work
but async
thats real
oh nice
function loadResourceWeb(bundle: string, path: string): Promise<ArrayBuffer> {
return fetch(new URL(`/${bundle}/${path}`, EXTENSION_BASE_URL)).then(data => data.arrayBuffer());
}
it was also not supposed to leak
i guess
for sync, we could use synchronous XHR or a script tag
the two apis need to be compatible
it's a fake backend i made with a 2018 leak of the panel
where did you guys even gather it from 
bleh
ooh
just put it on VencordNative.locales
yyyyyyyyeah i guess xhr would work
from https://admin.discord.co obviously
this isnt specifically for locales
VencordNativeStub.ts: Line 44
window.VencordNative = {
its for all the other data we want to put into asars too
sync xhr 
dolfies still has access to the admin panel
dolfies if he shared discord android source (it would be very good)
funny you should say that
why
tbh its a bit awkward putting the locales into a separate data bundle, but it does make the compiled mod source smaller
native module?
and it does decouple it so you can swap out the locales
i can't say
dw i gotchu
dolfer would kill me
yop
dolfier tell me too
gnarp gnap
π₯Ί
ill work on it
tomorrow
?remindme 5pm localisation into asar bundles for electron, packed into extension for web (do later)
Alright @turbid hatch, in 18 hours, 14 minutes and 12 seconds: localisation into asar bundles for electron, packed into extension for web (do later)
do now
i NEED pirate speak
i woke up and had like impulse to work out how this should work
i mean it works right now as is but it builds them into the mod itself so its like
a bit painful
is that what this meant
#π-translation message
yes
WHATS THAT
but yeah using an asar means you can just swap out the asar and reload the translations
which is actually great for localisation development
dont have to restart your discord client all the time
so anyways why is vencord in the renderer
venderer
wot
where else would it be?
in the discord HQ but fr idk where else it could go
good old times https://the.yog.zone/5jhYgEt.png
i eaated it
no me
how did this got leaked btw
i will eat you both
no meee
does anyone know

deal
magic
and cutie
good old times
real
que
just add..,,
expect these to make a return soon...
fear
okay 
dolfies is like a war thunder player
real
huh
chat i nearly finished vencord EAS
no shout the source of mesucks got leaked
I dont have any of the leaks
wasn't mee6 open source for a bit
tho having 2018 leak wouldnt help anything either
i will send you BlobMask.tsx 
okay
note the name containing the word dump
someone needs to accidentally leak mee6 src
i see i didnt expect it though
send me the http lib π₯Ί
someone needs to accidentally leak discord/discord 
you should totally put it up on ftp LMAO (FOR LEGAL REASONS THIS IS A JOKE)
so true
just a map file
i thought that happened
also why
boring
real
nah the client is boring af
gimme the api
give me the PYTHON
isnt the api fully documanted with the bot api ?
funny
wait doesnt discord/discord monorepo
whar
do you guys only have client
yes
and yes
.map files wont give you the repo lol
huh
i will <t:1824498020:R>

the more I talk to you guys more questions I get around my head 
well whatever
they still didnt push to stable

don't make them do it 
bet
?remind 3y hey @long stream 3 years ago you promised to leak discord/discord. How's it going?
Alright @fringe basalt, in 3 years: hey @haruka 3 years ago you promised to leak discord/discord. How's it going?
delaying wont change anything 
so its better to just sit and watch
hopefully this is is just a test though
π
stopp

π
u can dm me
?remind 2y 11m 29d check on harukie hacking progress
Alright @median rapids, in 2 years: 11m 29d check on harukie hacking progress
leak the dms to me, i want to watch 
throw us into a gc with mantika π₯Ί
imagine the 99% of things we don't talk about in public servers
private q&a session
alr guys its way to hot in my house now so i will be going see yall on mobile π
ill just drop u my token 
insane
omg toker???
im too dum for that dummy
nin0 drop me your token again :3 βββββββββββββββββββββββ
just find and chain 3 github vulns
works every time
- too dum
- too dum
- too dum

did you get the reference at least
yep 
yipee
never
cloudflare*
did canary getr reverted yet
no
*sobbing * no im still on stable canβt use the superior version cancary
ptb is better
jk jk
keep dreaming
with this change are they also merging modules too? like they did before
tbf the odds of a revert are higher than the odds of a push to stable
if u look at past occurrences
vee on suicide watch until it is reverted
keep dreaming
let's make a bet
if they push to stable i get admin
if they revert you get my toker


would you actually give me your token if they revert
She can just change it tho
well, i never specified it has to be a valid toker
stfu read rule 5.1
i will give you my (alt) token 
honestly i'd give you my token if i didnt have irl friends on here
already have it 
π
what
chat i need some help cuz vencord is literally broken
big if false
are you on ptb?
No idea if its user error but i'm having weird behaviour on stable too, vencord settings is at the top & sometimes it fails to load if i don't "update" it so it might be more than just ptb and canary broken right now
explanation please π
(i dont know any very specific terms, i just use vencord)
if you right click discord on your taskbar, does it say Discord PTB
just discord
so thats why my updater doesnt work
im on the token logger build
ok then idk
do u want a medal
nah
o
that's related to the issue we're currently having
can someone add that to the announcements thing
people keep asking about plugins
damn
yeah stable is affected in some ways too the only thing you can do is...
β¨ wait β¨
it was right when i started making a plugin too!!!
rip
BetterSessions (had no effect):
ID: 104140
Match: ```
/(\i.animated.rect,{id:\i,x:48-(\i+8)+4,y:)28(,width:\i+8,height:)24,/
None
None
None
idk
it would be cool if it automatically hides recently joined groups. it's annoying to suddenly see 300 notifications from a group you didn't ask to be joined in
BetterSessions (had no effect):
ID: 104140
Match: ```
/(\i.animated.rect,{id:\i,x:48-(\i+8)+4,y:)28(,width:\i+8,height:)24,/
None
None
None
hmmm
coming to stable soon...
nope
i am insane
i have been building plugins while explosion occurs
my new code will explode very fast
BetterSessions (had no effect):
ID: 104140
Match: ```
/(\i.animated.rect,{id:\i,x:48-(\i+8)+4,y:)28(,width:\i+8,height:)24,/
None
None
None
Do Not π
clicked on vestok thinking it was here
seems nice, Iβll let you know if this fixes the problem if I can recreate the problem
lemme find this mf who put the :cap:
They're not reverting are they βΉοΈβΉοΈ
Thereβs still a chance most of the Devs are nocturnal, so maybe they just slept in extra late
did discord revert yet
setting vesktop uptime records
just download all bundles from discord
It's so joever
wdym 
dzuriwai
Meeee
π¨
okay vencord on canary (even with vee's patches) is still a game of minesweeper
click on any attachment, crash
open the pending friend requests tab, crash
issue of skill
i will turn you into an issue
i am an issue
okay add using emojis (at least via the chat emoji picker) to the list of things that still crash

open a profile? crash.
how are yall crashing guh
canary
what do you think im using
i had the misfortune of having to turn off my computer

poor dzi forgot that people turn their computers off before going to sleep 
time to spend my whole day trying to fix these issues (i have nothing better to do)
same
yes?
pnpm buildReporter 
thx
how often are vesktop versions released? is there some requirement for a release?
i'd love to see #621 as soon as possible
did they push / revert yet
nop
they pushed another canary build however
which changes some stuff
brings back some names?
BetterSessions (had no effect):
ID: 104140
Match: ```
/(\i.animated.rect,{id:\i,x:48-(\i+8)+4,y:)28(,width:\i+8,height:)24,/
None
None
None
make 2 versions of vencord - rspack_old and rspack_new 
i've asked 7 people now
wait no i've probably asked u for this too
nvm
this is them rn
why would they change minifier config randomly
no other explaination
maybe they wanted to help dataminers and client modders a little 
maybe brandon working behind the scenes
i fucking hate how gateway is so slow to reconnect sometimes
no i do not want to be jumpscared by loading screen
i want to reconnect NOW
gateway was a serious problem for me when i was using my unreliable mobile data whilst my isp was being shit at providing support
discord after adding a fast reconnect system only to add their own debounce later: 
so real
why in the world is there a god damn exponential delay on each failed reconnect
no clue
maybe to prevent spammy requests
ok but it just does that when not connected to the internet
yes
because even if request is unsuccessful it might be in request queue or smthn
so when device gets back internet it can send all the requests one by one and cause spam
(just theorizing)
this is gateway tho, not api requests
you'd have to really try to enqueue a bunch of gateway events in a short period of time
ex. change your status 30 times
im assuming the actual reason for the reconnect delay is preventing people's clients from spamming the gateway if it ever goes down or has issues
are we talking about logging in or vc reconnecting
isnt gateway just websocket
websockets are just http requests aswell

server upgrades the connection and becomes websocket
yeah but then it's a single http request
yes
yet you mentioned enqueueing multiple requests
I mean it can try to connect multiple times
and when internet connection is estabilished it can send several reqs at once
but honestly I dont know if that will be ever a case
are you saying it's making multiple requests to the gateway simultaneously in attempts to reconnect?
afaik it only makes one
and if that one fails, it retries
yeah
there's no concurrency here
retrry is basically sending new request tho
yes
wrong?
yeah but something else could be queuing it aswell I am just thinking about possibility of this
client probably has a timeout at worst
I was using Vencod on macOS beta but after recent discord canary update, discord started crashing so I thought why not reinstall the Vencord. But it was not working so I downloaded the latest version and I am not able to install it like before.
when timeout is exceeded it gives up on request
what
what could be queueing what
but maybe android system or your router still queues the request
but again I'm just theorizing
if a request has failed, it's dead
i dont really know if they even do that
there's nothing to requeue
fair then
if an OS was arbitrarily retrying failed requests under the hood, that'd cause a lot of issues
you are right ig
I am really sorry for the issue, I was able to install it by going to Setting > Privacy & Security, then I saw the βOpen Anywayβ option for Vencord which allowed me to open the installer.
we are doomed
how does it look like
user thinks they are fit to review prs :blobcatcozystars:
wtf are these finds, please make them more readable
rename to forceUpdate
cl("keywordnotify-collapsible")
use a cl function to generate a unique class name
prefix all these with vc-
lol
me when github gets ratelimited
these finds wont work anymore anyway will they
i dont think they really have to look good
you can just find the code easily through devtools
but idk
i think as long as the find works and is robust it doesn't matter how it looks lol
how exactly do you make a find "readable"
yeag thats my thought
fair
discord code is shitty how are you supposed to make it look good
- it's bundled so eh
@turbid hatch, <t:1718664348:R>: localisation into asar bundles for electron, packed into extension for web (do later)
wtf
soonβ’οΈ βββββββββββββββββββββββββββββββββββββββββββββββββ
ye
it would be cool if it automatically hides recently joined groups. it's annoying to suddenly see 300 notifications from a group you didn't ask to be joined in
I understood the purpose of the plugin, quite confused of how this could be useful when it only hides dm groups in the dms list
there's no good way to determine if your local version is broken or not
skull
just ignore canary users
why are we stable users losing feature because canary users client break π’
its not even that cool because you don't have a visible canary before your links anymore!!!!
it doesnt get billion updates
eww blue icon
and breaks vencord way later
imagine not being orange
you can change tho
bad
that's not the point
the point is pushing the update to all users so when it hits stable they can at least open their client and update
the plugins disabled cause a full crash
however we are still waiting to see if discord will push to stable or not
actually since you are modifying discord code
they likely will but it's still a lot of work to fix the plugins, so it's worth waiting
yeah it might not be so easy to detect what caused crash
yeah we kinda plann
how tho
are you gonna just look at what patched webpack module
and dsable the plugins that patched it
at this point im almost ready to build a thing to holdback discord script updates (this is a bad idea for sure)
it's probably possible in desktop
api
you just need to overwrite the initial dom
since that's what has the scripts it loads
ig that would work
only thing left is detecting whether client is canary or stable and disabling depending on that

doesnt openasar stop auto-updates?
is it even hard to detect if client is canary
nvm its just DiscordNative.app.getReleaseChannel() (at least on full app)
nop
this is about scripts that run discord's web app
NOT native updates (that are irrelevant anyway due to vesktop)
what we could have done was checked what was the build number the client was running
and only disable if it's higher than 302556
but it doesn't matter now
theres also GLOBAL_ENV.RELEASE_CHANNEL
yeah thats at least crossplatfrom
you missed the entire point
i pushed this update not to fix canary
but to make sure people have a "working" discord once stable gets the update
yeah I get it, its not to affect stable people once it gets pushed
but of course 302556 is hardcoded and no way to get it
okay I got a thing
what website is that
nelly.tools
you probably got it but 
findByCode("buildNumber:").toString().split("buildNumber:\"")[1].split("\"")[0]
that wont work
why tho
whats it
nvm I didnt

let me cook wait
GLOBAL_ENV.SENTRY_TAGS.buildId
that returns a hash tho
so what
yeah
if you are gonna check specific version useful
im using that
but if you are gonna check versions above 419335
however vencord runs before the html is loaded
once discord pushes new update it would be useless no?
u can use a MutationObserver or smth xd
technically you could use discord filenames as hash too
to callback as soon as the script tag with GLOBAL_ENV is loaded
should still be early enough
ben
see this is good advice but also some skid will read this and see as approval to use it for regular plugin dev

cookinggg wait
observe document.head and wait for script tag to be added
the first script tag has global env
or even easdier
onceDefined(window, "GLOBAL_ENV", globalEnv => {
})
fear
wtf is this
that works too
defineProperty abuse was looking funnier
onceDefined.ts: Lines 21-47
/**
* Wait for a property to be defined on the target, then call the callback with
* the value
* @param target Object
* @param property Property to be defined
* @param callback Callback
*
* @example onceDefined(window, "webpackChunkdiscord_app", wpInstance => wpInstance.push(...));
*/
export function onceDefined<T extends object, P extends LiteralUnion<keyof T, PropertyKey>>(
target: T, property: P, callback: (v: P extends keyof T ? T[P] : any) => void
): void {
const propertyAsAny = property as any;
if (property in target)
return void callback(target[propertyAsAny]);
Object.defineProperty(target, property, {
set(v) {
delete target[propertyAsAny];
target[propertyAsAny] = v;
callback(v);
},
configurable: true,
enumerable: false
});
}
onceDefined is defineProperty inside lmao
it's all defineProperty abuse

btw is update check and auto update being done after discord is loaded
or before everything
but this is still bad
oh wait
its !==
it only adds patches in specific hash we know works
i thought u made it so it only blacklists on a specific hash
which would be a bad idea
it didnt work either
nah thats good, i just misunderstood
I think this approach is dumb but also dont have any alternatives
uh
better settings is crashing too apparently?
wait no
so many errors idk what caused the react crash
oh it's just decor is still initialized for some reason
doesn't prevent start and such
nah the patch got applied
soon rdb wont allow disabling too
my logic is just broken
well instead of force disabling
you could also just see what causes crashes
but i was lazy
push to dev first
it was the forEach because of splice
that works too
it doesn't work with plugins that init as soon as possible
however they can't interact with webpack so it's okay
well it's only temporary anyway
DONT FORCE PUSH
then good
it's my branch I can do whatever I want muahahahaha
eh bad message
nuckyz backdoor soon
NO
i will make venbot DM you every time nuckyz force pushes @crude hearth
you will push to dev branch and [fucking explode]
sign me up too
how i feel when i see force push
almost created a branch called mai
OH MY GOD STOP
HOW
why would you do that
what will?
force pushing stable
yep
okay now people can complain less
pretty sure force pushing main is blocked
yop
I was doing on vencord+
I think it didnt really cause issues but idk
y'all be like: MERGE COMMIT IS A FUCK
ofc
force pushing is normal
if you're not a total git newbie you're gonna force push a shit ton
normalize adding malware by force push
imagine someone editing entire commit history via force push and secretly adding virus to one from 2 years ago
you love
where
NAHHH
the nuckyz branch
@austere talon I really hope they don't take this long lmao
lmaoo
they pushed stable @limber skiff
NAHH
right as we push that lmaooo
we got work to do then
but I can only help later
first thing is introducing mangled finds again, and replacing all findByProps that depended on the export key
I wish I didn't reload my discord, it exploded 
the amount of joins that are happening are so real
lmaoooo
rip
okay lets see

lets make a new branch
ye
the name
we should split work
are you just bringing back the old webpack code?
while all of you explode your brains i will abuse vesktop very hard to get old build
double check for me
old
compare to window
im gonna fix all webpack commons
i told you :3
now where's my admin
one sec I'm trying to keep this at least a little performant
I hate duplicating the code here
but idk if I should make a variable for if it has been found
probably
you will get admin on a dead and abandoned phpbb forum 
you never specified admin here
im crying already @limber skiff
Z / ZP
(not Z)
oh god
like i said im fixing webpack commons rn
well thisll be fun to watch get fixed
we will need multiple mapMangledModules
I bet discord devs are staring at this channel and giggling
knowing what they have done
what did they even change that broke everything?
must of been something core to how discord is built
probably 2 line config change
at least big components module still exists
can't wait till somebody updates the class fixeroo tool again
good luck @austere talon
how will this affect fishing season @austere talon
send me this code I wanna test if it works
FUCK
Fishcord effected
let me push
was there even anything that isnt broken
how did you break another thing
good question
its been real chat
how did I break this
I think they changed minifier config again
and half of the function names disappeared
ah
It's joever
INSANEEEE COPILOT
hey, it's trying
Explod
train some ai model on vencord src and discord bundles
is it gone?
it's mangled
yea good luck mapping the over 3k strings discord has xd
well we can still do it
for the core constants
Endpoints for example
but that's still a big amount
ig
like at least 100 i think
how in the fuck
LMAOOO
lmaoo
still need to fix settings stores and Constants
i think i will just mapMangled constants
good luck everyone 
Imagine Discord employees reading this chat and laughingπ
Hope your brains will not blow up o7
some of them use client mods as well
do they really?
iβve seen some in the past, yes
haha no way
the devs itself arenβt the ones who write the ToS
I mean I don't blame them tbf
the devs are just tech geeks somewhere as well
how to help out
You can help out by just picking a few plugins and fixing them and sending a pull request!
This comes after I went to bed smh
The worst thing is I'm gonna have to redo everything I did for friendssince for the new profiles won't I π
days like these make me want to find some way to force discord to load a certain client version somehow
unfortunately I don't know much about how the desktop client works
let's hope it's not too bad
actually is this possible currently?
i doubt so
i'll write a quick summary of the changes and ping contributor role in a bit
Working on it
I already said what you need to do
where?
(about this)
change the scripts the initial html loads
ohhh
which means if it's possible, it would only be in the desktop client
hmm could I use a proxy to get locally hosted files then?

dont worry I only sent my client into a crashloop
(it wouldn't be possible to do in the client itself anyway.. probably)
actually I will just experiment with this later
if I can get it working on browser discord, that's enough of a win since mitmproxy seems to work weirdly with my os or just not proxy some apps
but hey who knows I'll try later
gn everyone, good luck with the doomsday 
mmh
has there been any work on the messageeventsapi?
let me just rerun
i wanted to fix it earlier but gave up cuz i don't know how to find the messagestore now
well
it's related to these errors
it's very easy to explode puppeteer with errors
so annoying
@austere talon put a try catch here
I can try to set why it causes but for now lets not make it error
try catch or .catch
swallow error?
lol
voice chat called "if you talk you explode"
18 users in vc
Vencord literally explodes
Hello dear <@&1026534353167208489>s
Massive Discord Update
As you probably have noticed, Discord just pushed a massive bundler update that breaks a lot of plugins
It would be amazing if you could help us fix it by fixing a few plugins! You don't have to do a lot, even just fixing one plugin would already help.
Summary
DIscord Webpack modules are now once again mangled, which means that what was previously exports.FluxDispatcher is now exports.Ahj. So most findByProps are now broken and need to be changed to findByCodes. Some patches might also be broken.
β οΈ WARNING: the main branch has broken webpack search. Please base your work on the 18-jun-doomsday branch. PRs should also be filed against that branch. Please begin your PR title with doomsday fix:, this helps me organise PRs more easily
Make sure to state in this channel which plugin(s) you are fixing (& check if someone else is already fixing the same plugin) to avoid duplicating work
β οΈ WARNING: The following plugins are currently force disabled because they cause crashes. If you want to work on them, you need to remove them from the forceDisabled Set in src/plugins/index.ts: MessageLogger, ShowHiddenChannels, MoreUserTags, Decor, IgnoreActivities, NoBlockedMessages, BetterFolders, NoPendingCount
You can find a full list of broken stuff here
hi
π

and sorry for the ping but i really need help here π
you're good lol
π
meow
nop
im still interested in trying to fix it
are we planning to maintain symbol mappings moving forward?
I will never forgive you
i think i'll fix decor (or attempt to)
I'm going to replace NoBlockedMessages with NoBlockedUsers
my pr is still open
I will check and work to fix usrbg and (if somehow it broke) spotify share commands, might not be until tonight or tomorrow night so anyone else who has the time can pick up on them as well if they want
I fixed BetterSeasons patch, and working on RoleColorEverywhere patch do I pr them so you can check them?
yes
Is there a list of all broken patches?
rce real
π
we gotta stop calling it that
Good luck on the fixing I might join in tmrw after uni if there's still a need for that then
omg
same
i can try to help if I still remember how to do this kinda stuff
Also I wanna fix friendssince as its my own plugin unless ofc you progress quick then idc just do what fixes it fastest :3
uhh how were we getting a inner object
via webpack find
I'm trying to get .I.FORM
find by props
shrug
make sure you're using 18-jun-doomsday branch
oh
okay
how would i even fix stuff like this lol
we are so back
we are back aswell
how would you even fix flux events
wdym?
hello can u dm me anything so i get a message request so i can test NoPendingCount?
omg why did it not become a message request
i hate discord
flux events are broken and i can't find where to change FluxDispatcher to Ahj
this is awful
665f3a2 fix SettingsStores (return of old SettingsStore... - Vendicated
302ce24 doomsday fix: MutualGroupDMs (#2585) - aamiaa
i just added back an old api nuckyz wrote π
I send you one in case you still need it
vee, would you think a banner on their client would help lmao
"Vencord is currently broken. Please wait for everything to be fixed."
tomorrow I'll set on fixing nodefaulthangstatus, will do my best
we dont have the capabilities for that rn
sad. you should add that fr
that worked ty
having old discord open helps a lot ngl
I searched for slate editor for 5-10 minutes then realized I had old discord open
just looked at its code and searched through that
Summaries still work for me
suprizingly only 4 searches were broken
how
ChannelTypesSets.SUMMARIZEABLE.has





@limber skiff