#🧩-plugin-development

1 messages Β· Page 76 of 1

solemn scroll
#

like this?

tropic ice
#

yeah

solemn scroll
#

snake case is just an old habit cuz my mom is dyslexic and she prefers me to write with the underscores as its easier to read

humble tulip
humble tulip
#

I couldn't find it because I wrote it all as one word and discord search sucks

solemn scroll
#

are these libraries made specifically for vencord or is there documentation i can look at so i can stop bothering yall with dumb questions

fallen sandal
#

beyond the basics on vencord wiki just read other plugins

solemn scroll
#

and if there isnt documentation where is the source code? I dont like asking simple questions cuz someone has to take time out of their day to answer it 😭

solemn scroll
humble tulip
humble tulip
#

You're best off if you make it clear what you want to do with the question as most people won't wanna respond if it's too vague because you can't tell what you're getting yourself into lol

solemn scroll
#

I would still help them but some people got annoyed, i dont wanna annoy yall or anything

fallen sandal
#

i mean tbf discord is horrible as a knowledge base and searching is ass

#

not really your fault if you genuinely tried to search

solemn scroll
#

lemme show why the feature is kinda needed

#

so i have a couple foxes, but i cant delete any of them, (for the sake of example lets just say they are all different kinds)
one of them is a bunny, i realllyyy dont like bunnies, so even if i add a delete feature I would have to prioritze old or new, not being able to pick a specific one
the thing i want to add is making "profiles" for each cat, this way you can make a new cat, change a few settings like its speed or follow distance, and if you think you have too many you can pick a specific one and delete it

humble tulip
#

So you wanna add something that turns the setting for that one type back off when you click it or something?

solemn scroll
#

i dont know how to explain it well so im gonna try to make it in python

humble tulip
solemn scroll
humble tulip
#

Thank you

solemn scroll
#

ok finally finished with my basic little python program

#

so

#

oop

#

lets pretend this is the settings page
the dropdown at the top is the cats you can select
the value under that is the name
then speed
then distance
whenever i select something new in the dropdown, name,speed and distance have the values inside changed to whatever is saved
how can i make it so the values in entry boxes in the settings page also change to whatever is saved?

#

im pretty sure it would be pretty easy to find out how to run a function after the value in the dropdown changes, but once it changes the function will change the settings to something saved, thats what im going for rn

#

if you need a bit more detail feel free to ask! I cant tell if what im saying is vague

tribal sentinel
#

what would be the best way to go about making the gif search bar still show when looking at favorites

#

i use the bettergifpicker plugin but want to still be able to quickly access search

humble tulip
#

This is not a perfect example, just to get the idea across

#

You don't have to make the private setting the same as the component setting's key, you can refer to any private setting in there, I just wanted to be able to use the save on close thing

humble tulip
solemn scroll
tribal sentinel
#

i was trying to do that but im very new and still learning how to do patches and stuff lol

solemn scroll
dull magnet
#

you've been asking so many entry level questions

#

either learn better js first so you understand these concepts or try googling / asking ai (don't ask ai for code, instead ask it to explain specific things you don't understand (and not vencord specific things, but for example how imports work)) instead of always asking here

flint bronze
#

now is a good time to mention that AI won't help you with vencord's API

solemn scroll
dull magnet
flint bronze
dull magnet
#

if you don't even understand how imports work it's a good sign you're in the very wrong place and should improve your js skills first by practising on a normal project where you can find many docs / resources to help you

solemn scroll
flint bronze
solemn scroll
dull magnet
#

right click the thing that has red underline
quick fixes
import from "..."

dull magnet
#

this channel isn't for explaining basic IDE functionality to you ChocoStare

flint bronze
solemn scroll
solemn scroll
flint bronze
#

ohhhh

#

i totally glanced past that part

solemn scroll
#

yeah its hard to tell cuz the drop down menu covers the values as they change

flint bronze
#

you are not going to like the answer I have to give for this

solemn scroll
#

uh oh

flint bronze
#

does the list of options change?

#

or does that list stay the same

solemn scroll
#

im planning on reading the options from a list so it can dynamically change easier

#

a list of lists

flint bronze
#

okay

#

here is the bad news

solemn scroll
#

uh oh

#

oh man, you typing for a while this is some extra bad news 😭

dull magnet
#

you need to do the select yourself

#

settings api isn't meant for dynamic values

solemn scroll
#

So everything would have to be hard coded in?

dull magnet
#

no...

#

what you need is basically the same thing

#

dynamic list where you can add and remove entries

solemn scroll
#

ohhhh make the dropdown myself

#

instead of using the one built in

flint bronze
#

Lists/arrays in Vencord's settings have been faked as a string for the longest time
Proper support for them has only been added relatively recently, and that change is just for the underlying data, not the UI itself
Vencord has had plugins that implement settings lists for a long time, such as MessageTags. These plugins used DataStore (abstraction around IndexedDB) for data storage
These plugins have been migrated to store their data using the settings API, but the config editor is generally implemented using slash commands (for some horrible reason)
In other words; the settings API only supports half of what you're trying to do. You have to build the UI yourself

#

wait

#

what if i told you i lied (partially)

solemn scroll
#

😱

#

what was the lie

flint bronze
#

the lie is that that change was never actually merged into vencord

#

and is still a PR

solemn scroll
flint bronze
#

anyway you are going to have to implement the UI yourself, you can use a setting with the typee COMPONENT to add your own UI into the settings modal

#

see IPluginOptionComponentProps for the react props

solemn scroll
#

alr, wish me luck πŸ™

tribal sentinel
#

my patch test kept failing and it took me forever to realize the thing i used for the find was finding the wrong part of the code

#

but i can now say i've succesfully made a plugin

dull magnet
#

