#๐Ÿ‘พ-core-development

1 messages ยท Page 25 of 1

austere talon
#

why is it 4 on mac

umbral hedge
#

they have like 2/3/4 and they do different screenshots

austere talon
#

I see, that sounds cool! I think if you make the plugin more complex it's probably better as a third party plugin at that point, since it's very niche.

sadly third party plugins are not very usable for normal users rn but I plan to work on that at some point (as in you will just have to add a js file to a folder and it gets loaded automatically)

we can just merge it for now and just remove it and make it into a third party plugin eventually once that situation has improved

umbral hedge
#

window, screen, selection

charred monolithBOT
azure jay
austere talon
#

โŒ

charred monolithBOT
umbral hedge
#

byHug()

charred monolithBOT
limber skiff
#

super pog ven

charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

#
Bad Patches

None

Bad Starts

None

Discord Errors

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
austere talon
#

it already works tho? @spark cove

spark cove
#

wait how

#

A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.

#

maybe its cus its extensible

#

yea thats why

#

@austere talon try it on a non-extensible object like findByPropsLazy("CREATE_INSTANT_INVITE")

charred monolithBOT
austere talon
#

works on my machine

#

though so many

spark cove
#

oh theres more than 1

#

guhh

#

findLazy(m => typeof m.ADMINISTRATOR === 'bigint')

austere talon
#

didnt find module guh

charred monolithBOT
spark cove
austere talon
#

i dont really see the use case for this tbh

spark cove
#

you used the wrong find lol

austere talon
#

yes ik

spark cove
#

how can u not see the use case lmao how else are u gonna enumerate those modules

austere talon
#

more like why do u need to enumerate them

spark cove
#

@limber skiff is doing it

#

but its kinda obvious

#

thats where u get the bitwise permissions

austere talon
#

why do u just return?

spark cove
#

ah cus if i didnt then someone could attach GET_KEY to a module

austere talon
spark cove
#

i dont see a problem with the pr, that isnt an obvious solution because most people dont understand where the problem comes from

#

the pr just fills a hole in making lazy values feel natural

austere talon
#

i dont get how ur pr is supposed to fix the issue at hand, all it does is make getOwnPropertyDescriptor always return undefined unless u use those symbols

#

are u sure u didnt flip the if?

spark cove
#

the key line is

#

if (descriptor) Object.defineProperty(target, p, descriptor);

charred monolithBOT
spark cove
#

its a little whimsical let me try to show the case that its for in a screenshot

austere talon
#

u could just remove those checks entirely

#

and ```diff

  • Symbol.for()
  • Symbol()
(or even don't, this is not really relevant imo, if someone wants to break it they can do that :P)
spark cove
#

yea thats true

#

i will

spark cove
#

but fair

charred monolithBOT
spark cove
#

does the pr make sense yet btw @austere talon

spark cove
#

i just got what u meant

#

it was flipped LMAO

austere talon
#

hmmm do u remember u complained about lag when alt tabbing @spark cove

spark cove
#

ar eu gettin gthat with notifs css

#

maybe its .vc-notification h2

#

nah theres like 3 of them on screen

austere talon
#

no

#

it happens on main

spark cove
#

oh

austere talon
#

it doesnt happen with all plugins off

spark cove
#

let me build main

austere talon
#

u will figure out which plugin it is

spark cove
#

BRUH

#

which plugin is it

#

u will give me ur plugins list

austere talon
#

its message lagger

spark cove
#

oh ok

#

that was an easy find

#

lmao

#

.messagelogger-red-text .messagelogger-deleted div

austere talon
#

i mean

#

DIV

#

bad

austere talon
#

cause its always stupid css causing it

austere talon
austere talon
spark cove
#

it still lagg with out it?

#
window.onfocus = () => { console.time('window focus tick'); setImmediate(() => console.timeEnd('window focus tick')) }```
#

if u want to measure

austere talon
#

i deleted all logger css

#

still lag

spark cove
#

now turn off logger

#

sitl lag?

austere talon
#

maybe this

spark cove
#

im also getting the lag without css yea

austere talon
#

OHHH

austere talon
#

but why is that being called?

spark cove
#

huhh

#

how

#

oh

austere talon
#

its only being called once and not anymore after focus

#

HOLY SHIT

spark cove
#

i think its having to rewalk the dom to apply those cus

austere talon
#

just the existence of this class = insane lag

spark cove
#

yea

austere talon
#

