#👾-core-development
1 messages · Page 73 of 1
i pushed a slight change to the use effect idea, not much better but yea idk what else to do without too much thinking
@austere talon how do i work the fake crown thing?
the what
[Plugin] EditUsers
You can edit any users profile only on your end.
- Edit anyones pfp.
- Edit anyones banner.
- Edit their name.
- Edit their status.
- Change color of their name.
A similar plugin exists for BetterDiscord: https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
holy shit daniels gaming 20
@austere talon im adding ai noise cancellation to vesktop but like it also will work on web
open source recurrent neural network based noise cancellation
did u already got a working prototype or
my friend was like yea no ur mic cannot
well the code is very straight forward and one of the devs of Vite already wrote an easy api for connecting it to Web Audio nodes
i was pinging to ask
how do i target web and vesktop
just .web works
i was thinking about it im not sure how i wanna go about it
the code will live in renderer frame
i was originally gonna put it in vesktop but idk if thats better than putting it in a plugin
**common.mjs: **Lines 87-91
if (mod === "dev" && !watch) continue;
if (mod === "web" && kind === "discordDesktop") continue;
if (mod === "desktop" && kind === "web") continue;
if (mod === "discordDesktop" && kind !== "discordDesktop") continue;
if (mod === "vencordDesktop" && kind !== "vencordDesktop") continue;
but large because the npm module
that's fine
but I think it would be messy if we had the code in vencord
since now you need to monkey patch vesktop / browser api
Well maybe u have to do that anyway in vesktop idk
what goes people's heads to see previous bumps get marked as spam and still leave their own
you can always lazy import it but that might be a bit hard to do
i cant easily do this on web
why not
what's the matter with that
so does shiki
i was thinking cors
which happens occasionally on web
cors/csp ya
hm so do u think i should put this in a plugin
if i should put it in vesktop where would i put it
csp not cors
cors is different thing
but it's easy to confuse the too I do it too like u just saw

