#🧩-plugin-development
1 messages · Page 57 of 1
¯_(ツ)_/¯
something this volatile shouldn't be 1st party
quite a lot of servers block zwc
so this isn't even close to a universal bypass
also you can use text replace for this p sure
Is saying “you can use text replace for this” your catchphrase? (half-joke)
I don't think I've ever said that before
but that's literally all this is lol
there's no "bypass"
ok i kinda got this one. i'll try to get context menus working but later because it's like 6am right now for me lol
very nice
i've been wanting to code that, can't live without it after switching to vencord
Hey uh, I submitted this PR a month ago, is there any chance I could get it reviewed?
https://github.com/Vendicated/Vencord/pull/2290/
wait it been a month?
god
wow the time pass real fast
they're not being "reviewed" lol
they are sitting in the pile waiting to be found
true words
asking just makes it take longer
p much
yop
https://github.com/Vendicated/Vencord/pull/2161/
My MoreUserTags PR now conforms to the user's experiment status while choosing whether to show regular bots as app or bot
This feature is inspired by https://github.com/Puyodead1/replugged-stafftags
It took me 3 hours to figure out how to do this in Vencord and I'm so glad I did because it looks just so much bette...
i wonder if i'm literally the only one working on improving this plugin atm
¯_(ツ)_/¯
new plugins being added to vencord:
meanwhile my pr
anyway it is time for my irregularly scheduled check-in regarding my PR @dull magnet (and obligatory sorry to bother you)
am i insane
dont
ah
i do it like once or twice a month it's probably fine
thats fucking stupid
why can't you use the {name:name} === {name} with imports
its not even that
its that react wasnt even loaded

well
it loaded properly
i know what it is
fucks sake
mans went through all 5 stages of grief
it's MenuGroup not passing down extra arguments
even worse
there's this cope sitting right below it

i fixed my plugin
and
I have learned the hard way
that
Discord does NOT cache emojis

nvm i'm retarded
What the fuck
never open devtools on vencord.dev/plugins 
seek help
please
seek some help
like wtf did i just read

what's wrong
nothing 
i want to make a typing test for discord so you can see how fast you typed messages. is there anything i can use to detect more input other than using keydown on the input textbox or whatever its called
keyup
Is there a way to modify QuickCSS?
from a plugin, not really, what would you want to modify
if its relating to LSP throwing errors with nesting or :has(), its a long standing issue that we're waiting for someone at microsoft to merge into monaco
oh ok and sry if this is a stupid question but is there any way to always get the message input element?
I looked at the better upload plugin and it refers to the plus button for images with a specific name
patch to extract it out when its created
I'm seeing if a plugin that can quick hide Themes (for screenshots so you don't get banned) is viable
just themes wouldnt be enough and it would need support across all plugins imo
is there a way to extract values from regex patches to runtime patches?
you should theoretically be able to just do $self.whatever=whatever
// disable quick css
Vencord.Settings.useQuickCss = false
// disable online themes
Vencord.Settings.themeLinks = [];
// disable offline themes
Vencord.Settings.enabledThemes = []
@indigo ferry
just need to keep backup of the previous state
i still stand by this, where it would need to be a core feature
well someone made a theme that hides most vencord stuff
i don't really think making every plugin add code to hide itself is viable
way too tedious for something so niche
why do you care so much about showing client mod stuff in screenshots
just make sure the server you're in isn't uber cringe (if it is, whyare you talking there in the first place)
and if you really want a vanilla screenshot, it's probably best to instead keep a second vanilla install of discord
Do you have a link?
I would never modify my Discord™️ client because that would be a no-no and against ToS. I'm a good girl who would never modify their Discord™️ client and publicly talk about it on Twitter.
(i sent a video with vencord & vesktop to discord staff a few days ago and they didn't even mention it
)
well yeah they know you
dont discord staff use modified clients themselves
i heard a rumor going around like that
well just earlier I found out that there's a discord staff who starred the vencord repo lmao
mb
real
they also starred a self bot library 😭
crazy staff
im not gonna say who cause some annoying kid is gonna read these messages and snitch and I don't wanna get that staff in trouble
discord doesn't care about modified clients, they care about them getting too popular if they allow them and being able to bypass nitro
if imma be honest
not even that
some discord staff are probs why they aren't actively banning modded clients
discord just doesnt care unless its actually being used maliciously
i don't have any data to back this up but i would assume that the client mod population has a way higher ratio of nitro subscriptions than non client modders
and someone who installs a client mod for fake nitro likely wouldn't have ever bought nitro in the first place
so there's really no reason for them to care
they had the betterttv dev as one of their devs since near the beginning for years on end, it would be hypocritical for them to actually take action against client mods
miss you night 
jason may be stupid on certain things when it comes to internal work politics and testing the waters with shit like crypto integration but i feel like he wouldnt axe off a good majority of the userbase just for "you broke tos, cope"
he more than likely realizes thats bad publicity
just push code to discord
if (window.Vencord) reportCurrentUser()
if (window.Vencord) HTTP.post(Endpoints.BAN_ME);
I remember how I sent a ss with a modified client badge in it and a discord server helper (the official server) said "is that a platform indicator?" then when I deleted my image they deleted their message 😭
official servers are just the worst because they get people that moderate that are so out of touch with the community if not just take it too seriously with brand integration
just think about it from a logical standpoint
there are millions of people who use client modders. i would assume that client modders make up a good portion of discords most avid users, power users. so many of them will be nitro subs
if they banned all of them, it would produce massive backlash and they would lose many of their most loyal users. and many nitro subs
for what gain? emotional high ground?
there is no reason to ban someone unless they actively cause harm
which is why we have actually malicious plugins banned
there was some stupid change in like 2017/2018 that i dont remember that i bandwagoned with cancelling nitro over and its like, why did that even matter
but there will always be a very slim non zero chance of getting banned cause you're breaking tos after all. if you're not okay with that you probably shouldn't be using mods
but the odds are so low, it's much more likely that you'll get banned for other stuff like joking with your friends
"haha this you? [ip address]" has a much more realistic chance of getting u banned than client mods