WHY???

umbral hedge
#

balls

spark cove
#

guh css so good

austere talon
#

WAIT

#

i think i know why

#

u know how we and themes use [class^=bleh] selectors

spark cove
#

yeas=

austere talon
#

something something it has to check entire body if it has class?

#

like its stupid and [class^=bleh] div checks every div in dom?

spark cove
#

u dont do that tho

austere talon
#

well i will just not do the class

spark cove
#

u have [class^=buttons] as the final node

#

which is optimized

austere talon
#

well idk but

#

in any case it causes lag

#

so i will fix

#

u love

spark cove
#

idgi but u will fix

austere talon
#

yop

spark cove
#

i thought the lag was the body class

#

rather than the attribute selectors

umbral hedge
#

what, you're telling me it wasn't the crypto miner we added?

tidal cloud
#

uwu i love crypto miners </3

spark cove
austere talon
#

yeah but idk

spark cove
#

i must find out

austere talon
#

u love

spark cove
#

there has to be some kinda paint debugger

#

YES

#

I LOVE

tidal cloud
#

what is ?managed for

austere talon
#

without it it is automatically attached for u

tidal cloud
#

ooo

austere talon
#

okay yeah lag is fixed @spark cove

#

so goofy

spark cove
#

i will read webkit implementation to find out why body class so lagg

charred monolithBOT
austere talon
#

i still think it's cause of [class*=] selectors

#

anyway i will now restore my settings

#

i love settings backup

#

guh it doesnt work

#

what did discord do

#

๐Ÿค”

#

s.zz my hatred

#

WHAT IS THAT

umbral hedge
#

500MB

austere talon
#

OH

umbral hedge
#

524288000/1024/1024 you love

spark cove
#

fun fact there is constantly something repainting in the background of discord

#

what the hell is this

umbral hedge
#

probably the debug popup thing

#

but its supposed to be hidden

#

lol

austere talon
#

it still doesnt work

#

explain

spark cove
#

like for vc?

tidal cloud
#

state of the art react client

umbral hedge
#

lemme try remember how to open it

austere talon
#

wait

#

uploadFiles is just broken

umbral hedge
#

when isnt it

spark cove
#

what zee hell

umbral hedge
#

file uploading on windows to discord always has problems

umbral hedge
austere talon
#

discord tripping balls?

umbral hedge
#

yeah that happens to me all the time

austere talon
#

i will try on vanilla

umbral hedge
#

so i started getting in the habit of drag-and-dropping files instead of using the uploader

#

it always happened to me on vanilla too xd

austere talon
#

mmm

#

it might be cause i had buggy discord

#

like i had two open somehow

#

it fixed after fully closing and restarting

spark cove
#

ah i see

umbral hedge
#

idk but the issue happens all the time for me :^)

spark cove
#

nah its not taht

austere talon
#

we could just always use the web method

#

discord so bad

umbral hedge
austere talon
#

it work

#

even on electron

#

why does discord have their own native method?

#

i also love how web spec has no proper js method to prompt for file upload

#

so u have to make input element and click it programatically

#

so dumb

spark cove
#

HAHA ITS

#

ITS THE STICKER SUGGESTIONS

umbral hedge
#

?

austere talon
#

the floating thing

austere talon
umbral hedge
#

oh

austere talon
#

anyway do u approb notifications api @spark cove @umbral hedge

umbral hedge
#

that

#

I haven't looked at it I will now

spark cove
austere talon
#

cause using an extra state seems so hacky

#

basically i need to reevaluate this memo on "focus" event

#

to redo the document.hasFocus()

umbral hedge
#

WindowStore.isFocused()

austere talon
#

whaa

spark cove
#

INSANE

austere talon
#

that is real?

umbral hedge
#

yep

austere talon
#

horror

#

how is that real

spark cove
#

window-1

umbral hedge
#

because discord needs to check focused too#

spark cove
#

yea they use it for react helmet

austere talon
#

uh so

spark cove
#

i didnt even think about the fact taht theyd prob use a store for it

austere talon
#

how do i use that

#

can i just useStateFromStores it

spark cove
#

ye

umbral hedge
#

yeah

#

discord uses it like this

#

const focused = useStateFromStores([WindowStore], () => WindowStore.isFocused());
spark cove
#

do u have the getStoreByName

austere talon
#

LOVE

#

okay i will do

#

thanks

#

:3

umbral hedge
#

:3

#

np

