#👾-core-development

1 messages · Page 166 of 1

rugged spire
#

earlier today I was trying to patch the audio devices context menu with something that uses the plugin settings and it kept crashing saying cannot access length of undefined (???????), would this be able to fix that??

limber skiff
#

show stack trace

rugged spire
#

is this a try it and see moment

#

hold on

#

the code is not committed and it's on my laptop

#

give me 2-3 mins

limber skiff
#

I'm about to merge context menu api changes so that's your best time

rugged spire
#

Also do note that the crash occurs after the patch has been rendered twice

limber skiff
#

oh I know what it prob is already

#

show code instead of stack trace

rugged spire
#

let me guess

#

documented already and i didnt find it by searching

#
const AudioDeviceContextMenuPatch: NavContextMenuPatchCallback = (children, props: { renderInputVolume?: boolean; }) => () => {
    const s = settings.use(["isEnabled", "timeout"]);
    console.log(s);
    // const s = { isEnabled: true, timeout: 300 };

    if ("renderInputVolume" in props) {
        children?.push(
            <Menu.MenuGroup
                label="Auto Mute"
            >
                <Menu.MenuCheckboxItem
                    checked={s.isEnabled}
                    id="vc-auto-mute-toggle"
                    label="Enable Auto Mute"
                    action={() => {
                        settings.store.isEnabled = !settings.store.isEnabled;
                    }}
                />
                <Menu.MenuControlItem
                    id="vc-auto-mute-timeout"
                    label="Inactivity Timeout"
                    control={(props, ref) => (
                        <Menu.MenuSliderControl
                            {...props}
                            ref={ref}
                            minValue={15}
                            maxValue={900}
                            value={s.timeout}
                            onChange={debounce((value: number) => settings.store.timeout = value, 10)}
                            renderValue={(value: number) => `${value} seconds`}
                        />
                    )}
                />
            </Menu.MenuGroup>
        );
    }
};
#

dont mind some of the debugging junk

#

yes it was originally being destructured

limber skiff
#

yop

rugged spire
#

what is it husk

limber skiff
#

basically the second callback you are using is only ran once

rugged spire
#

where?

limber skiff
#

but react component need to always run the same amount of hooks

#

(children, props) => () => {}

#

you return a function

#

the hook wouldnt work either way because the current context menu api is bad

#

the pr I'm merging will fix it

rugged spire
#

oh?

limber skiff
#

give me a sec

charred monolithBOT
limber skiff
#
const AudioDeviceContextMenuPatch: NavContextMenuPatchCallback = (children, props: { renderInputVolume?: boolean; }) => {
    const s = settings.use(["isEnabled", "timeout"]);

    if ("renderInputVolume" in props) {
        children.push(
            <Menu.MenuGroup
                label="Auto Mute"
            >
                <Menu.MenuCheckboxItem
                    checked={s.isEnabled}
                    id="vc-auto-mute-toggle"
                    label="Enable Auto Mute"
                    action={() => {
                        settings.store.isEnabled = !s.isEnabled;
                    }}
                />
                <Menu.MenuControlItem
                    id="vc-auto-mute-timeout"
                    label="Inactivity Timeout"
                    control={(props, ref) => (
                        <Menu.MenuSliderControl
                            {...props}
                            ref={ref}
                            minValue={15}
                            maxValue={900}
                            value={s.timeout}
                            onChange={debounce((value: number) => settings.store.timeout = value, 10)}
                            renderValue={(value: number) => `${value} seconds`}
                        />
                    )}
                />
            </Menu.MenuGroup>
        );
    }
};
#

pull from dev

#

this should be your new patch

rugged spire
#

okay

limber skiff
#

and also

#

you can now do this in your plugin object

rugged spire
#

wait what

limber skiff
#
contextMenus: {
  "navId": AudioDeviceContextMenuPatch
}
#

no need to manually use start and stop anymore

rugged spire
#

so

contextMenus: {
    "audio-device-context": AudioDeviceContextMenuPatch
},
limber skiff
#

yes!

charred monolithBOT
limber skiff
#

lmk if it works @rugged spire

#

oh actually

#

I edited it

rugged spire
#

I know

limber skiff
#

copy and paste the new patch again

rugged spire
#

i hadnt copied it yet anyway

#

was too busy merging

limber skiff
#

alright

limber skiff
rugged spire
#

works

#

thank you so much

limber skiff
#

does the checkbox update when you click?

rugged spire
#

yes

limber skiff
#

nice

rugged spire
#

something very much not working with my code though

charred monolithBOT
limber skiff
#

SSHUT UP

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

that's so fast

limber skiff
rugged spire
#

good question idk how to explain it properly but thing activating when i dont want it to

charred monolithBOT
rugged spire
limber skiff
#

for real

brazen bone
#

Rookie mistake

rugged spire
#

Here you can see my incompetence

charred monolithBOT
rugged spire
limber skiff
#

I wanna try running better discord with vencord now

brazen bone
#

If that is possible to support, that's cool

limber skiff
#

I mean

limber skiff
brazen bone
limber skiff
#

for example I know better discord hooks the push method too

#

because of my commit vencord wont overwrite the better discord hook if it runs after

#

but better discord still overwrites vencord hooks

