#๐Ÿ‘พ-core-development

1 messages ยท Page 100 of 1

real flower
#

no audio driver

crude hearth
#

NI

#

NO

#

@austere talon REMOVE

#

@austere talon what if you did what I done in reviewdb twitter

austere talon
#

what did u done

crude hearth
#

And make background script which does all fetching stuff

austere talon
#

horror

#

so bad

crude hearth
#

Tho Firefox doesnt support background scripts

#

On mv3

crude hearth
austere talon
#

we use v2

#

on Firefox

lime stone
#

where is reviewdb for github ๐Ÿ‘€

crude hearth
#

Tho it might cause some problems now I thought

austere talon
#

actually this would be kinda easy maybe

#

use esbuild to define fetch = browser.runtime.sendMessage

#

?

crude hearth
#

Because what you can pass between contexes are limited

#

I had to return json response because it wouldnt return promise response

little siren
#

was following the plugin guide but im getting this. am i missing a dependency or smth?

lime stone
#

did you open vencord's folder

austere talon
#

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

real flower
little siren
#

ah that probably explains it

#

appreciate it

austere talon
#

it just wants a hug ๐Ÿซ‚

lime stone
#

what's the point of userplugins

little siren
#

dam you made me feel bad for my file ๐Ÿ˜ญ

austere talon
lime stone
#

ah

rocky grotto
#

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.

#

??

tawny cipher
#

!!

woeful sable
austere talon
lime stone
rocky grotto
austere talon
rocky grotto
austere talon
#

then find out!

rocky grotto
#

how lol

austere talon
#

devtools read code

rocky grotto
#

search thru discord files?

#

oh

#

didnt know u could do that

#

nice

austere talon
#

it's Javascript you can just read the code

lime stone
#

wouldn't it be better to modify ShikiCodeblocks

austere talon
#

that could also work probably

lime stone
#

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

rocky grotto
#

i mean

lime stone
#

would it be possible to use shiki in the message editor

rocky grotto
#
import time as t
#

shiki doesnt have syntax highlighting?

lime stone
#

wuh?

rocky grotto
lime stone
#

it does

rocky grotto
lime stone
#

skill issue

rocky grotto
#

lmao

lime stone
crude hearth
#

Ven

rocky grotto
#

nvm

#

default setting for highlighting is broken

#

lmao

#

so i could just make my own custom language as a part of highlight.js?

lime stone
#

does discord use highlight.js

spark cove
rocky grotto
lime stone
#

i didn't know that, i thought they created their own because it was so bad trolley

spark cove
#

it would be reallly laggy

lime stone
#

ah

spark cove
#

you should use monaco as an editor if any

lime stone
#

yeah, i guess it would be rerendering on every edit

spark cove
#

yea which discord does do with hljs already but

#

hljs is simple and performant

#

shiki is not either

rocky grotto
#

the custom language has a vscode extention and a sublime extention

lime stone
#

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

spark cove
#

you can ur custom langauge into shiki too if u want

rocky grotto
#

its not mine per say, its cod scripts

#

gsc

spark cove
#

with hljs you'd have to write the grammar urself

rocky grotto
#

was thinking of using php as a template or something

spark cove
#

but is a vscode ext exists for it then u just need to find the tmlanguage file it uses

lime stone
spark cove
#

to pr it into shiki

rocky grotto
#

yea there are multiple extentions for it in vscode

lime stone
#

pr? can't you add it at runtime?

rocky grotto
#

think theyre open source as well lemme check

spark cove
#

not easily

lime stone
#

oh

#

sad

spark cove
lime stone
#

doesn't look too hard/hacky

spark cove
#

well yea i thought u were asking about vencord

#

that guy isnt a developer i doubt he cares about real shiki

lime stone
#

?

spark cove
#

toad i just woke up

lime stone
#

ah

spark cove
#

everything makes sense to me but i cant

rocky grotto
#

tf what is that name

spark cove
#

