#🧩-plugin-development

1 messages · Page 19 of 1

green vessel
#

confirm DiscordNative has a crash function

shrewd yacht
#

I'm on firefox

green vessel
#

oh

#

rofl

#

acrilia is Vencord Desktop on crack

shrewd yacht
#

wait I can get discord native

green vessel
#

on a browser??

shrewd yacht
#

no instalilng it

green vessel
#

rofl

#

I have canary somewhere ill check

dull magnet
#

lmao I was about to say what's the point of pinging in a silent message

#

might as well just not ping then

green vessel
dull magnet
shrewd yacht
#

ye weird

dull magnet
#

bad

shrewd yacht
#

ok I installed, how do I check?

green vessel
#

just now noticing thats not the whole thing

#

devtools

#

DiscordNative is an object

shrewd yacht
#

{
"isRenderer": true,
"nativeModules": {
"canBootstrapNewUpdater": true
},
"process": {
"platform": "linux",
"arch": "x64",
"env": {}
},
"os": {
"release": "6.0.0-12parrot1-amd64",
"arch": "x64"
},
"app": {
"dock": {}
},
"clipboard": {},
"ipc": {},
"gpuSettings": {},
"window": {
"USE_OSX_NATIVE_TRAFFIC_LIGHTS": true
},
"powerMonitor": {},
"spellCheck": {},
"crashReporter": {},
"desktopCapture": {},
"fileManager": {},
"clips": {},
"processUtils": {},
"powerSaveBlocker": {},
"http": {},
"accessibility": {},
"features": {},
"settings": {},
"userDataCache": {},
"thumbar": {},
"safeStorage": {},
"remoteApp": {
"dock": {}
},
"remotePowerMonitor": {}
}

green vessel
shrewd yacht
#

I don't see it

green vessel
#

ven pls

shrewd yacht
#

we need the power of ven

green vessel
#

is this what they use for tokens? DiscordNative.safeStorage.encryptString("Vencord Shiggy")

#

the failed encryption kek

shrewd yacht
#

damn you token look cool

green vessel
#

login with my token everyone pls pls djEwGO7tNt+ckem9o2FpvJA4vwFcXgSEdHwDEqPuqJWd4+riiHXCszvL3h/p

shrewd yacht
#

what's that?

shrewd yacht
#

lol

green vessel
#

who tf are you

untold briar
#

some random guy sorry i just randomly saw that when i clicked on the channel

green vessel
crude iron
#

DiscordNative.nativeModules.requireModule("discord_utils").crash is a thing.

green vessel
shrewd yacht
#

well I hope someone smart figures it out

green vessel
#

soon™️

dull magnet
#

what u trying to figure out

shrewd yacht
#

how to remove all discord ancimations

green vessel
#

ven you were trying to help us and everything husk

shrewd yacht
#

she forgor smh

dull magnet
#

probably not that simple if the Global skipAnimation approach I suggested doesn't work

crude iron
#

Apply * {transition: none !important, animation: none !important;} & patch all react spring animation functions to something that doesn't execute

#

other JS animations need to be tackled down individually

shrewd yacht
#

better css:

*, *::after, *::before {
  animation: none!important;
  transition: none!important;
  transition-duration: 0ms !important;
}
#

does the * take into account *::after?

crude iron
#

transition-duration shouldn't be used when transition is set to nothing, no?

shrewd yacht
#

ye

#

you're right

dull magnet
#

spring has a global skipAnimation but setting it for some reason causes crashes

shrewd yacht
#

it also does nothing

crude iron
#

what kind of crashes? react crashes? client crashes?

green vessel
#

more like freezes the client

#

in my case at least

shrewd yacht
#

same

woven lion
#

isnt this what this option helps with

crude iron
#

that does sound like something is relying on the animation playing

woven lion
#

doesnt this disable spring

viral roost
#

helps not removes

woven lion
#

yeah but it seems like css transitions the rest of the way

viral roost
#

animations are still a thing just faster

crude iron
woven lion
#

weird

#

who the fuck designs an app thats reliant on animations

#

🥴

shrewd yacht
#

there is some animation by js

crude iron
#

reduced motion is only handled in some places (to be exact very few places)

shrewd yacht
#

sry I said the d word

#

don't ban me pls

green vessel
#

is it bad read that as discrud

dull magnet
#

I'm really surprised it crashes tho

#

I'll have to try that for myself

green vessel
#

setting the config so everything is 0 also does nothing

shrewd yacht
#

it doesn't rly crashes, just freezes

green vessel
#

same thing

dull magnet
#

maybe an alternative solution would be to monkey patch springs Animation methods to immediately render the end or smth? I honestly don't know how spring works so it's kinda hard

crude iron
#

yeah that's what I also thought

woven lion
#

if its based on lerp

#

then you could just patch the lerp method to return 1

green vessel
#

wtf is lerp

woven lion
#

linear interpolation

dull magnet
#

when lewi does something derpy, that's what we call a lerp

green vessel
woven lion
#

take t to be the current time of the animation

lerp(t) = t would be a linear animation, 1:1
lerp(t) = (1 - cosin(pi * t)) / 2 would be what you would consider the sine easing funcion (iirc)

