#๐Ÿ‘พ-core-development

1 messages ยท Page 153 of 1

austere talon
#

implemented in browser/VencordNativeStub.ts

turbid hatch
#

ty

thick kestrel
#

funi stubs

turbid hatch
#

ahahaha

#

yeah

grave mangoBOT
turbid hatch
#

this is me not updating the stubs

austere talon
#

this needs updating

turbid hatch
#

so its got the wrong data format

#

i need to update them

austere talon
#

we likely also need to migrate old stored values

turbid hatch
#

usercss doesnt work on web anyway - use stylus for that

#

we cant run the compilers

thick kestrel
turbid hatch
austere talon
#

i would say make usercss desktop only

#

its useless on web

turbid hatch
#

we cant bundle the compilers cause they're fat

#

and usercss is being taken from a browser extension

#

so just use the extension

#

xd

austere talon
#

i mean we absolutely can bundle them but its useless cause like... just install stylus

turbid hatch
#

ye

austere talon
#

why use vencord for it when u can have the real deal

thick kestrel
#

I mean... yeah ig lol

turbid hatch
#

the only thing vencord has an advantage over stylus with is @vc-requiredPlugins

#

since it flags up a warning on the theme card if you dont have a plugin enabled

#

but that's it

#

it's basically just a worser implementation of usercss

#

than the ext

austere talon
#

is there even any way to do this

#

i dont think flatpaks have the power to restart themselves

turbid hatch
#

@thick kestrel can you pull and rebuild

#

see if it fixes it

thick kestrel
#

sure

placid wave
#

instead of exec

turbid hatch
placid wave
#

run vencord as a child process

austere talon
#

too complicated

placid wave
#

then if it exits with a specific exit code

#

it runs it again

#

steam client does that

austere talon
#

actually thats doable

#

mm

turbid hatch
#

the official response is either what aa just suggested or tell people to restart

austere talon
#

not a bad idea what aa said

thick kestrel
# thick kestrel sure

wait, you have the current version in your personal fork... I got it from the main repo

turbid hatch
#

we already have to write a wrapper

turbid hatch
#

wrong

#

the branch was originally in my fork

#

before i had contrib rights xd

placid wave
#

btw

turbid hatch
placid wave
#

@austere talon

#

insane vulkan error happens literally everywhere

#

it means nothing

#

it even happens on steamos

turbid hatch
#

lmfao

#

amazing

placid wave
#

idk why

#

wait dose it break screensharer

charred monolithBOT
austere talon
placid wave
#

its happening on steamos

#

which has a driveer

thick kestrel
#

yeah it works now

charred monolithBOT
placid wave
#

anyway encoding works

#

so that user had a different kind of skill issue

austere talon
#

INSANE

#

least discussed vesktop issue

placid wave
#

@austere talon@austere talonbomb

#

venmic broke again

#

on steamos appimagem

#

maybe works in shitpak

#

OH

#

right

#

you said it was broken

#

im fucking stupid

austere talon
placid wave
#

igjore

austere talon
placid wave
#

c++ library too old in appimage or some shit

#

idc

#

should work in shitpak

austere talon
#

oh right

#

yeah only flatpakker

placid wave
#

yop

#

LMAOOO it shows yomih as "Godot Engine" in the audio list

#

works

#

love

#

oh god

#

i think the sound is delayed a tad

#

its delayed

#

like 0.4s

#

@austere talon HORROR

austere talon
#

r u using bluetooth headphones

placid wave
#

no

#

might be firefox thing lemme try jrome

#

drome wont even load the screenshare

#

rtc connecting

#

we love jrome

turbid hatch
#

oh @austere talon usercss doesnt work in web anyway, im fairly certain most of it gets shaken out

#

well, a decent amount

#

compilers obviously will never get loaded since usercss is behind a !IS_WEB || "armcord" in window guard

placid wave
#

good news

#

firefox bug

#

lmaoo

turbid hatch
#

lmfdao

placid wave
#

yeah it syncs in chrome

#

we looove firefox webrtc

#

so good

#

very sane implementation

austere talon
#

anyway blobcatcozy

#

If you are auto-disabled, then you are also disabled.

#

thanks discord

turbid hatch
#

@crystal walrus how has usercss been for you btw

#

alright i sleep

austere talon
#

ayy i also fixed the being muted every launch

#
{
    find: '"MediaEngineStore"',
    replacement: {
        // eslint-disable-next-line no-useless-escape
        match: /=\i\.supports\(\i\.Features.AUTO_ENABLE\)/,
        replace: "=true"
    }
}
turbid hatch
#

// eslint-disable-next-line no-useless-escape
kill

austere talon
#

cant

#

we dont have patched eslint in vesktop

#

and im lazy

turbid hatch
#

ah

#

ill copy it later

austere talon
#

mm it doesnt work

#

ig theres more to it

#

wait now it worked?

#

nvm

