#š¾-core-development
1 messages Ā· Page 168 of 1
and we will be able to listen to settings changes from renderer in the main process
// in main
VencordSettings.addChangeListener("idkSomeThing", () => console.log("changed"));
// in renderer
Settings.idkSomeThing = true;
its actually super simple
no its via ipc
**settings.ts: **Line 11
Settings.addGlobalChangeListener((o, p) => VesktopNative.settings.set(o, p));
**ipc.ts: **Lines 48-50
handle(IpcEvents.SET_SETTINGS, (_, settings: typeof Settings.store, path?: string) => {
Settings.setData(settings, path);
});
you just made the proxy wrap the ipc
**SettingsStore.ts: **Lines 78-92
if (pathToNotify) {
let v = value;
const path = pathToNotify.split(".");
for (const p of path) {
if (!v) {
console.warn(
`Settings#setData: Path ${pathToNotify} does not exist in new data. Not dispatching update`
);
return;
}
v = v[p];
}
this.pathListeners.get(pathToNotify)?.forEach(cb => cb(v));

it just sends the path that was changed via ipc and then it dispatches an update for that path in main too
well i havent implemented that in vencord yet

only vesktop
i fucking hate how discord implements popout windows
it is all controlled by the parent window
leading to that
that's crazy good
now you can subscribe to settings changes of your plugin in your native.ts file as well
can you somehow make settings not explode at first run
like you cant access at the time the renderer script runs
this should be && not ||
oooooh
well actually yeah we can fix that now but
the reason that happens is that it requires plugins to be initialised so it can auto fill default values
explode
need to test that this works fully
and how can you fix now
and then can merge
we can fix it but with one limitation: it wont be able to handle default values on the top level
i guess that's okay
by moving the thing that handles default values to a different file
// api/index.ts
import Settings from "./Settings";
import "./addSettingsDefaultValueGetterSettingsStoreCallback";
then you can import from Settings freely without causing a circular import
seems to work flawlessly
can u guys also test that pr
oh wait
hmm
hmmm
actually this will still cause issues if
this will still error
Cannot access settings before plugin is initialized
so you cannot use store but you can use Settings global manually
well ready for review and testing
will vencord ever go a day without someone suggesting/saying some stupid shit that makes no sense or is impossible
is that possible?
i wanna do more refactoring next
i wanna restructure the project a little
its bad that everything is in @utils and all processes import from it
i want to move everything that is shared across processes into the shared folder so its clearer
to make sure not to introduce dom usage in those files cause that happened in the past and bricked updater

optimally i'd want to move everything into a renderer folder for stronger isolation but that would ruin history
lmao no way they used a attachment for that
real
just look for super-reactions-launch
its real
what the fuck
this code is actual dogshit
like the rest of discord code
?
you're using the function wrong
not even passing a channel id
your skill issue = discord code bad?
nop
wheres the channel id?? lmao
nvm
doesnt matter
I found what I was looking for
wasted 20 minutes stepping over shit in debugger
It never got typed 
how about a preset feature as well?
how about a preset feature as well?
Nice idea. Will try to implement that
@austere talon I'm not sure if I see how updating a setting on the renderer updates it on the electron side too
when you change a setting it saves to the file
but you only read the file once, how does the electron side reflect the change
I wonder why the lottie/bodymovin module is not name-mangled ```js
function(module,exports,webpack_require){module=webpack_require.nmd(module),webpack_require("854508"),...
lmao funny
It does still have all other minification stuff, just not name mangling
hm, i didn't mean "default presets" i was really thinking more along the lines of "saveable presets"
but that's still cool anyway
hm, i didn't mean "default presets" i was really thinking more along the lines of "saveable presets" but that's still cool anyway
we can take the backup of the currect configuration and then use the backup file to reuse it another day.
hm, i didn't mean "default presets" i was really thinking more along the lines of "saveable presets" but that's still cool anyway
we can take the backup of the currect configuration and then use the backup file to reuse it another day.
That includes all of the other settings, and that doesn't sync, which could be annoying
can this be made into a generic initialisms highlighter rather than saying tone indicators? it seems more useful that i could add things like "ttyl" to the highlighter rather than just tone indicators (especially since there's a built in editor but it's restricted to /this which seems a bit counterintuitive in my mind)
does this actually have any real world effect? overoptimizing isn't very useful and makes the code less understandable
hm, i didn't mean "default presets" i was really thinking more along the lines of "saveable presets" but that's still cool anyway
we can take the backup of the currect configuration and then use the backup file to reuse it another day.
That includes all of the other settings, and that doesn't sync, which could be annoying
Which other settings you mean though ?
hm, i didn't mean "default presets" i was really thinking more along the lines of "saveable presets" but that's still cool anyway
we can take the backup of the currect configuration and then use the backup file to reuse it another day.
That includes all of the other settings, and that doesn't sync, which could be annoying
Which other settings you mean though ?
nvm forget what i said i'm blind
why is this done with CSS rather than a patch?
it doesn't no. the queue is meant for async work that needs throttling, especially sending requests to discord. minor details like being O(n) aren't relevant, the bottleneck is the networking
yeah wrong type. idk how typescript didn't flag that
https://github.com/Vendicated/Vencord/blob/settingsStore/src/api/Settings.ts#L162-L167
https://github.com/Vendicated/Vencord/blob/settingsStore/src/main/rendererSettings.ts#L35-L37
https://github.com/Vendicated/Vencord/blob/settingsStore/src/shared/SettingsStore.ts#L97-L121
https://github.com/Vendicated/Vencord/blob/settingsStore/src/main/rendererSettings.ts#L28-L30
**Settings.ts: **Lines 162-167
SettingsStore.addGlobalChangeListener((_, path) => {
SettingsStore.plain.cloud.settingsSyncVersion = Date.now();
localStorage.Vencord_settingsDirty = true;
saveSettingsOnFrequentAction();
VencordNative.settings.set(SettingsStore.plain, path);
});
**rendererSettings.ts: **Lines 35-37
ipcMain.handle(IpcEvents.SET_SETTINGS, (_, data: Settings, pathToNotify?: string) => {
RendererSettings.setData(data, pathToNotify);
});
**SettingsStore.ts: **Lines 97-121
public setData(value: T, pathToNotify?: string) {
if (this.readOnly) throw new Error("SettingsStore is read-only");
this.plain = value;
this.store = this.makeProxy(value);
if (pathToNotify) {
let v = value;
const path = pathToNotify.split(".");
for (const p of path) {
if (!v) {
console.warn(
`Settings#setData: Path ${pathToNotify} does not exist in new data. Not dispatching update`
);
return;
}
v = v[p];
}
this.pathListeners.get(pathToNotify)?.forEach(cb => cb(v));
}
this.markAsChanged();
}
**rendererSettings.ts: **Lines 28-30
RendererSettings.addGlobalChangeListener(() => {
writeFileSync(SETTINGS_FILE, JSON.stringify(RendererSettings.plain, null, 4));
});
no
changing it on main doesn't update renderer
there isn't much demand for changing settings on main side imo
yeah that's what I noticed
what's a use case
i plan to add a second settings file: main settings
that are only accessible in main
this can be used for more security sensitive stuff like whitelisting url for csp, or whitelisting a folder that the renderer can read files from via ipc
maybe from native scripts
but nothing that we need rn
the way it currently works it's not really possible to update both ways
the settings store in renderer is read only because i export its .store member
**Settings.ts: **Line 183
export const Settings = SettingsStore.store;
setData changes the store so that will break
yeah
makes sense
I mean
store is a proxy
the inner object can change no?
somehow
we could also refactor all vencord code to use .store, but that would also break snippets and such
not really no
cant we make the inner obj a dummy
and return values from another
so technically the proxy is empty but it has values
that's very meh
well actually
instead of changing the root object we could recursively merge the object
via Object.assign
that is true
do you have any idea why pindms break
like I don't even know how to even start debugging that
cause it causes issues with the lazyscroller
well that's a start
but that seems like super hard to debug
and I would need to make it happen to me which idk how to
close all dms that aren't pinned
might as well pin all lmao
true
tbh idc about PinDms
so i never bothered fixing it
i only made it because people wanted it and i was bored
btw there is a category pr
I would fix but it's a so weird bug
take a look at it and work on that instead
but it doesn't fix the issues either
yeah
well i know why it happens but
working with discords lazy scrollers is a nightmare
i already had so many bugs when i wrote the plugin
that i took long to fix xd
horror
prs are reviewed when vee has the time to do so/wants to do so. be patient
how is this useful? why not just send the emote somewhere and copy it? you only very rarely need to copy the code
also please be patient and don't spam. literally only 2 days passed and you already asked twice
i think for now ill change stores so that you can't change settings in main at all to prevent confusion
and introduce a native settings api
if there's ever demand to change renderer settings from main we can add it
sure
id rather not overengineer it rn if there's no use case
yeye you are right
how is this useful? why not just send the emote somewhere and copy it? you only very rarely need to copy the code
also please be patient and don't spam. literally only 2 days passed and you already asked twice
I need the emoji strings very often when developing a Bot
looks doable
but its so small, its not worth adding
so maybe add more features like channel/user/whatever is there
Having something like copy emoji id just like copy channel id and all that would make sense
||server ban
||
sooner or later you'd get banned from discord too
It's even easier to not do things that get you banned in the first place
the reason animated status is against the rules is because discord hates selfbots/api abuse
they do ban for api and selfbots
no
they still do
its not a matter of if, but when
it is actually
uses the (discord) api that it was not intended to be used for
they will see it (eventually) and will ban you for it
tbh animated status is pretty useless
weird flex
follow the rules or you will be banned
vban 7 @woeful sable continuous discussion of banned plugins
Done! 
i just loaded 20 alts in here, not hard
š
you might wanna slow mode channels there is about to be a wave of spam

