#š¾-core-development
1 messages Ā· Page 131 of 1
javascript dev aaaaaaaaaaaaaaaaaaaaaaaaaaaaa javascript dev
@austere talon idk if you know but theres no reset vesktop button on macos 
"i personally don't care about 100MB ram usage"
wheres settings file
menu bar bestie
BEN
like whaaaaaaaaaaaaaaaa
wdym?
thats how discord ended up
guys people have enough ram its okay for app to use 2gbs of memory
stop whining who gives a shit
I personally think if you can block it easier like its in pr
if a native plugin breaks it just bricks vencord
adding something like adguard would be just unneccesary
cool
wdym breaks
wont load at all
eh idc about other stuff as long as it does its job
WHY IS THERE DEFAULT
IDK
wtf are u doing
you tell me
whar
i took that from spotify thingy
is there any usecase to get anything other than a function from a native file
bc i can just add a check if its a function
ben
i wouldn't
because it shouldn't have any exports
send the entire file contents
put it on https://hb.vendicated.dev or github gist or smth
also for some reason my userplugin isnt registering any native things
wait no it only does if i export something
both of them follow the same format
whar?
its the same format as the adblock one
but it doesnt export anything
looking at the built, this is different
idk if thatd do anything
oki
i mean bandage fix is if (typeof method !== "function") continue; but itd be better to find why its doing that
btw this update could also enable invidious plugin to work
what was wrong with it?
the internet problem with it is csp
ohh
previously we would have needed to allow any frame source for it to work
ill make an easy way to allow native plugins to do csp then :3 im lazy
now we could have some native api like
addCspRule("MyPlugin", "frame-src", () => getSettings().invidiousHost)
yeah thats what i was thinking
what is happening
same for frame patching
its really shitty but we could steal code from my ipcPlugins pr for frame patching
drop putt party mod src later insallah
the codes so bad im not gonna release it
it has a clone of vencord's patcher modified for systemjs 
dw spoko can cope to insane levels for the sake of datamining
hacky fix for a reason i dont remember
i just need to know how to make the debug menu appear
im trying rn
but failing
i know there was check to prevent opening it on prod if it was in an iframe
what now
it was checking if its in iframe before
thats insane
making it easier
ikr
is there a flux event dispatched or something of the sort when messages are loaded from the messagestore?
LOAD_MESSAGES_SUCCESS is when received from /messages endpoint
also, after modifying message.content from something in message store, dispatching the message_update doesn't refresh them on the UI. Any way to achieve this?
I ideally don't want to be running a navigationrouter.transition to every time I update a message
WHAT
WHY THE WHILE () PROMISE.RESOLVE()
tfw it still doesnt work
use a setter to do it without polling

