#๐Ÿ‘พ-core-development

1 messages ยท Page 240 of 1

fossil inlet
#

blobcatcozy

I have that already in my reporter

austere talon
#

simple enough

limber skiff
#

I need to mark a function as pure for esbuild to exclude, right?

austere talon
#

yea

#

(to remove calls with unused return value)

limber skiff
#

so do I gotta mark diffErroredPatch as pure or is this enough

#

to strip it out

fossil inlet
#

i think thats what is also used in patch helper

#

to only bundle diff with dev builds

austere talon
limber skiff
#

yeah

austere talon
#

no need to mark as pure

limber skiff
#

and is removing the call enough to strip the function definition?

austere talon
#

oh yes

#

pure is not about definition

#

pure is about calls

limber skiff
#

alr

austere talon
#

odd example but this is what pure does

#

it's about function calls

#

better example

#

in the first example it can't remove the findStore() because the findStore function might have a side effect

#

in the second example we tell it the call is pure (aka has no side effects) so it can safely remove it

limber skiff
#

I think I fixed this but im not sure

#

hope it works

austere talon
#

dont think so lol

limber skiff
#

it resets on every find

austere talon
#

ohh

#

ya

limber skiff
#

ya

#

๐Ÿ™

austere talon
#

anyway im gonna finish my thing

limber skiff
#

alr

charred monolithBOT
limber skiff
#

vtest patcher-rewrite

nimble pendantBOT
austere talon
#

im lazy to make vencord print out the build hash

limber skiff
#

btw lol

#

this other regex makes reporter take like 10 seconds more