Discord shows when people joined and alts are pretty obvious so you gained nothing
the whole point isnt to hide
you're kinda slow
great argument however The Fog Is Coming
oh no! anyways
We can just select them all and ban with 1 click stop yapping
lol
bros so tough
since when is this channel not locked to regulars/contribs
Since channels got mvoed
Letās bring back that requirement. as a matter of fact, letās close all dev channels from white names talking in them

true
nooooo iām a white name

what? why does this guy want to spam the server?
OK, letās bring back the programming role. so if a white name wants to talk and one of the channels, they can ask for permission, but if needed, it could be taken very easily.
maybe by adding linked role
Any variable that isn't modified should be const. ESLint will fail if you dont
I wouldn't leave comments like this if you plan on removing them later, just make a github comment or a discord message
Doesn't everyone who's reviewing the PR get an email notification everytime I leave a GitHub comment? I'm not sure if that's still the case but I don't want to accidentally mass-spam everyone
I'll just leave discord messages in plugin-dev instead
don't mind about it
they can just disable if they dont want
I never receive any emails like that
I remember that one story where someone emailed every single epic games employee because of a Github Organization Teams mis-mention 
funny
Wouldn't I set these back to const then? Since the only way they get modified is directly from whatever the user puts in 'url', etc.
Unless that means they ARE being modified
I'm not sure what you mean by this- these variables should be constant. Once they are initialized, they are never modified by your code.
If eslint says they should be const, they should be const. Simple rule of thumb.
Discord Account
coffeeispower
What happens when the bug or crash occurs?
I use home manager in NixOS and i tried to automatically configure vencord with a custom theme with the color scheme generated from my wallpaper by stylix.
However when home manager sets up the files, it symlinks the file from the nix store into the home directory, and...
I'm not sure what you mean by this- these variables should be constant. Once they are initialized, they are never modified by your code.
š
Not at my home computer so it's more difficult to debug (literally working on a school laptop cuz I'm bored and wanna work on somethingš), but thank you for letting me know.
then don't make the settings file readonly
i feel bad that this channel gets flooded with my PR comments
Better than those new star notices
Why do they even exist š
i havenāt seen that yet 
sorry if i'm being annoying but wouldn't it be nice if the webhook thing auto-completed for channels where you have perm
like if thereās a webhook in the channel itāll auto copy into the url parameter?
you know how there's a box which appears while you're typing the command, showing the possible values?
idk how easy it is though
or if it notices that youāre in a server that the webhook has the same serverid/channelid for itāll automatically show something like āSending message to ā#testā in Balls Serverā
hmmm
havenāt seen that
like this thing