spark cove
#

so epic

austere talon
#

useStateFromStores so bad though

#

it calls like 20 hooks

umbral hedge
#

ye

austere talon
#

like the hook is super useful

#

but so deranged

umbral hedge
#

discord uses connectStores a lot which is horrifying

spark cove
#

20 hooks so many

umbral hedge
solemn spoke
#

opticord when

umbral hedge
#

when discord stops minifying their builds trolley

spark cove
#

nop

#

i will do advacned es5 to esnext transform

umbral hedge
#

I'd love to do it but... regex replacements are pretty rudimentary

spark cove
#

i have a project im working on that uses AST to detect tslib/swchelpers/etc

umbral hedge
#

rewriting functions is doable but if discord changes something that relies on it... that could go wrong

spark cove
#

and then tersing

solemn spoke
#

wdym?

#

how so

austere talon
#

I don't get its purpose

umbral hedge
#

lemme check the shitload of comments discord wrote for it

#

answer: dont use it

spark cove
#

here me out

umbral hedge
#

full of confidence when i see so maybe it's safe? in the comment

solemn spoke
# umbral hedge answer: dont use it

kgremlin discord dev, you're a programmer writing a comment working on maybe the biggest startup ever, either the comment is uselessly funny or it is formal

spark cove
#

they were just in a silly goofy mood

solemn spoke
#

maybe

#

but still, fOrMaLiTy

spark cove
#

cringe

solemn spoke
spark cove
#

nop

solemn spoke
umbral hedge
#

?

solemn spoke
#

the regex replacements, why they're rudimentary

umbral hedge
#

because parsing out functions safely with just a single regexp is difficult

#

there are tons of things in discords code that are hard to parse out safely

#

we experimented with AST stuff but it took way too much time

solemn spoke
#

hm

#

makes sense

#

time to use AI to unminify discord

tidal cloud
#

no

umbral hedge
#

yop

#

VenGPT

solemn spoke
#

lol

#

i mean, maybe we could parse to chatgpt to unminify code

umbral hedge
#

bad idea lol

solemn spoke
#

ยฏ_(ใƒ„)_/ยฏ

spark cove
#

CODE IS LANGUAGe

#

CODE IS LANGUAGE

solemn spoke
#

humans have a hard time reading code

#

machines dont, and they're way smarter than us

#

if smarter means math

austere talon
austere talon
umbral hedge
#

o

umbral hedge
austere talon
#

parses 2mb in 10ms

#

it was literally just cause I used wasm

#

and serialisation sososososo slow

umbral hedge
#

oh lmao

#

so acorn is fine

#

just swc bad

#

that makes sense though

#

vencord AST modding soon

austere talon
umbral hedge
#

a string

austere talon
#

it works

#

so we could actually use acorn

umbral hedge
#

nice :3

#

we could maybe have plugins export an acorn tree parser fn

#
#

like something that could fit in acorn-walk

#
export default definePlugin({
   transforms: {
      Literal(node) {
         // trolley
      }
   }
})
austere talon
#

idk

#

this stuff confusing

#

@spark cove will implement a prototype

umbral hedge
#

poor vap being forced to do this

#

AST is ez

#

the annoying thing is you have to add way too many if statements

umbral hedge
#

also u will read dms immediately

spark cove
#

he's only saying that because i am insane ASTer

austere talon
#

yop

#

but hop on #467 first

umbral hedge
#

you didnt read dms

#

๐Ÿ˜ญ

charred monolithBOT
austere talon
spark cove
#

so bad

umbral hedge
#

get real

austere talon
charred monolithBOT
umbral hedge
#

WindowStore so good

austere talon
#

bad types

#

u will give better type

umbral hedge
#

ogey

austere talon
#

copilot insane

umbral hedge
#

function defaultAreStatesEqual<T>(state1: T, state2: T): boolean {
  return state1 === state2;
}

type CompareStatesFn<State> = (prevState: State, newState: State) => boolean;
type Deps = Readonly<any[]> | undefined;

function useStateFromStores<State>(
  stores: Array<Store<any>>,
  getStateFromStores: () => State,
  dependencies?: Deps,
  areStatesEqual: CompareStatesFn<State> = defaultAreStatesEqual
): State
#

you love

austere talon
#

dependencies so bad

umbral hedge
#

any[]

charred monolithBOT
austere talon
#

actually didnt even give me anything useful

umbral hedge
#

lol

austere talon
#

