#๐พ-core-development
1 messages ยท Page 100 of 1
NI
NO
@austere talon REMOVE
@austere talon what if you did what I done in reviewdb twitter
what did u done
And make background script which does all fetching stuff
It works fine
where is reviewdb for github ๐
Okay then do
Tho it might cause some problems now I thought
actually this would be kinda easy maybe
use esbuild to define fetch = browser.runtime.sendMessage
?
Because what you can pass between contexes are limited
I had to return json response because it wouldnt return promise response
was following the plugin guide but im getting this. am i missing a dependency or smth?
did you open vencord's folder
your file looks lonely
set up a vencord dev install then put it in the userplugins folder
it's explained in the docs folder on github
THAT IS THE BEST WAY I'VE EVER HEARD ANYONE SAY THAT HHAHAHAHAA
this is the file:

it just wants a hug ๐ซ
what's the point of userplugins
dam you made me feel bad for my file ๐ญ
gitignored
ah
is it possible to make a plugin that lets you add custom syntax highlighting for a custom language
so instead of py i can put my custom language
and i can create appropriate highlighting for keywords and operations etc.
??
!!
yes
probably
what about my request
don't misuse channels and use discord search.
the information isn't discarded so yeah
lol nice
i think hljs just lets u add additional languages?
idk how discord integrates it
then find out!
how lol
devtools read code
it's Javascript you can just read the code
wouldn't it be better to modify ShikiCodeblocks
that could also work probably
it wouldn't affect the editor though
but i think it's best to focus on improving this plugin instead of creating another plugin that is incompatible
i mean
would it be possible to use shiki in the message editor
wuh?
it does
skill issue
lmao
that's the whole point of shiki silly
https://github.com/shikijs/shiki
Ven
nvm
default setting for highlighting is broken
lmao
so i could just make my own custom language as a part of highlight.js?
does discord use highlight.js
this is a rly bad idea
yea
i didn't know that, i thought they created their own because it was so bad 
it would be reallly laggy
ah
you should use monaco as an editor if any
yeah, i guess it would be rerendering on every edit
yea which discord does do with hljs already but
hljs is simple and performant
shiki is not either
the custom language has a vscode extention and a sublime extention
could their be a plugin to just use monaco in read only mode or would that be stupid
maybe shiki for messages, monaco for editor
you can ur custom langauge into shiki too if u want
with hljs you'd have to write the grammar urself
yea i know nothing about that
was thinking of using php as a template or something
but is a vscode ext exists for it then u just need to find the tmlanguage file it uses
iirc vscode uses textmate's format
to pr it into shiki
yea there are multiple extentions for it in vscode
pr? can't you add it at runtime?
think theyre open source as well lemme check
not easily
doesn't look too hard/hacky
well yea i thought u were asking about vencord
that guy isnt a developer i doubt he cares about real shiki
?
toad i just woke up
ah
everything makes sense to me but i cant
tf what is that name
keeps hashing the name
not right now you'll have to bother me later im workin on smth
if u wanna help speed it up
that file is a plist file
figure out how to convert it to a json file
that's cool nw
just add the following as a theme or to QuickCSS:
.withFrame-2dL45i{ display: none; }
nHANAHAHAHAHBSSG ABAVAHAVABGAHA
yet https://vencord.dev/some/insane/path goes home instead of 404
do u know what's up with that?
does cf not support 404.html?
uhh it should?
that is so weird
so why is it returning the homepage
also let's block discord.gg links and everyone pings to deal with the spambots
i might write some special handling for venbot so that we can whitelist specific invites
all of the scam bot messages include @ everyone so just add an automod rule for that
nah automod isn't good for it
optimally we'd allow any invites to specific guilds
regardless of if they use the most popular one
Ven
hi
Hello
you may want to share your smol emoji server 
#๐ง-off-topic-iceman-only message like i did
why are they unironically keeping them