it might be really difficult
but iāll keep it in the back of my mind if i can think of a way to do it
well, discord already implements a way for the bot to respond with a list of strings
that makes it a little easier
but gathering the URLs is gonna be the difficult part
for one of the suggestions
is it just as easy as making the command name [webhook send]
or do i need to like
do other complicated stuff to achieve that
isn't there an endpoint to get all of them idk
i hope this is legal
ayo i got a shoutout in that photo
i didn't show any usernames in case anyone minds 
This should be properly embedded and contains the profile picture in the right format (Might need adjusting though, 3 hours until i can test)
iām almost there to fixing every suggestion this is the only thing i need to know
Iām a start taking a shot for every single time you submit a new comment
LMAO

i mean i donāt wanna be rude and just close comments without reasoning 
inb4 i could just respond here
yea i could idk why iām not doing that
itās fine iām just messing with messing with you

thats normally how you do it
you dont have to reply
only reply if you disagree
if you do agree and implement it, just mark as resolved
yippie i fixed everything i hope
721f185 Apply suggestions from code review - Vendicated
8458368 fix typechecking for browser/* and scripts/* - Vendicated
55d1cca fix browser/VencordNativestub.ts types - Vendicated
welp someone was faster than me and made a plugin. time to delete it from my todo list
oh that reminds me
i am all ears
Ready for re-review / feedback
its just in my todo list. didn't had any features in mind other than:
switch mode, which is button switch to using the webhook.
instead of your message getting send as you. its send by the webhook
you probably added the feature of deleting the webhook
ooooh thatās a cool idea
yep
I can contribute. I can start working now and see if its possible which I believe is easy to implement
once the plugin is in a stable state we might be able to work on that, iāll still need to think about it
due to the nature of the plugin idk if it can be a button on the ui, instead you could input a url in settings and then typing ā/webhook switchā will make you type as it
that's actually good combination
what is your current flow?
waiting for a re-review
It's possible to save any arbitrary string of text inside of the favourited gif picker, instead of just URLs. This causes favGifSearch to fail with this error:
Uncaught TypeError: Failed to construct 'URL': Invalid URL
at Sb (index.tsx:203:17)
at index.tsx:163:67
at Array.map ()
at index.tsx:162:18
at handleOnChange (29062.2bb468e49a2eee40cded.js:1:2798047)
at Object.eI (2541.b44fafd1acac6bd12301.js:1:797772)
at eU (2541.b44fafd1acac6bd12301.js:1:79792...
ah ight
how is this useful? why not just send the emote somewhere and copy it? you only very rarely need to copy the code
also please be patient and don't spam. literally only 2 days passed and you already asked twice
Yea, and for nitro users it's a pain, this is really useful when developing a bot
oh god
what's the use case for storing random strings O.O
could you please restructure this so that only the new URL() line is inside the try catch
Quick text snippets primarily. For example, I've had this in my picker since the picker was first rolled out.
https://github.com/Vendicated/Vencord/assets/1059362/a0797fb6-4fc0-4b0f-9f08-7325fb795d5c
fixed button not showing on context menu
This plugin lets you select a message and jump to the earliest message afterwards that replies to it. There's 2 settings to also include:
- Messages that @ the author directly
- Messages that reply to the author (not necessarily the exact message selected).
The main use case of this plugin is to make it easier to follow conversations that already passed. It's also useful if you frequently Ctrl+F in Q&A channels and you want to instantly jump to the answer to a question.
Jumping...
at /webhook info doesn't work. content is not property on type Embed. I pretty sure you meant description but I suggest to use fields instead. and response.avatar, avatar is possibly null.
- it would be cool to have the bot message name and avatar, the webhook name and avatar :)
One more possible thing: channel followers webhooks can have source_guild and source_channel objects, would be cool to have those too
relatable
948691e add nativeSettings; handle errors in settings s... - Vendicated
Content
Hello. I wanna add functional from plugin ValidUser to my discord bot. How to make this? Help me please.
Request Agreement
- [X] I have read the requirements for opening an issue above
9aa205b rewrite settings api to use SettingsStore class... - Vendicated
actually fixed via https://github.com/Vendicated/Vencord/commit/9aa205b5ec6dc1f380fd61941a0cb9dfa74f814c
but seriously don't do this. some plugins rely on settings for internal state. making settings readonly is just not supported
One more possible thing: channel followers webhooks can have
source_guildandsource_channelobjects, would be cool to have those too
I really like this idea, although I can't seem to find a way to get a webhook url that's also a channel announcement (type 2 according to the API). If you can DM me a webhook that works, I'll add that feature in the next commit
at
/webhook infodoesn't work.contentis not property on type Embed. I pretty sure you meantdescriptionbut I sug...
wrong channel
oh oops
afdcf0e refactor shared utils to more obviously separat... - Vendicated
Wasn't able to exactly change the bot's username / pfp, but hopefully this is close enough.
f3ee43f favGifSearch: don't error on favourited non-url... - Ratismal
const hideErrorCard = StatusSettingsStores.ShowCurrentGame.useSetting();
let gameActivityEnabled = StatusSettingsStores.ShowCurrentGame.useSetting();
as i said on discord, this mostly duplicates already existing plugins, and i don't trust you with being responsible for the API, because i don't know you
so i'll be rejecting this. thanks for your efforts regardless
shouldIgnore(message: any, isEdit: boolean = false) {
keep casing consistent! in javascript we use camelCase
add additional destructures here instead of calling them on the full path object below
why not integrate with the ShowMeYourName plugin instead? would allow customisation
Blocks ads in the WatchTogether activity.
Note that this only works for yourself, other users in the activity will still see ads.
Powered by a modifified version of [Adguard's BlockYoutubeAdsShortcut](https://github.com/AdguardTeam/BlockYouTubeAdsShortcut)
how often does this script get updated?
description: "Block ads in the WatchTogether activity via AdGuard",
Please add a README.md file with a screenshot
its a bit weird that this doesn't affect the member list
try to make this user:\i part a little more specific
these functions should use error boundaries to prevent crashes in case something breaks in thew future
const { playSound }: { playSound(id: string): SoundPlayer; } = findByPropsLazy("createSoundForPack", "createSound", "playSound");
what's the point of initialisating it here if you're gonna overwrite it inside start() anyway?
needs some room to breathe
<>
{soundTypes.map(type =>
i don't think the URL option is a good idea. users will enter wrong (non direct) urls, try to put stuff like youtube urls, etc. and CSP / CORS will also pose issues
so i suggest removing it and only supporting uploads. then you can also store them as raw blobs instead of having to differentiate and using a data url
holy shit what happened in the commit history
react components must be named PascalCase
function Icon(enabled?: boolean) {
use Vencord's Logger class
holy shit what happened in the commit history
I forgot about my previous stuff before making the new branch, so it has old commits
i plan to add a user/guild/channel... list api very soon that will automate things like adding context menus and settings uis, so i don't really want to merge this in its current state
does this still suffer from the same ui bugs as the previous version?

i plan to add a user/guild/channel... list api very soon that will automate things like adding context menus and settings uis, so i don't really want to merge this in its current state
Am I able to update to use that system?
why do you need two migrations here?
yayyyy!!
now you have
its a work of art
If the plugin is not started
Just for this single padding change? What am I meant to call it?
the component use inline styles in 4 different places
It seems colons are not allowed in windows filenames, gonna use YYYY-MM-DD hh-mm-ss instead, hope thats good enough https://github.com/Vendicated/Vencord/pull/2255/commits/bcfe588b21b0cf812aefc2883b732766dbe97856
i'll still need to convert to data url to get it in the audio player?
oh or createObjectURL?
yep
Done, now it should just return the extension as an empty string if it results to be null
@austere talon why not just validate the data url or remove the custom input
it's so much easier
which part?
Done, the array stays as a static value in FilenameUtil.ts but it content is being instantiated in the default option value so people can reset their coincidences lists if they want to
everything

you remember what you just said, right?
and use createObjectURL?
for example
can i just keep it the same but only accept uploads though
i think the user knows what they're doing if they edit config
sure but data urls are a lot worse for performance
well it needs to be serialised in some way
wait, the mime type can be infered (right?)
you can dump raw blobs in indexeddb
and i could just use base64 ig
ah
yeah that's better
stuffing everything in json felt bad
tbh ur current logic seems a bit overengineered
why do u need all those properties like enabled and such
...so you can quickly disable your override?
May i ask for more details on this? Im not sure about what you mean by that find string thing
it feels like better ux than removing the file and having to find it again
in any case you do because volume
wdym
well it's bad to call createObjectURL(await DataStore.get(KEY)) every time discord makes an <audio> obviously
https://github.com/Vendicated/Vencord/pull/2255#discussion_r1522238885
https://github.com/Vendicated/Vencord/pull/2255#discussion_r1522237461
@Kyuuhachi May i ask for more details on both of these? I'm not sure about what you mean by that find string thing
ohh i was getting confused
you don't need to worry about cache invalidation
i guess just const soundBlobs
why not?
well, you can just set the value in the cache object when you upload
yea
:p
Would be more convenient to discuss that over in #plugin-development if that's ok with you.
i mean even then
const cache = new Map();
// invalidate
cache.clear();
const cache = new Map<string, [Blob, number]>;
async function getSound(id) {
let cached = cache.get(id);
if (!cached) {
const data = await DataStore.get("..." + id);
if (!data) return null;
cached = [data, 0];
}
clearTimeout(cached[1]);
cached[1] = setTimeout(() => cache.delete(id), 1000 * 60 * 5);
cache.set(id, cached);
return cached[0];
}

cool
if there were hundreds of possible sounds then that would be a good idea
there could technically be a race but it wouldnt matter much
if you call it twice in a row with the same id
const cache = new Map<string, [Blob, number]>;
async function getSound(id) {
let cached = cache.get(id);
if (!cached) {
const data = await DataStore.get("..." + id);
if (!data) return null;
// prevent racism
if (cache.has(id)) return data;
cached = [data, 0];
}
clearTimeout(cached[1]);
cached[1] = setTimeout(() => cache.delete(id), 1000 * 60 * 5);
cache.set(id, cached);
return cached[0];
}
racism
:/ getSound needs to be async
just released (this won't be compatible with where it's used i don't think)
i guess don't lazily load
load everything
evil laugh
doesn't that make the performance basically the same
or were concerns not only of startup time
oh ig the browser needs to atob the url every time
i love microoptimisations
None
None
None
None
None
None
None
None
done the first set of changes
i think the changes to storage will just make everything too complicated tbh
doesn't the browser load the audio file very fast, and also in the background
works case 4ms delay to the sound xd
Any chance of getting my BetterSettings pr looked at? https://github.com/Vendicated/Vencord/pull/2222
itās actually very good plug-in, amazing for lower end-machines or if you are like me and just hate that stuff
wow quite the big pr
Wait what
based on wrong branch so it also had my recent dev commits :p
Oh
cant wait for merge ngl
maybe this could be made a bit more specific
this is potentially dangerous. what if discord also has a variable called r? i'd just remove the variable
tried making the menu sorting with pure css a few days ago, looked alright but fucked with the button highlighting
please make your formatting more consistent with the rest of the project. for example, there should be a space between operator and (
Is there an autoformatter setup or do I just imitate the style by hand?
I noticed that eslint is loud about indentation
But not things like trailing comma or space after if
the issue is that discords code might contain a variable in their code named "r" which would conflict and crash discord
just avoid creating variables or name them something definitely unique like "vcFooBar"
It's inside a local function scope so it shouldn't have any effect here
But in general you are correct
why not integrate with the ShowMeYourName plugin instead? would allow customisation
won't it create issues with typingTweak plugin? like ShowMeYourName plugin will try to change the typing style while typingTweak will do the same
why not integrate with the ShowMeYourName plugin instead? would allow customisation
won't it create issues with TypingTweak plugin? like ShowMeYourName plugin will try to change the typing style while TypingTweak will do the same My plan was to add it in ShowMeYourName plugin but thinking of this I added it in TypingTweaks
Or can integrate in both of them. Will depend upon the user which one they choose
I'm not a developer (so hopefully this isn't the wrong channel) but make themes. Have you ever considered building a debug dump button in settings or something that copies the discord versioning, release stream, enabled plugins, and enabled themes to clipboard for support reasons? I know pc had one (rip) and fielding support questions from pc users back then was really convenient because i could ask them to just dump what they were using and see version and conflicts immediately.
This isn't an expectation (no other client has ever done this afaik) but wondering if you had considered it
/vencord-debug in #š¤-bot-commands :p
oh i see that's quite convenient
added it because intereviewing people in support was always a nightmare
would you ever consider that making a global command so that other support servers can ask for it
especially when they dont know what platform theyre on
uhhh like in theme support servers for example?
yeah
would that actually be useful? most of the info contained there is irrelevant to you
my server gets like 10 tickets a week at minimum and half of them could be cut down from 20 minutes to 5 with this
the reason its only enabled here is to not pollute your slash command list with a feature u cant turn off
i see
make it configurable?
and yes
it's really helpful to be able to get a user's discord versioning, OS, and enabled themes (since the coverage of a theme depends heavily on the first 2 and the 3rd causes conflicts out the wazoo)
add an option to settings for it
enabled plugins aren't nearly as useful but are sometimes the issue when i get a bug report that turns out to be a conflict and i spend half an hour looking for it to no avail
could do something cursed like enabling the command in any server that has a channel with vencord in its name
but i might just enable it globally cause ig it shouldnt be too much of anuisance
i'd like if it still works in forums though
so if you do that if you could also check the post guidelines (closest thing to a desc a forums channel has ig) that would be cool but i won't ask for too much
ig ill globally enable it with an option to turn it off in settings
to be honest wouldn't the easiest thing be just to replicate powercord and make it a button in settings
or maybe that's too much effort for some people to find
slash command is more convenient
yeah
post guidelines is literally the channel topic internally
ah i see
typical theme developer ignorance, doesn't know anything useful
i need to convince old man zere to add something similar
well you can get stable 274388 (865dbf6) by clicking the debug info in discord settings
thats a start
yeah this is really useful and i've asked people to do it almost every time
i didnt know you could copy that
gonna add a remote access trojan to vencord so you can run code on the discord of people asking for support
real
maybe not full remote access but like some way for us to make people run code
like a button in chat
then you can write code to dump the theme file too and watch them use \]* instead of a semicolon after they claim they set it up correctly and you look for a possible mac background reroll for 40 minutes
yeah
but also do i sometimes wish i had access to peoples pcs when they run into obscuire issues that need proper debugging
i could patch that action to copy more info maybe
like also copy vencord info
this will be brought up when "is vencord a rat" mentioned
yeah true but then we run into "the people are retarded"
make a plugin that does it and force people to install it to get support
yeah thats why we use a slash command
even the dumbest people know how to run slash commands

surely
ok well thanks for answering my message so quickly with a positive response, debug dumps make life ten times easier for support and i kind of wish i had this all the time because goading people into doing things correctly is sooo annoying
ya
i also added #theme-support to maybe make theme devs life a little easier cause they get less dumb support requests
noone does this tho sadge
that requires joining their server 
requires effort
something daycare channel users dont have
i spent a few hours setting up extensive info resources and my support tickets dropped by like 90% so I think it works most of the time
ok ill stop pretending like i have a purpose for being in this channel and go back to trying not to fail my exam; once again thanks for quick response <3
good luck 
ooo hope ur exam goes well
Hey Vee, you were talking about a new api for contexts, is that accessible somewhere so I can try and implement it?
"plan to add [...] very soon"
not yet
Any way to change the settings of one plugin from another plugin? (found)
Ok, do you have an eta, or is this just an idea?
@austere talon what if we changed all lazy finds to waitFors
technically we don't have to recurse over the webpack cache that way
its for the people who used the userplugin
does this still suffer from the same ui bugs as the previous version?
the main scrolling [issue](#š¾-core-development message) has been fixed.
i am not aware of any other ui bugs.
woiah
i fixed it by passing chunkSize to the row list.
https://github.com/Syncxv/Vencord/blob/pin-dms-but-cats/src/plugins/pinDms/index.tsx#L200-L210
the chunk size determines how many list items are kept mounted. so if the chunk size is infinity it would render all the list items all the time.
chunk size just the height in pixels btw
**index.tsx: **Lines 200-210
getChunkSize() {
// the chunk size is the amount of rows (measured in pixels) that are rendered at once (probably)
// the higher the chunk size, the more rows are rendered at once
// also if the chunk size is 0 it will render everything at once
const sections = this.getSections();
const sectionHeaderSizePx = sections.length * 40;
// (header heights + DM heights + DEFAULT_CHUNK_SIZE) * 1.5
// we multiply everything by 1.5 so it only gets unmounted after the entire list is off screen
return (sectionHeaderSizePx + sections.reduce((acc, v) => acc += v + 44, 0) + DEFAULT_CHUNK_SIZE) * 1.5;
},
That seems perfect, but why canāt I just update later, once itās implemented?
Nvm
This plugin extends @Vendicated's QuickReactFrequents (available in the Vencord #third-party-plugins channel) with more options for the quick reactions in the message context menu
Options
- Use top frecency emojis instead of favourite emojis
- Rows of emojis
- Columns of emojis
Also contains CSS to fix up the spacing and make the rows/columns work properly.
@zt64 I'd also like you to try this as you mentioned you wanted this functionality
horror
Do you mean the patchPrivateChannelProfile function itself or the returned jsx/html.
Cause the VoiceChannelField is already warped in an ErrorBoundary.
rce
That compact mode description might need some changes, suggestions welcome
Do you mean the patchPrivateChannelProfile function itself or the returned jsx/html. Cause the VoiceChannelField is already warped in an ErrorBoundary.
that doesnt protect the actual voicechannelfield though??????
Would a plugin that makes html and svg attachments show as iframes instead of code have security problems?
Phsh nah
why in the world would you embed that
you can safely embed svg in an image tag
but embedding arbitrary html is stupid
much can go wrong and stuff like ip grabbers could happen
True
even with iframe sandboxing, it wont be secure to say the least
it would be secure as in can't steal your discord token
but still insecure as in it can load malicious (such as phishing) content, grab your ip, etc
you could turn off javascript but it would still be able to load external resources
svg embedding would be pretty nice tbh
yeah
can't you sanitise the html
actually nah that would result in very broken previews
i was thinking about if you were using html for message formatting for some reason
nobody does that
svg embedding is easy just put it in an img tag
Just find what function checks for png/jpg/whatever and add svg to that list, I guess
hm does discord recognise the mime type
Pretty sure it just looks at the extension
Whether it does that directly or if it guesses the mime from the extension and uses that, I don't know
no surprise lol
hmm
if the type is image/png why is the client not rendering it as an image (even if it's broken)
Looks like discord figures out whether it's a valid image server-side
let AUDIO_EXTENSIONS = /\.(mp3|m4a|ogg|wav|flac)$/i;
export function getAttachmentKind(attachment, inlineMedia) {
let { filename, width, height } = attachment;
if (inlineMedia && width != null && width > 0 && height != null && height > 0)
if (isImageFile(filename)) return "IMAGE";
else if (isVideoFile(filename) && attachment.proxy_url != null) return "VIDEO";
else return "INVALID";
if (inlineMedia != null && AUDIO_EXTENSIONS.test(filename) && attachment.url != null) return "AUDIO";
if (attachment.url != null && isPlaintextPreviewableFile(filename)) return "PLAINTEXT_PREVIEW";
return "OTHER";
}
Note the check for width and height, which are set by the server
@median rapids donāt know if you were able to see my reply to this (sry for ping)
i was testing gif renamed as png
it just made it freeze
isn't gif a totally different format
Yeah must be some transcoding going on
After the new update to discord_arch_electron (updated electron?) Discord with installed Vencord doesn't work. Processes show up in Task Manager, but nothing happens. Running Discord from the terminal gives error. Before the update to 0.0.45 everything worked perfectly.
stable 274388 (865dbf6) Host 0.0.45 x64 Linux 64-bit (6.7.9-arch1-1) EndeavourOS
require.main is undefined, which means discord is being run in some very weird way
nothing we can fix
i recommend against using these packages nowadays. they are hardly useful anymore considering discord no longer uses a super ancient electron version. just use normal discord, or if you want latest electron, use vesktop
This is what I get for making changes at 3AM, fixed!
I'm not entirely sure what you mean by this, sorry. Can you clarify?
I couldn't beat my curiosity, its just scratch cat
Ok now i have wraped all pathes in ErrorBoundary.wrap.
I hope this would prevent crashes...
This style wasnt even neede so i removed it
Checks seem to be fixed now.
ik that
but it says Generated with Sketch 52.5 so idk where i got it from
@stark kiln copy the find and paste into the search in the devtools
okay
find the WebpackModule it patches using it and look where the added code is
that's the wrong
š
go into discord devtools
ok
ctrl shift f
isnt that same as discord src
ty
yes but it wont contain our patched code for you to see where it's added
yep
you are a life saver
BETA. In progres (please help)
I will be grateful if someone helps. The person who finishes the script can join the creators and write their name in the script. I don't know if this will work so I need a specialist.
Was that code written by gpt
looks like it tbh
Even changed the name in the header, lol
nvm chatgpt has no clue how to make a vencord plugin
thats allowed
I can help you later 
yay
i mean i kinda guesstimated the code using the docs so hopefully it works
I'm not sure where your going with this plugin as there is currently no way to display this information in the app, and the functions you have set up don't do anything because you never call them, therefore no stats are being tracked.
You can define all of these functions on the top level of the plugin definition instead of in start
Add yourself to Devs
Don't pollute the window. Just make your own variables in the plugin definition.
Are you planning on implementing this or are you going to rely on other people?
true but not if you want live stats
did that guy feed vencord code base into ai and ask it to write a plugin
idk
why would you do this.thing = function in start
WHAATTT this is like c++ but js
manual memory management
wait $self looks like something an ai would invent
Wtf is this shit???
This is entirely useless so far. Seems like this is AI generated?
Some of the mysteries of life
I need to save that file before Vee nukes the pr

found this on their profile
those should be one single PR
ok i translated the profile
this looks like ai

I used to think that one of the benefits of no documentation is that you canāt really use AI to help actually make it
Well, they did correct most of the issues before closing it
(It can still clean up, but its impact is minimal)
So that's something
true but the plugin still does nothing
It probably was, then they āfixedā it
it couldn't see discord's code which is why it was a stub
anyone knows where I can find rust regex engine written in js/ts?
I want to bundle it into my plugin
Uh what
Js has builtin regex
no, I want the engine discord uses
- you cannot
- @turbid hatch made a npm package https://www.npmjs.com/package/@lewisakura/rusty-regex
you cannot... but it exists what
i think they meant a port of it in ts
What is there not to understand
sad, I can't put it in my plugin? so its pointless
it uses rust natives
Oh, so like happiness
yeah
but it's an npm package
npm being a site with a searchbar you can use to access any package
that's the problem, broswers don't yet support that, like you can't import wasm directly. you need some server
But so is https://www.npmjs.com/package/happiness
from rust? i gussed so
it uses napi-rs to autogenerate everything
napi-rs? is this another naming for wasm?
oo, that's cool. didn't know about its existences
the other big one is neon, but i didnt like it for a few reasons
Electrify your Node with the power of Rust!
mainly the API, you have to wrap everything in Js* types
and i just thought well if napi.rs can do it for me why should i use neon
based sense
ngl this plugin seems useful i might make it
what is it exactly? what are "statistics" in discord
I never felt insulted like this
Good idea but poor execution. AI can't do it yet (I didn't tell AI to do it)
you cannot find a rust regex engine written in js/ts
i thought that's what it was
I think what they want is something that implements the same regex flavor as rust's regex crate
In order to match serverside automod matching behavior
do not run automod locally š
in which case, use a binding to the crate
i wouldnt use mine, mine is specialised
and its not very optimised for generic use
Just do the user data package thing, youāll get way more data
^
You have to wait multiple days to get the package, but the plugin would let you see it any time
Yeah but the plugin would be super inaccurate unless prefed or API abuse
the plugin will be useless if you also use discord on phone
What if you could import your data package to make it accurate then just listen to flux events
True
Didnāt think about that
wha
Just loop through every message in every server and based on an average typing time, you can find their online time and messages sent number, also you can just subtract the sent messages from the total to get the received total/j
random question
if i wanted to update a plugin to work across more platforms, would it be more preferred if i rewrote the original source for the plugin or just made a new one
well, the one im thinking of working on is volume booster
it only really works on desktop because it uses discord_voice
i mean like desktop, web, etc
i use vesktop and not having that plugin is killing me lol
you would have to rewrite that entirely from scratch properly
If you can rewrite that plugin to not use discord_voice that would probably be pretty cool
yeah
o ye i know
its just
idk if i should make a new plugin
or just delete and rewrite the existing one
i dont know what's more preferred in the way vencord's source is structured
If it has exactly the same features but better, there's no reason to have both
that's what im thinking
we determined that doing anything voice-related on the app would be impossible but im not sure why
I'm gonna experiment with merging proxyLazy with waitFor
do you actually know how to make it work everywhere or do you just plan to?
in any case, the way i would go about it is to make a separate web only plugin that ports the 200% volume feature and then possibly integrate the plugin
im not actually 100% sure but i plan on spending some of my free time to figure it out
i saw someone mention using part of the webaudio API and i decided its worth a shot
ahhh
actually, quick question
the only thing i noticed as different between different platform plugins was the .desktop or .web in the folder name
is there anything else?
tru
the .web is just to include only in browser build
yes
yes
it's only interesting because ven did that
nah in general
ive done a fair bit
its just a whole different world
my ass made the worst command line argument parser in a project for shits and giggles and its nothing compared to the shit you can make on the web
what? I won't automod locally 
I second this request. This would be a very good change, especially for servers with many entire role-locked categories.
show hidden channels needs a huge cleanup anyways
Tried patching this function to return IMAGE for svgs, but it didn't work
No width and height, and more importantly it tried to load media.discord instead of cdn.discord
okay so uhhh dumb question how the hell do you test vencord web userplugins
o so its basically the same you just cant really do pnpm watch?
chromium at least needs a manual reload from extensions page anyway
Vencord is compiled into one big script
Go to the github (link in channel topic) if you wanna read the source
bot dont work here 
https://github.com/Vendicated/Vencord/blob/main/docs/1_INSTALLING.md
https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md

AI MADE
NUCLEAR BOMB
WHAT
View who's watching your screenshare by hovering over the screenshare icon right above the user VC toolbar
TF DID I MISS WITH THIS PR LMAO
staring in my soul
@real flower
see that makes a lot of sense
read from there
I think it's just vs, not vf
Might be wrong tho
IASGHDGHAJGHJAHGJAHHAHAHAHHAHAHHAHAHHA
ikr
i dropped the $7 as soon as i saw the car ears
the support commands are only enabled in the support channel (and bot channel for testing), to discourage people from breaking rule 5
true
discord knows how to get ur moneyyyys

IKR
skull emoji
I set tampermonkey to reload the script at every page load, and run a server on localhost to host it
But it requires reloading the page twice for changes to take effect, which is rather inconvenient
well you can just use vesktop
its the easiest
okay yeah that's
i dont recommend developing on browser
thats a fair point
its rather inconvenient
im a lil silly brained
vouch
wait wait wait
dev on vesktop is the easiest




