#๐Ÿ‘พ-core-development

1 messages ยท Page 109 of 1

torn knot
#

same thing

junior olive
#

I want the whole thing

#

the container around it

#

that's wat makes it fancy

torn knot
#

can you send me your plugin? (like a zip file or a repo)

junior olive
shy veldt
#

fancey

lime stone
#

I talked about this literally decades ago

#

why didn't they call it NoSaic ๐Ÿ˜ญ

torn knot
lime stone
#

but thank you โ™ฅ

#

@lofty helm your wait is over ig

junior olive
lofty helm
lime stone
#

it wasn't me

lofty helm
#

Is it in upstream

#

Or do.i have to custom build as usual

lime stone
#

it was done by AutumnVN and it's merged

junior olive
# junior olive the plugin adds those to said file lol

You're not gonna be able to take decor out and put it in your fork in it's current state. And the plugin is mostly useless right now because I haven't added the file input and finished the create decoration flow .-.

woeful sable
torn knot
#

the file doesn't exist

junior olive
torn knot
junior olive
#

look at the path.. it's not in my plugin

torn knot
#

it is????????

#

huh

junior olive
#

the two exports that are failing are from the webpack common components/icons

#

...

#

Not in my plugin

#

I added two icons to the common icons file and because you didnt copy that file to your branch too it fails to import them

frail tree
#

how?

torn knot
#

I got the selector

#

but you need to open something that loads its module first

#

or you can just make it from scratch

junior olive
torn knot
#

wait

#

there is code that forcefully loads modules?

junior olive
#

I've already had to do it once for a load of the decoration components, I can probably do it again

torn knot
#

cause I might need it

junior olive
#

Kind of.. you can find the bit that loads the chunks and modules and regex the various ids out and recreate it

torn knot
#

my workaround for this is having to open settings at least once to load the module if it's not loaded

junior olive
#

look at decor's requireDecorationModules util

#

Anyways, don't worry about doing it for the file input. I'll figure it out tomorrow when I'm up

torn knot
#

Ok so I found the direct module that opens the sticker creator

#

well, not exactly

torn knot
#

pretty convincing

#

from here it will return a file object, like the actual filepicker\

#

here is the plugin with the filepicker

#

it won't let me send the 2 files changed individually

#

the only files changed are style.css and the creator modal

charred monolithBOT
charred monolithBOT
charred monolithBOT
nimble plaza
#

moving pr to github for hacktoberfest :3

charred monolithBOT
nimble plaza
#

why does this have colorways commits uhh

cunning canyon
nimble plaza
#

oh whale

austere talon
#

i can just add it

austere talon
nimble plaza
#

fair

charred monolithBOT
austere talon
#

nooo that wasn't a "don't do hacktoberfest" ๐Ÿ˜ญ

#

i was just curious if you really cared

#

i can add the hacktobafest tag if you want :3

nimble plaza
#

i thought it was like a pin

#

i just reread

#

no point lmao

austere talon
#

no it's all digital ๐Ÿ˜ญ

#

such a shame but I get why they can't send 500k free shirts

cunning canyon
#

ven did u forget to revert shiki + invis chat to web, since we dropped firefox

austere talon
#

no

#

chrome also does not allow remote code

#

if you want to bring them back you need to refactor them for web to embed dependencies

#

similar to monaco and rnnoise

nimble plaza
#

reposting since it got purged

#

is there any real reason to keep rnnoise anymore? since krisp is on web now

austere talon
#

kinda

#

@spark cove wanted to refactor it to give you the choice between krisp and rnnoise

nimble plaza
#

oo

austere talon
#

cause apparently for some people rnnoise is better

#

anyway i personally think just removing it is simpler and I doubt many people will care

charred monolithBOT
obsidian oyster
#

Is it possible to have a plugin that would check if a user is in a voice channel and if they aren't to reconnect them?

austere talon
#

no

obsidian oyster
#

I would need a discord bot for that right?

#

I tried a py script that used the user token to login and verify connectivity to the vc using the channel ID and reconnect if not connected, but user tokens are not accepted by discords api per the TOS. Didn't know that until I tried to run the script and got a 401 unauthorized error

austere talon
obsidian oyster
#

yes by user I mean myself. long story short, a friends discord has leaderboards and im trying to be at the top of hours active in it, but they know im trying to do this and disconnect me from calls if im the only one there lol

obsidian oyster
# austere talon if by "a user" you mean yourself then yes

but if it is possible for myself, how would I go about starting that? Clearly I wouldn't need a user token as the plugin runs when discord launches, Im assuming I can use similar logic to the call length plugin as that starts a timer once connected to a voice channel. but the reconnecting feature is where i get lost

austere talon
#

your use case is against our rules

obsidian oyster
#

ah so nevermind

#

I did not know that, my bad

#

that would fall into the category of selfbotting huh

lime stone
obsidian oyster
#

Yeah reconnecting myself is where the issue comes in lol cause thats requiring something else to "login" as myself and reconnect me and then logout. Not worth losing my account over I'll just grind the hours manually lmfao

cunning canyon
#

their pr

torn knot
#

how'd I mess with someone's pr?

cunning canyon
#

they mess it themself ig

austere talon
torn knot
#

oh boy

turbid hatch
#

fuck me

#

i'm going to actually explode

#

if i have to do any more work on this pr

#

because of merge conflicts

#

and not because of bugfixes or whatever

#

its actually annoying me how git cant resolve this and github forces me to manually resolve it

#

the thing is i dont actually know what git is doing

#

to break it this bad

#

because in the merge editor the incoming side is completely blank

#

so i'm just blindly accepting the current and then working out what's changed

woeful sable
#

@turbid hatch can you add pleadingzoom

turbid hatch
#

another time

toxic bough
#