dull magnet
#

why does discord have 3 different springs anyway

#

horrible

green vessel
#

4

#

oh how come props only returns 3

woven lion
#

i guess another way of saying it is that it is a tweening function

#

but lerp is the real name

dull magnet
#

wow insta freeze upon

#

thats so weird what are they doing

green vessel
#

😭

dull magnet
#

might be related

shrewd yacht
#

whoa you are fast

dull magnet
#

react-spring v8.0.27 (also reproduced on v9 rc3)

crude iron
#

if that's on purpose, I wouldn't be surprised either because discord is known to be wasteful with memory

shrewd yacht
#

ye

lone panther
dull magnet
#

because it instantly happens and it uses a lot of cpu so an infinite loop is likely

green vessel
#

we just need to team up and create a pure client with no frameworks

shrewd yacht
#

that's def in my capabilities

crude iron
#

that's what I have in progress (and others)

green vessel
#

👀

dull magnet
#

lol i cut off the first screen where it says "no results found"

#

also nice typo!

#

SkipAniamtionSignal

#

okay so slightly deranged but: Patch spring to add this fix to Discord's spring, then use skipAnimation

shrewd yacht
dull magnet
green vessel
shrewd yacht
#

merging without reveiwin

dull magnet
#

typos happen :P

#

do u wanna know how many typos discord has

shrewd yacht
#

no

dull magnet
#

I randomly spotted one in the wild just a few days ago!

shrewd yacht
#

damn

#

this is why software should be that complex

#

it becomes unmaintanable

amber mantle
dull magnet
amber mantle
#

they're funny when I occasionally find them

green vessel
shrewd yacht
#

same

dull magnet
#

they indeed don't have the fix

amber mantle
#

dang

green vessel
#

discord loves being outdated

dull magnet
#

patching it in seems very hard

green vessel
#

great

#

unless its a

dull magnet
#

internal method

green vessel
pure temple
# dull magnet

i've also seen some interesting typos and method names in minecraft's source code

#

youJustLostTheGame causes a segfault

shrewd yacht
#

fun

lament dew
#

real

amber mantle
#

there's also another troll function you should definitely find

pure temple
#

i think it's when you hold F3+C with another key

#

Ctrl+F3+C?

amber mantle
#

just f3 c

pure temple
#

that throws an exception

#

youJustLostTheGame uses LWJGL which then uses sun.misc.Unsafe i think

shrewd yacht
#

yeah if you hold F3+c for like 30s

#

it crashes

pure temple
#

hehe

shrewd yacht
#

am I the only one who’s oneko is broken

worldly tree
#

I think mine was too the last time I used it but idk

#

seems to work for me

shrewd yacht
#

weird

#

I’m dumd

#

mf with

