#🧩-plugin-development
1 messages · Page 65 of 1
remove the `
okay
and make sure your file is .tsx
I see thank you ❤️
also you can get rid of the &si parameter in the URL
it worked
Hey there all!
I'm poking around the existing "Friends Since" plugin, and I'm curious how the patches were made.
In particular, an existing patch is using find to look for .PANEL}),nicknameIcons I'm guessing this is searching for a particular area in the UI, where can I see this code so I can find my own arguments to pass?
Thought it was, thanks. I'll poke around and see what I end up breaking 😅
discord-types stop being out of date
im trying to write a patch for a module with this find .SETTINGS_NOTICE_MESSAGE
patch helper gives (0,n.jsx) after the match, but when i go into devtools i cant find that anywhere in the module.
am i going crazy?
unless I am reading wrong I believe n is actually s
i.e look for (0,s.jsx)
yea, im just wondering why they arent matching up
both should be n or s
not mixed
no idea. I can't even find u.Z.Messages.SETTINGS_NOTICE_MESSAGE
Lazy loaded
yeah that's why I crossed it out
is it possible to add a context menu to something that doesnt have one
Course it is
is there an example somewhere
There's hundreds of examples in discord's codebase
its a prop react allows you to pass on any html element
look at how like any vencord plugin does it
What would be the best starting project to learn a bit about how to make a vencord plugin?
go to #plugin-requests , visit the repo, find something you want to do
if you just want to learn, also sort by rejected for low quality/niche
Ah
I’d have no idea where to start with any of these. Maybe I should first start of with more learning? Where is the best place I’d be able to do that?
you can look at exisiting plugin code
maybe theres a plugin that you want to add features to
My problem is I don’t know how to code a plugin yet, apart from the barebones from the dev starting guide.
have you read https://docs.vencord.dev/
Yes
do you know what patches are
Yes
i think you just need to start and try to make a plugin
you will fail, but with some time, you'll get the hang of it
I have no idea how to start though apart from that guide. Like how do I get the base down and allat, this is way different from my normal Node.js.
First and hardest step is deciding what plugin to make
and #🗳-plugin-requests is no help
Because 70% of them are duplicates and remaining 29% are bad
there are a good few
@lean vapor while it isnt that useful, this one seems like an easy place to start
Yeah saw it too, but again, no idea where I’d start after I would’ve gotten everything inside of the dev guide.
have you ever used react devtools
Not yet no.
use react devtools to inspect the component you want to patch
I know some stuff about inspect element but uh, that’s not going to get me far.
Oh okay.
And then add CSS/HTML code to it and then put that in my code I assumev
if you want, i can show you me writing this plugin
Sure but maybe in like 2 days when I got everything set up and got more time
Well
I got time rn actually but might need to head out in a second
Nevermind
Could you maybe just send the code if you want to and can? I can try to reverse engineer it a bit.
sure, but i dont think that would help you at all
there are a lot of other plugins that you could do that to
try and find plugins that are just one patch
and look at those
I’ll do my best to reverse engineer it, because just blindly going in it, will just result in me asking stuff
like slot
A lot
Probably everything
WHAT THE FUCK IS THAT
WHY IS IT STORING DATA IN THE PRESENCESTORE
WHY IS IT RUNNING JSON.stringify ON DOM ELEMENTS
1 question
how bored are you for you to check forks for unreleased stuff
😭
It isn't though? That's just a string array
solution: switch to GODOT
oh i didnt see .value
whoops
i thought it was running addUserToList(inputElement);
I had an idea
unless there's already someway to view replies to a message it could be a new plugin
@hushed loom
like see all replies to a message
yes
And how would you find them? Spam the api to load every single channel in the thread to find if it's a reply?
can you reply to a message across channels
no
thats fowarding
i think you could only do that with very recent messages
but if ping was on on reply
fetch every single message in the channel to see what is a reply and what isn't 👍
then you could do within maybe the past day or 2
tbh apart from spamming the api (which is a no-no for a plugin), what else can you do
i was thinking use what is loaded and the search function
some search like
- mentions author
- after message send
- in channel
and then filter from there
yea
bad idea imo
thats why i said very recent
👍
where do i import stores from
findStoreLazy
how the fuck did i not find that

is there a way to get one specific message, considering i have its channel ID and message ID? MessageStore.getMessage() returns undefined for some reason, even when the message does exist
message might not be in the store yet, fetch with api
Check what MessageLinkEmbed does
I made a plugin to replace the stock ui texts, probably not useful in any case but cool
Settings could also use some work but too lazy to make a textreplace type thing
Only sorta use would be very heavy theming to a certain vibe?
i can't see a use case for this
and it's hard to setup, you need to dig through strings in inspect element to get the id of what you want to change
no... You can just search the string in dev tools
ideally there'd be a select menu with every single string key, but is that even possible
Incredibly useless but i had an idea and made it 
that looks confusing to use
Does it handle things like formatted strings and plurals?
It should
It 100% handles formatted strings
Let me get an example
Am i blind
probably
dementia
Dementia
Somebody please make bulk collection plugin
what would that do?
that makes no sense
Makes sense to me
Any specific use case?
oh make sure to abuse the fact that discord has camera permissions and screen share permissions and make it ss your screen every few seconds and then take a picture of you every few seconds
If somebody is doing bad things, vee can remove their access
And send their discord token in every available channel
YES
i think that you could also easily get the real time location under a "geostatus" plugin that changes your status based on your country
Yeah
Mass scrape vencord user actions and train an ai model to replace whitenames
is there any way to simulate certified device events?
What's that
At this point with how they act, I think every whitename is already an AI
I remember vee saying there is a function to identify the dominant colors of an image already in discords code, where can i find that function?
I think it's used in voice chat tiles for example
So check their render function I guess
What the fuck did I just cook
I'm not cooking
special channel conditional adder hook thing: 761091
OH
wpex so good
I should add named webpack extract
channel list item renderer: 373274
dont mind me dumping notes
desktop visual refresh special channei icon entries (guessing based on code): 471995
channel renderer: 176299
analytics shit for special channel routes: 15379
has permission to view route, not confident: 849027
you should identify the module with a find instead
i am
since the number can change
i'm taking notes
oh nice
I dont ACTUALLY intend to hardcode any of this
it's actually possible to name all modules
these are just modules I intend to inject patches into later so I can pull them up and know what they do
wtf how
even web stuff?
On mobile app or what?
it's horror to read the code on it though
yeah
That is very interesting indeed
let me try to show you an example
wtf do you mean I already ended up patching this module?
This is unreadable as fuck
What module even is that
it's hard to find the matching module though
index.ts: Lines 143-149
find: /ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY.{0,500}GUILD_MOD_DASH_MEMBER_SAFETY/,
predicate: () => settings.store.showMembersPageInSidebar,
replacement: {
match: /\i\.hasFeature\(\i\.\i\.ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY\)/,
replace: "true"
}
},
do you just
love blindly copy pasting code into regex and not escaping the function call ()
I love \ so much
It should be a path seperator
I have finally made sense of this
those are just [GuildStore, UserStore] twice
No way, let's use ¥ for that
fuck reimplementing this
no. (/joke)

I'm attempting to make a plugin that adds preview support for a new file type, does anyone know where the stock file previewing code is? (for videos, images, etc). Would it be worth patching that system? or just hook into the attachment component and make my own
is it possble to intercept flux events?
Yes
is there any example in vencord code
No, but there is literally a method called FluxDispatcher.addInterceptor
oh 😭 how did i miss that
I still feel like its a xy problem
what i just asked about?
ye
is it a known issue that messages send from these things dont get intercepted by the pre send listeners?
No
well, they dont
Does /msg get intercepted?
no
Guh
Currently working on a SecureTokens plugin
Saves your token to an external db for safekeeping, then queries for it on startup
nice!, i was planing on doing something like that
All those things about "securing your token" all sound like bullshit and fearmongering
First thing first, what exactly are you trying to protect against
Wait, I misread that
that means discord is stupid
so useless
go work on implementing secure cookie and localStorage in chromium
Like, a local external db, just so your generic malware can't find it in the regular local storage? 🤔
(I read it as a remote db at first, which sounded very token grabby
)
it's already stored encrypted
(not on windows casue windows moment)
anyway just don't run malware on ur pc
Secure tokens ❌
Don't be stupid enough to get token logged ✅
"secure token" mfs when i read their login from chrome
🧠 is the only token protection that works
memorize your discord token 🔥
Write your token on paper and put it in a safe or something
Remote
Probably will just use a json file saved to a public google drive
a token on a public google drive? 
Harddrive = secure ❌
Google = secure ✅
Tokens
Every user who uses voicecord
lol
its fine, its base64 encrypted, no one will find it/s
"Make Your Discord Account 24/7 On Voice Channels!"
... why though
But then a muscle reader can steal it
Hired muscle is very efficient at extracting secrets yes
plugin that, on every request, pulls up a popup having to confirm your password to generate a new token (and invalidates the old one)
Can't have your token stolen if it's invalidated four times per second 
exactly


we should do this with vencloud
tokendb
you are joking right
unofficial token loggers DrakeNo
official Vencord token logger DrakeYes
real, if you run malware on your computer your Discord token should be the smallest of your worries
these days there is a lot of malware which only purpose is stealing discord token
this is advertising a store with tokens in readme xD
yes, and along with their paid token botting service, they have a disclaimer not to give your tokens to anyone 
Trustworthy 
Don't install those then
However, how would I go about setting a user's token?
horror
how would you get the users token?
const getToken = findByPropsLazy("getToken");
guh
do i use the store or the module?
const token = getToken["getToken"]();
erm
why does deleting the token key in localstorage make it think it's in browser?
inbestigator making a token logger (/joke)
Ok, I've made it extract the token and patched Discord to read from my plugin instead of how it normally should
now, just how should I store it? (securely)
you can dupe your token btw
can you send me your code, i want to do something like it, but a lot better
vencord.app
⚠️ vencord.app is a fake malicious site! The only real website is https://vencord.dev! If you have downloaded anything from vencord.app, remove everything you have downloaded immediately, run a malware scan and change your Discord password.
tokenduper plugin when
that sounds minecraft malware
real
free token dupe glitch: dm your token to me and I'll send you it back twice
Lowballing discord tokens: /msg me or visit my island
I'm not doing the external json thing, I'm actually making something maybe useful
you should still send me your code 
Accidentally making a crash loop probably wasn’t the best idea
Service resource is being rate limited.
good 
selfapp
Oh god wtf are you planning
We do a little trolley...
Denied plugger
Stores token locally in a different place and encrypts it
open a modmail and get it posted in #1256395889354997771
it wouldn't be approved
lol
I know but why
Like isn't that entirely useless unless you're stupid and get scammed
In either case you're practically done for if you're that dumb anyway
Figured
I'm trying to patch where Discord fetches userdata (name etc.), but it doesn't seem to be the correct place? (even though it's where everything else points to as the correct place)
{
find: ".USER(",
replacement: {
match: /(\i)=\i.default.getUser\(\i\);/,
replace: "$& alert('Triggered');"
}
}```
iirc vee made some type of edit user plugin, prob sitting in pr drafts somehwere
How can I get the content of a text file?
It shows in the network tab and it has the whole file, but after opening it in sources, reveal in navigator sidebar links to a js file, not the text file
wait now it's not linking to anything
maybe it never was linking to the js file
my quickcss for reference:
(I want to add a copy button to text files)
just fetch it
oh
ok
Is there a guide to making patches somewhere?
I'm quite confused on how to find where to patch
and I don't exactly understand what the \i vencord regex thingy is
I have an old version of CONTRIBUTING.md which explains patches and the \i
https://github.com/programminglaboratorys/Vencord/blob/dev/CONTRIBUTING.md
docs.vencord.dev
but patches arent on there