Will anyone ever add a avatar decoration / profile effect plugin?

turbid hatch
#

the pr isnt done

#

it doesnt real time update and really it should

woeful sable
#

okii

turbid hatch
#

because we have the ability to find when a role changes

woeful sable
#

oh

turbid hatch
#

oh i know what this merge is for

#

it's for firefox removal

#

got it

toxic bough
charred monolithBOT
turbid hatch
#

oops

#

that's not what i meant to do

#

i forgot this is on the fork

charred monolithBOT
#

@Vendicated can this PR be prioritised? every time we make a change to themes/whatever has been moved, it requires a manual merge because the changes are apparently too complex for Git and GitHub to resolve (and for some reason the incoming changes become blank, so I have to manually go through and work out what the changes are to fix it).

turbid hatch
#

^ it's just getting a bit frustrating that i can't progress with any features/changes because i need a review, and my only maintenance to this PR is that i have to go through git commit history on files that no longer exist on this branch to work out how to merge it

#

@verbal pumice is the mac issue on channeltabs still there?

verbal pumice
#

yeah

turbid hatch
#

hm

verbal pumice
#

haven't touched it since and cant test

turbid hatch
#

i think @olive barn can help u out with that

#

once it's fixed i think we can merge it in

#

(after review ofc)

austere talon
#

there's not much point in us adding it until they also support it

turbid hatch
#

i dont think it matters if BD adds it poi_think

#

we can at least encourage people to try and make themes for it

#

then they'll also be BD-ready when they add the feature

#

cause it'd be cool to see less and less :root { /* config... */ } and more usercss based gui

#

(also it might prod them to hurry up on their support)

nimble plaza
turbid hatch
#

run channeltabs on mac, apparently that should be enough to cause the bug

nimble plaza
#

oh lmao

#

oki

turbid hatch
#

it's because channeltabs can't account for the mac controls atm

#

so sunnie needs to know how to account for them and needs a tester

nimble plaza
#

@verbal pumice this look good?

#

or should it be more left

#

this is 80px padding-left on .vc-channeltabs-inner-container

charred monolithBOT
austere talon
#

jumpscare

turbid hatch
#

yeah i struggled going through colorways

#

(hence my comment about adding linebreaks)

verbal pumice
#

that's what i was thinking of too

nimble plaza
#

lemme find how to make it apply a class on macos then

verbal pumice
#

doesnt the body have a specific class dependent on platform

nimble plaza
#

wym

austere talon
#

.platform-osx or smth like that

nimble plaza
austere talon
#

the document has it

#

at the very top

nimble plaza
#

oooo tysm

#

doesnt seem to do anything

turbid hatch
#

is that because you already have a padding-left

#

oh wait

#

no your selector is wrong

nimble plaza
#

wait huh

#

.platform-osx .vc-channeltabs-inner-container works

turbid hatch
#

yeah

nimble plaza
#

not the other way around

#

oki

austere talon
#

yeah?

turbid hatch
#

other way around means an element with platform-osx under the innercontainer

turbid hatch
#

but html is the one with the class

austere talon
#

.child .parent has never worked in css

turbid hatch
#

css selectors are order sensitive

verbal pumice
#

inner container is used for both tabs and bookmarks so thatll add padding to both

#

why did i not add a separate class

turbid hatch
#

although i think html.platform-osx ... is probably a better idea for clarity

turbid hatch
#

unless we dont do that

#

already

#

let me check

#

shrug

nimble plaza
#

waaaaaaa

turbid hatch
#

like sunnie said :P

#

the same class is used on both

#

so it pads both

turbid hatch
#

easy fix though

austere talon
#

discord doesn't do that either

turbid hatch
#

oh do they not?

#

where do they put osx?

austere talon
#

wdym

turbid hatch
#

like the

#

oh nvm

austere talon
#

at the start

turbid hatch
#

got what you mean

nimble plaza
#

aanyways easy fix is just css .platform-osx .vc-channeltabs-inner-container { padding-left: 80px; }
with whatever the new class you add is

#

:3

turbid hatch
#

i thought you meant they dont put it on html

#

but now i understand

#

xd

#

is 80 the amount of spacing they add?

nimble plaza
#

that was just a guess amt that looked good

#

lemme see what discord adds

nimble plaza
#

this is 72px

turbid hatch
#

try 72

turbid hatch
nimble plaza
#

much better

turbid hatch
#

and change it to 72 whilst ur at it

#

looks better xd

#

hm

#

shame the traffic lights dont line up

#

wonder if thats something we can change

austere talon
#

should

#

but it'd look weird I think