*, *::after, *::before {
  animation: none!important;
  transition: none!important;
}
``` in their quickcss *wonders* why oneko animation doesn’t wory 🤦
green vessel
shrewd yacht
#

ikr

shrewd yacht
#

Can I target all <H> tags with a single css selector?

dull magnet
#
h1, h2, h3, h4, h5, h6 {}
#

or if u want to match them inside smth else, is is your friend

#
.parent > :is(h1, h2, h3, h4, h5, h6) {
}
shrewd yacht
#

nothing shorter than his?

dull magnet
#

no

shrewd yacht
#

can I add a search feature to my website without js?

dull magnet
#

no lol

#

how would that be possible

#

but ctrl + f

shrewd yacht
#

with a cgi

grim hare
#

look into html forms if you're wanting to use server side searches without js

dull magnet
#

why no js tho

#

we are in 2023

shrewd yacht
#

to make my website more lightweight

dull magnet
#

thats not how that works

#

js is fine

#

just don't use mega bloated libraries

shrewd yacht
#

ig you're right

#

I just think cgi is better

#

for searching

green vessel
#

browsers are actually written in javascript they've tried to hide this from us but js is actually a highly efficient self hosting language .

shrewd yacht
#

noooo make a rust browser

#

damn

green vessel
#

what runs the javascript code? MORE JAVASCRIPT. all kernels nowadays are written in typescript

#

and it comes down to your cpu to execute the kernel's transpiled ts

#

you cannot escape

shrewd yacht
#

stop giving me nightmare fuel

green vessel
#

this is actually a rule the ieee and iso made in conjunction with ecmascript. search JavaScript Rule 34 to learn more

lament dew
#

im looking it up right now

shrewd yacht
#

same, nothing interesting

green vessel
#

if you look on linux distros you'll likely find gcc. that is the GuavasCript Compiler (guavascript is just the language's old name)

#

this is also why Java's JSON library is named GSON

oblique lark
#

yeah they wanted to name it guavascript at first but then realized that copying java would be better for business

ionic breach
#

hmm okay i've

  • compiled vencord with DEV (i can see the patch helper option)
  • ive started discord after vs code both with and without .\Discord.exe --remote-debugging-port=9223 --inspect

but still when i right click on my discord user settings cog I don't see "Reconnect Dev Companion" and when I try to click on "test Patch" I get "no discord clients connected"

right clicking on the discord user settings cog just gives me a list of all my setting options. and maybe im blind but i don't see it there? What am i missing

chrome elbow
ionic breach
#

yee

chrome elbow
#

(in vencord plugins list)

ionic breach
#

gdi

#

ive never seen it there

#

which makes sense

#

never was looking for it

#

i knew i was missing something dumb again

#

ty

#

Patch Ok

#

and enable the "DevCompanion" plugin
i read this as extension not plugin i just can't read

shrewd yacht
#

is there is a neovim dev companion?

opal fern
#

No

green vessel
#

-t yet

dull magnet
#

port it

dull magnet
#

bro how am i even supposed to use this class

#

hardcoding fun

cedar olive
#

that's one way without using regex lol

#
const HeaderWrapper = findLazy(m => {
    if (typeof m !== "function") return false;

    const code = Function.prototype.toString.call(m);
    return code.includes(".id;return(0") && !code.includes("guildId");
});

<HeaderWrapper className={classes.privateChannelsHeaderContainer}>Pinned DMs</HeaderWrapper>
dull magnet
#

that doesn't seem very robust tbh

#

what if they add more similar modules

cedar olive
#

It's better than hardcoding the class tbh

crude iron
#

could extract it from where it's being used

odd osprey
pure temple
#

not too useful though :P

untold briar
#

yeah unless you edit the code to get just some badges and not all of them

amber mantle
#

yeah you literally just remove strings from that array no?

#

otherwise idc enough

dull magnet
dull magnet
#

User agent

#

yes im pretty sure

crude iron
#

It sends data in api requests & initial websocket start

fallow urchin
#

What's the best way to test themes?

#

Like, creating a new theme (not sure if that was obvious)

cedar olive
#

well

#

you can modify the quick css file

#

or you can make a new plugin and import a css file on it, then modify that file for testing

cedar olive
fallow urchin
#

So there's no way to just import a local CSS file?

cedar olive
#

not yet

#

theres a pr to add that

#

but it hasn't been merged

fallow urchin
#

pain

cedar olive
#

honestly

fallow urchin
#

Does importing it through a plugin make it hot reload?

cedar olive
#

go to your vencord settings

#

click to open settings directory

#

then open the quick css file with your code editor

#

and make your theme

#

it will hot reload on every save

fallow urchin
#

Alrighty, I'll just do that then

#

Thanks

cedar olive
#

no prob

fallow urchin
#

Then how would I publish the theme? I noticed that unpublished plugins just get put in #1032200195582197831

#

Is there a repo that I just PR into?

cedar olive
#

we actually have no channel for themes lmao

#

the closest thing is css snippets

fallow urchin
#

Oh wait

#

I'm dumb asf

#

I forgot that themes don't have a "browser" like plugins do

cedar olive
#

ye

fallow urchin
#

Welp

#

Time to open Figma and get to work lol

cedar olive
#

themes arent built into vencord

cedar olive
pure temple
#

it's client sided and if it wasn't 👮!

fallow urchin
#

I'm trying to shift the typing indicator above the text area after making it docked to the bottom of the screen

#

Anyone know how to do this? I've already tried using flex row-reverse and that didn't really do anything

#

this is what I have thus far

.form-3gdLxP {
    padding: 0;
    margin: 0;
}

[class*="channelTextArea-"],
[class*="channelTextArea-"] > * {
    margin: 0;
    border-radius: 0;
    position: relative;
}

[class*="channelAttachmentArea-"] {
    margin: 0;
    padding: 0;
}

[class*="channelAttachmentArea-"] > * {
    border-radius: 0;
}

[class*="typing-"] {
    /* TODO */
}```
#

i should probably be working on the user info redesign I wanted to do first

dull magnet
dull magnet
#

open your theme folder and run npx serve

#

then you can use the url it gives you as base url and just append the filename to it

fallow urchin
dull magnet
#

that works

wild jewel
#

gonna figure out how to make this fit nicer lol

crisp jungle
#

Does anyone know how discord decides if an emoji should be big or not?

#

Like it's also sized different depending on the amount of emojis

#

Afaik

#

Has anyone seen it in the source code perhaps?

dull magnet
#

if you want to find the logic, search for jumboable in the code

#

or nookies might be able to tell you more

chrome folio
waxen siren
#

If I think that I can add a certain feature to a plugin

#

can I just make a PR to it

#

or do I have to ask

dull magnet
#

but asking first is probably better

waxen siren
#

Who do I ask

dull magnet
#

you can just bring it up here

waxen siren
#

o

#

well

#

I saw this plugin, but I could not find something that lets me like view friends/blocked/pending in a specific guild

#

and thought it would be a nice addon

#

cause I wanted it

dull magnet
waxen siren
#

Yea

#

Thought so

#

I also think it might be a bit rude to just open a PR to someone's work

waxen siren
#

yh pretty much

dull magnet
#

that's very out of scope of that plugin but a really nice plugin idea!

waxen siren
#

Just a way to view like who you have blocked, friended, and or pending in that discord server

#

oh

dull magnet
#

So you could still make it, just as separate plugin!

waxen siren
#