i already knew everything except dependencies

#

but deps so useless

umbral hedge
austere talon
#

yes

#

u love

#

i changed it to idk: any

#

:)

umbral hedge
#

what is idk

austere talon
#

idk

umbral hedge
#

lmao

austere talon
#

ok look pr

umbral hedge
#

ogey

#

now look dm

#

shame image urls dont work on windows ๐Ÿ˜ญ

#

works in app tho

#

icon works tho

#

lmao wtf

#

alert moment

#

onClick does nothing for me from windows notifications, but that's the same even with native discord notifs so im not sure I'd call it an issue with the PR xd

austere talon
#

how is ur pc so broken

#

works on my machine

umbral hedge
#

ยฏ_(ใƒ„)_/ยฏ

#

I blame discord

#

it's the only app with this problem

#

same with the file explorer thing you had earlier

#

I get that often

austere talon
#

show what u ran

#

and r u on win10 or 11

umbral hedge
#

11 ofc

austere talon
#

huh

umbral hedge
#
setTimeout(() => Vencord.Api.Notifications.showNotification({
    title: "h",
    body: "hhhh",
    icon: "https://cdn.discordapp.com/avatars/343383572805058560/a_080e59d3bf37c4bac3843912a680b494.webp?size=80",
    onClose() {console.log("uwu")},
    color: "red"
}), 1000)
#

onClick too

austere talon
#

youre using onClose

umbral hedge
#

that was just the last one i ran xd

austere talon
#

does onClose work

umbral hedge
#

in app yeah

austere talon
#

not native?

umbral hedge
#

not native

austere talon
#

issue of skill

umbral hedge
#

ya its an issue i have with native notifs as well

#

but only from discord

austere talon
#

it has nothing to do with discord tho

#

its issue of ur system

umbral hedge
#

every other notif works fine

umbral hedge
#

nothing big

#

I think the PR is fine shiggy

umbral hedge
#

lol

#

real

#

the number seemed specific so it felt like there should've been some purpose

austere talon
#

this ext is so cool

umbral hedge
#

what ext is that

austere talon
#

pretty awesome

umbral hedge
#

i love

umbral hedge
#

lmao

austere talon
#

could be 0 too

#

:P

umbral hedge
#

can u change it to 0

#

it's kinda misleading

#

xd

umbral hedge
#

hate

#

personally I think at least 1337 is obviously random :P

austere talon
umbral hedge
#

I mean I could imagine 42 being some magic discord number

austere talon
#

The Answer to the Ultimate Question of Life, the Universe, and Everything

#

i originally also used 42 for the z-index

#

but turns out discord uses z-index > 42

umbral hedge
#
austere talon
#

so i just made it the 32bit integer limit :p

umbral hedge
#

lmao

#

real

austere talon
#
  • how tf is that UR tweet lmao
umbral hedge
#

twitter blue 2k limit or smth

austere talon
#

in the link

umbral hedge
#

uhhh

#

i think because I copied the link from a notification

#

"x liked your retweet"

austere talon
#

@spark cove LOOK

#

or never use rust again

umbral hedge
#

personally I think there should be more packages

spark cove
austere talon
spark cove
#

I'm at the mall

austere talon
#

OMG

#

what u getting

umbral hedge
#

TRUE

#

๐Ÿฅน

austere talon
#

why doesnt discord infer min and max automatically

#

so dumb

umbral hedge
#

:^)

austere talon
#

ig the min of 0 is obsolete

#

but like grrr

umbral hedge
#

yeah defaulting 0-100 is weird

#

with a default value of 10

#

because fuck you

austere talon
#

isnt it 1

#

oh

#

discord so insane

umbral hedge
#

ye

#

its stupid

charred monolithBOT
woeful sable
#

self star

#

explode

tropic wagon
#

yes

#

i stand by what i said

#

click the emoji @woeful sable

charred monolithBOT
crude hearth
#

@austere talon finish

austere talon
#

FINIOSH WHAT

crude hearth
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

#
Bad Patches

None

Bad Starts

None

Discord Errors

placid wave
#

@crude hearth@crude hearthFINISH NOW

limber skiff
austere talon
#

wtf are those classnames

#

so verbose

#

.perm-viewer-user-permissions-title-toggle-permissions-btn

limber skiff
#

ยฏ_(ใƒ„)_/ยฏ

austere talon
#

u will use shorter names

limber skiff
#

๐Ÿ˜ญ