turbid hatch
#

sleep vee

#

is late

#

early?

#

one of the two

charred monolithBOT
austere talon
#

i wanna make a release soon and dont want the broken start minimised implementation in it

foggy basin
#

this is /usr

austere talon
#

actually let me just revert the commit for now

foggy basin
#

also hi i appeared

#

hey can you pass this message to them for me
nix-env jumpscare

charred monolithBOT
#
[Vencord/Vesktop] branch deleted: revert-248-main
turbid hatch
austere talon
#

thatss ok i figured

#

just reverted it for now

turbid hatch
#

alr

#

oh thisll be exciting

#

appstream autogen for the first time

#

lets go

austere talon
#

what now

#

im not releasing yet...

turbid hatch
#

when you release silly

charred monolithBOT
foggy basin
winter jungle
#

so what's the point of a virtmic if sinks are added to the voice engine device itself?

#

i have it setup like this and it appears to be working?

#

yeah it is working

winter jungle
#

i meant chromium input in the screenshot

#

when i start a screenshare with audio two inputs are added

#

so there's no point in a virtmic

austere talon
#

there is

winter jungle
#

oh

austere talon
#

chromium can't record arbitrary sources, only microphones

winter jungle
#

oh i didn't know that

#

when i just routed the source itself and hooked up the monitor to my headphones i heard sound

austere talon
#

try it yourself, run await navigator.mediaDevices.enumerateDevices() in devtools and see what it returns

winter jungle
#

also the stream should be stereo, yes?

#

tested it, no it is not

#

unfortunate

#

welp nevermind

#

not possible

#

what about vencord on the discord app, not possible to implement the virtmic and sink addition?

#

others have probably asked this question before, sorries

austere talon
#

yes it's possible

#

but very hard

#

and crippled by discord being silly

winter jungle
#

hopefully someday, I believe in you!

#

stereo streams would be perfect

granite vessel
#

does anyone know how to get all servers the current user is in

#

like a list

austere talon
#

search for keywords that you think might help

granite vessel
#

i cant find docs though

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
turbid hatch
#

hm?

#

heh no worries

#

hopefully it'll be merged soon ๐Ÿ™

turbid hatch
#

oh exporting settings?

#

i seeee

#

okay

#

i can implement that

charred monolithBOT
#

@Vendicated

you should use Vencord's notification api instead of making your own
if you want additional features, edit it to add them; but the first two options you state are already native features and the opacity can easily be done with css

Just adding on this after some further deliberation on the best way to handle this following your suggestion, I did some work locally on improving Vencord's notification API to support the features that I need for this plugin howev...

turbid hatch
#

will this work

#

hm

#

hm?

#

can you show me what you mean

#

oo i see

#

let me take a look

#

i wonder do we actually have those

#

probs

#

just need to find it

#

where'd you get these from

#

just so i can grab them myself

#

ty

#

they look close enough to discord's icon set so

bleak gyro
turbid hatch
#

@crystal walrus

#

fire

#

pushed

#

you can edit the json manually to cause invalid settings but it just makes it fail validation so in the end nothing actually breaks

#

it just doesnt parse certain stuff

#

if you add extra settings or remove stuff it'll ignore it too

#

so you can make tiny settings snippets if you want

#

for example

#

{"numberVar":"10","selectArrayVar":"Arial"}

#

also you might like this

#

@vc-requiredPlugins ThemeAttributes

#

it used to just be a warning but ive made it a proper error now

#

it wont disable themes already enabled if you turn off the plugin, but it'll prevent you from enabling/disabling them until you fix it

#

also added vencord variable during compilation

#

so you can do if vencord { } stuff in less and stylus

#

less useful in uso and default css

#

but i hope client mods adopt it xd

charred monolithBOT
austere talon
#

make save to file

#

and load from file

#

like settings sync

turbid hatch
#

for theme settings?

#

it seems a little overkill

faint echo
#

I'd do both

turbid hatch
#

these are just to share settings between people mainly, they're already synchronised through the settings sync feature

austere talon
#

ohh

#

ok

crude hearth
#

@austere talon I cant even talk in fork channel inane

austere talon
#

yop

crude hearth
#

giive perm

charred monolithBOT
turbid hatch
#

make sure to keep issue reports coming if you experience anything

austere talon
#

kid named dude: neko_R_What

charred monolithBOT
charred monolithBOT
keen blaze
#

cool

#

tbanksu

#

:3

charred monolithBOT
valid whale
#

@valid whale

thick kestrel
#

@turbid hatch wanted to test your usercss on Vesktop, it broke for me in the same way as web before lol

#

the error is in the same place

turbid hatch
#

er

thick kestrel
turbid hatch
#

thats weird

#

because all of my development has been on vesktop

thick kestrel
#

I have no idea lmao

turbid hatch
#

can you set a breakpoint there and check

#

what content is

thick kestrel
#

sure

