#🧩-plugin-development
1 messages · Page 79 of 1
i must not be doing something right none of my regex is working its just prompting an error when im logging it
also can I see your patch?
patches: [
{
find: "DefaultCustomizationSections",
replacement: {
match: /(\s*return\s*\(0,\s*i\.jsxs\)\("div",\s*\{)/,
replace: `const clans = er;\nconsole.log("clans:", clans);$1`
}
},
]
should print out table when you open up the profile section
what's that table?
clan tags or servers?
because you should be able to get them both either by the GuildStore or UserStore
well it's clan tags, but it provides the servers that have it enabled from this section
im wanting to grab all of the current ones i have
probably from guildstore yeah if i check guild permissions maybe im not sure if that's accessible
cause server-tags are relatively new
I am pretty sure you don't need any perms to get clan tags from servers
assuming you are in those servers
i'm in those servers yeah im just wanting to grab that table so i can get all the ids, of the ones im currently in
rather than manually inserting each one of them into a table
@normal wagon wait are you animating your clan tags...
uh yeah
I can't help than you are abusing discord api
alright
alright
Just as general patching advice, you don't need all those \s*s, there's (generally) no unnecessary whitespace in the minified code
What is responsible for creating the plugin settings?
look at existing plugins
ohh now I see
what part of discord handles clearing the chatbar after you've sent a message
or more specifically, i want to set a breakpoint in a way where it pauses when the chatbar is cleared and (more importantly) tells me what cleared it
Is it possible to add in the plugin settings "Color Picker"
But do you perhaps know how to make a label?
Tooltip component
thanks
Is there perhaps a tooltip somewhere that uses discord?
What does that sentence mean
the tooltip component is used 113 times in vencord, i'm sure you could find a place where it's used
i have an idea for a plugin, but i don't really know where to start
basically i want discord not to change what URL it display because when you have an URL with http basic auth, it doesn't show the username and password
ex : https://username:password@julienraptor01.ddns.net/folder/derailious.png
raw: https://username:password@julienraptor01.ddns.net/folder/derailious.png
also discord seems to not embed pictures if i have basic auth even if i have the stuff in the URL
(but if i allow the Discord UA to bypass it, i can clearly see it embed, so it's not a problem with file format or anything, it's just discord doesn't handle basic auth)
but it's not really smth i wanna fix since it woud mean the client fetch stuff directly instead of having discord's CDN inbetween
https://julienraptor01.ddns.net/folder/derailious.png
i doubt this is possible because embeds are fetched from the discord servers and not the client
we cannot modify their servers
and if you fetch embed information yourself that would lead to ip leak i guess
yeah that's why i don't wanna fix it
but what i want to fix is the client lying to the user by not showing that the URL has auth info in it
you will have to find where in the code it gets stripped off
cause the info is clearly there and if you click on the link, it's used
but i searched for what's used to render it, but i can't find it
i'm not that great at using react devtools
skyblock jumpscare
not sure how CSP plays into this, but while this is possible, you would have to leak your IP (assuming CSP isn't an issue)
random file that was on my VPS
would you tho ?
my goal is not to add an embed
just have discord display the URL correctly
like not strip the username:password@ part
would i what?
csp? whats that? i only fetch by making the user install a program that fetches everything and sends it to the website frontend locally :^)
oh, that should be easy
would you have to leak the IP
i thought you wanted it to embed
yeah no
just having it display is easy
that's smth discord should fix, not me
umm that joke makes no sense with csp, surely you mean cors 
they are basically the same thing anyway smh
making the URL display correctly should be doable client side, but i'm bad at react
no 😭
i wouldn't call it an issue
good enough at CSS, but it doesn't really help
sending the username / pw to the media proxy would be incorrect
🤓 no i dont mean cors the program sends it to the website frontend by base64 encoded string, uncompressed
i mean if i explicitly put auth into the stuff, it's because i want discord to use it, otherwise i'd simply tell people to use them and not put them into the URL
if you're just changing how the URL text displays on the client that is 100% possible
if you want to change how the it interacts with the media proxy, that's a whole other can of worms
ig i could do smth bad being putting them in arg and then internally resolving them, but it start becoming annoying
if discord could just follow stuff it would be nice
like i wanted to add oembed support to my stuff
so i read the spec
i can use link headers
so i try to do that
it works on embed testing website
i try on discord own embed tester
it's broken
why ? because discord only half follow the spec 🤦♂️
1st one is an issue vencord + a userplugin can solve without security concern
2nd is smth i'll maybe deal with at some later point by using edge case specially for discord
not sure at all but insert text method in src/utils/discord.tsx does it like that, so perhaps clearing the text could be done similarly
discord.tsx: Lines 106-111
export function insertTextIntoChatInputBox(text: string) {
ComponentDispatch.dispatchToLastSubscribed("INSERT_TEXT", {
rawText: text,
plainText: text
});
}
like maybe CLEAR_TEXT instead of INSERT_TEXT or something
afaik it's a event handler
exactly that lol
and no args
:^)
i’ve got a crazy plugin idea - enabling/disabling plugins with a slash command 
/vencord-disable petpet
how to put my plugin on #1256395889354997771 ?
I don't see it : |
gang how do i add a little divider for the copy and open link thing
What would the point be?
There's a menu item group component
i'm sort of stuck in a bit of a ditch rn, and i'm trying to make my first plugin, but no matter what i do or try it just won't appear in the plugins list
i've followed the instructions on the dev website about how to create your plugin. i have vencord companion and hte necessary extensions installed on vsc, and i'm using a dev build and everything... but it just won't show up in my plugins
You have it in vencord/src/userplugins/yourplugin/index.ts or index.tsx ?
yup, i have it under that path in a index.ts file
yeah, i run "pnpm build" and "pnpm inject", however now when i tried it again i got an error in vsc
'Find bad: Error: No Discord Clients Connected!'
i didn't get that before though, so i'm just going to try and restart discord rq
apparently something had happened with my discord (or something along those lines), and now it shows up in the plugin list
ty so much for the help :)
Question? Before I was using the DOM so it got rejected so how can I get the name of the command currently typed in the message?
is there any update on editlocaluser
(not to bitch, looking for something to contribute)
does the react components editor not work on the discord invite (/invite/vencord) page?
it should, try closing and re-opening
is there an easy way to get the server id given a channel id
(that isn't my very janky way of parsing document.body.innerHTML for a css background image)
ChannelStore.getChannel("1015074670963335219").guild_id
is there a way to do this that avoids using the butotn as a wrapper
i probably spent an hour doing random stuff in the console that lead absolutely nowhere
I'd use React dev tools to find the onclick of the settings button and invoke it directly instead
Same, except I'd grep the code instead of react tools
Although I wouldn't be surprised if there's a flux event or something to do it tbh
i made a breakpoint for click event and followed that but it just lead to random obfuscated code
Most recent pin in this channel is about using react dev tools if that's any help
Yes, all of discord is random obfuscated code
ykim
Found it
FluxDispatcher.dispatch({ type: "USER_SETTINGS_MODAL_OPEN", section: "My Account", subsection: null });
FluxDispatcher.dispatch({ type: "LAYER_PUSH", component: "USER_SETTINGS" });```
First one loads it, second one opens it
oh fire
You can also search for code that dispatches these events, you might find wrapper apis
damn did i get lost or something the stuff i was looking at had completely different props
you were probably looking at component code
I think this is the same settings module
yeah tahts what i was looking at
i was trying to figure out how to get to it
like call it
i blame javascript its obviously not my fault /j
That's what I found first but I don't think there's a reference to the class available so you have to create a new instance of it which felt wrong
AccountPanelServerProfile patches a ref into it so I assume there's no way to get it without a patch
whoa not a cow spotted
no that's my alt
when he gives me his account
sorry he already gave it to me
better luck next time
If your on web, you can get it directly from the url. Or just turn develper mode on and right click a server icon or the little menu and click copy server id
minified not obfuscated :^)
I mean, it's still kinda obfuscated as a side effect
Which is to say, what exactly does it mean?
means you made modifications in the main directory outside of user plugins folder
you just have to revert those changes
but they don’t help with dev build here sorry
besides writing a custom plugin, I haven't modeled anything
just do git pull in command prompt in directory and it’ll list things you’ve modified
and undo those changes
packages/package.json would be path just undo any changes and you should be able to update
is there a way to detect whether the client was force closed or restarted?
I fixed it, the question is whether you betterfolder works?
now I can't build the plugin
import { ChannelStore } from "discord-types/stores";
...
const server_id = new ChannelStore().getChannel(channel_id).getGuildId();
I tried removing and reinstalling node_modules, but it doesn't help
don't import from discord-types
it's just for types
you can't import anything from there
where do I import from then
vencord
.getChannel() is returning undefined
because you don't have access to that channel....
it's this channel though?
I'm trying to run something on the accept invite (/invite/vencord) page
how does ViewRaw get the message data it displays? The code seems to just spawn it out of nowhere in renderMessagePopoverButton.
ok I see it gets it from MessagePopoverAPI now but where does that get it cause it's giving wrong info 🤔
hey everyone, currently writing a client mod that will allow users to pipe an HLS stream into a channel as a go live, and I am trying to decode some of discord's streaming internals so I can bypass patching media picker the way vesktop does it.
to get started, I need to see some of discord's internals (obfuscated is fine; i have experience reading it), is there any tooling that allows me to download all of discord's webpack modules recursively, or do I just need to do it manually/make my own tool?
I have a plugin for it in my repo
Dunno if it still works, but it did a few months ago
Isn't streaming done via a native module?
to get a stream from the OS, i would assume so. i'm more just interested in what happens between the backend and the stream though
that is definitely done in javascript because that same functionality is in the web app
difference is it uses the web api for getting a media stream rather than x11/win32, etc.
Or wasm, wouldn't surprise me
I'll try it out
probably a stupid question but how would i check whether another plugin is enabled
Vencord.Plugins.isPluginEnabled("PluginName")
ok you know what
instead of asking for reviews in my plugin
i'll ask for feedback here first
so
there's this function
that builds the right click menu
and getting the stickers info with the right click menu works differently than through chat
index.tsx: Line 45
function buildMenuItem(Sticker, fetchData: () => Promisable<Omit<Sticker, "t">>) {
i have to make 2 separate functions because of one variable
which i know there's an easier way of going about but i couldn't get it to work
index.tsx: Line 57
const url = getUrl(data[0]);
index.tsx: Line 70
const url = getUrl(data[0]);
It worked. I found the frontend part of the streaming code
index.tsx: Line 102
const url = getUrl(data);
there
the difference is the data and data[0]
i have to build 2 different menus that do the same thing becuase of this, is there a way to simplify it?
put the [0] here also i dont understand why do you this function instead of passing just the sticker id
it passes the stickerItems (variables) to the menu item
oh you copied the emote cloner implementation, but i dont think you need to do all that
yeah 😭
just pass the sticker id and use the sticker store to get it
i tried doing it manually but nothing i did would make it appear
hmm
i could
how would i add text into this bar here?
Like the preview text or actual text
preview text i think
for example i want to add hello into the chat-bar
to show it as a preview
I should have phrased myself better.
Do you want to change the message plugin development thing or do you want to simulate typing from the user?
simulate typing pretty sure
i’m just wanting to put text within that box not alter plugin development text or alter pre existing text
and i’m not wanting to change text as it’s being sent
check out src/utils/discord.tsx:106
and do you know any way of grabbing the current content within that box
DraftStore
is there any way for vencord plugins to make calls to windows api like SetDisplayAffinity?
You can run node and electron code in a native.ts file.
any way to make TextInput allow newlines? or any other way to input text with newlines?
TextArea
thanks for the help. I have a prototype working and interestingly enough setcontentprotection makes the discord window completely transparant to screen capping. I originally used SetWindowDisplayAffinity which made it just black screen.
tbh i have very little experience with the windows api
i think the most i've done is fail to make a filesystem watcher
It seemed like a pain in the ass to go with SetWindowDisplayAffinity so i just used setcontentprotection and said fuck it
hey they cant see my discord. it works as expected
is it possible to get the channel.id of the message youre about to send?
SelectedChannelStore.getChannelId() is the channel currently open, probably easiest
If you're using the pre-send listener the channel should be on the message object I think
yea the problem is that its not in message object
ill try this in a while
its the first argument to the listener
oh fr?
Yeah I was just gonna say lol
any idea why disable doesnt actually disable the protection but enable does enable it?
import { BrowserWindow } from "electron";
function getWindow(): BrowserWindow | null {
const windows = BrowserWindow.getAllWindows();
return windows.length > 0 ? windows[0] : null;
}
export function enable() {
const win = getWindow();
if (win) {
win.setContentProtection(true);
}
}
export function disable() {
const win = getWindow();
if (win) {
win.setContentProtection(false);
}
}
electron question
what are you trying to do
im trying to hide vencord from screen capturing
setContentProtection is electrons way of doing basic drm protection
ok so after alot of checking and thinking vencord was just buggy as fuck. I figured out a discord fun fact, discord can have more than 1 window in alot of cases, and they're invisible as well. Now aint that fun.
Title: Discord Popout
URL: https://discord.com/popout
Visible: false
Focused: false
Bounds: {"x":0,"y":0,"width":1280,"height":720}
you can query all windows with electron apis
there are also events for window created
I think
you should be able to use that to detect new videos and set it for those too
but vencord doesn't patch popouts
you will merge the pr that adds that functionality....,,.,
Or since I don't think it's possible to have multiple discord windows in a way that they're functional and I don't know ts for shit. I could just check for the title ending in Discord and go with that one.
im tryna change the colour of message authors to discord's new gradient role colors. anyone got any clue?
im tryna do it on a normal server, not a guild (with tags)
is a plugin that hooks the spotify rich presense for use with last.fm possible? i like the spotify rich presense progress bar and stuff
havent looked into it at all so i dont know anything about it aside from it uses spotify websocket and the progress bar is "estimated" based on play and pause actions
you don't need to hook into anything, you can just set the timestamps and discord should show a progressbar
but there is no way of knowing the current time in your track via lastfm
oh i thought that was a spotify rich presense specific feature, interesting
yeah i guess timestamps with lastfm can be an issue though
thank you
it used to be but afaik they fixed it a while ago
ah
seems like lastfm api can return the track length so i guess i can try and make it keep estimating the playback but with the length added
this is really inconsistent and will go to shit the second you start seeking / pausing
you'd be better off making a proper activity for whatever player you're using
oh ur right
hmm
unfortunately i am using the stock music app on an iphone 6s for its headphone jack
so i'd have to write a jailbreak tweak or something
discord already shows a duration, that's why we haven't bothered adding anything else
accurate enough
i know i just kinda wanted the progress bar but yeah ur right it wouldnt be accurate
i guess thats whats good about the real spotify integration lmfao
now im tempted to make a jailbreak tweak for it just for the hell of it
sounds fun
Does anyone know a reliable way to get channel names and guild/server names?
- findByPropsLazy("getGuilds") doesn't return names
- findByPropsLazy("getChannel") doesn't work at all it seems
- MessageStore.MESSAGE_CREATE.message doesn't have any info other than the IDs
-# Also how do you get guild/server id from a channel id (or just how do you get the guild id from a message that the client (yourself) sends. it's almost always not there in MessageStore.MESSAGE_CREATE.message.guild_id)
ChannelStore, GuildStore, SelectedGuildStore
in your plugin code you import the stores from common
just type ChannelStore and let autoimport do its shit
(import from @webpack/common)
(you use findStoreLazy or whatever its called if its not in common)
Thank you so much for the code
btw whats the autocomplete package called? I never could find it
are you not on vscode
i am and i have the plugin i thought but i dont have autocomplete, just "Test Find" above certain things
hmmm, i got GuildStore to work but
(() => { const ChannelStore = Vencord.Webpack.findStoreLazy("ChannelStore"); console.log(ChannelStore.getChannel(1032770730703716362)); })();
is undefined (it's this channel's id)
It might not be the issue here but you should use string ids rather than numbers
Import channelstore from @webpack/common
It is the issue
ids are strings
oh ty but it's still coming up undefined and saying it cant read it
btw how'd you get it to work in console with just "findStore("ChannelStore").getChannel("1032770730703716362")"
You need the consoleshortcuts plugin
Its probably coming up as undefined because the client doesn’t fetch channel information and stores it in the store until it’s needed, so if you haven’t opened the server/channel it might not be in channelstore
oh ty so much
oh is there no way to get all channels info like GuildStore.getGuilds?
jk i think i can just grab them all manually. ty again very much for the help
nah
which is the correct companion? the second one seems to be it but it links to the first
first is the og, second is sadan fork
ah ty, i can only get autocomplete working with the second
sadans fork is generally better in my opinion 
You need his version of the plugin as well
how do you like listen for incoming messages lol the closest thing i found were flux events but im legit lost on how to use that
MESSAGE_CREATE event
ye figured that out but im kinda stupid and i have no idea what to do further and i cant seem to find any plugin that takes use of that so i can look at it
💔
have u tried searching MESSAGE_CREATE in the code?
there are multiple plugins using that event
oh right i can just search i was just thinking of a plugin that could possibly use that and didnt come up with any 😭 anyway thanks
You need to be using my user plugin version of the companion for it to work.
I should add something to make it prompt you to do that soon.
When else would it be triggered, if not when a message is created
use react devtools to see where they are added. then get to the function and patch that with ur own button
Why does MESSAGE_CREATE not trigger on all messages, and seem to favor certain ones when they all have the same level of activity
this makes no sense
it triggers on all messages
but after a certain size, you won't get events from servers unless you're subscribed to them (by opening a channel there for example)
so you won't get events for big servers you never opened
so if i open every channel on a server when i first join, i should be able to receive all messages at all time from there after?
wdym after a certian size
it's per session.
you need to open the channel in the same session
you can also subscribe to channels with code
like each time i open my client? or each login?
ooo how do you do that
for example, how would i subscribe to a channel that i have the id for?
if statement in your function
like filtering out ones? im trying to capture more
i cant read, but yeah open a channel to send a gateway event
turn on gateway logging and see what happens when you open a channel
You receive message events for all channels in the same guild, so you just need to subscribe to that guild
import { findStoreLazy } from "@webpack";
import { ChannelStore } from "@webpack/common";
const GatewayConnectionStore = findStoreLazy("GatewayConnectionStore");
const subscribeToChannel = (channelId) => {
const channel = ChannelStore.getChannel(channelId);
if (channel)
GatewayConnectionStore.getSocket().updateGuildSubscriptions({
[channel.getGuildId()]: { typing: true },
});
};
thank you so much for this. i literally made a function to click on every text channel one by one with hopes that was what that meant
does something like GatewayConnectionStore.getSocket().updatePresenceSubscriptions exist?
I'm trying to detect when a file is dragged and dropped into discord. I've tried adding event listeners for dragenter, drop, etc. and simply logging these events to the console to no avail. I've also tried using MutationObservers to detect changes Discord makes itself when this is happening and still nothing, including using an example where a user did the same thing in #📜-js-snippets, has anyone encountered this and/or has advice?
I'm not sure, but you can experiment with it in the devtools console by running Vencord.Webpack.findStore("GatewayConnectionStore").getSocket()
updateGuildSubscriptions also takes other parameters, idk which ones are for presences specifically
{
"100000000000000000": { // guild
"typing": true, // typing and messages
"threads": true, // thread events? like creating/deleting ig
"activities": true, // app activities maybe?
"members": ["111111111111111111", "222222222222222222", "333333333333333333"], // specific member profiles
"member_updates": true, // no idea
"channels": { // member list updates
"101010101010101010": [
[0, 99], [100, 199], [200, 299]
], // allows multiple ranges, representing visible sections of the member list
"202020202020202020": [[0, 300]] // up to 301 members per visible section
},
"thread_member_lists": ["444444444444444444"] // member list updates, but inside threads
}
// ... other guilds u want to subscribe to
}
However keep in mind that overriding specific properties like channels could break internal state. It's fine to set boolean properties to true, since you only get extra events, but you can accidentally break the member list by overriding the channels/thread_member_lists property. Also don't go over the member range limit (301) - it could disconnect you from the gateway.
There is a class that keeps track of existing channel subscriptions, which is used by the GuildSubscriptionsStore. This store only listens for events and you can't modify it, so you would have to patch the code to get the class instance
this is where the subscription manager instance is created, with a callback that dispatches the GUILD_SUBSCRIPTIONS_FLUSH event with the internal subscription state. You could also dispatch this event manually or intercept it, but idk if this is even needed
why do u even need to sub to all guilds
are u making a nitrosniper or smth 
there's a good reason this subscription stuff exists, performance will suffer
actually is there even a rate limit to the gw?
I feel like it would just break past a certain point
idk what dogwalker is cooking, could be a XY problem
anyone know how to handle drag and drops?
I think discord is blocking it somehow
ok figured it out. seems the listener was being added at the wrong time and I needed to do (event) => { event.preventDefault(); event.stopPropagation();... when adding it
thank you for the help, it was exactly what i needed to know
You do know how code works, right?
i dont think i know what you mean by the search function is made of code
When you click the search button, code is executed
That code finds the oldest messages
Thus, there does exist code that finds the oldest messages, which you can find and steal for your own purposes
and how do people usually find code
Devtools
how do i use devtools? i tried asking chatgpt for help but it told me nonsense
i have the devcompanion already installed
v- prog
aaanyway you should learn the basics of web dev, how to use devtools, how to search for documentation/instructions without AI, then you should be ready
help @hoary pilot how do I put a message in the text log
is there a way to see discords source in vs code?
Maybe if you get hired
They're not gonna let anyone see the source code without that
The compiled code is a different matter
how do you create patches then
i mean the source that the patcher also uses
is it this
you can use sadans vencord companion fork
thx
You can also check out Vencord/.vscode/launch.json for instructions on how to connect the debugger to vscode
neat
uhh where does this error happen
anythink here except Diff Module (that just says Patch OK!)
You need sadan's userplugin version of devcompanion along with it
That is code, but it is not source
any way i can fix that
?
You need sadan's userplugin version of devcompanion along with it
oh is it a diff one
then the shipped one
Yeah, it handles the extract and diff commands
ok thx
do you know how i can see a specific file
webpack file
There's a command to extract by module ID but I don't know what it is, there's probably a help readme on the extension or plugin
I haven't used it myself
how would i find where messages are created if i found the message component
what are you trying to do
modify the time on messages
to include seconds
then patch the timestamp inside the message component, you do not need to know where messages are created for that
wdym im trying to do that for new messages
have you used react before?
kinda
familiarize yourself with react, everything is a component, edit the component and every use of the component changes
?remind 9pm add warnings/info to dev companionn fork for new users (i never thought people would actually use it
)
Alright @hushed loom, in 2 hours, 31 minutes and 17 seconds: add warnings/info to dev companionn fork for new users (i never thought people would actually use it
)
extract in the command palette
you can also extract with search
the live regex replacing is honestly really useful when writing more advanced matches
yeah, i need to fix like 1000 bugs with it and somehow improve the logic for following patches
yop but when it works 😻
yeah
I also need a fault tolerant formatter
@fallen sandal out of curiosity, have you ever gotten this error?
https://github.com/sadan4/VencordCompanion/blob/main/src/modules/PatchHelper.ts#L136
PatchHelper.ts: Line 136
const message = `Lost patch with\nfind: ${this.lastPatch.find}\nnum replacements: ${this.lastPatch.replacement.length}\nindex: ${this.lastPatch.origIndex}`;
not that I remember
@hushed loom, <t:1747434523:R>: add warnings/info to dev companionn fork for new users (i never thought people would actually use it
)
@hushed loom, <t:1747443698:R>: add warnings/info to dev companionn fork for new users (i never thought people would actually use it
)
guhhh too busy fixing bug in MIEnginne
saladeath
Does anyone know why opening the profile popout doesn't work when clicking the pfp on whoReacted anymore?
@hushed loom, <t:1747451070:R>: add warnings/info to dev companionn fork for new users (i never thought people would actually use it
)
just merge it into the main repo smh
Does FindByProps have autocompletion?
index.tsx: Lines 96-98
function handleClickAvatar(event: React.UIEvent<HTMLElement, Event>) {
event.stopPropagation();
}
heya is there a new replacement for ButtonLooks from @webpack/common?
?
that stops the click from making you react
i thought that it may prevent the click for the other component as well
but apparently its another issue
please ignore what I said 
I think u can just directly specify the look
<Button look={Button.Looks.FILLED}>button</Button>
😭
does anyone know how to fix this: #🧊-off-topic-iceman-only message
tryna click on the channel mention via devtools but shows this in console
delete the ExtensionCache folder in ur vencord folder
and fully restart the app
Would anyone happen to know a convenient place to patch for changing what URL an image embed is actually fetched from?
i made a plugin a while back that would render SVGs by changing the source where media was rendered from
it's probably outdated, but it might help
https://github.com/Vendicated/Vencord/compare/main...sadan4:Vencord:feat/renderMedia
Oooooo thank you so much! I knew should have asked here before staring at minified js for 6 hours.
its very outdated, so dont be shocked when nothing finds/matches anymore
Mmmmm the groupableVisualMediaItems stuff seems to still exist for attachments, but embeds from a URL aren't handled that way.
im reworking on some of my old projects and im treying to fix sound board logger and i wanted to know if there is a new way to do this cus it dosent work anymore (been a few good months since it "kinda" worked)
let getAmplitudinalSoundboardVolume: () => number = () => 100;
try {
getAmplitudinalSoundboardVolume = findByProps("getAmplitudinalSoundboardVolume")?.getAmplitudinalSoundboardVolume ?? (() => 100);
} catch { }
export const getSoundboardVolume = (): number => {
try {
return amplitudeToPerceptual(getAmplitudinalSoundboardVolume());
} catch {
return 100;
}
};
findByCode the new method
i havent done this shit in over half a year 😭
at least i fixed and finished my KeywordHighligher pr
now just wait for review

take a look here
it has amplitudeToPerceptual
but you need to figure getAmplitudinalSoundboardVolume
I never realized those were tongs in sadans pfp until now

it's avatar decoration's fault!
Hello, I found a way to automate pressing the jump button, but when I try to automate typing in the search bar and pressing Enter by simulating paste and key events, it leaves invisible “ghost” text in the input that doesn’t clear properly. Does anyone know why this happens or what the best method is to programmatically enter text and submit the search so it fully registers and clears?
you shouldn't do that
what should i do?
is there an easier way to jump the client back to a message in a channel if you have a message id?
Check MessageActions.jumpToMessage
Faking dom interaction is a bad idea, better to just do what said interaction would do directly
oh, how do i load it? getByProps? and whats the properties?
It's exported in webpack commons
let {channelId: t, messageId: n, flash: r=!1, offset: i, context: a, extraProperties: o=null, isPreload: s, returnMessageId: l, skipLocalFetch: c, jumpType: u} = e; for props
instead of faking click events, use react devtools to inspect the buttons and see what their handlers do
when creating forks of plugins under GPL-v3.0, what is required to keep in compliance with the license? is changing the date in the comment at the top allowed? manifest information?
just add a new line with a new date in the header
or leave the header alone idk don't really need to touch it
trying to get the TextArea to show the markdown's but some of them dont seem to work, i cant figure out why. these are the only ones i was able to get working
bold works but italic doesnt?? weird
I don't know if it's the issue for the italic but your codeblock needs the markdown class added to it to fix that copy button being in the wrong place
Sorry no actually it's the parent of it needs the markup class
return (
<ScrollerAuto className={cl("rendered-note-area", MarkupClasses?.markup)}>
{noteTags.length > 0 && (
<div className={cl("tags-view-area")}>
{noteTags.map(tag => <TagComponent key={tag} tag={tag} readOnly className={cl("view-mode-tag")} />)}
</div>
)}
{parsedTextContent || (noteTags.length > 0 ? null : <div className={cl("empty-text-placeholder")}>No text content.</div>)}
</ScrollerAuto>
);
it has markup actually already
i tried with markdown class as well, nothing changed
It's definitely what places the button in the right place
Maybe the codeActions one is missing?
Wouldn't really make sense but I don't know why else it wouldn't be applying
after making some changes on parser, i have managed to get the rest of the markdowns recognized, but they dont get the style down lol and the codeblock copy button is still on the wrong spot 

markup and markdown aren't in the same module
ooh i need to have separate findbyprops consts for them?
ok ok I'll try that
Yeah, it's an and filter
There's two markdown classes as well so you'll need to narrow that one down a bit more

adding the 2nd markdown fixed it
thank u 
np
non-preview spotify embeds are much less deafening
what do you need the authentication for?
full length previews
i think it's just the music you listen to that's deafening
True but Spotify previews are much louder than the full song player
vp FixSpo
Fixes spotify embeds being incredibly loud by letting you customise the volume
Vee
desktop only
I like the loudness 
Tbh the only reason I made this is because every now and then a friend will be like "3:10 is sick" and it's a spotify link that I don't wanna open to play the whole thing
video starts quiet but slider go up = loud so fair warning
FixSpotifyEmbeds doesn't work on the full version since it uses web audio api or something
vp whoswatching
Couldn't find a plugin with that name, and there are no plugins with similar names.
@cosmic wigeon what's the name of the plugin?
is it a built in one?
I thought it was but maybe it's a userplugin
I create it myself
it was an embedded plug-in
I have no such knowledge
but now no one sees it that way
It’s broken needs updated, but it’s there and it’s a very easy fix to update it
that's exactly what I don't want it to look like that's why I made an svg but without the mechanism as I said and I don't know what to do next xd
Thats can still be used as a base
Just adapt from there
that is, use I have whoswatching?
just try it and see lol
hi, does load_messages_success fire when you use the search history?
i only ask because i thought it was before, but discord may have updated
stop validating sadans schizo convos
he is insane and talks to himself
@hushed loom get back on your meds
insane
wdym try and see, i tried before they said that and after. so you dont know either is what you're saying? lmao
you must be a pretty bad dev support
to say something like that after no reading that i have
lmao
so how do you see other than subscribing to the flux event?
is there something missing
or do you just troll people lmao
"try it and see" is the only correct answer to your question
you can get help but no one is gonna do your own work for you. anyone wanting to help would have to waste their time trying it themselves when you could just try it yourself instead
if you want help, ask a better question with the relevant details and try being less of a prick
you know the event name you have in mind so just subscribe to it and see if it fires
i did try load_message_success and search_message_success
how do i "try them"
other than by trying them first
and asking for help second
what happened when you tried them?
not the same thing as last week where all the searched messages started coming in as load_message_success
nothing happened
did you try it?
How do I fetch messages from a channel
Check MessageLinkEmbed
@dull magnet can I port a powercord plugin into vencord?
https://github.com/quincynyan/UnicodeFractions
Last commit was 3 years ago so I don't know how things have changed meanwhile. I'm hoping most mechanisms used in that is still the same?
you can port it but it won't be accepted into the main repo :P
integrating that into discord is not very useful
just install an OS wide tool to do it
https://en.wikipedia.org/wiki/Compose_key
https://github.com/samhocevar/wincompose (it's inbuilt on most Linux DEs)
A compose key (sometimes called multi key) is a key on a computer keyboard that indicates that the following (usually 2 or more) keystrokes trigger the insertion of an alternate character, typically a precomposed character or a symbol.
For instance, typing Compose followed by ~ and then n will insert ñ.
Compose keys are most popular on Linux an...
Compose + 1 + 2 = ½
½ ¹²³/₁₂₃
This PowerToys tool is useful for that kind of thing too https://learn.microsoft.com/en-us/windows/powertoys/quick-accent
Called quick accent but contains a lot of unicode chars not on physical keyboards
I don't like how that gets activated with space or arrow keys
I use a third party plugin in power toys run
one of the "official" third party plugins that's linked to in the power toys repo thirdPartyRunPlugins.md
Does implicitrelationships break pending friends tab for anyone else?
how does one change channels without dom interaction? i tried dispatching CHANNEL_SELECT but it doesnt update the ui with it
ChannelRouter or NavigationRouter
Anyone know why my React Devtools isn't showing? There's no error in console regarding it
It's definetly enabled in Settings.
I've tried deleting ExtensionCache, turning it off, reloading then turning it back on and reloading
It appeared once and then disappeared again after I reloaded
Nevermind, I found how to fix it but I'm not sure why I have to do this
I have to click Ctrl + R and it shows after
Is there perhaps a non-official plugin that allows you to pin the dm to the very top?
there's an official plugin that does that
vp pindms
Allows you to pin private channels to the top of your DM list. To pin/unpin or re-order pins, right click DMs
Vee, Syncxv
@civic elk compltely random but is it aight if i use the menuitem logic from your PR for sticker links
(its very clean compared to my iteration 😭 )
2027 it will be merged🙏 🙏 🙏
🙏
oh btw do u wanna be added in the devs for the plugin
sure it's not necessary but would be cool
Heya, is there a guide of some sort about how to start developing a plugin? (How is one structured, how to compile vencord so I can test my own, that sort of stuff)
I've been looking around the pinned messages and the github readmes and stuff but I couldn't find one
real
hmmmm
if i were to implo imply you did it
OMG my fucking computer has been freezing for no reasson lately

anyways
if i were to implement it the way you did it it would basically become the PR you made word for word 😭
i just wish there was a simpler way to where i wont need 2 different menu creations
function buildMenuItem(Sticker, fetchData: () => Promisable<Omit<Sticker, "t">>) {
return (
<>
<Menu.MenuSeparator></Menu.MenuSeparator>
<Menu.MenuItem
id="copystickerurl"
key="copystickerurl"
label={"Copy URL"}
action={async () => {
const res = await fetchData();
const data = { t: Sticker, ...res } as Sticker;
const url = getUrl(data[0]);
copyWithToast(url, "Link copied!");
}
}
/>
<Menu.MenuItem
id="openstickerlink"
key="openstickerlink"
label={"Open URL"}
action={async () => {
const res = await fetchData();
const data = { t: Sticker, ...res } as Sticker;
const url = getUrl(data[0]);
VencordNative.native.openExternal(url);
}
}
/>
</>
);
}
function buildMenuExpression(Sticker, fetchData: () => Promisable<Omit<Sticker, "t">>) {
return (
<>
<Menu.MenuSeparator></Menu.MenuSeparator>
<Menu.MenuItem
id="copystickerurl"
key="copystickerurl"
label={"Copy URL"}
action={async () => {
const res = await fetchData();
const data = { t: Sticker, ...res } as Sticker;
const url = getUrl(data);
copyWithToast(url, "Link copied!");
}
}
/>
<Menu.MenuItem
id="openstickerlink"
key="openstickerlink"
label={"Open URL"}
action={async () => {
const res = await fetchData();
const data = { t: Sticker, ...res } as Sticker;
const url = getUrl(data);
VencordNative.native.openExternal(url);
}
}
/>
</>
);
}
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {
const { favoriteableId, favoriteableType } = props ?? {};
if (!favoriteableId) return;
const menuItem = (() => {
const sticker = props.message.stickerItems.find(s => s.id === favoriteableId);
if (sticker?.format_type === 3) return;
switch (favoriteableType) {
case "sticker":
return buildMenuItem("Sticker", () => props.message.stickerItems);
}
})();
if (menuItem)
findGroupChildrenByChildId("devmode-copy-id", children, true)?.push(menuItem);
};
const expressionPickerPatch: NavContextMenuPatchCallback = (children, props: { target: HTMLElement; }) => {
const { id } = props?.target?.dataset ?? {};
if (!id) return;
if (!props.target.className?.includes("lottieCanvas")) {
const stickerCache = StickersStore.getStickerById(id);
if (stickerCache) {
children.push(buildMenuExpression("Sticker", () => stickerCache));
}
}
};
whoa this is a miracle. it's not overheating anymore
it used to constantly be like 98-100
probably because it's still early summer right now
yoooo u got good temps
why do you need 2 they look the same
im on my phone
const url = getUrl(data[0]);
and
const url = getUrl(data);
its one small differencce but wityhout it it changes everythin
Just check if data is an array and assign data or data[0] to a variable based on that
yeah and you do not need to be doing all
check my pr it does this with one function and no spreads
it could even be simplified more since there is no need to fetch it or need to do that switch case
How can I get useful intellisense for modules?
any intellisense you might get on any discord module needs to be manually typed
for UserStore you should be importing it from @webpack/common, the export from there has typings
Is it possible to add a npm package to your plugin?
I suppose since it's in the electron renderer, that's a no no
You can run native code too but I don't think a pr with a new dependency would be accepted unless it's particularly necessary
I see
For running in the native process have a look at any plugin with a native.ts file to see how it works
what dependency and why
Oh I just want to add voice commands for fun
and I was thinking how it would be a bit hard to implement that in the browser
I haven't done that research yet
Seems my Classify plugin is causing bugs in certain cases, for reasons I have yet to discern. Specifically:
- TypingTweaks looks broken
- Writing a code block in chatbox makes discord set style=height:0px, apparently something about the .slateTextArea being recreated
Anyone know why this happens?
This is what it looks like with TypingTweaks
is there a way to make a select option in a plugin's settings allow you to click more than one thing
or should I just use a ton of booleans
I'm not at my PC but if I remember correctly you need to pass an array of values to the select component and maybe(?) set the many prop to true which the current setting typing doesn't allow you to do, so I'd either modify the types to allow it or use the custom component option
It's been a while so I might be slightly talking out my ass
Actually yeah custom component would be needed because you need to store an array instead of a string
and I just have to make the selections and stuff myself?
You can use the same select component that the select option type does, you'd just have to manage the state yourself
alright
i wonder
is there a plugin that could uwuify all of discord
or arbitrarily replace any text based on rules
not in messages you send
but in EVERY single text
I did that once via the i18n function, it was a mess
I think I just had it run the replace on the json with all the strings in it
is there a way to patch html (not react)
and by that I mean the html sent in the initial request
why?
see my PR
You still have the initial html page the react app mounts to
probably this? https://github.com/Vendicated/Vencord/pull/3461
Edit the Content Security Policy on load to allow vencord.dev, *.vencord.dev, and localhost (required for devCompanion) domains to load in Firefox
Make a request to https://discord.com/app and get ...
Why the hell would you edit that
probably related to the pr
I don’t think so
Must have some ulterior motives
Say I wish to find the module discord uses to receive new messages, how would I go about doing that?
I already tried doing this through the network tab of devtools, but with no luck since it's probably websocket based
Ohh i could look at the message logger source
Ah, the flux dispatcher!
yes, discord is built on the flux software architecture
everything sends an recieves events which do stuff/updates the ui
including sending and recieving messages those also go through the flux event system
Is there a way to subscribe to the settings store?
settings.store.property or settings.use(["property"]} don't seem to be reactive
I'm pretty sure settings.use should be
I can't seem to get reactivity (~or the variable at all~) to work. I'm probably missing something, since I'm not that familiar with React
notificationAttribute: {
type: OptionType.BOOLEAN,
description: "Enables attribute text (Windows only, Anniversary Update required)"
},
notificationAttributeText: {
type: OptionType.COMPONENT,
component: props => {
const { notificationAttribute } = settings.use(["notificationAttribute"]);
return (
<>
<Forms.FormText>Attribute status: {String(notificationAttribute)}</Forms.FormText>
</>
);
},
default: "{groupName}",
},
make it a string
yup, just realized that
Reactivity still seems to not be working
oh the reactivity only seems to trigger when settings are applied
Yeah the store isn't updated until you hit save
For your use case you're better off just using one custom component for both
for ContextMenuApi.openContextMenuis there a way to move the context menu more upwards from the button itself
like the entire context menu because its not positioned to my liking based off of where the button location is
nvm
magic
use devtools to get the svg source and copy paste it into your code
you can webpack find it but it's not really worth it
Is there a way to direct the client to a specific built-in page? I want to make a shortcut to getting to the quests menu. Scrolling past my 100 servers, clicking discover, then clicking quests is annoying.
IconViewer plugin in #1256395889354997771 it has all icons and u can copy the findByCode to get the react component
@left plank kys
Looks like navigating to https://discord.com/discovery/quests works. just need to figure out how to automatically induce that then
just use navigation router
I'm trying but no clue how
ok got a button added to the toolbar. rn it just opens the link in my browser lol
gotta figure out navigation router now
isn't it literally
NavigationRouter.navigateTo("/discovery/quests")
looks like transitionTo
omg it works
based
onClick={() => NavigationRouter.transitionTo("/discovery/quests")}
ye
now to find somewhere else to put the button cause toolbar is not the place for it
can we add to the title bar in plugins?
seeing as debugger button is there id assume so
oh is that a discord thing not a vencord thing
vp VencordToolbox
Adds a button next to the inbox button in the channel header that houses Vencord quick actions
V, AutumnVN
will do. thats what I did for toolbar. stole from merssage logger lol
uh
is that plugin out of date
cause it added the button to the right of the search box
not the title bar where the inbox is now
would be great if over half the components im looking at dont show a "Uncaught Error" message
what components
idk im clicking around the title bar button components and the direct messages area components
those would be the two ideal spots for a new button imo
ah I can copy how read all messages handles that spot
there's a pr to move the button up next to the inbox but I'm unsure
the titlebar kinda sucks and not every vencord user has it
Also no one really complained about the location afaik
below DM button was my first choice
don't fix what ain't broken
I was more curious if it was possible at all to add buttons to the title bar tho
yes
you can add any component anywhere in the app (except discord overlay and iframes like Spotify or YouTube embeds (you can patch the frames too but it works differently))

native.ts: Lines 17-36
frame.executeJavaScript(`
const interval = setInterval(() => {
const actions = document.querySelector("[class^='PlayerControlsShort_playerControlsWrapper__']");
if(actions) {
const addToQueueButton = document.createElement("button");
Object.assign(addToQueueButton.style, {
position: "relative",
top: "11px",
left: "0px"
});
addToQueueButton.classList.add('gIjhme');
addToQueueButton.title = "Add to queue";
addToQueueButton.addEventListener("click", () => {
window.top.postMessage("vc-spotifyaddtoqueue__" + location.href.match(/https:\\/\\/open\\.spotify.com\\/embed\\/track\\/([a-zA-Z0-9]{0,200})\\?/ )[1], "*");
});
addToQueueButton.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="32px" fill="#e3e3e3"><path d="M642.94-160q-47.94 0-81.44-33.56t-33.5-81.5q0-47.94 32.67-81.44Q593.33-390 640-390q15.97 0 30.48 3Q685-384 698-377v-343h182v71H758v375q0 47.5-33.56 80.75T642.94-160ZM120-320v-60h306v60H120Zm0-170v-60h473v60H120Zm0-170v-60h473v60H120Z"/></svg>';
actions.insertBefore(addToQueueButton, actions.firstChild);
clearInterval(interval);
}
}, 100);
why did u write it as a string instead of separate js file 😭
idk lazy
you know of any plugins other than read all that append to the server list
can you even import js as text with EsBuild
id like to append a full sized button, not one the size of the read all button
i used to have userplugininstaller approve modal in a variable 😭
now it's in a txt file
import baller from "file://inject.js?minify"
(not esbuild feature, it's a plugin I wrote)
Alright @hoary pilot, in 7 hours, 36 minutes and 36 seconds: do
it can import any file as text with the option to bundle and minify js & html or encode as base64
just... maybe don't try to import the entirety of vencord as a string please
okay i'll do exactly that
any way to ensure my button is placed above the read all button 🤔
rename your plugin to come earlier in the alphabet

or make it start earlier via the startAt property
oh yeah StartAt.Init worked
now to just figure out how to render an icon there instead of a blank void and it's done woot
but that will make your start() function run way earlier
not a problem if you don't have one
I do
I copied readall's start and stop lol
they just call addServerListElement and removeServerListElement
oh right
well that's okay
just anything coming from discord won't be ready that early
like trying to use stuff from webpack commons
luckily this is just a quick nav so shouldnt have any problems
it's related to a recent vencord change. use 127.0.0.1 instead of localhost
add native.ts file to your plugin
import the CspPolicies object
CspPolicies["example.com"] = [ "connect-src"]
build
restart discord fully to apply changes
why do you think you're rate limited
are you actually getting rate limit errors
127.0.0.1 is literally the same as localhost
can't really help you without knowing more
wdym not receiving?
log requests and response on both the client and the server and see where it's not working
are you only trying to fetch from local host or are you also using it to load images, etc?
this only allows basic requests, you can add more directives like img-src to be able to load images
see mdn for a list of all csp directives
why are you doing this with http have you never heard of a websocket 😭
you need to list every directive you want
googol
just use a websocket tho

do you have the in app updater enabled
it will update your git repo
run git log
show what it says
wtf is that code
^
run git log and show
why are u asking for help then not doing what you're asked
can't help u then

so you did update yeah
okay now remove that code because it's plain wrong and then show any red errors in your devtools
then it has nothing to do with csp
your code is just broken then
there is no difference.
.
you can't
it will break eventually
it's such secret knowledge I literally told you how to
vee GATEKEEPING csp rules..
Its not that hard to white list a domain on a plugin
Make a native.ts file, Import the rule, and add your domain
step 1: make native.ts file in ur plugin
step 2: import the CspPolicies in native.ts (vscode should suggest from where to import)
step 3: add this
CspPolicies["example.com"] = [ "connect-src"]
step 4: rebuild
oh and restart ur client
Full restart too, dont just ctrl+r
that's what i said 
Im saying fully restart gang
It can also apply just press ctrl+r
@swift delta i think you're insane
At least I’m not Canadian
do you know how to import a file in Javascript
import { CspPolicies } from "somewhere"
figure out what somewhere is
your ide will assist you
why did he delete all his messages lmao
NavigationRouter.transitionTo("/discovery/quests");```
is there a way to listen to the router so I can detect when I navigate away from the quests page?
hours of yelling at AI later... it finally got the html and css right
flux channel_select probably
husk are you doing html and not using react
?
I don't know enough about all of this. All I know is I had the HTML from dev tools for the DMs button and it is like 30 layers deep.
It's just not a good practice to mix and match react and html (unless absolutely required)
the ? was less of a yeah why and more of a uuuh?? idk how I would do anything else??
oh god, send your plugin code
upload a gist
:') im going to get crucified arent I
you know you can use discords tooltip component, right
along with all their other components
I did but it didnt look right
the text would never be bold and the height was always too short
no css would change how it looked
it didnt match the dms tooltip
that's something to ask here 
I thought you were using document.createelement so not as bad i thought it would be
lol
i thought it would be raw text + innerhtml
I know enough to get the template made by yoinking other plugins and then telling the ai to convert the dms button html into a new button html lol
hardest part was getting the css
vibecoded vencord plugins are bad, more at 11
idk it's doing exactly what I want it to do and looks 1:1 to the dms button
only thing more Im thinking about is this
making it stay highlighted while on the quests page
did this mean there are other components I could have used for this button other than the tooltip or did you just mean in general all of their components are usable
all of them
you can just get them from their own code
components tab
no offense this is why I chose converting the dms button html into a new button cause the components tab is gibberish
theres a picker button
i made some plugins to demangle the names in the component tab (only works on some thing)
but its 4 am so i eep now
no clue how I go from selecting the dms button to yoinking the entire thing, duplicating it, then changing the svg and its location
findComponentByCode
ok I got the gist of it just can't figure out how to get any of this code to match smh
looking through other plugins and they all have super obvious code snippets but this thing im looking at os obfuscated to hell
added break point to try to inspect. no filters working. pain
I figured out the typing part, at least: it's because Classify broke ^= selectors. Still no idea about the slateTextArea though, but the most likely explanation is something about the changed classes breaking some equality check
yeah the way the home button is made is kinda janky, but if you instead look at the "add a server" button it uses a more generic component, and should be able to use it a lot more easily
that doesnt have a pill
I guess if I dont implement staying highlighted while on quests page it would be fine but I kinda want to try that
can you explain to me what im supposed to be looking for to put inside the findComponentByCodeLazy()
seemingly the showPill does not work, funny
find something unique in this function
why does yours display correctly when you click on anonymous smh
mine shows a giant uncaught error screen
uh, try reloading or deleting the extension in the vencord settings dir
which extension is it
the only one
there's like 20 files in there
vencordsettings
so pluginsettings
reinstalled vencord still uncaught error. agony
reload
ive reloaded a dozen times.
you can find the function from my screenshot
thats for the add server button isnt it
and now that i look at, so does home button
I always feel like im being talked to in riddles when asking questions on this server 😭
wait no thats a similar component my bad
its a generic component that add a server uses
works fine
no pill sadge
can you show me the code for that cause no matter what I do I dont get that
const QuestIcon = findComponentByCodeLazy("10.47a.76.76");
const ServerListButton = findComponentByCodeLazy('ButtonListItem")');
function QuestButton() {
return (
<ErrorBoundary>
<ServerListButton
selected={true}
icon={QuestIcon}
onClick={() => {
console.log("clicked");
}} />
</ErrorBoundary>
);
}
ok im noticing now my biggest issue is I keep inspecting the ListItem
when I should be inspecting the child
ugh but then I need to get the pill and the icon separately
and the pill gives me an uncaught error imma just punch my monitor
since reinstalling my userplugins dont show up in plugins omg why is everything going wrong??
how did you reinstall
finally I just reinjected again and they're there
got this to show up now to see if I can make it less scuffed
like that?
yeah but also not 24/7 blurple only when highlighted
i just hardcoded for testing
and it should only be that big if you "enter" that area
highlighting is height of 20 while active its 40
can you be more specific what you mean here cause I'd really like to fix the uncaught error
you said vencord settings but then what
what about the extension cache
i think it was updated a couple weeks back i think it had problems?
1 folder in there
@hoary pilot, <t:1749263004:R>: do
delete the whole cache or the folder in there
doesnt matter
What's the uncaught error?
sometimes the error happens to me too but reloading works
ok automod thanks
sorry for spamming I guess smh
The error was thrown at exports.inspectHooksOfFiber (chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:14260:33)
at inspectElementRaw (chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:8954:65)
at Object.inspectElement (chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:9237:38)
at chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:11584:56
at Bridge.emit (chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:4192:18)
at chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:4838:14
at listener (chrome-extension://aogahicjhfggocdollfpcdpjfhlhbjfh/build/react_devtools_backend.js:13163:9)
then another larger block below this one
ok deleting extension cache removed the components tab
fun
where do I enable that again
itll get redownloaded when you restart
Yeah and then you probably have to refresh after the restart as well for it to load
I already rebuilt and restarted
Bit annoying
ok reinjecting fixed it
no more uncaught error blessed be
it's perfect
damn it really is impossible to get the dms button isnt it
lame
right the code for that was, if you want it to be smaller when hovered, set hovered to true on the pill but you need to make the hovering logic yourself with onMouseEnter etc
const ListItemContainer = findComponentByCodeLazy("listItem,ref");
const Pill = findComponentByCodeLazy('animate-always":"', "wrapper");
function QuestButton() {
return (
<ErrorBoundary>
<ListItemContainer>
<Pill selected={true} />
<ListItem
selected={true}
icon={QuestIcon}
onClick={() => {
console.log("clicked");
}} />
</ListItemContainer>
</ErrorBoundary>
);
}
where'd you get ListItem from
its renamed serverlistbutton
hm it's still stuck perma selected and has a left margin but not bad
figured that out ye. im looking at the random extra margin it has rn
oh right
it's the styling on the pill I think
tries setting style on it but it didnt do anything hm
oh hmm its the containers fault but without it the pill doesnt show
maybe youll figure it out
I think your nesting is a bit off. w/e it's nearly 4am ill figure it out tomorrow. thanks for the help
might be idk
What's the correct way to import components that might not yet be loaded when used?
I saw waitForComponent being used internally by Vencord but idk what the name parameter should be
findComponentByCodeLazy
wait i misunderstood the question
That's what I use right now, but it occasionally throws when the module isn't loaded
const QuestIcon = findComponentByCodeLazy("10.47a.76.76");
const ListItemContainer = findComponentByCodeLazy("listItem,ref");
const ServerListButton = findComponentByCodeLazy('ButtonListItem")');
function QuestButton() {
const [isHovered, setIsHovered] = React.useState(false);
const containerRef = React.useRef<HTMLDivElement>(null);
let pillFixed = false;
React.useEffect(() => {
if (!pillFixed && containerRef.current) {
const pill = containerRef.current.querySelector('[class*="pill"]');
const wrapper = pill?.querySelector('[class*="wrapper"]');
pill?.classList.add(wrapper ? wrapper.className : "pillWrapper");
pillFixed = true;
}
}, []);
return (
<ErrorBoundary>
<div ref={containerRef}>
<ListItemContainer
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<ServerListButton
onClick={() => { console.log("Quick Quests button clicked!"); }}
icon={QuestIcon}
>
</ServerListButton>
</ListItemContainer>
</div>
</ErrorBoundary>
);
}
Got it workingish™️. Ideally the hierarchy of the DMs button .pill__1f388 .wrapper__58105 > (new pill created dynamically on hover) would be used so if anyone can figure out how to get the DMs button component that'd be neat.
But until then, I used the Discover component which weirdly has a pill hierarchy of .pill__5bc7e > .wrapper__58105 (child instead of same element) so I had to dynamically load the child's wrapper class onto the parent. That makes it work. Deleting the child wrapper breaks it, so just not gonna do that lol.
Not ideal but
Now to just figure out the tooltip. But that's tomorrow me's problem.
Tooltip's nice and easy, you just wrap your component with the Tooltip component and pass it a text prop
yeah but when I did it earlier it didnt look the same as the dm tool tip 
Tomorrow you's problem 
I'd try TooltipContainer as well, I don't remember what the difference is but maybe it'll work better
use the tooltip prop
which part do I wrap in tooltip cause it keeps yelling at me
<ListItem
icon={QuestIcon}
tooltip="banana" />
oh so I dont wrap it in a tooltip thing
no need
Convenient
oh yeah that looks perfect now
svg maybe a tad small
any way I can up its scale 🤔
look at the icons props
if I was using the raw svg sure but I have the component from lazy finding it
you're already using the right function, it's just that the module isn't loaded at the time you try to use it
make sure it's always loaded when you try to use it
what component is it
Already fixed it, my discord just updated and they changed some function names which broke the filter 😭
oh
