#๐พ-core-development
1 messages ยท Page 29 of 1
FREEEE ???
Can't I'm busy making this the most commented pull request on github
I hope you explode
I hope you explode
I hope you explode
I hope you defenestrate yourself
I hope you explode
merge and we will stop
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
Discord Account
lewisakura#1337
What happens when the bug or crash occurs?
The entire Discord client crashes due to the Card component not being found.
What is the expected behaviour?
The Card component renders.
How do you recreate this bug or crash?
- Open Vencord settings or any other page with a Vencord-provided
Card
Errors
Error: Vencord could not find the Card Component
at o (VencordWeb:12:248)
at Sa (45eb806cdd178e4f93a2.js:1608:54)
...
This tyranny can no longer exist, I have uncovered all your secrets @austere talon
You prioritize the PRs of the people that play overwatch with you
You are corrupt
Therefore I elect myself as the new VEn
Yes, not Ven but VEn
The superior version
/s
Discord Account
low#6421
What happens when the bug or crash occurs?
When i press any button about vencord in the settings tab my discord just crash. I was enabling some plugins and then after i enable and restarted the discord started to bug out. My friend installed vencord at the same time and the same thing was happening. Everything isn't working only the button "updater" is working.
What is the expected behaviour?
Not crash and work just fine.
How do you recreate this...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
why not just use a counter variable here
af4c7d8 Fix Cards (they look ugly now, wtf Discord) - Vendicated
A plugin that translates a message to another language, like ones in BetterDiscord
The original BD Translator link: https://betterdiscord.app/plugin/Translator
While hovering your mouse over either a server icon or a text channel's name, press your scrollwheel button (or middle-mouse button) to mute what you're hovering
True
Discord Account
SilverEra#1828
What happens when the bug or crash occurs?
Ever since Vencord has needed to update, whenever I hit any button that has to do with vencord it crashes.
What is the expected behaviour?
Vencord should be opening menus as usual, but it crashes whenever I hit anything that has to do with it
How do you recreate this bug or crash?
Wait until Vencord needs an update. Then, just hit any vencord button.
Errors
There's no logs???
Request Ag...
Update vencord using the GUI installer
also middle clicking already opens in browser so you might wanna do something about that
my other comment addresses that, so it shouldn't be a problem.
yop
It'd be nice to be able to right click > copy a sticker link instead of having to sift through devtools to do it.
Sticker links seem to all be
https://media.discordapp.net/stickers/{StickerID}.png
Discord seems to keep a .png and .webp version of every sticker uploaded, and you can add ?size=4096 to the end, just seems to grab the biggest size discord has on hand.
Thanks. I also found some CSS online which undoes it, but doesn't restore the original image size. This looks like the better option for now, still.
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
ShowHiddenChannels (had no effect):
ID: 397131
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
ShowHiddenChannels (had no effect):
ID: 481367
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
@agile gullJUMPSCARE
explod
hi
joobi jumpscare
Todo
- [ ] Find responsible plugins for crashing and disable them til next update
- [ ] Improve handlePreventCrash
This modified version essentially applies fixes too instagram and tiktok as well. For instagram it uses dd and tiktok it is vx.
Original FxTweet: https://github.com/Vendicated/Vencord/blob/main/src/plugins/fxTwitter.ts
File: FixTweet.txt (edit the file extension from .txt to .ts)
Code preview:
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Samu
*
* This program is...
Why didn't you make it a PR instead of a discussion? It makes no sense
Also there is a special place to post third-party plugins on the Discord Vencord server
Why didn't you make it a PR instead of a discussion? It makes no sense
Also there is a special place to post third-party plugins on the Discord Vencord server
I wasn't aware there was such place on the discord server, as for PR I didn't want to make one till I know for sure this was working fine for others.
Why didn't you make it a PR instead of a discussion? It makes no sense
Also there is a special place to post third-party plugins on the Discord Vencord server
I had a look in the discord server, can't seem to post in the channel
I don't super feel like opening up github right now, but to the person who is in that discussion (you don't seem to have the same discord username): rather than add more platforms to the FxTwitter plugin, the fix that is generally wanted from the devs is to replace the plugin entirely with a generic text replace plugin (potentially with presets or something similar that can be used for those media platforms)
@novel walrus
I had a look in the discord server, can't seem to post in the channel
Just ask someone with admin permission and they will probably give permission to you. Also #๐พ-core-development message
I had a look in the discord server, can't seem to post in the channel
Just ask someone with admin permissions and they will probably give permission to you. Also I recommend looking at #๐พ-core-development message since it's a very good suggestion for the plugin
created a pull request like you said https://github.com/Vendicated/Vencord/pull/533
from my knowledge there is no other fix embed then these 3. FxTwitter, ddInstagram, and vxTiktok are the only ones exist and will be the only ones for who knows how long. No point making one for facebook cause most people on discord dont use it, yt already has native embed, reddit embed is been fine for ages. I can't think of any other major social media that has web version th...
they already rejected these "text replace" plugin before, like #444
there are also other use cases, like fxpixiv and rxyddit
guess i know what im doing later

This plugin adds/fixes experimental search filters. Some of these are already available in the mobile app TabsV2 redesign as a part of the gui.
- fileType - already implemented in the desktop app, but it doesn't work
- fileName - should be implemented soon
- embedType
- sortBy / sortOrder - same thing as the buttons below the search bar