and maybe also this (why the hell are these separate lmao)

tribal sentinel
#

oh well, useful for learning anyways

hushed loom
solemn scroll
#

im gonna try Frankensteining the keyword notify plugin since it might work

humble tulip
humble tulip
humble tulip
swift delta
humble tulip
#

Yeah probably

steady knot
iron epoch
#

I'm yet again confused of this problem, discord for a weird reason made the implemention of the custom status modal in seprate module, so now it's insanely minified and have no idea how I could get it.

here a code that used to work

const StatsModule: { default: FunctionComponent<ModalProps>; } = proxyLazy(() => {
    const id = findModuleId("this.renderCustomStatusInput()");
    return wreq(Number(id));
});

const requireCustomStatusModal = extractAndLoadChunksLazy(["action:\"PRESS_ADD_CUSTOM_STATUS\"", /\i\.\i\i\)/]);

const openCustomStatusModalLazy = () => openModalLazy(async () => {
    await requireCustomStatusModal();
    return props => <StatsModule.default {...props} />;
});

and the module I should somehow find:

cedar olive
hushed loom
#

Yeah...

cedar olive
#

that module is just a wrapper with tracking, go one module deeper

topaz idol
#

hey, so I want to make a plugin to allow listening music together just like with Spotify but for other music apps (MusicBee in my case)
so I already made a plugin for MusicBee that locally hosts a Rest API to allow interacting with the app, but now I need to actually interact from the Vencord plugin
by searching in this channel, I learned that the RestAPI interface (or class ? I am quite new to web development sorry) could do this so I tried using it and after many iterations, I almost got it working by using it like this:

    await RestAPI.get({ url: "http://localhost:9696/musicbee/currenttrack" })
        .then(function (res) {
            logger.info("Received response: " + res);
        })
        .catch(function (error) {
            logger.error(error);
        });```
but I still get an error that I just can't figure out how to fix:
```Error: Parser is unable to parse the response
    at N.<anonymous> (web.73eff6d8aaee3274.js:12:1813040)
    at t.emit (web.73eff6d8aaee3274.js:1:1248307)
    at XMLHttpRequest.<anonymous> (web.73eff6d8aaee3274.js:12:1817094)```
every other Vencord plugin that uses RestAPI uses it to interact with Discord's API, so do I need something else instead because I don't interact with Discord ?
topaz idol
#

I can't believe it was just that easy hahaha

#

anyway thanks

dull magnet
#

make it a website

#

you can send someone a link that they can join your session with

clear parcel
#

nah just use the official activity invite stuff

#

specify the PLAY and SYNC flag

#

ez integration

topaz idol
#

the point in making a plugin instead of a website is that it is integrated within discord just like for spotify, and also I want to avoid having to host a website for this
however using the activity invite stuff from the musicbee plugin might be exactly what I need actually, like I still want to add a button with a vencord plugin but most of the listening together thing can be done outside of it

dull magnet
#

I suggested to have it outside of discord so it's more versatile

#

I wanted to make something like this ages ago

Generic listen along that works with a multitude of players and doesn't depend on smth like discord

iron epoch
dull magnet
#

dont hardcode export names

topaz idol
#

it's just that in my case I wanted to make that thing just for me and my friends, like I didn't really planned to do a fully working service or anything even though that would be amazing yeah

iron epoch
dull magnet
#

yeah you cant find it lol

#

need to to do something else

inner monolith
#

well, my #{intl::ACCOUNT_A11Y_LABEL} broke again :D

lament onyx
#

I'm trying to create a new plugin for Vencord. My code doesn't seem to have any issues, but when I place it in the userplugins folder and build Vencord, the Plugins tab doesn't appear. However, when I remove my plugin, Vencord works fine. What could be causing this?

#

there no errors in the build

vast karma
#

What about errors in devtools console

oak sundial
#

password lock

that's a false sense of security just logout or lock your pc bruh

hushed loom
lament onyx
hushed loom
oak sundial
#

just logout

lament onyx
#

there was password locker for chat in vencord but the dev deleted it idk why

oak sundial
#

This will never be accepted and had been denied multiple times

lament onyx
flint bronze
oak sundial
#

because this doesn't address the fact that they could just unpatch Vencord or just use discord web

lament onyx
#

they dont know how to unpatch vencord and i dont login on discord web 0_0

oak sundial
#

like... this is not secure at all and has already been denied unless you seriously want to maintain unsecure garbage just dont

lament onyx
#

bruh u dont understand me

lament onyx
#

alot of people asked for it thats why am trying to make it

flint bronze
flint bronze
oak sundial
lament onyx
#

so i should put permission for the apps they will use and that will take alot of time

oak sundial
#

this doesn't stop anybody from snooping

lament onyx
#

how? discord is locked they cant do anything

#

they cant access the chats or anything on discord

#

and it will be a unofficial plugin

flint bronze
#

there is a reason every attempt at making this gets abandoned

flint bronze
#

thats still logging out fr

lament onyx
#

nah not token hider func

#

its just a plugin that ask for passcode like ur phone to continue

flint bronze
#

i know

lament onyx
#

better discord made it and look how many people used it

#

129k downloads

flint bronze
#

129k people with a false sense of security

lament onyx
#

i made better one

#

its just annoying to login after family or friends sit on the pc

#

everytime

flint bronze
#

sure. make it. just don't come back complaining your family found a bypass for it

lament onyx
#

bruh why they will find a bypass

flint bronze
#

do you even have proof that they will try to access your discord

lament onyx
#

for me?

#

yea alot

oak sundial
#

i made better one

You don't address devtools, the fact that the password is stored in plaintext in the settings file, the fact that vencord can just be unpatched, the fact that they can just use your browser which you are likely logged in to anyway.

oak sundial
#

If you actually care about people snooping, just log the fuck out and log back in using your phone in 10 seconds

flint bronze
#

there is honestly a higher chance of your family or friends accidentally installing malware that steals your token lol

#

this is an actual threat you should account for

lament onyx
#

there an antivirus on the pc

oak sundial
#

This will be denied as an official plugin for multiple reasons, will not be listed in #1256395889354997771 for other reasons and you are going to have to maintain this entirely

flint bronze
#

you are still screwed if the antivirus detects the malware after it already sent your credentials for literally everything to a remote server

lament onyx
lament onyx
oak sundial
#

No, but this is a false sense of security for everyone and you're going out of your way to make a literally worse solution than just logging out

lament onyx
#

okay okay is there a way to make it for my self

#

?

flint bronze
#

yes you can make it no we wont help you fix bugs or issues with it

oak sundial
#

And i don't think anybody here wants to support you making a fool of yourself with a shitty plugin that is not safe in the slightest

flint bronze
#

go look for the existing solutions

lament onyx
#

why r u mad xd

#

i just asked for support

flint bronze
#

because its a terrible idea

#

okay

lament onyx
#

u wont support me then dont talk to me

#

its that easy

#

just dont be mad for nothing

flint bronze
#

it is a liability issue for vencord to support the functionality built in

lament onyx
#

i just wanted it for my self

#

i didnt want to make it in public

flint bronze
#

again

lament onyx
flint bronze
#

if you want to make it, make it. don't come crying to us when your little brother went on your account and posted scams

hoary pilot
#

50$ steam gift card

lament onyx
#

i didnt cry

#

u just mad for asking for support

hoary pilot
#

yapppppppppppppppp

lament onyx
#

u the one whos crying

flint bronze
#

nuh uh

oak sundial
flint bronze
#

you are crying

hoary pilot
flint bronze
#

inb4 no support role

oak sundial
#

like don't listen to reason and then get really mad then i guess?

#

Β―_(ツ)_/Β―

#

Going through all the effort to develop a plugin that is unsafe to save yourself 10 seconds to do the actual safe method? 😭

flint bronze
#

signing into discord isnt that hard

#

it is possible to get comfortable with workarounds to annoying things

oak sundial
#

you can do it from your phone and bypass 2fa so it literally takes no extra time

flint bronze
#

^^^^^

#

the only annoying thing might be that some local settings would be reset like folders being all closed but its whatever

hushed loom
#

Hash token as well

#

So localstorage can't be inspected on disk

flint bronze
#

just locally?

oak sundial
flint bronze
#

yes

#

idk why discord is the thing that must be hidden

hushed loom
#

Not hash

flint bronze
#

there is a 99% chance that they have their discord password just stored in their browser too

oak sundial
#

mmm

hushed loom
flint bronze
#

yes great advice

oak sundial
#

theres 1000 actually good solutions that aren't literally just css infront of your discord

flint bronze
#

wait

#

did that use a modal?

hushed loom
#

Have to login every time

flint bronze
#

no it didnt

flint bronze
oak sundial
#

i never had that issue

flint bronze
#

skill issue

#

are you on windows

#

or does your vesktop have a system provided titlebar?

#

WHAT DO I EVEN MEAN SKILL ISSUE

#

THAT IS THE OPPOSITE OF A SKILL ISSUE

hushed loom
#

Love the keyboard auto suggestions

oak sundial
#

lol

dry reef
#

is using querySelector bad? as in is discord likely to change the element classes?

#

im new btw so if its absurd, js tell me cryingsobcry

flint bronze
#

You really don't want to be doing DOM manipulation in a Vencord plugin

#

Discord uses React for almost everything

#

also discord can and does change the element classes

#

what are you trying to do?

dry reef
# flint bronze what are you trying to do?

im tryna make a plugin where it shows which image number youre on (out of the 10).
my original idea was to get the src of the current image, find which message it originiated from, and check the index of the attachment among its sibling attachments. i was gonna querySelector("div.slide_fd65ff") and extract the src from there, but since you said not to use it, im not sure what to do

flint bronze
#

where are you trying to display the image number in the UI?

dry reef
#

top right of the image

flint bronze
#

there are 2 different designs for the image modal

#

are you using the old or the new one

dry reef
flint bronze
#

(is there a bottom bar with buttons, or are there text links below the image)

dry reef
#

is this new or old?

flint bronze
#

old

dry reef
#

oh

#

how do i get the new

flint bronze
#

okay

#

do you want imagezoom to work

dry reef
flint bronze
#

stay on the old design

#

(if you wanted to use the new design, set this experiment to treatment 1)

#

i need an example hold on

#

can you post a message with multiple images?

flint bronze
#

these are some crazy images but they'll do

dry reef
flint bronze
#

do you have react devtools enabled?

dry reef
flint bronze
#

wait what

dry reef
flint bronze
#

good way of thinking tbh

dry reef
flint bronze
#

using react devtools, usually you'll want to use this to find and select a relevant element

#

do not use the button above, this is for the actual elements rendered in the DOM, not react components which contain what we are looking for

dry reef
#

okay.

flint bronze
#

then you want to explore the parent components

#

in this case I already found the component that has the current image number as a prop

#

hold on...

#

this isnt as simple as I initially thought

#

do you understand react?

dry reef
#

ive forgot some things like refs though

flint bronze
#

this is weird

dry reef
#

whats up?

flint bronze
#

the component i am looking at in react devtools makes me question how discord designed this

#

this component has an initial startIndex prop and an array of items

#

there is a state hook that for some crazy reason does not contain the current index but instead contains an array of relative page changes????

dry reef
#

did you open the image modal then click on the image?

flint bronze
#

it's a parent of the image, specifically 2 parents above the div where the key is the url

#

there is supposed to be some animation here

#

but they reset the CSS before it actually does the animation

flint bronze
dry reef
#

lmao

flint bronze
#

look at the elements tab for yourself

#

watch the style attribute change

dry reef
#

πŸ’€

#

the state i circled is equivalent to the current image index. (ill double check)

flint bronze
#

i havent tried to understand what those are used for yet

#

oh?

#

btw

#

if you set a transition css value

#

it actually works

#

though the old image just disappears

dry reef
#

also yeah, that state is the current image index

#

how do i get the state?

flint bronze
#

view the source of the component

dry reef
flint bronze
dry reef
flint bronze
#

you would probably need to find the state and pass it to this component

#

and then edit that component

#

using a patch

#

tl;dr: patches are regex find and replace on discord's code

dry reef
flint bronze
#

why is there a state and a ref though

inner monolith
dry reef
flint bronze
#

that's react doing react stuff

#

what is this callback for?

dry reef
#

The current index of the image

dry reef
#

Not really callback, sorry.

flint bronze
#

yes I know

#

i wouldn't worry about it being called many times

#

thats just react

#

what you should worry about is hardcoding the variable name if you make a patch

#

i haven't really explained patches have I

#

it's quite annoying to explain

#

what you need to know is that find is a unique string inside of the current webpack module (the number: function ... defines a module)

flint bronze
#

yes

#

and also there are fake regex macros implemented that get evaluated by the patcher

dry reef
#

if so, im good on that stuff. thumbsup

flint bronze
#

the \i

#

not the $&

#

thats actual regex

#

there is also code to convert old human readable translation keys to discord's new system that uses hashed keys

#

for the replacement value, you can reference your plugin object using $self

dry reef
flint bronze
#

What do you mean by multiple strings?

#

Multiple find and replace entries in the same module is possible

#

Just set replacement to be an array of objects

dry reef
flint bronze
#

find should usually be a string but it can be a regex

#

your find should be unique

#

if you haven't already done this, set up a dev build and build with the pnpm watch as that adds the DevCompanion plugin

flint bronze
#

also enable ConsoleShortcuts

dry reef
flint bronze
#

adds a lot of aliases and extra functionality to Discord's window object for you to use

dry reef
flint bronze
#

yes

dry reef
#

nvm had to wrap in forward slash

flint bronze
#

HORROR

hushed loom
#

Will that even change anything

flint bronze
hushed loom
flint bronze
#

true

hushed loom
cedar olive
#

nop

#

if anything it's slower

hushed loom
#

Delete and save one byte blobcatcozy

#

Best optimization ever

cedar olive
#

(too used to writing lazy wildcards so I ended up doing there too)

dry reef
#

tysm for ur help

#

for ui, how do i add components

dry reef
flint bronze
#

you said you want to render that in the top right of the image earlier?

dry reef
flint bronze
#

just drop a breakpoint

#

GUH

#

okay

#

that points to something modified by imagezoom and dynamicimagemodalapi already

flint bronze
#

yes

hushed loom
flint bronze
#

ughhhhhhhhhhhhh

#

you need to patch that in 2 places

hushed loom
#

(Its cursed that it even has to be a thing in the first placr()

flint bronze
#

for images and videos

#

there was a time that it didnt exist

#

so sleepy

#

anyway; you need to pass down that value to whatever component contains the container for the links at the bottom, then inject your own container at the top

dry reef
#

what does Invalid destructuring assignment target mean when patching?

vast karma
#

It either means your patch is malformed or that it produces invalid code, depending on the stack trace

cedar olive
#

also means you probably wanted to patch some props of a react component and ended up matching a destructuring assignment instead

hushed loom
dry reef
#

the error

#

and console

#
{
    find: "let{messageProps",
    replacement: {
        match: /(roleIcon:)(\i)/,
        replace: "$1$self.alterRoleIcon($2)"
    }
}
#

mightve found the issue (one sec)

hushed loom
#

That's invalid JS syntax

dry reef
#

my function call?

hushed loom
#

You are matching a destructing assignment

#

The only valid thing after the colon is an identifier

#

If you want to change the value, you need to change it after the assignment

dry reef
#

ty

dry reef
#

Next to the summaries / somewhere on the toolbar

#

I've done the patch so far, but is there a specific way to make the icon/button

dry reef
mint dagger
#

how tf do i stop the ui from fuckin updating since it triggers on mouse hover and when i use the debugger react dev tools shits itself

#

is there any other way to stop the ui from updating without react dev tools dying

flint bronze
#

you don't

tawny bobcat
#

Hey! I was working on a custom plugin, and was wondering, how I can go about adding a custom context menu to each of these buttons? I've searched this server and couldn't really find an answer. I was wondering if it was like the message decorations? or if there's another way to do so.

dry reef
flint bronze
#

i am a bit busy right now

#

i will help you when I am done with what I am working on (hopefully not too long)

flint bronze
#

ok the thing i am trying to do is Just Not Working for Literally No Reason

#

NO

#

I AM JUST DUMB

#

this code sucks btw you dont need to tell me

humble tulip
dry reef
#
                 <Menu.MenuItem
                            label={`Duration β€’ ${
                                timeframeMessage ? timeframeDuration : "N/A"
                            } `}
                            id="duration"
                            action={() => console.log("hello word")}
                        />```