nimble plaza
#
.platform-osx .vc-channeltabs-container:nth-child(1) {
    padding-left: 72px;
}```
 this works if u dont wanna add a new class
turbid hatch
verbal pumice
#

imo this is better than 2 identical classes but what does everyone else here think

turbid hatch
#

you dont have to dupe the style rule

nimble plaza
#

wait that still looks weird uh

turbid hatch
#

.vc-channeltabs-container, .vc-channeltabs-tab-container

verbal pumice
#

oh right

turbid hatch
#

annoyingly i think to move the traffic lights further down we have to edit how the window gets created

#

its not a big deal but i dont think its worth it

nimble plaza
#

WHAT DID I DO

turbid hatch
verbal pumice
#

ok pushed

nimble plaza
verbal pumice
#

right i forgot the reason i made that change

nimble plaza
#

lmao

#

also is it possible to have ctrl+t open a new tab?

verbal pumice
#

i went fucking insane over trying to disable the discord bind

#

i probably should but like dont have the mental capacity rn

nimble plaza
#

lmao dwdw

verbal pumice
#

sdfbghjhkasfhjagdfhj

#

nodevtoolswarning didnt do its job and logged me out and when i logged back in bookmarks shat themselves

nimble plaza
#

wait what happens if i switch accounts

verbal pumice
#

it should work

blazing dome
#

permission to copy the cli.go file from the old installer into the new one?

nimble plaza
#

oh it saves the bookmarks per account

verbal pumice
#

not my fault

#

woo

charred monolithBOT
nimble plaza
#

just pulled again, looks good

#

actually wait

#

its just a bit too far right

#

65px looks good

verbal pumice
#

done

fleet depot
#

oh yeah am i the only one getting this sometimes

#

quality=lossless

nimble plaza
#

ize=48)_Pat&quality=lossless

#

its getting rid of part of the name attribute?

verbal pumice
#

i reinstalled and its fine so idrc

austere talon
#

it happens when you have a dead instance still lingering

#

normally when you start vesktop from source

hazy kindle
#

(yk what would be cool imho? if vencord showed on <@&1026534353167208489>sโ€™ profiles which plugins they made/ contributed to)

austere talon
#

someone already suggested that once

hazy kindle
#

might be motivating to contribute as well

verbal pumice
#

would probably be a pain to go back for all the old entries

#

as well as the discussion of what counts and what doesn't

#

probably not worth it

nimble plaza
#

i think they mean

#

anyone marked as a plugin dev in vencord source

verbal pumice
#

oh

#

right

austere talon
#

whar?

#

we already have modals for each author

charred monolithBOT
limpid badger
#

I wonderโ€ฆ what happened here

junior olive
#

You can't use regex in finds can you?

austere talon
junior olive
#

sad

#

i'm having trouble coming up with a find

nimble plaza
#

send module id

junior olive
#

I got a find but I'm haivng other problems now

#

I can't findByCode it

#

I don't really want to regex replace it

nimble plaza
#

lemme see if i can

#

whats the module id

junior olive
#

yeah 1s getting id

nimble plaza
#

oki

junior olive
#

863979

#

I want to extract Promise.all([n.e(40532), n.e(56729), n.e(82761)]).then(n.bind(n, 856729))];

#

I found a working find: {filteredStickers

crude hearth
#

what are you even trying to do

junior olive
#

loads a module i want to extact smt from

#

i've already done this once

crude hearth
#

why dont you just get module via findByProps

junior olive
#

because the module isn't loaded

crude hearth
#

lazyloaded

#

use waitFor?

junior olive
#

i cant

crude hearth
#

also that module returns react component

junior olive
#

the user would need to go to that specific place before the chunks get downloaded and loaded

#

i'm trying to get those chunks downloaded and loaded in a entirely different place

crude hearth
#

wait is that module input chat box

junior olive
#

no

crude hearth
#

yea thats input component

junior olive
#

which module are you even talking about

crude hearth
junior olive
#

it's a load of stuff

#

not just that

#

ctrlf {filteredStickers

#

I want to extract the promise down there to load the create sticker modal that has a component i want

crude hearth
#

basically you want this

junior olive
#

yes i am trying to load the module that contains that, as it depends on the module that has that file input, causing it to load, and then i can patch that module and extract that file input

#

I don't want the modal itself I just want to load the modal

crude hearth
#

tbh just recreate components at this point

junior olive
#

i mean maybe but if it can be loaded why not

#

I've already done it once for another module that I needed the components from way more

crude hearth
#

regex matching webpack.require picking module ids

#

and loading

junior olive
#

it's the best I can do

#

If I'm doing it for another module I more desperately need the components from I may as well stick with it for this

#

wtvr ill recreate it

#

@nimble plaza i found a better place to extract the ids from

#

i froze patch helpr

torn knot
#

I think a github review got f*ed

charred monolithBOT
mortal fractal
#

@torn knot because the reviewed files are changed

torn knot
#

I see

torn knot
#

Well, I just hope that my actual changes that I made just now didn't break

mortal fractal
#

not testing them clueless

torn knot
mortal fractal
#

is that on push or pull

#

just try again cause that just seems networking related

torn knot
#

pull

#

I actually forgor to remove this

#

all seems fine after a pull

austere talon
spark cove
#

Command

austere talon
#

WHAT

spark cove
#

Slash command

austere talon
#

wants their baby removed...

charred monolithBOT
spark cove
#

Slash remove

#

Bloat

#

All my code is basically like barf

#

That will eventually be sweeped up

#

And mopped

#

And drowned in anti biotics

austere talon
#

WHAT

#

WHY SO NEGATIVE

#

your poor code ๐Ÿ’”

spark cove
#

Lest it get any worse

#

I can't believe it

#

Dear God

#

Could you be more subtle next time

#

And I'll take the bait cus

#

For the very first time in my life

#

I'm fixin to bite

junior olive
#

I turned my webpack chunk & module extractor into a utility blobcatcozy

#

there we go

austere talon
junior olive
#

it was written at 4am blobcatcozy

austere talon
#

either change it to apng or png, or png or animated png

junior olive
#

I'll go over all the strings at some point

#

I'm really happy with this

austere talon
#

just remove strings

#

not needed

#

strings are for nerds

junior olive
#

it's so seamless

spark pivot
junior olive
# torn knot sauce?
import { wreq } from "@webpack";

export default async function extractAndRequireModuleIds(code: Function | string) {
    const chunksAndModule = [...code.toString().match(/(Promise.all.+?\)\))/)?.[1].matchAll(/[0-9]+/g) ?? []];

    const ids = chunksAndModule.map(m => parseInt(m[0]));

    const module = ids.pop()!;
    return Promise.all(ids.map(i => wreq.e(i))).then(wreq.bind(wreq, module));
}
austere talon
#

that Promise.all regex looks a bit dangerous

junior olive
#

it prlly is

#

i need to clean it up

woeful sable
austere talon
#

what that regex actually means is find the first Promise.all, then go as far as you need to find )))

junior olive
#

for that page only

junior olive
woeful sable
#

when itโ€™s finished will it automatically update?

junior olive
#

it matches the .then's double parenthesis

woeful sable
#

or is it destined to do that

austere talon
junior olive
charred monolithBOT
junior olive
woeful sable
#

also having โ€œaddโ€ at the end still feels weird

junior olive
#

the regex can be made safer 100%

junior olive
woeful sable
#

idk if thatโ€™s just me

#

either way itโ€™s great as it is!! youโ€™ve done a great job

junior olive
#

@austere talon here i'll make a better regex

woeful sable
#

also maybe make them the same colour for consistency

junior olive
#

@austere talon how is
Promise.all.+?]\)\.then\(.+?\)\)

#

not rlly sure how to make it safer

charred monolithBOT
torn knot
#

please send the finished snippet once you finalize it, as I was looking for something simmilar for a long time

charred monolithBOT
austere talon
#

like i said this will find the very first Promise.all in the file then match everything up to the ending

#

do not use .+

junior olive
#

What should I use instead

#

It seems to match exactly what I want it to..

#

It's not being run on files its being run on individual functions

#

the ? makes it lazy and stops at the first ))

austere talon
#
Promise.all random ass code that has nothing to do with what you want to match Promise.all([]).then(blah))
#

try it on this

junior olive
#

yes it matches that but the chances of the funcs it's being ran on containing that are slim

#

but okay

#

how can it be made better? I don't know

austere talon
junior olive
#

but what do i use instead

austere talon
#
/Promise\.all\(\[(\i\.\i\(\d+\),?\)+\]\)\.then/
#

now you don't even need to match a second time

quaint sapphire
#

I really don't like how vencord has custom regex codes

#

makes it hard to test online

#

I always use \w+ instead of \i

junior olive
austere talon
quaint sapphire
#

I only type \w+
they are minified so special chars are rare

austere talon
#

that's wrong

#

the minifier heavily uses _ and $

quaint sapphire
#

doesn't \w+ match _?

austere talon
#

it's equally common as normal letters

quaint sapphire
#

_ is matched

#

$ is not matched, which makes sense

#

most of the time \w+ is enough
I haven't had the need to not use it

#

I do believe you that there are variables that it won't match

#

but \i feels more greedy than \w+

#

and I don't like being greedy in regex

olive aurora
#

what

#

its not "greedier"

junior olive
#

is this a bug with patchhelper or is this not allowed

#

in regex

quaint sapphire
junior olive
#

(group is getting overwritten?)

quaint sapphire
junior olive
#

guhh

austere talon
#

your regex matches a subset of javascript identifiers

quaint sapphire
#

Which is less greedy

austere talon
junior olive
#

wrap what in a 2nd group

olive aurora
#

on tetr.io theres a random line of code that uses cjk characters as identifiers

#

clearly not enough

austere talon
#

it matches all normal identifiers

austere talon
#

that's like saying /a/ is better than /\w/ for text matching cause its less greedy

olive aurora
#

osk trolling

quaint sapphire
#

meanwhile swift allowing variables to be emojis

quaint sapphire
junior olive
#

Promise\.all\(\[(?:\i\.\i\((\d+)\),?)+\]\).then\(\i\.bind\(\i,(\d+)\)\)
what do i wrap in a 2nd group Scared

austere talon
#

okay keep yapping

olive aurora
#

no it doesnt because identifier names can change between versions

austere talon
#

arjix trying not to start prolonged arguments over the most meaningless nothingburger

junior olive
#

it just captures it again vee

#

and also that promise.all could have any amt of chunks

#

so hm

austere talon
#

the entire body pal

junior olive
#

so i do need to match a 2nd time?

austere talon
#

probably

quaint sapphire
#

I did not start an argument, I merely stated how annoying \i is since it is an unofficial extension
I did not say that \i is worse than \w+, but that \w+ is enough for my needs, and it is more efficient since it ain't as powerful as \i

junior olive
#

what do we think of this

quaint sapphire
#

when my regex gets broken bc of that, I'll update it to use \i

junior olive
#

i'll make the matchAll match the chunk ids

austere talon
#

match only the body

junior olive
#

the array?

austere talon
#

yes

limber skiff
junior olive
#

there

quaint sapphire
#

@junior olive can ya give me the link to the module?
my pc is lagging so much that I do not dare open the devtools

junior olive
#

isTryItOutFlow;

quaint sapphire
#

the link...

junior olive
#

uhh

quaint sapphire
#

thx

#

out of this, what do you need?

Promise.all([n.e(40532),n.e(29392),n.e(39685),n.e(47007),n.e(79249),n.e(69876),n.e(79913),n.e(19493),n.e(64466),n.e(92465),n.e(10675),n.e(73679),n.e(87440),n.e(73177),n.e(67874)]).then(n.bind(n,788533))]
junior olive
#

i'm working on the regex dw

quaint sapphire
#

only the list?

junior olive
#

no

#

I need all the ids but dw i have a regex

quaint sapphire
#

cause you also capture the bind after

junior olive
#

yes I need the id in there

#
export default async function extractAndRequireModuleIds(code: Function | string) {
    const chunksAndModule = code.toString()
        .match(/Promise\.all\(\[((?:\i\.\i\(\d+\),?)+)\]\).then\(\i\.bind\(\i,(\d+)\)\)/);


    const chunkIds = Array.from(chunksAndModule?.[1]
        .matchAll(/(?:\i\.\i\((\d+)\),?)/)!)
        .map(m => parseInt(m[0]));

    const moduleId = parseInt(chunksAndModule?.[2]!);

    return Promise.all(chunkIds.map(i => wreq.e(i))).then(wreq.bind(wreq, moduleId));
}

time to test this

limber skiff
#

doesnt the code have more than one chunk load

#

cuz if it does you should prob put an anchor to just require the one you need

#

aka SOME_TEXT_BEHIND_WHAT_YOU_NEED.+?<the normal match>

#

oh

junior olive
#

I presume the module needs both chunks, and i'm trying to make it generic so i can reuse it (as i already am)

limber skiff
#

you are making it generic

quaint sapphire
#

it takes in the function I believe

junior olive
#

mmmmmm oh boy why is chunksAndModule null

#

wait is \i available when using regex like this

limber skiff
#

yes

#

use the canonicalizeMatch function

#

it accepts the regex with \i and returns the normal one

junior olive
#

thanks

quaint sapphire
#

or \((\d+)\) to not capture the last one as well

#

ur first regex acts like a guard, so it is safe

charred monolithBOT
junior olive
#

ok i got it working

#
export default async function extractAndRequireModuleIds(code: Function | string) {
    const chunksAndModule = code.toString()
        .match(canonicalizeMatch(/Promise\.all\(\[((?:\i\.\i\(\d+\),?)+)\]\).then\(\i\.bind\(\i,(\d+)\)\)/));

    const chunks = chunksAndModule?.[1].matchAll(/(\d+)/g);

    const chunkIds = Array.from(chunks ?? []).map(c => parseInt(c[0]!));

    const moduleId = parseInt(chunksAndModule?.[2]!);

    return Promise.all(chunkIds.map(i => wreq.e(i))).then(wreq.bind(wreq, moduleId));
}
junior olive
#

I don't need that

quaint sapphire
#

oh yeah

junior olive
#

I have a capture group for the array contents yeah

quaint sapphire
#

you only match against the list

#

neat

spark cove
#

speaking of \i

#

bre when

quaint sapphire
#

bre?

spark cove
#

so we can annihilation that patch

junior olive
spark cove
#

thing

quaint sapphire
#

damn you

spark cove
#

i was explaining it but my brain stopped now i need to shower

limber skiff
spark cove
#

eslint patch

limber skiff
#

oh

spark cove
#

that allows \i

junior olive
#
import { canonicalizeMatch } from "@utils/patches";
import { wreq } from "@webpack";

export default async function extractAndRequireModuleIds(code: Function | string) {
    const chunksAndModule = code.toString()
        .match(canonicalizeMatch(/Promise\.all\(\[((?:\i\.\i\(\d+\),?)+)\]\).then\(\i\.bind\(\i,(\d+)\)\)/));

    if (!chunksAndModule) throw new Error("Couldn't extract anything of relevance");
    else if (!chunksAndModule[1]) throw new Error("Couldn't extract any chunk requires");
    else if (!chunksAndModule[2]) throw new Error("Couldn't extract module ID");

    const chunkIds = Array.from(chunksAndModule[1].matchAll(/(\d+)/g)).map(cId => parseInt(cId[0]));
    const moduleId = parseInt(chunksAndModule[2]);

    return Promise.all(chunkIds.map(i => wreq.e(i))).then(wreq.bind(wreq, moduleId));
}
#

cleaned it up, i think this turned out very nicely

quaint sapphire
#

would be nice if we had custom error classes

junior olive
#

can we not make those?

quaint sapphire
#

we can

junior olive
#

or are u saying i should add

quaint sapphire
#

eh

junior olive
#

it can be added later

quaint sapphire
#

more of a "ven should consider it" thing

crude hearth
quaint sapphire
#

Hey Turkish lad @crude hearth

crude hearth
#

hi

quaint sapphire
#

how is it in Turkey rn?

#

I heard ur currency is shit

crude hearth
#

normal

crude hearth
#

but everyone is kinda getting used to it

quaint sapphire
#

welp

#

it is what it is

quaint sapphire
#

currency here aint shit, but the local prices are shit

limber skiff
#

then you can have a title like ModuleLoader idk

junior olive
#

If ven wants to move this into vencord utils then sure

#

but rn it's decor plugin util

quaint sapphire
quaint sapphire
#

maybe add a logger if the error is unhandled

limber skiff
#

oh

#

I thought you were making it a generic util

junior olive
#

I'm down to move it into a generic util i just don't know if ven wants that

limber skiff
#

tbh to make it generic we need that anchor thing I said

#

and have it be optional

#

in the case it is needed

junior olive
#

idk what ur talking abt anchor thing

quaint sapphire
junior olive
#

yep

limber skiff
quaint sapphire
#

it doesn't scan all modules

junior olive
#

we can't really pick and choose what chunks to load

quaint sapphire
limber skiff
#

a module can have more than one of those

junior olive
#

it's best just to assume module needs all defined chunk loads

limber skiff
#

you didnt understand what I mean

junior olive
#

I don't think I do no

limber skiff
#

the same module can have more than one Promise.all and the rest of the stuff that loads chunks

charred monolithBOT
quaint sapphire
#

I do understand, but I disagree ๐ŸšŽ

limber skiff
#

in that case the generic function needs a way to select the right one

junior olive
#

..you find the function to extract a single promise.all load from

#

the consumer handles getting the func that handles loading a module

quaint sapphire
limber skiff
#

oh wait

quaint sapphire
#

it accepts an exported function

limber skiff
#

are those always behind a single function

limber skiff
junior olive
#

What i've seen is you can find multiple funcs with the same promise.all load

quaint sapphire
#

I really wonder how the discord source code actually looks like

#

wish they shipped the sourcemaps

junior olive
#

i need to figure out this file input now blobcatcozy

limber skiff
#

I mean behind the scenes it's all normal imports

#

webpack does the magic of making chunks very likely

quaint sapphire
junior olive
#

I have the file input

#

i just need to figure out props

quaint sapphire
#

oooh

#

just log them lol

junior olive
quaint sapphire
#

(by hijacking another one)

junior olive
#

im looking at src rn to figure out

quaint sapphire
#

me when it aint loaded husk

junior olive
#

yep!

#

that's why i have the extract and require

#

ok yeah it works

charred monolithBOT
quaint sapphire
#

what does that even mean?

olive aurora
quaint sapphire
#

too much shiggy is not good for u

limpid badger
#

Yeah Iโ€™m confused

quaint sapphire
charred monolithBOT
limpid badger
#

Huh

quaint sapphire
#

aliucord jumpscare

limpid badger
#

Ahh I just had to open

limpid badger
quaint sapphire
quaint sapphire
#

its the purge

quaint sapphire
#

@austere talon just archive the repo

austere talon
#

no

limpid badger
#

Will there be a scoop package for Vesktop? I recently switched from winget to scoop and I am actually more comfortable using it compared to winget

junior olive
#

Rest in peace ven aliucord plugins

austere talon
#

the purge is done

quaint sapphire
#

meanwhile with winget...it updated some programs that I had an older version on purpose, like OpenVPN, that was a pain to debug

limpid badger
quaint sapphire
#

I learnt that the PATH has a length limit the hard way

hazy kindle
# austere talon whar?

as shown in that ss, rn every plugin has a list of contributors.
i was talking about adding the reverse: Every contributorโ€™s profile having a list of their plugins

junior olive
#

Yeah that'd be neat

#

But also how often are u looking at contributor profiles

hazy kindle
#

i often pop up peopleโ€™s profiles (contributors or not). With this feature, i would prbly open contributorโ€™s profiles all the time until ik their plugins by heart lol

quaint sapphire
#

Would be less intrusive and a more obvious place to have it

hazy kindle
#

what would you use it for?

quaint sapphire
#

?

#

You suggested it tho

#

Why ask me?

hazy kindle
#

for my use case that would be way too much effort

#

(i think)

#

opening settings is slow on my pc

quaint sapphire
#

Effort to use or code?

hazy kindle
#

use

quaint sapphire
#

To use

#

Hmm

hazy kindle
#

plus the typing and whatnot. Vs. literally a single click

quaint sapphire
#

Maybe you can add a "Show all plugins made by this user" button that opens the settings page with the filter enabled

hazy kindle
#

yeah, that would be a good compromise

#

a nice thing about the search filter would be that you could also use it to look up colabs, e.g. which plugins did ven and lewi do together? โ†’ author:ven author:lewi

quaint sapphire
#

It's just that plugins don't have a logo or smth, so it would be kinda empty to have them in the profile modal

#

Plus you may want to enable a plugin by that user, but doing that from the profile modal feels off

charred monolithBOT
quaint sapphire
#

If you make a search component that supports that I'll 100% steal it for another plugin I am too lazy to complete

hazy kindle
hazy kindle
#

if anything ig it could be too full/cluttered, imagine venโ€™s profile haha

#

but imho that would be ok if itโ€™s at the bottom, like the ReviewDB reviews may-they-rest-in-peace

quaint sapphire
austere talon
#

i feel like having an extra tab might feel a little crammed, especially if you also have mutual groups

#

so we could make the vencord contrib badge open ur page on click

quaint sapphire
#

@austere talon can I get teal role back ๐Ÿ™

austere talon
#

too much

jagged cloak
#

Aktivitat

quaint sapphire
#

Using discord with a local locale?

hazy kindle
quaint sapphire
hazy kindle
#

i was thinking server profile anyway (1 click instead of 2) (also like reviewdb)

jagged cloak
#

thats pretty mild

#

lots use not english

hazy kindle
#

side note, not all contribers have the badge
example: @fleet depot

quaint sapphire
austere talon
hazy kindle
#

why do they have the role then?

austere talon
#

because they're a contributor?

quaint sapphire
#

They could have contributed to the core of vencord

austere talon
#

not every contribution is a plugin

junior olive
#

i don't have contributor

hazy kindle
#

makes sense

junior olive
hazy kindle
quaint sapphire
#

Most of my contributions were not in plugins funnily enough

austere talon
#

for simplicity purposes, vencord considers anyone a contributor who's listed in Devs

#

so if you never add yourself there, you're not considered a contributor

junior olive
#

do i have to ask for the role

#

or is it auto

austere talon
#

you have to beg

jagged cloak
#

get on ur hands and knees

hazy kindle
#

ayy congrats epic contributor @junior olive ๐Ÿฆพ

junior olive
#

VENNY VENCORD I AM ON MY HANDS AND KNEES BEGGING YOU PLEASE GIVE ME contributor (epic) ROLE IN THE VENCORD SERVER I WILL OWE YOU ALL MY LIFE

quaint sapphire
#

@austere talon plz gib the teal role ๐Ÿ˜ญ

junior olive
#

thank u venny vencord

jagged cloak
#

u are bambik

hazy kindle
#

bambik

junior olive
quaint sapphire
#

I was never banned from the server, I foolishly left it on my own

hazy kindle
#

oh, contriber profiles might also be good, plausibly even more priority, on vencord.dev โ€“ then the devs can link that in their portfolios

junior olive
quaint sapphire
austere talon
#

now upload RECOVERY-CODES-Fiery.txt as decor

#

would be fire

junior olive
#

fr

jagged cloak
#

i will upload troller.txt as decor

#

for example its the eicar text

quaint sapphire
#

@junior olive might wanna look at steam's avatar decorations

If it's possible to have them stolen then it would be nice to include them as built-in or smth

junior olive
#

I don't think I really want to include them built in because tbh they don't work very well due to being square

austere talon
#

does steam let u just download them

quaint sapphire
junior olive
#

yeah from the site

junior olive
quaint sapphire
austere talon
#

will everyone have to upload their own decor or will there be a way to browse all already uploaded decors and pick any of them

#

the latter would be neat

junior olive
#

upload your own, but there's gonna be preset sets that u can pick from (and in the future I may add the ability to pick from a list of public ones made public by their creators)

quaint sapphire
#

@austere talon ven listening to not cute music? (I don't know the song)

austere talon
#

maybe make it so that when you upload a decor, there's a checkbox make public | this will allow anyone to find and use your decoration and if you check it you need to enter a description / tags

junior olive
#

Yeah that'll be a a down the line update

austere talon
#

that'd be neat

junior olive
#

For now decorations will be private with the exception of presets (hoping to have a community pack at launch via collaboration with a artist in the client modding community)

junior olive
#

yeah ven that sounds good but I'm gonna worry about that down the line

#

a future feature

austere talon
#

yop

hazy kindle
#

into a bright feature future

woeful sable
#

still wanting shiggy decor

austere talon
junior olive
woeful sable
#

on ios canโ€™t

hazy kindle
austere talon
#

ios L

woeful sable
#

fr

austere talon
hazy kindle
#

i rest my case

austere talon
#

its just the intro to the album

junior olive
#

vennnn why is formdata broken

hazy kindle
#

a

austere talon
#

album stream

#

their label uploaded it super weird, they combine two songs into one video instead of either having one video per song or one video for the entire album

hazy kindle
#

๐Ÿ‘Œ a little satanism in the evening never hurt anybody

junior olive
#

What the fuckk

austere talon
austere talon
woeful sable
#

@austere talon

austere talon
#

yes

junior olive
#

oh

#

im silly

hazy kindle
junior olive
#

i fixed

hazy kindle
#

oh thatโ€™s the double song upload

junior olive
#

thats a new one

woeful sable
# junior olive

it could be like the server @dusk hill has where you request a badge and mods have to approve or is that what your going for

#

still then youโ€™d need dedicated staff

dusk hill
#

UserEffects soon

junior olive
woeful sable
#

how would that even be implemented unless you have template

dusk hill
#

im having a essential chrisis rn

woeful sable
#

the mess the average user would make

#

using a custom effect

dusk hill
junior olive
#

are u doing custom profile effects or

dusk hill
#

custom profile effects

junior olive
#

bc i was hoping to add that to decor in the future

dusk hill
#

oof

woeful sable
#

canโ€™t wait to see the atrocities people make

dusk hill
#

ong

#

i cant seem to be able to actually set this up

#

i can set the ones discord already has but the ones i added ๐Ÿค”

junior olive
toxic bough
dusk hill
#

a effect

charred monolithBOT
toxic bough
#

I hope someone makes a free profile effect / avatar decoration plugin.

#

That'd be nice

dusk hill
#

fiery is doing decoration plugin

#

also he will do effect in the future

junior olive
#

yeah decor has profile effects on the to-do

#

we rlly shouldnt have 2 competing effect plugin

toxic bough
#

Ooo

woeful sable
dusk hill
#

but the one im working on is on replugged

woeful sable
#

sorry autocorrect

junior olive
#

I think it makes sense

woeful sable
#

like go to the server, request decor, wait for approval then enable via plugin

junior olive
#

user creates from their client -> request goes to private channel - > request is approved -> it becomes their active decoration

junior olive
woeful sable
#

mmm true

#

at least when a users decor has been approved could it show a message at the top of the client saying it has been approved

#

example, when a user has been removed from a. guild the green bar shows

#

or maybe a popup message

#

iโ€™ll show in a second

junior olive
woeful sable
#

i suppose

charred monolithBOT
woeful sable
junior olive
#

yeah that'd be neat

#

@austere talon does vencord have apis to make a banner like that

woeful sable
#

check the โ€œrelationship notifierโ€ plugin

lime stone
charred monolithBOT
half notch
#

i hope this free decos plugin doesnt get stuck in PR hell Prayge

junior olive
#

@austere talon do you think you could start reviewing it? The only missing feature is presets and I'd rather start squashing review notes

#

actually hmmmmmm

#

maybe i should fix decor updates

#

a start on reviewing it would be nice

#

there's only 2 more things

#

presets and switching fetching decorations for other users to timezonedb-style

charred monolithBOT
austere talon
#

@topaz thistle would you like me to just publish 1.0.0 to npm?

limpid badger
austere talon
#

it's still not finished, is it?

#

you can just use a devbuild until it's ready / eventually merged

limpid badger
#

i mean it seems fine

austere talon
#

it still has some issues now

#

like macos

austere talon
#

alright

#

so, new PatchBay() throws if no pipewire right

#

is everything lazily initialised once i call the constructor for the first time, or should i lazy import the entire module?

topaz thistle
austere talon
#

so simply importing the module won't initialise a bunch of pipewire stuff?

topaz thistle
#

Yes

austere talon
#

neat

#

how do i figure out the discord webrtc stream name

#

is it always the same?

#

it seems to just be "Chromium"

topaz thistle
#

I think discords voice chat output is always WEBRTC something

#

The chromium thing is only notification sounds

austere talon
#

doesn't seem so

#

i set it to chromium

#

and i can hear myself in the stream

topaz thistle
midnight raven
#

yeah

topaz thistle
#

Hm can you run pw-cli ls Node

midnight raven
topaz thistle
midnight raven
#

a lot jeez

topaz thistle
#

Yeah I know

midnight raven
topaz thistle
#

Ah

#

Two things

#

It should work with the official discord client as that usually has WEBRTC as the voice chat audio

#

I can give you the application name and Id in list

#

Would that help?

midnight raven
#

yeah i have confirmed that link("Chromium", "exclude") works for system audio and doesn't include discord

charred monolithBOT
topaz thistle
midnight raven
#

this one?

topaz thistle
#

Eh

#

Wait

#

Yes

#

Could very well be a subprocess considering it's chrome

#

If so can you figure out if that process belongs to Vekstop?

midnight raven
#

well i restarted discord so it changed but

#
vee        25666  3.6  0.4 34235080 68176 pts/0  Sl+  01:50   0:10 /home/vee/Coding/Vesktop/node_modules/electron/dist/electron --type=utility --utility-sub-type=audio.mojom.AudioService --lang=en-GB --service-sandbox-type=none --enable-crash-reporter=5202b306-7f8e-4b0e-9759-5b4adec4e909,no_channel --user-data-dir=/home/vee/.config/VencordDesktop --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,i,10662465288986271862,12928842484402543385,262144 --enable-features=WaylandWindowDecorations --disable-features=HardwareMediaKeyHandling,MediaSessionService,SpareRendererForSitePerProcess,WidgetLayering,WinRetrieveSuggestionsOnlyOnDemand
#

this is the one

#

i think

#

that is

id 68, type PipeWire:Interface:Node/3
     object.serial = "772"
     factory.id = "6"
     client.id = "82"
     client.api = "pipewire-pulse"
     application.name = "Chromium"
     node.name = "Chromium"
     media.class = "Stream/Output/Audio"
topaz thistle
#

Does the process Id from pw-dump match?

midnight raven
#

yes

#
"props": {
        "adapt.follower.spa-node": "",
        "application.icon-name": "chromium-browser",
        "application.language": "en_GB.UTF-8",
        "application.name": "Chromium",
        "application.process.binary": "electron",
        "application.process.host": "vendingmachine",
        "application.process.id": 25666,
        "application.process.machine-id": "3f7a4b6efc23421cbc2744660539dc57",
        "application.process.user": "vee",
        "audio.adapt.follower": "",
        "client.api": "pipewire-pulse",
        "client.id": 82,
        "clock.quantum-limit": 8192,
        "factory.id": 6,
        "factory.mode": "split",
        "library.name": "audioconvert/libspa-audioconvert",
        "media.class": "Stream/Output/Audio",
        "media.name": "Playback",
        "node.autoconnect": true,
        "node.latency": "512/48000",
        "node.name": "Chromium",
        "node.rate": "1/48000",
        "node.want-driver": true,
        "object.id": 68,
        "object.register": false,
        "object.serial": 772,
        "pulse.attr.maxlength": 4194304,
        "pulse.attr.minreq": 2048,
        "pulse.attr.prebuf": 6152,
        "pulse.attr.tlength": 8192,
        "pulse.server.type": "unix",
        "stream.is-live": true,
        "window.x11.display": ":0"
      },
topaz thistle
#

If so I can push an update tomorrow that will also give you the process Id when calling list

#

Nice

#

Do you need just the process Id or do you want to have the application name as well?

midnight raven
topaz thistle
#

I can add support for that yeah

midnight raven
#

also perhaps the app name might change if packaged, keep in mind i'm running via electron directly

topaz thistle
#

So just process Id then right?

#

I'll go to sleep now but if you don't have any objections I'll make list Return both node name as well as process Id and allow link to take an id as well

#

You may want to test if the process Id approach would work for the official discord client as well

midnight raven
#

ohh i see

topaz thistle
#

It has "WEBRTC <something>" as the node name when in voice chat

midnight raven
#
"props": {
       "adapt.follower.spa-node": "",
       "application.icon-name": "chromium-browser",
       "application.language": "en_GB.UTF-8",
       "application.name": "Chromium",
       "application.process.binary": "vencorddesktop",
       "application.process.host": "vendingmachine",
       "application.process.id": 27450,
       "application.process.machine-id": "3f7a4b6efc23421cbc2744660539dc57",
       "application.process.user": "vee",
       "audio.adapt.follower": "",
       "client.api": "pipewire-pulse",
       "client.id": 70,
       "clock.quantum-limit": 8192,
       "factory.id": 6,
       "factory.mode": "split",
       "library.name": "audioconvert/libspa-audioconvert",
       "media.class": "Stream/Output/Audio",
       "media.name": "Playback",
       "node.autoconnect": true,
       "node.latency": "512/48000",
       "node.name": "Chromium",
       "node.rate": "1/48000",
       "node.want-driver": true,
       "object.id": 65,
       "object.register": false,
       "object.serial": 872,
       "pulse.attr.maxlength": 4194304,
       "pulse.attr.minreq": 2048,
       "pulse.attr.prebuf": 6152,
       "pulse.attr.tlength": 8192,
       "pulse.server.type": "unix",
       "stream.is-live": true,
       "window.x11.display": ":0"
     }
#

note application.process.binary

#

this is when packaged

topaz thistle
#

Yeah I know, it was previously electron that's why I thought it wasn't too applicable

#

But we can also use that

#

Whatever you prefer

midnight raven
#

it's only electron when running directly without packaging

#

i think it's fine to have it semi broken when running unpackaged considering that's only for development

topaz thistle
#

Alright so we'll go with the binary prop then?

If so we'd have to figure out how to tell link wether or not you gave it a binary or node name

midnight raven
#

so some options:

  • allow excluding by application.process.binary
  • allow linking by id and return id, application.name and application.process.binary in list()
topaz thistle
midnight raven
#

alright, that works

#

i might just try to add it myself real quick, it should probably be pretty easy

topaz thistle
#

Eh it's gonna take some refactoring

#

But feel free to

midnight raven
#

really? would it not just be editing the place where it creates the object array and changing that to an object then adding those additional props?

#

ig you might pass some of these across different functions

austere talon
#

anyway besides that it seems to work pretty well

#

including the exclude option

topaz thistle
#

Should we change the signature of link to

link(target: { name: string } | { id: number}. , mode: ...) or something along those lines?