or someone underage baiting you which still pisses me off
yeah it's stupid but the laws regarding that are strict
you can get into serious trouble if you don't follow child protection laws
so i understand their standpoint
i get that, but theres a fundemental flaw in the fact that t&s dont get to see the pre-edited content of the message
thats the part that annoys me the most about the entire ordeal
oh do you mean like
what's 4 + 4 edited into how old are you
just hope it doesnt end up on a holiday or when they're out of office
the EU should implement some digital passport kinda deal that companies can use to verify your age without requiring access to personal info like your id
basically you can have your entire passpoint online and there should be some sort of oauth where you can choose exactly which info you need
so for example discord could ask for only the date of birth
paypal could ask for your name and dob and address
etc
it'd be cool tbh
neat idea but i still feel like theres still some people that would take issue to it but thats kind of expected
vee can you pay for my plan ticket outta the usa 🙏
sorry you're stuck here 
and then you have a prompt like the discord bot invite thing where it shows you exactly what permissions are being granted and with required links to privacy police and such
i mean yeah but that also means the world is collapsing because everything is interconnected enough nowadays that everyone else is dependent on the US
would be so much better than shenanigans like having to send discord support a picture of your passport
i committed identity fraud to verify my bot
tbh
if my bot gets over 100 servers
im fucked
i dont have an ID, passport, nothing
and then i didnt even care to attempt to apply for message content intent and swapped apps 
i dont even have my birth certificate at my house
under 18?
yes
i think you can still get a state id at 16 without having to apply for a drivers permit idr
honestly i don't think i mind discord making you verify your identity for large bots
as long as they take good care of it and don't use it for anything besides verification and legal purposes
im 14
i heard you can get around verification if you add someone onto your team who can verify the bot
dk tho
This webpage is designed to serve as a resource for youth experiencing homelessness or those assisting them in understanding individual state requirements for obtaining a valid government-issued photo identification or ID.
For youth experiencing homelessness seeking to obtain a valid government-issued photo ID, there are four common and critical...
there's only 2 states?? 😭
yeah that site is fucked wtf
does anybody know how discord decides what ?size parameter to use for user avatars? trying to find the largest possible version of images and don't really want to repetitively fetch with different size values
is it not always 4096?
hi
when using view avatar, the few people i just tried were all 4096
you mean 4096?
not really sure where to post this, but what 3rd party plugins do people recommend using the most
@iron epoch I probably sound schizophrenic saying this but #1032200195582197831 message has a custom expression picker tab, I had wanted to build an expression picker api, would you mind if I used your code for that?
what do you mean you already made one

