#🧩-plugin-development
1 messages · Page 85 of 1
now to see if there's an easy way to get it without having to open all 130 popouts
nice network tab called to https://api.yapper.shop/v3/discord-quests
tf quest was this
2030??
lmao
considering that it says "stream minecraft" it could very well be a random testing quest
oh maybe it's upcoming and so the config on discord's system isnt complete yet
cause they also have this one listed
or yeah maybe just never gonna be real quests
ai ahh assets
looks like the site is missing 8 quests I have in my data
damn
ok have 141 quests in total now. 139 minus those 2 sus ones above. somehow need to find the full data for the 8 I have that the site doesnt though
annoying the claimed endpoint doesnt return task data
its probably useless but heres my json
pretty sure all 8 are long expired so probably but ill take a look
you had 4 new ones bruh
now thats 12 with incomplete data
ok, so I think I actually found most of the stuff I'll need to hook into for this! next thing to solve is: how does one store/cache plugin data? I can think of custom ways I could do it, but I assume there's some vencord-specific way one is intended to
how did u find this. when I try to google stuff like "discord quest archive" I get a bunch of useless stuff 😭
plugin settings or more arbitrary data?
you can check just about any plugin for how to use plugin settings. fewer use the DataStore
i think thats what it's called
Usually github is a good resource for random datamined discord stuff, and I stumbled upon the SKU archive again so I checked it out
sku archive?
Yeah I mean the shop archive
oh is that what yapper.shop is
Yup used to be but ig they added more features
I wonder if the api will return sku info for expired shop items. it doesnt for quests
it does interesting