the difference btw
cors is other websites deciding whether they want to let discord.com load their resources or not
csp is discord deciding whether they want to allow loading a specific resource inside discord.com
yea true
idk
there's a patches folder which has patches for some things
possibly there but not necessarily
im gonna just make a working prototype and see how messy it is
one thing i do wanna pr into vesktop is an optional game auto detection
idk i thought it was just rpc handler
like when u open minecraft it detects that its open and shows ur playing it does arrpc do that
oh wth
thats prob why i thought it didnt wrok
doesnt look like it does that hm
oh it does it just isnt working for me
i'll have to find out why later
@austere talon does the arrpc server run on vesktop
yep
it's actually split half and half
the renderer side is handled in vencord
the native part and invite launcher is run in vesktop
so fire
I hate that it's split like that lmao but that was the easiest
no
and not planned I think
it doesn't seem very useful
I've never seen anyone even use it
i was thinking that firefox didnt allow connections to localhost
but maybe thats safari im thinking of
@austere talon what happened to patch helper
is the process to having it show up different now
WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]))
@austere talon can u vc
ok bet
to test if it actually works in case
it works in the preview
but idk if it still works in call
also in your opinion, should the plugin itself be the on/off switch
I just used my alt to test voice chat
or should the plugin just add one in the voice options
I love talking to myself
Well
is this gonna be vesktop only or web too
I think it'd be better to just have it vesktop only for now
um probably vesktop only cus it requires an external audio worklet script
if it's vesktop it should add a switch to the picker screen
picker screen?
ohh
soon
yea
I've not been feeling like doing anything lately
but should i also make it like
in the voice options too then
also u mean this right
is there a utility function to read the electron preferences file
if not, how can i find the current release channel of the discord app in the native process
the current code i have from nutty is ```ts
// Get storage path depending on platform
let discordStoragePath;
switch (process.platform) {
case "win32":
discordStoragePath = join(process.env.APPDATA!, "discordptb");
break;
case "linux":
discordStoragePath = join(process.env.HOME!, ".config", "discordptb");
break;
case "darwin":
discordStoragePath = join(process.env.HOME!, "Library", "Application Support", "discordptb");
break;
default:
discordStoragePath = process.env.DISCORD_STORAGE_PATH;
break;
}
// Load snippets into from preferences file
const prefs = JSON.parse(readFileSync(join(discordStoragePath, "Preferences"), "utf-8"));
but that hardcodes the release channel and it seems like vencord would already have a func for it
also it hard crashes if discord is located somewhere else
😃
i know there's window.GLOBAL_ENV in the app process but im working native here
what specifically do you want?
what are u trying to do
this but make it support canary & stable
so i want to find the release channel and use that instead of hardcoding discordptb
yes but what is your endgoal
what exactly do you need / want to achieve
this seems very much like X/Y problem to me, that's why im asking
ah okay
load snippets from the storage file .electron.devtools.preferences.scriptSnippets and run them automatically based on a boot snippet
i see, so basically these?
yeah
okay i see
and where do you want to do this? in what context?
in a client mod or as a separate script
inside vencord ideally
since the current version by big nutty needs to be injected but so does vencord i decided to try to combine them
i have a kinda working version in my fork but its not ideal
import { join } from "path";
import { app } from "electron";
import { readFileSync } from "fs";
const prefsPath = join(app.getPath("userData"), "Preferences");
console.log(JSON.parse(readFileSync(presPath, "utf-8")));
ah ty thats what i was looking for
yop
who has a server hider plugin CSS i can have
🙏
[data-list-id=guildsnav] .listItem-3SmSlK:has([data-list-item-id="guildsnav___GUILD_ID_HERE"]) {
display: none;
}
for example, this hides the vencord server
[data-list-id=guildsnav] .listItem-3SmSlK:has([data-list-item-id="guildsnav___1015060230222131221"]) {
display: none;
}
why do you want to hide all servers
well i put everything in a folder except my favorites
but i kinda want to hide this folder
then just hide that folder
how?
name your folder something and ```css
.wrapper-38slSD:has(+ .listItem-3SmSlK [data-dnd-name="the name"]) {
display: none
}
so i type this and what
should work
.wrapper-38slSD:has(+ .listItem-3SmSlK [data-dnd-name="my mom and left me"]) {
display: none
}
alr ty
how do i put this code in btw
.wrapper-38slSD:has( .listItem-3SmSlK [data-dnd-name="my mom and dad left me"]) {
display: none
}
dude tysm lol
hm i get "cannot read getPath of undefined" am i in the app context somehow
okay
i just did this
🥰
People tend to not find the open quickcss file button to add their edited theme file.
cc: toxxy [Ignore]
okay i get babysitting the user but that's too far
yeahh lmao
awh my gawd that theme is wild
how would I import a setting from @api/Settings in the native context
is it possible to make the quickcss button appear in the right click
im trying to make it a setting instead of automatically running the snippet
or i could just do it by default and only run vencord_boot instead of boot
arguably you could also enable vencord toolbox
i forgot that existed
i want to make it better but i haven't had any time to sit down and code
The super react button can be extremely annoying when trying to react to messages and accidentally clicking it. It would be useful removing it/moving it to some place else using a plugin so that it isn't shoved into people's faces who don't have nitro/people who have already used all their super reactions.
what is vencord toolbox
pain
will soon™ allow people to access plugin settings from toolbox
and updater tab
best plugin 
huhh
more confus
are you fat?
same\
was that like supposed to be an own or something
odd person
ignore lag, it's just slow because i was recording
((also because the code is bad))
but yeah you can add certain plugin settings to be in the drop down to easily get to
textreplace is the main one. also customrpc
but people will want a variety of plugins pinned
still needs to be tested for long term performance
this is very insane, do you think we can fetch it from discord?
settings,
enabledByDefault: true,
stream.addEventListener("inactive", onEnded, { once: true });
then u don't need to remove it
function Dse(e) {
var t = e.width
, n = void 0 === t ? 24 : t
, o = e.height
, i = void 0 === o ? 24 : o
, a = e.color
, s = void 0 === a ? "currentColor" : a
, l = e.foreground
, c = xse(e, ["width", "height", "color", "foreground"]);
return (0,
r.jsxs)("svg", Lse(function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {}
...

would be easier if there was a multipass system for finding function names and then using those in patches
you can
nookies did something like that for the old context menu patcher
that autopatched dozens of modules
explain it to me water
it used a proxy in patches
oh
that kept state
this auto patched dozens of chunks
ADD LISTENER
So insane
it dynamically generated a patch lmao
cause it first had to find out the export name
like
idk it was really deranged but worked wonderfully
"If it works, don't touch it."
yes u wont need this here i think
how does it do that if it
it happens before patches
how does it get access to instantiated exports
Dark arcane rituals from the days of yore.
basically:
- add webpack listener that searches for the context menu api code and finds the export name of the openContextMenu method and the id of the module
- now add a patch that searches for require(id) to match all modules that import context menu api
- the patch uses a proxy that captures the local name of the context menu and saves as state, then once the replacement is accessed it returns a matcher for
localName.exportKey,{
very cursed but it worked nicely
i dont understand im crying
@limber skiff real
what u tryna do vappp
😮
oph i get it
its able to apply the patch because it effects modules that import it only?
but modules only get loaded when theyre imported
so wouldnt that imply that it doesnt work on 1 of the modules
so
theres two react function components
in a module that arent exported
its the two svgs u want me to use
but they're nearly unmatchable
ah ok okok
@austere talon am i doing the targeting naming right
plugin.vencordDesktop/index.tsx
ok i thin just bug
should rename to vesktop
yes
vencordDesktop söpö bloat
should i do that in this pr
söpö
cus i have to fix targeting bug
finnish reference
it means cute
vencordDesktop -> vesktop
discordDesktop -> desktop
olet söpö <3 @spark cove
:3
I think
ok but where does laptop come from
horror
truee what will happen to laptop users
how so
LOL
it exists in generatePluginList and also in build/common.mjs
and it doesnt work with folders
if u wanna fix that would be epic cus im going to the mall
its still kinda confusing
i thought
desktop = vesktop and discord desktop
discordDesktop = only discord desktop
web = only web and vencord desktop
idk
it works
maybe vesktop desktop and web
and just add multiple extentions (kinda insane) 
idk why you would need to tho
just expode if it doesnt work on that
Vesktop and web makes sense
it does no?
is this for linux or did they just explode krisp
the pics in the pr
or did you go insane and patch the menus
vap crazy once
ok vap did go insane

tbf i should have known discord wouldnt be that nice
I love the part when vap said it's vapping time and vapped all over the place
@spark cove voice-messages integration when 🔥
True true
I must think of a clean way to do
??
??
did u see the pr workflow
oh i was replying to animal
o
oh yeah is ur voice message pr all ready
nah it was bugging for me a sec ago
idk but i will debug
oh im silly
i didnt restart main
i did this the first time i made the branch too lol
ok its fine nvm yea its ready actually wait
the it was just that the main frame didnt have the ipc handler for recording
cus i only did ctrl + r
ok nromalize
u can merg
**index.tsx: **Lines 149-152
// Normalize bins with easing
const maxBin = Math.max(...bins);
const ratio = 1 + (0xFF / maxBin - 1) * Math.min(1, 100 * (maxBin / 0xFF) ** 3);
for (let i = 0; i < bins.length; i++) bins[i] = Math.min(0xFF, ~~(bins[i] * ratio));
epic
wdym
they're prob fine
they're higher resolution under the hood (10 lines per second) but the react components for it downscales the wave when it renders
i fixed the target stuff @austere talon https://github.com/Vendicated/Vencord/pull/1477/commits/41f1fb038f2223527a02f34e633e7a3d28060b6f
did u look at the workflow
it does readdir on /plugins
this
uh
thats generatePluginList skill issue or smth
i think the actual build script should work fine
the build script did the same
it just is silent cus the fail case is just not bundling
cus all it did was .split('.').at(-2)
which with "plugin.vencordDesktop/index.tsx"
is gonna be vencordDesktop/index
actually the fail case is bundling with all targets
my b
no
oh i see the error
this if is wrong
it is always false for dirs
it should just have like
if (fileBits.length > 2) {
const idx = isDir(file) ? -1 : -2;
...
}
then it will work right
why
explain with code
i would just
its ok the fix works for both 👼
const files = await readdir("./src/${dir}", { withFileTypes: true });
for (const file of files) {
...
if (fileBits.length > 2) {
const idx = file.isDirectory() ? -1 : -2;
...
}
}
should work
its too late
idk buildscript so dirty
ive made a crater
irreversable
it will soon melt a hole on the other side of vencord
vns
🗿
yay i did it!
all in one for loop

now i gotta fix settings up
I know you've already done this but that was emulating the pc version. What im saying is about the mobile version
Out of scope, aka there probably wont be more than whats been done so far
It would be great if there was a plugin that replaces youtube embed links with invidious embed links.
Invidious is just a frontend for YouTube, they have the same style of urls and should therefore not be that hard to implement
Example YT vid: https://youtube.com/embed/2x5AazXfaJ0
Same vid on an Invidious instance: https://vid.puffyan.us/embed/2x5AazXfaJ0
The plugin would basically just have to have a settings page where you can choose what URL to replace youtube with, then it would...
@crude lake #1032200195582197831 message, you can read that channel's pins for instructions on how to manually install Vencord for adding plugins
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
It's already a plugin, just not built-in
sorry about the request then lmao

Still better than the people who spam the same generic BD plugin request or bump closed threads
vns
vns
bluecord rn when
Ⓜ️
shouldn't this rather be in the toolbox code
b4d0d95 fix vencord toolbox being unusable with drag re... - ryanccn
- add streaming activity
- add 2 timestamp modes which start when discord open or show local time for "how do i use unix timestamp?" people
- reload needed: true
- slice some string input (not link, idk what to do with link)
- no more "did u fill tooltip?", "dont put negative number there", "that line is too long", "did u restart discord?"
🙏🙏🙏
hot
lets make a vencord opencollective where we can put bounties on PRs for ven to collect when reviewed and merged
😭
hehe
Hello, I have a extension on my google chrome for ShareX, when you open the context menu of an image you have the possibility to upload it on ShareX.
Having the same thing as a plugin on Vencord would be really a good add.
Link: https://chrome.google.com/webstore/detail/sharex/nlkoigbdolhchiicbonbihbphgamnaoc
**eventPage.js: **
chrome.contextMenus.create({
"id": "ShareX",
"title": "Upload with ShareX",
"contexts": ["selection", "image", "video", "audio"]
});
chrome.contextMenus.onClicked.addListener(onClicked);
function onClicked(info, tab) {
chrome.runtime.sendNativeMessage("com.getsharex.sharex", {
URL: info.srcUrl,
Text: info.selectionText
});
}
how does this native message work
I can't find what's handling it
ah that's native manifest
Can't addons declare a native binding?
Cope as Apple products user
googled a bit and this should actually be trivial
ez
@languid terrace is this ur issue https://github.com/Vencord/Vesktop/issues/65
Maybe
what game wasnt working for you
No like, games that use the rpc API work fine
The ones with actual Discord integration
yea i know but it already has game detection
More like the programs that don't have it don't show up
name them please
cus basically
arRPC's server handles that, which already runs with vencord

but theres a bug where it doesnt detect games that run as admin
ok sick also dont open issues if u hate elaborating
I'm in vens country
Germany?
already implemented. if something isn't supported you should report it over in the arRPC repo https://github.com/OpenAsar/arrpc
bro get out of my hamburger
No 
okii
@spark cove what are u brewing
ohh fire
real
real real
bereal
Does vencord cloud get your password
no
i wish it did cuz my ass is hacked
sorry
it ok
only way to get it back is through discord support
(aka youre not getting it back)
I contacted them its been a day
i hate to say it but ur right
my phone is still attached to it tho
and my 2FA app
Hopefully they let me verify via sms?
is ur phone logged in lol
skul issue then
fuck
if you still have 2fa you might be able to get a password reset email
cause i believe they require verifying your current email to change it
i cant
they might not if they disabled 2fa
they got the current email verified
They didnt but my authy is still connected
then they have your email which means you have much bigger problems
i changed the password
- i got 2fa
thay seem to just have gotten my discord
Did you make sure to find the cause for the attack?
cuz they r stupid
yes i downloaded a new "game" from a friend
who was also hacked
a classic
I would highly recommend wiping your pc
those are scary cus they can stay
dw tho i got malwarebytes i think it caught it
dectected like 3 things
Its set to scan daily
It probably installed some random Software injecting into your apps
And im hella scaried to sign into anything
I doubt it will detect this stuff
IT DID
^
how did u verify the things it detected were the malware or that it was malware at all
im pretty sure that was all the shit the game installed
nuh uh
well a little
I highly doubt it. If it just modified a simple JS file and inserted some rce, it won't find it
wdym
i have a copy of it on my computer
you do?
That there's no detection if something uncommon has injected into an application
The malware is called voidogame or some shit
lol true
wtf
Riiight, thought I was there already
vap virus crashed explorer
lool why cant windows explorer handle renaming ogg files
dumbass
literally just ogg files 
wheres windows moment emoji
Using the wrong channel
yop
lmao silly ah
windows explorer is just dogshit
it is
every time it opens save modal in downloads folder it legit freezes for 30 seconds
and my Downloads folder isn't even big
mine doesnt freeze up
not to mention indexing is just slow and annoying
worst part is that indexing is synchronous
does w11 still search fucking bing for stuff on your computer lol
opening a folder that has majority audio files with make it synchronously read the metadata for every file
so bad
This is fairly trivial to do. For future reference, here's a working NodeJS snippet for posting data to Sharex (you need to enable Chrome extension in Sharex > Application Settings > Integration)
const { execSync, spawn } = require('child_process');
const { readFileSync } = require("fs");
const manifestPath = execSync(String.raw`powershell.exe -command "(Get-ItemProperty HKCU:\Software\Google\Chrome\NativeMessagingHosts\com.getsharex.sharex).'(default)'"`, {
encoding: "utf-...
real
YouTube Music users could really benefit from having a control/share plugin similar to Spotify's. The youtube client is here: https://github.com/th-ch/youtube-music
i dont think youtube has a player api
I don't like that this will possibly lead to unexpected presences. It would be much better if you instead used settings validators to achieve this, which will immediately give the user feedback
virus
what is THIS
what am i looking am
im so smart
real
idk what file that is
testing ur voice message pr
i apparently edited some file
o o oooooooooooooooo
vban vap spam
Gimme some users silly
ooooooooooooooooooooooooooooooooooooooooooo
ven? testing a vencord PR? more likely than you'd think
voice message
uhh
is that for desktop
if so its cus noiseSuppression is krisp but it doesnt work with that method
or
maybe its the webrtc one and i removed it cus it does nothigng
desktop
okay understood
yayaya
thank you vap
krisp sounds so hot here tho
where tf does this one come from
is that a discord component too
or urs
oh yours
so fire
looks hot 🔥
damn that's hot
nit: this is technically an anti pattern since intervals will slowly drift (aka not be consistently invoked every 1000ms). To avoid drift you should generally store the start timestamp and always recalculate this. But it also probably doesnt matter in this case
CODE NEEDS ROOM TO BREATHE ITS SUFFOCATING :(((((((((( 💔 😦
return (
<div className={cl("preview", recording ? "preview-recording" : [])}>
return (
<div>
<stuff />
</div>
)
based
i get it thjoi i do that sometimes on porupise
this is soOoooOooooOooo important tho
i feel like this could be @utils/misc instead
looks really good other than the aforementioned nits thank you a lot
i have reeeally similar code to yours for calltimer
**callTimer.tsx: **Lines 88-97
const [time, setTime] = React.useState(0);
const startTime = React.useMemo(() => Date.now(), [channelId]);
React.useEffect(() => {
const interval = setInterval(() => setTime(Date.now() - startTime), 1000);
return () => {
clearInterval(interval);
setTime(0);
};
}, [channelId]);
useTimer() when
I would love to be able to type automatically in cursive.
well
what should I type if I want everything typed in cursive?
yop
you can just add one rule for each character. you'll figure it out
can u test that commit
testing
this was almost so sad
i this wont work
when vencord loads lodash is still in nirvana
simply add lodash as vencord dependency 👍
i must window._
._.
._.
ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
i changed timer font to monospace @spark cove
otherwise the ui shifts when a digit changes lolol
cause 0:00 has different witdth than 0:01
TRUE
calltimer has same problem
i will fix
i didnt even read this
too scary
bet itzs cery good code
prettzy quick
NICE
could be better but this is fine
wdym
like how it is on mobile
hold to record, release to send
but in the chatbar like next to the gif icon
oh
might pr later
what does this do? could you please add a basicdescription
you can just do this via ViewRaw so this plugins is not very useful. Thank you anyway!
https://github.com/Vendicated/Vencord/issues/1488 is approaching oh no
what is that number
whats the relation
14 stands for the 14 words (just google it its a racist saying)
88 should be obv
wdym
WDYM vap 😭
yo guys quick question how can i start a timer in customrpc plugin
MIDI IS A """SUPPORTED""" FILE FORMAT
em
BUT IF I TRY TO SEND IT AS A VOICE NOTE IT CRASHES!
we just use audio/* mime type
why is midi audio/
because its
oh browser no support
an audio format
not really
no like
vns
Shaking My Head
whoever decioded that should eXPLODE
simply add midi support
yea
mp3s work fine though
i'd assume its the
audioContext.decodeAudio(blob)
i will add a midi to pcm
easy
iw anna do that now
hold on
wth baseaudiocontext is cracked
true
audio effects
yea im not a fan of the node system because its not very obvious to me how it works from the naming
i havent found a good visual of it yet
but i htink i know how it work in a basic way
ooo that gives me a great idea
ooooo
i know what im doing for the next 5 hours
modular audio plugin toolkit for mic and user output
FINALLY
(it is)
(thats from refined github, it stalls the PR accept until the checks pass)
(its not github)
not true
(you should try PR queue it does this for you now)
HOLY FUCK THIS RIFF
uh idk
what is pr queue
not now
idk but sounds hot
maybe will make dev branch obsolete
and then merges them
oh
i only use dev branch so i can merge multiple prs at once
ohh
and tests them and merges them all at once
its faster and means that if a PR breaks you can narrow it down relatively easily
github does something similar except automatically
and if a PR in the queue fails it doesnt break your codebase
and the rest of the PRs can carry on
Merge queue automates this process by ensuring each pull request queued for merging is built with the pull requests ahead of it in the queue.
The queue then creates a temporary branch that contains the latest changes from the base branch, the changes from other pull requests already in the queue, and the changes from your pull request. CI then starts, with the expectation that all required status checks must pass before the branch (and the pull requests it represents) are merged.
If a queued pull request has merge conflicts or fails any required status check, it is automatically removed from the queue when it reaches the front, and a notification is sent. Once the problem is resolved, it can be added back to the queue.
basically how rust rollups work
very useful because you can just batch queue a bunch of PRs and not have to worry about your software being broken
thank you! i am too lazy to review further so i will just merge :trollface:
i must read this page later
im not reading allat sorry lewi
if u want it fixed feel free to pr to voice messages or smth idk
oh was that about pr queue
ye
i thought midi stuff
maybe i read then