oh

#

Okay

dull magnet
#

that plugin is only meant to notify you when someone removes you

dull magnet
#

I honestly don't know

waxen siren
#

RelationshipViewer

waxen siren
#

yeah that's also what I was doing

#

Sadly not the best at browsing PRs though

#

I do not think I see anyone doing it

#

well I'll get started and if someone beats me to it so be it lmao

#

It would be a fun experience anyways with TS

dull magnet
#

Once you made initial progress, you could open a draft pr so others are aware you're working on it

waxen siren
#

I'll do that once I know how to

#

😆

dull magnet
#

haha

dire fern
#

is this the place where i can ask about css things?

viral roost
#

ye sure

dire fern
#

a workaround would be to hide only your own messages for a little bit and then play the animation but
a) i have no clue how to select only your own messages
b) im absolutely unskilled in css

pure temple
#

i guess your own messages would be the only messages which are transparent for a bit

viral roost
#
[data-list-item-id*="chat-messages_"]:not(:has(> [class*="contents"] > [class*="isSending"])) {
  animation: slide-up 0.6s;
}
``` i guess?
#

dont think theres a good way (if it all) to see if youre the author

dire fern
#

.message-2CShn3 {
opacity: 0;
animation: slide-up 0.5s;
animation-delay: 0.2s;
animation-fill-mode: forwards;
}
@keyframes slide-up {
0% {
opacity: 0;
transform: translateX(100px);
}
100% {
opacity: 1;
transform: translateX(0px);
}
}

#

i did it like this it works

#

somehow

#

ah what

#

ugh sometimes it doesnt

dull magnet
#

the reason this is happening is because discord actually dispatches two events for your own messages

#

the first time for when it's sending (grey text), the second time for when it actually sent

dull magnet
pure temple
#

still would delay the animation though I'm pretty sure

dull magnet
#

then you could just invert that

#

only show it on the initial isSending

dire fern
#

im happy with my solution and im not in the mood to continue trying haha

dull magnet
#

oh nice

dire fern
#

can i just post it in #🎨-css-snippets and credit the original version with the issue and sun for helping me?

dull magnet
#

I didn't realise u got it to work

dire fern
#

omg how do i make it the official css snippet, stupid bot blocked me :(

viral roost
#

send as codeblock

dire fern
#

i have literally never sent code in a codeblock

dull magnet
#

```css
code here
```

dire fern
#

i did triple backticks

dull magnet
#

did you forget the css

dire fern
#

i typed CSS i think that was the issue

#

worked now

hollow flame
#

all lowercase

#

as you would type file extensions

dull magnet
#
"v"
#
"v"
#

yeah it matters

#

the former is js the latter is JS

#

only the former has highlighting

hollow flame
#

horror

dire fern
#

ah yes, sensible approach to codeblocks

#

everyone would be sooo incredible confused if someone read "CSS" and it was highlighted like "css", irresponsible

dull magnet
#

hey man cut them some slack, as a small indie company they don't have the budget to implement such complex features

waxen siren
#

guild-context does not work?

#

and it doesn't console log or create the menu items

#

Yeah

#

even the viewIcons plugin does not work anymore

#

oh the misery

dull magnet
#

it does

#

enable context menu api

waxen siren
#

oh

#

is that in settings

dull magnet
#

it's a plugin

waxen siren
#

oh

#

frick

dull magnet
#

I forgot to add it as dependency for view Icons

waxen siren
#

OMG

#

I am sobbing rn

dull magnet
#

vencord has a bunch of api plugins that let u do common stuff like context menus

waxen siren
#

I spent 2 hours

dull magnet
#

you need to add it as dependency to use itn

#

I forgot that in view icons

waxen siren
#

okay

#

I'll do that in mine

dull magnet
#

(because I already have it on as dependency of a different plugin so I didn't notice)

waxen siren
#

IT WORKS NOW

#

OMG

dull magnet
#

ye

waxen siren
#

I spent so much time

shrewd yacht
waxen siren
#

Making it right now

#

well working on it

#

idk how far i'll get

shrewd yacht
#

and what is it?

waxen siren
#

lets you view your relations with people in that guild

shrewd yacht
#

oh that’s cool

waxen siren
#

so like ur friends blocked and pending requests ig

#

yh

civic stone
wide parrot
#

todayyyyy

civic stone
#

var myBooleanWithTrueOrFalseValueThatWillBeDeterminedByThisCode

return myBooleanWithTrueOrFalseValueThatWillBeDeterminedByThisCode

oblique lark
#

single domain

civic stone
crisp jungle
#

Now I also wonder how messages are separated...

#

Like how does it decide to show avatar to a message?

dull magnet
#

idk

#

code

waxen siren
#

code.

waxen siren
#

so uh @dull magnet

#

I am not the best at css/html/js

#

but uh

#

wait actually lemme uh

#

Is there a way to force open a profile modal?

cinder wigeon
#

why

#

I mean you can simulate a click on an element or yoink the react component and manually render it but what do you want to do

waxen siren
#

so I want when I click on a friend or a blocked user username

#

it'll open the modal

#

idk though

cinder wigeon
#

Oh

#

You want to make a list and have it open a profile card when clicked on

waxen siren
#

yeah

#

I already have the list and everything

cinder wigeon
#

Yeah wait for ven I'm not knowledgeable enough at react for that lol

waxen siren
#

I was snooping around

#

but I think they just create it or some crap

#

sobbing

#

just c ouldn't actually find a way to simulate that

dull magnet
#

use react devtools to inspect any button that opens the profile

#

you will find this

#

thats the function that you need

waxen siren
#

🙏 Thanks

dull magnet
#

figure the rest out yourself

waxen siren
#

yh

amber mantle
#

i hate react the most random onclicks are triggered for everything

#

mousinv over whole message causes the anchor/link onclick to fire husk

#

(messing with random stuff again)

waxen siren
#

w

amber mantle
#

so bad

silk sorrel
#

how do I fix this

#

the link doesn't even go anywhere

viral roost
#

close and reopen devtools

#

if it starts shitting itself after that (multiple "failed to remove node" errors) close devtools and reload discord

silk sorrel
#

it's still stuck

cedar olive
#

close devtools completely

#

reload your discord

#

wait for it to load completely

#

then go to react devtools

silk sorrel
#

I've done that multiple times

waxen siren
#

turn it off and on

silk sorrel
#

as in disabling it from the Vencord settings, fully quitting discord, then enabling the option again and fully restarting again?

#

didn't work fr

#

I assume ccgcfpnondhhgjaaejikcfpkldpffhfn is the chrome extension id of react devtools?

#

nvm solved it by removing the AppData\Roaming\Vencord folder, rebuilding, reinjecting and re-enabling the react devtools

waxen siren
#

F

amber condor
#

lmao what

#

im suddenly getting this: 'pnpm' is not recognized as an internal or external command, operable program or batch file.

hasty stag
#

ive had an issue with cargo where i had to restart vscode for it to recognise the command

amber condor
#

just my regular command prompt

hasty stag
#

maybe just do npm i -g pnpm

amber condor
#

output:

changed 1 package in 2s

1 package is looking for funding
  run `npm fund` for details
hasty stag
#

bit weird maybe the environment variables got changed

amber condor
#

how tho

#

i took a look at PATH

#

but all the old variables are still there

#

anyone know where the pnpm binary is when its installed globally?

green vessel
#

.local/bin iirc

hasty stag
#

oh no thats a linux command lol

#

you can do npm root -g to see the path

green vessel
#

oh lmao I assumed linux

#

batch files in linux (real)

waxen siren
#

ugh

lapis fable
#

feedback?

hasty stag
#

if you want the floating style why not have the background of them transparent

lapis fable
#

because

#

i want this theme to be simple

#

and also 100% transparent backgrounds look kinda bad ngl

green vessel
#

make the titlebar black mayb, it looks kinda off as it's own foreground thing

lapis fable
#

if i do that it wont be 100% clear at what part you can drag the window

green vessel
#

the entire top part trolley

lapis fable
#

you can only drag the purple area

green vessel
#

can't you remove the padding for the title bar?

#

maybe with negative margins lmao

lapis fable
#

this is ugly

green vessel
#

yes make it black

lapis fable
#

i changed the color

amber condor
lapis fable
amber condor
lapis fable
amber condor
#

😭

lapis fable
#

anyone know what this little box is for??

novel gale
lapis fable
#

🫤

cedar marsh
#

Discord loves having random useless gradients

cedar marsh
#

ven merge my pr so I can go back to having auto updates please

#

not really auto, but like, one click, instead of merging with upstream, closing discord, reinjecting with pnpm inject

amber mantle
#

why do u re inject

#

you just need to rebuild no?

opal fern
#

Yeah

#

Idk why you keep injecting

#

Best of all, you don't even need to close and open discord

#

Just ctrl r

hasty stag
opal fern
#

Not talking about development

hasty stag
#

oh ok but in general just reload

fallow urchin
#

is there a good way to test typing indicators? I'm trying to theme them but I either need to make a bot which sends typing status for a very long time or force someone to continuously type lol

dull magnet
#

you can dispatch fake events

fallow urchin
#

How?

dull magnet
#
Vencord.Webpack.Common.FluxDispatcher.dispatch({
    type: "TYPING_START",
    channelId: "1032770730703716362",
    userId: "982012892285128845"
})
fallow urchin
#

Thanks Prayge

#

God the styling for my custom text input is so fucked up

hasty stag
#

wow that would have helped me earlier

dull magnet
#

also

#

you can use the debugger to freeze the app

#

to make the timestamp shwo permamently

hasty stag
#

i ended up just making a duplicate of the typing indicator in the elements lol

fallow urchin
#

I need to find a way to inverse the positions of the chat input and the typing indicator

fallow urchin
#

I hate CSS

hasty stag
#

ill send a snippet if you want

fallow urchin
#

Please do

hasty stag
#

[class^=chatContent-] > [class^=form-] {
  display: flex;
  flex-direction: column-reverse;
}

fallow urchin
#

I'm trying to make the chat input dock to the bottom of the content area

hasty stag
#

i wanted to put the typing indicator above earlier so i did that

#

itll make the typing indicator show above messages with no background so i did this

[class^=chatContent-] > [class^=form-] > [class^=typing-] {
  position: unset;
  padding-top: 10px;
}
fallow urchin
#

Hmm

#

Oh that worked

hasty stag
#

i think its the position unset you needed

fallow urchin
#

No I need to find a way to extend the background and make the emoji picker etc show up correctly

hasty stag
#

padding top extends it

fallow urchin
fallow urchin
hasty stag
#

make it more

#

and it only extends it when people are typing

fallow urchin
#

doesn't extend at all

#

🤔

hasty stag
#

oh weird works for me

fallow urchin
#

god the emoji picker is so fucked up

hasty stag
#

maybe its with my theme

#

just noticed i have a scrollbar in my message box lol

fallow urchin
dull magnet
#
(() => {
    const { GuildMemberStore, FluxDispatcher, SelectedChannelStore } = Vencord.Webpack.Common;
    
    const i = setInterval(() => FluxDispatcher.dispatch({
        type: "TYPING_START",
        channelId: SelectedChannelStore.getChannelId(),
        userId: GuildMemberStore.getMemberIds(Vencord.Util.Discord.getCurrentGuild().id).sort(() => Math.random() - 0.5)[0]
    }), 5000)
    return window.stop = () => clearInterval(i)
})()
fallow urchin
#

i am very good at messing up css hehe

dull magnet
#

this is great

fallow urchin
#

there should probably be a theme debug plugin with this in it

hasty stag
#

why does inspect element crash discord sometimes

dull magnet
fallow urchin
#

never crashed for me

hasty stag
#

oh ok

#

thats a bit annoying

fallow urchin
#

fixed the emoji picker

ionic breach
#

okay say im tracing a function in js in discord, and i see that it takes in the argument "ce", but there are like 7 different functions named "ce". how do i figure out which one is the one it's passing in?

green vessel
#

wait ven since the dev branch is real should prs base off that instead of main

#

um

#

@dull magnet u

green vessel
#

true

#

ln -s /dev/null .git/refs/heads/dev-null

#

use

waxen siren
#

Does anyone know why this randomly happens

#

it was working fine like 3 secs ago

#

oh

#

wtf

#

HOW

#

WHERE DID MY NODE MODULES GO TO

#

💀

#

@clever mulch thnx

clever mulchBOT
#

:x: Command "thnx" is not found

waxen siren
#

WHY

cedar olive
waxen siren
#

its forcing it into a pull request

#

I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB I HATE GITHUB

ionic breach
waxen siren
ionic breach
#

this is my first time using js debugger and some google searches said to reload

ionic breach
#

when i put above it feels like it never gets to the point i want

#

i clicked probably 100x

#

hm

cedar olive
#

make sure you put in the patched module

#

(in case it is)

ionic breach
#

yeah i did make that mistake at first but i got it right now

#

and im clicking the arrow that goes over the dot

#

wait i can send a screenshot

#

i just spam this

#

i think im breakpointing wrong

ionic breach
cedar olive
#

search up what those buttons do

#

you need to know

ionic breach
#

okok one is to step over the function calls
one steps in to the call
one steps out of the current one
and the last one just does incremental steps

ive used the python debugger so i thought it'd be close enough to this i wouldn't be too too confused

#

but when i start going in between modules i feel like im doing something wrong

cedar olive
#

you just to just step

#

in some cases

ionic breach
#

i did not see the last arrow for single stepping yeah

#

lemme try

cedar olive
#

or use vs code find declaration

ionic breach
#

mainly this doesn't really help 😔

#

(that everything isn't human readable)

cedar olive
#

tell me what you need

#

I can help you

ionic breach
#

i want to make betterfolders work so that when you click on a folder (even if it's in a folder) close all folders

cedar olive
#

nono I mean

ionic breach
#

yeah

cedar olive
#

what code you want to find what

ionic breach
#

i mean that's my end goal

crude iron
cedar olive
#

like exact module

#

and where

crude iron
cedar olive
crude iron
ionic breach
# cedar olive like exact module

im here rn

find: '("guildsnav")',
predicate: () => settings.store.alwaysClose,
replacement: {
    match: /GUILD_TOOLTIP_A11Y_LABEL(?!(.{5,50})FAVORITES)(.{100,130}),onMouseLeave:function\(\){/,
    replace: "$&$self.closeFolders();"
}
#

so i have it so that on mouse leave it closes

#

but that's really wonk

#

so i wanted to just change it so that onClick it would close folders

#

but the only onClick

#

isn't defined here, it's defined elsewhere

#

so i was trying to track down where it was defined

#

at first i found a ton but then ofc this one doesn't take any args so it narrowed it down to 2

cedar olive
#

lol it's probably just a bit up

ionic breach
#

this one looks promising

#

as i don't really understand this one at all

cedar olive
#

it's lazy loaded

cedar olive
ionic breach
#

ty for sanity checking me

cedar olive
#

I will help you in a bit

ionic breach
#

all g

ionic breach
cedar olive
#

it can still be both actually lol

#

maybe the second

ionic breach
#

oh nooo

waxen siren
#

I do not get it

#

Why does this keep happening

ionic breach
#

heckin

waxen siren
#

This does not make sense

ionic breach
#

but ty for offering the help tho :>

#

this was me just futzing about for a little bit

cedar olive
#

okay let me see

ionic breach
#

oops

#

meant server

cedar olive
#

it's this

#

only some lines above

ionic breach
#

when you click on a server (even if it's in a folder) it closes all folders. (that makes a lot more sense)

#

oh ty!

#

i was looking for the wrong thing

cedar olive
#

right there lol

ionic breach
#

i was just using ctrl+f not scanning through it :*-)

cedar olive
#

ye

#

you didnt find cuz it was a var declaration

#

not a function

ionic breach
#

yeeeee

#

but now i know!

cedar olive
#

well

#

you could do this too

ionic breach
#

i know slightly more

cedar olive
#

onClick: () => $self.closeFolders() && ce()

ionic breach
#

ooooooo

#

that's beautiful

cedar olive
#

just make sure closeFolders return something truthy

ionic breach
#

uhm

#

it's a for loop

cedar olive
#

return true at the end

ionic breach
#

k

cedar olive
#

tbh

#

do this

#

hold on

ionic breach
#

holding ✨

cedar olive
#
replacement: {
    match: /(GUILD_TOOLTIP_A11Y_LABEL(?!.{5,50}FAVORITES).{0,130},onClick:)(\i)/,
    replace: "$1function(){$self.closeFolders();$2(...arguments)}"
}
#

wait

#

me dumb

#

there

waxen siren
#

HOW

cedar olive
#

less likely to break discord

waxen siren
cedar olive
#

skill

#

missing

hasty stag
#

my inspect element doesnt have the react components tab

waxen siren
ionic breach
waxen siren
#

its HERE

cedar olive
#

$1 is this part

#

$2 is this

#

it's the function name

#

I changed the arrow function to an actual function so you can use ...arguments

#

and pass the arguments to discord native function

#

in case it maybe uses it in the future

#

also no need to return true on closeFolders anymore

ionic breach
#

okie, this is my most dumbest question yet. are "...arguments" a thing because i saw somewhere else but when i google it i don't get anything

#

or are you just saying ... like normal ellipses

hasty stag
cedar olive
#

arguments is a native javascript variable inside functions which lets you access any arguments passed into it, even if not declared in the function definition

#

it's an array like object

#

so you can spread it just like any array

cedar olive
#

it doesnt exist on arrow functions

ionic breach
#

ah! the spread !

#

never seen it named before

cedar olive
#

yeah

#

... is called spread

ionic breach
#

(who hasn't)

#

but yea that's cool

cedar olive
ionic breach
#

no wonder i couldn't get it through googling i wouldn't have thought of the name ever

cedar olive
#

... and arguments are two different things lol

ionic breach
#

yea

cedar olive
#

did the patch work?

ionic breach
#

got distracted reading the docs

#

lemme try

cedar olive
#

and the react dev tools option enabled

ionic breach
#

the test patch says "had no effect"

hasty stag
hasty stag
cedar olive
#

hold on let me test it on regex101

ionic breach
#

i think onclick is closer

#

yeah

#

idk if you want this but:

function(){!ae&&oe(!1)}}):(0,r.jsx)(Ze,oo(ro({ariaLabel:$.Z.Messages.GUILD_TOOLTIP_A11Y_LABEL.format({guildName:p.toString(),mentions:w}),name:p.toString(),onClick:ce,onMouseEnter:function(){!L&&ee(!0)},onMouseLeave:function(){!L&&ee(!1)},onMouseDown:se,onContextMenu:fe,onKeyDown:de,icon:p.getIconURL(96,te&&h),selected:v||te},Q),{role:"treeitem"})),
cedar olive
#

oh

cedar olive
hasty stag
#

where is it

cedar olive
#

Settings -> Vencord

ionic breach
#

oh it's not matching cuz onclick doesn't have ()

cedar olive
#

I removed it

#

that's a capturing group

hasty stag
#

oh lol they did disable

#

not sure why

cedar olive
#

ugh wait a min

ionic breach
#

i knew that

cedar olive
#

it is matching

#

wait what

#

3 groups?

ionic breach
#

cuz of my lookahead

#

that's prob why

#

?

#

i used a lookahead cuz there are two GUILDTOOLTIPS

#

(For me cuz i have the favorite server experiment turned on)

cedar olive
#

yeah but you added capturing groups

ionic breach
#

oop

#

yeah

cedar olive
#

let me fix it for you

ionic breach
#

i thought that's necessary for a lookahead

#

to use ()

cedar olive
#

and if you really want to use a non capturing group

#

(?:)

ionic breach
#

but wait i need the ! to make it not match

#

(?!:)

#

?

cedar olive
#

it works like this

#

no need for ()

ionic breach
#

hm im still getting the had no effect thing

#

idk what's different

#

are our flags set different

#

im using js regex?

#

pcre def didn't seem right

cedar olive
#

\i is a vencord thing

#

try it on discord

ionic breach
#

oh right right right

cedar olive
#

it will work

ionic breach
cedar olive
#

but

ionic breach
#

even if the ven companion tho

cedar olive
#

you can also do this

#

with console shortcuts enabled

waxen siren
cedar olive
#

this is the regex that will work on that app

ionic breach
#

oh i can also probably just run the patch helper

#

what's throwing me is the ven companion saying no effect

cedar olive
ionic breach
#

i thought they were basically equivalent

waxen siren
#

the pnpm

#

won't detect node_modules

cedar olive
#

🤨

waxen siren
#

it wont build nor watch

cedar olive
#

delete node_modules

#

and run pnpm i again

waxen siren
#

sobbing

#

okay

#

it just wont detect discord specifically

#

didn't work

#

but it is here

cedar olive
#

maybe try moving your plugin to /plugins

ionic breach
#

it lives here

#

but when i click on a server the folder stays open

#

i enabled this setting too

cedar olive
#

put a break point there

#

see if it's getting called

waxen siren
#

I just took some stress out

#

god

#

rsps really is stress help

ionic breach
waxen siren
#

NO

#

IT DOES NOT WANT TO WORK

#

WTF

cedar olive
#

HOW DID YOU BREAK IT

ionic breach
waxen siren
#

I DIDN';T

cedar olive
#

MAGIK WHAT DID YOU DO

waxen siren
#

I JUST INSTALLED IT

#

AAAAAAAAAAA

#

WAHH

#

WAHH

#

wtf

#

im just gonna

#

delete the entire branch

#

and create a new one

cedar olive
#

yes

waxen siren
#

omfg

cedar olive
#

fresh install

cedar olive
ionic breach
#

Dunno

#

It may be a problem for another night

#

Prob not till another weekend unfortunately

waxen siren
ionic breach
#

i figure it out

#

using the wrong function mayb

#

hm

waxen siren
cedar olive
#

lmao

ionic breach
cedar olive
#

how the heck

waxen siren
#

ITS JUST FROM MY FILE

ionic breach
#

for all folders that are expanded close them

waxen siren
#

TOO

#

ALL PLUGINS USE THIS

#

SO WHY ONLY MY FILE?

#

im so confused

cedar olive
#

same

#

push your branch

#

let me test on my machine

waxen siren
#

deleted it

#

ok wait

#

do I move

#

yes i move

#

ok

cedar olive
#

grr

#

your repo is private

waxen siren
#

no

#

i deleted it

#

i made a new one

#

fresh start.

cedar olive
#

WTF

ionic breach
#

and the plugin is updating right

waxen siren
#

LOL

#

@cedar olive

ionic breach
#

cuz just edited something else and it's fine

waxen siren
#

MAKE A NEW FILE

ionic breach
#

'dunno

waxen siren
#

WHAT IF THE FILE IS CURSED

ionic breach
#

givin up

#

gnightttt

waxen siren
#

dude this is legendary

ionic breach
#

ty for all your help tho

#

:3

waxen siren
#

IT DIDN'T FIX IT

#

what is this

cedar olive
#

YOU ARE USING A TYPE AS A VALUE

waxen siren
#

the what

cedar olive
#

User is just a type

#

you cant use it as a value

waxen siren
#

OMG

#

IT WAS COPILOT

#

I KNOW I CANT TYPECHECK

#

ITS SUPPOSED TO BE OBJECT

#

WTF

#

but still

#

HOW IS THAT CAUSING DISCORD NOT TO BE LOADED

cedar olive
#

lol

#

where is the plugin export

waxen siren
#

oh

#

OH GOD

#

NOOOOOOOOOOO

#

OH NOOOOOOOOO

cedar olive
#

oh no

#

dont tell me

waxen siren
#

HOW DO I

cedar olive
#

you lost it

waxen siren
#

PULL REQUEST

#

RIGHT

#

it should save

#

ok it did

cedar olive
waxen siren
#

omg

cedar olive
#

change it to this

waxen siren
waxen siren
#

i appreciate it

cedar olive
#

license plugin going insane

waxen siren
#

how

#

ok everything is working

#

i think

cedar olive
#

happens sometimes

waxen siren
#

IT IS WORKING

#

YESSSSSSSSSSSSSSSSSSS

#

ok now to write the member loading code again

#

Apparently the discord guild owner is never force loaded for the user

#

kinda weird

#

but yeah

cedar olive
#

ye it's not cached by default

waxen siren
#

if I use the flux dispatcher

#

is it going to get it 100% of the time

#

or do I have to check for that too

#

because it crashes the plugin when I use the UserSummaryItem and the member doesn't actually exist

cedar olive
#

you can use state from store

waxen siren
#

what I wrote before I broke everything was uh

#

FluxDispatcher. get the member

#

then I would listen for the member loading thing

cedar olive
#

so your code updates every time GuildMemberStore is updated

waxen siren
#

and i would then unsubscribe

#

yeah but I would want to

#

always

#

force load the owner

#

regardless

cedar olive
#

well

#

use the flux dispatcher

waxen siren
#

is it ugly/code smell

#

if I subscribe then immediately unsubscribe