#

can't control that though

#

horror

rugged spire
grave mangoBOT
# limber skiff https://github.com/Vendicated/Vencord/blob/c996860ce238551d10cbb77cd14dfabb120cc...

**patchWebpack.ts: **Lines 32-34

// The property descriptors in the monkey patches are used to ensure that if anything else (maybe another mod) hooks the same stuff as we do, we don't overwrite their hooks.
// Of course the other mods should also do this, but we can't control that, so lets at least make sure in our end we do it.
const webpackChunkPropertyDescriptor = Object.getOwnPropertyDescriptor(window, WEBPACK_CHUNK);
limber skiff
#

so technicallyyy if someone runs better discord first, then vencord after

rugged spire
#

dumb question but

limber skiff
#

vencord should at least not overwrite the better discord hooks

rugged spire
#

how would you exactly... do that

#

as in specify the order

limber skiff
#

oh

rugged spire
#

inb4 "random"

limber skiff
#

let me show

#

this is in the vencord preload

#

it runs Vencord in the window, then runs the normal discord stuff

rugged spire
#

yop

limber skiff
#

if you want better discord to run first you just need to add the line above the vencord one

rugged spire
#

is that determined usually by which mod you install first?

limber skiff
#

well

#

you can't install both mods

#

because they both overwrite the discord preload

rugged spire
#

so you'd have to inject it manually?

limber skiff
#

I could try installing better discord

rugged spire
#

horror

limber skiff
#

and modifying this

rugged spire
limber skiff
#

to run this after the better discord one

#

webFrame.executeJavaScript(readFileSync(join(__dirname, "renderer.js"), "utf-8"));

#

(the vencord one)

#

in fact I wil try rn

rugged spire
#

thats

brazen bone
rugged spire
#

just cursed

rugged spire
#

@limber skiff Please press 1 if you are being held hostage by DevilBro

limber skiff
#

goodbye

rugged spire
#

Please press 2 if you are about to explode.

limber skiff
#

fuck

#

it cant patch discord dev

#

it will be in canary then

#

installing didnt work

#

nice

rugged spire
#

@limber skiff run bd in vesktop trolley

charred monolithBOT
limber skiff
#

right...

#

can't do anything about it lol

#

it's whatever

brazen bone
#

Sweet

#

What's Shelter btw

limber skiff
#

but I think shelter still works even without my changes

#

I could be wrong but I think it barely touches webpack

#

hmm

#

I could use this

rugged spire
#

Is updating a settings.store value not a setter that calls onChange?

#

it should be IMO

#

would that be considered a bug?

brazen bone
#

Pretty sure that only applies when changing it through the menu

rugged spire
#

You are right

brazen bone
#

Whether it should is a different question

rugged spire
#

True

#

well

#

that explains the undefined behaviour

brazen bone
#

Setting .store.foo does run .use() hooks at least

limber skiff
#

we cy

#

oh

#

interesting

rugged spire
#

so it doesnt even bypass csp

#

lmao

limber skiff
#

nah it worked

#

just their original preload doesnt work

#

but vencord does

#

now I'm gonna try running bd together

#

well the bd loader doesnt work

charred monolithBOT
charred monolithBOT
limber skiff
#

this is way cleaner now

#

before:

charred monolithBOT
limber skiff
#

@cunning canyon what's the difference between TimestampMode NOW and TIME

cunning canyon
limber skiff
#

ohh that's cool

charred monolithBOT
limber skiff
#

Merge Merge Merge

limber skiff
rugged spire
charred monolithBOT
rugged spire
#

me sitting here with my fucked up dev flow where I commit to feature branch, merge to personal stable, then repeat until cozy or i forget about the feature, then i will eventually pr

limber skiff
#

I just use the branch I'm working on as my personal

#

sometimes it's upstream dev

charred monolithBOT
limber skiff
#

sometimes it's another

rugged spire
#

i can tell it is upstream dev

limber skiff
#

wdym?

limber skiff
rugged spire
#

oh

charred monolithBOT
limber skiff
charred monolithBOT
limber skiff
#

hmm

#

I was thinking of that

#

having just != null works soo

charred monolithBOT
rugged spire
#

force push war

limber skiff
#

here goes the force push into dev

charred monolithBOT
limber skiff
#

thanks for pointing it out ven

charred monolithBOT
limber skiff
#

omg lmao

limber skiff
#

@austere talon this is caused by this line, specifically mainWindow

#

do you think maybe reassigning it to a variable could fix?

austere talon
#

how does that error even happen

#

it shouldnt

limber skiff
#

nvm I dont think that can fix, it was just a guess

austere talon
#

Object has been destroyed means like the window was closed

limber skiff
#

yeah

austere talon
#

but i cant repro no matter what i do

#

well it means the window was closed

#

but like

#

how would it be closed?

limber skiff
#

maybe we just do this?

#

I mean if it closes what else can we do 🤷

surreal fiber
#

I've seen many people have the javascript error in timers, not sure if it's always the same position

austere talon
limber skiff
#

I will push this

limber skiff
#

nono

#

it never happend to me either

austere talon
#

waiit

#

it might be macos exclusive?

austere talon
limber skiff
#

nono its windows

#

and also I play roblox this never happened lmao