turbid hatch
#

and filename

thick kestrel
#

content is undefined lol

#

I think I should consider a career as a software tester

#

I just look at some code wrong and it breaks

charred monolithBOT
verbal pumice
#

pr's that have likely been abandoned (no update since rspack and either have unresolved reviews or were obviously broken by it)
open: #1728 #1721 #1719 #1573 #1452 #1324 #971 #966 #947 #534
draft: #1348 #1563 #1773 #1114(could def be brought back as the issue making it a draft was fixed) #696(is this still happening?) #553
doesn't include prs that are waiting for a review

#

might group all prs into abandoned and waiting for review tmr if i have the motivation

austere talon
#

thats helpful thanks

#

will likely close most of these to tidy up prs a little and make it more manageable again (they can still be reopened if the author wants to update them)

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
#

@austere talon maybe we should publish to chrome

#

it's pretty outdated rn

charred monolithBOT
#

Discord Account

kyuuhachi

What happens when the bug or crash occurs?

Toolbox actions are present in the Vencord Toolbox regardless of whether the owning plugin is enabled or not.

What is the expected behaviour?

They should only be present if the plugin is enabled.

How do you recreate this bug or crash?

Define a tiny plugin with a toolbox action:

import definePlugin from "@utils/types";

export default definePlugin({
    name: "0_Example",
    description: "S...
obsidian timber
#

im so happy i got vencord

charred monolithBOT
placid wave
austere talon
#

what the hell is that nickname

placid wave
#

sanest discord user

austere talon
#

reminds me of me trying to download russian music and windows or whatever ruining the encoding so it's just gibberish

placid wave
#

LOL

#

you love iso whatever

keen blaze
#

hai @austere talon

placid wave
#

thanks

keen blaze
#

@placid hinge wuts that username lmao

charred monolithBOT
charred monolithBOT
charred monolithBOT
hollow slate
#

uh hello

#

i saw the plugin review db that was removed from vencord because of harassing and Vendicated requested the owners to add a feature so that users can remove reviews from their own profile and looks like the owners were not interested

#

well, i was just looking through the ReviewDB code and i found that its really simple to add that feature

#

its like one more line in a codeblock

#

i wanted to check if the api hosted by the owner is still working

#

and it does

verbal pumice
#

the api wont just let you delete reviews even if you add the button

#

otherwise that would've been done a good while ago

hollow slate
#

oh

#

maybe i can try to fix the api if @crude hearth shares the code

crude hearth
#

its not really hard I just didnt want

hollow slate
#

oh

#

well

#

do you mind if i recreate the api from scratch and use the same reviewDB plugin code?

crude hearth
#

I honestly dont know

#

api is also open source

hollow slate
#

oh it is?

crude hearth
#

but there is a possibility that I will add the feature and readd to vencord (if ven agrees)

#

I just dont want to mess with moderation atm because of universrity

hollow slate
#

welp

#

understandable

crude hearth
#

also I will be totally honest

#

I dont really like someone rehosting the plugin/backend/idea at least I created

hollow slate
#

its alright, totally understandable

#

i was just bored and i wanted to try something new

crude hearth
#

yeah understandable

charred monolithBOT
#

If you resize a captured window, it will freeze the screen-share, but audio still plays. However, this only happens when using the "windows" option in the screen-share; capturing a full monitor/desktop does not freeze the screen-share when resizing a window.

example

There's an open issue on discord-screenaudio as well, which I assume your implem...

charred monolithBOT
charred monolithBOT
hollow slate
#

h

#

is there any function for plugins to open a private channel but with no user id

#

i mea, i dont want to open up a dm with a user

#

just an empty private channel

turbid hatch
#

no

#

what purpose do you have for that anyway

livid heath
#

an alternative would be to create a gc with just yourself

#

but thats unrelated to vencord dev

hollow slate
#

yeah.....

#

alright

#

ty

soft dove
#

is there a way i could use the vencord dev cli installer with sudo on wayland?

weak thistle
#

why the fuck would you want to do that

#

also you'd be patching the discord installed to the root account

soft dove
austere talon
#

you can use the gui on wayland too

soft dove
#

it downloads the x11 installer even though i am on wayland

livid heath
#

yeah it appears so

grave mangoBOT
soft dove
#

if i run it without sudo it gets the wayland one

#

but with sudo it downloads the x11 one because sudo messes with wayland display stuff

verbal pumice
#

i believe the regular installer allows setting an enviorment variable to set a custom vencord source location maybe try that?

austere talon
#

you need to forward environment variables.

#

sudo -E pnpm inject

soft dove
austere talon
#

stop using that horrid image host please, so much wasted space

#

"BSY" close whatever is still running the binary

soft dove
#

sorry ><

soft dove
#

tyy it worked <3

charred monolithBOT
charred monolithBOT
fair linden
#

hey is it possible to add third party plugins to the browser extension for chromium??

verbal pumice
#

build vencord with pnpm buildWeb

#

assuming you already have the whole third party plugin thing done

fair linden
real zenith
#

ok how the fuck is vencord so compiler-powered

#

what black magic is going on there

austere talon
#

LOL

#

what did u discover

real zenith
#

nothing really, I've just been messing around with the code a big

verbal pumice
#

insert plugin native shenanigans

charred monolithBOT
real zenith
#

.. oh yeah all I did like a week ago (I tried overriding vencord stuff) was create a crappy plugin loader cause I hate having to manually recompile vencord hih

#

is it cursed? yes

#

does it (barely) work? yes thocc

charred monolithBOT
turbid hatch
# real zenith what black magic is going on there

mostly just working out what plugins need and automagically generating the code for it internally when compiling so that the developer doesnt have to do anything, which is also why writing an external plugin loader sucks :p

charred monolithBOT
brazen bone
#

Is it possible to have find: be a regex? I'm trying to match /'\{"use strict";\w+\.exports=\{(\w+:"\w+",?)*\}/, or in other words all modules that define class names

austere talon
#

no

#

just use .exports={

#

you can set noWarn to true to avoid warns for unmatched modules

brazen bone
#

So basically match way more than I actually need?

#

Good enough I guess

#

Does it patch all modules that contain the substring or only the first?

turbid hatch
# charred monolith

re: it looks fine to me, and channeltabs has been open and maintained for a long time now

#

i think its time to give the people what they want

#

(also i desperately want it xd)

thick kestrel
#

lol the ChannelTabs thing looks incredibly funny

turbid hatch
#

i mean its basically just tabbed discord

#

xd

pastel belfry
#

is it possible to add a vencord plugin that allows you to set a folder for audio events (or can i make one and send it in for review)

#

i feel like that specifically would be fairly easy to implement with respect to futureproofing, as all you would need to do is change a relative path

charred monolithBOT
brazen bone
#

Unfortunately it seems changing all class-definition modules from exports={foo:"foo_123456", ...} to exports={foo:"foo foo_123456", ...} causes a bunch of crashes

#

Too bad, would have made styling significantly easier (and possibly more performant)

thick kestrel
#

worst case it doesn't get merged

pastel belfry
#

there seems to already be one

#

that didn't get merged

#

so i'll hop on that one

#

surely vencord development isn't terrible to set up

thick kestrel
#

it's pretty easy even if you don't normally do JS (I don't)

#

if you do I imagine you'll feel right at home

pastel belfry
#

eh, i dont all the time but i know JS enough to make do

thick kestrel
#

though there seems to be an ongoing war between Node developers as for which build system is best

pastel belfry
#

yeah

thick kestrel
#

Vencord uses pnpm, I've seen yarn and npm used before

#

also something else but I forgot the name

pastel belfry
#

i tend to use npm

#

just because it's what i was taught

brazen bone
#

I've never made anything large enough in js to need any package manager :/

#

Just <script src="cdn link">

pastel belfry
#

tbh, pretty much same, but still learning how to use it is very valuable

#

just from a "i will probably need this in the future" stance

#

oh

thick kestrel
#

is plugin CSS really imported over QuickCSS...?

#

is it a bug?

#

(should I open an issue about this?)

brazen bone
#

Looks like normal css specificity shenanigans

#

If reordering the stylesheets does indeed give quickcss priority, that sounds like a good improvement to me

thick kestrel
#

that's how it is currently

#

ordering it like this fixes the issue

austere talon
#

they are on desktop

#

if they aren't on userscript / browser then that's a bug

thick kestrel
#

ok so it is a bug

brazen bone
#

I get that order too, on userscript

thick kestrel
#

ok so I tested on Chromium (I initially suspected browser differences)

#

the extension imports CSS straight from it's resources

#

and that makes it have the correct order

#

the userscript adds the whole CSS as a node (since well, how else would you accomplish this, userscripts can't have resources) and the way it does that messes something up

austere talon
#

it's just race condition

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

thick kestrel
#

I made some new CSS for the ChannelTabs plugin, so it can be easily adjusted for a compact layout as well (sizes taken from Firefox). should I suggest it in the MR when it's done?

#

Discord crops the preview weirdly, huh

#

also found a bug - the folder icon is black when using dark theme

#

also, it'd be cool to be able to open a new tab by middleclicking on the empty area

thick kestrel
#

it kinda makes sense to have this I think

charred monolithBOT
#

This issue is universal to wayland on multiGPU systems I've found, everything is affected. OBS, all screen recording applications, any share of windows. If it exists across two GPUs and requires encoding to be done you will suffer.

Not sure of the cause but typically linear memory formats are utilized to blit an image across multiple GPUs however something even stranger is going on here as it comes with a performance penalty but should NOT be this slow, this is a HARD choke somewhere on th...

charred monolithBOT
charred monolithBOT
charred monolithBOT
real zenith
charred monolithBOT
charred monolithBOT
charred monolithBOT
green ermine
#

anyone have a badges plugin

charred monolithBOT
dusk blaze
#

oh and for badges

#

you can sponsor ven for 5$ or more

charred monolithBOT
charred monolithBOT
still wasp
#

#1185327646415003658 message if i did a pr would this plugin get merged potentially? ive never published a plugin before so idk how it works lmao

tawny cipher
#

p sure lumap pr'd this but declined and turned into console snippet

austere talon
#

it could be made part of emote cloner

still wasp
olive aurora
#

PowerToys CropAndLock

charred monolithBOT
long stream
#

i hate git so much

austere talon
#

it's quite shrimply once u get used to it

#

but pain at the start

brazen bone
#

Eventually you'll figure out which subset of commands is less likely to break things

austere talon
limber skiff
#

maybe we should have a whitelist and blacklist thing plugins can use

#

for channels guilds and users

#

it would make the setting component automatically

#

and could potentially add context menus too

austere talon
#

true

limber skiff
#

and of course it would be better than just some id inputs ๐Ÿ˜‚

austere talon
#

one combined context menu

limber skiff
#

yeah

#

all you would do is tell your settings to use it, and tell which to enable

austere talon
#

Whitelist
[ ] Plugin1
[ ] Plugin2
Blacklist

long stream
limber skiff
#

nah

#

better than that

#

a proper selector for guilds and channels

#

and users

#

not just manual id inputs as I said

#

lots of plugins could benefit from it

long stream
austere talon
limber skiff
#

tbf the ui shouldnt be too hard

austere talon
#

eh kinda

#

optimally you'd want search and stuff

#

and good luck with making the user search

#

cache will fuck you over and people will complain they can't find their friend xd

limber skiff
#

oh yeah I think everything but user search

#

cuz the rest is all cached

charred monolithBOT
austere talon
#

i really wanna lock that thread

#

nothing productive being commented

mortal fractal
#

you should because its not something we can reasonably fix unless someone wants to spend hours making vesktop not use the web media engine, whether it be making own media engine or mangling the normal desktop media engine to not need discord_voice

#

web media engine is so negelected and the packet order bug shows that it is

#

i do think theres something with webrtc that is bottlenecking here

charred monolithBOT
#

this is only a problem with the flatpak it works fine for me with the appimage

This sounds more like a flatpak permissions issue since this happened to me when i started storing my stuff in a external drive, remember that flatpak apps will just have access to default public home folders like Downloads, Pictures, Music and Videos; this means that Vesktop (as a flatpak app) wont be able to access anything else but these folders (unless you attach the file manually using the plus button in ...

charred monolithBOT
charred monolithBOT
charred monolithBOT
turbid hatch
#

oh this is a bug in theme loader itself

#

ill fix it

turbid hatch
#

shit

#

didnt see it wasnt based on dev

#

god damnit

#

fucking mobile

#

ugh

#

now i gotta

#

fack

#

@austere talon can you turn off branch protection temporarily

#

i need to force push main to fix my error

austere talon
#

?

#

why

#

you cannot force push to main

turbid hatch
#

yes'

#

i need to remove a commit

#

and move it to dev

#

hence why i am asking you to remove branch protection temporarily

#

:p

austere talon
#

you cannot

turbid hatch
#

then how do you want me to fix it

#

revert?

austere talon
#

you dont

turbid hatch
#

what

austere talon
#

what is there to fix

#

leave it there

turbid hatch
#

the

#

its on the wrong branch

#

i mean i guess i can leave it there

austere talon
#

how do you expect to be able to force push to main

#

it will break everyone's updater

#

just leave it there it doesnt matter

turbid hatch
#

mkay

#

now i gotta fix my repo

#

ez fix

#

git fetch origin git reset --hard origin/{main,dev}

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

turbid hatch
#

@crystal walrus should be "fixed" on the fork, it'll disable the themes that are invalid after complaining once

jaunty junco
#

are vencord plugins run in web context or node

turbid hatch
#

web, but can expose natives

jaunty junco
#

i'm trying to make a plugin that allows controlling discord via HTTP endpoints

#

so essentially a http server that is always running

jaunty junco
turbid hatch
#

you want to run a http server in the browser?

jaunty junco
#

nah i know you can't do that in the browser

#

on the desktop app

turbid hatch
#

you'd have to use IPC for that

#

you can't use node modules in plugins

jaunty junco
#

okay!

#

got an example?

turbid hatch
#

well your specific use case requires native -> renderer, which is unusual

jaunty junco
#

ipc as in the electron apis?

turbid hatch
#

yeah

jaunty junco
#

so i have inject code into the asar then

turbid hatch
#

no, we already have a natives system

jaunty junco
#

dont think your plugin apis support that

turbid hatch
#

we have stuff we have to do over IPC

jaunty junco
#

where do i add the native code in another file?

turbid hatch
#

the plugin IPC stuff i think only goes renderer -> native (callbacks of course), so you have to write it in a different way

grave mangoBOT
turbid hatch
#

they need to run a webserver, so it would need to be the other way vee

austere talon
#

also i highly recommend you use vscode, not intellij

turbid hatch
#

unless they queue up on the native side and then the plugin constantly requests via IPC

#

but that seems inefficient

austere talon
jaunty junco
turbid hatch
#

i am unsure how that would solve the problem of going native -> renderer

jaunty junco
turbid hatch
#

rather than renderer -> native

austere talon
jaunty junco
#

the web server then calls the plugin on the renderer side

turbid hatch
#

yeah i dont quite follow

jaunty junco
#

when a request is received

#

ill cook that up real quick

turbid hatch
#

im not sure if its the alcohol or what but

#

wait

austere talon
#
server.handle((req, res) => {
  const json = getJsonSomehow(req);
  mainWin.webContents.executeJavascript(`Vencord.Plugins.plugins.YourPlugin.handleMessage(${JSON.stringify(json)})`);
  res.status(200);
}
jaunty junco
#

shesshhh

turbid hatch
#

AH IS THIS THIS YOU MEAN

#

oh

#

yeah

#

lmfao

#

it is

#

you beat me to it

lime stone
jaunty junco
#

so what im trying to do is, request received(payload contains user id of the person you wanna call)-> start vc

austere talon
jaunty junco
#

ngl the vencord plugin api is really nice

turbid hatch
#

full documentation soonish

austere talon
turbid hatch
#

they said a general control so i assume other things too

#

but you can write "hooks" in the plugin definition that you can eval-call from the webserver, if you parse it on that side

#

or you can parse it on the renderer side

#

both works

jaunty junco
#

yeah

jaunty junco
turbid hatch
#

working on it

#

just been busy as heck

#

usercss first

austere talon
austere talon
lime stone
jaunty junco
turbid hatch
lime stone
#

well it's just turned into an object literal

#

can you not do them there?

turbid hatch
#

there's not really much you can do to begin with but stringify strips out __proto__ anyway

#

since it cant serialize it

austere talon
#

it doesnt actually

turbid hatch
#

does it not

lime stone
charred monolithBOT
lime stone
#

but you wouldn't be able to put code right since json obvs doesn't have functions

jaunty junco
#

is there a pnpm run dev or do i have to relaunch the client everytime i make changes

austere talon
#

but theres not much u can do

jaunty junco
jaunty junco
turbid hatch
#

yeah

#

if you make native changes you need to do a full restart though

lime stone
#
{
    "__proto__": { "look mum": "I'm in a JSON" }
}
#

i guess this is all you could do?

turbid hatch
#

not even

austere talon
#

you can define properties but i dont think thats exploitable

lime stone
#

well it's just a code string

#

unless you're evaling it you should be fine

turbid hatch
#

ye

austere talon
#

you can pollute the returned object's prototype with random shit but like

#

it doesnt do anything

turbid hatch
#

oh wait

#

no there is a vulnerability here

austere talon
#

whats that

turbid hatch
#

JSON.parse has a quirk where __proto__ will be set as a PROPERTY

#

on the object

austere talon
#

yes

#

so what

turbid hatch
#

instead of it being passed through to the getter and setter

jaunty junco
turbid hatch
#

which means that, in the case of a poorly defined website

#
{
    "user": {
        "__proto__": { "admin": true }
    }
}
jaunty junco
#

now i need to figure out how to call a function in renderer form native

turbid hatch
#

now you may be thinking

#

"lewi, this is stupid"

#

yes

#

it is

lime stone
#

yes

turbid hatch
#

but it actually happened!

lime stone
#

you are stupid

turbid hatch
#

so uh

#

take that

lime stone
#

(/j)

austere talon
lime stone
#

I just called you stupid and it's fine because I used a tone tag! (i hope)

turbid hatch
#

im trying to remember it but there was a video essay from liveoverflow i believe that actually described this vulnerability in a production web app

#

from some big company

turbid hatch
#

its stupid

#

please use a validator like ajv

#

๐Ÿ™

jaunty junco
#

if my plugin uses another dependency do i have pnpm add?

austere talon
#

i mean

jaunty junco
#

like what's the proper way of doing it

austere talon
#

this is not an issue if you use JSON.parse

#

only if u eval the json

turbid hatch
austere talon
jaunty junco
turbid hatch
jaunty junco
#

monorepos

austere talon
#

you must not trust __proto__

turbid hatch
#

yep

#

even lodash had this vulnerability

#

at some point

austere talon
turbid hatch
#

_.merge was vulnerable to it

#

thats entertaining

austere talon
#

horror

turbid hatch
#

right anyhow

#

USERCSS

#

THIS IS HELL

jaunty junco
#

some people might find it useful

turbid hatch
#

cause its an extremely niche plugin with security issues

#

honestly

jaunty junco
#

true

#

i mean if people really want it they can always sideload it

turbid hatch
#

this commit makes me feel bad

#

but idk a better way atm

#

im on the other side of the drunk programming curve

#

not on it

#

:(

austere talon
#

why clone

turbid hatch
#

to prevent modifying the array during iteration

austere talon
#

why

turbid hatch
#

does nodejs not have the same issue where if you modify an array during an iteration it causes skips and weird things to happen

#

hm

#

i could remove after the iteration i suppose

#

thatd work too

#

use a temp array to store what needs to be removed

austere talon
turbid hatch
#

im using splice

austere talon
#

youre not using indexes

charred monolithBOT
austere talon
#

the best way to do this kinda stuff is using a for loop that starts from the back

#
for (let i = arr.length - 1; i >= 0; i--) {
  if (someCondition(arr[i])) arr.splice(i, 1);
}
turbid hatch
#

wait

#

what happens if i reassign Settings.enabledThemes whilst im iterating over the destructured version of it

#

i assume it updates still right?

#

cause its the same reference to the proxy obj

lime stone
#

why would you not just do arr = arr.filter

turbid hatch
#

cause we're encountering the issues as we're iterating

austere talon
#

that too lol

turbid hatch
#

otherwise i have to fetch theme data twice

#

and that seems a bit antipattern

#

i dont really know the ideal way of doing this unless i iterate backwards i suppose, but then that creates an illogical sort order for theme loading

#

actually i suppose there is no theme load order

#

the last enabled theme should be the first to get loaded i guess?

#

so i could iterate backwards

#

seems fine

jaunty junco
#

its working i know what to do

bleak gyro
#

I feel like that could be very exploitable

charred monolithBOT
#

This plugin allows users to control their Discord client via HTTP endpoints, currently there are two endpoints:

/start-vc: used with userId query param to start a call with another user
/end-vc: used to end an ongoing voice call

No code is executed dynamically which means there's no way to hijack the client remotely, server only runs on localhost(port 1675 by default), security should be okay!

Use cases:

  • Raycast extension for controlling Discord(...
charred monolithBOT
shy veldt
#

why are they not using findByProps("selectVoiceChannel").selectVoiceChannel("channelId")
and findByProps("selectVoiceChannel").disconnect()

charred monolithBOT
spark pivot
spark pivot
bleak gyro
# charred monolith

Whatโ€™s the point in this? Especially the start-call like itโ€™s gonna take longer to go to the user, right click and copy id then type the command compared to clicking on the user which tbh you are probably already have, and then just simply click on the button

austere talon
#

they literally explain in the description

#

what's more worrying is that it's literally XSS

#

cause they entirely ignored my code samples

bleak gyro
#

Iโ€™m just on mobile so I didnโ€™t really look at it too much

charred monolithBOT
faint echo
#

do people have ideas or something for how a vim keybind plugin should work

#

feel free to ping me

spark pivot
#

i would use that frfr

charred monolithBOT
dusk crystal
#

is there a built in way to get the user auth header?

austere talon
dusk crystal
#

im trying to make api calls from the client to
https://discord.com/api/v9/users/@me/collectibles-purchases

austere talon
#

RestAPI.get("/users/@me/collectibles")

dusk crystal
#

wow thanks that's what I wanted to find

charred monolithBOT
charred monolithBOT
charred monolithBOT
turbid hatch
#

npnp

charred monolithBOT
hollow slate
verbal pumice
hollow slate
#

w- theres dependencies?

#

or do you mean for vencord?

verbal pumice
#

for vencord

hollow slate
#

yeah

#

...........i think

verbal pumice
#

alternatively try renaming the file to something other than index.ts

hollow slate
verbal pumice
#

or if its a plugin with multiple files make a subfolder and put it's files there, dont throw it in the root of userplugins

brazen bone
# hollow slate uh?

User plugins usually go in src/userplugins/*/index.ts, not src/plugins/userplugins/index.ts

hollow slate
#

i did that

#

and this is what i got

#

oh

#

wait

#

userplugins?

#

nvm

still wasp
#

is there something i can call to restart the client?

hollow slate
#

same thing

verbal pumice
#

uhh

#

try deleting the node_modules folder and reinstalling dependencies ig

hollow slate
#

kay

verbal pumice
#

what's the exact command you used to install dependencies

hollow slate
#

pnpm install --frozen-lockfile

verbal pumice
#

is the issue only for the userplugin? if you temporarily remove it does vencord build fine?

hollow slate
#

let me try

#

yeah

#

its an error for only user plugin

#

it builds fine without userplugin

verbal pumice
#

sec i need to check something

hollow slate
#

kay

brazen bone
still wasp
hollow slate
#

in node-modules, discord-types is a shortcut folder

#

is it the reason its saying yk external?

#

huh

#

it has a shortcut icon but its not a shortcut

crude hearth
#

pnpm?

verbal pumice
#

yeah no idea

hollow slate
#

damn

hollow slate
mortal fractal
#

pnpm uses symlinks to save space by having a centralized node_modules (aka .pnpm-store)

#

so you dont have to install say react everytime for every project that uses react (minus version differences but thats inevitable)

spark pivot
#

(Pnpm is the best)

hollow slate
#

anyone knows whats goin on?

charred monolithBOT
spark pivot
#

Pretty sure Iโ€™ve gotten that before, try deleting node_modules and rerunning pnpm i

brazen bone
#

Currently trying to make messagelogger show a select bar instead of just showing all edits after each other

#

The functionality works great, but as you can see I'm no good at ui

charred monolithBOT
brazen bone
#

This looks better

#

Should I try making a pull request of that?

slim marsh
#

Si;;y

spark pivot
brazen bone
#

That's an interesting idea

#

I'll give it a shot

spark pivot
#

its just for simplicity and it makes more sense

jaunty junco
#

i know my plugin isn't getting merged but how do you guys find these

spark pivot
#

i'll be honest idk

#

i've never used findByProps

verbal pumice
#

looking through react devtools for components which might call the functions you want or just educated guesses

brazen bone
#

I'm not sure how to do state management in react, so passing state between the accessory and the message renderer seems difficult

verbal pumice
#

why would you do that

#

oh right

#

update on message update

brazen bone
#

To select which edit to display

verbal pumice
#

are you modifying the MessageLogger plugin or making it a separate plugin

brazen bone
#

Modifying it

verbal pumice
#

yeah then just

#

subscribe to the MESSAGE_UPDATE event and update the display every time its fired?

#

maybe combine the one already there with the new one?

charred monolithBOT
austere talon
# jaunty junco i know my plugin isn't getting merged but how do you guys find these

two methods:

  • you can search all code files by pressing ctrl shift f in devtools. just search by random keywords til u find smth interesting
  • find a ui component that does what you want (like the voice channel component in your case) and use react devtools to inspect it. you can look at all props passed to it and jump to its source code. try looking at the onClick or the entire source and you'll see exactly what it does
jaunty junco
#

right thanks

brazen bone
#

I made a plugin that creates a tarball of all webpack modules

#

Very useful for that sort of searching

#

Haven't posted it yet because no perms though

#

I can't get this messagestore stuff working at all

#

My current useState method is way easier

austere talon
#

more context?

brazen bone
#

I'm making a selector for edit history instead of drawing it all, which wastes a lot of space. Someone suggested using the addAccessory api for it, instead of rendering free-hand. This requires communicating between the accessory and the message renderer, which I assume is best done via the MessageStore, but I can't figure out how to do that.

#

I tried ```js
MessageStore.getMessages(message.channel_id)
.update(message.id, v => v.set('currentEdit', n))

austere talon
#

i think the way you did it is kinda terrible im ngl

#

i think it'd be better if you hid edits by default and then clicking the (edited) either toggles edit showing or opens a modal

brazen bone
#

That does sound better, yeah

#

Not a fan of toggling (wastes a lot of space, and is useless for comparing the differences between revisions), but modal sounds nice

dusk crystal
#

is there any type of plugin that isnt allowed?

brazen bone
#

Rule 9 I think

woeful sable
#

How i Can give suggestion to the dev?

dusk crystal
#

would a plugin that updates the user's pfp automatically in an interval be allowed?

slim marsh
slim marsh
#

against the rules

dusk crystal
#

ohh i see

#

whats the best way for a plugin to have persistent storage?

#

i guess ill just edit a json file

brazen bone
#

There's always LocalStorage, but maybe vc has something else that integrates with cloud or somesuch

dusk crystal
#

thats probably better

#

no conflict with merging and such

austere talon
dusk crystal
#

from my understanding it automatically saves on updated props but also stores to cloud automatically if authenticated?

#

hmm it may just be PlainSettings

#

in that case it works well for me

austere talon
#

PlainSettings is readonly

#

don't use it

#

if you don't want data synced use DataStore

dusk crystal
#

i see got it thanks

charred monolithBOT
charred monolithBOT
woeful sable
#

Ok

charred monolithBOT
spark pivot
# charred monolith

i just had the idea of checking every possible domain ending to see if there are any others

#

running it rn

verbal pumice
#

if theres any others they'd show up in search results cause otherwise what's the point

spark pivot
#

there are a lot more tlds then i thought

spark pivot
#

welp only one other one came up and it's just some random company

#

we good

spark pivot
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

spark pivot
charred monolithBOT
jagged cloak
#

vencord.kz when they find out people sell square meters:

lime stone
austere talon
#

this channel is now role locked to contributor / cute person / <@&1191202487978438656>

#

tired of idiots constantly shitting it up with junk

jagged cloak
#

other than like