austere talon
#

.permviewer-btn

limber skiff
#

aight

austere talon
#

:P

limber skiff
#

done ๐Ÿ˜Š

#

guh I will add context menu to categories too

#

there

charred monolithBOT
umbral hedge
#

ya

charred monolithBOT
woeful sable
#

yop

charred monolithBOT
cunning bobcat
#

๐Ÿด

crude hearth
#

What a nice thing to see as soon as I wake up

solemn spoke
#

@crude hearth

crude hearth
#

@solemn spoke

charred monolithBOT
charred monolithBOT
austere talon
#

why did u undo like half the plugins again @rigid venture

rigid venture
#

cuz ``

#

doesn't work

#

and some other places aren't strings

#

doesn't it only work w strings idek

austere talon
#

it should work fine with functions and even ``

rigid venture
#

doesn't work for raw that's what i know for sure

limber skiff
#

it doesnt with replace functions

austere talon
#

oh yeah it doesn't work with functions

#

idk why tbh, it could

#

@spark cove is there any reason u didn't wrap functions to replace the $self in the return

austere talon
grave mangoBOT
austere talon
#

this could wrap the function

#

I'm asking if there's any reason you didn't do it, like were there any issues or if just forgot / no reason

spark cove
#

ohh

#

i probably forgot

#

u should do that