when i pass an `action` prop, i get this error when i click on the menu item. anyone know the fix?
tawny bobcat
#

One more thing, is there a way to listen for when the user navigates somewhere else? Like to a different channel?

proud parrotBOT
quasi pivot
#

hey, is it possible to patch the same function that is patched by another plugin? I am trying to make a function that runs when I connect to a vc (using the calltimer plugin as an example) however it only works when I have the calltimer plugin disabled

vast karma
#

Of course it is, the patcher knows nothing about functions or anything

#

Just have to squeeze around your replaces to they don't conflict

quasi pivot
#

is there a way for me to see the output of the patched string? I took this from the calltimer plugin which works when I have calltimer disabled of course but I don't get how I am suppose to patch it a second time to include my function since calltimer takes priority

    patches: [{
        find: "renderConnectionStatus(){",
        replacement: {
            match: /(renderConnectionStatus\(\){.+\.channel,children:)(.+?}\):\i)(?=}\))/,
            replace: "$1[$2,$self.func(this.props.channel.id)]"
        }
    }],

    func(channelId) {
        console.log("Channel ID:", channelId);
    }```
vast karma
#

Patch helper

quasi pivot
#

wow ok yeh I don't know why I didn't try pasting the json in there but that works, thanks

dull magnet
quasi pivot
#

ok yeh so I just need to make sure it works both with and without the calltimer plugin which should be doable now that I can see the modified code

random grove
#

Hello I'm trying to follow that https://docs.vencord.dev/plugins/ to create custom plugin.
I did a dev container on vscode with each extension I need but I do not get that:
"Save your file and it should automatically format it and insert the following license header on the top."
And I've errors on the code..
Idk what to do, I follow each part of the explain

Vencord Docs

How to create plugins for Vencord

dull magnet
#

did you pnpm i

random grove
#

yes

dull magnet
#

well something is wrong on ur end

#

check for errors in extension output and such

random grove
flint bronze
random grove
#

oh I'm stupid I've open vscode on /userplugins not at the root 😭 thanks lol

flint bronze
random grove
#

Ok I did as I said on the explanation in index.ts
After building and reloading vesktop (after changing the path to the one where I made my plugin), shouldn't I show it in the list of plugins? It's not there 😦 Or should I add some code already ?

random grove
#

Yep I did it with pnpm build

dull magnet
#

you need to fully restart vesktop

#

not ctrl r

flint bronze
#

i was just about to say that

dull magnet
#

fully close it from tray then relaunch

random grove
flint bronze
#

(this is just because of the path change)

random grove
#

with this button

flint bronze
#

what

#

no

#

wait

#

that should work?

#

unless something crazy is happening

random grove
#

Do I need to do pnpm inject after build ?

flint bronze
#

no

#

you're on vesktop

random grove
#

mmh

flint bronze
#

thats not relevant

random grove
#

I just restart my computer and it's working mmh, discord didnt wanted to restart probably

random grove
#

Is it possible to change the status like put DND or online directly ? I found nothing about it

tribal sentinel
#

i think one of the pinned messages is about that

#

here

#

@random grove see the message i replied to

#

am i correct that turning a plugin off does not disable any css from the plugin

#

thats the behavior im getting

#

not really an issue, just my fault for not using unique class names lol

tired burrow
#

okay who is vencord smat to place things on the screen

tired burrow
#

i'm making spotifyControls but for YTMD

swift delta
tired burrow
#

did all that it pops up in settings and logs the current song playing in the console with provided apikey from settings

#

but idk how to inject the player to popup on the screen thats all i need help with

#

if there is a way i can share all my code 3 files send me a way to and you can look at it if you want

swift delta
tired burrow
#

it's actually 6 files but 2 of them are just css

dull magnet
#

@tired burrow

#

ai can't write vencord plugins

past jackal
#

how would i replace any specific characters that i want into one specific character

#

and by that i mean

#

anything at all

#

a message, a channel name, description, username, anything

vast karma
#

Custom font

amber basin
#

when will someone make a plugin that f2 on dms changes friend nickname

#

actually full vscode keybinds plugin

hushed loom
tired burrow
dull magnet
#

it's either ai or you making up random code expecting it to work

#

and I highly doubt it's the latter

#

don't use ai

tired burrow
#

I didn’t use ai I legit am just trying to copy the SpotifyControls

dull magnet
#

then don't make up random code

tired burrow
#

So then exactly what do I do

dull magnet
#

how did you come up with .accountProfile- or (?<=createElement\(.+?.createElement\()[\w$]+,{username:?

#

patches patch discord code

#

discord code does not contain .accountProfile- anywhere

#

nor does discord code use createElement

tired burrow
#

Well I was just trying stuff okay

dull magnet
#

you need to read, reverse engineer and understand discord's code

#

using tools like react devtools to find the right code for components

#

then you need to come up with a find (a unique string used to match the module ("file") the code is in), and then do a simple regex replace

vast karma
swift torrent
#

I wonder if i could use websockets to do something like the spotify plugin but for yt music and communicate between a chrome extension and the plugin

tired burrow
#

No way you are doing what I’m doing

swift torrent
#

just setup the workspace

#

and thinking the best way to do it

rocky lynx
#

Im working on a very silly and cursed plugin with a friend

#

Basically when you start the plugin for the first time you have to take an iq test and it adds a badge next to your name in chat with your iq for everyone with the plugin

tired burrow
#

now i/m legit copying the code frrom spotifyControls and changing it to work with YTMD

swift torrent
tired burrow
#

It shows the first song you are listening to when you restart your client but doesn’t update properly for some reason

swift torrent
tired burrow
#

And I made it to the airport, but her flight is delayed a whole hour and a half stupid as hell

weak haven
#

Or you want to do it urself for a challenge blobcatcozy

No pain no gain

tired burrow
#

But if you use YTMD which I’m doing it will be way better

humble tulip
#

I may be bullshitting but I vaguely remember someone mentioning you can enable YouTube music rpc via some chrome API

#

I don't remember exactly what but I'm fairly certain it was said here

grand haven
#

premid is by far the best solution for this i've found

#

ytmd lacks a lot of features i want, that i made via userscripts

#

but none of them have forcing audio only mode regardless of availability, via HLS

humble tulip
#

I'll just stick to spotify

swift delta
grand haven
#

everywhere else gets fucked over by copyright and region restrictions, their radio also sucks

#

its also exponentially harder to mod and bypass ads

humble tulip
#

I'm in the UK so I'm generally good for those things as well thankfully

tired burrow
#

I AM CLOSE

#

it shows the song now

#

it is very very broken

tired burrow
#

@humble tulip @swift torrent hehe i'm close

hallow tiger
#

How should I define i18n in developer tools and how should I search for it? I couldn't find any sources.

vast karma
#

There's a function for getting the hash for a key

humble tulip
#

runtimeHashMessageKey("MARK_AS_READ")

hallow tiger
humble tulip
#

Oh I guess you need consoleshortcuts enabled

hallow tiger
#

thx a lot

#

I've been looking for this for 2 days

humble tulip
#

If you're looking to use it in a find you can also do #{intl::MARK_AS_READ}

cedar olive
violet burrow
#

Hello, does some people knows how to make a Markdown Formatter componenent via findByProps or via Vencord library ?

#

I can't find anything about markdown formatting

violet burrow
humble tulip
#

I think there's a Parser exported in Vencord somewhere that does that

violet burrow
proud parrotBOT
violet burrow
#

Webpack/common tho

#

Ah, little problem

flint bronze
#

theres more arguments that can be passed

violet burrow
#

Does someone know how to make like Summary and Details in Discord component way ?

vast karma
#

Check channel groups

#

They're collapsible

violet burrow
flint bronze
violet burrow
violet burrow
#

Wait

#

test

violet burrow
#

I made my own, but thanks

flint bronze
dull magnet
#

but good luck

flint bronze
#

Unless Discord did something normal

dull magnet
#

I mean applying filters to people in vc

flint bronze
#

I know it would work on the desktop client for your own voice being sent to other people

#

Because Discord is actually working on that for some insane reason

dull magnet
#

yes for them it's possible

#

for plugins probably no

#

it's all native

violet burrow
violet burrow
flint bronze
violet burrow
#

Maybe less text, and more <br /> lol

flint bronze
#

Do you have the actual logic working?

violet burrow
violet burrow
flint bronze
#

fire

violet burrow
#

the only thing we need now is to apply the voice, but since discord didn't pushed it, we cant

#

Ntts said it could be the next best vencord plugin lol

flint bronze
violet burrow
#

i'm putting tutorials on how to train custom voice model

flint bronze
#

Do you have working custom voice filters?

violet burrow
#

they do not apply to vocie actually

flint bronze
#

why not

violet burrow
#

but yeah

#

they exist

#

and are pickable

flint bronze
#

these look like the official filters though

violet burrow
#

@silk sorrel is also coding on this

#

And yeah there is a fancy voice filter managment menu

#

and a fancy button :3

#

Less <br />

dull magnet
#

but adding it without that would probably be impossible

violet burrow
dull magnet
#

do you actually have to wait

#

if they already pushed the code it should be usable

#

probably

#

voicemessage plugin also uses a feature of discord_voice that discord doesn't even use

violet burrow
#

empty json object

dull magnet
#

try adding smth

#

why does it matter if its empty

violet burrow
silk sorrel
violet burrow
#

It is going to look insane

violet burrow
#

And its hard without the catalog to determine the models object structure

#

But we know where models are going to be downloaded so we managed to download in the same folder

dull magnet
#

decompile it and see if you can bypass it

violet burrow
dull magnet
#

is it windows only

flint bronze
#

probably

violet burrow
#

Actually there is a way that we can use it on Linux

#

and da plugin knows when ur not on da desktop app Smirk

silk sorrel
flint bronze
violet burrow
flint bronze
#

you can just not include the plugin on web platforms by adding .discordDesktop suffix to the plugin dir name

violet burrow
dull magnet
#

do you need rollout or smth

flint bronze
violet burrow
dull magnet
flint bronze
#

yeah that was what I was trying to say i just worded it badly

violet burrow
violet burrow
violet burrow
dull magnet
#

no

violet burrow
#

Its Named Flamingo

#

It adds this menu

flint bronze
violet burrow
#

Since amia gave me the snippet to show the actual voice, i'm playing around with da VoiceFilterStore

flint bronze
#

what do the different treatments do

violet burrow
#

At the moment we don't know

#

I assume this is a menu thingy

silk sorrel
#

Currently they're identical in what they allow

tired burrow
#

Fr def needs work tho ai gave me the idea to do it when I asked for ideas for stuff to do with vencord since it knew I used YTMD api before alot

flint bronze
silk sorrel
#

πŸ€”

violet burrow
#

bucket does not exists atm

flint bronze
#

it does on canary

#

do i pull out the windows vm

violet burrow
violet burrow
#

this removes the menu

silk sorrel
#

It is changed in the commit

violet burrow
#

this actually removes da experiment

flint bronze
#

LAME

violet burrow
#

oh wait

silk sorrel
#

😭

violet burrow
#

@silk sorrel

#

do you think this is unlocking the catalog ?

flint bronze
#

horror

#

i just considered

#

discord will 100% api lock the official filters

violet burrow
#

Thats Why is not available Vesktop

#

and web clients

grand haven
#

i feel like making a bypass for it is gonna be as easy as bypass for soundboard

grand haven
flint bronze
#

guh

grand haven
#

the soundboard free nitro version is just playing it over microphone

#

not 1:1 the same, but it works

flint bronze
#

thats not even in stock vencord afaik

grand haven
#

nope

#

it would probably wait 6 months for merge

#

so never pr'ed it

flint bronze
#

WHY

#

JUST PR YOUR STUFF

#

AND MAINTAIN A BRANCH FOR PERSONAL USE

grand haven
#

why, it never gets accepted

#

i wont wait 5 months, fuck you

flint bronze
#

i will use

violet burrow
grand haven
flint bronze
#

ok you lied

violet burrow
flint bronze
#

you just dont like using git branches

#

nvm

#

im confused

#

you just dont push code

#

😭

violet burrow
#

not right now because i dont want to

grand haven
#

the soundboards are just sound files, so you just download them and patch getUserMedia to merge it with an audio context into one output, then play the files into the audio context

violet burrow
#

but using an external program and interact with to play the result over mic sipmegumin

flint bronze
#

@grand haven please just push your code

#

idc if you pr it or not

grand haven
#

and in the same way you'd patch getUserMedia to play files, you can patch it to modify the outgoing audio

#

just pushing the data tru a LLM is a bit more complex

#

since delay

#

but its doable

#

i did data reading for audio visualizers in browser, just need to push modified data

violet burrow
#

and onnx is known for performance ISSOU

violet burrow
#

is it impossible to make a new setting menu, or just nobody is coding settings this way

yeah i know, for plugin settings, this is in plugin section

humble tulip
#

But yeah just nobody does it

violet burrow
violet burrow
#

interesting

violet burrow
#

wikiiii

violet burrow
humble tulip
#

suffoPeepoShrug I imagine most people don't know it's an option

#

Or just don't have a use for it

violet burrow
#

is there any criteria to be an official plugin ?

#

according to this

#

its off

humble tulip
#

That's just for people making requests for plugins, you can still submit plugins you've made

violet burrow
#

I wonder if submitting my plugin now is useful or not

humble tulip
humble tulip
violet burrow
#

No simple slash command plugins like /cat. Instead, make a user installable Discord bot βœ…
No simple text replace plugins like Let me Google that for you. The TextReplace plugin can do this βœ…
No raw DOM manipulation. Use proper patches and React βœ…
No FakeDeafen or FakeMute βœ…
No StereoMic βœ…
No plugins that simply hide or redesign ui elements. This can be done with CSS βœ…
No plugins that interact with specific Discord bots (official Discord apps like Youtube WatchTogether are okay) βœ…
No selfbots or API spam (animated status, message pruner, auto reply, nitro snipers, etc) βœ…
No untrusted third party APIs. Popular services like Google or GitHub are fine, but absolutely no self hosted ones βœ…
No plugins that require the user to enter their own API key βœ…
Do not introduce new dependencies unless absolutely necessary and warranted βœ…

violet burrow
#

shoot, there is some symbolic folder

#

@humble tulip doc, is it ok to put a symbolic folder ?

hushed loom
#

its gitignored for a reason

violet burrow
#

i just have to move it

#

and replace Dev constants

hushed loom
#

just git rm --cached src/userplugins

violet burrow
violet burrow
violet burrow
#

let anyone see it meguCry

#

Adding a comment in the modal which explains that the Voice Filters are in rollout, but that they can still create and download Voicepacks. In this case, the plugin has no reason to be in draft.

rocky lynx
#

how do i go about finding and using discord components? i want to use this part from the audio player embeds in part of my plugin.

violet burrow
rocky lynx
#

i guess this is going to be alot harder than i initially thought

violet burrow
#

i guess its a simple audio

#

a simple <audio>

#

maybe i can create a component for u

#

@rocky lynx

#

wait

#

im gonna sleep

#

cya

#

tmrw

tired burrow
#

currently have this

violet burrow
violet burrow
#

Mac are compatible with vocie filters

#

unfortunaly, linux are not

#

but good news!

tired burrow
#

100 times better

violet burrow
#

are tou

tired burrow
#

long song names even scroll

violet burrow
#

do you know a plugin already exists ?

tired burrow
#

what one

violet burrow
tired burrow
#

LMFAO

elfin geyser
#

hmm... seems like its for spotify :|

tired burrow
elfin geyser
#

i want youtube music!

violet burrow
#

interesting

elfin geyser
#

(i helped a small portion of it)

violet burrow
tired burrow
#

how does it look so far

humble tulip
#

smh this update broke my reorderattachments pr and I don't know why

elfin geyser
#

flippin react saying im logged in when im not really

humble tulip
#

The drag and drop still works but changing the attachments array doesn't propogate back anymore

#

lol nvm it was me that broke my userplugin version of it, PR is still fine suffoPrayge

violet burrow
silk sorrel
#

How do I ensure that multiple modules (not available when discord starts) have been loaded and that I can use them?

#

Also, is there a specific component that discord uses for rendering message markdown (returned by Parser methods), or should I just use Text?
it looks nearly identical but message components like codeblocks have messed up styling

tired burrow
#

PTB discord doesnt work with the plugin

violet burrow
tired burrow
#

why doesnt it auto update in discordPTB but it works in normal discord

violet burrow
humble tulip
tired burrow
#

i'm saying when i pause the song the player just gets frozen but it auto updates and continues to work on normal discord

humble tulip
#

Obviously use a find for the css class rather than that actual string though

tired burrow
tired burrow
# violet burrow I dev on ptb

well i say it's broken bc canary and normal discord work normally fine with it the plugin loads instantly when i pause the song it doesnt freeze

#

see

#

broken i told YOU

violet burrow
tired burrow
#

Da console shows the current song

tired burrow
#

as there is no real error

#

@violet burrow PTB VS Normal

violet burrow
#

Idk

#

Maybe your error handler component does not the console error

tired burrow
#

it does bc i can force it to error on my main client and it will show one

silk sorrel
violet burrow
silk sorrel
#

that works, but I also need to pregenerate some objects based on the modules' exports πŸ€”

violet burrow
violet burrow
#

voice filters are going to be crazy !

hardy adder
#

whar

dry reef
#

What does ErrorBoundary.wrap do?

honest stump
#

prevents the client from shitting itself basically

#

in case of an error of course

dry reef
#

Gotcha, ty.

tawny bobcat
#

hey, I was wondering how I would go about caching / "fetching" the first 75 threads in a channel?

hushed loom
violet burrow
#

noow that i enabled this, how i can use it ?

vast karma
#

By restarting and opening devtools

violet burrow
#

ah yeah thanks

floral eagle
#

I want to create my own modded Discord using Vencord's infrastructure. Do I need to add Vencord's GPL-3.0 license to the new plugins and pages I create, or should I add the GPL-3.0 license with my own application name and author identity?

dull magnet
#

normally how you do it is

/*
 * This file is part of [YourProjectName]
 * Copyright (c) 2024 Vendicated and Vencord contributors
 * Copyright (c) 2025 Your Name
 */
#

you add both

#

keep our header line then add your own below it

floral eagle
#

oh thx this information

violet burrow
#

yay, we need to waiiiiiit

quasi pivot
#

I successfully made a patch but I found out the function runs every few seconds so I either have to make it so my function only runs once or find another function that only runs once (which would probably be the better option but I will probably just use the first option since the plugin I am making is only for 1 server with a very niche purpose)

here is the patch in case it's useful to anyone else

patches: [
    {
        find: "renderChannelButtons(){let{channel",
        replacement: {
            match: /(let c=eg.default.getId\(\))/,
            replace: "$1;$self.func(this.props.channel);"
        }
    }
],

func(channel) {
    console.log("Channel Name: " + channel.name + "\nGuild ID: " + channel.guild_id);
}```
violet burrow
#