austere talon
frail skyBOT
#
Bad Patches

ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,\i.jsx)(\i.\i.Item,{id:\i.\i).BLOCKED,className:([^\s]+?).item,children:\i.\i.string(\i.\i#{intl::BLOCKED})})/


**__NotificationVolume (found no module):__**
ID: `-`
Match: ```
_ensureAudio(){

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds
waitForComponent((m) => {
            let inner = m;
            while (inner != null) {
              if (filter(inner))
                return true;
             ...)
findByCode("APPLICATION_RPC(", "Client ID")
extractAndLoadChunks([".COLLECTIBLES_SHOP_FULLSCREEN&&"], /(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/)
Bad Starts

None

Discord Errors

None

limber skiff
#

hmm

austere talon
#

outdated

limber skiff
#

yeah

frail skyBOT
#
Bad Patches

ImplicitRelationships (had no effect):
ID: 270759
Match: ```
/((0,\i.jsx)(\i.\i.Item,{id:\i.\i).BLOCKED,className:([^\s]+?).item,children:\i.\i.string(\i.\i#{intl::BLOCKED})})/


**__NotificationVolume (found no module):__**
ID: `-`
Match: ```
_ensureAudio(){

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds
waitForComponent((m) => {
            let inner = m;
            while (inner != null) {
              if (filter(inner))
                return true;
             ...)
findByCode("APPLICATION_RPC(", "Client ID")
extractAndLoadChunks([".COLLECTIBLES_SHOP_FULLSCREEN&&"], /(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/)
Bad Starts

None

Discord Errors

None

limber skiff
#

but this one

#

vtest dev

nimble pendantBOT
limber skiff
#

lets see

charred monolithBOT
frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
#
[Vendicated/Vencord] New branch created: reporter-webhook-option
limber skiff
#

oh yeah I definitely messed up something

frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

oh god we really gotta update esbuild

austere talon
#

lmaooo

#

yeah

limber skiff
#

vtest patcher-rewrite

nimble pendantBOT
austere talon
#

i also added this

frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds
extractAndLoadChunks([".COLLECTIBLES_SHOP_FULLSCREEN&&"], /(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/)
Bad Starts

None

Discord Errors

None

limber skiff
#

hmm

#

I wonder how

frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds
extractAndLoadChunks([".COLLECTIBLES_SHOP_FULLSCREEN&&"], /(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/)
Bad Starts

None

Discord Errors

None

austere talon
#

so annoying

#

how is it 2025 and we still have no good way to test workflows

limber skiff
austere talon
#

oh nvm

#

i can actually run it on that branch

frail skyBOT
#
Stable Report (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Canary Report (Unknown Hash)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

rightttt!

austere talon
#

unknown hash guhh

limber skiff
#

not all the times we need to load lazy chunks

#

sometimes we only need to require a lazy module

austere talon
#

why is version.canary.json not a thing

limber skiff
#

which means this is just wrong

austere talon
#

oh

scenic brook
#

Could the hash not just be added to the webhook name same as the current (Canary)?

charred monolithBOT
scenic brook
#

Not that it matters much

limber skiff
#

vtest patcher-rewrite

nimble pendantBOT
frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
limber skiff
#

now this

austere talon
#

once the venbot thing works fine we can make reporter not run daily anymore

limber skiff
#

run at what rate then?

#

I'm too focused doing my things lol

austere talon
limber skiff
#

neatt

austere talon
#

there will be two channels

#

one has just two messages with the up to date reports for stable and canary (venbot will always edit the message)
the other is a full log that logs all pushes and reports for that push

austere talon
fossil inlet
#

@limber skiff i added support for escaping \i

-    const canonSource = partialCanon.replaceAll("\\i", String.raw`(?:[A-Za-z_$][\w$]*)`);
+    const canonSource = partialCanon.replaceAll(/(\\*)\\i/g, (_, leadingEscapes) => leadingEscapes.length % 2 === 0 ? `${leadingEscapes}${String.raw`(?:[A-Za-z_$][\w$]*)`}` : _);
#

not sure if thats the best way to do it

limber skiff
#
Type '{ (this: any, module: Module, exports: any, require: AnyWebpackRequire): any; toString: (() => string) & (() => string); [SYM_ORIGINAL_FACTORY]: AnyModuleFactory; [SYM_PATCHED_SOURCE]: string; [SYM_PATCHED_BY]: Set<...>; }' is not assignable to type 'WrappedModuleFactory'.
  Type '{ (this: any, module: Module, exports: any, require: AnyWebpackRequire): any; toString: (() => string) & (() => string); [SYM_ORIGINAL_FACTORY]: AnyModuleFactory; [SYM_PATCHED_SOURCE]: string; [SYM_PATCHED_BY]: Set<...>; }' is not assignable to type '{ [x: number]: string | Set<string> | undefined; }'.
    Index signature for type 'number' is missing in type '{ (this: any, module: Module, exports: any, require: AnyWebpackRequire): any; toString: (() => string) & (() => string); [SYM_ORIGINAL_FACTORY]: AnyModuleFactory; [SYM_PATCHED_SOURCE]: string; [SYM_PATCHED_BY]: Set<...>; }'.ts(2322)
#

typescript errors are so well made

fossil inlet
limber skiff
#

I have no idea what that error means

#

I fixed it

fossil inlet
limber skiff
#

(accidentally)

#

but yeah now we have this

#

I might also add a helper funtion to get the patched source and patched by for any factory

fossil inlet
#

so instead of .$$vencordPatchedSource [SYM_PATCHED_SOURCE]

austere talon
#

that makes them not minified

charred monolithBOT
#

@Vendicated

I have tested with discord snowflakes and they work fine in almost all languages, but when testing with languages like Chinese, the translator would add random numbers to the snowflake or translate them, for example.

I tried sending 100 messages and on two occasions, the Chinese translator added a 9 to the end of the snowflake making it unrecognisable or edited a number.

image
![image](h...

charred monolithBOT
austere talon
#

HORROR

#

AHH too scary

#

No i will NOT watch this

fossil inlet
austere talon
#

image with link to the yt video i think

fossil inlet
#

ah

charred monolithBOT
frail skyBOT
#
Discord Canary (de7a588da28d253154c613720cc78ff0f5adef86)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

nice

#

but idk if this still works for the cron trigger

charred monolithBOT
austere talon
#

this should work

charred monolithBOT
limber skiff
#

@fossil inlet lots of things for you

fossil inlet
#

love

#

is $$vencordPatchedSource being removed the only breaking change

limber skiff
#

ya

#

I switched them to symbols

#

lovely

fossil inlet
limber skiff
#

oh wait

#

this is wrong

#

it should be this instead

#

there we go

limber skiff
#

ig

fossil inlet
austere talon
#

Reporter Status

limber skiff
#

because I hope javascript will be smart, and these two strings will share the same reference

#

using less memory

austere talon
#

Reporter Log

fossil inlet
#

okay

#

guhhhh there needs to be a way to set a reminder for when a pr is merged

limber skiff
#

okay I just need console shortcuts for this stuff now

charred monolithBOT
fossil inlet
#

breaking changes for companion fork & plugin

limber skiff
#

webpack modules have the comment and 0,

#

is this an issue?

fossil inlet
#

yea, dw tho

#

not that hard to fix

limber skiff
#

I still remember when sentry used to be here

fossil inlet
#

guhhhh istg when will vscode fix the regression in js-debug where it hangs for 5s then fails to parse names from source maps

#

istg im going to fix it myself soon if they dont do it

limber skiff
#

vtest patcher-rewrite

nimble pendantBOT
left sequoia
austere talon
left sequoia
#

but from experience if u have a ts error its too big to actually fit on your screen

frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
austere talon
#

ye

frail skyBOT
#
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

fastify is so ugly for some reason

limber skiff
#

is this worse

#

nah its pretty much the same

#

alright I'm done

#

vtest patcher-rewrite

nimble pendantBOT
limber skiff
#

uhmm actually

#

oh okay it's not my fault

#

didnt get slower because of me

charred monolithBOT
limber skiff
#

@fossil inlet can you also test if it works lol

fossil inlet
austere talon
#

i finished cooking venbot autoreporter

#

it should work but I need to test on production LOL

#

actually i can use ngrok to test locally ig

limber skiff
austere talon
#

Webhook failed with status 404

#

GUHH

charred monolithBOT
limber skiff
#

I cant describe how good this technique is

austere talon
charred monolithBOT
limber skiff
#

vtest dev

nimble pendantBOT
austere talon
limber skiff
#

merging dev into main

#

after that we should wait some days cuz this patcher-rewrite branch is pretty scary

austere talon
#

yeaaa

#

did u fix everything i commented

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

ya

austere talon
#

i literally wrote code, tested and it immediately works

#

love my life

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
limber skiff
#

have fun

austere talon
limber skiff
#

so how is this going to be?

#

reporter log will have all

#

reporter status will have persistent?

austere talon
#

and status will have latest

#

yea

limber skiff
#

alright

#

niceee

#

might as well add ptb too

#

they are actually doing Canary -> PTB -> Stable now

#

before they were pushing PTB at the same time as Canary

austere talon
#

vtest reporter-webhook-option stable

nimble pendantBOT
austere talon
#

wrong bot ๐Ÿ˜ญ

#

$test reporter-webhook-option stable

frozen knotBOT
frail skyBOT
#
Discord Stable (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Discord Stable (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

HUH

#

oh

#

nvm makes sense

#

actually no, live venbot should have tested both branches

shell shuttle
#

rce broken veli_pensive

charred monolithBOT
leaden furnace
#

discord died for like 3 mins, happen for anyone else or just me

limber skiff
#

@austere talon may you review the changes to patch webpack again once you can, and then we can merge

austere talon
limber skiff
#

ya

austere talon
#

i thought the above would be enough to make it run even if previous step fails

limber skiff
#

do

#

if: always()

#

nvm

#

theres this too

austere talon
#

do I seriously need ```yml
if: ${{ (success() || failure()) && (github.event_name == 'schedule' || ...) }}

austere talon
limber skiff
#

use continue on error

#

ya

austere talon
#

or always use 0 exit status

#

since the job didn't really fail

#

it's just that vencord is partially broken

#

i deployed btw

#

ofc now they stop pushing

limber skiff
#

one sec

#

let me log into my other account and push build

austere talon
#

LOL

#

nuckyz secret discord staff...

limber skiff
#

wait a bit cuz the workflow is slow sometimes (now in particular)

austere talon
#

vtest reporter-webhook-option

nimble pendantBOT
austere talon
#

it should run both

#

if not then the workflow file is borked

frail skyBOT
#
Discord Stable (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

oh nvm i forgot nothing is broken anymore

#

so it doesn't error

frail skyBOT
#
Discord Canary (4a8810b4871ef89a6faf804667937d3f03dd1113)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

๐Ÿ˜ญ

#

break it intentionally

austere talon
#

yeah can u push a breaking change to discord rq

limber skiff
#

nah I might as well do this instead

charred monolithBOT
limber skiff
#

do not open the last commit

austere talon
#

WHAT DID YOU DO

#

lmaoo

#

(running reporter on dev2 wont work)

#

i will just revert the RCE fix

#

to test

charred monolithBOT
austere talon
#

there

#

vtest reporter-webhook-option

nimble pendantBOT
frail skyBOT
#
Discord Stable (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

yeah it skipped canary bruh

#

should we just make it always exit with status 0

limber skiff
#

just try the continue on error

austere talon
#

that will make the entire job succeed tho

#

so it's the same as changing to 0 exit status

charred monolithBOT
austere talon
#

(stable being blank is expected)

#

vtest reporter-webhook-option

nimble pendantBOT
frail skyBOT
#
Discord Stable (99f36bf5e05309e92fb900c0f1391ba6d395b95b)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Discord Canary (c10ee66ed1f9f8210075a74d506753d2beb51fe2)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

yeah that fixed it

#

so weird

#

so failure() isn't a simple boolean

#

it has side effect

limber skiff
#

I wish they would run concurrently

austere talon
#

can we do that

limber skiff
#

not sure

austere talon
#

well

#

you can't have parallel steps

#

but we can have parallel jobs

#

but then we have to do a lot of work twice

limber skiff
#

or run the scripts in the background, concurrently

austere talon
#

we can do that

#

let me make that change

still maple
still maple
left sequoia
#

wtf

#

it doesnt belong to any branch

#

XD

glass jasper
#

Vencord Eol confirmed

left sequoia
#

evil nuckyz is real

charred monolithBOT
austere talon
#

vtest reporter-webhook-option

nimble pendantBOT
limber skiff
#

lower the timeout

#

it doesn't need to be anything above 5

frail skyBOT
#
Discord Stable (5c39c690adec0427252dc5334f989a64eb3b92ac)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Discord Canary (2dde8707f41519f571891d735a2875832385f398)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

nice

#

works

#

i'll just change it back to 10

austere talon
#

it could post canary first then stable

#

and the logs here are mixed up

#

doesnt really matter but still

limber skiff
#

it's fine

charred monolithBOT
austere talon
#

vtest reporter-webhook-option stable

nimble pendantBOT
austere talon
#

also wanna test with just one

frail skyBOT
#
Discord Stable (5c39c690adec0427252dc5334f989a64eb3b92ac)
Bad Patches

RoleColorEverywhere (found no module):
ID: -
Match: ```
renderPrioritySpeaker(){

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

pog

#

let's merge this now and then you can merge it into your pr and change it from hash to id

#

seems easiest

charred monolithBOT
austere talon
#

oh

#

i did it again

charred monolithBOT
charred monolithBOT
austere talon
#

what's allWebpackInstances? why are there multiple? normal and sentry?

limber skiff
#

sentry used to be there too

#

when we patched it too

#

but not anymore

austere talon
#

so it's only one?

limber skiff
#

ya

#

but it's future proof

austere talon
#

looping adds performance overhead probably

#

and this confuses me

#

assuming there are multiple, why would we want to define it on all instances?

#

we would be putting all modules from the first instance onto the second, etc

#

we should only define it on the owner instance

limber skiff
#

when there were multiple there were duplicate modules

#

and as said patched are only executed once

austere talon
limber skiff
#

we needed the patched module in all of them

limber skiff
#

it wasn't like there

austere talon
#

i think we should just remove the multiple instances stuff

#

i don't think discord ever had multiple instances besides sentry

#

and sentry was different

limber skiff
#

sentry was still duplicated modules

#

and caused issues

#

in fact, that was needed to work

#

modules would get patched into the sentry one and not the main one

#

with this new approach

#

also this is still the case actually

#

the sentry webpack instance has dup modules too

austere talon
#

btw we could also consider applying all patches immediately and only then evaling

assuming everything works, it will work fine and probably be faster and use less memory

limber skiff
#

same ids

austere talon
limber skiff
#

hm yes

austere talon
limber skiff
austere talon
#

then if the eval at the end errors we can backtrack and do the individual approach

#

anyway we should do that in a different pr

austere talon
#

looks good now tho

limber skiff
#

I added it so long ago

austere talon
limber skiff
#

lmaooo

austere talon
#

idk if js keeps the old code

limber skiff
#

yeah that's surely smarter

austere talon
#
const code1 = doReplacement(code);
const module1 = eval(code1);
const code2 = doReplacement(code1);
const module2 = eval(code2);
#

will js forever store code1 and module1 somewhere

#

probably not

#

but still

left sequoia
#

if its sync it will

#

if its async it might free it if there are no references

austere talon
#

(pseudo code and assumed that code will go out of scope)

left sequoia
#

v8 at least, idk about jsc

#

if there are scope changes such as

function doTest1(){
  const code1 = doReplacement(code);
  const module1 = eval(code1);
}

doTest1()
#

then ofc it will free on next gc

#

once the scope closes

#

if it references OUT of scope, it will likely leak until that scope also closes

austere talon
#

you lack a lot of context so this is pointless

charred monolithBOT
limber skiff
#

nothing to argue, if anything is getting the hash but that I will change after

austere talon
#

let me test 3157

#

doesnt really matter which one we merge first

#

just fix that one nit i commented and if u can remember what that ignore was for add a comment

#

besides that looks good to go if tests look good

#

hmm actually

#

i think it's because of the canonicalise change

limber skiff
#

hmm

#

yeah

#

right

#

vesktop needs to use addPatch

#

from vencord

austere talon
#

yeah but we can't just make this change

#

need to make a vesktop update

#

and i just did recently

#

yeah this is bad lol

limber skiff
#

gotta copy it back to patchWebpack

#

temporarily

austere talon
#

you can check if patch.plugin === "Vesktop" and only do it then

limber skiff
#

but also keep in addPatch

austere talon
austere talon
#

but

#

make sure that double canoncalise doesn't break it

#

so we can have a smooth transition when vesktop does switch to addPatch

limber skiff
#

nah if I add the check for .plugin === "Vesktop" it wont be double

austere talon
#

it will

#

cause I will change Vesktop to use addPatch()

limber skiff
#

oh right

austere talon
#

im doing it rn

#

but like I said we will have to make a Vesktop update first for people to get this

#

yeah works

limber skiff
#

did u rename the global

#

what was it called before?

#

got it already

charred monolithBOT
austere talon
#

epic lint fail

austere talon
#

it was VCDP before

#

no difference

limber skiff
#

ugh

austere talon
#

oh nah don't do this

#

old vesktop already replaced $self

limber skiff
#

wait what's the issue then?

austere talon
#

the issue is that \i isnt converted

limber skiff
#

I thought it was that

#

oh

grave mangoBOT
austere talon
#

anyway that should work too

#

epic lint fail tho

austere talon
#

u should install this lmaooo

#

how did you write this so many times and not notice the typo

fossil inlet
limber skiff
#

harcoded

#

LOL

austere talon
limber skiff
#

wait a bit

#

let me finish something then I take the last look

limber skiff
#

alright I'm merging @austere talon

#

all good?

austere talon
#

yea

charred monolithBOT
#
[Vendicated/Vencord] branch deleted: patcher-rewrite
limber skiff
#

your branch looks good to me too

#

once we merge it I will change the hash and build number stuff

austere talon
#

i can do that rn

#

or are you already

limber skiff
#

oh lol

#

nah you can do it

austere talon
#

ya

#

alright

#

wtf is happening

#

oh

#

ancient web build

#

why does it give -1

#

i added it here

limber skiff
#

uh

#

is it even working

#

or did I fuck up?

austere talon
#

i will see

#
return typeof buildNumber === "number" ? buildNumber : -1;
#

i think it's a string not number

limber skiff
#

number

#

99% sure

austere talon
#

something throws

#

TypeError: Cannot read properties of undefined (reading 'm'

limber skiff
#

wreq is undefined then

austere talon
#

ye

limber skiff
#

it should not be

#

oh wait

#

in the reporter yes

austere talon
#
[Reporter-Meta] catch TypeError: Cannot read properties of undefined (reading 'm')
    at findModuleId2 (VencordWeb:1769:32)
    at VencordWeb:1322:22
    at VencordWeb:38082:28
    at VencordWeb:866:18
    at patchFactory (VencordWeb:37969:27)
    at wrapAndPatchFactory (VencordWeb:37864:56)
    at Function.set (VencordWeb:38138:93)
    at https://discord.com/assets/web.a22924a2aed1de53.js:12:12597853
    at https://discord.com/assets/web.a22924a2aed1de53.js:12:12642882
limber skiff
#

the code that sets wreq runs after it tries patching for the first time

austere talon
#

ah yeah makes sense

limber skiff
#

I have to think

#

wait a bit

#

I have a solution

#

but hmm wait

charred monolithBOT
austere talon
#

this should start working whenever it's fixed

charred monolithBOT
limber skiff
#

there

#

pull that commit

#

and it should work now

#

but yeah dont run it too early lol

austere talon
#

yeah that's why I put it after this

charred monolithBOT
limber skiff
#

ye, and now it shouldnt try to cache it early in reporter

austere talon
#

pnpm test reporter-webhook-option

#

oh

limber skiff
#

LOL

austere talon
#

vtest reporter-webhook-option stable

nimble pendantBOT
austere talon
#

brb adding pnpm prefix to venbot

frail skyBOT
#
Discord Stable (366871)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

nice

#

works

#

thank u

#

should we merge those changes too then?

limber skiff
#

make reporter say if its canary or stable in the logs for the workflow maybe?

austere talon
#

wdym

#

ohhh

#

like in all log messages?

#

these?

#

either that or we can delay them

#

so we can print in order

#
runStable 2> /tmp/stable-stderr
runCanary 2> /tmp/canary-stderr

echo "Stable" >&2
cat /tmp/stable-stderr >&2
echo "\nCanary" >&2
cat /tmp/canary-stderr >&2
austere talon
#

but it will delay all logs until the reporter has exited

#

so we can't see while it's still running or if it never finishes

#

did they randomly break it then unbreak again

limber skiff
#

nooo vee

#

took 3.4ms

#

that means the JavaScript engine just decided that one run of the patch was gonna be slow

austere talon
#

oh

#

maybe make the number a bit higher

#

or we should add a new category for slow patches

#

otherwise it's confusing

limber skiff
limber skiff
charred monolithBOT
austere talon
#

vtest reporter-webhook-option

nimble pendantBOT
austere talon
frail skyBOT
#
Discord Canary (366900)
Bad Patches

VolumeBooster (took 4.1ms):
ID: 700994
Match: ```
/(?<=maxValue:)\i.\i?(\d+?):(\d+?)(?=,)/

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Discord Stable (366871)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

yeah we really need to make that a big higher

#

4ms is still fine

charred monolithBOT
frail skyBOT
#
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

austere talon
#

old reporter jumpscare

#

im gonna disable the cron reporter now

charred monolithBOT
frail skyBOT
#
Discord Canary (366914)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Discord Stable (366871)
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

why did that just run lmao

limber skiff
#

I did to test

austere talon
#

running via github ui

#

insane

austere talon
limber skiff
#

does the command default to both or canary only

austere talon
#

both

#

vh test

nimble pendantBOT
# austere talon vh test

Reporter (report, vencord-reporter, test-patches, test)

Run the Vencord reporter workflow

Usage

vreporter [ref = dev] [branch = both]
austere talon
#

if u dont pass anything it tests both on dev

limber skiff
#

alr

austere talon
#

i need to finish up the bot

limber skiff
#

you can merge if you want

austere talon
#

we shouldn't ever need to run vtest with 3. tho

#

unless we wanna test weird branches

charred monolithBOT
austere talon
#

thats annoying lol

#

(i deleted cause i sent it in the wrong channel)

austere talon
limber skiff
#

vtest shouldnt update the status

nimble pendantBOT
limber skiff
#

unless you run on dev

#

I run it on other branches all the time

#

broken branches

austere talon
#

yeah true

#

dev only

limber skiff
#

are you planning on merging it today too?

austere talon
#

pretty sure it's ready now yeah

#

unless u want anything changed

limber skiff
#

nop

#

I'm all good

austere talon
#

idk if using the global is the best way but it works

limber skiff
#

for sure it is

#

no webpack find needed lol

limber skiff
#

ohh I forgot

#

can you push dev2 to dev

austere talon
#

why

#

i cherry picked ur commit to my branch

limber skiff
#

ah

#

I was gonna push it separately to dev

austere talon
austere talon
#

that plugin has always existed xD

jagged reef
#

26 days

austere talon
#

vtest

nimble pendantBOT
nimble pendantBOT
nimble pendantBOT
austere talon
#

guhh

#

OHHH

#

i love mutating shared state

#

vtest

nimble pendantBOT
nimble pendantBOT
nimble pendantBOT
austere talon
#

nice

#

had to refactor so much

austere talon
#

insane

austere talon
#

that guy when he sees a trans flag

fossil inlet
dapper tiger
#

h

rugged spire
glass jasper
jolly egret
scenic brook
jolly egret
#

depends if they mean git or vreport command

austere talon
#

vtest reporter-webhook-option stable

nimble pendantBOT
nimble pendantBOT
limber skiff
#

vtest reporter-webhook-option

nimble pendantBOT
nimble pendantBOT
nimble pendantBOT
limber skiff
#

@austere talon should we merge it already

austere talon
#

yea

frail skyBOT
#
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

limber skiff
#

now you can change venbot to use dev

limber skiff
#

vtest

nimble pendantBOT
nimble pendantBOT
nimble pendantBOT
jolly egret
#

was webhooks not good enough

limber skiff
#

wdym?

jolly egret
#

well i see venbot is sending them instead of the webhook from the action directly

limber skiff
#

cuz now the webhook url is a venbot url

charred monolithBOT
median rapids
#

vtest ptb

#

aw

limber skiff
#

no ptb blobwob

median rapids
#

smh

glass jasper
charred monolithBOT
lime stone
odd heath
#

Not again ๐Ÿ˜ญ

limber skiff
#

usual

charred monolithBOT
scenic brook
#

Since the reporter logs are kind of out of sight, out of mind now, would it be worth having some kind of notification if the number of bad patches/finds changes? Maybe even just changing the title of the #1337479816240431115 thread so it has like (issues) at the end whenever something is broken and removes it when it's all clear?

#

I'm sure someone will have their eye on logs anyway but it feels easier to miss now

charred monolithBOT
#

Discord Account

arocraftu

What happens when the bug or crash occurs?

The plugin doesnt work, when I open a photo doesnt appear any more. It appear like a tiny zoomer but its like a discord familiar enviroment, so I don't know if its a different plugin corrupting the ImageZoom plugin or its a update that got discord. The impressive thing its that if right click still appears a tiny menu where you can see quick settings

![Image](https://github.com/user-attachments/assets/a30e0d15-0d...

elder plinth
#

I wish one of you two who reacted husk had sent a warning here so I didnt have to see a bird with human testicles

dusk blaze
crude hearth
#

love

crude hearth
charred monolithBOT
jagged cloak
#

what an image

jolly egret
#

its the new experiment some are getting enrolled into

#

the new desktop media viewer or whatever it is (i think)

austere talon
#

yes ik

surreal fiber
#

new image viewer and visual refressuperh are gonna be a pain for a while I guess

median rapids
#

true

charred monolithBOT
jolly egret
#

oh my god just don't fucking download binaries from discord

prime dew
# charred monolith

Isn't this also against the plugins guidelines (having to rely on external API keys and stuff)?

odd heath
austere talon
#

people don't know how to scrape anymore

odd heath
#

I was so shocked when I saw it was just boring api shit cuz I hoped it was some cool scraping ๐Ÿ˜ญ

austere talon
#

my Aliucord plugin that uses virustotal api just abuses their private api to do it without api key

dusk blaze
#

alibabacord

austere talon
#

you just need to use chrome devtools

odd heath
#

Fair

grave mangoBOT
# austere talon https://github.com/Vendicated/AliucordPlugins/blob/main/CheckLinks/src/main/java...

CheckLinks.kt: Lines 66-111

private fun makeReq(url: String, method: String, contentType: String): Http.Request {
    val chars = ('A'..'Z') + ('a'..'z') + ('0'..'9')
    val s = CharArray(10) { chars.random() }.joinToString("")

    return Http.Request(url, method).apply {
        setHeader("Content-Type", contentType)
        setHeader("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Firefox")
        setHeader("X-Tool", "vt-ui-main")
        setHeader("X-VT-Anti-Abuse-Header", s) // Can be anything for some reason
        setHeader("Accept-Ianguage", "en-US,en;q=0.9,es;q=0.8") // yes upper case i lol
    }
}

private fun checkLink(url: String): Map<String, Entry> {
    // Look up url in cache first
    QueryBuilder("https://www.virustotal.com/ui/search").run {
        append("limit", "20")
        append("relationships[comment]", "author,item")
        append("query", url)

        makeReq(this.toString(), "GET", "application/json")
            .execute()
            .json(CachedUrlInfo::class.java)
            .let { res ->
                if (res.data.isNotEmpty()) return@checkLink res.data[0].attributes.last_analysis_results
            }
    }

    // no cached data, make full request for url

    // R.h.ster url to get an ID
    val idInfo =
        makeReq("https://www.virustotal.com/ui/urls", "POST", "application/x-www-form-urlencoded")
            .executeWithUrlEncodedForm(mapOf("url" to url))
            .json(UrlIdInfo::class.java)

    // Request analysis with that ID
    return makeReq(
        "https://www.virustotal.com/ui/analyses/" + idInfo.data.id,
        "GET",
        "application/json"
    )
        .execute()
        .json(NewUrlInfo::class.java)
        .data.attributes.results
}
charred monolithBOT
dusk blaze
#

wait how

austere talon
#

the pr was sent from that fork

dusk blaze
#

oh fork was in an org

#

so insane

charred monolithBOT
fossil inlet
#

@dusk blaze love

median rapids
#

ong pring a fix would've been less effort than making an issue

rugged spire
#

can we just fix the setting name formatter to not put a space if the previous letter is a capital

scenic brook
#

Just add display names

scenic brook
#

lol half the descriptions in the customRPC settings are just restating the name of the option

#

Button 1 URL

charred monolithBOT
scenic brook
#

There's so many plugins

hollow musk
#

how exactly does webpack's findComponentByCodeLazy work? i dont see it being used anywhere else other than vencord

scenic brook
#

It's not a webpack thing, it's a vencord thing

#

Vencord's find functions just search through the webpack module cache and return whatever matches your filter

hollow musk
#

why does it import from webpack then?

brazen bone
#

It's imported from Vencord.Webpack

#

Which is a quite reasonable name for vencord's utilities fir dealing with webpack

hollow musk
scenic brook
#

It's just an alias

#

Actually this one I think but you get the idea

hollow musk
# scenic brook

oh thats interesting, wait so you said webpack module cache, what exactly is that?

scenic brook
#

I believe that's just a webpack thing, it caches modules as they're loaded. I'm no expert on that though

#

Have a look over src/webpack/patchWebpack.ts and src/webpack/webpack.ts to see Vencord does

charred monolithBOT
fossil inlet
#

@limber skiff uhhhh, how do i get the source of the original factory?

#

it used to be wreq.m[number].original

limber skiff
#

String(wreq.m[...])

#

It will always be the original

fossil inlet
#

ah

limber skiff
#

either way use the functions we export

#

to get patchedBy, patchedSource and originalFactory

fossil inlet
limber skiff
#

if you use the one to get originalFactory you can always be sure stringfying it will be the original source

fossil inlet
#

also i cant find a function for getting the original source of a module

limber skiff
#

however, toString is also monkey patched to always be the original too

#

so it doesn't matter

charred monolithBOT
charred monolithBOT
wary palm
odd heath
#

i hate that stupid sticky message so much

wary palm
#

Which one?

#

Ah it's core-development

#

Sorry

#

Why don't we have a offtopic channel to spam that cat to Elvy

charred monolithBOT
fossil inlet
limber skiff
#

I think I can use this to improve patcher more

#

๐Ÿ˜ญ

#

more specifically, nuke this

#

and hopefully avoid creating so many closures

odd heath
#

though one could add a setting for it ig

limber skiff
#

support helpers should still know what is the current sticky message

limber skiff
odd heath
limber skiff
#

provide better support

#

lol

odd heath
limber skiff
#

when things break, yeah sometimes

#

I feel like I should split this into multiple files

odd heath
#

should i justz close my pr or implement the thing in another way that still shows the sticky message sometimes?

median rapids
#

"let's reduce code size!"

limber skiff
#

lol

#

they should go back to their old mangler which was so intensive that it merged modules into a single one

glass jasper
limber skiff
#

would that break a lot of plugins? yes.

median rapids
#

they switched cuz of build times pretty sure lol

limber skiff
#

yep

odd heath
median rapids
#

i think it shaved like 4 or 5 minutes off their build times

limber skiff
#

well

#

not go back to webpack

#

but find that plugin again

#

(or make)

median rapids
#

they should bring back display names...

limber skiff
#

ehhh

glass jasper
median rapids
#

vencord will convert to monkeypatching

limber skiff
#

what for?

limber skiff
#

vencord is all about regex patching and then deep down it all starts at monkey patching (kinda of)

limber skiff
#

I am currently bricking vencord

odd heath
#

what are you doing even

limber skiff
#

hopefully making the patcher use less memory

#

changing some hacky tricks to some not so much but clever hacks

scenic brook
odd heath
#

yea

limber skiff
#

so much clever

limber skiff
#

first try

#

lovely

#

omg can I abuse name?

#

holy shit I can

odd heath
#

Hmm what do you wanna do with name

limber skiff
#

as you can see I needed their module id somehow

scenic brook
limber skiff
#

so I was manually assigning it to a symbol

#

but I dont need to, because I can abuse how their key in the object is set as their name

#

however, why are some patched and not restored to their original?

#

patching only occurs when they are applied, which means they should be running instantly after and restoring

odd heath
limber skiff
#

oh lol

#

how did this happen

limber skiff
#

now it's right

#

and when eagerPatches are enabled, they are patched right when they are proxied

fossil inlet
#

@limber skiff how do i import functions from patchWebpack

because importing from "webpack/patchWebpack" throws a runtime error

and this looks ugly

limber skiff
#

so annoying that proxies change toString...

#

because importing from "webpack/patchWebpack" throws a runtime error

#

which?

fossil inlet
#

caused by

scenic brook
#

I dynamically imported in a function but it meant I had to async a few things

fossil inlet
limber skiff
limber skiff
fossil inlet
limber skiff
#

I dont think so...

#

let me see

#

hmm

#

what if I delete toString from the proxy actually

#

๐Ÿ˜ž

fossil inlet
#

where is this code

limber skiff
#

in my computer

fossil inlet
#

ah

limber skiff
#

KSDBJDFGDHJSFDFDS

fossil inlet
#

i wanted to try something

limber skiff
#

the issue is proxies have their own toString

#

I can overwrite it

#

but I dont wanna have to bind the original toString

#

look at the amount of proxies

#

that's exactly what I wanna avoid

fossil inlet
#

@limber skiff you should push your code somewhere blobcatcozy

now i want to play around with this

limber skiff
#

nah wait a bit

#

I'm refactoring this

fossil inlet
#

ah

limber skiff
#

why tf can I overwrite and not delete?

fossil inlet
limber skiff
#

let me see

#

where is it

odd heath
#

i ate it

fossil inlet
#

@limber skiff got toString working

#

on a proxied function

#
p = new Proxy(myFunc, {
    get(t, n) {
        const p = t[n];
        return (typeof p === "function") ? p.bind(t) : p;
    }
})
limber skiff
#

remove the bind

#

does it still work

fossil inlet
#

no

#

its an issue with the this value

limber skiff
#

okay I will just do this for toString

#

I wonder why this didnt work

#

oh I know

#

nvm still not working?

fossil inlet
limber skiff
#

it breaks vencord somehow

fossil inlet
#

horror

limber skiff
fossil inlet
limber skiff
#

ThemeStore is undefined somehow

#

hmm

fossil inlet
limber skiff
#

oh wait

#

binding everything makes the apply trap not run

#

tf?

#

ah

#

I know why

fossil inlet
limber skiff
#

it's getting call from the target and binding it to target again

#

and target is not the proxy

#

so it ends up just calling the unproxied target

fossil inlet
#

So you can only bind toString

limber skiff
#

fixed it

fossil inlet
limber skiff
#

or instead just bind toString specifically

#

hold on let me see what is receiver again

#

just gotta bind to receiver instead

#

nvm...

#

oh I made a typo lol

#

alright there we go

#

@fossil inlet ALL FOR NOTHING

#

okay, this.

#

@fossil inlet I might just delete this

fossil inlet
limber skiff
#

it doesnt make sense anymore

#

because the factory is only actually patched once applied for the first time

#

the patched version or the wrapper doesn't end up being stored anywhere

#

@fossil inlet can you debug more the Webpack circular dependency?

fossil inlet
#

yea

limber skiff
#

I have a feeling it might be patchWebpack importing "../plugins"

fossil inlet
#

@limber skiff was able to fix it by moving patches declaration to patchWebpack.ts (not sure if src/vencord.ts is a better place for it)

#

it also has to be re-exported from plugins/index.ts for vesktop support

charred monolithBOT
#
[Vendicated/Vencord] New branch created: patcher-less-closures
limber skiff
#

gotta update comments

#

I feel like my eslint is not even working

#

ah I know why

charred monolithBOT
limber skiff
#

vtest patcher-less-closures

nimble pendantBOT
nimble pendantBOT
nimble pendantBOT
charred monolithBOT
#
[Vendicated/Vencord] New branch created: dependabot/npm_and_yarn/esbuild-0.25.0
#

Bumps esbuild from 0.15.18 to 0.25.0.

Release notes
Sourced from esbuild's releases.

v0.25.0
This release deliberately contains backwards-incompatible changes. To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild in your package.json file (recommended) or be using a version range syntax that only accepts patch upgrades such as ^0.24.0 or ~0.24.0. See npm's documentation about semver for more infor...

glass jasper
#

I hate dependabot

scenic brook
#

tbf esbuild does need updating

fossil inlet
#

love

#

just a bit new

limber skiff
#

neattt

#

when firefox has it and not chrome

#

๐Ÿคจ