oh god please dont tell me this is a plist file

#

NO

rocky grotto
#

keeps hashing the name

spark cove
#

HORROR

#

you have that plugin on proably

rocky grotto
#

oh yes i do lmao

#

hahaha

#

so you gonna add it to shiki cause idk what im doing

spark cove
#

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

rocky grotto
charred monolithBOT
austere talon
#

btw @turbid hatch

#

vencord.dev has a 404.astro file

real flower
austere talon
#

do u know what's up with that?

#

does cf not support 404.html?

turbid hatch
#

uhh it should?

austere talon
#

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

turbid hatch
#

ye

#

or do it in automod

#

you can add exemptions there

verbal pumice
#

all of the scam bot messages include @ everyone so just add an automod rule for that

austere talon
#

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

crude hearth
#

Ven

austere talon
#

hi

crude hearth
#

Hello

lime stone
#

you may want to share your smol emoji server shiggy

mortal fractal
austere talon
#

why are they unironically keeping them

#

can't wait to make a plugin to strip the params

#

or just clearurls

lime stone
#

Firefox DevTools is useless lol

nimble plaza
#

you love

lime stone
#

it just leads to the log function

#

although i just realised that is correct

nimble plaza
#

go up the stack?

lime stone
#

i can't

#

hmm

#

maybe i could add a breakpoint

#

๐Ÿ˜ญ the variable names are minified in the web build...

#

*non-dev build

nimble plaza
lime stone
#

ah <TrashIcon /> stopped working

austere talon
#

ah

lime stone
#

and yea

austere talon
#

a lot of the icons broke

#

this is why I generally copy paste discord svgs into components/Icons instead of webpack searching

lime stone
#

isn't that a bit problematic in terms of copyright catquake

nimble plaza
#

toolbox shows disabled plugins

#

assetexplorer's patch broke pureagony

lime stone
#

just move into another module?

#

yeah, Icons.tsx

#

would need changes though

spare bone
#

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);

lime stone
#

what should user-role-color correspond to

spare bone
#

The color of the main role of the user

#

Like, yours would be that pinkyish

verbal pumice
#

the main role of your user?

#

or have a separate variable per message

spare bone
#

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

verbal pumice
#

since you can also just