personally we made a few modifications in our plugin

fallen sandal
violet burrow
#

we just wait for discord to release voice filters

#

@silk sorrel added the tooltip and the settings button

fallen sandal
#

discord is adding voicemod into their app??

#

horror

violet burrow
#

@inner loom made the models by exporting them

#

and i did the open folder button

violet burrow
violet burrow
fallen sandal
#

how does it work

#

the voice stuff

hardy adder
#

i hate voicemod so alternatives are always a plus

#

maybe you could implement a voice eq plugin off this

#

for more basic voice modulation

#

idk the demand for that tho

#

people probably just want to sound like an e-girl or god himself

#

or donald trump

sick spear
#

i noticed capitalization in some plugins' options are inconsistent, is this a stylistic choice?

#

ill fetch an example in a moment

hoary pilot
#

not intentional but irrelevant

sick spear
#

so i should or shouldnt make a typo pr?

hoary pilot
#

don't, its very small

dull magnet
sick spear
#

on the lastFM plugin

#

it's nothing major just wanted to know if you wanted someone to do housekeeping

humble tulip
#

I have a PR open to add display names to settings, tidying these up could probably just fall under that too

clear parcel
violet burrow
#

HOW

#

Can you give me the final string ?

#

@silk sorrel !

clear parcel
violet burrow
#