I feel like it's weird to ditch old docs for newer worse ones
at least wait till the new ones are on par
sounds right
How do I get react devtools in discord?
Do I have to use it in browser?
go to settings than vencord
you will see the option to enable react devtools
than fully restart discord
oh ty
I don't see where it explains \i
oh huh where did I get the explantion from? ohh sqaaakoi
searching for the conv...
welp in short i matchs variables
for example
e.Message.CookieClickerTitle
could match this str with \i.Message\.CookieClickerTitle btw starting with \i in your regex is bad
\i in the regex would match e
ok
i'm still struggling
I think i found the right function for the download button, but I can't make sense of it at all
I'm trying to look at a userplugin that adds this button for reference, but I can't find where it's patching and vencord companion just says a match was found, but not where the match is
did you search for the find in devtools
No
is the find not just a label for the patch?
no lol
I don't really get the find
find is (supposedly) a unique string in the module you want to patch
That's a replugged plugin
Wai
it's what vencord uses to decide whether to try your match or not
on every module added
maybe it was ported?
#1032200195582197831 message
so it's supposed to be a unique string (or regex if really needed) that only exists in the module you want to patch
Perhaps
ok i definitely have the right id (981729), but i can't find where the buttons are made
i had the wrong id (:
that's not the right
I did
but I need to put a button here
or on the left of download button, idrk
but same thing still
holy notes does something similar, not really though
I want to add a button there to copy the file contents
holy notes adds a button here that opens the modal for it
only similarity is that they add buttons
probably shouldve looked at vencordToolbox instead
.Messages.PREVIEW_BYTES_LEFT.format(
might be where you want
here or maybe under, but similar
I think those are these buttons
oh
that's not the same function i found
what you found was the Tooltip component I think
oh this?
ah
its easy to find that in accident
ok yeah this makes so much more sense
what I did was look for this
but as you can see it has a children prop already with the values
which means that Anonymous component is not the one with the code rendering those
i was looking for onClick
clicking to view the code for the component A was what made me found this module
oh im blind
you dont need to account for line breaks or whitespace in the regex right?
the match regex
i assume the regex is matching the output this right?
(from the old version of contributing.md)
yes
if you have issues with it I can screenshare for you and show me doing it
(if I havent left yet)
doing what?
the patch
oh
I think i can probably make the regex?
although not quite sure how to add the button
like i have the html needed, but i probably won't actually use it, and i'll use something else?
(the icon is this)
<svg aria-label="Copy File" aria-expanded="false" class="codeIcon_d8e2d0" aria-hidden="false" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z" class=""></path></svg>
you need to use react
have you done this before?
inserted an element with a patch?
no
and is this how i'll get the url of the file?
(i need that for the fetch)
i can't join that vc
what about using react?
the react devtools?
i just turned that on today
Vencord.Webpack.findByProps("getInputDevices").getInputDevices()
@inner monolith
"input-devices",disabled:
{
find: 'input-devices",disabled:',
replacement: {
match: /return \i(?=\.map)/,
replace: "$&.sort(({name:a},{name:b})=>a.localeCompare(b))"
}
}
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import definePlugin from "@utils/types";
export default definePlugin({
name: "dsfjkgdfhsfd",
description: "dsfdsfdfdsfsd",
authors: [],
patches: [
{
find: 'input-devices",disabled:',
replacement: {
match: /return \i(?=\.map)/,
replace: "$&.sort(({name:a},{name:b})=>a.localeCompare(b))"
}
}
]
});
horror
<CopyIcon color="currentColor" />
this needs added to main Vencord
Ok I think I finished pretty much
(the checkmark is persistent like in codeblocks)
one thing I don't like is having a css file with barely anything in it though
can I just have it in the tsx file instead?
i think the "box shadow" is just shitty gif compression
yea, thats what it looks like
i can see some type of shadow and the 256 colors dont help
its just the hover color, but gif compression makes it look weird
and yeah ik about style= but I don't think that works for hover
ok theres a bunch of other styles like this with just something like
.class {
color: someColor;
}
.class:hover {
color: someOtherColor;
}```
so ig it's fine
also should my css be style.css or styles.css
it seems like it's kind of used interchangeably in the plugins?
It doesn’t really matter, personally I used styles.css
The main thing is just that the classnames are vc-<plugin>-<name>
Or vc-cfc-..., that's kinda long
what would the ... be
The name of your element
button?
Perhaps
I'm making a plugin that changes the role and role dot colours to a different one.
It was a fairly simple process to swap the role colour, now the role dot is being a bit complicated
Essentially, I need to get the message author related to the role dot, but it seems no such information is supplied around this. Any thoughts?
Information regarding the same module doesn't seem very helpful either
I'm making a plugin that syncs role dot and role color to the user's profile picture dominant color, so I'd need to access the user avatar
well you need to patch the parent component
that passes the color down
and then do it there
Ye I thought of doing that
I've just found out I was searching the wrong module id and Discord has some readable name to component mappings somewhere 😭
mb
yeah psuedoclasses (and elements) don't work with inline styling unless you use tailwind our lord and savior.
@thorny solar I've found an issue for betteractivities. not sure if you knew but basically it works then id goes undefined then restarting the activity fixes it. shouldn't a ?.id fix it?
is there a list for all the discord props that i can find with findbyprops and findbypropslazy?
no
find by props is mostly for grabbing functions you already have found in discords code
(in my experience)
ok im just trying to find a replacement for some old props that are not a thing anymore
will try
Lmao I made a typo
any export that is properly named (like getToken)
and an export using one of its inner properties
for example
let a = { hii: "yes" }
export a;
findByProps("hii").hii
ya ik in an old version of discord me and fres used 2 different props to get the current sound board volume but they both got nuked by discord in an update so it brakes the plugin now
what's the props
amplitudeToPerceptual and getAmplitudinalSoundboardVolume they are both lazy loaded
let me get them for you
const amplitudeToPerceptual = findByCodeLazy("6+1:");
let me try to find the other
if this is the code
const v1 = findByPropsLazy("amplitudeToPerceptual");
const v2 = findByPropsLazy("getAmplitudinalSoundboardVolume");
export const getSoundboardVolume = () => v1.amplitudeToPerceptual(v2.getAmplitudinalSoundboardVolume());
how do i replace what i have here with that?
const amplitudeToPerceptual = findByCodeLazy("6+1:");
const v2 = findByPropsLazy("getAmplitudinalSoundboardVolume");
export const getSoundboardVolume = () => amplitudeToPerceptual(v2.getAmplitudinalSoundboardVolume());
ty
stil ltrying to find the ohter
fres made this part and i have no clue how it works 🫠
const amplitudeToPerceptual = findByCodeLazy("6+1:");
const { getAmplitudinalSoundboardVolume } = mapMangledModuleLazy("CUSTOM_CALL_SOUNDS_SPARKLES);", {
getAmplitudinalSoundboardVolume: filters.byCode("getSetting()", ".volume)")
});
export const getSoundboardVolume = () => amplitudeToPerceptual(getAmplitudinalSoundboardVolume());
ty now soundboardlogger is 1 step closer to working again lol
ya it dosent error out now let me see if the volume works
ya it dose
nice
i just saw that the place i took the patch to place the button in the chat box changed it to not use a patch 
what
i can not understand that
its 5 am and i only had tea and monsters
my brain dosent work anymore
get sleep
what did you just say lol
what dat?
yk the buttons in the chat box next to the gif picker and shit?
yes
and the plugin i took the patch from is not using a normal patch now
ya
you mean the api for it?
there's an api for it now
ya ik
but last time i touched the code for the soundboardlogger was like 7 months ago lol
if anything it's easier now
do i need to change the buttons themselves? or can i just switch the patch for an api?
wat
look at SilentMessageToggle
i havent been in the plugin dev thing for a few months and everything changes 😭
would it be possible to conditionally enable them with decorators
that's the issue
can decorators take args
I would need to cook a solution for that
yes
but passing the plugin name on every decorator would be ewww
eg
@chatbarbutton(() => true)
function foo() {
return <Bar/>
}
which ^^
does javascript have reflection?
nothing even remotely good 
Is it possible to inject react elements into a settings modal?
you need to put it in the plugin obj
for it to acquire the name of the plugin
which is not practical with decorators
so it needs another way of discovering the plugin name
you mean the vencord settings?
Trying to dynamically add into the settings like this 
Yeah
ye you can do custom components
Yuh yuh
OptionType.COMPONENT
look at text replace for a good example of them
And how would I do dropdowns?
discord might have some compontents you could steal
guys how do i move form a patch with this to the api?
look at a plugin that does it, like translate
also might just be me, but something like a command to open a modal would be nicer. too many chat bar icons as there is
there is a toggle to choose from chat bar and tool bar for opening the logs
this is how it looked like before everything broke lol
https://github.com/ImpishMoxxie/SoundBoardLogger
idk if this is valid js syntax but maybe this
export default definePlugin({
name: "foo",
authors: [],
@ChatBarButton
foo: () => <Bar/>
}
unsure if that can access the plugin obj
however I still dont really like it
I think some esbuild magic can insert the plugin name in the decorators automatically for us
that seems like too much horror to be worth it
it would be dope ngl
you could make a lot of the apis be decorators
flux listeners
context menus patches
chat bar buttons
and more
guhhh does mdn not have an article
it's a typescript feature
guhhhh
rest in peace my idea 
convert define plugin to a class just like that better screenshare plugin
nuh
js classes are Weird
yes, this also breaks due to some destructuring within Discord itself I think
as I reported recently
and don't know how to reproduce 
though that might be a similar issue
The only problem with that is we don't know how to reproduce it you just click someone's profile and the popout may or may not crash you lol
Is there a way to make the discord source more readable?
I loaded all lazy chunks, and i'm trying to find the part where the deafen button is, because i'm trying to decouple the deafen and mute
since on deafen, it automatically mutes me
you don't need to load lazy chunks for that its already loaded
just use react devtools to inspect
do you have a guide for this?
also are normal devtools that come with electron bad? iI saw Nuckyz using it and he made it look easy lol
I know how to find the element, which is
but now I'm looking at the event listeners
I looked at toggle and click
toggle was an empty function
the function bound to click was called on any click in the entire window
what is @deep atlas
just use react devtools to inspect
on the browser?
Okay, i got react devtools and installed vencord on the web
Ohhh, Nuckyz was using this
I wonder if i can get it on normal discord
Oh, it's a setting on vencord
thanks :D
guess I made someone try to make a plugin :)
:D
is there a way to mark a plugin as a conflict with another plugin? like completely disable you from turning one on with the other?
reason: i'm building a plugin that uploads files to a different site on upload (instead of discord), so it makes no sense to be able to turn anonfilenames on since it wouldn't really matter + some of my patches conflict
the filenames dont matter, the user can choose wether to keep those on or not
you can make two different patches, one marked with preticate: () => isPluiginEnabled(other plugin)
and another for if its not
Can someone please explain the usage of ErrorBoundary.wrap and how exactly it works 
Oh, nvm, Props Interface is pretty good self-explanatory
You still need help with that?

Hey maybe I am being dumb but how would I replacement patch to get a function from a class?
class ed extends (i = r.PureComponent) {
scrollToChannel(e) {
}
}
i.e I want to use scrollToChannel within my plugin but this isn't exported.
is the only way to do it within the function body?
that sucks because in that case the function has to be run at least once for the function to be available in my plugin
module is 373274
I've also tried using wreq but doesn't seem to be accesible from it (but I am unfamiliar with how that works)
wait can I patch the constructor 
it's a class
you just grab the entire class
it's probably exported
unless I am doing it wrong I don't think it's exported
or at the very least:
Vencord.Webpack.find(m => m?.prototype?.scrollToChannel != null)
does not return the class
I want to scroll to a channel in the channel list by id
I'll look into it ty
Didn't find one that relates to channel list scrolling unfortunately
Is there a specific onEnable function for plugins? I want a function to only run when the plugin is enabled from the ui, not when the client starts
I will just patch the constructor I guess 
this seems like an xy
wait I am so confused.
calling
Vencord.Plugins.plugins.ScrollTo.getChannelList().scrollToChannel("994702739139477544");
works perfectly but
doing the EXACT same thing within the plugin does nothing (no exception no nothing)
where getChannelList just calls return channelList
confusion
sorry just blabbing atm while confused
wait but hard-coding the id works 
It's really not
I just want to prompt the user for an auth on first time enable and it would feel weird to prompt on open
it works. I have no idea what changed 
oh I see I was calling toString on a string. Thinking SelectedChannelStore.getChannelId() was returning a ulong or whatever the ts equivalent is
I mean just check if they are authed?
there's some magic you can prob do with setTimeout but it's better if you don't rely on having some code execute only on a manual enable
can someone explain how the audit log menu even works
my idea was just comparing via a date.now at the top of the file 😭

let isConnectionOpen = false;
let subscription;
FluxDispatcher.subscribe("CONNECTION_OPEN", (subscription = () => {
isConnectionOpen = true;
setTimeout(() => (isConnectionOpen = false));
FluxDispatcher.unsubscribe(subscription);
}));
// on the start method
if (isConnectionOpen) return;
your logic here
might need to use addInterception instead of subscribe
startAt: "never" as any 
but even then, that's very magic
LMAOO
did you type that on your phone 😭
yes
actually my method wouldn't even work
cuz you would need that to run outside of the start method
and flux dispatcher wouldn't be initialized
what kyuu suggested would work though
(even though it's just abusing the fact an invalid value would make it never start) 😂
- make it so that whenever the user does an action that requires auth it checks if authed and if not shows modal
- if user needs to auth somewhere that isn't discord, the odds of it getting accepted are very low
insane just use webpack.onceReady
forgot about that😂
Working on https://github.com/Vendicated/Vencord/pull/2574#issuecomment-2266221691, how does this icon look?
the tooltip is "Jump To Thread Start"
what icon did you add?
Yeah
ok… i don’t like it’s placement I’d put it on the end, but other than that, I like it
i want to make a plugin to screenshare the current app when you press a key but i have absolutely no clue how to get the currently focused app without some library or something
any ideas?
xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2 | xargs xprop -id
windows users:
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Tricks {
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
}
"@
get-process | ? { $_.mainwindowhandle -eq [tricks]::GetForegroundWindow() }
absolutely no clue how to do it on mac
you found the same SO post lol
looks janky but i think you have to use ps
is there a way to make some plugin settings not appear until a specific setting from a dropdown is selected?
Not with default option types
Easiest way would probably be to put all of the settings in a single react component
And from there you can do the normal stuff
alright, thanks
anyone know how to fix this
Refused to connect to 'url here' because it violates the following Content Security Policy directive: "connect-src 'self'
im trynna send a get request to somewhere but discord blocks it with that message
making a @ on reply database plugin
for ppl to set whether they wanna be @'d on reply by default or not
awful
awful
- That sounds incredibly useless, I don’t think anyone would really use it
- Send the request from native
wdym from native
From the native side, not the client side. Look at other plugins with a native.ts file
doesnt that arleady exist?
no
just one client side that doesnt have a db
bro yes it does
what
The difference with this one is that they want to make a database to store who wants to be pinged or not
^
u dont have to send from native
thats awful
how so?
expand pls
Because there’s no reason for a database to be needed all of this info is perfectly fine being client side
If anything a database just seems like a safety concern
Using a database is incredibly over engineered, just check if someone has something in their bio or username
awful
no it good
^
yall r just haters
If hating something that is very unnecessary and just a waste is bad then sign me up
its not tho
really?
wild saying the owner and maker of Vencord is a liar
its true
nin0 is typing… horror
k
i do find this plugin to not be that useful
(also having one huge JSON map isnt that efficient. you might be better off using a sqlite db on the long term)

only devs seem to be haters
other ppl want it
you do know us here
we are vencord users
- always fetching from an API, possibly untrusted, can be bad
(maybe make the plugin detect (@ON) | (@OFF) in a nick, or a 3y3 in bio? or other signs you want pings to be on or off idk)
right @swift delta
just takes up bio space but maybe
that what we are saying
- is painful to remove
use AI to parse the other users profile and use it to check if the user wants to be pinged or not
it is
are you serious rn
i will NOT wait 10 seconds for a generative AI to tell me if pinging someone is okay 
it was
whats that 1 bar thingy
vp latency
was joking?
vh plugin
Plugin (viewplugin, p)
Provides information on a plugin
Usage
vplugin <plugin name>
chars Inspect the unicode characters in a string
emoji-leaderboard Check who sent an emoji the most
reaction-leaderboard Check who reacted with an emoji the most
sticker-leaderboard Check who sent a sticker the most
top Get stats about most used emojis or stickers
mytop Get stats about your most used emojis or stickers
help List all commands or get help for a specific command
minky minker
ban Ban one or more users with an optional reason and delete message days
role-add Add a role to one or more users
role-remove Remove a role from one or more users
prune Delete a number of messages
slowmode Set the slowmode for the channel
submissionpass Allow this user to post one submission
unban Unban one or more users
whybanne Why Banne?
notsupport Create a graphic guiding people to the correct channel (usually support)
eval Evaluate javascript code
plugin Provides information on a plugin
source-code Get the source code for this bot
faq Get an answer from the FAQ
support Query a support tag
Use vhelp <command> for more information on a specific command!
vh eval
Eval (e, $)
Evaluate javascript code
Usage
veval <code>
what
Go outside then
For this version of my copy file contents plugin, it just uses the filecontents that the client already has, but the client only has up to 50kb, more than that and you have to fetch it
I have a version that fetches it if what the client has isn't the full file, but it'll still fetch it if it's like 500mb (haven't actually tested with 500mb file, but it will at least try to fetch it in that case)
Which treatment should I use or should I add a dropdown to choose? e.g. Normal (just copy the 50kb that the client has), None (hide the copy button when it's over 50kb), or Fetch (fetch the file even if it's huge)
If i have the fetch option, I think I should probably have a slider for the max file size it'll fetch, but the file is over that size, which treatment should I use?
tldr:
what to do if file is large
theres a file size limit via discord but what you can do is add a confirmation popup for files bigger than 1 or 10 mb or smth
like a warning
should i make funny discord ai plugin
im pretty sure you can check the file size before fetching
openai
yeah i can
I have the variable for file size
api or gpt2 thats open source
yea then make a confirmation
api
☹️
just scrape .ai sites for openai keys
or make it a discord bot
LMFAO W
should the confirmation be if it needs to fetch at all?
or should it be a certain file size?
and if second, should that size be configurable?
it should be a warning like below:
This file is {x}mb. Are you sure you would like to copy it all?
[Yes] [Cancel]
cancel = doesnt copy
also, what's the convention for modifying components\icons.tsx?
yes = copies
none but instead of hiding it make it crossed out and disabled then make the tooltip say something "this file is too large to copy into the clipboard!"
possibly add a copy preview
The copy icon is outdated, I assume it's fine to update it, but should I put the other icons i'm using in it (because they're official discord icons like the checkmark in codeblocks)
what should be considered "too large" though
because it does work for 25mb files and probably much larger, it just takes a bit to fetch it
oh
why send as img xd
because im too lazy to copy the text and to quote, screenshot is much faster
xd
50kb is a size i'd actually like to copy
but that probablty would be the best, simplest solution
i dont think copying over 50kb is even useful as like
why do you even want that in your clipboard
maybe i'll make a pr for a version that does this instead of fetching it, and then i'll also make a userplugin called like CopyFileContentsEnhanced
uh...
from what i read 4mb is the maximum size for the windows clipboard anyway
or a settings
oh
fr?
gg
I think that's just the clipboard historyu
because 10mb and 25mb still copied but just didn't show in clipboard history
i just dont get why youd want so much text inside your clipboard
like
even if its an entire 2k line file
fr
just download it
alright!
So how can I add autofill options to comands with CommandAPI
Like the members but custom
is it possible to tell if a module has been patched just from the module ID
yes but why
wreq.m[id].$$vencordOriginal
dev companion related things, thanks
i may be stupid, but this doesnt seem to be working
Object.keys(wreq.m)
check if it has 768419
if so try without the $$vencordoriginal
thats a list of all modules, not just those patched
no
not possible
I wouldn't try to help if you have no clue what you're talking about
o sorry
mb
it's .original
thanks
wait, so do only patched modules have this?
oh
actually yes but on unpatched modules it'll be the same function
wreq.m[id].original === wreq.m[id]
doesnt seem to
wreq.m[id] gives vencord wrapper
it needs to be able to run waitFors
and other stuff
no current way to see if a module is patched I think
yeah true
??
If thats even possible
you can use options
if you mean dynamically generate you can't
vencord command api doesn't implement that
Ah alright, thought so from what I saw looking at the code for it
Dynamic is what I meant
if you just need a user option then use the user type
Nah not for users, custom
True, thanks
okay well I did this
1st is non patched, non required
2nd is non patched, required
3rd is patched, required
4th would be patched, required and would work regardless too
and $$vencordPatchedSource is a string containing the patched src
is the the patched src the patched module?
😍
which means you can do diffs
but even then bad news cuz this is in my branch that changes lots of stuff
huge for my side project that one person will use(me)
do you mean ur Companion changes
u should pr them
draft rn
yea
oh I should make it dev only
maybe only enable when the dev companion plugin is on
i dont see a use other than that
nah IS_DEV is fine
hello
i needa ask something
i was going through an unofficial vencord plugin guide after going through the official one
when it showed this
find: ".EMOJI_POPOUT_STANDARD_EMOJI_DESCRIPTION",
now my problem here isnt that i dont understand what it does
its that
how do you know what EMOJI_POPOUT_STANDARD_EMOJI_DESCRIPTION
like its self explanatory but where do you get this name from? and dont know if its gonna be named something else yk
it might be a dumb question but i genuninely dont know where the person got it from