DataStore probably - this isn't settings-type data
also seems partially incomplete but a lot more than the rest
on a side note that yapper.shop has fake data for the mokoko quest
the application id and asset sku are wrong
they point to the moomoo milk asset
Hmm weird
weirdly amia's doesnt have any app data for the mokoko quest
lost ark isnt hard to get data for so i can just add it myself
ezpz
this is so weird they have minecraft's application id as 356875570916753438 in quest data which apparently it was 6 years ago but it's 1402418491272986635 nowadays. why would they do that 😭
not just mc. multiple games. fortnite is too
many are on the old id scheme... why 
welp merged the data of the 2 sources. 251 quests total. only 8 have incomplete data
1235258834524700703
1241062724922769408
1270822177289142464
1271118866113892352
1275119152989732895
1275212711088885770
1275212711088885771
1280648686736638006
I submitted some changes to FixYoutubeEmbed and youtubeAdblock as a PR. This is my first contribution to this project and if anyone has any advice for improving the PR or any suggestions for something else to work on that isn't too complicated for someone new to this project I would welcome them.
let's say i want to have icons like spotify/AM from images, what would be the best source to load them
or should i embed in the plugin code directly
might use emojis
@hoary pilot evil
wdym "spotify/am from images"?
oh yeah, so like, the plugin I wanna make / am making would involve users having a URL in their profile, and the plugin would fetch some JSON from that. question: does that count as breaking the "no untrusted 3rd party APIs" rule for plugins?
for starters if it's an arbitrary host it won't even be possible
also who would wanna have a random json url in their bio
I mean, it'll be possible - it'll just require a native component to do the requests
so you’re just completely bypassing all web security 😭
that’s not a great idea
just make a backend and store stuff there
lol
my body is a machine that turns iClouds into bypassed iClouds
I mean, it's fine as long as you actually validate and sanitize your data 🤷♀️
no
if you have a native method where any url can be fetched this undermines csp/cors
grabbing json with a get request doesn't run a risk of cross-site attacks - especially if you aren't passing any session data
yes
vencord uses a strict CSP for a specific reason
that reason being?
you don’t want a theme to arbitrarily contact a server
if your theme or JSON link points to my server congrats i have your IP
not so great privacy wise
not a theme
but also valid
I don't like the idea of the plugin being tied to a specific hosted api, but that is a good reason to do that
any plugin with an unfiltered fetch method in native will never be merged or allowed in unofficial plugins
yeahh, strongly considering changing my mind there
answer me bozo @hoary pilot
what png tho
i just base64 encoded them in the end
lc.i spotify logo
just steal from discord
and apple music
and tidal
and qobuz
and ytm
and yt
i’m making song.link plugin
ok ye discord doesnt have tidal
or qobuz
cant believe they have amazon music but not yt music
scam
hello, can I get access to electron's BrowserWindow instance from a vencord plugin?
oh wait I've just searched in this channel and found helpful stuff
yep maybe I didn't need to make a modmail for channel access lol
so peak (yes it needs the timeout lmao)
how does that work
do you not need to join a server with that specific sticker?
it works by using a dedicated server where the plugin uploads the sticker you select, and when you want to use another sticker, it replaces the previous sticker and uploads the new one you just selected
it's basically just uploading the sticker the moment you click on it so you don't use up the sticker limit on a server
though, this plugin can only be used by nitro users
I don't think so unless you're sending stickers every second
it would be cool if you could import entire sticker packs from other platforms like telegram 
I have a script I made that lets me import from LINE stickers, but it's outside Vencord so I didn't include it
still pretty cool though
I thought about implementing it directly but I'd need to use a third party API since I can't use Python (I don't think I can) in Vencord, and third party APIs aren't allowed
oh yeah I forgot that vencord security policies could be an issue 😭
mfw I need to add a event.currentTarget ??= event.target as any; to a context menu function to prevent a Cannot read properties of null (reading 'contains') error.
hi
there dont seem to be any docs for vencord's types, could someone explain these select things i dont understand
the Activity interface has a timestamps field... what is this for?
i assume this is for the listening activity kind for the time listened bar thing; what does it take timestamps as? present to future seconds or milliseconds?
or does it take the time of the activity it should start displaying the bar?
bro these are discord types
Build games, experiences, and integrations for millions of users on Discord.
im familiar with the former, any resources for the latter?
read pins, it has a bunch of resources
and vencord plugins source code
ive gone through those
another q: whats the preferred formatter for the codebase? the editorconfig is a bit vague and my applied formatting looks quite different from the other plugins' formatting
vscode formatter
the formatter is called typescript language features or something like that
it's all configured in .vscode/settings.json
you can use findGroupChildrenByChildId
it's used in translate plugin if you want an example
two components I'm currently trying and failing to find, maybe someone knows a plugin that touches them or something:
- profile pictures on messages
- wherever discord makes the decision to cluster messages together, when they're by the same user and close enough in time
whats the idiomatic way to store some state (temporarily / for the session)?
should i use raw browser apis? i feel like i shouldnt
just in memory if you never need it to persist
if you need it to persist reloads then a hidden: true setting would work
i do, and what is this a parameter to exactly
like what do i call
my userplugin has tons of private settings. brief example
export const settings = definePluginSettings({
disableQuests: {
type: OptionType.COMPONENT,
component: DisableQuestsSetting,
description: "Select which Quest features to disable."
},
disableQuestsEverything: {
type: OptionType.BOOLEAN,
description: "Disable all Quest features.",
default: false,
hidden: true
},
disableQuestsFetchingQuests: {
type: OptionType.BOOLEAN,
description: "Disable fetching Quests from Discord.",
default: false,
hidden: true
},
disableQuestsDiscoveryTab: {
type: OptionType.BOOLEAN,
description: "Disable Quest tab in the Discovery page.",
default: false,
hidden: true
},
hidden just means it doesnt show up in the plugin settings page but you can still use it as normal
arrays arent supported but records are
lastQuestPageSort: {
type: OptionType.STRING,
description: "Remember the last used sort on the Quests page.",
default: "questify" as string, // sort key
hidden: true
},
lastQuestPageFilters: {
type: OptionType.CUSTOM,
description: "Remember the last used filters on the Quests page.",
default: {} as { [filter: string]: { group: string, filter: string; }; }, // Array of filters
hidden: true
},
ignoredQuestIDs: {
type: OptionType.CUSTOM,
description: "An array of Quest IDs that are ignored.",
default: {} as Record<string, string[]>,
hidden: true,
}
});
well according to my ignoredQuestIDs nesting it works
just cant be top level
thats what my ignoredQuestIDs does. it's userID to array
I think there's a pr for array support
it's been open for like 10 years though
so dont hold your breath
lol
example of how it ends up looking
interesting, feels a bit hacky -- is this really normal?
what abt this?
just to weigh my options
what do you need
im trying to store rpc durations and stitch them together to get accurate time reads
const rpcDurations = [];
the plugin refetches data from an api every couple seconds
i need the data to be persisted across instances (i believe)
yea no dont mind me im new to the codebase
i figured out what the structure is
what's it look like
sorry for my monetary stupidity
ill just store it in the settings store
alongside a timestamp
if the time difference is above a certain threshold, we consider it invalid
to be more specific, im trying to add a time bar for lastfm rich presences
lastfm's api gives u little info abt playback, so i need to just figure out the track's duration and stitch some stuff together
theres the case where the song is paused, and it is no longer of the nowplaying state, but when its resumed, it shouldnt start the rpc from scratch with time from zero
which is what looks like currently already happens
this behavior gets is more visible when we have a timebar vs just a simple time counter
why does that need to be persistent across reloads
the start timestamp becomes zero across reloads
and then it refetches the api and sees a nowplaying status
and now the bar is time zero while the track may be nearing completion
Time passes while you're reloading though so it'll still be inaccurate
yes, but to a lesser degree
several seconds vs entire minutes
Or if you close discord and open it again tomorrow
like i stated, if the timestamp is older than a certain threshold, its invalidated
iirc lastfm has some period of time before a nowplaying track is considered as invalid
the threshold would be that
i do not want it to be that redundant
i want to store temporary data, but across reloads
it seems a bit hyperspecific tho so i doubt there is an existing solution for that
menuitem inside a menuitem
but the data is fetched on startup so why cant you use that data instead but want to store it?
why? what for
what kind of data
^
why do you need to store anything
are you trying to cache?
i think adding a time bar is kinda pointless
there's already a timer
does anyone know how does the adding to GIF's work? I can patch the RegEx directly to images to treat them like gifs
but I wanna know how can I patch the add gif thingy to images
it feels a bit out of place from general media statuses
its nice to have a progress rather than just a timer
the api gets polled at a constant rate, like i explained above, and when the api does not return a nowplaying track (which is also for the case the track is paused), the presence gets cleared
once the track is resumed, the nowplaying track is set again, and the rpc is reset to starting from 0:00 time
which was already the case, but with the timer it was less noticeable
There isnt one afaik
if you want a reference of which patches you need to add, you can take a look at this pr https://github.com/Vendicated/Vencord/pull/534/files, although it's pretty old (probably doesn't work with the search filters revamp)
Sure but you can't correct the hit count, and it's quite inefficient
So it'd be some sort of shorthand for existing filters?
Or does the api support filters that the client doesn't?
it definitely does have some extra filters that are not available in the client (I think the mobile client uses attachment_extension for the media channel tab)
link_hostname sounds pretty nice, assuming it does what it sounds like
is there anywhere here where I could ask for reviews/suggestions/critique?
while my plugin is technically done and 'works', I feel like something is off and it's not optimized enough so I was wondering if there was a place where I could ask for feedback
here
I'm mainly concerned about the modal closing since it gets slow the more stickers you have, but there may also be a ton of other issues that might be there, or questionable decisions. Anyway I'm looking for any feedback at all
https://github.com/chev0004/UnlimitedStickers/blob/develop/StickerPicker.tsx
The way I'm doing it right now is by hiding the non-visible sticker categories before the user scrolls them into view, then it expands them, and that makes the interaction feel a little smoother, but I have no clue what to do when it's time to close the modal because if there's a lot of categories opened, React also spends more time demounting them
ngl I feel very nervous even showing my code but I need feedback to improve 😔
tbh as along as you arent using ai to write vencord plugins (it can't) theres nothing to worry about
Idk what causes the perf issues, but I think you should split up some of your components
Like for example in your modal component you have a render function, which should probably be its own component. Also wrap the smaller components in React.memo (you'll probably need to use proxyLazyWebpack since React isn't available initially)
if you're worried about perf while scrolling, discord has a lazy scroller you can use
what's it called?
also afaik unmounting in react is fast
all it has to do is cleanup effects, and remove the dom node
I'll try splitting them up. I also tried React.memo already but for some reqson it makes the plugin crash and causes vencord not to load at all. I probably just used it wrong though idk
I'll record a quick video gimmie a sec
for react.memo, you probably have to use a lazy component
you might be confusing re-rendering with unmounting
a component unmounts when it is removed completely
a component re-renders when things like state or props change
notificationLog.tsx: Lines 142-149
<ListScrollerThin
className={cl("container")}
sections={[log.length]}
sectionHeight={0}
rowHeight={120}
renderSection={() => null}
renderRow={item => <NotificationEntry data={log[item.row]} key={log[item.row].id} />}
/>
(modal closes faster with just one category loaded, compared to when I scrolled to the bottom and loaded a bunch)
oh yeah this one, it caused my grid to be just one row wide since I guess, because it's supposed to be for lists
I'll try restructuring the component so it can work as a list
i've never used it or know how it works, i just know it exists
(also it isn't that hard to implement your own lazy scroller)
I implemented a lazy scroller already (I believe so), it's just that, for some reason, the modal takes a long time to close when I've loaded a bunch of categories already
tbh i wouldnt worry about the time it takes to close that much
I think you're not removing the elements once they're out of view, so by the time you close the modal they all have to be removed at once
idk
I think you're right
they are being unrendered though, if I scroll up, they return to the skeleton animation I made for loading stickers, so they definitely are being unloaded
but I think it's precisely those 'skeletons' that's causing the lag
I'm looking at porting the patches from my native idle pr to a Vencord plugin like vendicated suggested, but since it uses a native node module should I just leave all of the electron main thread specific stuff in vesktop itself and mark the plugin as vesktop only? Or should I put as much as I can into Vencord itself
I'm just going to assume it's ok to leave the actual idle implementations in vesktop itself since I'm pretty sure it's just the patches that need to be easily updatable
is is possible to load .node modules into both vesktop and discord desktop from a plugins native.ts file
the .node module is completely useless outside of vesktop on wayland linux so it doesn't make sense to put it into vencord
sorry, i wasnt referring to what you were talking about
was just wondering in general for something else i want to do
no
vencord is just 3 js files it can't load native modules
that's why i was working on asar bundle at some point so we aren't limited by that
so if I just put the patches as a plugin and leave everything else that should be fine for now?
like i said dont worry about it
Is there any way I can set my own origin header for a single request?
using a native.ts file yes
why do you even need to do that
Yep just did that
Messing around with a text to speech public API that require specific origin header
im trying to make my plugin but cant really get it working
im getting "typeerror: can not fetch"
anything im supposed to do?
extra info, im calling my llm model over on my fastapi app on a online server
this is what i get in console(i cannot provide the api url tho.. its private
this is a personal plugin anyways)
CSP is blocking it pretty sure
Have you allowed it
how do i do?
^^^
okay, lemme try
There’s different stuff you can import so you’ll need to find which one you need but
are there any docs related to this or talking about this?
index.ts: Lines 12-16
export const ConnectSrc = ["connect-src"];
export const ImageSrc = [...ConnectSrc, "img-src"];
export const CssSrc = ["style-src", "font-src"];
export const ImageAndCssSrc = [...ImageSrc, ...CssSrc];
export const ImageScriptsAndCssSrc = [...ImageAndCssSrc, "script-src", "worker-src"];
okk
But honestly, if you understand typescript, you can just really read the code of Vencord and understand how it works
Vencord (atleast most parts of it) are pretty easy to understand
okayy, im not really used to typescript thats why i need help and docs sorry
thanks @swift delta it works great!
you only need connect-src if you’re just fetching
Just figure out which one you need for your purposes and use that one
Idk what they are doing exactly with that api/plugin
hi im planning on making a pr for a plugin but before i will, do they have to follow some text styling guide (like text shouldn't be all lowercase) or is there really no attention to that
titles should use title case
sentences should use sentence case
plugin name has to be like this: PluginName
alright thank
The HTTP Content-Security-Policy response header allows website administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints.
This helps guard against cross-site scripting attacks.
your csp error will say which directive was violated
is it possible to get a cached boolean (stored as a local variable) from a native.ts file in a plugin without returning it as a Promise?
no
if I wanted to get said value would I just have to convert everything into async
I’m trying to patch a boolean check with a value from the native file and I’m kinda dumb so I couldn’t find a nice way to get the value synchronously since that’s what the check expects
but I suppose making everything async could work?
Patching the entirety of discord to allow async in that one place?
you could try
- making a variable in your plugin definition
- in an
async start()function call ur native method and set its return value to that variable - in your patch,
$self.variable || originalValue
i want to create a plugin for something related to deleting your own messages, i am not sure yet. however, id like to know some things:
- is there a documentation for the api?
- is it difficult to transition from private plugin to official plugin?
- is there any other page except for https://docs.vencord.dev/ that can guide me? maybe some pins here or whatever?
anyway, until then, i will probably just look around inside the code of other plugins to get a feel for vencord 👍
your only documentation is understanding code that has been already written really
so basically just keep on doing what you are
alright
you can also look in current.js of the discord datamining repo
for example to find stuff to patch
or stuff that hasnt been put in the discord types package for some reason
also transitioning is just a matter of adding yourself to the devs dictionary and moving your plugin from userplugins to plugins
i see there is a presend message event, but is there no postsend message event? 🤔
for example, i am sending this message right now, is there any way to get the msg id of it and tinker with it?
MESSAGE_CREATE
got it :D
just the surrounding context, shouldn’t be too bad? like 2 functions pretty much
It's gonna be unpleasant for sure
I thought about doing it like this but the problem is that the value might change
should just be a matter of slapping the word async in front of 3 functions and adding the word await in my old patch
They're not exported I hope
they’re not but if they are called elsewhere they don’t return anything
only one function which I’m fairly confident is only called within the module returns a value
are plugin descriptions escaped? no discord markdown support?
it's just plain text
i will be honest, i probably should have asked before, but i wanted to make an auto-delete message plugin. however, i have now read the #1256395889354997771 header text that talks about "No selfbots or API spam". This plugin will have generous rate limits and cannot guarantee perfect deletion (for example, you suddenly lose power), so i am curious if you guys would even consider the pr in the first place https://github.com/Vendicated/Vencord/pull/3765
i dont really want to progress if it has no chance of being accepted
thanks for the quick reply
is it possible to send a message from native.ts into index.ts or is it just from index.ts to native.ts
asides from adding some kind of listener structure onto VencordNative, the other option I see is a direct contextBridge api, but at that point I'm guessing it'd just be cleaner to attach some kind of generic native to renderer messaging system for plugins onto VencordNative?
the easiest way is to declare a method on your plugin object then use executeJavascript from native.ts to call it
native.ts: Line 10
const handleDevtoolsOpened = () => e.sender.executeJavaScript("Vencord.Plugins.plugins.ConsoleShortcuts.eagerLoad(true)");
oo thank you :D
just make sure not to put unsafe code in there
it's a very ugly solution but the best you can do until I add a better api
I know you said not to worry about it but I'm just tinkering around with making nativeidle a plugin
this is basically calling handleEvent
should probably be safe?
I'd be surprised if it wasn't since it's in the discord client itself
calling everything is safe as long as you don't embed untrusted input into it
just be careful to not return complex objects (classes) or you will get serialisation errors
hallelujah it works!
hey im new to plugin development can i someone tell me how the patches work and finding element or components ?
the patches work on webpack modules and use regex to locate the specific parts you want to replace
the quickest way is to search in devtools and use react devtools
||i personally use a vscode extension i made||
sadan the goat, check out his extension
Last Updated
1 minute ago
What
Yah i just got that
Time to not use this for like 5 days until i get a burst of motivation
is there somewhere I can see all values for the UserSettingsAPI?
you can get them directly from the module ig
Object.values(Vencord.Webpack.wreq(Vencord.Webpack.findModuleId('"textAndImages","renderSpoilers"'))).filter(s => s.userSettingsAPIName)
is it possible to access plugin settings from within native.ts? I've tried just about every way I could think of to get at the plugin settings there and it always generates an error saying that window is null if I do
Export a function that accesses it, dunno
window isn't available in native.ts
since you're in the nodejs context
import { RendererSettings } from "@main/settings";
const settings = RendererSettings.store.plugins?.YourPlugin;
if a setting is at its default value it will not be defined
knowing it's undefined if the value is not set was what I needed, thank you
got it working now
it's been probably over a month now since I submitted a plugin to #1256395889354997771 on #📩-modmail but haven't received a reply yet, how long are the wait times usually?
what’s the ticket number
(plugin-submission-????)
actually i can find that
ah thanks
tbh ur kinda right my plugin was kinda pointless, it was meant to be a patchwork solution for more secure communication but yeah an encrypted messanger is probably the best idea
if you don't mind me asking, why is editing the message content in place a bad idea? and how could this be improved?
can someone help me find a way to disable/enable noise suppression
like programatically ?
use react devtools on the button that does that
and see the onclick code
then do the same
is it just the default chromium devtools (sry i never used react)?
no
how do i access it then?
i have it enabled
look up a tutorial on YouTube
if you don't see the option in devtools you need to press ctrl r to reload
ty it was that
hi - i want to add listenbrainz rich presence support, just like LastFMRichPresence, should I add on top of the mentioned plugin or make a new one
and should I even attempt contributing to the main repo lol
nvm theres an unofficial plugin for it ignore ty
hi im wondering what exactly the test patch button does
does it like run it once
or does it persist
bcs when i press it it says patch ok even though nothing happeens
What test patch button
in the
vscode extension
uhh
vencord buddy
or something
i forgot what it was called
i opened one of the plugins that comes w/ vencord and when i press test patch on it nothing happens
The one from vencord companionship
It means the patch does not error when it's patched
does it execute it on your discord client or
Does not give any other runtime guarantees
does it just test if its valid
This
oh okay
so how do you see how patches will look
when you run them
do you have to inject ur plugin to test or
You can use patch helper in discord settings, run the plugin with the patch or use my version of vencord companion which will let you see what patches look like as you write them
can you send ur version of vencord companion?
or is it like pinned
thanks man
@hushed loom satan
what does your companion do above stock
why is there nix
insane
everything
other than the thing that it still says it does in the readme but which it doesnt cause sadan removed it but didnt update the readme
You will pr readme update
@hushed loom satan
Insnae
You will stop telling others to pr fixes for your project
Nop
made a lil timezone plugin for me and my friends 
That'll be the what, fourth?
@dull magnet merge timedones
does anyone know how to make a vencord plugin cuz im trying to make a plugin for vencord to add a button at like the mute and deafen thingie
there's also resources in pins
k thanks
does the vencord compainon also build it automaticly?
no im pretty sure it just tells your patches are valid
you still need to build and inject ur plugin every time you wanna see how the patch looks
Kid named pnpm run dev
does anyone know any plugins that patch message rendering
i cant find anything that doesnt patch message store
ty.
Depends on which aspect of message rendering
Markdown parsing/rendering? Grouping? Embeds?
are they all seperate?
i just want to find whatever is like responsible for the messages being rendered into the dm / the channel
how would i go about that
at like
the level where
the element is added
A message consists of about thirty different components
how would i go about hiding a message from a certain userid then
would it be better to like patch the messagestore
or to patch the message rendering
i looked at them they just remove all collapsed messages
they dont have any patches relating to normal messages
hm
i didnt read through the entire thing but it looked like they just added a deleted attribute to the message
and patched the color rendering
i dont know
i'm considering if manipulating the dom directly would be worth it (since im not planning to publish this either way)
i had looked at timedones and it was too out of date, did not run, and the timezone database it used was completely down
mine is much simpler and uses the intl api https://github.com/Commandtechno/Vencord/tree/main/src/plugins/timezones
i also made a database that me and my friends can set which is why i dont plan on turning this into anything more
i do not know of any other ones
A Discord Desktop Clientmod. Contribute to Commandtechno/Vencord development by creating an account on GitHub.
its pretty tiny, steals most of the code from uservoiceshow
this is the whole api https://github.com/Commandtechno/Vencord/blob/main/src/plugins/timezones/api.ts and the components are less than 100 lines
i mainly wanted to recreate the local time thing from slack
i also made a separate thing that parses and replace timestamps in messages i might combine these 2 things
I use this one from the old unofficial plugins channel
insert disappointment around timedones plugin
Hello everyone!
Sorry to bother. It's been ~2 hours I search around, but can't find anything.
My goal is to create a (prototype?) plugin that change the fancy text in channel to their "normal" conterpart.
I tought that patches allow that. I looked around (mainly with the hidden channel plugin) but can't find the good find. I always get "two much module".
Anyone know if they are plugin that done that or something around that so I can check their code?
Thank you !
turn this off
it is with vesktop ?
Because I talk about channel name, not the fancy display name! Some people for example, use 𝐑 instead of R and it makes the search totally broken
No, that setting is for discord's latest nitro bullshit
Unicode abuse is a completely different matter
Also, even after enabling the react dev tools it doesn't show up in the dev tools, should I do something more than restart discord?
You have to do a full restart of discord then also a regular refresh for it to show up
Dumb bug
already done :(
I got this :
patches: [
{
find: "UNREAD_IMPORTANT:",
replacement: [
{
match: /name:\s*(null\s*!=\s*\i\s*\?\s*\i\s*:\s*\i)/g,
replace: "name:$self.fancy($1)"
}
]
}
]
But it works "only" for displaying. If someone have an example for searching /autocomplete!
alternatively, you could make a font and use css
I don't think font allow to change #:loudspeaker:|𝐃écrets・𝐌ortels to their counterpart :/
(Also I don't think it will works on searching :/)
?
You can make a font that makes all the characters you don't like look like their normal counterpart
if they want search anyway a font wont do
make plugin patch when the channels get added to ChannelStore and replace the text there mayhaps
I think I got something but I'm not sure if it is the good way :
Nice betterdiscord-style patching
I can dm you something to use as a reference which works
actually idk if i can send it here
Hey guys, I would really love some assistance from you guys who know the ins and outs of the vencord api + discord api. I am working on making a plugin that interacts with buttons within a discord channel (so that I can use my keyboard to control my music bot).
However I keep getting a 401 Unauthorized result from sending a valid payload to the API. I tried the restAPI along with the FluxDispatcher (unsure if these actually do what I want, just trying anything I can find at this point)
The only method I have found is querrying DOM elements with:
document.querySelectorAll('[id^="message-accessories-"]');
// narrowing it with
const buttonText = button.textContent?.toLowerCase() || "";
const ariaLabel = button.getAttribute("aria-label")?.toLowerCase() || "";
const emojiImg = button.querySelector('img[alt]');
const emojiAlt = emojiImg?.getAttribute('alt')?.toLowerCase() || "";
for (const label of labels) {
const searchLabel = label.toLowerCase();
if (buttonText.includes(searchLabel) ||
ariaLabel.includes(searchLabel) ||
emojiAlt.includes(searchLabel)) {
// and ultimately calling it with the hackiest way I could think with my limited knowledge of how things truly work internally
(button as HTMLElement).click();
have you looked at the video in pins?
probably would be helpful
oh this ones decent
im going to take the datastore stuff from it
Hey, I'm working with addMessageAccessory and I assume that the props.message is a Message from @vencord/discord-types. If that's the case, is it normal that the Embed has no footer? property?
I tried to console.log the props.message with a message that has an embed with a footer and it shows that it has a footer property; also I tried logging props.message.embeds[0]?.footer?.iconURL and it works: it shows the icon URL link just fine. Is it another type?
Ok thank you, I'll try that
renderMessageAccessory is something in @api/MessageAccessories?
no
Oh
definePlugin({
name: "YourPlugin",
renderMessageAccessory(props) {
return <p>Hi</p>;
}
})
Oh! I understand, thanks
(but this is not going to fix your issue, just an unrelated thing)
I know, in fact I was going to ask, why renderMessageAccessory and not addMessageAccessory?
I need help I can't fetch to my domain its give me TypeError: Failed to fetch. Refused to connect because it violates the document's Content Security Policy.
render is automatically managed, add is manual
Ah ok
you should always use auto managed methods unless you need more control
Use discord search
in: 🧩-plugin-development Refused to connect because it violates the document's Content Security Policy
I did but this is literally What I made in my plugin
Gonna try everything again and again and come later
fully restart discord
Just to be sure: You're not using web right? This doesn't seem to work with web since it says that native.ts is an Electron thing
im using canary
Ok
native.ts not native.tsx
Btw try renaming native.tsx to native.ts. I don't fully remember if Electron supports React out of the box but try that
^^^
Seems like your domain doesn't send a Access-Control-Allow-Origin header
Yeah yeah ik im just happy isnt the same error
Ah ok lel
after finish my plugin how Can I share it ?

As far as I know, I don't have permissions for posting there. But when I asked how to get access to this channel, I spotted on a menu on modmail saying "I want to submit my plugin". But I don't know if that means to submit it in #1256395889354997771 or to make it part of Vencord built-in plugins
TL;DR: Ask a moderator
Or read the guidelines of #1256395889354997771
it means #1256395889354997771 perms
to get it in vencord, you'd make a pr (and wait a decade for it to get reviewed and possibly accepted)
Yeah I thought it was the same permissions for this channel's access
so pr is open?
You can make a pr, but probably only make one if you know what you're doing and you think it has a good chance of being accepted
I think I have a good idea
how do I run code when my plugin's settings are changed ?
onChange
I have done my plugin Can I show anyone to take his opinion or suggestions?
Cuz I wanna submit it
thank you vending machine
the onChange is supposed to go inside definePluginSettings right ?
also are things like console.log supposed to show up in console ?
ok I have a big skill issue nvm
is useState forbidden at the top-level of plugins ?
ok thanks I guess I'll just use a let then
cat (2) real
The Rules Of Hooks
Anyone rate please
1/10 the color changing color picks a single solid color after you finish drawing instead of remaining a colorful line
rate the plugin idea
idk you didnt give any details at all just said "rate plz"
give a description of all it does
kinda cool, but seems useless to me
What's the use case
apparently tic tac toe with friends
Is the drawing pinned to a message, or the screen? How does it work when you scroll 
Also how does the protocol work?
It would be cool if it was also real time (so you dont have to press confirm every time) and persistent, I'd love draw little things next to my messages
the nearest message
The drawing sticks to the message itself, not the screen — so when you scroll or zoom, it stays perfectly on the message. The idea is to let people add little notes, circles, highlights, or reactions directly on top of chats. It’s meant to feel natural and persistent, like you’re marking the conversation itself.
also I add this badge 
Gonna improve it
no one wants to talk to a clanker
still waiting for suggestions
send your code
Where, why
if you want suggestions send your code
anyone know the name of the experiment for this new dms button
searching dm and message turned up nothing unless im blind
Just see where it's rendered and find the useExperiment call
It will still be in the code
Just look around that area
182 results in the file agony
Wdym
Oh
That's not what I meant
Just look around the code for that area
Experiment calls usually have their results destructured so you can spot them easily
dm?
Just post it here
dev://experiment/2025-10-desktop-land-and-learn
stupid ahh experiment
first thing I see: MutationObserver
My pathetic way of freezing the chat
was your plan to post it in #1256395889354997771 or you just asking for opinions in general
post it
I think MutationObservers count as dom manipulation 🤔 which isnt allowed
isnt big proplem to delete it
can see the guidelines here
need more buttons
install questify for +1 more
hell yeah
Most of your code is based on raw dom manipulation, which definitely isn't great (cuz it doesn't interact well with react's virtual dom, and can break things)
You should also remove document.createElement, document.querySelectorAll, and addEventListener's (unless used with a react ref)
Also, don't use the location href for parsing the channel id. Use SelectedChannelStore.getChannelId() instead. You can use it to get realtime updates with SelectedChannelStore.addChangeListener, or with useStateFromStores
Thank u sm
but is the idea good?
is it worth?
I like the plugin idea, would be fun to goof around with it in dms
you could even add an option to attach stickers to other people's messages like iMessage has
gonna do my best
how do you have all theses ?
- Discord
- Questify plugin
- dev://experiment/2025-10-desktop-land-and-learn/2
- dev://experiment/2025-04_desktop_notification_center/3
- dev://experiment/2021-09_favorites_server/3
there are probably more random buttons I missed
wait you can add a /number at the end that's cool
wtf is landing or learning about the dms page
I think I saw a concept where the home page would have way more sections, including more stuff in the sidebar, so with this experiment they move the dms to a separate page
(possibly also related to the ICYMI experiment)
hi, I have a patch for youtube watch together that removes the timeout limit in a file that I can override, but I'm not sure how to get that into vencord itself, it loads the main.js for the activity but I can't seem to get to it?

'ello would like feedback on this vim plugin i've been working on (I swear it's not fully vibe coded slop, I did put a lot of thought into the design and code for the most part 😭)
share
v- programming
actually i do that @left plank
index.ts: Lines 15-27
async setTrackMainColor() {
if (!SpotifyStore.track) {
document.getElementById("vc-spotify-main-color")!.innerText = "";
return;
}
const mainColor = await window.colorjs.average(SpotifyStore.track?.album.image.url, {
format: "hex"
});
const style = document.createElement("style");
style.setAttribute("id", "vc-spotify-main-color");
style.textContent = `:root { --vc-spotify-main-color: ${mainColor}; }`;
document.head.appendChild(style);
r.i.p.
is there even a better way
i should make this support Apple Music and set your client theme
😭
thanks for the unban o/
pardon my yesterday's attempt but i had another go at it (https://github.com/pk-vishnu/Vencord/commit/e700f8906cf442506c7e5a637b49b0b508d96bab)
so like what's the correct way to invoke shortcuts that don't dispatch flux actions, like search, alt + arrows?
Thanks will check
hi vencodr
i enabled the react devtools thing
restarted vesktop
and do not see react devtools
is it not in the extensions tabs as normal?
errors out on desktop gg
apparently you also have to refresh #🧩-plugin-development message
Ye having the same error
did not work vesktop
does vencord have an eays API okr something to mke these buttosn?
i found it
fym button from vencord
ill jus use the deprecated thing

What's this eslint error
failed.
Error: Key "rules": Key "no-useless-escape":
Value {"allowRegexCharacters":["i"],"extra":"","extraCharClass":""} should NOT have additional properties.
Unexpected property "allowRegexCharacters". Expected properties: "extra", "extraCharClass".
the I didn't run pnpm install after updating error
Oh
I need some implementation advice for the vim plugin, beacuse if branches are atrocious
I tried this approach instead #3799
nvm, i think it's complete, at least the first iteration
Do I have to raise another ticket for code review, or post on unofficial plugins?
if you want to PR to the main repo as an official plugin then open a PR. you do not need a ticket
if you want it in #1256395889354997771 open a ticket
this isn't java you know 😭
type Motion = (ctx: VimContext, count: number) => VimRange;
const motion: Motion = (ctx, count) => {}
i thought it would be cleaner that way so i can check the key with instanceOf at runtime
hi hello!
anyways
im learning type script as im writing this plugin idea i had for a while
im having a block in how i fetch the user's favourite gifs
sorry if this is the worst fucking code ever, again i only had experience with c# and modding unity games not typescript
oh waow its the ultrakill custom map guy
hi
anyways, yeah is there some sort of way of getting the user's fav gifs? this is just getting the fucking document elements and checking if they're a gif basically
maybe get inspiration from #📜-js-snippets message
it really only gets whats currently active and it cant fetch tenor gifs or giphy (i should update the filter list)
aight
alsoooooooo if im submitting it to the public mod list is it bad that im using this as the image for the randomize button
was meant to be playtesting but its funny so i wanna keep it in
give people the ability to change it to whatever image they'd like /j
honestly at first with the randomgifpicker i wanted it to get the gif's creation date and you could sort from a timespan but honestly it was too complicated
you mean gif's creation date or date it was added to favs?
they can use css for that
ik that was a joke
OK OK IT WORKS NOW
THANKS UHHHHHHHH
THANK YOU SADEN
okay so
im assuming i cant have loggers right
for releasing a public plugin
seems like it
why would you need loggers for public plugin
idk but i removed them and restructred the code a bit
lemme upload an example video
UserSettingsActionCreators.FrecencyUserSettingsActionCreators.getCurrentValue().favoriteGifs.gifs
ts is what i came up with
its way worse btw than it was
before hand
previous:
Why are you accessing vencord exports from the window object
i feel like theres still some more ways to optimize this
well whats the proper way ig
import { findStore } from "@webpack/common"
(your editor will most likely correct this import)
oh yeah
reminds me
i kinda uh
added // @ts-nocheck to my file
because it was complaining alot about import shit
but it still worked
💀
so i wanted to supress that error
look, if it works it aint broke
Well it wont pass code review that's for sure
unggggggggg ok ill look at the issue again
did you vibecode this
90% of those globals you're trying to access don't exist and that entire ?? chain makes no sense
no? why
have a look at other plugins then instead of guessing random code
if you have to disable typescript or cast to any your code is wrong
well i have been, the code for pasting gifs into text is from pastegifs plugin
and im cleaning up the plugin more
its just more or less me trying to experiment with typescript
i only had experience with modding unity games in c#
and the patch for adding the button itself is from the searchbar plugin
I think you should just request ur data export
my head kinda hurts wrapping over this and i've been working the entire friday but this is really something i wanted a long time ago as a plugin that i just now decided to do
i have alot of more respect for yall than i did ago now
just stay away from the window, you don't need to access anything from the window
all apis are able to be imported, just let your editor auto complete them. use vscode if you aren't and don't disable type checking
if you get stuck have a look at how other plugins do things
or ask here
well i think im done, after like 5-7 hours figuring out what the plugin needed to do and what it didnt needed to do i cleaned the code up and it went from 170 lines only to 88 lines
my head hurts
type script is like c# if it had a baby with python in my opinion
so is my code still shit or no
wait
fuck
forgot to update the copywrite
i kinda just copied it from another plugin
yes i added myself in the constants because i figure that out
you can put your own name in the copyright
oh really?
okay
so uh
i made a fork
added the commits
do i just send a pr and do a request in modmail
right?
it's not too bad now but you can't load images from walmart without adding it to the csp which you shouldn't do
i couldnt figure out how to load images locally
just use an svg
also move your findStore to the top level and use the lazy variant instead
welp time to read another fucking documentation for the 4392842374289th time hnnnnnnnnnnngggggggggggggg
you never used svg?
no, i just always used that chance plush image
im looking into it
ok does anyone know how to get like discord's icon colors for each theme? i feel like this arrow changes colors between black and white theme
black is b9b9bf for its arrow
and white is 6d6e77 for its arrow
If you want your icon to automatically match Discord’s theme colours, you just need to use fill='currentColor' in the SVG assuming that's what you're asking
not the discord theme itself, like icon colors i mean
look at the arrow
look at the magnifier
they're different colors in each theme
thats what i want
Yeah they use fill='currentColor' to change depending on the set theme
well thanks im gonna go test it out
well that works, goodbye chance plushy from forsaken!
gotta fix off set tho
its ugly
looks good enough?
I would move it up more personally
wtf why does it have round border beyond the dice
its like BARELY there
but its there
fixed
you think its worth alligning that much
I would say that's slightly too high
its like 1 fucking pixel dude
ok i think i got it
😭
35 top does the spot
well
i think thats all
so
whats the process for submitting a plugin
How well does it work with other plugins like FavoriteGifSearch that adds a search bar right where your icon is?
hfnhnfhsbfdhnfnhdsfn THAT WAS IN THE BACK OF MY MIND WHEN I WAS CODING THIS YESTERDAY
hmmmmmmmmm maybe i could do some regex patching tomfoolery to find if favsearchbar added its search bar
That shouldn’t be needed, how are you doing it currently?
patches: [
{
find: "renderHeaderContent()",
replacement: [
{
match: /(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,
replace: "$1 $self.renderFavButton(this, $<searchComp>);$3"
},
{
match: /(,suggestions:\i,favorites:)(\i),/,
replace: "$1$self.getFav($2),"
}
]
}
]```
i just copied the code personally from the fav search
i just get the header and tell it to render the button
current code rn:
wait
ok
so
i think im starting to get the issue
basically
the header where the search bar is
it replaces the entire header's rendering system with its own
meaning it fucks mine up
ill try to see if i can add my rendering along side it, not override it
arghgrhagrhag
ill figure this out tomorrow
this patch seems to not be needed
and your first patch needs to be changed in a way that it's compatible to be applied with FavSearchBar
you could instead patch this place
and insert your button after this.renderHeaderContent()
but only if this.state.resultType === "Favorites"
kinda like this: children: [t, this.renderHeaderContent(), this.state.resultType === "Favorites" && self.renderFavButton(...)]
wheres this?
same module you are patching
taking another attempt
ok figured out how to get the module
ok i might be stupid and its patching in a new file but when i enabled favourite gif search, for some reason my patch gets overridden?
heres with fav gif disabled and mine turned on
i got a class soon irl so i gotta go
i hate my life what am i doing wrong here
i just want compatibility with another plugin
renderHeader() {
let {resultType: e} = this.state
, t = null;
return null != e && (t = (0,
r.jsx)(c.P3F, {
onClick: this.handleClearQuery,
className: v.backButton,
"aria-label": O.intl.string(O.t["13/7kX"]),
children: (0,
r.jsx)(c.whL, {
size: "md",
color: "currentColor"
})
})),
(0,
r.jsxs)(f.Z, {
align: f.Z.Align.CENTER,
children: [t, this.renderHeaderContent()]
})
}```
what am i doing wrong
there are no new lines in discord's code
fuck
dude i just want this plugin to be done
im so burnt
okay one last attempt
This goes for spaces too unless they're required to separate keywords
this still doesnt work
i give up bruh
hey if anyone wants to fix this one singular bug for me then heres the file ok bye forever i guess
im stupid 120%
since you're building off of a plugin, i think that using patches aisn't a good idea, but just adding the button to the args of the favgifsearch kinda works i think
no
accessing a plugin that did hte patches for me
specifically here:
const favGifSearchBar = Vencord.Plugins.plugins.FavoriteGifSearch;
if (!favGifSearchBar) return;
const original = favGifSearchBar.renderSearchBar;
favGifSearchBar.renderSearchBar = (...args) => {
const jsx = original.apply(this, args);
return (
<>
{jsx}
{this.renderFavButton(this)}
</>
);
};
}
kinda cursed becuase i don't like touching other peoples code but mmhamahm
holy shit what do you want your name in the credits to be
uhhh
i dunno really, i have a plugin coming up with me as Dev.haz but honestly you can say this one is all you king
nah nah i gotta give credit when's due
ok uh
now new bug
oh is there? tbh i did VERY minimal testing apart from going "ooh it's there"
that's how it looks like
oh you wanted that to happen?
it is called randomfavouritegifsend
i just wanted both compat
but that i kinda have a fix to, you'd just have to manage css or whatever
patches: [
{
find: "renderHeaderContent()",
replacement: [
{
match: /(children:\s*)(\i(?:\.\i)+\(\i(?:\.\i)+\))/,
replace: "$1[$2,$self.renderFavButton(this)]"
}
]
}
],
this patch worked but made it look weird, put it under the word "Favourites"
so just do some css or html nonsense and it should be fine?
but then i saw i assumed it was favourites only and scrapped it
ah wait its nearly 12 am
shit
well you can either fix it for me while i wake up tomorrow or just leave it to me
this was my procrastination from doing finals studying tbh i need to lock fr in RIGHT now
same sorta, i got a monthly exam tmrw about history lol
my finals start in a week so i guess i have the time, im being very proactive compared to my usual self
thanks haz
this wouldnt had happened if it werent for you :D
havent touched plugin dev in ages, if i make clone an upstream plugin into userplugins it favors the userplugin right?
looks like it, but wanna be sure
@hoary pilot rate hack
will be delayed but atleast it works
banger
Yes but I think that's just an implementation detail
it is deliberate and won't be changed
(but at the same time I don't actively test userplugin support, I really don't care about it)
How often do the pull requests get reviewed?
somewhere between 1 day and 3 years
dang i was JUST gonna ask that here
aughhhhhhhhhhhhhhhhhh
i just finished my exams and wanted to check in my pull request but nothing happened yet
strange tho other people's got done tho, i just thought they at least started by date
whether your pr gets reviewed is (recency bias bonus + how much V likes you + roll a D20 (1-19 count as crit fail))/2
nah nah you forgot to factor in the moon phase and the current orbital position of the earth to the sun (wait im pretty sure thats just a day in a year) and what galaxy currently is the smallest and what atom number 293712392713 in this universe has as its atomic size
add 0 * vee being in an adhd phase ? 1 : 0
man.
If I'm trying to fetch https://www.xivmodarchive.com/modid/123268?json=true, should this be all I need in my native.ts file?
import { ConnectSrc, CspPolicies } from "@main/csp";
CspPolicies["xivmodarchive.com"] = ConnectSrc;
xivmodarchive.com/ pretty sure
But Yes
o gotcha, that makes sense - thanks!
without /
actually what worked I think was www.xivmodarchive.com
Dang, the site's referrer policy prevents hotlinking rip
would I be able to like, upload an image from a url to the discord cdn and display that link?
what do u want to do
force stop discord and start it again
when u change anything in native.tsx
put an image from a url I retrieve from a fetch inside an embed
and what is ur proplem
also add ImageSrc
or something like this
index.ts: Lines 12-16
export const ConnectSrc = ["connect-src"];
export const ImageSrc = [...ConnectSrc, "img-src"];
export const CssSrc = ["style-src", "font-src"];
export const ImageAndCssSrc = [...ImageSrc, ...CssSrc];
export const ImageScriptsAndCssSrc = [...ImageAndCssSrc, "script-src", "worker-src"];
Yes, make sure you are using the correct one for your purposes
I do have
import { ConnectSrc, CspPolicies, ImageSrc } from "@main/csp";
CspPolicies["xivmodarchive.com"] = ConnectSrc;
CspPolicies["www.xivmodarchive.com"] = ConnectSrc;
CspPolicies["static.xivmodarchive.com"] = ImageSrc;
Without CspPolicies["static.xivmodarchive.com"] = ImageSrc; I was getting CSP errors, but I no longer get CSP errors now that I have that, I get that 403 error
dang, and the site owner said they wouldn't relax their referrer policy due to abuse :(
you can send fetch request from native.ts to bypass
no you're just retarded
you're rendering your sidebar entry instead of your panel
vencord_userplugins_panel
if you're sad after a week you might need to be put on a preventative watchlist before long
too bad i've been on one before

mine hasn't for 2 pensive,
so bad
write good DX
typesafe Vencord.Api.openSettings()
(Auto-response invoked by @atomic sierra)
I have a proplem in my own draw/doodle plugin I need someone to focus with me
video cuz im not really good at explain
rookie numbers 
vai what is 504 status code
A 504 Gateway Timeout status code indicates that a server, acting as a gateway or proxy, did not receive a timely response from another upstream server it needed to access to complete the request. This often points to network-related delays or issues within the server infrastructure, rather than a problem with the user's device or internet connection.
-# Response generated by gemini-2.5-flash. AI may be incorrect or misleading.
it doesn't fetch the site at all
only github
no api
makeeeeeeeeeeee
I'm having trouble with a patch for my plugin. Basically i want to add a third button panel to the voice chat controls tray. I made a patch and the regex works but it's not rendering. It's my first plugin and I don't fully understand how this works.
this is the patch
patches: [
{
find: "center-control-tray",
replacement: {
match: /(\(0,\s*([a-zA-Z0-9_$]+)\.jsxs\)\("div",[\s\S]*?className:\s*([a-zA-Z0-9_$]+)\.buttonSection[\s\S]*?)(,\s*\(0,\s*[a-z]+\.jsx[\s\S]*?onDisconnectCall:)/,
replace: '$1,(0, $2.jsxs)("div",{className: $3.buttonSection, children: [(0, $2.jsx)($self.myCustomComponent, {})] }) $4'
}
}]
The tray is a wrapper element that has two button sections and the disconnect button as it's children, i just want to inject a third buttonsection and render my component inside it.
I even added a console.log inside the custom component but it doesn't show up in the console like it never loadad, but when i open the webpack module, i see that the replacement worked.
look at Gameactivitytoggle
hold on, i think i am regexing the wrong thing. im surprised it didn't error
for matching variable names use \i
don't use [\s\S], discord's code has no newlines
yeah, i was writing the regex through crtl-f in vscode, now i found the patch helper in the settings
isn't [\s\S] equivalent to . 
tuff time neva last, only tuff peepol last
with the addition of matching \n, which dot doesn't by default but it's much better to instead just enable the dotall regex flag which does make dot match newline
interesting, I didn't think of that
also the react dev tools disappeared bruh, i even retoggled the thing in vc settings
press ctrl r
worked
im tryna wrap my head around MediaEngineStore, anyone got any resources on it?
tryna find a way to get incoming golive streams
this could also be the wrong place to look to try and kinda "intercept" an incoming stream
what is golive? is it screenshare?
yeah
is using a native file the only way to get past cors when making a post request
to what
do you control the server
no the discordsays domain
which link exactly
the most likely answer is no
I decided just to try with a native file but now im being hit with
TypeError: Cannot read properties of undefined (reading 'complete')
which is my native function im calling from index.ts