Actually I can't have this result for now

clear parcel
violet burrow
humble tulip
hoary pilot
flint bronze
hushed loom
#

really cool

humble tulip
flint bronze
#

Not the first time I've heard this

#

but I don't know what experiment you are specifically talking about

humble tulip
#

2022-12_timestamp_tooltip I believe

#

You have to type a timestamp out first but then you can click it in the chat box and it does that basically

flint bronze
#

Thats neat

#

getting the tooltip to appear is a bit buggy tbh

#

and the style of it kinda sucks

#

other than that idk why this isnt a stock feature

humble tulip
#

I think the lack of an entry point for actually creating the timestamp initially kinda sucks too

flint bronze
#

Yeah

#

It should be a selection option or a keybind to convert text to a timestamp

violet burrow
#

im so cooked

#

my plugin have to change his way to work

#

because discord uses clownfish mode onnx, and not rvc onnx

violet burrow
#

Does someone knows how to build with .node files ? its imported in native.ts

iron epoch
violet burrow
#

so atm i can't use onnxruntime-node for onnx models treatment

flint bronze
#

good luck refactoring vencord build system

#

vencord asar when?

violet burrow
#

i got onnxruntime-web

humble tulip
#

The SendTimestamps plugin exists so there's no need for this really but it's fun to mess with