.message {
  --user-role-color: #abcdef;
}```
#

and it'd be separate

real flower
#

does discord work through pipewire yet or is it pipewire-pulse?

#

i believe its pulseaudio

spare bone
#

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

turbid hatch
#

i switched to the regular component and ripped out the pencil icon for the colorpicker

spare bone
#

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.

real flower
#

could you not just set the a value to 1?

spare bone
#

I cant just change the opacity to 1

real flower
#

o

spare bone
#

Doesnt work like that, unfortunately.

#

I wish I could just override that

austere talon
#

also how many of those icons are even discord's

#

are they all custom made?

lime stone
#

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

tawny cipher
#

pomelo usernames perhaps would look nice lowercased with @ as prefix

lime stone
#

?

charred monolithBOT
verbal pumice
#

looking at it now, not keeping the @ in usernames was a really good idea

#

it does have no reason to exist

lime stone
#

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

olive aurora
#

it looks so ugly

lime stone
#

all i did was fix it

#

it's meant to look the same

olive aurora
#

i wouldnt know i dont use themes

#

they all suck

lime stone
minor bone
#

Oh hello Kode, didn't expect to see you here

#

(Or I forgot)

lime stone
#

i'm kind of the same with games and texture packs xd

olive aurora
#

Oh hello Infinidoge, didn't expect to see you here

lime stone
#

i barely recognise you xd

#

were you in QuiltMC's server

minor bone
#

Yeah

#

Out of curiosity, is there any chance an installable file version of the Firefox extension (without restrictions) could be produced?

olive aurora
#

WHOA someone in a modding community is on ANOTHER modding community

minor bone
#

Unbelievable

olive aurora
minor bone
#

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

charred monolithBOT
verbal pumice
charred monolithBOT
turbid hatch
#

@austere talon gib contrib rights on vencord repo so i can close stupid issues

lime stone
#

or just triage bleh

charred monolithBOT
lime stone
#

unsane

charred monolithBOT
nimble plaza
#

@verbal pumice issue template was changed

lime stone
verbal pumice
#

discussions are still closed

turbid hatch
#

they don't sunnie

verbal pumice
#

oh

turbid hatch
#

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

verbal pumice
#

yeah okay fair enough then

turbid hatch
#

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

nimble plaza
#

what exactly does triage mean im stupor

turbid hatch
#

sorting the issues

nimble plaza
#

ahh

turbid hatch
#

so in this case

#

it would be

#

invalid, bug, feature request

#

pretty much

nimble plaza
#

that would be good yeah

turbid hatch
#

well even simpler

#

invalid, valid

#

github templates do the rest

nimble plaza
#

do repository permissions allow just access to issues?

turbid hatch
#

dont believe so no

nimble plaza
#

aw

turbid hatch
#

that's an organisation thing

nimble plaza
nimble plaza
#

yeah

turbid hatch
#

triage team can also help with PRs

austere talon
turbid hatch
#

just tag it with like

#

"ready-for-ven"

#

xd

nimble plaza
austere talon
#

horror

turbid hatch
#

(it wouldnt be a bad idea though to have some people who go through everything initially for u ven)

lime stone
#

lol

turbid hatch
#

(cuz i think pretty much all of the active contribs know what quality vencord is)

lime stone
#

bodyguard

turbid hatch
#

YES

#

THE VENCORD RIOT POLICE

austere talon
#

the issue with feature requests is that 99% are stupid, against the rules or duplicated

#

so accepting them is not viable

turbid hatch
#

ye exactly

#

let us kill them

#

xd

olive aurora
#

that one wasn that stupid ..

nimble plaza
#

knife :D

olive aurora
#

but im too lazy

austere talon
#

also be honest did anyone ever check discussions for ideas

#

I sure as hell didn't

nimble plaza
#

nope

lime stone
#

you could give it to all the mods lol

nimble plaza
#

lmao

turbid hatch
#

i did sometimes

austere talon
#

most contributors just make their own features

nimble plaza
#

i did like once

olive aurora
#

I did once and regret

lime stone
#

15 bodyguards for ven trolley

turbid hatch
#

the thing is ven u create a lot of work for yourself Pat

#

we never get anything productive done because u have to sit through stupid PRs and issues

austere talon
turbid hatch
#

thats why i say let us do* it and then u can be the final say

#

basically how linux kernel patches work xd

austere talon
nimble plaza
#

oo idea

#

theres an extension that disables cord on the firefox store right

austere talon
#

no lol

#

it's against their store rules

#

Mozilla store sucks

nimble plaza
#

i thought i saw one

lime stone
#

me too

nimble plaza
turbid hatch
#

last updated

#

they're quite old

nimble plaza
#

i mean do they still work though

austere talon
#

cors

turbid hatch
#

so odds are is that mozilla QA hasn't seen them or they've been forgotten about

austere talon
#

not csp

nimble plaza
#

wha

turbid hatch
#

also that xd

nimble plaza
#

whats the difference

austere talon
#

cors != csp

#

google it

turbid hatch
#

though im pretty sure cors removers are also a bit funky

nimble plaza
#

ohhhhhhhhhh

austere talon
#

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

nimble plaza
#

would that work

turbid hatch
#

that is

#

lethal

#

please do NOT

olive aurora
#

disabling csp globally husk

turbid hatch
#

do it globally

nimble plaza
#

oh thats globally

#

horror

austere talon
#

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

nimble plaza
#

ah

austere talon
#

anyway csp happens to break themes, cloud sync, reviewdb, etc

olive aurora
austere talon
#

so we remove it (for discord only)

lime stone
#

didn't manti mention another workaround

nimble plaza
#

i thought csp === cors

austere talon
#

no

nimble plaza
#

and i was gonna say we could have the extension check if its disabled and enable the features

austere talon
olive aurora
#

doesnt it use structured clone nowadays

lime stone
#

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

real flower
#

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

charred monolithBOT
real flower
woeful sable
#

what are you doing

real flower
#

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

woeful sable
#

interesting

real flower
#

electron does NOT like passing audio through on a non-windows client

woeful sable
#

spoof (idk what iโ€™m talking about)

real flower
#

now this

#

this is an error

nimble plaza
#

OH????????

real flower
#

i love it when my frames take

#

-7ms to render

#

infinite fps glitch

#

WHAT THE FUCK

tawny cipher
#

just stop rendering your frames in the past kyujinkek

real flower
#

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

lime stone
#

does it appear in the terminal

real flower
#

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

austere talon
#

WHY IS DISCORDS TRASHCAN ICON OFF CENTER

real flower
#

OH GOD

lime stone
#

will you merge my pr or do it better :p

austere talon
#

oh u already did what im doing

#

in fact maybe slightly better since the viewBox seemed to be different to Discord's (and incorrect?).

austere talon
real flower
#

im slowly losing my mind

torn knot
austere talon
#

i think mantika deliberately changed the viewbox so it doesnt look terrible

torn knot
#

oh

#

oh wait

#

it wasn't the flexbox SKULL_SKELETON

#

oh god

real flower
torn knot
#

I can't unsee it

austere talon
#

main/* goes into terminal
preload/* and renderer/* goes into browser devtools

real flower
#

ooo

#

tysm

austere talon
#

the easiest way to get main console output is to run it from source

real flower
#

in that case its not running Flushed

austere talon
#

via pnpm start:watch

torn knot
austere talon
#

yeah the svg is just bad lmao

#

i think @umbral hedge complained about this ages ago as well

lime stone
#

did you not notice

austere talon
#

when they were making theme page

austere talon
#

i wrote like the exact same code as u

torn knot
#

a lot of their icons are actually like that

austere talon
charred monolithBOT
real flower
#

is my js knowledge really bad or

lime stone
#

deja vu

real flower
#

should this not print to the console?

austere talon
#

it should

#

are uactually triggering it tho

real flower
#

its in the mediarequesthandler function

austere talon
#

like pick a screen

real flower
#

yeah

#

i fully stream

#

and nothing

austere talon
#

shrug

#

it should work

real flower
austere talon
#

are u sure youre reading the console correctly

lime stone
austere talon
#

illegal

lime stone
#

it should be removed on Ctrl+S though...

real flower
#

i fixed it

#

i forgor to ctrl s

#

today is NOT my day

lime stone
#

ohhh

#

explains a lot

real flower
#

shhhh

austere talon
#

configure autosave

real flower
#

tHATS A THING>>>ASE{:FD:<SDFSDJJFKHLSDHKJF

austere talon
#

ye

real flower
#

i have just now enabled it

lime stone
#

i usually smash my keyboard and search for that unique string

real flower
#

omg autosave is amazing

#

wait

#

when using pnpm start:watch

umbral hedge
#

u just told me to cope at the time ๐Ÿ˜”

real flower
#

do i ctrl r or restart entirely

austere talon
#

depends

#

if you only changed renderer you can ctrl r

real flower
#

im working in main rn-

austere talon
#

otherwise u need full restart

real flower
#

oki

median rapids
austere talon
#

same applies to normal vencord too

real flower
#

such is a pain

#

im debating rewriting this as a whole

#

just to see if i can make it work

charred monolithBOT
austere talon
#

but yeah i genuinely didnt see ur pr and made it myself

lime stone
#

oh ny god

austere talon
#

thank you tho

lime stone
#

you're welcome

#

did you not read the messages in your own discord server

austere talon
#

nah

lime stone
crude hearth
crude hearth
#

for a long time

#

discord cant do css

lime stone
#

oh well

#

my implementation was probably much better

austere talon
#

wait do u remember when this was off centre

real flower
#

random question for yall smart people

#

if i wanna do something like

#

navigator.mediaDevices.enumerateDevices();

#

in electron

#

is that possible

charred monolithBOT
real flower
austere talon
real flower
#

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

real flower
#

basically once i get that i think itll be mostly functional

austere talon
#

u can even just use eval

real flower
#

eval?

austere talon
#

you dont need to use ipc

real flower
#

rEALLY?

austere talon
#

look at this

#

that runs code in the renderer

real flower
#

OH

#

i read that

#

i knew that

#

i didnt think of that

austere talon
#
const devices = await request.frame.executeJavascript("navigator.mediaDevices.enumerateDevices()");
real flower
#

if i may ask

#

why the request.frame-

#

ohh

#

i see

#

upon requesting a video stream

#

it does that?

austere talon
#

you just need to call webFrame.executeJavascript()

real flower
#

webframemain is the bane of my existence rn btw cuz

austere talon
#

most easily obtained from request.frame

real flower
#

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

austere talon
#
[
  {}, {}, {}, {}, {},
  {}, {}, {}, {}, {}, 
  {}
]
#

my love

real flower
#

IKR

#

but

austere talon
#

uh

#

its proabbly because it does not serialise classes

real flower
#

ive never gotten it to get to virtmic connected before

austere talon
#

try this

real flower
#

typescript is a bit odd and the source code im using was originally a js browser extension so

austere talon
#
const devices = await request.frame.executeJavascript("navigator.mediaDevices.enumerateDevices().then(devs => devs.map(d => ({ ...d })));");
real flower
#

its a bit hard to convert

austere talon
#

or do you need the actual class

real flower
#

uhh

austere talon
#

you cant pass classes over ipc

real flower
#

i just need the ID

austere talon
#

then just pass the id

austere talon
real flower
#

mmhmm

#

thanksieie

austere talon
#

similar to here

real flower
austere talon
#

data you pass needs to be json serialisable (with few exceptions)

#

classes and functions dont work

real flower
#

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

austere talon
#

ye

real flower
# austere talon 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();?

austere talon
#

ye

real flower
#

o

austere talon
#

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

real flower
#

ill try an see

#

!

#

:D

#

o h

real flower
#

OH

#

I GOT IT

#

YO

austere talon
#

what

#

what happened

real flower
half notch
#

discords discontinuing the 32bit version of the desktop app

real flower
#

sounds like discord

#

although

#

tbf

#

32bit stuff isnt that common

half notch
#
+ 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})"
real flower
#

and they know their app performs like shit

austere talon
real flower
#

removed the mapping

#

im gonna try and stringify it

austere talon
median rapids
#

theyre probably dropping support for 7/8 soon(ish)

austere talon
#

so yes you can

#

or just literally .toJSON()

real flower
#

oo

#

hmm

austere talon
#

enumerateDevices().then(devs => devs.map(d => d.toJSON()))

#

should work

real flower
#

take away all of the devs.map stuff an try that

austere talon
#

nah u need that

real flower
#

oh?

#

shrug you learn something every day

#

weird

austere talon
#

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

real flower
#

OH

austere talon
#

that u can pass

real flower
#

i see

#

TYSM

#

IT WORKS

austere talon
real flower
#

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 :)

median rapids
real flower
#

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

austere talon
#

mwahahaha

#

what's wrong

real flower
#

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

austere talon
#

just do it on the chromium side

real flower
#

huh

austere talon
#

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

real flower
#

oops gdm also had audio: true

#

but i removed it for testing

austere talon
#

idk what that is

#

but that should work without electron code

real flower
#

the issue is trying to return that from the screenshare mediarequesthandler function

austere talon
#

why do u need to

real flower
#

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

nimble plaza
#

change : Streams to : MediaStream

austere talon
#

no

real flower
#

yeah id have to change electron's definition

#

and then itd break on update

nimble plaza
#

oh thats electron types

#

fuck

austere talon
#

i still do not understand why in tarnation you're editing electron code

#

you shouldnt have to

real flower
#

i am not

austere talon
#

just leave it untouched

real flower
#

yeah

austere talon
austere talon
#

dont touch it, you dontneed to

real flower
#

OHHH

#

i thought you meant their actual stuff uehgya

#

yeah

austere talon
#

in the renderer, monkey patch getUserMedia

real flower
#

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 โœจ )

austere talon
#
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;
}
real flower
austere talon
#

where the getUserMedia line obtains whatever audio track you desire

real flower
#

yeah

austere talon
#

dont touch main code at all

real flower
#

im just thinking

#

oh?
hm
interesting

austere talon
#

just slap it in src/renderer/index.ts

real flower
#

uhhh btw

#

is that all it takes for something to run in the renderer instance?

real flower
austere talon
#

yes ofc

#

it wouldnt stay in index

#

i just meant for quick testing :P

real flower
#

ohHHHHH

real flower
austere talon
#

u just put it in renderer folder and import it somewhere

real flower
#

oHHHH

#

i see

austere talon
#

src/renderer/patches is for stuff like this

real flower
#

(most of my experience is html/css and VERY little nextjs so yeah)

real flower
austere talon
#

there are already a few patches there

#

spellcheck and discord titlebar

real flower
#

audio patch when

#

oh wait

austere talon
#

you add it

#

dont forget to import it in index.js

#

or it will not work

real flower
#

ja

#

hmm

#

okay so i still need the code for finding the virtmic

#

(this is basically a checklist)

real flower
#

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 stare

charred monolithBOT
#

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;
}

![image](htt...

#

@RanzerScore90
I 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;
}
...
nimble plaza
real flower
#

oh

#

wait what

nimble plaza
#

you arent awaiting it bleh

real flower
#
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;
}
nimble plaza
#

show where you define the id variable

real flower
#

that is the entire file

nimble plaza
#

then you arent

#

you deleted it

real flower
#

???

#

right there lmao

nimble plaza
#

oh what

real flower
#

oh that was an attempt at re-defining the variable

#

outside the original function

#

i did uhh

#

let id = getVirtmic();

nimble plaza
#

you arent calling getvirtmic anywhere

nimble plaza
real flower
#

OH

nimble plaza
#

you need to await functions that are async silly

real flower
#

SHHH

#

lmao

#

i do NOT understand async await yet

nimble plaza
#

ohh that makes sense

#

so if you hover over something and it says Promise<actualtype> its an async function that wasnt awaited

real flower
#

oHHH

#

hmm

#

@austere talon alright this is your function what's goin on im a lil lost(sorry if i ask too much Panic )

charred monolithBOT
austere talon
#

wtf are u doing

#

.apply(this, arguments)

real flower
#

hmm

#

i can start streams now but they load infinitely

austere talon
#

then u did smth wrong

real flower
#

๐Ÿ˜ญ

#

alr

austere talon
#

send updated code

real flower
#
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;
}
charred monolithBOT
real flower
#

oh my god.

#

oh my fucking god.

#

did they just say that

austere talon
#

fear

turbid hatch
#

wait

#

let me respond

#

do not

austere talon
austere talon
#

just lock the issue lol

turbid hatch
#

yes me and my

#

very real

#

contributor rights

austere talon
#

i did

turbid hatch
#

xd

#

i would've but i was cooking a response

real flower
#

and uhh

#

alr

turbid hatch
#

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?

real flower
#

damn it would've been funnier to tell them to go to wizard school and then come back and tell us how its done

turbid hatch
#

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

real flower
#

understandable

turbid hatch
#

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

real flower
#

hehehhehe

real flower
austere talon
#

bro wants us to store settings in his balls or smth

#

idk

real flower
turbid hatch
#

vencord is stored in the boobs

austere talon
#

real and true

#

is this why my vencord resets every time

#

i dont have any boobs ๐Ÿ’”

turbid hatch
#

FLAT

real flower
austere talon
#

very muscular and tall and yeah

turbid hatch
#

VEN YOU'RE THE MOST GAY PERSON I KNOW

royal bane
#

grrr manly

austere talon
real flower
#

LMAO

turbid hatch
#

YOU TOOK THAT SPOT RECENTLY

austere talon
#

FROM WHO DID I TAKE IT

#

AND HOW

turbid hatch
#

ONE OF MY FRIENDS

turbid hatch
#

THEY TRANSITIONED

austere talon
#

AHHAHAHA

#

no longer gay ๐Ÿ’”

real flower
#

LMAO

#

see

turbid hatch
#

the straights took them back

real flower
#

im becoming gay

#

i have a gf,,,,

turbid hatch
#

girl

#

you're gay

real flower
turbid hatch
#

i, however

royal bane
#

ill transition and then be gay

turbid hatch
#

am not

real flower
#

yet

turbid hatch
#

unless im transitioning any time soon

austere talon
#

lewi is gonna try to tell you hes straight then u check his closet and its thigh hgihs and probably skirts too

turbid hatch
#

i think im remaining a MANLY STRAIGHT

austere talon
#

lewi i still dont buy it

royal bane
turbid hatch
#

:(

#

leave my collection alone

austere talon
#

are u really 100% straight

turbid hatch
#

im straight

austere talon
#

okay but picture this

turbid hatch
#

just a bit fem

austere talon
#

a guy whos really girly

#

would you

turbid hatch
#

would i what

#

date

#

hit

austere talon
#

either

real flower
#

run over with a car?

austere talon
#

or that

turbid hatch
#

friends but i wouldnt like

real flower
#

(im joking dont sue me)

turbid hatch
#

bang

real flower
#

sad

austere talon
#

hmmm

turbid hatch
#

[i have friends who are very much more fem than me]

austere talon
#

okay fine

turbid hatch
#

VEN

#

WAIT UNTIL I GET

#

FUCKING

#

LIKE

#

BODY TRACKERS

#

I WILL DO THE MOST FEM SHIT

austere talon
#

i bet u stand like a little queer too

#

queercoded... yet straight

turbid hatch
#

uhhhh

#

how do you stand queer

#

wait i will give like

#

the pose i just did

austere talon
#

you're an enigma

turbid hatch
#

and you have to tell me

#

okay

austere talon
turbid hatch
#

i did like

#

this

#

thanks discord

austere talon
#

QUEERCODED

turbid hatch
#

for rotating

#

but

#

whateverf

#

WHAT

#

IS IT A QUEER STANCE

#

ITS COMFY

#

AND FUN

median rapids
#

cozy blobcatcozy

iron vine
#

joined the server so i could add a command to make these automatically

austere talon
#

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

turbid hatch
#

i.....

#

cross my legs

#

FUCK

median rapids
#

lmfao

austere talon
#

AHAGAGAGAHA

turbid hatch
#

i was going to write

real flower
#

i would but my legs dont flexible

turbid hatch
#

i cross my legs

#

and my balls dont hurt

#

like

#

what does this mean

median rapids
#

teach me your secrets

turbid hatch
#

apparently its meant to make them explode

real flower
austere talon
real flower
#

that's what it means

median rapids
#

crossing my legs is so uncomfortable ๐Ÿ˜ญ

austere talon
#

I CAN DO THE LOTUS SEAT

iron vine
#

are vencord plugins publicly available? Id like to use the /petpet plugins code for my plugin

turbid hatch
#

the lotus seat

#

googling one second

real flower
royal bane
#

the what

turbid hatch
#

i dont think

austere talon
#

add yoga

turbid hatch
#

this is quite what i was looking for

#

OH THE

#

YOGA POSE

#

YES I KNOW THIS