#👾-core-development
1 messages · Page 130 of 1
its one digit too short
ve void guild.getMember("287555395151593473").edit({ nick: "mantikafasi" })
TypeError: guild.getMember(...).edit is not a function
at eval (eval at execute (/home/vendy/Vaius/dist/index.js:132:30), <anonymous>:1:44)
at Object.execute (/home/vendy/Vaius/dist/index.js:132:30)
at Client.<anonymous> (/home/vendy/Vaius/dist/index.js:706:17)
at Client.emit (node:events:529:35)
at Client.emit (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/util/TypedEmitter.js:15:22)
at Shard.onDispatch (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:566:29)
at Shard.onPacket (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:1064:27)
at Shard.onWSMessage (/home/vendy/Vaius/node_modules/.pnpm/oceanic.js@1.8.1-dev.08d3811/node_modules/oceanic.js/dist/lib/gateway/Shard.js:1265:29)
at WebSocket.emit (node:events:517:28)
at Receiver.receiverOnMessage (/home/vendy/Vaius/node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/websocket.js:1184:20)```
are you putting zero width char
ben cant code
ve (await guild.getMember("287555395151593473")).edit({ nick: "mantikafasi" })
undefined```
await my beloved
why does discord strip
WHY IS MEMBERS TAB BROKEN
fuck you discord
it doenst
"" accident ""
do "\u3000mantikafasi" 👍
ve (await guild.getMember("287555395151593473")).edit({ nick: "\u3000mantikafasi" })
undefined```
doesn't work
ve (await guild.getMember("287555395151593473")).edit({ nick: "\u3000" })
@austere talon fix
lets try all characters
\u3000\u0000\u0001\u0002"
what is hapepnig
yeah \u17b5 works
ve (await guild.getMember("287555395151593473")).edit({ nick: "\u17b5mantikafasi" })
undefined```
worked
donors take half of the members tab anyway
yoppp
do
@austere talon I want tts command permission
it does
yes it exists
I tried and got yelled by my friends
exists for me idk
minor issue with the site
Good
mad?
no ur phone just seems like its about to become an IED
i had 1k tabs but then closed all
now im back to 200
what
no
why do you need a plugin for something you can already do?
they just want to read messages
huhwhat
deleted messages?
that's not possible
its not possible to retrieve all messages. doing so is api spam and against our rules
you can request your data package. it contains all your messages.
now stop talking about this here
If you have a CORS error with your theme just add it to quickcss, otherwise it is just a hassle to handle in online themes. This is how it worked before, and I'm going to keep it like this.
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
This PR is also ready for review (if anyone would like to)
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
google.cat
ok now what
where are all the cats
The option to enable hardware acceleration is not in the settings, perhaps that has something to do with this issue?
will this support windows 7 soon?
blud thinks hes jeremy clarkson
I don't know if this is just a me issue, an issue with my install, or if i just screwed up installing something else but for whatever reason when I screenshare audio with vesktop, it creates the vencord-screen-share input, but it never gets any audio. It works when I use helvum to put audio into the input, but it doesn't work when I try to set it up through vesktop.
I am using arch-linux (here is neofetch)
 return <></>;
does the main branch get updated nightly with pulls or is it just whenever
Did adding other links work before? I thought you said they didn't. The themes that don't work redirect to other websites that are blocked by CORS, hence why they throw errors.
I'm not sure if I want to remove it anymore, I might in the future but I don't see any problems with it actually. The code might honestly be more cluttered if I remove it.
I tried using inline styles at first. The problem is that the Button component from @webpack/common has its text contained in a separate div element. The only way I was able to style the text was by using the innerClassName property.
Include the <style> tag inside that component then, don't insert it into the dom like this
@spark pivot should i resolve the conversations?
If you've fixed them then yes
Did adding other links work before?
Yes I can just put in the text box. For redirects it says failed to fetch but the theme loads and using the domain works perfectly fine.
im pretty sure returning <></> does not create a dom node
ok
add magane to vencord so i can use stickers from line ok ty https://magane.moe/
wait this is pretty cool
the fact that they use svelte is really cursed tho lmao
im surprised they havent just made a proper vencord plugin for it
i sorta want to make it official
im scared
do it- the more plugins the better imo- just make sure you do it right
i mean we'd have to rewrite the whole thing
oh my god why is it just one massive file
https://github.com/Pitu/Magane/blob/master/src/App.svelte
oh maybe don't do that then
its entire existence is a violation of the vencord coding standards
and is a terrible hack
so
oh you mean the magane thingy
that checks out
eh i mean its fine
ive seen worse :p
ive seen plugins bundle massive libs like nodejs ws
vomit
i wonder why magane has so much code
it shouldnt really need too much code
it just adds a sticker picker clone, right?
except with line stickers
ya kinda
ok so doing magane itself seems completely unnecessary but modifying the sticker picker to have.. line? stickers- and also that favourites thing- would be cool
i think it could be rewritten fairly simply using discord's components and stuff
yeah ok don't mind thre sticker i was checking you can't favourite them
which also like- why?? you can favourite emojis- and gifs-
though also all 3 of them have completely different UIs lmfao
whar?
u can
how
oh ok so you can it just... doesn't work the same way as emojis
why tf can't you alt+click them to favourite
Is there a simplified guide for enabling third-party compatibility for Vencord that could be done by someone with fuck all experience with development outside of a class centered on visual basic of all things like 10 years ago?
I just wanna slide BetterFormatting Redux into my install lol
(btw random ass thing to bring up but im interested cause it has my contributions in it :3 do you reckon the textreplace pull request could be merged soon?)
Yea ikr
its kinda... badly built?
idk if i should say that
but the end result is cool