#
if (typeof replace === "function") return (...args) => replace(...args).replaceAll("$self", `Vencord.Plugins.plugins.${pluginName}`);```
austere talon
#

ye basically

limber skiff
#

any way to allow \i in any regex

#

you will monkey patch regexp constructor

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
austere talon
austere talon
#

i think that was just an accident tbh lmao

umbral hedge
#

lmao

#

@woeful sable you don't need to open a pull request to compile it lol

woeful sable
#

im so confuseed

umbral hedge
#

pnpm buildWeb --standalone

woeful sable
umbral hedge
#

follow the guide ๐Ÿ˜ญ

woeful sable
#

im trying bb_sad

umbral hedge
solemn spoke
#

we rly should find a way to make user plugins easier to be installed for bd noobs

umbral hedge
#

bd noobs try to install bd plugins

#

we plan to improve userplugins eventually anyways

solemn spoke
#

how so?

umbral hedge
#

by making them actually work

#

๐Ÿ’€

solemn spoke
#

wait, wdym by userplugins

austere talon
#

u just plop js file in a folder and it loads it

#

simple

#

but some dumbass is gonna put bd plugins in there and complain it doesnt work

solemn spoke
#

i meant bd noobs as the ones that used the installer and think that you have to download plugins instead of using the built in

#

even tho 3rd party plugins shouldn't be used, it is good to provide a good way to install them

umbral hedge
#

ya thats what i mean

#

we plan to support them

solemn spoke
#

hm

#

i see

umbral hedge
#

the idea is to make a template github repo

#

which has a workflow to compile it

#

and you download that

#

already made a typedefs thing for use in third party plugins

#

but i didn't really know the best way to load arbitrary js plugins (+ the fact they need to patch code too) so was waiting for someone else to jump on it

solemn spoke
#

i have an idea, couldn't you load locally? like, go to a folder and load it

umbral hedge
#

wat

#

how else would it be done

solemn spoke
#

like, vencord would create a folder at the home directory in where you could input 3rd party plugins

#

ik that's a no-go for browser, but like, the other option is to either recompile it or to fetch the plugin, that is horrible for a slow connection

umbral hedge
#

I doubt we'd support it for browser

solemn spoke
#

yeah

#

or at least stay with the compile method for browser

#

anyways, what do you think of doing a simmilar approach to traditional mods

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

solemn spoke
#

wait, forget all what i said

#

what if we fetched the plugins first then put it in some sort of cache

#

so we wont need to fetch every time we load

frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

woeful sable
#

esbuild wasm

umbral hedge
#

making sure they don't get auto updated is important

solemn spoke
#

considering they'll get cached somewhere, auto update is likely manageable

umbral hedge
#

ofc

austere talon
#

fetching plugins doesnt work

solemn spoke
austere talon
#

because they need to be run synchronously

solemn spoke
#

idk, fetch it one time, save in cache, do a restart and then load from cache?

woeful sable
#

obvious solution

#

do immediately

spark cove
#

be nice

spark cove
#

oml i have to make sure

#

spotifyControls still works

#

oh nvm nothing really changed

charred monolithBOT
verbal pumice
#

also 369

charred monolithBOT
rigid venture
#

leave her alone

cunning bobcat
#

oh okay

#

i assume you couldn't get it to work properly?

limber skiff
#

nah it's not that

#

I'm gonna work on other things first

cunning bobcat
#

or do you just spend all time on other stuf- of course

limber skiff
#

If I ever get back into it I will reopen

#

I'm improving message logger next

#

that includes adding cache persistโ„ข๏ธ

woeful sable
#

do not

limber skiff
#

will

woeful sable
#

bad

limber skiff
#

will have option for it too

limber skiff
#

guh so much hate for log cache

cunning bobcat
#

log cache bad

#

you will not store logs

#

0 (justified) use cases

charred monolithBOT
azure jay
#

pleadey what in the world is this emoji

austere talon
#

pleadey

solemn spoke
charred monolithBOT
limber skiff
#

spammerr

#

sorry you were chosen as my test subject pleadey

austere talon
#

wha

charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Starts

None

Discord Errors

#
Bad Patches

None

Bad Starts

None

Discord Errors

charred monolithBOT
woeful sable
#

i will soon i am busy procrastinating

charred monolithBOT
turbid hatch
#

@austere talon nope apparently this is intentional

#

we need to replace 1100 characters +/- some

#

i didnt actually see what this was patching originally but we're actually just rewriting the entire render function for the headers so i'll need to work out how to make it more specific

turbid hatch
#

well thats that fixed

#

much more specific patch now

austere talon
#

yeah idk how much of that code is yours

#

i didnt look at the original pr much

turbid hatch
#

not very much

#

mainly touchups and linting compliance

#

and adding settings

#

i didnt realise how awful that patch was until i threw it into regex101

austere talon
#

its very easy to write dangerous matchers

turbid hatch
#

mm, ive tried making it as specific as possible by matching on something that's only in that func body within a certain no. of characters so it should be good

#

it only matches that one render func in the module now

austere talon
#

thats a lot better pekoraBobSmolArs_Pat

turbid hatch
charred monolithBOT
charred monolithBOT
#

Discord Account

afterSt0rm#0740

What is it that you'd like to see?

I recently upgraded my PC, and I'm doing the "install everything again" step, which is painful. Most of my applications are easily available using winget, so it would be nice to have the Vencord installer also available on winget. You can find additional information about how to create a winget package here: https://github.com/microsoft/winget-create

It also helps that once you update the package version, I can u...

charred monolithBOT
charred monolithBOT
woeful sable
#

funny bug

charred monolithBOT
charred monolithBOT
charred monolithBOT
woeful sable
#

true I will

charred monolithBOT
charred monolithBOT
charred monolithBOT
austere talon
#

wtf is type

#

is that burst reactions?

limber skiff
#

yeah

#

type 0 is normal

#

1 is burst

austere talon
#

silly discord not updating docs

#

or is that a weird user only thing

limber skiff
#

I think

#

but dont be surprised

#

discord docs is bad

charred monolithBOT
austere talon
#

thanks

#

theres more plugins that need fix

limber skiff
#

which

#

oh

#

emote cloner

#

I knew I was missing something

#

couldn't remember what

austere talon
#

TypingUsers: Crashes on "Multiple users are typing" in non english languages (such as norsk)
EmoteCloner: Still uses broken patch for context menu stolen from ReverseImageSearch, just gotta copy paste the fix over (or improve it to not copy paste patches from reverse image search)
MessageLinkEmbeds: Crashes on link cycles

#

theres an open pr for MessageLinkEmbeds but it uses global state which is bad

limber skiff
#

message link embeds is getting fixed by sofia

#

ah

#

can you review my prs ๐Ÿฅบ

austere talon
#

yeye in a bit

woeful sable
#

I'm not sure how else you could do

austere talon
woeful sable
#

I assumed it was okay since there's global message cache there

woeful sable
austere talon
#

okay i fixed it

#

ugly but u get the point

#

should i just not render anything?

#

ye i think thats better

charred monolithBOT
austere talon
#

please review / test @woeful sable

charred monolithBOT
austere talon
#

mmm

woeful sable
#

yeah that's a lot better

#

could limit depth too maybe

austere talon
#

mmm

#

its not perfect rn

#

for some reason theres a bug

woeful sable
#

wtf is Reflect

charred monolithBOT
austere talon
#

ye ok we good

austere talon
#

so inside proxy trap get() you can just call Reflect.get() with the arguments you got to do the default action

#

so that proxy returns embeddedBy for key "vencordEmbeddedBy", and the default value for anything else

#

the reason I use a proxy is so that I don't have to pollute the original message object

charred monolithBOT
woeful sable
#

wtf environmentalist js

#

I LOVE POLLUTION

austere talon
#

thank you anyway FubukiDance2

austere talon
woeful sable
#

my first thought was polluting the message object cuz I didn't know u could do this

#

that's way better I think

limber skiff
woeful sable
#

@austere talon realisation

diff --git a/src/plugins/customRPC.tsx b/src/plugins/customRPC.tsx
index 9a0901b..82c2c73 100644
--- a/src/plugins/customRPC.tsx
+++ b/src/plugins/customRPC.tsx
@@ -216,7 +216,8 @@ async function setRpc(disable?: Boolean) {
 
     FluxDispatcher.dispatch({
         type: "LOCAL_ACTIVITY_UPDATE",
-        activity: !disable ? activity : {}
+        activity: !disable ? activity : null,
+        socketId: "CustomRPC",
     });
 }
 
diff --git a/src/plugins/lastfm.tsx b/src/plugins/lastfm.tsx
index 94cbeca..1866b0a 100644
--- a/src/plugins/lastfm.tsx
+++ b/src/plugins/lastfm.tsx
@@ -88,8 +88,13 @@ async function getApplicationAsset(key: string): Promise<string> {
     return (await assetManager.getAsset(applicationId, [key, undefined]))[0];
 }
 
-function setActivity(activity?: Activity) {
-    FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: activity });
+function setActivity(activity: Activity | null) {
+    FluxDispatcher.dispatch({
+        type: "LOCAL_ACTIVITY_UPDATE",
+        activity,
+        socketId: "LastFM",
+    });
 }
#
  1. discord checks for null, not if the activity object is falsy
  2. discord maps these by socketId (so you can have multiple activities), the only reason it worked is cuz it was mapping both as undefined
#

(socketId is usually a string of a number)

cunning bobcat
#

oh is this a bug fix for two rich presence plugins

#

i hear customRPC i arrive

woeful sable
#

yop

cunning bobcat
#

what happen

woeful sable
#

probably no one noticed but that basically makes them incompatible

cunning bobcat
#

whoops

#

uhh i blame ven for merging my pr

woeful sable
#

true

#

I blame ven for merging my pr

cunning bobcat
#

i blame ven for making vencord in the first place

umbral hedge
#

deleting vencord rn

cunning bobcat
#

the good ending.

woeful sable
#

also am I the only person bothered by a function returning something or undefined instead of something or null

cunning bobcat
#

yes

verbal pumice
woeful sable
#

undefined haters wya

austere talon
#

๐Ÿค”

#

it crashes for me

#

I will check again

woeful sable
#

guhh I will PR a PR again

limber skiff
#

everything seems fine

umbral hedge
#

i thought someone fixed it ages ago

#

try en-GB

spark cove
#

when i can

limber skiff
#

oh it crashed with en gb

umbral hedge
#

okay so it wasn't fixed

#

it was only made for en-US

#

cringe language

limber skiff
#

guh nothing is wrong?

#

what it's working now??

#

I can't get it to crash lol

woeful sable
#

why can u build urlsearchparams from url but not build a url using urlsearchparams

#

js so bad

#

fetch(`https://meow.cat/?${params}`) so ugly