#

I realise it's not clear in the video but the 15:23 at the beginning is just plain text

dull magnet
humble tulip
#

πŸ€˜πŸ˜”

tropic sequoia
#

hi guys, i am trying to build a plugin but i would like to have some api docs, where can i find them? (i already set up my environment and custom installation but i dont see any docs or anything)

i would like to work on webcam and stream overlay

oak sundial
#

those docs are the docs

#

looking at other plugins and using devtools to scour the internals of discord is basically all vencord docs

#

its hard to document stuff like this because it is essentially modifying existing discord code

unreal ermine
#

also in @utils there a bunch of explanation in comment lines

hoary pilot
#

you have to embrace it

fallen sandal
flint bronze
# humble tulip

πŸ”₯
Is it possible for the context menu to be removed and to just convert it to the timestamp with the most relevant format, then show the stock picker?

lone moat
#

Question for someone with experience using the stores..

Is it possible to grab the affinity scores from discord directly? They used to be viewable in a hidden menu via experiments / (true) developer mode.. but I can't seem to find them anymore

#

I noticed vencord had a plugin that shows your list of users with affinity in the friends list, but it didn't display the score

hushed loom
#

enable

#

vp consoleshort

shrewd tundraBOT
hushed loom
#

and you can use Stores in console

lone moat
#

Thanks, I'll dig around in it tomorrow. I was hoping someone's made a plugin for it, but even just retrieving the list would be quite helpful as-is