i thought you were just shoving your code directly into the cookieclicker plugin
i really regret looking at your code
did you learn js/ts purely for vencord plugins
because it really feels like it
I was going to make a pr
all your code is on one branch
good luck lmao
you would need to recommit all of that
because uhhhhh
oh
or cherry pick
(I don't think Vee is gonna accept 10 new plugins in 1 PR)
nah that's just the first step of me creating something.
1 - make it works
2 - regret reading your shit code
real!!!
like
wtf happened here
DO not ask...
I was going to ping you and Nuckyz anyways because the code is awful
oh
I am rn improving the awful patchs locally then going to commit them to a new branch
yeah?
could probably do with a more descriptive name
That exactly the point of the ping, I am awful when it comes to naming
I am listening for any criticism
meanwhile i am worried that I am being too rude
no dw, I would accept the criticism
oh my god. my code is awful 
uhhhh mmmm
Did the context menu api get changed? all of plugins buttons have stopped appearing in the context menu after an update a while back
Yes
Oof
Where there is a function returning another function in your patch remove one of those functions
R/ihadastroke
Yes please do

Hold on i'll check out the way you define conext menu patches because i haven't done them in AGES
Also there's a contextMenus field added into plugins
Read the message I just sent
Oh i'll just read the definePlugin source again hold on
Oh wow that's so much easier lmao
exploding so hard rn
is that a file preview?
so just to test if it would work i got the element for the input box with queryselector and did a keydown and it gave me a sentry error every time i deselected/selected the box (the element did exist)
@flint bronze
https://github.com/programminglaboratorys/Vencord/tree/TablistApi
alright, give me your best constructive criticism
will Nuckyz mind if I ping her? idk if she will be interested
while I am waiting and avoiding to do my homework(aka updating my old plugins).
going to make the idea that you indirectly/unconditionally gave me
me again, how do I not force restart when my plugin is off? I don't want the window of "those plugins... restart..."
yeah but mine doesn't really need that as its just rendering a button and it doesn't render the button when the plugin is off anyways
Vencord.Settings.plugins[$self.name].enabled ? $self.AppendButton($2, $4) : null
remove the enabled check
it's useless since you have to restart anyway
afaik there's no way to disable that if you have patches
damnit, alr
but can I like force restart?
no asking, just force the user to restart
why do you need to do that
you are talking about the api or a plugin
a plugin
and the plugin still has patches after making it use the api?
the plugin is not using any apis, its just some small plugin
show it
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Button, ButtonLooks } from "@webpack/common";
import styles from "./style.css?managed";
import { disableStyle, enableStyle } from "@api/Styles";
function AppendButton(codeblock, r) {
return <Button
look={ButtonLooks.INVERTED}
onClick={() => console.log("hello" + Math.random())}
className="qs-quickcss-append-button"
size=""><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="green" viewBox="0 0 24 24"><path fill="currentColor" d="M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z"></path><path fill="currentColor" d="M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z"></path><path fill="currentColor" d="M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z"></path></svg></Button>;
}
export default definePlugin({
name: "quickSnippet",
description: "append css snippets quickly to quickCss with one click!",
authors: [Devs.iamme],
patches: [
{
find: "codeBlock:{react(",
replacement: {
match: /(codeBlock:\{react\((\i),(\i),(\i)\)\{.+?),children:(\(0,(\i)\.jsx\)\((\i),\{text:(\i)\.content\}\))/,
replace: "$1,children:[$5, Vencord.Settings.plugins[$self.name].enabled ? $self.AppendButton($2, $4) : null]"
}
}
],
AppendButton: AppendButton,
start: async () => enableStyle(styles),
stop: async () => disableStyle(styles)
});
oh
yeah you dont the enabled check
and no way for it to not require a restart because it uses a patch
the plugin is obligated to be enabled when discord starts for the patch to apply
heads up: I am building something that would probably compliment this very well
that's kinda why the enable check is there, so the user doesn't need the restart
but thanks
@cedar olive while you are here, can I ask you to look into something else?
but that code will never run without a restart
when the user enables the plugin after, the place you patch has likely already run without your patched code
so it will never try to even add your button
oh you got it all wrong
that's why the user needs to restart, so the code is patched and the new modified version is run
you mean when disabling?
ye, just when diabling
that would work but at the same time it's not a practice we do
all plugins that require a patch will require a restart to disable too
so we don't need to write logic for every single thing
thanks nuckyz for the feedback
@cedar olive can you look into this?
not now, sorry
oh okay, that's alright
and a tip for patches: $self is a reference to your plugin
is it the same exact idea? I am curious to know
how would that be possible? quickcss seems perfect
quickcss gets horrible to maintain very quickly
oh, yeah that's true..
ngl thats real
that is literally the only reason I am developing a replacement
this seems exciting, can't wait to see it
the todo:
make editor load properly
inject CSS into the page
clean up the UI
is this a plugin or a core update
core update 
moreusertags just broke (i think the stable one did as well) so i'm working on fixing it
at least in my pr
alr
how do i add custom commands including options and text replace? (e.g. i want to make a /url command with the options title and url, that sends [§title](§url) (while obviously replacing the § variables) into wherever u use the command (inspired by kaomoji and textreplace plugin)
Read the source code of plugins that already do that
any examples of plugins to look at?
kaomoji wont work cuz it doesnt implement variables/user input
Petpet
yup
what function do i use to send the message?
sendMessage expects a channel id and idk how to retrieve that
you're asking really basic questions that you could easily answer by yourself
^
find usages of that function in the code and see how they do it
and look at all plugins that register command
a simple global project find in vscode will find everything
im too impatient and adhd to do that at first ;_;
tho i got it now
i have adhd too and wrote most of this codebase you have no excuse

Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
when i use the command it does nothing
no message, no console error
and yes i have enabled the plugin in my settings
anyone? pls?
show the code so someone can help
i magically made it work
tho how do i turn my options into required options?
i cant rly do options: [RequiredMessageOption] cuz i wanna give the options custom names and descriptions
Bruh
ik i suck </3
I don't fully understand patching yet, so id like to ask a question- if i wanted to patch the src property of this image in a component, what's the best thing to set the match to, instead of just src: E, so it doesn't get replaced when the value names change?
identifiers can be matched with \i
but to guarantee you match the right need you need to be a bit more specific, for example also capture the __invalid_ringArt
^^^
i would also recommend avoiding explicitly defining the alt attribute in your match
do a .{0,10} or something like that
Oh i get it now, thanks
When docs on exactly how \i works?
u can just check the code trol
**patches.ts: **Lines 21-26
export function canonicalizeMatch(match: RegExp | string) {
if (typeof match === "string") return match;
const canonSource = match.source
.replaceAll("\\i", "[A-Za-z_$][\\w$]*");
return new RegExp(canonSource, match.flags);
}
guys, I am unable to patch a module, I am sure the patch works as I tested it in the patch helper
{
find: "PROFILE_BIO_RULES:",
replacement: {
match: /(PROFILE_BIO_RULES):(\i)/,
replace: "$1:$self.addRules($2)"
}
}
but the plugin doesn't seem to do the patch
I am sure the module is getting loaded because its responsible for the markdowns
vencord plugins load too late for markdown patching to be possible without having to recreate the parsers after the fact
wdym
what I mean, the patch isn't patching
make sure your plugin is enabled
I am sure 100% it is, I even tried to make it start at init
it still would be nice to have a markdown library but its just annoying that theres no way to get it to work without recreating parsers
and adding webpack interop support for one (1) feature would probably be unfavored
yeah you are right
and right about this either
welp
code blocks and mention will never be possible in vencord 😔
here the code if someone is interested
export default definePlugin({
name: "MoreRules",
description: "added more Markdown Rules",
authors: [Devs.iamme],
patch: [
{
find: "PROFILE_BIO_RULES:",
replacement: {
match: /(PROFILE_BIO_RULES):(\i)/,
replace: "$1:$self.addRules($2)"
}
}
],
addRules: (rules) => {
console.log("\n" * 2);
console.log("RULES:", rules);
console.log("\n" * 2);
return rules;
},
startAt: StartAt.Init
});
i dont get why your patch is failing
seems like its too late as you said
that shouldnt matter when it comes to patching
wait you're not isolating the module in that screenshot
you're just looking at the bundle
if that the case, I could be making a mistake that I am not seeing
Vencord.Webpack.extract(428595) in console and then click that function it returns
then you'll see if its actually patched or not
alright, better then giving up that doesn't seem right at all
oh ye, I am still in init stage
the issue of it not patching some chunks should have been fixed ages ago
if not, maybe try again with the webpack-changes branch
alright going to check that out
It should be patching all chunks yeah
Where can i patch the audio that gets played in the wumpus "Chats can be alot" page? i've been looking for 2 hours but i literally just can't find it 💀
How do you spend 2 hours looking for a link to a file
It's webpack module 778184 btw
just do a find for 044c6093a6ca7006430c
I'm rather special
also
Omfg oops
i would patch it where its defined btw
Ik, i just can't find module 778184 or the ./vibing_wumpus
do this
probably because I'm stupid and I'm on canary which is a different build
i would assume that random filename stays the same
044c6093a6ca7006430c doesn't show up when i search sources either
It works in the patch helper but i'm not sure how to patch without seeing the source 

your regex should be /=.{0,10}"044c6093a6ca7006430c.mp3"/ or something like that
i would assume n.p here is /assets/
meeeeee
Brain aint braining oh god
about this, you can make your plugin start at init to be the earliest possible (as soon as vencord is executed, you can't ask for more than that)
that's a new thing that was added after you made your stuff
does that count for dependencies as well
prob yes
like if plugin a depends on api plugin b, and api plugin b is set to run the earliest it can, will plugin a automatically be set to run the earliest it can too?
you can also not depend on the start method and do something else
vencord runs early, you just need to make the thing you want run early too :)
that might be where i was fucking up tbh
easy with the new way to change how early the start method runs, but also doable in other ways
this wouldn't be super good to force cuz maybe the person wants something to happen in the start method later, the best solution would prob be to make a new prop in the plugin definition for that api to use
i personally see very little use cases where this would be an issue anyways
yeah that should be early enough
nah
also I suppose not having to re-build the parser is going to save you a lot of trouble?
yes
highlight real
anyone has a good plugin idea for the penal api?
The chatgpt section looks intriguing.
you switch to it and it just shows this gif
Petaaa hited the griddy!!!
hai i wonder if this would be a good idea
the character count when you're close to hitting limit is a react component that will take the current character count in chat as prop and return null if its not close enough to the limit and otherwise it'll return the count and the "Send longer messages with Nitro"
i was thinking to add a character count visible all the time i could patch it and if it returns null then i'd return my component instead which would just be the count
so that way the "Send longer messages with Nitro" which is the normal behaviour would only appear when you're hitting the limit
is this a good approach?
alternatively i could just remove the "Send longer messages with Nitro" thingy from the component as i doubt anyone would care but eh idk if that'd be bad to do as the plugin description would say it just adds a character count and wouldn't mention this side effect
actually this component is characters since your limit (2k for non nitro and 4k for nitro) so maybe i could add a different one for total chars not dependant of this one but i feel like having 2 counters could be confusing
Is there a good reason why we don't have splitLargeMessages or should I make
Already basically made for my bot
selfbotting/api abuse
Ah
What if I made it so it just sends the first 2k characters (with smart detection of where to split) and keeps remaining in chat box, so you just press enter more than once
That way it's only making it easier to send what you want, but not botting
I think it’s considered API abuse because you would be sending two requests back to back that quickly and it might get flagged
You can trigger discord "your sending too fast" with no mods
It just tells you to slow down
exactly, but a split message would trigger it more easily
It's not our problem if users decide to send 10+ 2000 character messages at once
and if discord see how often you are triggering it then that would get flagged to them
I sincerely doubt they flag message sending rate limits unless it's in the order of 100s in a minute.
This is justified because they have a built in handler for human amounts of speed.
I could just add a timeout after sending one, then have it increase with every subsequent message
fair, but the selfbotting/api abuse is just what Vee said and i’m using weird logic to come to the same conclusion that Vee did. So unless you could implement some kind of client side slow mode I feel like there’s no way to get around Vee’s conclusion.
I'll pr with a 2s slowmode cooldown after enter press
i think the only way to get around Vee’s conclusion of Selfbotting/Api abuse is if you send the first part of the message then put a client-side slow mode before letting someone manually push the enter button to send the second part of the message
i dont remember ven said that, just it's useless since discord allow you send as file
that too, just 94% sure that’s what they said it was
fres, this is starting too sound like a char counter plugin (which would be nice to have since the last one got exploded for being bad)
Send as file sucks because I can't see on mobile.
i never said any of that
i just think it's useless
i was told you did
far point, I was just going off that because I was told by someone you did the time I bought it up
then i'd return my component instead
I don't think that's needed, just return the number count component no matter what
How could i get the message component for a fake/example message element to demonstrate smth?
Wha
ok that makes more sense but yeah rendering it yourself shouldn't be hard
@dull magnet do u know what this part of messagelogger is for
it ignores the edit if the content matches the first item in editHistory, but why
doesn't the check to the right of that cover that?
idk check git blame to see who wrote that code and ask them
already did
says you co-authored it
@granite wharf
it wasn't me who wrote it :p
my code but cant remember sorry
if i added it there was some reason to
most likely to do with embed message updates
but the check right after already deals with that
most likely different things
it could be that one of those is a partial message object
try logging $2 and m during after link unfurling
i had issues with that for a bit
I've been trying to figure out native.ts for a while and I got to the point where I'm stumped and curl is failing with the error of Warning: Failed to open the file No such file or directory Failure writing output to destination
import { execFile as cpExecFile } from "node:child_process";
import { readdir } from "fs/promises";
import { extname, join } from "path";
import { promisify } from "util";
const execFile = promisify(cpExecFile);
interface PluginInfo {
name: string;
downloadUrl: string;
description: string;
tags: string[];
options: Record<string, any>;
customInfo?: string;
started?: boolean;
authors?: string[];
}
const pluginsDir = join(__dirname, "../src/userplugins");
async function ensureDirectoryExists(dir: string) {
const { mkdir } = await import("fs/promises");
try {
await mkdir(dir, { recursive: true });
} catch (error) {
console.error("Error creating directory:", error);
throw new Error("Failed to create directory for plugins.");
}
}
export async function installPlugin(_: any, plugin: PluginInfo): Promise<void> {
await ensureDirectoryExists(pluginsDir);
const pluginPath = join(pluginsDir, plugin.name.replace(/\s+/g, "_"));
try {
if (plugin.downloadUrl.endsWith(".git")) {
await execFile("git", ["clone", plugin.downloadUrl, pluginPath]);
console.log(`${plugin.name} has been successfully cloned.`);
} else {
const fileName = plugin.downloadUrl.split("/").pop() || "plugin";
const filePath = join(pluginPath, fileName + (extname(fileName) ? "" : ".zip"));
await execFile("curl", ["-L", plugin.downloadUrl, "-o", filePath]);
console.log(`${plugin.name} has been successfully downloaded.`);
}
} catch (error) {
console.error(`Error installing ${plugin.name}:`, error);
throw new Error(`Installation failed for ${plugin.name}: ${error}`);
}
}
why are you making a third party plugin installer
huh i thought the same
everyone does it or wants to do it without knowing the repercussions doing such thing will have
without knowing that the entire purpose of vencord is to not have this
if 3rd party plugins could be easily installed then #🏥-vencord-support-🏥 would become almost entirely useless
90% of messages after an announcement of "easy 3rd party plugin installation" will be
- how do i install plugin
- what does this plugin do
- why isnt this plugin working
- why do i get [obvious error]
Real
why tf are u shelling out to curl 😭
use fetch()
i didn't even notice 
i was only worried about the git clone instead of using branches and merging
but also conflicts 
I was just annoyed by how long it took to dig for all the third party plug-ins out there to use so I'm like why not try to make it easier on other people who want to do the same thing
plus it's an opportunity to get familiar with typescript and working with electron
oh I'm aware vencord was made to avoid having this, making it more lightweight, but there's still a handful of 3rd party plug-ins that can actually be really good but its hell to find them and a drag to manually download each one
I'm pretty sure a lot of repercussions can be avoided if it's maintained and done well
it'd make it a lot easier on a lot of people
i have a stupid question
plus I'm pretty sure this wouldn't get approved to be published to the official vencord download either way
have you considered this wont work because end users of this will not have git or pnpm or node or anything like that
Well at that point all the plugin could do is give them an error telling them to install it or redirect to a guide or something
however, since it's unlikely this would ever get published to vencord, people would have to download this as a 3rd party plug-in, so they should have git and pnpm downloaded by then

idk I was over thinking it 💀
thank you
i guess for lazy people that use a devbuild already it would be fine
not for a plugin, just running this in console, but is there an equiv of Vencord.Webpack.Common.EmojiStore.getDisambiguatedEmojiContext().emojisById for stickers? wanting to archive all emojis + stickers on my account before i leave some servers
nvm got it, Vencord.Webpack.findStore("StickersStore").stickerMetadata
No real point of having this all you need to do is drag the plugin into userplugins then just pnpm building it then restart discord. Very straight forward lol
(from logger / response)
{"application_id":null,"avatar":"7c82584dd82b41b2ddb83a2348a7d457","channel_id":"1170555935396216834","guild_id":"1170555933819154472","id":"1217572863100321853","name":"cool webhook","type":1,"token":"xfYO5sSEqMvB6xYNiYZaQC22J0F_uKlY-zbq2IvzyiIyGcXA78Ub668WqRh7ww2X_TZo","url":"https://discord.com/api/webhooks/1217572863100321853/xfYO5sSEqMvB6xYNiYZaQC22J0F_uKlY-zbq2IvzyiIyGcXA78Ub668WqRh7ww2X_TZo"}
index.ts:66 An Error occurred while executing command "webhook info" TypeError: Cannot read properties of undefined (reading 'id')
at index.tsx:73:85
at async Object.execute (index.tsx:69:17)
at async eval (WebpackModule287746:2:7209)```
im confused
oh
wait
does it have to do with ctx.channel.id?
because it messes up at sendBotMessage(ctx.channel.id, {
wait no
ahhhh
they got rid of user.id when fetching with token
lovely
Ye lol
I think I added ing to signify it's an action or smth
Idk
guys how does messagelogger store messages and how would i change the code to make it store the messages permanently in a custom file location?
it intentionally doesnt store them because thats creepy
ye ik
but like every friend group needs a paranoid creep
and im that person
especially cuz my friend group consists of me, myself and i
im paranoid as shit and even i think something like that is going too far
well
if people dont want me to see smth dont send it in the first place
and i hate people lying to me
and im paranoid about it
cuz that stuff rly broke me
#1032200195582197831 has what you want
it just sounds like ur around bad people u should probably get away from if this is something that has happened before

i mean. ur not wrong. rethinks my life decisions
where exactly tho? i cant find it
nvm smart me searched for "messagelogger" instead of "logger" which was the problem
anyone knows why the "Browse" button in Enhanced Message Logger doesnt work?
it says "Failed to update directory"
well i fixed that
tho next problem for another small plugin im making
my goal is to select the box where the user enters text, but idk what method to use for that
use a ref
pls be more specific
it even has an example for focusing a textboz
ngl i never used react xd
i still am
so am i
pls just gimme the finished code so i can ctrl c ctrl v it :scriptKiddySobs:
bro the skidding code is literally on that page
well these functions all return their own html elements, but i wanna focus on smth that alrdy exists
im struggling :sobs:
Does the multi option in <SearchableSelect /> just not work?
<SearchableSelect
options={[
{ label: "Dark", value: SearchState.DARK },
{ label: "Light", value: SearchState.LIGHT },
]}
placeholder={"Tags"}
closeOnSelect={false}
multi={true}
onChange={(e) => setFilterState(e as SearchState)}
/>
No matter what I do it never selects more than one option
might be cause of my usage of onChange but uh 
why are you using that for two options
I removed the other 25ish options
Is it possible to enable the purple streaming status without having a streaming rpc? i'm trying to make a plugin that adds it to the status options but i can't even find where you can toggle it 
what in the shitcord is this behavior 
I love Discord (if its already known ignore my presence
)
you love shitcord
the gif picker no one uses in the edit profile page also half works when you have favoritegifsfirst on
actually just kidding it works again
apparently theres just no way to get to favorites from there otherwise lmao
maybe some day
do you guys think that the ability to hide the dearrow button would be a good idea, i mean its helpful but i dont want to pr for literally one line 
you'll be fine
lmao
i think a good addition to the dearrow extension is to have some more of the browser extension settings
like disabling the thumbnail getting dearrowed
so u only have the modified titles
i know 👁️ /j
im guessing that means ur working on it so thats good :D

sorry if I'm being a little dumb, but is there a event that gets fired when Save & Closed is pressed?
yeah in plugin settings sorry
for that you can use the onChange method
in a plugin setting definition
it will ONLY be called from the settings menu save button
overwriting settings.store.setting will NOT automatically call that
doesn't seem to work with custom Components :/
isnt that because you write directly to the store though
is it possible to download and unzip/extract a rar via native.ts?
if you can find a library for it, but why do you need to?
i think theyre building a plugin downloader
^
use rawr instead
i meant zip mb
asar best bet because then its just apart of electron
electron has native support for asar
and there's an unzip library included in vencord already
the bonus of using asar is you dont even need to extract it
ah, I'll look into that then. thank you
asar very cursed if you look into it though
how so
the only cursed part is redirecting node:fs
other than that the format itself is just an offshoot of tar
is just an offshoot of tar
that makes it sound not cursed
and even then thats just within electron's node context
why does reviewdb have an option to remove reviews
isnt the whole purpose of reviews to not remove your own reviews

That’s the only reason why is still on Vencord
its main purpose is being a fun plugin
but also removing reviews is a good thing because sometimes little trolls like to harass you reviews (I speak from experience)
You can report them
but well

I might be able to report them, but I don’t wanna wait however long it takes for the mods to remove it, when they’re basically calling me slurs in the reviews
fair
that and there's only so much reporting can do
it might be that there's a review on your profile that isn't offensive but you absolutely hate the person and don't want them there
like an ex or a stalker
ong real
I got bad reviews because I denied people’s decors and they complained about it
That’s why I opted out
can’t you just redact your name from it?
That only works on the dashboard
If you do it through the discord bot it doesn’t redact it
understandable
does vencord have a consistent way to define styles e.g. with a framework or should I just use style={}
And if you are modifying discord styles then you should make it managed so it turns on/off with your plugin
import "./style.css";
okay that works
but i'm having trouble with the <Textarea> component (imported from @webpack/common)
it's not setting the default value I pass as children
this is my code so far:
<TextArea onChange={console.log} name="code" placeholder="console.log('Hello world!');">testest</TextArea>
this is what i'm getting
i found patch helper and copied from that
got it to work?
yup
actually is there any way to highlight the value of the textarea
like quickcss but without the fancy stuff
like syntax highlighting?
yeah
depends
readonly is easy with discord's parser
if you want it to be readwrite then you should use monaco (the quickcss editor)
is there a way to easily embed this bc i want it to be part of the settings modal
and not open in a new window
what exactly are u making
True but im not gonna redact myself from every review
This the first message I read with no context in this channel 😭
ajjiasijdoasjiodjioasjiodaojidaJOIKDIOJKoijIJOJIOFSAJOIDFJIOASFJIOSAJIOFASJIOFJIOASFIJO
wise words
what does ApplicationCommandInputType do
BUILT_IN_TEXT = you return content and it automatically sends it, used for stuff like /me
BUILT_IN = doesnt automatically send
ignore the rest
and now starboard doesn't get the context either
Amazing!
i just have a bunch of aliu users brainrot on mine lol
- i dont use it
This quote was too good for me to pass up lol
Damnit i thought of doing that 💀
Now i'm curious what the rest are 💀
no clue about 2, 4 but 3 seems to be a simple clyde message (correct me if im wrong)

Ur so real for this
Why is it there then 
cause we just took the enum that was in the client?
I've been trying to get the search bar to work but I just keep getting "Rendered fewer hooks than expected. This may be caused by an accidental early return statement". I tried using a plain HTML text box and it works there, but it doesn't work with <TextInput>
function ExtraPluginsTab() {
const [searchValue, setSearchValue] = React.useState({ value: "", status: SearchStatus.ALL });
const pluginFilter = (plugin: PluginInfo) => {
if (searchValue.status === SearchStatus.CUSTOM && !customPlugins.some(p => p.name === plugin.name)) return false;
if (searchValue.status === SearchStatus.PRESET && !presetPlugins.some(p => p.name === plugin.name)) return false;
if (!searchValue.value.length) return true;
const v = searchValue.value.toLowerCase();
return (
plugin.name.toLowerCase().includes(v) ||
plugin.description.toLowerCase().includes(v) ||
plugin.tags?.some(t => t.toLowerCase().includes(v))
);
};
const onSearch = (query: string) => setSearchValue(prev => ({ ...prev, value: query }));
const onStatusChange = (status: SearchStatus) => setSearchValue(prev => ({ ...prev, status }));
return (
<SettingsTab title="Plugin Repo">
<Forms.FormTitle tag="h5" className={classes(Margins.top20, Margins.bottom8)}>
Filters
</Forms.FormTitle>
<div className={cl("filter-controls")}>
<TextInput autoFocus value={searchValue.value} placeholder="Search for a plugin..." onChange={onSearch} className={Margins.bottom20} />
<div className={InputStyles.inputWrapper}>
<Select
options={[
{ label: "Show All", value: SearchStatus.ALL, default: true },
{ label: "Show Custom", value: SearchStatus.CUSTOM },
{ label: "Show Preset", value: SearchStatus.PRESET },
]}
serialize={String}
select={onStatusChange}
isSelected={v => v === searchValue.status}
closeOnSelect={true}
/>
</div>
</div>
...```
shwo full code
this shouldnt error
vee deleted one line and now plugin broke for app users, do i just push a fix to the same branch i made?
Specifically, https://github.com/Vendicated/Vencord/pull/2280/commits/a44ffe6a1a38b1a33e0019a8be0b8d3ca700f16a where the following line getting removed prevents it from opening on desktop app
make another pr
Yeah
then open another PR
make sure your branch is up to date with what vee changed though
wha?
i replaced it with the download property
which makes the browser download it instead of opening the url
yes
which breaks it if you're trying to download it through the discord app
^ that
eh?
i'll do it the second i can, currently busy with urgent assignments!
the button does nothing

sowwy for breaking it then 
The singularity
Either way learning a lot from contributing to vencord, thanks vee.
alr
so uhh dumb question; I used to have replytimestamp as a userplugin that I had slightly modified but I think I want to use the one that's now integrated; how would I go about modifying the timestamp format the best way (I want seconds in it)
can I somehow just add an override for the replytimestamp format into my customtimestamp plugin https://gist.github.com/nvhhr/7385814810cad48be5ffa4483fe4d2f8
just change the format string used by it
look at moment.js docs for valid format strings
...it changes?
make it a different filename if it conflicts with being a userplugin?
alternatively just pr an option for seconds
or custom time format entirely
I did have a modified format for the userplugin but I was wondering if it's now merged, the userplugin might not get updated anymore and the one in /plugins will get updates so not sure what the best way to go about this would be; copy it as userplugin and keep it up to date myself (not ideal) or if I can just somehow override it with my plugin
not sure it makes sense to PR an option for seconds when there's no merged plugin for seconds in timestamps in general that would be weird (also I can't code)
lol
I think reaching out on an email about something is a new to me
yeah lmfao
also its on one of my cobu prs
i used it for like a week
they must have been digging for that
i just remembered, not the first time this has happened :p
person found my fork of an alternative discord client that added qr code auth
people email me all the time
this is insane
should I try working on a video loop plugin? I know it's been attempted before btw
different thing
DONT star that LOOL
i mean
embed videos as in
the embedded youtube player
Fair

I had another idea, but I'll make a different plugin request later
you can't open audio files in an actual browser like you'd do with videos, so a PiP mode for these might be useful idk
blame discord's http headers they send
I already blame discord for too many things 
I have a question though
Is it possible to make a plugin that skips the opening browser part when saving files?
Yop
somehow
Might request that later as well, cuz I'm tired of having to open 20 tabs when I'm working on a project

Real
I have been unsuccessfully trying to fetch members by their ID. I have also tried to subscribe to GUILD_MEMBERS_CHUNK & GUILD_MEMBER_UPDATE events to see if anything is coming in, with no luck. I have also tried without the promise chaining with no luck either.
Does anyone have an idea about what's wrong here?
const nicknames: (string | undefined)[] = [];
FluxDispatcher.dispatch({
type: "GUILD_MEMBERS_REQUEST",
guildIds: [guildId],
userIds: userIds,
}).then(() => {
userIds.map(id => nicknames.push(GuildMemberStore.getMember(guildId!, id)?.nick));
});
console.log(nicknames);
Current result of the above is just an array of undefined's.
Thanks! I already tried that method, like below. But it doesn't work sadly 🤔
FluxDispatcher.dispatch({
type: "GUILD_MEMBERS_REQUEST",
guildIds: [guildId],
userIds: userIds
});
provide more context
Is this only supposed to work inside a react component?
if you want the list of members once it's done fetching you also need to await the gateway event of chunk fetch success
look at implicit relationships
but it's way easier if u do it in a react component
what are u trying to do anyway
I'm trying to get the message author of the reacted message, I saw the moyai plugin use messageAuthorId for MESSAGE_REACTION_ADD
however when I try to access it it returns always undefined, am I missing something?
however logs show that it exists as property
MESSAGE_REACTION_ADD({ channelId, guildId, userId, messageAuthorId, emoji }) {
const currentUser = UserStore.getCurrentUser();
console.log(messageAuthorId, currentUser.id);
}
im a little confused, appreciate any help
my current fix is just fetching the message manually but thats a meh solution
you don't seem to be destructuring right
moyai also returns undefined, either its just my stupidity or smth else
oh wait i see now
you can either patch the flux event to take in message_author_id (kinda stupid to do it just for one plugin) or just MessageStore.getMessage(event.channelId, event.messageId).author.id
yeah that's what I did, thanks
can someone look this over? I still have no clue what could be wrong
how do you call ExtraPluginTab
export default wrapTab(ExtraPluginsTab, "Plugin Repo");
and then index.tsx just pushes into the Vencord section in settings:
async start() {
const customSettingsSections = (
Vencord.Plugins.plugins.Settings as any as {
customSections: ((ID: Record<string, unknown>) => any)[];
}
).customSections;
customSettingsSections.push(() => ({
section: "PluginRepo",
label: "Plugin Repo",
element: require("./ExtraPluginsTab").default,
className: "vc-plugin0-repo",
}));
}```

Imma try reinstalling dev build from scratch and see what happens
yeah it still crashes, so it has to be something with the code somewhere
turns out it was just because the function that renders the install button used multiple hooks (useState and useEffect) and was in the same file instead of being a separate component
How could i get/set profile data like pfp, banner, pronouns, bio, etc? I'm trying to make a profile preset saver system but i have no idea where to start
maybe look in the network tab in the inspector, when changing your profile
this might also be useful
PATCH -> https://canary.discord.com/api/v9/users/@me/profile
the field names are nearly the same as in the settings
don't send the request manually and don't manually bother with proto
use react devtools to inspect the change profile ui, specifically the save button
I know you should do it like this: findByProps("getAPIBaseURL").HTTP.patch({url: "/users/@me/profile", body: {}})
oh, this looks interesting, thank you
if the client is already using something then you don't need to manually fetch it
that just makes it harder on yourself and potentially makes you seem sus to antispam
profile stuff isnt in proto settings
yea, that's why I said this: #🧩-plugin-development message
doing a patch like this is fine in this case
yeah HTTP.patch({url: "/users/@me/profile", body: {}}) is best here
there's probably a func for that too
i was just going off proto cause ^ :p
only to save the pending ui state
no point bothering
I didn't read the message properly :P
@dull magnet Some notes about https://github.com/Vendicated/Vencord/pull/1976
I implemented adding the attribute, but I can't seem to be able to use it in CSS...
Also the CSS in the PR is completely borked now, that does however present the option of just removing it completely and just changing the src like it's already doing
you would have to specify the type of value to be parsed as the second argument of attr()
no css engines currently support that
https://developer.mozilla.org/en-US/docs/Web/CSS/attr#url
use a css property instead style="--something: url('....')"
oh wow ok, thanks
real, my bad
is it possible to change what audio channel/device discord is using for screenshares? I use Elgato's Wavelink and discord uses the Monitor-mix... which includes the discord audio
opened a support ticket half a year ago and they said its a "known issue" but no fix :P
hey, I want to learn about how to make a plugin.. I have checked the repository for some examples but im really confused about how would I run my own custom code
is there any guides or documentation for that?
{
find: ".LABEL_WITH_ONLINE_STATUS",
replacement: {
match: /(src:null!=\i\?(\i).{1,50}"aria-hidden":!0)/,
replace: "$1,\"style\":{\"--large-avatar-url\":\"url(\"+$2.replace(/\\d+$/,$self.settings.store.imgSize)+\")\"}"
}
}
this feels cursed
from what I got so far, I need to compile the whole to add a plugin?
yep
oh, nice, I think I managed it
is there a mor epractical way to re-deploy and test that does not require restarting the client?
or I need to build and inject every time?
is tsx supported for plugins?
check the existing plugins and you'll see
ok thanks
oh, nice, thanks
yes, I have seen a few in the repo
@dull magnet is there a documentation for development?
Im trying to get familiar with it by looking at how some plugins work, but it would be really nice if there was somewhere to check how it works
who wrote that? 
that helps
that one helps even more xD
thanks
me
that's some of the oldest code in vencord
back then you still had to install from source
without gui installer
ven so silly
should keep it like that
less support

omg cute
that was within the first month of vencord existing
shortly after swc explosion
what if i change the bundler again
take me back https://github.com/Vendicated/Vencord/tree/c3ff092162ef1a98bea78213e473be3207998d72/src/plugins
real
horror
I need some help, im still trying to understand how to do a patch
from what I got the replacement is where you can make so it repalces a piece of code with a different code, for which I can do $self.someFunction so it points to a function in the plugin file
correct?
but what is the find section of the patch?
Im trying to do something basic, to find the text input and add a onClick to it as a way to learn how to do it
NAAAH
I tried this repalcement:
replacement: {
match: /(parent: r,)/,
replace: "$1,onClick:()=> $self.testHandler();",
}
and I think it is about right, but I don't know what to put on the find
you search for the module that interests you via find, then you modify it via mach and replace
so in find you add something specific to the module with text input, but be aware that some things can randomly change (eg. variable names)
Im absolutely new to coding things for Vencord tho, so, pardon my noobness, Im experienced in coding in general tho
How am I able to figure out in which module is the target of my patch?
for example, I want to add a onClick to the text field, what should I do to figure out what to place on the find in order to get the correct module?
first of all you need to find the module manually. aither bress ctrl+shift+f ind devtools and search for things that are related to what you are searching for, or use react devtools or breakpoints
yes, I think I found it with the react dev tools
now you need to find something specific to this module that isn't in any other modules so vencord will patch only this module and not some other random ones
oh, so, the find is just a string unique to that module to ensure the following repalcement does not target the wrong module, is that it?
yes
makes sense
I'll try thankyou so much =)
@sand ember when it is successfully patched, are the patched code visible when I navigate to it via the dev tools?
idk
fair
cumcord never forget
yes but you can just use vencord companion (see pins) to test right from vscode
this is a banger file name
https://github.com/Vendicated/Vencord/blob/c3ff092162ef1a98bea78213e473be3207998d72/src/plugins/STFU.ts
**STFU.ts: **
import definePlugin from "../utils/types";
export default definePlugin({
name: "STFU",
description: "Disabled the fat warning in the DevTools console",
author: "Vendicated",
start() {
window.DiscordNative.window.setDevtoolsCallbacks(null, null);
}
});
does anybody know the different values for status (e.g. online, idle) when using FluxDispatcher for "USER_SETTINGS_PROTO_UPDATE"?
edit: i've tried various values, like 'online', 'idle', 'dnd' but suspect it might use different integers hmm
show what you tried
function updateStatus(status: any) {
const desiredStatus = status ?? settings.store.chosenStatus;
const proto = UserSettingsActionCreators.PreloadedUserSettingsActionCreators.ProtoClass.create();
proto.status = desiredStatus;
if (desiredStatus !== typeof undefined) {
FluxDispatcher.dispatch({
type: "USER_SETTINGS_PROTO_UPDATE",
local: true,
partial: true,
settings: {
type: 1,
proto: {
status: desiredStatus,
}
}
});
}
}
unsure how to format with color 😭
settings.store.chosenStatus is either 'online', 'idle' or 'dnd'
Will check that, thx for the help
```ts
anyway dont do that lol
react devtools inspect this
see what it does
this also works (credits to vee)
const setStatus = findByCode(".USER_STATUS_UPDATED")
setStatus("dnd", null, { location: { section: "Account Panel", object: "Avatar"} });
don't use this kinda function? this isn't for animated text status or anything
woah i'll check it out
if you help people find it themselves instead of just spoonfeeding solution, they won't have to ask again in the future
no, your code is just very wrong. you are doing very strange stuff there that's far off the right track
whenever you need to find something, think about whether there is a ui element inside discord that does what you want
in your case, you want tochange the status programatically, so you need to look at what this does
so you need to inspect that element with React Devtools to see what it does onClick / onSelect, etc...
here's an example for finding the function to join voice channels
just adapt to your use and you'll easily find most stuff
holy moly that is very informative, i will make sure to use this strategy. i have used the sources and components tab until now, but i see how the functions work now as well
i didn't understand how the breakpoints were of use at first, thanks for the help! ska_capoonod
the status picker is a little silly because the elements collapse in the components tab when the different status UI elements disappear from view
yeah its tough to inspect that
you can use the custom status option instead :p
it opens a modal with save button
breakpoints are your friend :3
would it be possible to automatically insert text into the message textinput if so, how?
see how QuickMention plugin does it
i.. forgot that wasnt a vanilla dc thing, thanks lol
where are the did-you-know splash texts stored?
tyty
Yes I did know 3.141592653589793
I also know 238462643
Looking for feedback, is this patch robust enough?
horror
you can just enable ignoreactivity and turn it off for re-volt
what is skulling me
@fresh raptor
self bot
vban @fresh raptor selfbot lmaoooo
Done! 
lmaoo
True
i did it a couple days ago
But what if you are a revolt gamer and use revolt and discord?
Mmm, true
Regardless, i want to get some feedback because it's my first time learning how to patch thing
even if i can just disable the activity
Oh yeah, you're right! thank you
{
match: /setObservedGamesCallback\(.{1,2},(.{1,2})=>{/,
replace: "$&$1=$1.filter((x)=>x.id!=='498994022048727050'||(x.id==='498994022048727050'&&!x.exePath.contains('revolt-desktop/revolt.exe')));",
};
Wonder how he got that to work
Fair