austere talon
#

it doesnt work

woeful sable
#
src/plugins/lastfm.tsx:166:17 - error TS2540: Cannot assign to 'searchParams' because it is a read-only property.

166             url.searchParams = new URLSearchParams({

SO BAD

austere talon
#

fixed it easy

woeful sable
#

what the fuck

austere talon
woeful sable
#

they literally went out their way to make it terrible

spark cove
#

lmao

#

thats so bad

austere talon
#

le works

solemn spoke
#

avatarseverywhere?

woeful sable
#

well now i18n exploded

austere talon
#

but actually

#

why even patch the strings

#

can just replace the string access with hardcoded string

limber skiff
#

it happens specially if you switch language

austere talon
#

no i fixeds already

#

its cause it only patches once

#

so if u load new strings it doesnt repatch

limber skiff
#

are you sure that's the issue

#

oh

#

actually it makes sense

#

because it doesn't have {a} and those thing discord is treating it as a string

#

hence why this doesn't fail

austere talon
#

ye

#

i will fix dw

limber skiff
#

I thought not patching all could be the issue but I was testing other things first lol

#

aight

#

I'm gonna pr the other things I fixed

woeful sable
#

yopp

#

I think whoreacted is also borked

limber skiff
#

I fixed it

woeful sable
#

oh awesom

austere talon
#

just this should work

austere talon
limber skiff
#

sure then lol

austere talon
limber skiff
#

nice

charred monolithBOT
austere talon
#

wait why did you change reverseImageSearch?

#

it works just fine

limber skiff
#

eh to improve it a bit

austere talon
#

tbh i dont like both plugins having the same code

#

could refactor it to an api

#

i should have done that initially but lazy

limber skiff
#

how so?

austere talon
#

wdym

limber skiff
#

an api to add items to that context menu?

austere talon
#

yea

limber skiff
#

ah

#

do you want me to do it

austere talon
#

if u want to

limber skiff
#

yeah sure

#

what should I name it

austere talon
#

well

#

optimally it should be able to patch any context menu

#

the message one too

limber skiff
#

oh

austere talon
#

user ones etc

limber skiff
#

what do you want it to do?

austere talon
#

but theres probably too many?

#

actually

#

i have an idea for that

woeful sable
#

is tsserver ok

limber skiff
#

I'm not quite understanding what you want to achieve lol

austere talon
#

well

woeful sable
#

Auto import from 'console'

austere talon
#

an api to dynamically add context menu entries without patches

limber skiff
#

ah

#

that's not hard to do but

#

what if the user wants to put an entry inside an specific group

austere talon
#

well

#

since there's a single function for opening context menus

limber skiff
austere talon
#

my id was to patch that function then pass the children to the callbacks

limber skiff
#

on permissions viewer I do that for each thing

austere talon
#

chromium show actual arguments challenge

limber skiff
#

hmmm

#

maybe patch the return of the context menus

#

then we modify the children

#

and we can use the key properties to select where to apply an entry

austere talon
woeful sable
#

@austere talon rate ```ts
if (!res.ok || json.error) {
const apiError = json.message
? ${json.error}: ${json.message}
: "no error message";
const errorString = ${res.status} ${res.statusText} (${apiError});
logger.error(Failed to query Last.fm API: ${errorString});
return null;
}

austere talon
#

based on the navId you can check if it's the context menu u want

limber skiff
#

ya

austere talon
#

then you can search the children for where u wanna add

#

and add ur own

#

it should be really simple

limber skiff
#

we should add our own filter

#

by key name

#

that recursively checks

austere talon
#

no need

#

navId will always be there

limber skiff
#

for example

austere talon
#

yeah sure

limber skiff
austere talon
#

yes

limber skiff
#

oh dang

turbid hatch
#

vencord dev is poppin'

turbid hatch
#

also is restartNeeded appropriate on settings that control patches

#

i assume so

limber skiff
#

yes

turbid hatch
#

cool

austere talon
#
patchContextMenu(data => {
  if (data.navId !== "guild-context") return;
  const devModeIdx = data.children.findIndex(item => item.props.children.key === "whatever that ones key is");
  if (devModeIdx === -1) throw "bruhhhh";
  data.children.splice(devModeIdx, 0, <Menu.MenuItem .../>);
})
#

the api could look something like this i think

turbid hatch
#

4cade51 adds them to my settings

limber skiff
#

we also need the props

austere talon
#

didn't think about that

limber skiff
#

we will add a invisible children to all context menus that gives us all the props

#

that way we can transport it like it's part of the context menu lol

austere talon
#

wait wdym

limber skiff
#

for example we will create our copy of e

#

and we will create jsx element passing that copy here

limber skiff
#

actually I'm being dumb lol

#

maybe we can just pass it here?

austere talon
limber skiff
#

yes

#

but we will need that

austere talon
#

pain

limber skiff
#

we need a way to access all the props incoming

#

including the ones our plugins modify

austere talon
#

actually are you sure

#

we might be able to get the dom target somehow without needing more patches

#

that should already be enough since you can get most relevant info from that

#

btw does canary have fixed devtools

limber skiff
#

what's wrong with it

austere talon
#

stable has broken devtools

#

sources Explorer is scufedd

#

jumping to function puts you into wrong place

limber skiff
#

ah

#

I have the same issue with canary one

austere talon
#

oof

#

I use armcord to fix it