austere talon
#

well

#

Any help possible? this is making using discord and playing games unbearable, Keeps popping up whenever I open roblox, seems to effect the theme for some reason?

#

why tf does roblox trigger the watchers

limber skiff
#

nono it's not roblox issue

austere talon
#

mm

#

well i think it means that the window is somehow being destroyed?

#

maybe we should add a listener for window created

#

and grab the new one

#

but our pather should already do this

austere talon
limber skiff
#

we already monkey patch the window constructor

#

shouldnt that catch every window?

#

so no need for listener

austere talon
limber skiff
austere talon
#

but still need to remove old listeners

limber skiff
#

ye this will remove the old listeners

charred monolithBOT
austere talon
#

not fully good

#

what if the open() fails?

limber skiff
#

💀

#

I didn't think of that

austere talon
#

quickCssWatcher?.close();

#

oh and

limber skiff
austere talon
#

while youre at it add a .catch(() => {}) to the open()

charred monolithBOT
limber skiff
#

?. is so lovely

#

very good to use

charred monolithBOT
limber skiff
#

you are crazy good at noticing stuff I don't

#

guess what the spike is

lime stone
#

when vencord broke? xd

limber skiff
#

yes lmao

charred monolithBOT
odd heath
charred monolithBOT
#

I would like to have the app icon to be same as Discord's icon. I tried to find in in the source code myself but i didn't succeed.

Maybe if there was an option to upload your own icon for the app to use.
I have no idea how hard it may be to implement, it isn't a app breaking bug so I understand if you don't want to spend amounts of time to implements this.

charred monolithBOT
limber skiff
#

why when I'm always in bed I think of stuff I could have done better

#

like why do I remember the most random code I wrote

austere talon
#

why?

#

lmao what is this

limber skiff
austere talon
#

why dont subscribe to all

limber skiff
#

oh

austere talon
#

im thinking of a case where some action might use settings

limber skiff
#

the subscription is to update the checkmark when quickCss toggle is changed

austere talon
#

for example we might add additional capabilities in the future

limber skiff
#

I only need to subscribe to that setting

austere talon
#

like plugins adding checkboxes

limber skiff
#

I think you are confusing of what the commit changed

austere talon
#

im saying it should sub to all settings in case some toolbox action uses settings

#

like a plugin action

charred monolithBOT
limber skiff
#

well

#

then the action should use the setting hook on its own

#

it makes no difference

#

I added that setting subscription with the context menu changes

#

I just only realized now it was subscribing to everything

#

I wondered if listen together is easily fixable

#

or they fucked it up hard

#

@shy veldt would you know anything about that?

#

or maybe you @median rapids

#

sorry for pingies but you two know everything that happen lmao

austere talon
#

it works for me lol

limber skiff
#

wtf

#

maybe they fixed it?

austere talon
#

im on stable with this experiment enabled

#

i doubt the experiment makes a difference

#

maybe spotify fixed spotify crack?

limber skiff
#

okay yeah they fixed

#

I'm on canary

limber skiff
#

I don't have premium and it works now

#

I don't even think they can fix it

#

discord handles it purely client side I guess

#

spotify only gives the api key for unlimited permissions

austere talon
#

by restricting the permissions of the spotify token

#

to only allow pause and nothing else

#

but that would also break SpotifyControls

#

cause SpotifyControls also uses discords spotify token

limber skiff
#

but how would listen together work then lol

austere talon
#

for non premium users i mean

limber skiff
#

oh

#

hmm I see

austere talon
#

idk why they dont check at all lol

charred monolithBOT
limber skiff
#

shhh keep it like this

austere talon
#

yeah xd

odd heath
#

What class would I even use for that from what i understand discord also just uses fragments

charred monolithBOT
austere talon
#

all of these

#

the h2 is just FormTitle but maybe with custom class

#

use react devtools to look at their code

odd heath
#

it is identical but it does this

#

although for some reason the div class didnt get applied properly but thats fixed now

surreal fiber
#

maybe friends since should be in its own .section

austere talon
#

^

#

it isnt rn

odd heath
#

ooh

charred monolithBOT
charred monolithBOT
austere talon
#

yeah chrome changed them iirc

median rapids
#

and dw blobcatcozy

charred monolithBOT
limber skiff
#

@austere talon btw I think role context menu only exists if you have developer mode to show the button to copy ids

austere talon
#

yes

limber skiff
#

also while you are at it, change the plugin name and add option to copy role color

austere talon
#

true true

limber skiff
#

some people wanted to it

#

what if you patch it to not need the developer mode on

austere talon
#

nop

limber skiff
#

It's difficult isnt it

#

I remember it was bad

#

Ohh yeah

#

can you fix resurrect home readme image for me

#

I couldnt find the assets issueskull

limber skiff
austere talon
#

we could just force enable developerMode

#

findByProps("DeveloperMode").DeveloperMode.updateSetting

brazen bone
#

Why does it require developer mode at all?

limber skiff
#

the context menu doesnt exist without it enabled

#

the button it normally exists is the copy role id button

#

so with it enabled the menu doesnt exist it all

austere talon
#

this is it

#

its used in a few places

#

also copy command id

#

okay removing the check is pain

#