they do say its chaotic
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
devilbro vibes
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
The only mf who'd need 500 lines to hide blocked users
me doing it in one CSS line
shh dont tell him
is that real?
529 lines?
it's real
y e p
his css is almost worse
/**
* @name BlurpleRecolor
* @description Replaces Discord's native Blurple and Boost-Pink with your own Color
* @author DevilBro
* @version 1.0.0
* @authorId 278543574059057154
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Themes/BlurpleRecolor/
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Themes/BlurpleRecolor/BlurpleRecolor.theme.css
*/
/* To change stuff like the colors, transparency and background image, change the variables inside the root {}, do NOT change the @import url() */
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/BlurpleRecolor/BlurpleRecolor.css);
/* All colors are in RGB format (red, green, blue) use: https://www.google.com/search?q=colorpicker */
:root {
--accentcolor: 163,47,194; /* blurple - default: 88,101,242 */
--accentcolor2: 225,115,180; /* boostpink - default: 255,115,250 */
--linkcolor: 190,60,220; /* link - default: 0,176,244 */
}
this whole thing is just to replace blurple
with another color
check out the import
the CSS selectors he uses 💀
who tf formats css like that
it must take actual effort to make it like that
surely it cant just be lack of knowledge
he has to being going out of his way to acheive this
I don't think so
maximum readability
reject ! important
embrace #app-mount . class
eslint gives me error Invalid header simple-header/header no matter what i do
anyone know how to fix this?
ive tried both scripts/header-new.txt and scripts/header-old.txt
do pnpm lint:fix
thanks that worked
np
Sends a notification when a message matches any number of regex cases.
yippee
@misty raptor maybe separate inputs for separate regexes instead of separating by newline?
text replace does it
oh it does didnt even realize
i use notepad++ 💀
banned
ok thats definitely something i might do
tsc????
run npx tsc
**index.tsx: **Lines 134-145
async function onChange(e: string, index: number, key: string) {
if (index === rulesArray.length - 1)
rulesArray.push(makeEmptyRule());
rulesArray[index][key] = e;
if (rulesArray[index].find === "" && rulesArray[index].replace === "" && rulesArray[index].onlyIfIncludes === "" && index !== rulesArray.length - 1)
rulesArray.splice(index, 1);
await DataStore.set(rulesKey, rulesArray);
update();
}
then when im done fixing i copy back over to the main and delete the copied directory
please please please use vscode 😭
i love native ui
use lapce then
i only used it to check for typescript errors
if u actually try to build vencord with tsc it will not work
i might just make it a button cuz easy
lmao textreplace was look like that when i pr it
massive textarea
but UX 
i think a button is better ux
its more explicit
i didnt even know textreplace could do that thingy until it happened which is like not the best cuz u want the end user to understand everything as quick as possible
- always having one blank field can make some people angry (like me)
patches: [{
find: "isRawMessageMentioned:",
replacement: {
- match: /isRawMessageMentioned:function\(\){return (.{1,2}).{1,512}function \1\(.{1,512}?=(.{1,2});return/,
+ match: /(?<=isRawMessageMentioned:function\(\){return )(\i)/,
replace: "e => Vencord.Plugins.plugins.KeywordNotify.contains(e, $1)"
}
}],
- contains(e) {
+ contains(e, original) {
- return regexes.some(a => e.rawMessage.content.match(new RegExp(a)));
+ return regexes.some(a => e.rawMessage.content.match(new RegExp(a))) || original(e);
}
i think this is better
pnpm test exists
also instead of compiling regex on every message why not do it at once when you're splitting and and setting the datastore key?
np++ is 🔥
or does vencord datastore only support json serializable primitives
it supports anything that is structured cloneable
i see
yeah i took a look
do you reckon the textreplace PR is "finished" persay? or ready for review
yes
just tried lapce
my install bricked after i installed the typescript / javascript plugin
lapce is still in its early development, and rust gui is far from being mature
jetbrains maybe
why would you not just use it
it runs really well
ill use it if i cant get lapce to work
its working. you can only reply to search results that are in the channel you are in right now. try replying to a message thats in this channel only
yes, i did that, nothing happens
i specifically searched this channel

ty autumn 

Some of the telemetry code is accessible to the public, but according to Visual Studio Code maintainers, some telemetry functionality is also added to the program before it is released with a proprietary license.
microsoft moment
yes, vscode is proprietary
Code Oss is free/libre
you can use code oss from arch repos or vscodium for a fully free version
INSTALL VSCODIUM
Vscodium doesn't support WSL IIRC
why tf would u use wsl
Because I use windows and hate everything relating to programming in windows
.vscode folder
The "recommend" message is from vscode folder
usually, when i'm in a discord call, it's with my partner, and both of us deafen each other since we speak over mumble and use discord's screensharing feature to watch youtube videos or play games.
in order to prevent having to close the screenshare and re-open a new one whenever either of us decide to do something else, we usually use the "entire system" option to capture all audio all of the time, and then i have to open helvum (pipewire patchbay) to disconnect mumble from vesktop, so t...
vscode workspaces
they're amazing
well because of michaelsoft obviously but if you're a maintainer this is ballers
Doesnt vs codium miss some extensions
vs copium
yeah
build vscode yourself without telem trolleyzoom
disclaimer i havent used codium for years so i dont know if thats still an issue
Hiiii,
Issue
I noticed an issue where if you start Vesktop without an internet connection, it will crash due to a DNS error and then fail to ever start up. I get this every time I boot up my laptop, because connecting to Wi-Fi takes longer than Vesktop loading(good job!)
Then followed by Shiggy, constantly wiggling, to no end 😔

what? that makes no sense
how did i not know this was a thing 😭
are you trying to just load custom vencord on vesktop?
scroll down in vesktop settings..
where is that?
well like how do I get a valid installation in dist
apologies for being dumb
why building
getUserAvatarURL:C works but getUserAvatarURL:\i doesn't 🥺
you can't use \i in find if that's what you're doing
oh yeah right that's not a regex
test every module aganist a regex nothing could possibly go wrong
don't use \w
what should i use instead
you literally just used it 5 minutes ago
i wonder what other thing could be used to match identifiers

u already had it correct
why change it
i wonder
fiery said the patch was shit
also that patch doesnt look like it works lmao
\i 
and yeah that replacement won't work
you can't use arguments in arrow func
yeah I'm realizing there's a few typos I made
Discord Account
lockieluke3389#5305
What happens when the bug or crash occurs?
The current installer(built from source)fails to install OpenASAR with Vencord
What is the expected behaviour?
An OpenASAR menu would appear in settings
How do you recreate this bug or crash?
- Install OpenASAR with Vencord Installer
- Restart Discord and go to settings
- OpenASAR menu is not there
Errors
No response
Request Agreement
- [X] I am using Discord Stable or trie...
that will match the : function one
although I guess i can still make it work using thag
wrong repo
you ignored the clear warnings telling you NOT to open an issue
we don't provide support for arrpc
oh yeah uh that's true
but they were talking about openasar 😭@vending.machine#0000
thanks discord
ok i made the patch better ts { find: "getUserAvatarURL:", replacement: { match: /(getUserAvatarURL:)(\i),/, replace: "$1(user,anim,size)=>$self.patchGetAvatar(user)||$2(user,anim,size)," } }
user, anim, and size would be minified no?
this is starting to look close to what i want to do...
youd need to extend the patch to get them
is there a way to do a "before" patch?
i made the patches and settings better and stuff
like i just want to change the arguments sent to a function
patch the start of the function??
?
i have this written for BD and it would be fun to port it to vencord ```js
onStart() {
const module = WebpackModules.getByProps("getApplicationIconURL");
Patcher.before(module, "getUserAvatarURL", (thisObject, args) => {
if (args[2] === 80) {
args[2] = 300;
}
});
Logger.info("Plugin enabled!");
}
the pre-patch is getUserAvatarURL:C
:C
from the getUserAvatarURL arguments
we dont monkeypatch and it will be rejected if you do
show the module
idk what you mean it's literally just the arguments passed to the function
they shouldnt be unminified like that
i see
i would still assume it would be possible to get the same result without monkeypatching
yop
this is really easy to do in vencord
is there an online version of the patch helper so i dont have to build dev
i can imagine
WHAT IS WRONG WITH MY MOUSE SENS
ok based on the reaction i assume there is not
good question lol
i will make it
i wish there was a patch helper outside of discord itself
you have any pointers on where i should start?
i find patch helper's visualization of the patch to be extremely helpful
same
im so confused what extension
maybe..
THIS EXISTS?!

it's always been phinicky where the Test Patch/find options show up in my experience
but yes it exists
cause the parser is very simple
it only supports plain patches
for example this is not supported:
...["thing", "otherThing"].map(t => ({
find: t,
replacement: {
match: "banana",
replace: "banana"
}
})
This plugin treats super reactions as regular reactions by immediately normalizing reaction objects upon receiving applicable store events. I've tested it, and it seems to work just fine. Thanks.
ic
true throwaway-123456 moment
my biggest plugin opp
not throwaway throwing away an entire plugin
true throwaway-123456 moment
hrmm maybe this should be part of super reaction tweaks
Dev.throwaway-123456
why they put it in an array
thats what devs is
why is it so typed
yea tbf it would prevent two plugins breaking eachother
they did [0n]
yeah
this seems overly complex
it shouldve been {name: "", id: 0n}
its either u use a dev constant or u specify name and id
yeah
is it not dev constants only now?
I thought they were tryna stop the name and ID
anonymity and ownership of a plugin dont really mix well
i was told to use dev constants for my plugin
so i guess
if someone really wanted i guess they could ask to be anon
could just have an "anonymous" dev or wtv
since youre pring it
oh if only it would get merged one day 🙏
real 🙏
wait could you not just... hide supers via css?
or just display them the same as regular ones
most likely yes
nearing a month since i started working on decor again
how many hours did u spend on that plugin
great question probably far too many
you have to add to Devs
you cannot use an inline object
you can just make the authors array empty ( maybe idk )
[class*=reaction_] {
animation: none !important;
background: var(--background-secondary) !important;
}
[class*=burstGlow__],
[class*=effectsWrapper__] {
display: none !important;
}
[class*=reactionCount_] {
color: var(--interactive-normal) !important;
}
[class*=hideEmoji__] {
opacity: 1 !important;
}
yea I had something similar to that but it still animates on hover
I think it does need to be done via a plugin
i think i fixed it
oh yea that works sweet
.reaction_fef95b[class*="reaction_"] {
animation: none;
background: var(--background-secondary);
}
.reaction_fef95b [class*="burstGlow__"],
.reaction_fef95b [class*="effectsWrapper__"] {
display: none;
}
.reaction_fef95b [class*="reactionCount_"] {
color: var(--interactive-normal);
}
.reaction_fef95b [class*="hideEmoji__"] {
opacity: 1;
}
i had this which
i think is wrong
lol
is it a good idea to use selectors or js !important for quickcss
id just use important for userstyles
@austere talon i tested throwaway's plugin tbf it works well
SortFriendRequests broke
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
None
None
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function
None
None
ooop
You can name function arguments anything
The patch just changes getUserAvatarURL:C to getUserAvatarURL:(user, anim, size)=> $self.patchGetAvatar(user, anim, size) || C(user, anim, size)
i only started getting these errors after i installed the eslint plugin for vscode
very annoying
auto fix does not solve the errors
pnpm lint does not give these errors
just the vscode plugin
try deleting the headers and let lint on save fix it
when i do that it re-adds the headers but the errors still persist
whats the header its adding
/*
* Vencord, a Discord client mod
* Copyright (c) 2023 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
still persists
No quick actions available?
still persists
damn
hey, how do I submit a idea?
I have an idea to hide the nitro badge beside the username and file uploads when this annoying experimental feature eventually rolled out of all of us
sorry, I am new to Vencord, how do I do that? Where do I modify the text?
quick css
thx
As a NixOS user, I'm accustomed to writing config files via home-manager, which are installed as symlinks to a read-only file in the Nix store. Unfortunately, Vesktop doesn't seem to like that...
{
find: '"ProfileCustomizationPreview"',
replacement: {
match: /(let{.*?),?pendingThemeColors:(\i)(.*?),pendingProfileEffectID:(\i)(.*?}=(\i),?)/,
replace: "$self.previewUpdate=Vencord.Webpack.Common.useReducer(()=>({}),{})[1];$1$3$5[$2,$4]=$self.profilePreviewHook($6),"
}
}
so scuffed but works (only after the first user triggered update it seems) 💀
had to do this to force update the profile preview on the profiles settings page
anyone know a better way to do this?
push the changes to github so we can see what profilePreviewHook is and also run it
vns
wtf is that issue
almost all software needs to persist data to the disk. im not sure what you're expecting. just don't make it readonly
ok but why exactly does the settings.json file need to store the window position
so vesktop starts where you closed it.
ok but
basic UX
why not store that in like localstorage or something
**mainWindow.ts: **Lines 314-330
function initWindowBoundsListeners(win: BrowserWindow) {
const saveState = () => {
Settings.store.maximized = win.isMaximized();
Settings.store.minimized = win.isMinimized();
};
win.on("maximize", saveState);
win.on("minimize", saveState);
win.on("unmaximize", saveState);
const saveBounds = () => {
Settings.store.windowBounds = win.getBounds();
};
win.on("resize", saveBounds);
win.on("move", saveBounds);
}
Day 889893 of asking for a free avatar decor plugin 😇
continue asking till you reach 2**32-1 days
Pretty self explanatory. The current OSX installer is built for x86_64 and Rosetta 2 has to be used
to open it on an M-Chip Mac. Universal Binaries include both architectures.
Also makes sense if Apple being Apple deprecates Rosetta 2 at some point.
Cheers.
I am writing a plugin to change/replace the message content that is displayed on the UI, if it matches certain conditions. Would the best way to do this be the patches way? What can I use for the .find parameter if so?
I took a look at a couple of plugins (linked below), but I'm still confused about what to match and replace. Thanks!
https://github.com/Vendicated/Vencord/blob/main/src/plugins/invisibleChat.desktop/index.tsx
https://github.com/camila314/vencord-KeywordNotify/blob/main/index.tsx
isn't there already a textreplace plugin?
If I understand how that works, that only replaces the messages you send by adding a presend hook right?
yes
I want to replace stuff that's from other users too
say someone's message says "cat", I want to replace that with "dog" etc.
you'd probably need to patch MessageStore and the handlers for MESSAGE_CREATE and MESSAGE_UPDATE
I took a look at the moyai plugin and tried to set the message.content to something else in the listener, but that didn't work, so ig I have to do a patch :P
Fuck off 😇
No
is there any plugin that has an example of patching a handler btw?
**index.ts: **Lines 257-263
find: '.displayName="UserSettingsProtoStore"',
replacement: [
{
// Overwrite incoming connection settings proto with our local settings
match: /CONNECTION_OPEN:function\((\i)\){/,
replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
},
**index.ts: **Lines 40-52
...[
'displayName="MessageStore"',
'displayName="ReadStateStore"'
].map(find => ({
find,
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
replacement: [
{
match: /(?<=MESSAGE_CREATE:function\((\i)\){)/,
replace: (_, props) => `if($self.isBlocked(${props}.message))return;`
}
]
}))
Ah I see, thanks for this <3
there is also another place you can patch
let me show you hold on
t.content is the raw message content
p is the rendered one after it has been parsed
you could modify t.content there
prob modify and not touch the original actually
this is a find for that file https://github.com/Vendicated/Vencord/blob/main/src/plugins/fakeNitro/index.ts#L280C20-L280C73
**index.ts: **Line 280
find: '["strong","em","u","text","inlineCode","s","spoiler"]',
almost all software needs to persist data to the disk. im not sure what you're expecting. just don't make it readonly
Almost all software cleanly separates user settings from application data though. Obviously you are going to need a place to cache stuff, but a settings.json shouldn't really change much beyond what the user does themselves.
Many people like to manage dotfiles in a central repo and one way of preventing drift is to make those dotfiles read-only. I don't see how NixOS i...
Scrumplex!!!!!!
ah I see, this is promising, thank you so much.
They renamed canUseStickersEverywhere to canUseCustomStickersEverywhere apparently
thanks for merging that quickly
no problem lol
discord when they change something for no reason ?
sorry for the 10 hour delay
https://github.com/ryan-0324/Vencord/blob/main/src/plugins/fakeProfileThemesAndEffects/index.tsx#L429-L441
**index.tsx: **Lines 429-441
profilePreviewHook(props: any): [[number, number], string] {
let colors: [number, number] = props.pendingThemeColors;
let effect: string = props.pendingProfileEffectID;
if (preview) {
if (primaryColor !== -1)
colors = [primaryColor, accentColor === -1 ? primaryColor : accentColor];
else if (accentColor !== -1)
colors = [accentColor, accentColor];
if (effectID !== "")
effect = effectID;
}
return [colors, effect];
},
i wrote this while trying to get it to at least work
for some reason im only able to force update the component after at least one user triggered update has occured
i call previewUpdate() to force update the component
this is definitely not the best way to do this
- Maximize the window
- Minimize it (you can also close it afterwards, doesn't matter for the end effect)
- Double-click the Vesktop tray icon or use its Open action
Result: the window is now in "windowed" state - neither maximized or minimized. Looks like it's always the windowed state stored prior to maximizing and minimizing doesn't store maximized state.
Discord behavior, expected by me and present in the patch version of Vencord: the window opens as maximized.
do i need smt special to see the react dev tools?
why would they not?
Almost all software cleanly separates user settings from application data though
yes?
i don't understand what you're trying to say, sorry
you can do $self.previewUpdate=Vencord.Util.useForceUpdater(); instead of a useReducer.
i really understand what the purpose of previewHook is yet, ill debug it a bit more and see
previewHook sets the theme colors and profile effect used for the profile preview
if 3y3 Builder Preview is off, the theme colors and profile effect of the preview do not get changed
dispatch a user account update
still only works after the first user triggered update of the preview component
this works ryan
ill try that
i don't understand what you're trying to say, sorry
Judging by the interface definition of Settings there are several values that aren't really user settings like windows state or firstLaunch and skippedUpdate. Obviously these are gone trigger the save handler, without the user intending to.
Those would belong in separate state files preferably in .local/share
I would be happy to implement this and som...
is vencord crashing when using the inspect element mouse thing normal
it crashes and logged all accounts off
okey
thanks, that worked
preferably in .local/share
no. they should be in .config, alongside the other files. putting them in a separate file is not a bad idea though. for example state.json, in the same directory as settings.json
np
prs welcome, just make sure to preserve backwards compatibility, for example by migrating them from the old file
const previewUpdate = () => FluxDispatcher.dispatch({ type: "USER_SETTINGS_ACCOUNT_SUBMIT_SUCCESS" });
{
find: '"ProfileCustomizationPreview"',
replacement: {
match: /let{.{1,500}pendingThemeColors.{1,500}pendingProfileEffectID/,
replace: "$self.profilePreviewHook(arguments[0]);$&"
}
}
profilePreviewHook(props: any) {
console.log(props);
let colors: [number, number] = props.pendingThemeColors;
let effect: string = props.pendingProfileEffectID;
if (preview) {
if (primaryColor !== -1)
colors = [primaryColor, accentColor === -1 ? primaryColor : accentColor];
else if (accentColor !== -1)
colors = [accentColor, accentColor];
if (effectID !== "")
effect = effectID;
}
props.pendingProfileEffectID = effect;
props.pendingThemeColors = colors;
},
can you see if this works? @dire trench
thanks that also works
np
can someone explain how the architecture of betterdiscord and vencord differ? i see general statements like "vencord is faster and uses less memory", but would like to understand how this is achieved to convince myself to switch over
also probably gonna get biased answers, but i assume vencord just has more robust engineering since i saw typescript. comments on this would also be good
vencord doesn't use monkeypatching, which can be quite slow
it patches the modules as they get loaded with source code patches
that's the main difference
using colorsighted as an example
**index.ts: **Lines 27-33
{
find: "Masks.STATUS_ONLINE",
replacement: {
match: /Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,
replace: "Masks.STATUS_ONLINE"
}
},
we're patching all of the other status masks out and replacing them with just the online mask
@acoustic escarp
the using less memory comes from vencord not needing extremely large plugin libraries to run basic stuff, so vencord only includes what it needs for its plugins
regarding robustness, yes i'd say we are more robust than bd
everything goes through quality control before it makes it into the mod
and plugins are encouraged to be written in a way that makes it survive updates
thanks for the quick reply :D this is convincing enough for me to switch lol
npnp ^^
to be clear, i doubt the way the two mods function makes much of a difference on performance
mostly just that a looot of BD plugins are terribly written because they have no quality control
many bd plugins also have tooons of very bloated code. Devilbro's plugin library for example is bigger than the entirety of vencord including all ~130 plugins
this is completely unreadable
devilbro needed ~600 lines to hide blocked users its actually crazy
i went through and read some n choked
Stable 244133 (351234d)
Vencord 86e9434 (Vesktop V0.4.3)
Electron 27.0.2
Chromium 118.0.5993.89
Windows 10 64-Bit
Here's a video I recorded after uninstalling, deleting all vencord-related folders from %appdata% and %localappdata% and installing. Didn't touch any settings after logging in.
Vesktop does not provide showOpenDialog method like DiscordNative.fileManager.showOpenDialog.
If some plugin need to open file dialog to select a directory for some tasks, then there's no way to do it.
Example: vc-message-logger-enhanced
So we need to provide showOpenDialog to a plugin developer.
To without headache, I decided to use showOpenDialog same as Discor...
@rustic nova wtf is this https://github.com/Syncxv/vc-message-logger-enhanced/blob/master/utils/freedom/importMeToPreload.ts
Contribute to Syncxv/vc-message-logger-enhanced development by creating an account on GitHub.
that completely ruins security. it's a sandbox escape and if discord ever has an xss again, people can use it to run malware on your pc
dont do that
you can achieve the same while still preserving proper security, by adding ipc methods for
- selecting a directory to write files to
- writing files to the currently selected directory
alright, how about i move all the filesystem work to that importMetoPreload.ts file like VencordNative, and just call that through the ipc
yes something like that
aight sure. ill get to it after my finals 🫡

just reaching out cause i don't want vencord users to have a less secure discord
even if the plugin isn't official
nice, i respect that. glad to be apart of the best client mod 😎
there's really no good argument for having this ipc method
plugins having any use for this ipc method implies that the plugin code has security issues (the renderer being able to write arbitrary files => sandbox escape), as is the case for MessageLoggerEnhanced
Instead of allowing arbitrary file write to the renderer, plugins should add ipc methods for scoped file write, and also an ipc method for showing the open dialog (handled entirely in node, so the renderer cannot manipulate its v...
if you need any help with the ipc part, let me know and i'll be happy to help
also, i might write a better way to have native code in plugins soon so people wouldn't even have to patch vencord
the idea is to implement the following:
// src/plugins/YourPlugin/native.ts
import { readFileSync } from "fs";
export async function readPasswd() {
return readFileSync("/etc/passwd", "utf-8");
}
// src/plugins/YourPlugin/index.ts
const Native = VencordNative.pluginHelpers.YourPlugin as typeof import("./native");
console.log(await Native.readPasswd());
woah, im very interested in this. wouldnt mind help implement this.
hm
wondering if that should be a func call or a prop access
i guess prop access for consistency
i think automatically typing VencordNative.pluginHelpers.YourPlugin would be impossible / very hacky, so the as typeof import("./native") would be necessary to have types
but i already have an idea for implementing it
unless the plugin explicitly registers what natives it wants 
no
can we add natives late?
just functions you export will automatically be made ipc methods
why would we do that
typing
unless we generate a .d.ts file which is deranged cause you will get type errors until you run a command
also not possible without explicit cast
it's pretty simple:
- the build script node bundle will glob src/plugins/*/native.ts and put it all in one object like
{ YourPlugin: { method1() {} } } - for every method, an ipc handler called
VencordPlugins_YourPlugin_method1will be registered - ipcRenderer.sendSync("VencordGetPluginMethods") will return
{ YourPlugin: ["method1"] } - ^ is called in preload and used to build an object pluginHelpers that automatically calls the ipc methods
fully automated but u need to type cast it manually
cause there is no way to do this automatically in typescript, other than generating a .d.ts file and i dont like that
for obvious reason, it will only be available on desktop/vesktop - though plugins can still be hybrid and function on web as well without their native side ( like OpenInApp currently )
no
that's unfortunate
they could make it possible if the variable is a compile time constant
but then whats the point
Ven a lotta people are saying fakenitro stickers are broken, has that been fixed or is it at least known?
okay sweet
kk
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function
None
None
NoTrack (found no module):
ID: -
Match: window.DiscordSentry=
FakeNitro (found no module):
ID: -
Match: canUseStickersEverywhere:function
None
None
it didnt have the bump commit
i finished writing this
I rebased off main
it sucks so much having to create prs to push to main
github so bad
ye but its so bad you cant add permissions for someone to ignore it
ikik
cooking going well
hmmm
to type properly, we'd need to drop the first argument of each export
thats probably horrid with ts
export type PluginIpc<PluginExports extends Record<string, (event: Electron.IpcMainInvokeEvent, ...args: unknown[]) => unknown>> = {
[key in keyof PluginExports]:
PluginExports[key] extends (event: Electron.IpcMainInvokeEvent, ...args: infer Args) => infer Return
? (...args: Args) => Promise<Return>
: never;
};
copilot wrote this
IT WORKS
PROMISE PROMISE
LETS GOOO
this is fine imo
PR is now ready
have a look @turbid hatch @rustic nova
i should probably test that it fuuuully works
oh i already found a silly issue heh
superseded by https://github.com/Vendicated/Vencord/pull/1965 - thanks a lot aynway for your effort!
#1965 doesn't actually have a convenient way to inject into frames, but rather just the ability for any plugin to have native code
However, it would be fairly trivial to export a basic frame patching api from ipcMain, like
addFrameCallback("MyPlugin", frame => {
if (frame.url.startsWith("https://open.spotify.com/embed")) {
frame.executeJavascript("...")
}
})
also that is still targeting main cause i forgot when i made the pr lol
grafik jumpscare
im pulling native branch rn 
also i just learned uploading an image into a comment adds it in the repo owner's assets
did not know lol
more like did not pay attention whenever you posted it
i found it
0c52590 move type into more appropriate file - Vendicated
62cfa27 fix: don't include target in property name & om... - Vendicated
are you pushing this into dev first or straight into main
eh ill just change to dev anyway
i havee so many tabs open hwo do you shithub
i was thinking the same i need to test it with native changes anyway
btw https://docs.betterdiscord.app/plugins/advanced/webpack is pretty useful for vencord devs as well
also @turbid hatch, looks like BD is very close to usercss theme support
never thought bd would see usercss
YESYESYESYESYESXESXRDXFDXGFFGTGJ
what do i have to do to the function for it to be included in native?
export async function sendToOverlay(_, data: any) {
data.icon = Buffer.from(data.icon).toString("base64");
const json = JSON.stringify(data);
xsoSocket ??= createSocket("udp4");
xsoSocket.send(json, 42069, "127.0.0.1");
}
``` same code as it's always been, except the ipcMain.handle removed since its not needed cause of this pr(?)
just that
export it from native.ts and it'll be available automatically on your plugins ipc object
look at the example in my prs description
i also proposed the dependencies idea to zere
odd that it isnt then
you need to hard restart to load main changes
i've.. been doing that?
ctrl r isn't enough
oh
show code
and make sure u use the silly branch and not dev or main
mhm
i still need to change the screenshot
wait do we still have funny bot
**index.ts: **Line 117
const Native = VencordNative.pluginHelpers.XSOverlay as PluginNative<typeof import("./native")>;
**native.ts: **Line 11
export function sendToOverlay(_, data: any) {
wuat
XsOverlay
oh lmfao
if uses the dir name not the plugin name (first char is uppercased and last .suffix is dropped)
ah i see
well xsOverlay? no one types it like that but to stay consistent w literally every other plugin lol

oh didnt see ur edit
don't think too much just check VencordNative.pluginHelpers in console xd
@austere talon btw if a folder has dashes in it it will error. for example a plugin repo/folder is called vc-epic-plugin.
here are the errors:
X [X ERROR[] Expected "}" but found "-"
import-natives:~pluginNatives:10:2:
ERROR 10 │ Vc]- epic-plugin:p3,
│ Expected "}" but found "-"^
import-natives:~pluginNatives:10:2:
╵ 10 │ Vc}-
1 error
epic-plugin:p3,
│ ^[watch] build finished, watching for changes...
╵
}
1 error
don't do that
but many plugins already have dashes in the repo name
no?
i mean third party plugins
bd plugins?
?
nvm
vencord plugins bruh
just replace the dashes then
#1032200195582197831 message
#1032200195582197831 message
for example these plugins have dashes in the name. people who already cloned the repo wont be able to build. if they want to add a native feature late on
much better image
mk is done gonna push when it gets merged to dev
that isnt very user friendly
also third party plugin devs who use this native feature will have to change the repo name.
heres a possible solution
vencord already has a way to get the plugin name based on the path of the plugin. https://github.com/Vendicated/Vencord/blob/main/scripts/generatePluginList.ts#L93C45-L93C45
use this to find the name of the plugin and use that instead of the folder name.
since this is being done at build time the performance shouldnt matter too much, and you can add checks like if it is a user plugin and check if it has a dash in the name and then only call that parseFIle function.
**generatePluginList.ts: **Line 93
async function parseFile(fileName: string) {
its already not user friendly they're installing a third party plugin lol
third party plugin devs who use this native feature will have to change the repo name.
git clone <repo> <desired folder name>
wouldnt it be better to just fix this? what advantages comes from not fixing this?
Because literally no one cares
Just rename it
It’s two clicks
Third party plugins aren’t supported and we don’t care if they work or not
They aren’t managed by us at all, we don’t care what they do with them. If this was a problem with actual plugins then we’d fix it, but it isn’t
who are you
third party plugins are supported
ven just says if you dont know what you are doing dont mess with it and cry for help
if 3rd party plugins were unsupported we wouldnt have #1032200195582197831
is there even a point of cloning repos btw
does vencord auto update those
actually nvm some plugins have css files too
Aka we don’t provide support/maintenance to them
at the and support for them exist
The owners do what they want with them
you can create userplugins folder and thow anything there
just problems with it is not supported
That’s exactly what I mean
if dashes cause problems I think it should be fixed tbh
check if userplugin has a dash in name then explod computer
yopppp
best idea is just to not use dash in plugin if ur gonna want a native feature
if u already have one use whatever name in plugin and tell ppl to rename to that, or change repo name or both
but either way explod
doesnt really matter as they'll figure it out as they always have
I just find it so dumb
to tell people "rename while cloning" or "rename your repo" instead of fixing the thing
dashes make it more readable
and some new user wouldnt know dashes cause problems
well yeah
why in fake nitro sticker bypass not working?
i wonder
💀
bro changed it to the discord logo too
wtf 
Bro funny
💀💀💀
I tried this, an issue is that the crypto libraries and functions are async and it appears that I can't call async functions here. Any other way?
he probably didnt want to set up android studio
(its pain)
and also building
probably thought it had actions which auto builded apk
no i doubt they are that smart
this is their only other repository
well he created a release
I think that confirms it
He wants to hide that he’s a furry ( most vencord users)(I’m joking)
(that's not a joke)
Unfunny joke
go and test :3
lets merge first cause itd be funny
"we had usercss before it was cool"
ahh i see
that's working well from what i see
are there any real guidelines for third party plugins? bc with the native plugins you can easily share shit thay makes things unfair (i say as if i dont have a plugin that enabled putt party devmode)
my ipcplugins pr was closed right
yeah okay
tried that
i got no signs it installed at all
then adds 100mb of memory usage
i just yoinked https://github.com/Vendicated/Vencord/pull/1742
* This file is based on AdGuard's Block YouTube Ads (https://github.com/AdguardTeam/BlockYouTubeAdsShortcut).
like where
spotify embeds?