vencord even has a util for this
onceDefined()
you're committing crimes against humanity
yep
oh?
Is there a way to implement custom hooks?
my bad, something like presendlistener but for other events
not ur bad iām just dumb and not well versed in all this
it's my first time dabbling with plugins too
When starting vencord-desktop using flags --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-blink-features=MiddleClickAutoscroll to enable native Wayland support, autoscroll and to disable middle-click pasting, the client no longer has the usual VC icon in the taskbar, instead it is replaced with a generic white W in a yellow circle icon.
I'm running Vencord using the vencord-desktop-git AUR package on Arch in KDE.
Admittedly I'm not 100% if this is ...
Maybe an alternative could be how Visual Studio Code reads flags from .config/code-flags.conf but instead make it into something like vencord-flags.conf?
instead of launching it from terminal, add these flags to the .desktop file or create a simple shell script at /usr/local/bin/vencord-desktop that calls the normal bin with your flags
both of those should work correctly, if not it's an issue with your DE/WM. it works fine for me on gnome
Turns out Plasma requires applications to have a specific property set. Found a solution here, specifically this video explains how to manually fix the icon to display properly.
what if vencord had a modular plugin system wouldnt that be cool
??
like
instead of needing to install a whole other verison of vencord
and then manually add plugins to a plugin folder and then rebuild the whole tjing
what if u could just add plugin from the ui
even better
plugin index
within vencord ui itself
still rules on getting on the index but its more laxed since its not official vencord
easier said than done
whatās the big issue stopping such
well
many
first, vencord's plugin architecture is not designed to do dynamic loading
second, plugins are written in typescript
and we aren't going to add a typescript compiler to the mod just to support this because of the heavy amount of complexity, and compiling plugins to be independent of the mod is a bit... eh? it seems odd..
yes you could just write javascript, but also that's awful for typing
third, the security implications and general dev effort for very little gain is a bit pointless
have a plug-in file thatās an archive of the transpiled js files along with other necessary files like css
fourth, web versions can't support them! where are we going to store them? indexeddb is ideal but is async so we cant use it, and localstorage has a very small storage limit
true...
forgor about web version
how long on average does it take a plug-in to get accepted into the real deal
depends on complexity and whether or not we're busy
ven has other things besides vencord obviously and as the final reviewer for everything it can take time
i'm full time employed so i can take time to do reviews and there aren't many other reviewers
the community can review PRs to assist the effort but in the end ven has the final say on everything
i like the fact that i can sorta trust all the available plugins :D
is there like a consistent update cycle
like do yāall check all the prs every other week or smth
we make updates as necessary but we have no update cycle due to the aforementioned
if something breaks we go all hands on deck to fix stuff
true
"very little gain" debatable
ĀÆ_(ć)_/ĀÆ
Just did a distro update and the AppImage seemed to not like this at all. Piping output and errors to a log resulted in a 400,000 line log instantly. If the cursor was moved inside the Vencord window, errors would increase exponentially.
Rolling back my distribution and things are fine again, but I did just want to send a heads up.
Log:
[suse-appimage-vesktop-erro...
would be nice to be able to opt-in for newer plugins that maybe havenāt been fully quality-control checked but have also been confirmed not to be security risks
but if that would be difficult
the big gain of modular plugin loading would be to give users the option to easily try plugins before they're added to the mod itself (or maybe never added and only available as a third party plugin)
no faffing around with dev builds
the typescript compiler is a non issue... you just compile to JS before like every other mod
security is fair but other mods have figured that out, architecture sure
but it is not "very little gain"
will there be a feature that allows us to import plugins from github directly, through the client
Probably not
true
would be nice
why if most of the plugins that people want to use are integrated into the mod
most of the ones that aren't are niches or are ones we dont want to add due to conflicts with our own ideology (e.g. MLE)
copy from geode
and there would be no point to this
we have to review every PR anyway, and part of that is the quality control step
quality control consists of functionality and code quality
yeah but reviewing for āis there malwareā is significantly easier than āis this a premium high quality thingā
as someone who also reviews mods
for a different mod loader
reviewing for "is there malware" means we have to test it too to make sure it works fine
because why would we bother checking for a minimum feature set to make sure its not malicious
and then come back to it later
we might as well just do it then
and then you have to review every update
and then youre overall wasting more time than if you just reviewed it once
thatās what iām sayin
Vencord's plugin reviews undeniably take a while (at least right now) and I'm not saying this is anyone's fault but it's a undeniable fact, having modular plugin loading could allow users who want to try plugins waiting for review to be added to use them early
then PR it, i guess
none of us are interested in writing a modular plugin loader, and even then it might not get added to the mod
we experimented with it before
mhm
it didnt go very well
I'm not interested in writing it either but there is more than "very little" gain
even without a modular thingy thing
i checked the pull requests and there are some prs that have gone weeks with no response
maybe iām privileged to not have a 9-5 but i feel like thatās something that could be worked on
sigh
community can review PRs already
but we dont really want to have people we dont really trust on the review team
Afaict all plugins have to go through review by ven which seems like the real blocker (which is fine..? it is ven's mod after all)
i have no idea how the linux kernel review process works
I've gone through that shit before i hate it and it is not the same
linus reviews everything
i know how the geode review process works
we have like 5 lead people who can all accept mods
no..?
stuff gets reviewed by trusted subsystem maintainers
merged into their own branch
It's on github
itsn ot
so unless this changed this is how it last worked
You wait to be approved in pull requests
either way
I highly doubt he reviews all of it, it's already reviewed by trusted subsystem maintainers
this isnāt linux
no, but i'm saying our process is modelled similar to it
linux has 50 bajillion prs
ven reviews everything because it's their mod
imo its like really trivial to add custom plugins the way you already can
well that's what the linux foundation said 11 years ago
i surprisingly do not keep up with how their model works
i do not contribute to the kernel
but that is what i last heard the process being
https://www.schoenitzer.de/lks/lks_en.html
it would be impossible for him to review every commit in a reasonable time
Diagrams and facts about the Linux Kernels and it's development.
uh huh so i am telling ya
thereās too many commits
and the point is going over your heads so i will no longer engage in that specific part of the conversation
this + he would add his sign off to the commit and most don't have that 
itās not going over my head
nah it's not dw
you're nitpicking on it and not taking the point that i'm trying to make in that ven has ultimate authority and therefore everything goes through them
what I'm hearing is there needs to be a bigger plugin review team 
be more like linux, have trusted plugin subsystem maintainers that review them and ven merges

we already do in some cases
existing plugins require their maintainers to review them whenever a PR affects them most of the time
new plugins require ven's approval explicitly
community can file reviews freely and so can existing contributors and certain specific people who have collaborator rights on the repo
community reviews don't do shit towards getting stuff in-mod bc they aren't trusted
they provide basic quality control for people
yes
what if there was a vencord ācommunity editionā where trusted reviewers could merge into that branch
true
and then ven picks and chooses for their version of the real vencord
not many people would* use a branch that we dont make the main one
therefore there's no advantage to us
except now we have to maintain a separate version of the mod and provide support for it
would it really have to have separate maintenance if the only difference is more plugins
yes, because we have to provide support for plugins not in the main version of the mod
isnt it the plugin devās responsibility to provide support for their plugin
no
the plugin dev isn't always here
everyone can provide support for anything
that's part of the charm of our support system, a large group of the contributors here know what each and every plugin does
and even if some dont, they know a large majority
splitting the mod off into different version branches and dynamic plugin loading and whatnot will make us lose that
i already scrapped the dynamic idea
im using it as an example of why we dont want to do things the way you're suggesting
u could make it so in the beta edition, before plugins get merged to the main repo, itās the devās responsibility
So does ven have to review updates to existing plugins or just new plugins
okay
js like third party plugins
we already have that
that's my question
Why do you need to include encryption
updates
it's called the dev branch
you can git clone, build, and run the dev version yourself
can i merge my plugin into the dev branch
you can run it as a plugin yes
Why do you need to include encryption
What? what encryption?
src/userplugins or src/plugins/ if it's one you want to end up PRing
does it have to go through ven to get into the dev branch
yes
yes
so ven has to review new plugins and updates to existing plugins
you can always fork and merge in dev branch changes if you want in your own copy
was i dooming myself by making a pr on whatever main branch there was
should i switch to dev branch
just use dev branch in the future
Only reviewer left for decor
well yeah but does ven have to do a in depth review of plugin updates, i've seen nuckyz update plugins w/o ven review(?)
minor fixes and also ven granted permission here
mk
collaborators can make minor changes, we cant accept full plugins or features unless ven says so
.
...was there ecryption???
eh that's not true
as long as it abides with vencord's quality standard it can be accepted fine
it's just that it's mostly me doing review
nookies, lewi and megu are collaborators
they can technically merge anything
yeah that's the problem
that's a lot for one person
i tend to see you as the final say since it is your project so i dont want to just go and merge stuff out of the blue when you havent reviewed
im fairly certain everyone else sees it that way too
(otherwise usercss would've been in ages ago :^)
If more people were trusted with reviewing plugin code and functionality leaving Ven the final say of merging it as a idea/scope that could help no?
same
maybe so but we dont really trust a lot of people and a lot of the people we do trust have commitments
mhm
it's not even just trust
you can't just announce someone as reviewer that's not how it works
anyone can review other people's prs regardless of their involvement in the project
if someone were to do that regularly and leave good reviews they would be made a collaborator in no time
this is why i mentioned that the community can review PRs earlier

and in fact we should probably encourage that more
noone does that tho
only person ive seen do that is MrDiamond
that's literally what nookies did, he just kept making helpful contributions and such so eventually i made him mod / collaborator
yip
i think the only outside contributors who very actively contribute right now are ryan and autumn
maybe im missing someone, don't be mad if I forgot u š
Kasi reviewed decor but never submitted a actual review presumably because we thought it didn't matter
Very basic but necessary reviews, yes
And Iāve made three prs but they are getting buried lol
what prs did you make
that remembers me we have to see if we can bypass nitro requirement for clipping
doubt it but...
clipping is clientside no?
We bypassed the stream resolution thing I think clips would be similar
When I had nitro I could not figure out how clipping worked
I suppose they upload to some place
might be wrong tho
i could review more since i know what to watchout for but id probably miss a lot so i don't 
and im probably not the only one that thinks thst way lol
if you force enable the experiment yea it works
at least with basic
not sure about non-nitro
works perfectly
yeah there was some time where it was available for everyone and now its behind nitro for some reasno
This might be a fairly niche usecase, but would it be possible to have a way to select a real audio input for screensharing? My usecase for this is streaming from a game console where my capture solution only handles video, so I just connect the console's audio output to my motherboard's line in jack.
This might be a fairly niche usecase, but would it be possible to have a way to select a real audio input for screensharing? My usecase for this is streaming from a game console where my capture solution only handles video, so I just connect the console's audio output to my motherboard's line in jack.
Venmic allows this, it would have to be utilized by vencord but that should be fairly easy
its all local
also what nitro requirement
literally just an if statement
Are you sharing full-desktop audio or a specific application?
In case it is the former could you please try doing the latter?
Please also provide some logs
Is there a way to install Vencord on discord-ptb-portable?
https://github.com/portapps/discord-ptb-portable/releases
just manually enter the path to the folder containing discordptb.exe
thats curious
go wrapper surrounding discord that skips host updating and doesnt let it store registry keys
does not work
Invalid Location
The specified location is not a valid Discord install. Make sure you select the base folder.
@austere talon how can i find a entire webpack module as a string
is that allowed in a plugin

does not work
Invalid Location
The specified location is not a valid Discord install. Make sure you select the base folder.
try going back a few folders, to discord-ptb-portable-xxxxxx
wym
also id assume not allowed, if you need to extract something from it use a patch
whats the usecase
Decor loads 2 diff modal modules to use UI components from and discord broke the create sticker one
I need to extract the module id of said modal's module from somewhere else now
No like
they broke my find
they seemingly removed the code that would load the sticker module
(it's still loaded from other places, but the load i was finding is gone)
then either find it from somewhere else or
that's what i'm trying to do
use a patch to find the module and immediately after do $self.modalModule = exports
or whatever the webpack syntax for that is
Okay so
I need to get this stuff:
await n.el("54666").then(n.bind(n, "54666"))
it's only in 2 places in discord without opening any server settings etc

just
1s
It's in one React.useCallback in 889701 and I patched the assignment of it but it doesn't work bc the definition isn't called until you go to the sticker picker and click create sticker or some shit
you know i think i can just use the 2nd one
ima cry if i can
okay @nimble plaza i think i just need a custom find

the other module it's included in is 77162
a memoized component
can't findByCode or findByProps it
are you on canary (to know if the module id is the same for me)
Some backstory:
Wayland by design does not allow an app to listen to hotkeys when you're focused on a different window. So global hotkeys don't work unless configured in KDE (systemsettings kcm_keys).
The official Discord for Linux runs on XWayland, so Discord PTT works only when focused on Discord or any X window.
So this tool was created:
https://github.com/Rush/wayland-push-to-talk-fix/
It directly listens to the uinput device, and uses xdotool to forward any relevant keypresses to ...
{
find: ".default.Messages.STICKER_PICKER_CREATE_STICKER}",
replacement: {
match: /(openModalLazy.+?)(let{.+?)(\d+)/,
replace: "$1$self.modalModule = $3;$2$3"
}
}```
that wouldn't work anyways
wym
because it wouldn't get called until the user clicks whatever runs that async function
yes i did
ah ok
i did it w/ a find for a diff module
this was the issue with my original patch to do it
ah
the patch didn't really assign until called
const StickerPickerPreview = findLazy(m => {
const type = m.default?.type;
if (typeof type !== "function") return false;
const s = Function.prototype.toString.call(type);
return s.includes("isDisplayingIndividualStickers");
});
is this find ok
show
show what
that is the find
this
why Function.prototype.toString.call(type);
just doing what vencord's byCode does
.
i basically just needed byCode but on a memoized component
react.memo
I have tried both and neither pipe audio
Where would the logs be located?
because it makes the function a object
OH
the actual function is stored in .type on that object
ohhhh
yes but you shouldnt need it usually
yea i did smt else
toString() is not stable
vee is this ok
oh weird
const filter = filters.byCode("isDisplayingIndividualStickers");
findLazy(m => m.default?.type && filter(m.default.type));
sure
it shouldnt matter much but its generally better to not rely on prototypes in js world
LMAO
same reason you should use
Object.prototype.hasOwnProperty.call(someObj, "banana")
over someObj.hasOwnProperty("banana")
THIS FIND BREAKS COMPANION š„
yop
is this in progress? It doesn't seem to work with chat logger enhanced
or fakeprofilethemesandeffects
It works with fakeprofilethemesandeffects, I'm currently using both
Can't speak on vc logger though
This might be fairly niche, but would it be possible to have a way to select a real audio input for screensharing? My usecase for this is streaming from a game console where my capture solution only handles video, so I just connect the console's audio output to my motherboard's line in jack.
ā [ERROR] No matching export in "src/webpack/common/index.ts" for import "showToast"
src/userplugins/fakeProfileThemesAndEffects/index.tsx:12:40:
12 ā import { Button, FluxDispatcher, Forms, showToast, Switch, Text, Toasts, UserStore, useState } from "@web...
that's not decor's fault lol
what is it?
idk
It only showed up once I tried to use decor
did you add decor as a userplugin
no
weird
idk but it's not decor's fault
I just git cloned the repo that the pull request was submitted from
wait I know what it is
did u clone the right branch
yeah.. š
make sure you switch branch, install dependencies (decor has additional dependency)
you a real one
can things break if a plugin meant to be in src/plugins is put in src/userplugins?
kinda
usually not
only if they import other plugins
I fixed it
cuz here this guy has fakeProfileThemesAndEffects in src/userplugins
and its meant to be in src/plugins
2 things, one decor has zustand added as a dev dependency for types, two decor adds 2 icons to the common icons file
ran wrong command in git and accidentally and created new empty branch š¤¦āāļø
it's easier just to say "cant use as userplugin" than "you also need to add zustand@3.7.2 as a dev dependency and add these two icons to the common icons"
how do I use decor?
common icons?
enable it -> go to profiles in settings
i had to add myself to devs too
so wouldnt there be conflict with someone using both decor and fakeprofilethemesandeffects?
in their current state
eyyyy, it works
epic
vid of fakeprofilethemeandeffects and decor
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function
None
None
oops
ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/
ShowHiddenChannels (had no effect):
ID: 319839
Match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/
PinDMs (had no effect):
ID: 631316
Match: /===\i\.DMS&&0/
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function
None
None
if (playingCount <= settings.store.superReactionPlayingLimit) return true;
either this or just make it one single return statement with ||
This plugin needs a README.md file
this is terrible. use Discord's RestAPI module
thats literally so good idk what you mean ven ššš„°š„°š
this is a crazy amount of code for such a small feature. why is all of this needed? it seems very overengineered
I went with this for verbosity
so much code in one single file. it'd likely help readability and maintanibility to split it across multiple files
why in the world
wait
i didnt quite look at that review
closely
i did proper if statements for verbosity
why remove the else if tho
maybe could be wp commons candidate? i dont remember if its used in more places, but at the very least Vesktop uses it as well
Decor uses this as well along with a utility function to open invite modal
@austere talon you got an example u could show me?
@austere talon the themes tab also uses inviteactions
you don't actually seem to be using these props unless i'm missing something? so this probably does nothing
you should pass the disabled prop to <Link> (and maybe do this with css instead)
The themes page also uses it for invites (thanks fiery)
oh nah thats now changed to use the component
i think this key is more intuitive / self documenting
<ModalRoot transitionState={transitionState} size={plugin.settingsModalSize || ModalSize.MEDIUM} className="vc-text-selectable">
If the onClick was extracted out like the decor utility then we could
i'll look at the main textReplace code once it's split across files (or not) as suggested above
ya thats basically the same
vesktop also uses that
maybe extract that util to @utils/discord
cc @cunning canyon
also, just in case Discord ever changes this to a numerical enum, you don't want to override enum value 0
<ModalRoot transitionState={transitionState} size={plugin.modalSize ?? ModalSize.MEDIUM} className="vc-text-selectable">
btw u dont need to put ur images there, we have an image thread issue
but theyre fine there as well
I put them there bc i'm using that for decor assets
that's where guidelines are n shit
/(\i===\i\.Section\.PURCHASE\|\|\i===\i\.Section\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).{0,800}?)/
this lookbehind is for matching the varname, right?
just use .+? then
should i do that rn or do you want to review and i commit it
ill review
ok
youre gonna get a heart attack
match: /(\i===\i\.Section\.PURCHASE\|\|\i===\i\.Section\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/,
NoneIcon is a bit of a weird name. it would be helpful if you could add a jsdoc comment explaining a bit closer what it is or found a better name
nit: this variable is not needed, just inline the getChannelId() call
should this not also call .init() and .clear(), just like CONNECTION_OPEN?
this potentially (in most cases actually) will also be called at the same time as your CONNECTION_OPEN handler, so you might want to deduplicate those calls to avoid unnecessary requests to your api
} else if (!decoration && user.avatarDecoration?.skuId === SKU_ID) {
export const getUsersDecorations = async (ids?: string[]) => {
much similar to select, giving this property a more specific name makes the code easier to read (and avoids confusing it with the builtin fetch)
const { selectedDecoration, select: selectDecoration, fetch: fetchDecoration } = useCurrentUserDecorationsStore();
i'll look at the rest tmrw
this seems fine
oh no
19 -> 38 comments
fym not even close 
nah
the one below yes cause
if (ids?.length !== 0)
``` is wrong
but the one i commented on no
yes but the proposed code is equivalent :p
ya
ok this review isn't so bad
yeah like i said its just mostly minor things
you basically just have ui left now no?
probably idk
WHY DID GITHUB HIDE REVIEW COMMENTS
LOL
yeah ok that's ui prolly
src/plugins/Decor/lib/ui/modal/idek/thing/Blah.ts
(its fine i just find it funny)
also on a totally unrelated note, im surprised not more people change the license header to include their own name
hi
.init() no, the auth store handles initing after hydrating. it just needs to re-init when switching accounts
.clear() maybe.. typically it should get re-fetched before user sees existing data?
ig its not really documented anywhere so most people just dont know
wait did i do that??
š
basically, start() may be called without your CONNECTION_OPEN ever being called (if the user enables the plugin later)
actually on second thought, i think start might NOT be called if your plugin has patches?
dunno
i mightve idk
(it's completely redundant cause you already have copyright even if you're not explicitly mentioned. but it's still nice for attribution, so plugin devs are allowed to change the license owner line to anything they want ( i recommend just adding your name to the list ) )
btw u dont have to comment fine or ok or whatever, just do it and mark resolved

yop
I have zero clue I just saw it in the user class and played it safe and assign it
undefined === SKU_ID will always be false assuming SKU_ID isnt undefined itself
anwywayi sleep now
gn
actually gonna merge dev first
expect decors merged within the next few days assuming u address feedback (and future feedback) timely
sorry for the wait so far
no rush, i'll review the rest tmrw and test it properly then and there mightbe more UX feedback after testing and then once thats addressed it can be merged probably
its ok but i can't cancel the order of rats in your walls sorry
nonrefundable
yk
woooow 
š
fuck u then vee, i hope the rats make u crazy !!!!
i wish i could merge all 90 prs rn, i really do
its not that simple unfortunately š
once i hit merge the plugin is suddenly also my responsibility
i'm unsure ab repeatedly specifying Decor
god this reallyneeds fixing soon https://github.com/Vendicated/Vencord/issues/1935
Discord Account edm115 What happens when the bug or crash occurs? When you login from a new IP address, Discord sends you an email with a link (https://discord.com/authorize-ip#token=...) But the p...
breaking discord pages is unaccpetable
edm155
I think the verbosity is good
reviews arent binding, just my thoughts
if u disagree, its okay just say so
if u disagree and it starts with nit: then u can just ignore it
ok time to go through all of these and do them
need plugin ideas
š«
Actually
closing this issue to track it in one single issue (since these issues are related), #1935
huhhh
Vencord confusion speed run any%
high quality contributions are priceless
hm..
I need ideas for those š
honestly while verbose = horror, self documenting code is also nice
Actually
Is there any specific format for the readmes?
so i thin kthats fine fiery
ok
i noticed that the more experienced i got at coding, the longer my variable names got

i used to be a sucker for super short names but verbose names are pretty nice
obv dont take it too far but
const s = ... // young man, KILL YOURSELF!!!!
const size = ... // what size??
const modalSize = ... // what modal??
const pluginModalSize = ... // PERFECT
what if vencord used https://github.com/bytedeco/javacpp
soon
i think about var names in the sense of context
yeah sure, if this is specifically in like a function openPluginModal and it's relatively short then itsfine
like im not gonna call decorAvatarDecoration that inside a decor page it'd just be avatarDecoration (maybe)
but still helps imo, especially if the func is longer or just a block somewhere
it always depends on context
wait why the fuck did i do this patch like this
holup
ima read the code
hm
why did i do it like that
o
this was before i knew assignments returned and that was partially changed after i did know
@austere talon this is why
ok what if i just
the types u mean?
just extend the user type for now (though we really gotta update them soon)
yea
import { User as BananaUser } from "discord-types";
interface User extends BananaUser {
avatarDecoration: { ... }
}
interface AvatarDecoration {
asset: string;
skuId: string;
}
interface UserWithAvatarDecoration extends User {
avatarDecoration: AvatarDecoration;
avatarDecorationData: AvatarDecoration;
}
or that
anyway we should just make our own types package soon
discord-types sooo outdated 
i should probably type some of the other places avatar decoration is but EEEEEHHHHH
or i do that
btw @limber skiff https://github.com/Vendicated/Vencord/issues/1424
this is like some server subscription shit
idek how it works and dont know any servers where we could test it
ven are we retroactively adding readmes to the plugins that dont have them?
i can give a hand wth that tmrw if you'd like
headers should not skip levels
## Currently, the plugin allows for two tweaks:
TO REMOVE DECOR DECORATIONS FROM USERS WHO DIDN'T HAVE THEM ANYMORE
yes
planned
the plan is to make it a community project thing
but i havent gotten around to it yet
vee im not doing this
bc the store can have a null entry
which indicates that the user doesn't have a decor decoration and that the client should remove it if the user does have one
just looked at the user class btw
kk I'll look at it
i guess i need to set avatarDecorationData
wtf is parseavadecodata
s = e=>"object" == typeof e && null != e && "asset"in e && "string" == typeof e.asset ? "sku_id"in e && "string" == typeof e.sku_id ? {
asset: e.asset,
skuId: e.sku_id
} : "skuId"in e && "string" == typeof e.skuId ? {
asset: e.asset,
skuId: e.skuId
} : {
asset: e.asset
} : null
that is parse avatar decoration data
ok ill update this code
this doesn't seem quite right. shouldPlayBurstReaction expects a number, not a boolean
to be fair
I wrote that at like 5 am
what's the default limit on it?
yeah how the fuck did that break5
i got a load to play
fiery will patch find: "isAvatarDecorationAnimating:" instead of mangling UserStore and getAvatarDecorationURL
do not
no
i know
i swear i had that correct before
(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+
ya
that seems right
ima stick with my way
why
i mean the only place its not used is the account panel
idk if they use getaviurl in random places
and tbh im only using it because its a react hook and thus i can add panic support to it easier
patching this seems way way cleaner and will solve your memberlist issue too

whats the issue with the member list?
cause its a react hook so you can use an effect in there to fetch decors
cyn u really had to wait until the last minute to tell me 
the rats will be released
actually yeah using this will make your life sooo much easier, you can literally just use an effect in here that fetches the decor for the user passed
now u dont need all your subscriptions and multiple patches anymore
but yeah thats really a bit late š
i still think the zustand stuff is overengineered and confuses the fuck out of me
im genuinely going to explode
I LIKE ZUSTAND
š
ok what fucking server has that sob
BOOG FUCKING TOWN
i literally just have a Map with the users and refetch all users every 5 minutes
that's what decor used to do minus the refetch bit
const DecorCache = new Map<string, string>();
export function useDecors(user: User) {
const update = useForceUpdater();
useEffect(() => {
if (!DecorCache.has(user.id)) fetchDecor().then(d => {
DecorCache.set(user.id, d);
forceUpdate();
});
}, []);
return DecorCache.get(user.id);
}
could be this easy now probably
and call that hook from here and use the returned value to patch the decor src
and boom done basically
š
maybe use an interval like cyn to periodically refetch but imo that's kinda whatever, most people won't update their decor often
no
well
guhhhh
this is reengineering the core of the plugin at the very last minute
how so?
this is effectively redoing the actual bit that handles setting decor decors
which isn't a problem
but it is a lil inconvenient at the last minute
i feel bad now that i didnt bring this up earlier
don't u didn't know
I might do a combination solution
this new bit, but w/ flux subscription functionality retained
to a extent
make that handle updating ppls decors
you can also store a timestamp in the cache
then upon each request, if the timestamp is too old, trigger a refetch
fiery am i good to leave u to resolve reaction tweaks
yea ill deal with it later
kk
i think that'd be the cleanest
tests dont run otherwise
and don't uncheck "allow maintainers to edit pr"
hes using the main branch in his fork
actually u didnt
wel
nah
github gui let me do it
I want to have proper places trigger a refetch
like rn opening the profile will refetch
ideally the popout would too
i hadn't refined those
you could have a combination of both
cache age to refresh old decors in chat / member list
and manual refetch on profile open
maybee
probably fine
@mortal fractal could you share the hh patch for that thing idk how to do hook patches
just ensure everything you need to do is before the return and you wont break rule of hooks
well you just need to insert ur hook somewhere in their hook before any early returns
we basically said the same thing