we'd need to patch this and check if label is the localised role label

#

i think just force enabling dev mode is okay

charred monolithBOT
odd heath
#

Force push smh

charred monolithBOT
#

Discord Account

wixonic

What happens when the bug or crash occurs?

The URLs of buttons in the CustomRPC seems to be dropped by Discord when sent, as they're not displayed anymore.

Activities properties seems to have changed for buttons, as my own script doesn't work too.

What is the expected behaviour?

I expect to be able to click on buttons of the activity with or without Vencord

How do you recreate this bug or crash?

  1. Enable CustomRPC
  2. Fill all required, and a...
charred monolithBOT
#

I have the same issue on Arch Linux (with KDE) with vesktop from the aur - I can't seem to reproduce this consistently though, however it happens fairly often and always when Vesktop is minimized or sometimes even when it's merely unfocused.

When regaining focus (or being restored) the discord (re-)loading screen is shown and shortly after I'm thrown back into discord as if it just started

I've been having this issue with any vesktop version as well

Managed to reproduce this on m...

charred monolithBOT
brazen bone
#

The css class hashes are always of the form _[0-9][0-9a-f]{4}|[a-f][0-9a-f]{5}. Wonder why that is.

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 296262
Match: /maxUsers:\i,users:\i.+?=(\i).+?;/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /\i>0(?=&&.{0,60}renderPopout)/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/