Request Agreement
- [X] This is not a support or plugin request
update Vencord using the rightmost button (that says "Update") in the installer
match: /(\i)\((\i),\i\.\i\.ANSWER_PINNED/,
replace: Object.keys(searchOperators).map(a => `$1($2,"${a}",$self.searchOperators.${a}),`).join("") + Object.keys(searchAnswers).map(a => `$1($2,"${a}",$self.searchAnswers.${a}),`).join("") + "$&"
Vencord has a custom regex escape \i that matches SWC's mangled variable names
match: /(\i)\((\i),\i\.\i\.FILTER_HAS,\{titleText:function\(\)\{return \i\.\i\.Messages.SEARCH_GROUP_HEADER_HAS\}\}\)/,
@Vendicated we need brace balancing so baddd
match: /(?<=\i\.forEach\(\(function\((\i)\).{300,500})var (\i)=\i\[\i\];switch\(\i\)\{/,
replace: "$&" + Object.entries(searchAnswers).map(([k, v]) => `case "${k}":$2.add($1.getData("${v['_dataKey']}"));break;`).join("")
You shouldn't hard code variable names in replaces. I used a lookbehind here to capture the search answer variable, and to not mess with the match replacement. Also using a limited wildcard match is kinda epic for things like this...
match: /function \i\(\i\)\{switch\(\i\)\{/,
tried that, didn't fix it. my friend also has vencord and he's having the same issue
Didn't know about that, it should probably be added to the plugin guide
are you possibly on canary??
We really need templates lmfao.
What platform are you on?
What client are you using? (desktop/web/armcord/...)
What discord are you using? (stable/canary/ptb)
Are there any errors in console? (CTRL + SHIFT + I). If there is any red text that might relate to vencord, post them here
real
platform: w10
client: desktop
release: stable
error:
28d2894a3ee59d7bcf93.js:8755 Error: Vencord could not find the Card Component
at o (internal.tsx:26)
at Sa (28d2894a3ee59d7bcf93.js:1608)
at yu (28d2894a3ee59d7bcf93.js:1662)
at Oc (28d2894a3ee59d7bcf93.js:1655)
at Ic (28d2894a3ee59d7bcf93.js:1655)
at hc (28d2894a3ee59d7bcf93.js:1654)
at ic (28d2894a3ee59d7bcf93.js:1651)
at uc (28d2894a3ee59d7bcf93.js:1652)
at Fo (28d2894a3ee59d7bcf93.js:15...
this issue has already been fixed and fixes are mentioned everywhere on the Discord, and you didn't even use the correct issue template. Please at least put in some effort to fix your issues yourself
how do you see this and go "yes I should totally use the blank template"
also is there a git hash displayed somewhere in standalone builds
like logged or something
but if someone has the attention span of a hamburger to where they only see the first one and use it then they don't deserve help tbh

im gonna eat a hamburger tpoday
Version info
There are templates????
real
yeah
ikr ppl do the same with my discord bot
iirc i removed blank template
so they cant
ye i made it like this
you dont need this
?
there's a dedicated option called blank_issues_enabled which shoves it at the very bottom
I know but I want the blank issue to still have a custom description and template
suffer ig
people dont even read the template, they just click it because its the first one and then click the checkbox because its required
if its the actual blank_issues_enabled then its a tiny link at the bottom iirc
also if you really really still want a template, you can just create an issue_template.md in the .github folder and itll be used for blank issues only @austere talon
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
L
Discord Account
aubrey#6933
What is it that you'd like to see?
I think Vencord should have an option to use the native window frame, much like the Discord app on Linux does.
Request Agreement
- [X] This is not a plugin request
PWA stuff really good so it would be amazing if we would have the vencord on it!
It might be useful there is a workaround for BdBrowser for PWA
my bad, userscript works already.
This plugin adds Alerts (also known as "Highlights") when someone sends a keyword.
Preview:


As always, feel free to suggest any changes, or report any bugs that I missed.
If a maintainer makes a change on this PR, please ping me in the discord (@Captain#3175) so I don't make the same ...
after 7 years and 2 months this is finally here
shit i pinged someone again, sorry other captain
I really gotta stop doing that
LMAO
I think this plugin would have a lot better UX if it wasn't just a massive textarea. Users probably won't understand very well, regardless of what you tell them at the top. I'd recommend splitting this into three textboxes instead:
- Find
- Replace
- Only if (for your conditional replacements)
and then having a +/x button to modify how many there are.
the title seems a bit intrusive I feel like it should just be the username, maybe channel and guild, something useful instead of all caps KEYWORD ALERT BY <user>, furthermore you could probably integrate this into the inbox as additional tab next to mentions
the title seems a bit intrusive I feel like it should just be the username, maybe channel and guild, something useful instead of all caps KEYWORD ALERT BY , furthermore you could probably integrate this into the inbox as additional tab next to mentions
the uppercasing is not something done by the plugin, as can be seen here, but the title could indeed be upgraded a bit...
the uppercase is because of this class
furthermore you could probably integrate this into the inbox as additional tab next to mentions
update: i am slamming my face into my keyboard
if they're planning to add more symbols, then maybe it is better to stay with how it is, or just add more custom interfaces
also is there any way to replace the url no matter what? like the only consideration is it to have, for example, twitter.com
i don't know what do you mean "add more symbols"
do you want always replace twitter.com to something else? just twitter.com => something
i meant extra symbols as adding more characters that do something, and i mean "characters that do something" as => or ? as for example. i do not know the proper name for them
do you want always replace
twitter.comto something else? justtwitter.com => something
i see
The aliucord counterpart does this better

Honestly, why does this have to edit the message before sending it?
It would make more sense to visually edit messages w/o actually editing them.
Like, I might want to send a Twitter link, but when for me to appear as a nitter link.
I might want to send gn, but when I view it to be good night, whilst the others only see gn
If someone w/o the plugin sends me gn, I want to see good night, but this plugin doesn't do that.
If someone w/o the plugin sends a Twitter link, the plugin will do nothing
It only does stuff if I am the one sending it
Therefore kinda useless
It is useful for abbreviations as I said tho
Bc you might wanna type the abbreviation but send the expanded text
might as well opt for a generalized plugin that embeds most common social media urls with custom components altogether
no
@quaint sapphire this is the generic text replacement plugin ven wanted
its not meant to be a "oh you only see it for yourself"
its meant to kill the plugins like fxtwitter that we have now
I never said it couldn't also apply to others
optimally it would, and that behaviour would be configurable
ye
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
so true
Bad Patches
VoiceChatDoubleClick (had no effect):
ID: 298716
Match: /onClick:([A-Za-z_$][\w$]*)(?=,.{0,30}className:"channelMention")/
MenuItemDeobfuscatorAPI (had no effect):
ID: 781069
Match: /function.{0,80}type===(.{1,3})\..{1,3}\).{0,50}navigable:.+?Menu API/s
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
RevealAllSpoilers (found no module):
ID: -
Match: .revealSpoiler=function
Bad Starts
None
Discord Errors
there should be multiple ppl merging not just ven
ofc she's gonna get burned out and it becomes tedious to review
there are multiple smart people with enough knowledge about the structure and stuff other thsn ven by now i think
MROWR
@austere talon we don't use Tooltip.Positions anywhere so it should be safe to merge
should I just go for it
settings works :p
and user reviews
i dont really know anything about menuapi so I'll let someone else fix that 
i will merge
I leave menu api in your hands 
cb507ba fix: vcDoubleClick and revealAllSpoilers patch ... - D3SOX
Please elaborate, what exactly do you mean?
Or better yet open a pull request yourself
Please elaborate, what exactly do you mean?
To use the native window frame seen in programs like Notepad, rather than Discord's titlebar.
As others have mentioned, it'd be much better to have the settings ui render two textboxes per replace rule, with an :x: button and a โ button to add an additional row. Optimally, this should be provided by Vencord as OptionType.ARRAY, iirc someone is working on that
@aubrey#6933
not here
why do people open issues/prs then not join the discord
makes it pain to communicate
I'm still not really following. Maybe include a screenshot for comparison and explain how this would be an improvement
Sorry I forgot to reply.
const [oldGuilds, oldGroups, oldFriends] = await Promise.all([
DataStore.get("relationship-notifier-guilds"),
DataStore.get("relationship-notifier-groups"),
DataStore.get("relationship-notifier-friends")
]) as [Map<string, SimpleGuild>, Map<string, SimpleGroupChannel>, Record<"friends" | "requests", string[]>];
you can just move these to the top and use findByPropsLazy, then you also don't need to assign to this.closeFolders here!
find: '("guildsnav")',
I don't really follow what's going on here, is this just to create a closure and do the webpack searches lazily? If so, same thing applies, use find(byX)Lazy!!
for consistency and possibly avoiding clashes with other mods, can you please make classes start with .vc-?
.vc-bf-folder-sidebar [class*="wrapper-"] > div:first-of-type {
Here's a mockup of what it would look like with the Windows Classic theme.

why do people want their system to look like this
i think i know what they mean now
why does Discord even do custom titleBar on windows
Bad Patches
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
Bad Starts
None
Discord Errors
Bad Patches
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
Bad Starts
None
Discord Errors
for bad patches? or complaining about github shidd
i support the latter
(or yk, just use #๐งฉ-plugin-development
)
reporter
what the dog doin
She's?
Did ven have a custom pronoun?
Or did you fall for the trap?
I don't know if this is legit a personal preference or ven is trolling
Which scares me
Ven is unpredictable
So no pronoun bc having every pronoun is the same as having no pronoun
I saw the rainbow flag on Ben's github, so ig it's not trolling
Man, in the past I could use the rainbow flag w/o it having a special meaning
I hate this
Why not have a diff flag?
(this is not about ven)
Like, I don't care about LGBT or whatever, they can do their thing
But do they have to steal the rainbow from me?
I didn't steal anything from them
It's unfair
But if I do, everyone will be sure that it is about LGBT (and Q?)
I want to live in a world where the rainbow is not linked with having a different sexuality than your birth one.
Nothing wrong with having a diff sexuality, but why the rainbow?
people have rainbow flag to say they're an ally
it doesnt have to mean you are lgbt
also
if anyone asks you can just say "it looks nice"
who cares
I ain't an ally
I ain't supporting straight people, why should I support the rest?

I myself am straight, but I don't think of it as anything special
Cause it aint
If you are gay that's ok, but leave my rainbow alone
Yes I made it personal
Fight me
I want my rainbow
Do we have a flag for being straight? I hope not
why are u mad over a rainbow 
just use the rainbow and be smug that it just means rainbow to you
In the past I used to love pink, but everyone thought I was gay for wearing pink as a man
Like, why do people associate colors like that?
???
Yes, real story
the only time I've ever heard someone get called gay for wearing pink was in fucking school
who knows and who cares
who cares + who cares
just wear pink
just use a rainbow

Me ๐ญ
But then I won't have smth to complain about
You mean to tell me that I can just be happy?
That sounds boring
omg so true!
Social media mindset
be british and complain about the weather
I am Greek and I complain about global warming
It fucked our great weather
We had just the perfect amount of sun
But now it's either too cold or too hot
this is not the right channel for this lol
Hi! The Role Color Everywhere plugins for BD and Powercord both had an option to make a user's message be the color of their role. (I even had this fixed in a PR https://github.com/powercord-community/rolecolor-everywhere/pull/16)
This was one of my favorite features at the time, as it made chat a lot more colorful! Would love for this to be implemented here as well :)
haha
i said they would ask for it in custom status
but message is another funny
i wonder if thats possible with only css
likely no
maybe can make this a util for reusability
function filterTruthy<T>(item: T): item is Exclude<T, 0 | "" | false | null | undefined> {
return Boolean(s);
}
// usage
[...].filter(filterTruthy);
removes ambiguity in tsx files
ah, i think just dont use arrow func and u wont need to
true but the return is just an object kinda cringe to
closing PR as not planned
DEATH
TRUE
hand sanatizer on the code
this is the best channel for this
@austere talon if you ever remember
there is a pull request called timezones exist
and its been 3-4 months since I opened
@placid wave aagaming do something
its gonna be half year
Uhh
this means yes
Did the select component change to the one with the search?
nop
I'm not talking about the plugin
Iirc megu did smth
**components.ts: **Line 49
export const SearchableSelect = waitForComponent<t.SearchableSelect>("SearchableSelect", m =>
Change the select to use that
That is the first step
And then we should move the list to somewhere else so it is not bundled together with vencord
And dynamically load it when needed
Only after that will ven consider merging
i would rename this to enabledByDefault
description: "Whether to attempt to prevent Discord crashes.",
i would prefer if you moved this logic into a proper function and only called $self.handleCrash
description: "Whether to attempt to navigate to the home when preventing Discord crashes.",
import type { ReactElement } from "react";
That method contains multiple dispatches
That's the only plugin name with a space on it, consistency
handleComponentFailed (kinda bad name) already has this code
i see. Why did u name it ch1 tho?
cuz I'm limited to 3 letter names
**webpack.ts: **Line 98
for (const nestedMod in mod.exports) if (nestedMod.length <= 3) {
why webpack search it
you can make the patch put the function directly on ur plugin object
that is true
I will do that instead
also how does handleComponentFailed even work, you only call checkForUpdates on startup, and when that component renders checkForUpdates isnt called so isOutdated will be false
@austere talon standalone versions can update right
ye
wdym?
this seems correct then
also since you know about armcord how do we perform a full restart?
it indeed doesn't recheck, maybe it should
yeah I'm making it do that
look at window.armcord
it likely has an ipc method to do so
but why do u need a full restart with armcord?
hmhm
I was thinking of full restarting it to maybe update vencord
but that seems bad
standalone doesn't have any special meaning
Well the updater ig
Web is still standalone but doesn't have any updater, isOutdated will always return false on Web
I'm just trying to understand what can update by itself
okay
adding an explicit IS_WEB check is not needed since isOutdated returns false on Web, however it is still good to add it because it will reduce dead code
idk if u know C macros
but IS_WEB and other globals are compiler variables that dynamically include or exclude code
okay this seems right now
similar to a C #ifdef
I'm so confused on where the code decides to use git or http to update
**index.ts: **Line 19
import(IS_STANDALONE ? "./http" : "./git");
lol
they're two implementations that implement the same identical methods in their own way
the rest of the code isn't aware which updater backend is used
could have used a class for more clarity
but thats not necessary
nah
they just implement ipc methods https://github.com/Vendicated/Vencord/blob/main/src/ipcMain/updater/http.ts#L84-L88
**http.ts: **Lines 84-88
ipcMain.handle(IpcEvents.GET_HASHES, serializeErrors(calculateHashes));
ipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`));
ipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(calculateGitChanges));
ipcMain.handle(IpcEvents.UPDATE, serializeErrors(fetchUpdates));
ipcMain.handle(IpcEvents.BUILD, serializeErrors(applyUpdates));
not what i meant but ok
using a class for that doesn't make much sense
considering that you wont add more backends, yes it doesnt make sense
it is useless
plain object implementing an interface sure but this is fine
Well it would be trivial for someone to add their own updater 
actually, the IPC is kinda like an interface
yeah that's what I meant
it just feels wrong
Please note that the CSS Editor, Themes loaded from remote sources and co. will not work in the UserScript. Use the extension if you need any of those
@austere talon
the readme says that, but what is the reason?
CSP?
yes
yes but I can't be bothered to reimplement everything just for userscript
and css editor no
do you go the extra mile to disable stuff that dont work in the userscript? if not I can try polyfilling them
no
I guess making themes work would actually not be that hard. Does GM_addStyle bypass csp?
ask chatgpt to do it for you 
GM_addStyle has never worked for me in any scenario, so I don't know
but it wouldn't be hard to fetch the css and append a style sheet
true
but does discords csp allow inline styles
if it doesn't we're screwed
I think it does
yeah it should
I've been using myself a polyfill for GM_addStyle cause it never works
https://github.com/ArjixWasTaken/my-userscripts/blob/main/steam-workshop-downloader.user.js#L30-L52
**steam-workshop-downloader.user.js: **Lines 30-52
function GM_addStyle(css) {
const style =
document.getElementById("GM_addStyleBy8626") ||
(function () {
const style = document.createElement("style");
style.type = "text/css";
style.id = "GM_addStyleBy8626";
document.head.appendChild(style);
return style;
})();
const sheet = style.sheet;
sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length);
}
//
GM_addStyle(`
.downloadIcon {
top: 0px;
left: 8px;
width: 16px;
background-position: 0px 0px;
background-repeat: no-repeat;
}`);
its from stackoverflow btw
the issue with that is that u now need to parse css
so you can recursively fetch resources
well yeah, it only works with a single selector per invocation
otherwise if you fetch a theme and add it and that theme also uses imports, fonts, etc you're screwed
no
discords csp likely doesn't allow data links
figure out how to get GM_addStyle to work and maybe it bypasses csp
if it does we're set
if it doesn't, it's basically impossible
well, we could also set the css as the inner html of a style
that doesnt require parsing
lol
but that is unsafe
no because discord users fall for any kind of scam
it can't resolve imports, fonts, etc
or that
since those are also remote sources thus also csp blocked
do you understand what I'm saying
like say you're importing zelk.theme.css and zelk loads fonts.google.com/comic-sans, sure you can fetch zelk.theme.css and manually add it but now the browser sees hey Google fonts lemme fetch that and fails cause csp again. so you would need to fetch the theme, now parse all links in the theme, fetch that, recursively parse links in that and so on until you have everything, now you need to find a way to put it together and maybe use data links but those might not be allowed with their csp
just a huge headache
I don't see much reason to do this when people can just use the extension
but if GM_addStyle just works out of the box and bypasses csp that's perfect and definitely doable
3 weeks ago still has csp issues https://github.com/Tampermonkey/tampermonkey/issues/881#issuecomment-1421983170
so I don't think it will work
yes
but you can fetch it and add and maybe it works idk
anyway is there any reason for people not to just use the extension?
ยฏ_(ใ)_/ยฏ
one reason could be mobile phones
you might have a userscript manager
but not extensions
(discord web on phones sucks either way)
for example Adguard can act as a global userscript manager
pretty nice
vencord android exists
that is cursed tho
it's essentially unusable but so is discord in web (it's the same thing)
an android app for a webview is so cursed
what the fuck
why?
it's less than a MB
hey, its pretty nice
lmao
that seems so strange how does it inject scripts into ur browser
does it rewrite responses
Discord hides your user token in the local storage of an iframe, whenever you open the devtools. This is mostly meant to help prevent token grabbing through social engineering but has the side effect that you sometimes get logged out of Discord when Discord gets closed whilst you still have your dev tools open. This plugin basically just early-returns the hideToken function that usually takes care of the hiding.
adguard is a local vpn (or proxy if you have a rooted device)
it can do anything it wants
system apps ofc bypass it
ven ven review again
I'm 99% certain this behaviour is fixed if you enable the NoConsoleWarn plugin
@fossil otter
since that disables their devtools open handler
megu is dum dum
yeah it's here
ah
seems to be encoded though
(the mobile app also has it ofc)
i mean my code doesn't mess with the encoding part either
that's another function
ah
Nice token
NoDevtoolsWarning, sorry
does it do it correctly?
Happened to me too
I reinstalled discord and that got fixed
why re-install discord when you can rebuild vencord?
I think the code is like
if (someStuff && "0.0.0" != DiscordNative.remoteApp.getVersion()) {
addDevToolsOpenHandler(() => {
hideToken(); spamWarninfg();
}
}```
and vencord just changes it to if (false)
so the handlers are never added and hideToken never called
don't quote me on that though I would double check that's the case
I am not really a tech nerd so I just reinstalled it

if you enable that plugin then search for Patched by NoConsoleWarn you can double check
wait, why are you in #๐พ-core-development then?
oh, discord saves multiple tokens?
how do you even do that in the sources tab
ctrl shift f
yes for account switcher
searches all files at once
I donโt know, just browsing through discord notifications because I am bored
but dont you need to re-login even when you have multiple accounts?
no
Well maybe I didn't fully understand
with the account switcher you can add multiple accounts and switch between them without logging in
last time I used the account switch feature it asked for a password
yeah, so it's like I thought, they call hideToken() in the devtools callback
but NoDevtoolsWarning changes that code to never run
little side effect lol
maybe if you want update the plugin description of NoDevtoolsWarning to add something like "Also prevents Discord from hiding your token, preventing random logouts" @fossil otter
yeah will do
btw the code discord uses for checking devtools open is so silly
It's so cool seeing people that made the plugins I used on powercord here
it runs an interval that checks a bunch of things like twice a second to guess if devtools are open
that prevents that right
๐
lol
what
that code still runs
๐คข
Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.
does that sound good?
this is what discord uses https://github.com/sindresorhus/devtools-detect
**index.js: **
/*!
devtools-detect
https://github.com/sindresorhus/devtools-detect
By Sindre Sorhus
MIT License
*/
const devtools = {
isOpen: false,
orientation: undefined,
};
const threshold = 170;
const emitEvent = (isOpen, orientation) => {
globalThis.dispatchEvent(new globalThis.CustomEvent('devtoolschange', {
detail: {
isOpen,
orientation,
},
}));
};
const main = ({emitEvents = true} = {}) => {
const widthThreshold = globalThis.outerWidth - globalThis.innerWidth > threshold;
const heightThreshold = globalThis.outerHeight - globalThis.innerHeight > threshold;
const orientation = widthThreshold ? 'vertical' : 'horizontal';
if (
!(heightThreshold && widthThreshold)
&& ((globalThis.Firebug && globalThis.Firebug.chrome && globalThis.Firebug.chrome.isInitialized) || widthThreshold || heightThreshold)
) {
if ((!devtools.isOpen || devtools.orientation !== orientation) && emitEvents) {
emitEvent(true, orientation);
}
devtools.isOpen = true;
devtools.orientation = orientation;
} else {
if (devtools.isOpen && emitEvents) {
emitEvent(false, undefined);
}
devtools.isOpen = false;
devtools.orientation = undefined;
}
};
main({emitEvents: false});
setInterval(main, 500);
export default devtools;
amazing
ew
they love that guy
yeah
but tbh it's probably not worth disabling that
Maybe we can start a general Unbloat plugin that kills shit code like that
idk if there's many more instances
everyone in the js world does
me installing some random package off npm and checking my npm lock file only to see 20 new dependencies by sindresorhus
well we can make it a general unbloat from the start
sindre micromodules
vencord so bloatfree
I'm surprised we have nothing by him
since we have a shit ton of dev dependencies
**package.json: **Lines 38-64
"devDependencies": {
"@types/diff": "^5.0.2",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/yazl": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"diff": "^5.1.0",
"discord-types": "^1.3.26",
"esbuild": "^0.15.18",
"eslint": "^8.28.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-path-alias": "^1.0.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"highlight.js": "10.6.0",
"moment": "^2.29.4",
"puppeteer-core": "^19.6.0",
"standalone-electron-types": "^1.0.0",
"stylelint": "^14.16.1",
"stylelint-config-standard": "^29.0.0",
"type-fest": "^3.5.3",
"typescript": "^4.9.4"
},
did find break
[Vendicated/Vencord] Pull request opened: #545 chore: extend description of NoDevtoolsWarning plugin
Extends the description of the NoDevtoolsWarning plugin to also document a side effect
Currently the Shiki Codeblocks plugin only affects code typed in fences. For inline code this isn't an issue as it allows for styling it to fit within a theme. But file previews are being rendered with whatever default Discord uses and that's plain ugly (something Shiki solves)
Shiki code block with custom TiffColors theme selected:

File preview in Discord Downbad
:
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
Bad Starts
None
Discord Errors
Bad Patches
ShowHiddenChannels (had no effect):
ID: 541282
Match: /(?<=function [A-Za-z_$][\w$]*\((?<props>[A-Za-z_$][\w$]*)\).{1,2000}"more-options-popout"\)\);if\()/
Bad Starts
None
Discord Errors
looks like the plugin specifically targets code blocks
https://github.com/Vendicated/Vencord/blob/main/src/plugins/shikiCodeblocks/index.ts#L42
some changes would need to be done to do this
(the fix I added is just downloading old devtools)
they use some new extension api electron hasn't implemented
so the only fix is to downgrade which I did
description: "Utility plugin for handling and possibly recovering from Crashes without a restart",
handleCrash(_this: ReactElement & { forceUpdate: () => void; }) {
try {
(and close it)
just to be safe, we woudln't want the crash handler to make it even worse LOL
the only thing that could fail there would be forceUpdate but okay
as i said just to be safe
yaya
imagine theres an error in the updater that causes the crash
then it checks updates in the handleCrash (which of course causes the crash again) and makes it even worse somehow or causes an infinite loop because now we crashed again so crashhandler called again and it checks updates and..... u know where this is going
added indent
i think instead of the alert we could also use a vencord notif
iirc the only discord thing it depends on is react & react-dom
lets keep it as simple as possible
and if those are broken then vencord is so majorly broken that it doesnt matter i think
but yeah this is fine
actually no
notifications use forms and stuff
maybe should move away from that
eh nah its fine
theyre wrapped in errorboundy
worst thing that could happen is error box notif jumpscare
what?
the one responsible of dismissing the notif is the notif component
so if it errors it never dismisses the notif
aka no new notifs show
yikes
easy fix
guh i need to edit erorrboundary api
it's insane
I spend most of my time doing plugins just reverse engineering discord
had tomake ErrorBoundary.wrap onError give u the props of the wrapped component
makes sense
yopp
ye thats the joke
cause libdiscord is like c++
native lib
it segfaults discord i think
this fix so dirty
idk how else to do it
ErrorBoundary now has slightly polluted props
cause if u use it like
<ErrorBoundary><div>balls</div></ErrorBoundary>```
those props no apply
no idea how to help
[Vendicated/AliucordPlugins] Issue opened: #73 \[EmojiUtiliy\] Make one for stickers \(if possible\)
it would be nice if it would be one for stickers, since i use them a lot, and sometimes i would love to steal them and put them in a private server.
Thanks!
lol? what did u mean to do instead haha (also static is already enabled in -tags silly)
merge it into my fork branch, for some reason it changed the base
and sadly no cuz of cgo, #๐ฅ-vencord-support-๐ฅ message
thanks i'll add this after school today
dfc7a15 chore: extend description of NoDevtoolsWarning ... - NurMarvin
this is in webpack commons now so please use that
so the cache seems to be just for grouping up simultaneous requests for the same resource?
it probably doesn't matter much since I assume this array will be small but you do unnecessary work here by cloning and sorting, reduce would probably be nicer
return images.reduce((prev, curr) => {
const diff = Math.abs(size - curr.width);
return prev[0] > diff ? [diff, curr] : prev;
}, [Infinity, null] as [number, ResourceImage | null])[1];
suggestion
suggestion
suggestion
export interface SpotifyStore extends Flux.Store {
Record<"get" | "put" | "post", (accountId: string, accessToken: string, options: { url: string; }) => Promise<any>>
a similar function already exists maybe u can use that
could maybe be a generator function that yields the indices rather than returning an array? I doubt people will need this as an array
i didnt look at everything yet because there's so much
maybe use Intl for that or find some other way that will respect the user's preference
(not feedback just trying to understand what's going on)
funny discord not supporting empty codeblocks
happens when the suggestion is to delete that line lmao
lmao
Please use settings.store instead of Settings.plugins.TextReplace everywhere! Also, I'm not a big fan of storing rules as an array with 3 elements, an object would be more intuitive
Text Replacements should also not be stored in settings, use the DataStore api to store them there. This means introducing async but it should not be too hard, I can help you with that if you need any help
A plugin that allows you to change the format of the date/clock (dd/mm/yyyy/ & mm/dd/yyyy, 24h/12h) from what you want.
Why?
Some people (me) want to use other languages like English without having to deal with the change of the date/clock format in every message.
so the cache seems to be just for grouping up simultaneous requests for the same resource? But the resource will be refetched if no currently ongoing request fetches the resource?
Yea at least thats the point of the promise cache, spotimbed handles the caching of specific resources on its own.
super old stylesheet i was planning on (r)em-ifying it but i forgot
Maybe use a notification here? A notice would be a pretty big nuisance imo
any reason this isn't just in the settings sync tab?
I don't think blocking here is relevant
syncSettings();
callback={async (callbackUrl: string) => {
Only import the named members you need so unused code can be treeshaked
If you just want English while having 24h time use English, UK
btw @spark cove if you don't know why px is bad, basically it completely screws over users who change the default font size
yea ikik
if you use em or rem, the entire site will be scaled up or down if users change their default font size
im converted by now but i first made spotimbed a WHILE ago
so the css is old and i havent rewritten it eet
also regardless of that i find px units terrible to work with
em feel very natural
since i just go, okay i want the margin to be half as big as the text so just 0.5em
lol yea i like the multiples
i only use px these days if its fixing a visual bug or something
calc(2em - 1px)
yeah its okay when you have a specific use it for
and border-radius
and something that explicitly needs a specific height and width
yea that fella is silly
if you want tip for converting px to em/rem
default font size is smth like 16px i think
so just divide px amount by 16
and u get rem
yop
theres so many prs
my personal justification for this was that a settings sync should be a big deal since it changes all of the settings and the standard importSettings() requires you to reload the client too, but i can switch to a notif
yeaep
That may be true for the majority of users, but imagine dual booting and regularely changing ur settings so u get the notice every time u open discord essentially
it shouldn't be too big of a deal, it just mainly needs to be different to whatever it was before so even a corrupted value is okay, but to be fair i have actually hammered this and it doesn't seem to ever get corrupted. storing alongside settings wouldn't be too bad of an idea though
clutter and futureproofing - if we decide to have more backend integrations it'd be best for a separate tab. also the reason why it's now the generic "cloud integrations" when enabling
oops, this was meant to be temporary
that's a new header i've learnt of today, will implement and change
yeah I'm not sure how much race conditions are of an issue for idb, i assume they already have locking mechanisms or similar, so this might just be fine. But i also think since this is just a number and makes no sense outside of the context of the settings object it's best stored alongside them
awesome header
yeah i just looked on mdn
yeah i will have to
working on it now
i was actually looking for something like it and couldnt find the right wording
so thank you for pointing me to it ^^
:3
**runInstaller.mjs: **Lines 63-73
const res = await fetch(BASE_URL + filename, {
headers: {
"User-Agent": "Vencord (https://github.com/Vendicated/Vencord)",
"If-None-Match": etag
}
});
if (res.status === 304) {
console.log("Up to date, not redownloading!");
return outputFile;
}
i use it here too
oh thats cool
if ifm := c.Get("if-none-match"); ifm == written {
return c.SendStatus(304)
}
holy fuck i love this language
when context menu api ven ๐ข
@austere talon fire idea btw
actually prefer the notifs
though not sure about the notifs on the setup procedure, i thought the toasts were alright
ill try them though
https://discord.coffee/7Sf2cfM.png nvm they do look alright
If i have the files of my history from the old message logger can i somehow import it to vencord's one?
Discord Account
No response
What happens when the bug or crash occurs?
I use a vencord firefox extension and i have issues with it.
When putting the css link, it shows:
Error: NetworkError when attempting to fetch resource.
It shows with any BetterDiscord Theme
What is the expected behaviour?
It applies the theme without any problems
How do you recreate this bug or crash?
- open discord settings
- click on themes in vencord section
- put in a css link
...
Firefox CSP issue, nothing to fix here
oh yeah I think toasts are fine for just enable confirm
but as soon as there's anything the user should read like error toasts are so bad
notifications are nice yeah
also are more obvious
welp
toasts i almost missed and i was wondering where they went
we should have put the promptToUpdate function here
Also the benefit of notifications is that people can extend their duration or make them permanent
like some people are slooooow so the toast is too short for them
ye
can't update cuz it's broken
not good not good
I deliberately made it so that you can't set notification duration via code
I think that's bad ux
the user should decide how long notifications are, not the dev
powercord had it that way
yip
although I think I wanna add some more switches to toast api
a boolean that lets you send permanent notifications
for important data
for example
hmm
might be a good idea
also i submitted all the requested changes for you, feel free to play when you're available 
object has been destroyed
oh okay
thanks
I think this error means that something tried showing the browser window but it was already destroyed due to reloading
likely race condition in discords code
ah
like maybe some async operation was done the same time you reloaded and then the callback tried using the browser window
could be worse, could have an ocd-triggering space just before a comma when typingtweaks is enabled... wait
Discord Account
Whirr#4387
What happens when the bug or crash occurs?
When in settings, under any of the vencord tabs, nothing is rendered apart from an error box.
What is the expected behaviour?
Rendering the component
How do you recreate this bug or crash?
- Go to settings
- Click on one of the Vencord settings
Errors
TypeError: Cannot read property 'TOP' of undefined
at Z1 (index.tsx:64)
at Sa (3ce5a3a3ee1992708511.js:1654)
at yu (3ce5a3a...
On linux (Fedora)- not working for me either.
No errors in the terminal if I launch it through there but discord still errors out.
I get this in dev tools on discord:

Unable to open any kind of settings. Installed both vencord and asar.
at Z1 (VencordRenderer:70:7106)
at Sa (3ceSa3a3ee1992708511.js:1654:54)
at yu (3ce5a3a3ee1992708511.js:1708:146) at Oc (3ceSa3a3ee1992708511.js:1701:89)
at Ic (3ceSa3a3ee1992708511.js:1701:17) at he (3ce5a3a3ee1992708511.js:1700:867)
at is (3ce5a3a3ee1992708511.js:1697:642) at uc (3ceSa3a3ee1992708511.js:1698:49)
at Fo (3ce5a3a3ee1992708511.js:1637:577) at 3ce5a3a3ee1992708511.js:1695:555
duplicate of https://github.com/Vendicated/Vencord/issues/549, why did you open it here though?
me on my way to trigger a react crash and force an update
as mentioned by lewi, Firefox has a bug that makes it not correctly apply our networking rules which makes it impossible for Vencord to load custom themes. This is an issue with Firefox and needs to be fixed by Firefox, not us
Solutions:
- Use Discord desktop or Discord on a Chromium based Browser
- You can still set custom css via the console:
await VencordNative.ipc.invoke("VencordSetQuickCss", THE_CSS_TEXT_AS_STRING_HERE)
Okay I just found out the reason is because Firefox manifest v3 implementation is just super bad and they didn't implement many apis auch as the declarativeNetRequest api that Vencord depends on (https://bugzilla.mozilla.org/show_bug.cgi?id=1687755). So we just need to add back legacy request interception
@austere talon could it be the recover notification causing that Object got destroyed
why the hell is the settings page breaking so much
discord being mean
simple plugin that adds a reply button to search results
before:

after:

wait for context menu api
Bad Patches
InvisibleChat (had no effect):
ID: 457173
Match: /.=.\.activeCommand,.=.\.activeCommandOption,.{1,133}(.)=\[\];/
SilentTyping (had no effect):
ID: 457173
Match: /[A-Za-z_$][\w$]*=[A-Za-z_$][\w$]*\.activeCommand,[A-Za-z_$][\w$]*=[A-Za-z_$][\w$]*\.activeCommandOption,.{1,133}(.)=\[\];/
Bad Starts
None
Discord Errors
Bad Patches
InvisibleChat (had no effect):
ID: 457173
Match: /.=.\.activeCommand,.=.\.activeCommandOption,.{1,133}(.)=\[\];/
SilentTyping (had no effect):
ID: 457173
Match: /[A-Za-z_$][\w$]*=[A-Za-z_$][\w$]*\.activeCommand,[A-Za-z_$][\w$]*=[A-Za-z_$][\w$]*\.activeCommandOption,.{1,133}(.)=\[\];/
Bad Starts
None
Discord Errors
guh
oh weird that it works without that
nvm i didnt realize this was in types
theme issue + not the right place, report it to the theme author