can't wait to make a plugin to strip the params
or just clearurls
go up the stack?
i can't
hmm
maybe i could add a breakpoint
๐ญ the variable names are minified in the web build...
*non-dev build
can https://codeberg.org/Ven/cord/pulls/32 be merged anytime soon
the popup when i open #๐ฅ-vencord-support-๐ฅ is annoying
ah <TrashIcon /> stopped working
ah
and yea
a lot of the icons broke
this is why I generally copy paste discord svgs into components/Icons instead of webpack searching
isn't that a bit problematic in terms of copyright 
Hey guys, is there a plugin (or is it possible) that does a ::root variables with the role colors? I am trying to stylize my discord and would love for the possibility to have the option to use something like background-color: rgb(--user-role-color);
what should user-role-color correspond to
Ah, yeah. That example wouldnt really work.
I wanted to have an option to use the user role color that is being tagged or sending a message
since you can also just
.message {
--user-role-color: #abcdef;
}```
and it'd be separate
does discord work through pipewire yet or is it pipewire-pulse?
i believe its pulseaudio
Here is one stupid use case that I have been trying to fix for a huge while now
On hover, I want to make the BG the same color as the role
yeah i had to do this for usercss xd
i switched to the regular component and ripped out the pencil icon for the colorpicker
But Discord has it as rgba(...,0.1)
And I either lack the expertise to make that work or I cant find a way to make the background on hover to be opaque
So, more like, searching for tips on how I could solve that.
could you not just set the a value to 1?
I cant just change the opacity to 1
o
uh kinda but I doubt they care
also how many of those icons are even discord's
are they all custom made?
i've never noticed them being used in another app
idk, i don't tend to pay much attention xd
as soon as i saw the domain icon i knew they used material icons though
does this look right
pomelo usernames perhaps would look nice lowercased with @ as prefix
?
This fixes the themes tab on web. The reviewdb icons should look almost the same, in fact maybe slightly better since the viewBox seemed to be different to Discord's (and incorrect?).
looking at it now, not keeping the @ in usernames was a really good idea
it does have no reason to exist
yeah although with pronouns, display names and statuses it can get confusing
if you didn't know better would you know if the text is a username or a fancy subtitle thing

i'm kind of the same with games and texture packs xd
Oh hello Infinidoge, didn't expect to see you here
๐
i barely recognise you xd
were you in QuiltMC's server
Yeah
Out of curiosity, is there any chance an installable file version of the Firefox extension (without restrictions) could be produced?
WHOA someone in a modding community is on ANOTHER modding community
Unbelievable
you can build from source but then you can only use the extension on nightly/developer edition
Yeah, I know,
I'm on developer edition currently which is why I was wondering lol
I wonder if the Nix package can build it already
Oh, looks like I "accidentally" moved out ReportIcon too. Not sure if that makes a lot of sense since I don't think any other plugins use the icon
the instructions for building the extension from source are the same as the regular ones except replacing build with buildWeb
ALWAYS FIRST USE OUR SUPPORT CHANNEL! ONLY USE THIS FORM IF YOU ARE A CONTRIBUTOR OR WERE TOLD TO DO SO IN THE SUPPORT CHANNEL.
@austere talon gib contrib rights on vencord repo so i can close stupid issues
or just triage 
ALWAYS FIRST USE OUR SUPPORT CHANNEL! ONLY USE THIS FORM IF YOU ARE A CONTRIBUTOR OR WERE TOLD TO DO SO IN THE SUPPORT CHANNEL.
unsane
this is a valid feature request though?
:shrug: or just use branch protection
okay then where do feature requests go
discussions are still closed
they don't sunnie
oh
ven doesn't want them
they can ask here for feature requests if they're sane
but github issues are for bugs and stuff
and its mainly for existing contributors
it's only open again because we need it for the plugin readme images thread
yeah okay fair enough then
unless we do actually organise like
a triage team
which i dont mind doing, i can sit here doing issues for a bit
the amount of random crap we get outweighs the benefits of actually having it open
what exactly does triage mean im stupor
sorting the issues
ahh
that would be good yeah
do repository permissions allow just access to issues?
dont believe so no
aw
that's an organisation thing
yeah
triage team can also help with PRs
nowhere
oo thats actually
horror
(it wouldnt be a bad idea though to have some people who go through everything initially for u ven)
lol
(cuz i think pretty much all of the active contribs know what quality vencord is)
bodyguard
the issue with feature requests is that 99% are stupid, against the rules or duplicated
so accepting them is not viable
that one wasn that stupid ..
knife :D
but im too lazy
nope
you could give it to all the mods lol
lmao
i did sometimes
most contributors just make their own features
i did like once
I did once and regret
15 bodyguards for ven 
the thing is ven u create a lot of work for yourself 
we never get anything productive done because u have to sit through stupid PRs and issues

thats why i say let us do* it and then u can be the final say
basically how linux kernel patches work xd
he doesnt
simple
you need to edit the source code and restore the old background worker then yes
i thought i saw one
me too
i mean do they still work though
cors
so odds are is that mozilla QA hasn't seen them or they've been forgotten about
not csp
wha
also that xd
whats the difference
though im pretty sure cors removers are also a bit funky
ohhhhhhhhhh
cors = server tells the browser what websites may request it
csp = website tells browsers what servers you may request
discord csp forbids connecting to non whitelisted domains
disabling csp globally 
do it globally
csp is very important for security lmao
it protects you from xss and similar
you know the
<img src="" onerror="explode()">
you can use csp to disallow that
ah
anyway csp happens to break themes, cloud sync, reviewdb, etc
hop on this 5 year old extension with 20 users https://addons.mozilla.org/en-US/firefox/addon/usercsp/
so we remove it (for discord only)
didn't manti mention another workaround
i thought csp === cors
no
and i was gonna say we could have the extension check if its disabled and enable the features
yes but that only covers fetch and means you need to use ipc which may not support passing complex data structures
doesnt it use structured clone nowadays
should it support anything you pass into fetch?
i don't think you can pass callbacks into the options argument
(as an obvious example)
i feel like that could fix a lot
hmm
i have something i THINK may work but idk when to call the get audio function and how to integrate it
trial and error time

holy shit im getting it
its now pulling the video from my function
just need to hook in audio
aaaaaa electron is quite kljsdjgfhkdfhjklghkjsd about it
chromium has the stuff to do it but electron doesn't like what im doing lmao
what are you doing
vesktop but with audio screenshares
it is quite the hacky solution
im trying to combine the old screensharing virtmic tutorial with some stuff discord-screenaudio uses on pipewire
interesting
electron does NOT like passing audio through on a non-windows client
spoof (idk what iโm talking about)
OH????????
just stop rendering your frames in the past 
also random question @austere talon
when working with vesktop
console.log doesnt print to the web console so i have kinda no idea what's running and when
how debug
does it appear in the terminal
no
it could literally just mean that its not running
LMAO
also i think i see why on 0.3.1 the screenshare portal opens twice
ill add that to my todo list
OH GOD
will you merge my pr or do it better :p
oh u already did what im doing
in fact maybe slightly better since the viewBox seemed to be different to Discord's (and incorrect?).
^ :p
im slowly losing my mind
because they hate themselves
i think mantika deliberately changed the viewbox so it doesnt look terrible
v i dont mean to annoy u,,,
im jus curious,,,,
I can't unsee it
main/* goes into terminal
preload/* and renderer/* goes into browser devtools
the easiest way to get main console output is to run it from source
in that case its not running 
via pnpm start:watch
their designer should get fired for this sin
yeah the svg is just bad lmao
i think @umbral hedge complained about this ages ago as well
when they were making theme page
nah i literally did it myself
i wrote like the exact same code as u
a lot of their icons are actually like that

is my js knowledge really bad or
deja vu
should this not print to the console?
its in the mediarequesthandler function
like pick a screen

are u sure youre reading the console correctly
please remove the semicolon after the closing brace ๐ญ
illegal
it should be removed on Ctrl+S though...
yeah,,
it was a dumb issue
i fixed it
i forgor to ctrl s

today is NOT my day
shhhh
tHATS A THING>>>ASE{:FD:<SDFSDJJFKHLSDHKJF
ye
i have just now enabled it
i usually smash my keyboard and search for that unique string
YEP
u just told me to cope at the time ๐
do i ctrl r or restart entirely
im working in main rn-
otherwise u need full restart
oki
what a meanie
same applies to normal vencord too
such is a pain
im debating rewriting this as a whole
just to see if i can make it work
oh ny god
thank you tho
nah

their bot label was offcenter too
should this not be this?
replace: "if($1||$self.isPrivateChannelRead(arguments[0]?.message)){"
const displayName = user && (UserStore.getUser(userId).globalName ?? user);
random question for yall smart people
if i wanna do something like
navigator.mediaDevices.enumerateDevices();
in electron
is that possible
i regret asking i think i found it lmao
HONESTLY I AGREE
i ask without thinking sometimes,,,,,
i think its available in the renderer process but i need the mediaDevices functionality in main
hmm
oh i can just run it in renderer and pass it to main.

holy fuck i am stupid today
ye
basically once i get that i think itll be mostly functional
u can even just use eval
eval?
you dont need to use ipc
rEALLY?
look at this
that runs code in the renderer
const devices = await request.frame.executeJavascript("navigator.mediaDevices.enumerateDevices()");
if i may ask
why the request.frame-
ohh
i see
upon requesting a video stream
it does that?
you just need to call webFrame.executeJavascript()
webframemain is the bane of my existence rn btw cuz
most easily obtained from request.frame
it does NOT like audio streams other than loopback
(so im implementing the audio half of it cuz once that's done i can figure out how to add automatic virtmic creation)
WOAH IM GETTING SOMEWHERE
okay so
that's SUPPOSED to be an array/list of all media devices
i do not know why it is not
lmao
ive never gotten it to get to virtmic connected before
try this
typescript is a bit odd and the source code im using was originally a js browser extension so
const devices = await request.frame.executeJavascript("navigator.mediaDevices.enumerateDevices().then(devs => devs.map(d => ({ ...d })));");
its a bit hard to convert
or do you need the actual class
uhh
you cant pass classes over ipc
i just need the ID
then just pass the id
in the map just map it to whatever data u need
similar to here
hmm
data you pass needs to be json serialisable (with few exceptions)
classes and functions dont work
ohh ye
i saw tha
t
hmm
maybe i can print the data in the renderer process
to see if its breaking there
or during transfer
ye
stupid question
how would i do that
because its not assigning the value to any variable
can i just encase the entire thing in a console.log();?
ye
o
you ask too much :p
just try it
worst case scenario it doesnt work
a lot of client mod work is just try it and see heh
okay yeah ive been told that a lot 
ill try an see
!
:D
o h
(sometimes i subconsciously ask and then understand the answer as soon as i did it and kinda realize i never needed to)
OH
I GOT IT
YO
discords discontinuing the 32bit version of the desktop app
+ WINDOWS_32_BIT_DEPRECATED_WARNING: "Your version of Windows is out of date. Update it to continue receiving Discord updates and technical support. [Learn more about system requirements]({helpCenterLink})"
and they know their app performs like shit
what did u change
w11+ is 64-bit only
it has a toJSON method
theyre probably dropping support for 7/8 soon(ish)
take away all of the devs.map stuff an try that
nah u need that
the reason its giving u empty object is cause theyre all class properties which are lost during clone
toJSON should give u a plain object
OH
that u can pass
it logged the data this time
now i just need to read it from json syntax and pull the deviceId of the device with the virtmic label
:D
v you are so cool :)

nvm that was easier than expected
huh
it was never defined as unkown :(
typescript is bullying me waaah /nsrs
wow im back at square wtf
im basically stuck at the point where electron itself is bullying me
s t r e a m s
this expects a Streams type
which can only take audio: loopback
which is nOt what i want
wait
if i feed it a webframemain
it will capture audio from the frame
i might just do some funky conversions and try and bully it
nope that's too weird
hm
i know chromium has this capability so im wondering what i need to change
cuz electron is as we know
chromium with extra steps
just do it on the chromium side
huh

well
getUserMedia returns a MediaStream
you can monkey patch getUserMedia
then create a stream for the audio you want and add it to the video only MediaStream
and return that from getUserMedia
might work
the issue is trying to return that from the screenshare mediarequesthandler function
why do u need to
uhhh
so i see this is how you did it
but yeah
it does not like
wait i wonder if itll effect runtime tho
hmm
lemme fix some other errors
and then ill test if it works anyways
change : Streams to : MediaStream
no
i still do not understand why in tarnation you're editing electron code
you shouldnt have to
i am not
just leave it untouched
yeah
this should work
this is electroin code
dont touch it, you dontneed to
in the renderer, monkey patch getUserMedia
may i ask what that means
or do you mean just
inject the audio stream data in directly to all getusermedia calls
(as you can see i bit off more than i can chew but im โจ determined โจ )
const original = navigator.mediaDevices.getDisplayMedia;
navigator.mediaDevices.getDisplayMedia = async function() {
const stream = await original.apply(this, arguments);
const audio = await navigator.mediaDevices.getUserMedia({ audio: { ... } });
audio.getAudioTracks().forEach(t => stream.addTrack(t));
return stream;
}

where the getUserMedia line obtains whatever audio track you desire
yeah
dont touch main code at all
just slap it in src/renderer/index.ts
i dont like that for cleanliness
would making a new file in renderer work
uh yeah
ohHHHHH
oh damn
u just put it in renderer folder and import it somewhere
src/renderer/patches is for stuff like this
(most of my experience is html/css and VERY little nextjs so yeah)
ooooh
ja
hmm
okay so i still need the code for finding the virtmic
(this is basically a checklist)
if i may ask
what arguments are for the getDisplayMedia
in the this, arguments
would it be just the video: true audio: true kinda stuff
or
i managed to spin my brain around an now im confused as hell LMAO
(just tell me to figure it out if you want me to btw)
hmm
no longer able to find the virtmic
it just registered as to how it works i think
its patching the getDisplayMedia function and replacing it with our own version?
oH
i get it now
i think
it feels like im missing something
but i think its there
okay the issue is that i cant do all of the searching for the virtmic device in the getdisplaymedia function
but i also can't only do it once, as then if the user created the virtmic after launch, they'd have to restart
hmm
but if i put it in its own function, id goes out of scope-
oh my god one moment
its fine if they're in the same function 
Made a little snippet that makes it apart of the toolbar, like Discord old UI, you're welcome :)
[class*="withFrame-"][class*="titleBar-"] {
height: 0%;
margin-top: 0px;
}
[class*="withFrame-"][class*="titleBar-"] > [class*="wordmark-"] {
display: none;
}
[class*="withFrame-"][class*="titleBar-"] > [class*="winButton-"] {
width: 40px;
height: 52px;
}
[class*="upperContainer-"] > [class*="toolbar-"] {
margin-right: 120px;
}

[class*="withFrame-"][class*="titleBar-"] {
height: 0%;
margin-top: 0px;
}
[class*="withFrame-"][class*="titleBar-"] > [class*="wordmark-"] {
display: none;
}
[class*="withFrame-"][class*="titleBar-"] > [class*="winButton-"] {
width: 40px;
height: 52px;
}
[class*="upperContainer-"] > [class*="toolbar-"] {
margin-right: 120px;
}
...
you need to await the function that gets id
const original = navigator.mediaDevices.getDisplayMedia;
async function getVirtmic() {
const getAudioDevice = async (deviceName: string|undefined) => {
await new Promise(r => setTimeout(r, 1000));
let devices = await navigator.mediaDevices.enumerateDevices();
let audioDevice = devices.find(({
label
}) => label === deviceName);
console.log(audioDevice);
return audioDevice;
}
var id: string|undefined;
try {
let myDiscordAudioSink = await getAudioDevice('virtmic');
id = myDiscordAudioSink?.deviceId;
console.log(id, "connected");
}
catch (error) {
id = 'default';
console.log("virtmic failed to connect");
}
return id;
};
navigator.mediaDevices.getDisplayMedia = async function() {
const stream = await original.apply({
video: true
});
const audio = await navigator.mediaDevices.getUserMedia({
audio: {
deviceId: {
exact: id;
},
autoGainControl: false,
echoCancellation: false,
noiseSuppression: false,
channelCount: 2
} });
audio.getAudioTracks().forEach(t => stream.addTrack(t));
return stream;
}
show where you define the id variable
that is the entire file
the "let id..." line
oh what
oh that was an attempt at re-defining the variable
outside the original function
i did uhh
let id = getVirtmic();
you arent calling getvirtmic anywhere
const id = await getVirtmic();
OH
you need to await functions that are async silly
ohh that makes sense
so if you hover over something and it says Promise<actualtype> its an async function that wasnt awaited
like here
oHHH
hmm
@austere talon alright this is your function what's goin on im a lil lost(sorry if i ask too much
)
it does not like this line
send updated code
const original = navigator.mediaDevices.getDisplayMedia;
async function getVirtmic() {
const getAudioDevice = async (deviceName: string|undefined) => {
await new Promise(r => setTimeout(r, 1000));
let devices = await navigator.mediaDevices.enumerateDevices();
let audioDevice = devices.find(({
label
}) => label === deviceName);
console.log(audioDevice);
return audioDevice;
}
var id: string|undefined;
try {
let myDiscordAudioSink = await getAudioDevice('virtmic');
id = myDiscordAudioSink?.deviceId;
console.log(id, "connected");
}
catch (error) {
id = 'default';
console.log("virtmic failed to connect");
}
return id;
};
navigator.mediaDevices.getDisplayMedia = async function() {
const id = await getVirtmic();
const stream = await original.apply(this, arguments);
const audio = await navigator.mediaDevices.getUserMedia({
audio: {
deviceId: {
exact: id
},
autoGainControl: false,
echoCancellation: false,
noiseSuppression: false,
channelCount: 2
} });
audio.getAudioTracks().forEach(t => stream.addTrack(t));
return stream;
}
yes? do you expect us to persist settings magically when you disable persistent storage
yes.
fear
- set channelCount to 1
- why the 1s sleep?
i did
honestly idk i was just tryin to get working code over from the userjs and then i was gonna modify
and uhh
alr
in case it wasn't obvious ven's reply was highly sarcastic (yes i know it doesn't come across on the internet well) and i don't understand how you want us to persist data when the data storage we have is not persistent. what you are asking for is impossible.
and if you want an answer that might work for you, have you considered using the export/import feature, or settings sync?
damn it would've been funnier to tell them to go to wizard school and then come back and tell us how its done
eh, as much as i like giving sarcastic responses here, i tend to avoid it on github because people use it as a source of truth moreso than here
understandable
i would've definitely loved to tell them to go down the yellow brick road and ask the man behind the curtain how to persist in a nonpersistent environment
hehehhehe
if only that fixed it
we should
vencord is stored in the boobs

real and true
is this why my vencord resets every time
i dont have any boobs ๐
FLAT
nah its stored in the hrt
which then gets transmitted to the boobs
VEN YOU'RE THE MOST GAY PERSON I KNOW
grrr manly

LMAO
YOU TOOK THAT SPOT RECENTLY

FROM WHO DID I TAKE IT
AND HOW
ONE OF MY FRIENDS
THEY TRANSITIONED
the straights took them back
nOOO
i, however
ill transition and then be gay
am not
yet
unless im transitioning any time soon
lewi is gonna try to tell you hes straight then u check his closet and its thigh hgihs and probably skirts too
i think im remaining a MANLY STRAIGHT
lewi i still dont buy it
fuck off
tomorrow
im straight
okay but picture this
just a bit fem
either
run over with a car?
or that
friends but i wouldnt like
(im joking dont sue me)
bang
sad
hmmm
[i have friends who are very much more fem than me]
okay fine
VEN
WAIT UNTIL I GET
FUCKING
LIKE
BODY TRACKERS
I WILL DO THE MOST FEM SHIT
you're an enigma
the guy on the left
QUEERCODED
cozy 
joined the server so i could add a command to make these automatically
its ok i sit and stand like a queer all the time
its like i was born with it
i love crossing my legs all the time
lmfao
AHAGAGAGAHA
i was going to write
i would but my legs dont flexible
teach me your secrets
apparently its meant to make them explode
they're better off gone
DONT GET ME STARTED
that's what it means
crossing my legs is so uncomfortable ๐ญ
I CAN DO THE LOTUS SEAT
are vencord plugins publicly available? Id like to use the /petpet plugins code for my plugin
THATS WHY I WANT SRS
the what
add yoga