MutualGroupDMs (had no effect):
ID: 279286
Match: /(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

limber skiff
#

cool

austere talon
#

they're that way cause that's how the generator makes them

brazen bone
#

Yeah but why isn't it like, always six hex digits

charred monolithBOT
charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 296262
Match: /maxUsers:\i,users:\i.+?=(\i).+?;/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /\i>0(?=&&.{0,60}renderPopout)/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/

MutualGroupDMs (had no effect):
ID: 279286
Match: /(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

ShowHiddenChannels (had no effect):
ID: 296262
Match: /maxUsers:\i,users:\i.+?=(\i).+?;/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /\i>0(?=&&.{0,60}renderPopout)/

ShowHiddenChannels (had no effect):
ID: 296262
Match: /(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/

MutualGroupDMs (had no effect):
ID: 279286
Match: /(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

austere talon
#

evil

#

they bpushed to stabler

#

@limber skiff

#

uhh

limber skiff
#

yeah

austere talon
#

if u want, fix and merge dev into main

#

im gonna sleep now tho so

#

its all you

limber skiff
#

I'm fixing

austere talon
#

might also be good to make another browser release

#

if u do push to main

#

oki bai have fun

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
limber skiff
#

nice

#

I hate this find but there is not anything better

#

there is a new mod pretty much identical to it, and it's also super small with very generic stuff

charred monolithBOT
rugged spire
rugged spire
cunning canyon
#

it is written long time ago

rugged spire
#

it was last touched 5 months ago

austere talon
#

thats from back when installing from source was still the official way to install

#

before we had prebuilds and a http updater

#

it should be updated however

rugged spire
#

oh really

austere talon
#

funny old vencord readme

rugged spire
#

the only reason I even noticed was because I was updating the readme for my personal "stableish-but-not-ready-for-upstream-fork" or whatever to tell my friends to NOT bother y'all

rugged spire
austere talon
#

never check the history of the LICENSE file

rugged spire
#

||The Giant Penis License (GPL)||

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Discord Account

fairwellnoob

What happens when the bug or crash occurs?

The file name is not anonymized

What is the expected behaviour?

The file name is anonymized

How do you recreate this bug or crash?

  1. Create a forum channel
  2. Upload an image on the forum post (the one that is embedded in the forum itself)
  3. Re-download the file to see if its anonymized
  4. File is not anonymized
    ![image](https://github.com/Vendicated/Vencord/assets/79961729/b2e2c00e-d3ee-4968-...
rugged spire
#

i can confirm the RUBBISH I made is working well

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
dusk hill
#

is there some kind of api for toolbar buttons?

spark pivot
#

Look at how vencord toolbox does it

charred monolithBOT
charred monolithBOT
dusk hill
#

is there also a api for message menu ?

charred monolithBOT
spark pivot
brazen bone
#

ViewRaw ironically does not patch the message context menu

spark pivot
#

Same concept

austere talon
placid wave
#

I will do this when I dont have 1727373829 exams

#

you can assign me

#

i will rewrite all of vesktop and still never get contributor

austere talon
#

v+ contributor @placid wave

#

you just had to ask for it

#

horror

placid wave
#

idrc

rare shale
#

horrible idea: for systemwide vesktop keybinds we make a cli helper and then

#

bindsym $mod+Shift+Mod1+Control+l exec "vesktop-cli --mute-also-manti-is-gay"

lime stone
#

--manti=gay

charred monolithBOT
#

Describe the bug

Upon opening the app and clicking on any server, Vesktop crashes, briefly shows the Discord crash screen, then the whole window goes white (except for notifications) and requires a reload to continue. This behavior continues no matter how many times you reload.

It is worth noting that the "white screen" portion sometimes doesn't happen, and it simply stays on the Discord error screen.

To Reproduce

  1. Open Vesktop
  2. Click on a server from the side pan...
charred monolithBOT
grave mangoBOT
austere talon
#

TypeError: Cannot read properties of undefined (reading '461281895557365760')

#

unavailable guild?

limber skiff
#

yeah maybe

austere talon
#

but hmm

limber skiff
#

should wrap that in a error boundary anyways

austere talon
#

then it wouldn't be able to render the role

austere talon
#

we should go through plugins and see which ones don't use error boundaries and fix it

limber skiff
#

yeah but

austere talon
#

we can probably automate it

limber skiff
#

there is a lot...

#

should context menu api use error boundary?

#

I've never thought of that

austere talon
#

find all index.tsx files that contain $self and don't import ErrorBoundary

austere talon
#

and not possible

limber skiff
#

oh

#

true

#

I remember how it works now

austere talon
#

menu api can only use menu items blobcatcozy

limber skiff
#

yeah

austere talon
#

but yeah it's also not needed for things like menus or popups

#

because worst case scenario they will crash the app and crash recovery will recover

#

that's okay imo

brazen bone
#

Yeah if they crash it'll just close the menu

austere talon
#

if it only is rendered after a specific user action and recoverable then it's not necessary

brazen bone
#

It's poor ux and should be fixed asap, but it's not exactly fatal

austere talon
#

it's only necessary when it's always rendered (like spotifycontrols or similar) to prevent crash loops

limber skiff
#

yeah

#

if you wanna like

#

pick half of the plugins and go through

#

I can do the other half later or something

brazen bone
#

Does anyone know what the 23 in s.el("865981").then(s.t.bind(s,"865981",23)) means? It's on some but not all lazy modules

limber skiff
#

oh wtf

#

that's new

#

it's not using the wreq

#

it's using wreq.t

#

I've never noticed that

brazen bone
#

Oh, that's true, didn't even notice that

limber skiff
#

we need to find what it does differently and make our stuff do it

brazen bone
#

Which is... exports.createFakeNamespaceObject = "__webpack_require__.t";?

#

Maybe it's different in rspack, should check that

limber skiff
#

show the definition of t

#

like screenshot the function for me

limber skiff
grave mangoBOT
grave mangoBOT
# livid heath https://github.com/web-infra-dev/rspack/blob/d451d235ccb4eae3b4c457ae7bff05f89ad...

**create_fake_namespace_object.js: **Lines 9-26

__webpack_require__.t = function(value, mode) {
    if(mode & 1) value = this(value);
    if(mode & 8) return value;
    if(typeof value === 'object' && value) {
        if((mode & 4) && value.__esModule) return value;
        if((mode & 16) && typeof value.then === 'function') return value;
    }
    var ns = Object.create(null);
    __webpack_require__.r(ns);
    var def = {};
    leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
    for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
        Object.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return  value[key]; } });
    }
    def['default'] = function() { return value };
    __webpack_require__.d(ns, def);
    return ns;
};
grave mangoBOT
limber skiff
#

it's absolutely lovely how unreadable these methods are

livid heath
#

23 is eerything except 8

#
>>> 23 & 1 == 1
True
>>> 23 & 8 == 8
False
>>> 23 & 2 == 2
True
>>> 23 & 4 == 4
True
>>> 23 & 16 == 16
True
>>>
brazen bone
#

Also mode & 8|1 is clearly a bug, should be mode & (8|1)

livid heath
#

its a comment

brazen bone
#

Though I guess it's just meant as pseudo syntax so whatever

brazen bone
#

Used like this (I think 865981 is the lottie runtime) ```js
async componentDidMount() {
let [animationData, { default: _default }] = await Promise.all([
require.el("432201").then(require.t.bind(require, "432201", 19)),
require.el("865981").then(require.t.bind(require, "865981", 23)),
]);
this._animItem = _default.loadAnimation({
container: this._lottieRef,
renderer: "svg",
loop: true,
autoplay: false,
animationData,
});
}

limber skiff
#

ohh

#

it's probably just a way to load the chunks, require and merge into a return

#

and it seems to be a Lottie related chunk

#

which our reporter ignores

livid heath
#

search for \w\.el\("[\w\d]+?"\).then\(\w\.t\.bind\(\w,"[\w\d]+?",\d+\)\)

limber skiff
#

HORROR

livid heath
#

it works

limber skiff
#

you want to explode my discord with that search

#

I'm not doing it

livid heath
#

nop

limber skiff
#

virus

brazen bone
#

30 matches

livid heath
#

i'm getting way more than 30

brazen bone
#

Huh, weird

livid heath
#

but yeah these are more or less lottie related

limber skiff
livid heath
#

fym not found

brazen bone
#

Oh that's why I only got 30

#

rg --count only counts once per line (aka once per file) unless you use -o

#

With -o it gives 111 matches

livid heath
#

husk just search in devtools

brazen bone
#

I'm not a masochist so no thanks

limber skiff
#

going through the trouble of having to download all the stuff

#

🤷

brazen bone
#

It's really no trouble

limber skiff
#

it really is

#

specially how discord updates so much

livid heath
#

i mean
you do you

limber skiff
#

using devtools is no trouble

odd heath
#

Not sure if known already but canary does not work at all rn

#

Just crashes immediately

limber skiff
#

okay and what is the error?

odd heath
#

Cannot read properties of undefined at object.rolegroupcolor

limber skiff
#

ah

#

disable role color everywhere

brazen bone
#

It's like 8-ish clicks to download it, and then I can browse it with ripgrep, a good formatter, multiple tabs, etc

odd heath
austere talon
#

if the module wasn't required ever it won't be found

livid heath
#

husk

austere talon
#

you can find it manually then require it

#

wreq(findModuleId("emojiTermsImporter:")).emojiTermsImporter

austere talon
# livid heath husk

using non cache isn't possible because then we'd have to require every module which will lead to side effects

#

so you have to manually do it

livid heath
#

yeah fair wnough

austere talon
#

it uses same find as a patch would

brazen bone
#

Or you can use findByProps("getTermsForEmoji"), which wraps that function

austere talon
#

huh?

#

if that module is loaded then the one he wants would also be loaded

#

unless it lazy loads it when you call the function

brazen bone
#

It's... weird ```js
let a0 = new _0.default(function (b0) {
{
let c0 = require("952110").emojiTermsImporter[b0];
return void 0 !== c0 ? c0().then((d0) => d0.default) : Promise.resolve({});
}
});

austere talon
#

oh yeah that's a lazy require

#

so it won't be loaded

brazen bone
#

It's a lazy require but not a lazy chunk, don't see a lot of those

austere talon
#

until you call the func for the first time

#

difference is very simple

#

inline require = lazy require without lazy chunk

inline import() = lazy chunk

#

because inline require is synchronous it can't split the chunk

#

since inline import is async it can split it into a new chunk

brazen bone
#

Makes sense

limber skiff
#

@austere talon can you push an update to role color everywhere to main?

#

it's kinda bad to have the clients crash

turbid hatch
#

@real flower re: flatpak, yeah i dont know either

#

it's something wrong with the main repo (rerunning the build causes the same error) but it's not documented and it's not even in the linter source code

#

so i don't know what the error means and i have no discernable way of fixing it

#

but there was also an appstream error that needs to be fixed so

charred monolithBOT
turbid hatch
#

that is fixed now

#

the other linter issue, no clue lol

#

actually that might not work

#

might have to wait for flathub updater to go "hey there's a new update available for the appstream file"

limber skiff
#

okay so guild object no longer have roles

#

wtf?

austere talon
#

what

#

wtf is that

austere talon
limber skiff
#

in GuildRecordWithRoles

#

wtf they doing

odd heath
real flower
#

yeah i realized after a it more digging how stupid of an error it was

turbid hatch
#

i mean one of them is completely undocumented

#

so

real flower
#

EXACTLY LIKE HOW WhatEven

turbid hatch
#

it wasnt even in the linter source code

#

apparently

austere talon
#

WHAT'S THE POINT

turbid hatch
#

i searched for it on google and the linter's github and it just

austere talon
#

discord is so insane wtf

turbid hatch
#

didnt exist

limber skiff
#

some discord dev is cooking crazy stuff

austere talon
#

hmm

#

so how tf we we get roles now??

#

there has to be some way

#

ofc we could always patch but id rather not if it's not needed

#

btw there are more than just rce that use roles

limber skiff
#

g is roles

#

m is guilds

#

haha CRAZY

#

stable guildstore doesnt even have those methods

real flower
#

why would it exist

#

why would they have good documentation

austere talon
#

what is the point of that

limber skiff
#

stupidity

#

I'm pushing errorboundary fix

austere talon
#

imo just add error boundary for now and we can fix it if they push it to stable

limber skiff
#

but waiting for stable push to fix the other shit

#

yeah

austere talon
#

ya

#

there are more plugins that use it

#

search for .roles

limber skiff
#

I'm gonna do a fake lazy find which checks for getAllGuildsRoles

#

so when stable dont fail for it, we fix it

limber skiff
limber skiff
#

eh

#

nvm

#

it was for the reporter to warn us when they push that stuff to stable

#

but it's whatever

austere talon
#

we'll notice it sooner than reporter xd

limber skiff
#

yeah prob

#

horror

charred monolithBOT
limber skiff
#

bad commit name

charred monolithBOT
limber skiff
#

I love how it's always after an extension bump

charred monolithBOT
charred monolithBOT
lime stone
rare shale
#

whar

lime stone
#

i thought i was looking at go code

rare shale
#

bruh

#

no

#

for like 1 hour straight we were trying to get mf ipc working between the two instances

lime stone
#

wait global keybinds, cool

rare shale
#

yeah

#

wtf did you think we were trying to do

lime stone
#

rewrite vesktop in go

rare shale
#

horrible

#

no

charred monolithBOT
austere talon
#

did they revert @limber skiff

limber skiff
austere talon
#

oh

charred monolithBOT
frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Describe the bug

Vesktop is spawning countless WMIC processes that are for some reason attempting to scan all running processes and save the results as a CSV file. The exact command line is 'C:\Windows\system32\cmd.exe /d /s /c "wmic process get ProcessID,ExecutablePath /format:csv"' Upon killing enough of the rampant processes, I received an update notification, so I'm assuming it's something awry in the update check procedure.

To Reproduce

Starting Vencord and letting ...

#

I didn't notice that the "Failed to connect to arRPC" message wasn't showing up. It's acting fine after restarting Windows.

I also found a number of event logs under WMI-Activity that would indicate that these WMIC queries were running for 20 minutes in an idle state ("PossibleCause = Throttling Idle Tasks, refer to CIMOM regkey: ArbTaskMaxIdle"), so I wonder if some weird problem was holding up the query, but the arRPC component assumed that the query failed, so it ran another one? I'm g...

rugged spire
rugged spire
#

when

#

when the fuck

#

tell me

rugged spire
#

why though

#

sound effects would trigger it?

charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Discord Account

taf1337

What happens when the bug or crash occurs?

The listen along session never starts. It's basically a "spinner" that goes on forever but never syncs. This is without any plugins related to spotify enabled as well. Reproducable with the Spotify plugin enabled too.

I removed Vencord to ensure something wasen't broken on Discord's side and it worked as expected.

What is the expected behaviour?

I can listen along to someone else/invite someone else to list...

fleet depot
lime stone
rugged spire
#

fucking github users

charred monolithBOT
#

This PR adds a card at the top of CustomRPC settings that tells the user that their custom RPC won't be visible if their game activity isn't enabled, with a button to quickly enable it.
Here's a recording of the feature in action:
Vesktop_U3CmFe3Xsv
and here's a screenshot of the card itself:
![Vesktop_y1csRlCxti](https://github.com/Vendicated/Vencord/assets/75569739/71bd6e67-5d7a-4cfe-8f4d-300d...

charred monolithBOT
charred monolithBOT
#

@lewisakura Sorry to bother, but I decided to try the native .rpm package just to test, and it's actually working perfectly fine. Since I'm using the same driver for Nvidia (550.54.14) it has to be something specific to the flatpak, and not the driver.

I would continue to use the .rpm or AppImage (which I also tested and also works fine), however I would not get updates automatically like I would with the flatpak as far as I can tell.

charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Describe the bug

When trying to open any server, Vesktop crashes.

To Reproduce

  1. Open Vesktop
  2. Try to open any server
  3. Crash

Expected behavior

No crash occurs

Screenshots

image

Desktop (please complete the following information):

  • OS/Distro: EndeavourOS
  • Desktop Environment (linux only): dwm
  • Version: 6.4

Command line output

...

charred monolithBOT
charred monolithBOT
#

All you gave is a task manager screenshot, without knowing how many plugins you have on for each app, or if you have a theme

a lot of factors can actually have an influence on performance, like right now I opened task manager with the exact same config on both vesktop and the official app, and the official app uses more RAM

#

if you actually want to report memory usage and have it be meaningful, you need to share as much info as possible, and check the memory profile

in any case, vesktop makes no attempt at using less memory than the official Discord app. that is not possible, because they both use the same web app (discord.com/app). their usage will be fairly similar, with vesktop usually using slightly less.

charred monolithBOT
charred monolithBOT
junior olive
#

^ this works fine with the current worker too, I just need this changing so I can switch

limber skiff
#

you are paying with your own money for that? @junior olive

junior olive
limber skiff
#

oh nice

junior olive
#

Ideally I cut the cost though

limber skiff
#

🙏 at least you got some help

junior olive
#

Yup I'm grateful

austere talon
#

didn't i raise concerns about that before the plugin was even made

#

that's why fully selfhosting is still really good

#

reviewdb gets a shit ton of requests too but it's all handled by our go server blobcatcozy

charred monolithBOT
limber skiff
#

and it's the free tier

junior olive
austere talon
#

how much storage does it use

junior olive
#

regardless i can get the cost down by this means its not a difficult change

dusk blaze
austere talon
#

then i switch to a different server

junior olive
austere talon
#

not a big deal

dusk blaze
#

or does it let you make other servers

austere talon
#

that's what i do for vencord badges

junior olive
#

once this change is merged i can just switch to r2 public access and boom costs gone (with cache and evrything)

austere talon
austere talon
#

will merge tomorrow

junior olive
#

well yes

#

thanks

#

it's not a big change either if you haven't already looked

frail skyBOT
#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

None

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

charred monolithBOT
charred monolithBOT
limber skiff
#

@austere talon made this quick thing to find everything which isnt using errorboundary

for (const pluginName in plugins) {
    const plugin = plugins[pluginName];

    for (const prop in plugin) {
        const value = plugin[prop];
        if (value == null) continue;

        const valueStr = value.toString();
        if (valueStr.includes("VencordCreateElement") && !valueStr.includes("ErrorBoundary")) {
            console.log("plugin:", pluginName, "prop:", prop, "=", value);
        }
    }
}
#

some false positives but we can just ignore them

#

better than search for every manually

charred monolithBOT
charred monolithBOT
charred monolithBOT
#

Content

Description

Deleting media with MessageLogger enabled doesn't show any indication that the media was deleted even when it was.

More info (with video): #🏥-vencord-support-🏥 message

Expected behaviour

I expect Vencord to still show the deleted media, but greyed out like in a normal logged deleted message.
I also expect to be able to toggle the deleted highlight and remove the message history through the ri...

rugged spire
#

Have the webhooks for the other related projects been moved yet?

charred monolithBOT
rugged spire
#

Guess that answers my question

#

(no)

brazen bone
#

Those star messages are kinda annoying imo

rugged spire
rugged spire
still wasp
brazen bone
#

The pr hooks are nice though

rugged spire
#

Yeah

#

reminds me

#

did i ever submit that pr

#

to vesktop

#

Nope

charred monolithBOT
nimble crag
rugged spire
#

channel tabs be like

#

i mean discord itself is the reason its so fucking slow

#

but it is like 10x more noticable using channeltabs husk

brazen bone
#

I don't know what that is but it sure doesn't look good

analog knoll
#

Is vesktop supposed to run into a runtime error when there's no internet connection on startup?

rugged spire
#

i mean this is not using channeltabs (discord's shitcode still makes it lag 400-600ms)

analog knoll
# rugged spire I think so?

Hm. Perhaps it would be nice if it didn't.. I'll look into it today. We could put shiggy under a tap water image there - just a proposal

jagged reef
rugged spire
analog knoll
rugged spire
#

not an unrealistic situation

analog knoll
#

Hm. That's fair. Even more reasons for it to not crash. I am sure the first thing you want to see when you open a laptop is a Vesktop runtime error splashed on your screen. I would rather see a wet silly shiggy splashed there instead with a retry button or something.

rugged spire
#

this is one of those cases

woeful sable
woeful sable
#

internet also tends to connect while entering password for me

#

but i think i enter it a bit too quick since my internet doesnt get connected until like 2s after i unlock

#

(also wasn't talking in this channel locked to a specific role before or something)

austere talon
#

that's the update check

#

actually it shouldn't be

charred monolithBOT
analog knoll
austere talon
#

i honestly don't know what it is

analog knoll
#

Well, it probably is, but I though it was trying to access discord api not vesktop

austere talon
#

there shouldn't be a request that can fail

#

unless there's a bug and it downloads all vencord files every time you open it

#

ill debug

woeful sable
#

Wouldn't replicating discord's functionality when theres no internet be fine?

analog knoll
#

What's the behaviour?

woeful sable
#

it just has a timer which retrys, and adds up exponentially

#

u can try it urself rn just disable internet and open a discord client

austere talon
woeful sable
#

does it just crash?

analog knoll
charred monolithBOT
analog knoll
#

Bruh, quick question - I see that we've got prettier inside of the vesktop repo. I ran prettier -fix and it fixed most of the files. Is there something wrong with prettier reading that file or has anyone never ran it

#

For instance I was doing some work on src/main/utils/http.ts and this file in particular it formatted a lot. Could anyone check if that's indeed the case

#

Nevermind, my bad

analog knoll
#

I'll just handle the possible undefines now husk

austere talon
#

this makes sense but i don't like the way you solved it

#

you should be able to differentiate between an error during dns lookup / connection (request fails, aka Internet no work) and http error (request succeeded but responded 404/etc)

#

and in the former case it should retry until it works

rugged spire
#

@austere talon can i scare you with a disgusting no good horribly inefficient idea I had

austere talon
rugged spire
#

what if i inject css to set heights and offsets and similar but dynamicslly load the css classes using findByPropsLazy
i should just be using parent selectors shouldn't I

brazen bone
#

Uh, that sentence makes no sense

rugged spire
#

i already hack in some always resolving parent selectors anyway to prioritize my custom css rules

brazen bone
#

What's the context

austere talon
#

btw we should look into switching to the fetch api anyway

#

i think our electron version has it

rugged spire
rugged spire
#

I probably sound crazy

rugged spire
#

those are also common enough to need to be handled too

austere talon
#

?

#

github is never gonna have ssl errors

#

but that would fall under the first category

rugged spire
#

are you talking about the loading splash screen still

rugged spire
charred monolithBOT
analog knoll
austere talon
#

don't bother checking what it is

austere talon
rugged spire
#

horror

analog knoll
#

@austere talon does discord have a hard cap on the backoff? like 100 seconds or something

austere talon
#

don't hack more on the https.get

austere talon
analog knoll
#

Alright this should be good

#

I limited it at 5 retries, but perhaps that's not even needed because of the backoff now is it

livid heath
#

why not just reject(err) atleast you'll get the extra props set on err when catch-ing, as opposed to new Error

charred monolithBOT
#

This Pull Request introduces the addition of Third-Party resources. This tab will contain the following resources:

  • Third-Party Plugins
  • JavaScript Snippets
  • CSS Snippets

It includes filters allowing you to sort by Desktop/Web or search by name, author, and description.

To add plugins, you would create a .json file in src/content/third-party, structured as follows:

{
    "name": "Album as Spotify Controls Background",
    "description": "Use album cover as SpotifyCon...
analog knoll
charred monolithBOT
austere talon
#

bro when is discord gonna push the role change to stable

#

its been days

turbid hatch
#

i'd just write the fix now and do the thing we did before where we make it work on both

#

until it's pushed to stable

#

then remove the old code

austere talon
#

messy

charred monolithBOT
brazen bone
#

They did something so roles are no longer in GuildStore, I think

livid heath
#

husk

shy veldt
#

its weekend

brazen bone
#

2 days is plural

shy veldt
#

wait for monday

#

wow
insane

charred monolithBOT