#π§©-plugin-development
1 messages Β· Page 67 of 1
https://discord.com/developers/docs/resources/message#attachment-object
Seems similar to this
except idk what downloadUrl is
what function is suggested for stickerstore grabbing for a js snippet?
have you tried findStore
It's the same thing but returns instantly instead of doing a lazy proxy
looks a little better
alternatively, if you have ConsoleShortcuts enabled there is a global Stores variable you can use
Vencord.Webpack.findStore("StickersStore").getRawStickersByGuild()
ah I found it thank you
this is a little weird though:
Vencord.Webpack.findStore("StickersStore").
getStickersByGuildId("1015060230222131221")
found it
png = 1
apng = 2
lottie = 3
gif = 4
problem format_type uses enum so it makes downloading the sticker a bit harder
it uses the url:
https://cdn.discordapp.com/stickers/
which has id then extenstion type at the end
async function ZipStickerEmojis(serverId) {
// Fetch fflate library (consider using a bundler for production)
await fetch("https://unpkg.com/fflate@0.8.0").then(r => r.text()).then(eval);
const stickers = Vencord.Webpack.findStore("StickersStore").getStickersByGuildId(serverId);
if (!stickers) {
console.log("Server not found!");
return; // Early exit if server not found
}
const fetchSticker = async (sticker) => {
let filenameSuffix;
switch (sticker.format_type) {
case 1: // png
filenameSuffix = ".png";
break;
case 2: // apng (treated as png)
filenameSuffix = ".png";
break;
case 3: // lottie
filenameSuffix = ".json";
break;
default:
console.warn(`Unknown format type: ${sticker.format_type}, using .png ${sticker.id}`);
filenameSuffix = ".png";
}
const filename = sticker.id + filenameSuffix;
const stickerBlob = await fetch("https://cdn.discordapp.com/stickers/" + filename + "?size=512&quality=lossless").then(res => res.blob());
return { file: new Uint8Array(await stickerBlob.arrayBuffer()), filename };
};
const stickerPromises = stickers.map(fetchSticker);
try {
const results = await Promise.all(stickerPromises);
const stickersZip = fflate.zipSync(Object.fromEntries(results.map(({ file, filename }) => [filename, file])));
const blob = new Blob([stickersZip], { type: "application/zip" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = `stickers-${serverId}.zip`;
link.click();
link.remove();
} catch (error) {
console.error(error);
}
}
await ZipStickerEmojis("1015060230222131221");
a lot of ccess to fetch at 'https://cdn.discordapp.com/stickers/1278788623243804682.png?size=512&quality=lossless' from origin 'https://discord.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
findStoreLazy is the same thing... but lazy
findStore has more methods than findstorelazy
it doesn't
findStoreLazy returns a Proxy which is used to make it lazy
let me show you
how the fuck would i patch function R in module 219797
as you can see cached is undefined
With surgical precision
now use it once
there's the value and all the methods
what do you need to patch
well it has content_type so use it so differ from the other
guhhh somehow missed that
ty
π
That's not json
I am do used to typing json for codeblocks
i like never use json codeblocks discords json codeblocks look so ass xd
Ah
async function ZipStickerEmojis(serverId) {
// Fetch fflate library (consider using a bundler for production)
await fetch("https://unpkg.com/fflate@0.8.0").then(r => r.text()).then(eval);
const stickers = Vencord.Webpack.findStore("StickersStore").getStickersByGuildId(serverId);
if (!stickers) {
console.log("Server not found!");
return; // Early exit if server not found
}
const fetchSticker = async (sticker) => {
let filenameSuffix;
switch (sticker.format_type) {
case 1: // png
filenameSuffix = ".png";
break;
case 2: // apng (treated as png)
filenameSuffix = ".png";
break;
case 3: // lottie
filenameSuffix = ".json";
break;
default:
console.warn(`Unknown format type: ${sticker.format_type}, using .png ${sticker.id}`);
filenameSuffix = ".png";
}
const filename = sticker.id + filenameSuffix;
const stickerBlob = await fetch("https://cdn.discordapp.com/stickers/" + filename + "?size=512&quality=lossless").then(res => res.blob());
return { file: new Uint8Array(await stickerBlob.arrayBuffer()), filename };
};
const stickerPromises = stickers.map(fetchSticker);
try {
const results = await Promise.all(stickerPromises);
const stickersZip = fflate.zipSync(Object.fromEntries(results.map(({ file, filename }) => [filename, file])));
const blob = new Blob([stickersZip], { type: "application/zip" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = `stickers-${serverId}.zip`;
link.click();
link.remove();
} catch (error) {
console.error(error);
}
}
await ZipStickerEmojis("1015060230222131221");
Fixed
I'm not sure why grabbing stickers grabs where
I could move onto try to making my suggestion.
The group dm thing.
I need to learn how to override the options and how I'll display it
I could probaly use my java knowledge to help with this
Essentially I need to an option to here:
then list it like the friend menu
i figure a plugin itself won't just allow me to add a button
so how does one inject stuff into the ui element?
Patches
so how would I patch this in?
do you have an example of patches?
Check literally any plugin
I mean a ui patch
Yes, there's quite a lot of plugins that change the ui
index.tsx: Line 84
patches: [
how does the patching work?
Regex replace
so we need to basically find the regex near store and then use regex to create an object?
You find the code that does what that component does, and you replace it with code that does what you want it to do
I am looking to essentially have a copy of friends but with no organization and I plan on grabbing the group chat symbol from the group chat section i.e. the one that closes and reopens the view members section
so basically the members show on and off
Like that except without the add button
How would I grab the image that I want with regex ie svg next to group chat?
Ie the version for member show/disappear
probably browser cache and the signed link expired?
nop
0 width 0 height?
husk
yop
IT WORKS FINE FOR AVIF
shouldnt that return a 400 error or something like it
???
nevermind, thats not even it
it wont load with any of these
&format, &width, &height
if i remove them all it loads
odd
It kept doing that for sticker stuff
So I couldn't zip sticker snippet
could you give me example how the vencord patches work?
Like how does one grab what to replace or copy?
build with dev and use patch helpoer
what's patch helper?
I mean I know what I want to patch just not how to generate the thing necessary for it
use build --dev i believe
@tropic ice off topic but you can get contrib role if you do vgh
vgh?
so there's json patch here,
What I am trying to do is mess with html tho:
I have a general idea what the html looks like too
what are you trying to make?
this?
so add a button there?
i am trying to inject a button under the friends section and if possible I want to grab the icon here so I can use it as the icon there:
turn on react devtools, and click there and find the code that adds those buttons
think this pinned message shows an example #π§©-plugin-development message
maybe look at PinDMs
I think that's patching where you want probably?
not positive though
i'm not very good at finding the place to patch, and i need to do some stuff
<li class="channel_c91bad container_d91ad9" role="listitem" aria-posinset="1" aria-setsize="278"><div class="interactive_f5eb4b interactive_c91bad linkButton_c91bad interactiveSelected_c91bad selected_f5eb4b"><a class="link_c91bad" data-list-item-id="private-channels-uid_18___friends" tabindex="-1" href="/channels/@me"><div class="avatarWithText_c91bad layout_ec8679"><div class="avatar_ec8679"><svg class="linkButtonIcon_c91bad" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" class=""></path><path fill="currentColor" d="M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z" class=""></path></svg></div><div class="content_ec8679"><div class="nameAndDecorators_ec8679"><div class="name_ec8679">Friends</div></div></div></div></a></div></li>
This the html to that
Patching seems like i want
The text says Friends and the 1 key is "friends".
So I just need to add an interactive button like that it has to the ui
I recommend you read this https://gist.github.com/sunnniee/28bd595f8c07992f6d03289911289ba8
you first need a basic knowledge of how the core of Vencord works, because it has nothing to do with the actual html
I think pin dms may touch what I want actually
https://github.com/Vendicated/Vencord/blob/main/src%2Fplugins%2FpinDms%2Findex.tsx#L125
src/plugins/pinDms/index.tsx: Line 125
find: ".FRIENDS},\"friends\"",
did you even read what nuckyz sent you
I have read that a few vencord guide times
wait wtf
is nvm i broke a thingMessageActions.getSendMessageOptionsForReply(reply) broken
eslint shouldnt have output except on errors..?
Yeah but it doesn't show anything even if I have blatant syntax errors
In another clone of the repo it prints > eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern src/userplugins and actually does something
Oh, just needed to pnpm install to update shit
π
I'm also getting this annoying box when running in injected discord-desktop
Pretty sure I've solved that before, but I don't remember how
install openasar
_breadcrumbs is not iterable = install openasar
π #π₯-vencord-support-π₯
(Auto-response invoked by @empty sundial)
looks like I made it. to hide the Activity Feed on member list
using the interceptor concept I brought up before and haven't worked on for a month,
tbh I don't know how to modularize the plugin/index.ts into several files to handle their own things, but one thing I did to test is by putting interceptor somewhere outside the plugin/index.ts so I can read the plugin flow properly and make interceptor to actually works to stop an event from triggering, this includes CONTENT_INVENTORY_SET_FEED
Isnt there literally a toggle for that
leaves the header but that can be hidden with shrimple css
how can you tell the server is public with information like this?
{
"state": "RESOLVED",
"code": "VHdRKhAt",
"guild": {
"id": "1015060230222131221",
"name": "Vencord Vendor Venniecord",
"splash": "cde86c118094beb5fa378d4b07584195",
"banner": "a_a42646da37160e4053f1823649177f0a",
"description": "Vencord is an extremely cute mod for the Discord desktop & web apps, offering support for plugins and themes",
"icon": "6f998a9581a74ef1bbadae0e904e5958",
"features": [
"GUILD_ONBOARDING",
"COMMUNITY",
"PRIVATE_THREADS",
"MEMBER_PROFILES",
"CHANNEL_ICON_EMOJIS_GENERATED",
"PREVIEW_ENABLED",
"WELCOME_SCREEN_ENABLED",
"GUILD_ONBOARDING_EVER_ENABLED",
"ENABLED_DISCOVERABLE_BEFORE",
"THREE_DAY_THREAD_ARCHIVE",
"BANNER",
"GUILD_SERVER_GUIDE",
"GUILD_WEB_PAGE_VANITY_URL",
"SOUNDBOARD",
"ANIMATED_ICON",
"SEVEN_DAY_THREAD_ARCHIVE",
"AUTO_MODERATION",
"ANIMATED_BANNER",
"INVITE_SPLASH",
"ROLE_ICONS",
"DISCOVERABLE",
"VANITY_URL",
"NEWS",
"CREATOR_ACCEPTED_NEW_TERMS",
"GUILD_ONBOARDING_HAS_PROMPTS"
],
"verification_level": 3,
"vanity_url_code": "vencord",
"nsfw_level": 0,
"nsfw": false,
"premium_subscription_count": 48
},
"channel": {
"id": "1039585467584229479",
"type": 0,
"name": "moderator-only"
},
"inviter": {},
"approximate_member_count": 73647,
"approximate_presence_count": 19846,
"expires_at": "2024-09-18T08:48:40+00:00",
"type": 0,
"flags": 2
}
One of the features IIRC
wait nvm, it would have yeah I just noticedDISCOVERABLE
discord is weird. the top one is discord web and the second one is desktop like why? misjudged
wait, does the embed change based on the inviter?
oh it does. it displays the channel if you are the inviter or the member count if you are the receiver
can I somehow find out the max length of a message the user can send? (a value that will always be right no matter when discord changes it or if the user suddenly gets nitro)
yes
UserStore.getCurrentUser().premiumType ? 4000 : 2000
There's a module that looks like ```js
function (e, t, n) {
"use strict";
n.d(t, { Z: function() { return o; }, });
var r = n(442837),
i = n(594174),
a = n(74538),
s = n(981631);
function o() {
return (0, r.e7)([i.default], () => a.ZP.canUseIncreasedMessageLength(i.default.getCurrentUser())) ? s.en1 : s.J6R;
}
};
But I don't know how you'd find that module programmatically, there's very little distinctive code to target
I guess it might not be too bad if you can use regex finds
i would just hardcode
Yeah, it's not likely to change particularly often
it's way more likely for discord to change that function than to change the message size limit
it has never changed
if you really want to get it from discord
findByCode("canUseIncreasedMessageLength", ")?")
did you find out how to do it?
yes
i'm trying to create something to automatically start a stream. every time i join a vc the issue is im unable to locate the function to even intiate that event i've come across fucntions like self_stream and whenever i call it it's prompting an error message
almost as if i'm missing paramaters am i missing something or is this just not possible on desktop client?
in short: what's the function used for starting streams on discord?
yeah i followed it the issue is the button that starts the live-stream, there's no onclick event
its only for the back button idk if i'm doing something wrong
how could I jump to a channel?
that doesn't help
the toggle still shows ACTIVITY group above topmost members
I think as side-effect of my plugin no more activity to show up on friends list π€ (like I would see those anyway)
holy shit other people's devtools dont lag to death when you use a breakpoint ???
@hushed loom hi im trying to implement your suggestion but the arguments doesnt seem to have what i need (checked prop of each Item of Menu)
arguments
and function im patching
I logged Object.keys of arguments[0] and got
["closePopout"]
busy rn, ill take a look later and see what i can do
sure, thank you
!remind 2hr stabilize guild lurk snippet
Alright @iron epoch, in 2 hours: stabilize guild lurk snippet
almost done, give me your opinions
with banner is better
banner is better yeah
i think you should definitely do something about that join button because itβs spaced out quite alot idk
maybe increase the width it might make it look ugly though so probably just tamper around with it until it looks appealing i guess
Move the invited you to join line to where this line would be in theory, and use that style
I am not sure how to say this but I was referring to the "___ has invited..." 
@iron epoch Can you share a link to your code?
well i like bottom one better:3

didn't push it to github yet
give me a sec
@
@flint bronze ^
ok
quick code review: so much hardcoded stuff
change the find and the obvious first line of css
wait
@iron epoch can you DM me an invite you made?
just stock?
i might have DMs off hold on
yeah sure
replace: "$1:$2 || GuildStore.getGuild(arguments... will only work if you have ConsoleShortcuts
ty for pointing that up
ok time to clean this code up
you going to work on this first?
im gonna fix your find that will break if blindly fixed or left too long
alr. keep me updated
!reminder 1hr continue
Alright @iron epoch, in 1 hour: continue
@iron epoch, <t:1726131160:R>: continue
i have an idea for a plugin, but idk how hard it is
basically validchannels
validreply seem simple and i would guess it's similar to it ?
but valid user seem more complicated and still similar...
i thought, an unknown channel = you actually can't access it
except for archived threads sometimes
If someone links to a channel in a public guild you're not a member of, it'll show up as #unknown until you click it
not really useful cause u can just click the mention
if you can access it will load it
this^^
How do i make a container scroll vertically when it overflows? (with discord styles) i tried putting my elements as a child of a ScrollerThin but there's no visual difference
Maybe i need to pass extra props or something i'm not sure
Nvm i'm just stupid 
could someone help me w this 
thank you
you can't see #unknown but you can see the name of the #noaccess channel
but I think the ShowHiddenThings plugin already does that
It uses a state from a store, and not arguments
oh wait
ty AppleMusicRichPresence π time to fix this
there's already fix pr
thank you, i figured it out
I had spent countless hours on this but you made it 100x easier with the hint
!reminder 1hr format ISO8601 timestamps for BetterInvites
Alright @iron epoch, in 1 hour: format ISO8601 timestamps for BetterInvites
can somebody help me find the function to start a stream on discord?
iβve tried using react dev tools still unable to find it and i think it requires certain parameters can someone help me please
no, not if it's a post of a channel of post you have access to if you are not subbed to the post by example
and sure clicking it fix it because i visit the thing and then it's cached
@iron epoch, <t:1726183525:R>: format ISO8601 timestamps for BetterInvites
epic
yeah thatβs cool
in the original one it showed who created the invite idk if you removed that
btw either this and/or https://docs.vencord.dev should be pinned somewhere
somehow the official docs seem to not be linked anywhere from the vencord/vesktop githubs nor websites
because it's not done
icic
been reading through it and its actually really really good docs so π keep pogging, etc etc
just did some rework on that
it's a header ofc the avatar going to be big..
what about this size?
add option to add banner in invite when sending
like optional on whether you want that enabled or not
not possible*
sound simple enough, will attempt.
*unless you want to add ugly query parameters
wouldnt that require hacking around the code that actually parses embeds?
because banners are a server boosting thing that are always shown if sent
such an option would only work for people using the plugin
I took a double take and yeah not possible 
only if like client side
hope that's enough because I got tired from screenshitting every 5 minutes
screenshitting
Is there an api for patching the butttons on a file attachment as well? There looks like there is one for the MessagePopover, but not the ones for the attachments, maybe I'm missing something though
there isn't no
K so custom patch it is then I guess

The way vencord does its patches is so foreign to me lol... definitely not used to that replacement/match object thing
it's literally just regex replace on the code xD
if you know regex you're halfway there
Yeah no I get the concept, its just not how I'm used to doing it
The patch helper looks useful though
i like it way better than monkeypatching
Fair enough
no more monkeypatching, digging through react trees, having to do cursed workarounds when stuff isn't exported, etc
and perf π
and access to local variables 
i love defining random variables in a sea of single letter variables that mean NOTHING
the fact that advaith who's literally just an intern is fixign all these things that have been bugging people for ages in such short amount of time
wtf do the other devs do
nothing
make shitty things like content inventory email service
that users will complain on r/discordapp about
yes, discord will email your friends when you start playing games now
what a horrible update
wow I've been at Discord for a week! It's been really fun!
here's some stuff I've done:
- added gif favoriting to mobile!
- added copy id buttons to desktop emoji & sticker pickers
- added the convert emoticons setting to mobile
- many bug fixes, including mobile padding issues
one fucking week
took him one week to make discord better
vp noRPC

vesktop port when?
just turn off arRPC π
thatβs a lot of work
HOLY SHIT WE ARE BARRACK
HOLY SHIT IT'S ALMOST JOEVER
time to kill https://vencord.dev/plugins/TimeBarAllActivities
he is LITERALLY the goat
quite literally the same amount if not less cause u dont have to search for the plugin πππ
@hoary pilot #1266479667561369740 can't Constants.Endpoints.GUILD_ROLE_MEMBER_IDS be used instead of checking the cache? or you just keeping it safe?
pull a #FixTF2 and get him hired. start a gofundme for the bribe money
thatβs hard limited to 100 people
cache allows me to get more
can u play apple music with time bar
oh u did thanks
nope gone again
huh it doesnt show two for me
we could maybe add time bar to lastfm rich presence too then
guhh lastfm doesnt send track length
so bad
you have to call https://www.last.fm/api/show/track.getInfo too
The world's largest online music service. Listen online, find out more about your favourite artists, and get music recommendations, only at Last.fm
hmm
so bad, it only returns extra info about the artist
okay kill yourself lastfm
nvm it does work on more popular song
guh i discarded my work already
To submit a plugin I just open up a PR right? Or is there an extra step involved?
to my knowledge i thought that was temporarily closed recently
because of all the useless requests
No I mean genuinely submit the code of a functioning plugin, not just a request lol
Plugin requests were closed because they sucked
oh okay iβm not really sure about that tbh
Contributing plugins is fine I'm pretty sure (but obviously not everything is accepted)
am i allowed to share one of my ideas here or is that not allowed
itβs something i intend on working on
i just donβt know whether iβll be able to do it
they were so funny tho...
terrible suggestions really nobody is really thinking of good ideas
most useful plugin request: #π³-plugin-requests message
CTRL+Z my beloved
Big fan of ctrl-v
Yeah I just made a pr lets see what happens
yep pr is correct
also wow looks really good based on a very quick skim
you definitely know your stuff 
So I just got feedback on my Pr that I can use agruments[0] to get variables or something?
So I tried
{
find: "Messages.IMG_ALT_ATTACHMENT_FILE_TYPE.format",
replacement: {
match: /(newMosaicStyle,\i\),children:\[)(.+?\])/,
replace: "$1$self.renderPreviewButton(arguments[0]),$2"
}
}
But then the printed argument is something pretty useless, I think its like the entire module?
I would need the actual attachment/message object... I'm not really sure how that arguments thing is supposed to work, maybe my regex is matching something in the wrong scope i dont really know
Can someone help me out as to what I'm doing wrong?
Show me the patched code
iirc arguments dont always work in arrow funcs and things like that
It should work there where they are patching
Do you mean the function I'm patching in or the module where the patch is applied?
Like the entire thing
Screenshot of where that renderPreviewButton is
The arguments I need are above that
That's why I had a weird group matching at first to get these variables
Can you log the value in code
e,t, n are irrelevant
They are for webpack/module stuff we dont care about
Then I guess my previous match didn't do what I wanted anyway
You were just lucky with it since they both use e
When I print arguments[0] in my renderPreviewButton function it prints that from my first screenshot
π€ i dont think it should
So this prints the {id:..., loaded:true etc.} thing
Here you may be able to see it better in debug
huh
oh it is this
then it is my fault
Ok so then I try to match the arrow function to get the varible from there? Or maybe when the parameter gets destructured?
is it really worth it to add a patch to modify an element style when I can do
h3[class^="h5"]:has([class="vc-bi-header-inner"]) {
display: flex;
margin: 0 !important;
}
replacement: {
match: /newMosaicStyle,\i\),children:\[(?<=}=(\i);.+?)/,
replace: "$&$self.renderPreviewButton($1),"
}
Ah cool thanks... thats like a positivie lookbehind or something right? Wouldn't have thought of that...
having trouble trying to get devtools working for vesktop, react is enabled in settings
ill just use website for now but does anyone have any tips?
ah i remember why i didnt use website. i dont have vencord set up
would it be OK to make a PR that adds role color to these for RoleColorEverywhere
how would you get the image out of a command
the args parameter just has 0 as the value
also why is the command sending in chat
{
name: "testcommand",
description: "testint123",
options: [{
type: ApplicationCommandOptionType.ATTACHMENT,
name: "testimgarg",
description: "guh",
required: true
}],
execute(args, ctx) {
console.log(args, ctx);
},
}
https://github.com/Vencord/plugin-requests/issues/674 oh crazy someone alr had the same idea
set it up but vencord settings didn't have a react toggle
idk, might just leave it to time and others; i should be doing hmwk instead π
I made that, but I never pr'ed it
yes it does
How do i get a callback whenever the user tabs into a channel? i thought it might be a flux event but i don't feel like looking through the 111 channel events
FluxDispatcher.subscribe("CHANNEL_SELECT", (e)=>console.log(e))?
also you can just subscribe the event "EVENT" to a console log and then do the action you want the event for
iirc anyway
if not just add an interceptor with a console log
you didnt set the command type properly
@dull magnet sorry i accidentally fell asleep in the middle of the day, do you think adding the timeout details popout to the members page is a good idea
how about oversimplifying the regular timeout tooltip to look like the one in the members page
that and maybe right click to show the reason
then u just replace the entire tooltip with the reason
or left click
clicking that does the same thing as clicking anywhere else on the row
yippee
oh there's literally a toggle for built-in react devtools whoops
i was wondering how i can make images not expire
not possible
iirc there is an endpoint to refresh the links tho
i think i might need that endpoint
Youβve found the Unofficial Discord User API Documentation! These pages are dedicated to showing you all the ways that you can use Discord to make cool stuff. It is not an official source of informati...

how do you get value of a field? not rawValue (if i understand correct theyre both diff things)
or a way to convert these strings into unicode enojis?

... is that a custom made plugin
yes
looks really nice im gonna assume you made that
because there's tabs also
I wasn't the original creator but ywah
my way of saving images was uploading it to my own server, using my discord-bot and then grabbing the URL from uploading and putting that within the embed
that was for avatars / banners since when the user changed their pfp it would make it load indefinitely and not display an image anymore
idk its been months and the image is still there i don't know when a image expires though
how could i open a DM with a user ID using vencord's apis?
look at on-click function of user context menu
i forget how off the top of my head
this wouldnt work for my plugin
PresenceStore
NavigationRouter.transitionTo look at KeepCurrentChannel plugin
the dislikes 
is this an error in my code or is it something else?
U still need this, or did you figure it out
dont spoonfeed too hard
just use react devtools on the private message button in context menu / profile
and you will find the handler and what it does
and figure it out from there
idk why i highlighted onClose
you need action
found
is it possible to add a custom menu item to vencord-toolbox instead of just a string via toolboxActions in plugindef
nop
might have phrased that incorrectly
is it possible at all
doesnt have to be via plugin def
your answer is in the code of the plugin
I (well the person that told me how to do this) was able to do it with toolboxActions
oh wait that's what this image is
We talked about this a few days ago #πΎ-core-development message
what should be the name of plugin that allows you to save your status?
StatusPresets (?)
yeah that sounds good. thanks

what's stopping me from patching? 
Your guilty conscience
LMAOOOO
that works π
Holy shit I have a really cursed idea
StatusSets
bro is gonna monkey patch .push to add new items
Even worse
If I can get it to work I'll post it
is it js magic tricks
just
how would one patch the function to check if a message should notify you?
I don't even know what to be looking for
Use a flux interceptor?
is that a "how tf do you not know this" question mark, or a "im not sure about this answer" question mark?/genq
latter
it's not properly typed to my knowledge
effectively you can use FluxDispatcher.addInterceptor((event: FluxEvent) => void) to add a function that intercepts flux events before they are dispatched and can edit them
don't do that
does it not work well for this use-case or is it really unreliable
you shouldn't use it
i'd imagine you could edit the message event but also that does seem quite hacky
just patch the handler

discord code can get overwhelming fast
i have never actually looked at where actual system notifications are created
I've messed around a bit with that, got a half-baked plugin that for example adds "user1 replying to user2" to the notification title
thats why i wouldn't initially try to patch there but considering how much uses message events it definitely seems unsafe
How unrealistic is it to rip out the stock Notification API entirely?
And replace it with something else (not with the Vencord notification API)
FluxDispatcher._subscriptions.YOUR_EVENT
that reminds me what are the stupid rare things that use this system, not that I should use this primitive system
Iirc the native notification api is used in a few other modules too, I haven't bothered to investigate those in detail
I really don't care about patching it everywhere
I want to patch message notifications
and make them look like REAL system notifications with RICH CONTENT like IMAGES and REPLY BOX
Then the module in that plugin might be worth investigating
i looked into what interceptors exist 
?remindme friday 7pm kill nixos
Alright @flint bronze, in 2 days, 7 hours and 4 minutes: kill nixos
this is needed
they use one for CONNECTION_OPEN and OVERLAY_INITIALIZE
husk
they could just make a function dispatchConnectionOpen and use it everywhere and then that function can do the interceptor

boom perf alr better
true
next HOP OFF SERIAL FLUX
WHY THE FUCK DOES IT WORK LIKE THAT
i know 
so if you do like FluxDispatcher.subscribe("FUNNY", () => sleep(10_000)
it will freeze discord for 10 seconds 
have you ever tried to jump through a flux event in debugger
i have and i didnt understand wtf was going on
good thing there is no sleep function in JS
do nothing loop 
why did you edit it to the wrong method
Isn't xmlhttprequest blocking
nope
I don't think so
but there is synchronous XHR
It doesn't use promises though 
I'm a dummy and never bothered looking into what the issue was, but I've had situations where subscribing to the event didn't work as intended, but adding an interceptor did. Modifying the mentions array on a MESSAGE_CREATE from memory
I think there was some old http api that was sync, but might be misremembering
im stupid
rate
use updateMessage() function
is there any way to execute a webhook via vencord web plugin
bc u cant access native and cors prevents u
why do you need to use webhooks
i want to make a plugin that forwards certain messages to a webhook
that is why i need to use webhooks
make a ||self||bot instead of plugin
not sure where to start with that one
please do NOT dm me where i can find resources on that
it's pretty easy you just gotta connect to gateway, listen to messageCreate event, and then post to webhook
https://github.com/dolfies/discord.py-self
https://github.com/aiko-chan-ai/discord.js-selfbot-v13
any potential risk factors to this? no detection as long as there's no output right?
it's just connecting and listening to events there's 0 risk
risky is only once you do write actions
alright, well thank you for the suggestion i'll probably look into that
couldnt you just make an app that does one of these things
I made a PR to update a plugin
do I have to do anything else
I feel like I must have missed something crucial but I followed the instructions in the docs to make a plugin and tried loading it in Vesktop but it does not show up in the plugins list. I made the index.ts file in a subfolder in src/userPlugins, i'm not sure what else needs to be done
Never mind I misread the documentation userplugins should be all lowercase
userplugins
all lowercase
oh you already found that out
whoops
Wanna show me how?
there is a pr; i think its called WebhookManager
uses native
isnt native inaccessible on vencord web?
yes
Of course it is
ok so how would you execute a webhook on vencord web
that's the price you pay
that was my question
Wonder I'f there's some proxy server
If that would work
not possible only if you found a way to use the extension as a workaround which won't be worth it if you have no idea how vencord build itself
It was giving me an error when i tried to fire a webhook from discord.com
cause that should never rlly happen
So it rejects the request
On the server yea
u cant
Send full object
i alr lost it
but its essentially a result of me not finishing my settings object
on the other hand i crashed my developer tools multiple times now (its not responding)
now my vscode too
hi guys take a totally useless plugin that can probably be done fine with css to hide the stupid 2fa required box
import definePlugin from "@utils/types";
export default definePlugin({
name: "1FA",
description: "never get bothered about 2fa moderation again!",
authors: [
{
id: 1003477997728313405n,
name: "Death",
},
],
patches: [
{
find: "APPLICATION_SUBSCRIPTION_EXPIRATION:",
replacement: [{
match: /GUILD_MFA_WARNING:return/,
replace: `GUILD_MFA_WARNING:return;return`
}]
}
]
});
possibly the most useless thing i've ever done
i do think cssing it removes the banner though
so

I had the same problem. Its cause the electron instance from Discord only has a certain amount of ram allocated by default. A work around is to start the dev tools while discord is still starting (so when you see the discord icon and the seperate window is still showing)
thats funny considering my discord consumed 8gb at one point before vesktop 
ur workaround works though thank u so much

not useless it's actually a good plugin
only for newer accounts though without a number
otherwise you won't really encounter this and most servers are email verified so
css can do probably
skull iss-
I mean, is it really that difficult just to enable 2fa?
it isnt
at least give them credit brah
I don't understand discord anymore , the thinking bubble randomly changed to "set status..."
check the code for it then :)
way ahead of you. now it makes sense, it's an experiment
just patch your button under the online button
and don't care if set custom status exists or not
here
you will need to render a menuDivider too
=
who IS this kid omg LOL
probably can, sadly i don't like css
it is...i routinely use new discord accounts and cba to use 2fa on all of them
@tacit pebble
π€‘
youβve made other pluginst
too?
apparently it was possible before through better discord to bypass the 10 minute wait when joining a server
i wish there was something to skip through the prompt when joining a server idk what itβs called
wdym
i write plugins where convenient for me
i release very few of them
anything i choose to put here is for the one or two people who might find it useful and the plugin devs who go off examples (like me)
Your code was stolen in a different commit btw; see the link @swift delta posted for their Discord user id
yeah, thatβs all this personβs been doing is stealing plug-ins and slapping their name on it claiming that itβs their own creation

I mean, they are crypto bro so canβt be surprised
*insert Mods. Whack is peepee meme *
i did see you posted that
we wait and see if he ends up like the last crypto Bro who found every reference to Ven and replaced it with their own name
most likely showcasing getting people interested and selling to them
stealing peoples work and profiting off of it
that's my giuess
so basically, the stereotypical crypto bro
stealing work and claiming it as their own
yeah that's my guess there's no other reasoning behind it
unless it's a ego boost or something idk maybe he doesn't like giving credit to people
prolly an ego thing too
just dropping by to announce my pr's 7 month and 9 day birthday
oh wow it's all the way on page 6 of 8 of all of the PRs
maybe someday it'll be elected the PR Pro Tempore
if every other pr older than mine were merged or closed it would be pretty funny because mine would then be the oldest pr
I just checked to see what the oldest PRs are that are still maintained
By "still maintained", i mean that have pushes recent enough to resolve all conflicts. If it says "this branch is out of date" or "this branch has conflicts", it's not maintained.
i dont think thats true
The oldest still-maintained PR is #1930 (started October 2023) and, surprisingly, mine is second place
How would you define it?
i have quite a few older prs that i havent updates, but i would if someone mentioned it
If you haven't updated them, they aren't maintained.
That's my opinion, anyway
feel free to disagree with me and come up with another system of measuring which is the oldest maintained PR at your leisure
I think that there's no way to know if a dev will update a PR if they're asked to or if they don't intend to update it anymore without manually asking every single one.
Besides, if it's updated frequently enough to be mergeable most of the time, it's available for review to anyone who wants to review it at any time they want to.
my opinion, of course
this is a bad way to measure if something is maintained or not
How would you measure it?
actually testing the PR to see if it works when merged into main/dev branch
But you can't merge PRs that have conflicts or are out of date
Out of date isn't an issue
Interesting
As long as the dependencies (including patches) haven't changed in an incompatible way it should be fine
Obviously random discord updates will break stuff
I see
As they always do lol
Do we still use that weird system where a check can't run unless it's approved by a repo maintainer?
iirc thats default on github
It's literally only an issue for first time contributors
Really?
just copy the workflow onto your own branch
Ig i'm still a first time contributor despite my pr being 7 months old
or i can just run the tests manually
and earn the certified 
if you havent made a contribution, you're a first tome contributor
True
horror patch
{
find: ",invertBotTagColor:",
replacement: [
{
match: /,invertBotTagColor:\i/,
replace: "$&,moreTags_bgColor:moreTags_bgColor,moreTags_fgColor:moreTags_fgColor"
}, {
match: /verified:\i,useRemSizes:\i/,
replace: "$&,moreTags_bgColor,moreTags_fgColor"
}
]
}```
How would you revise it?
id have to understand what you're doing first
too late today
?remind next week review #2161
Alright @hushed loom, in 1 week: review #2161
I appreciate the act of maybe giving me some constructive criticism in the future
I'll leave some comments as I fix it so that it will pass the linter
After looking at it, I believe it's a random module between the one where user info (and thus role color) is available and where the role colors need to go (the bot tag module). Usually there's only one time where I have to add arguments to send and receive this data so that it is available in the context of the bot tag's generation, but in this case (I believe for displaying the badge on user profilesβa feature I don't think is necessary but, as it's already in the plugin, I have to support), it was necessary to pass it through this module so that the destination module could have the data it needed.
If you have a better way to do this, let me know
@flint bronze, <t:1726617340:R>: kill nixos
@flint bronze, <t:1726815639:R>: kill nixos
yeah thats right 12pm uh huh
@flint bronze, <t:1726819259:R>: kill nixos
no
@flint bronze, <t:1726833634:R>: kill nixos
@flint bronze kill nixos
Is there a way to make a slider setting that restartNeeded when changing from or to zero but not when changing between nonzero values?
At that point Iβd just also make it restartNeeded even if itβs not actually needed
That'd make tinkering with the setting a lot more annoying than it needs to be. Why don't I just... ```js
get restartNeeded() { return settings.store.saturation == 0; }
I'm working on modifying PluralKitIntegration, and I want to try and change how message editing works. As is, the plugin sends a message with the right command syntax within the current channel, but I've confirmed that this message would also work if sent in bot's DMs
however, when trying to use sendMessage() and specifically targetting the DMs for the bot, Discord refuses to send the message. If I don't have waitForChannelReady set to false, it just infinitely waits, and if I set waitForChannelReady to false, Discord complains that the channel ID doesn't exist
Is there some other way I need to send the message? Is it even possible to send a message in DMs without being in DMs? Or does Discord/Vencord not have an easy way to do that
are you trying to use the user id as channel id?
no
show code
this is the snippet in question
MessageActions.sendMessage(1276796961227276338, {
content: "pk;e https://discord.com/channels/" + guild_id + "/" + channelId + "/" + messageId + " " + messageObj.content
}, false);
quotes
ah
1276796961227276300```
see how it chops off the last few digits
ah, makes sense
discord ids (snowflakes) have to always be strings in js
(or bigint, but discord uses strings)
is there a way to control in which order the custom buttons are displayed? i looked into the encrypt plugin as it was the first and i dont see any obvious reason as to why its the first?
I think they're just added in enable order
Meaning encrypt comes first because it's alphabetically first
Ah okay
uh
Oh?
maybe actually
im thinking "tooltip order"
The order is constant no matter what i do
Does it make sense to check out https://github.com/Vencord/plugin-requests/issues or is it just all trash?
Yeah BD struggled with plugin submission requests a lot too
majority are trash thereβs only a select few that are good i think we have plenty of plugins that exist already for everything really
i suggested this before not here because i wasnβt able to make a PR request before it closed iβm not sure whether this is considered api abuse
This will allow you to select a server or server(s) from a dropdown, menu. Once selected you can select the spaces left through a slider & the user amount too along with the user-limit (participants).
In short: It finds you a random VC easily without navigating through each server a good way of finding another VC
Settings: Auto-Mute, Auto-Camera, Auto-Stream, Auto-Navigate -- will navigate to the VC Channel automatically
it's api abuse if it spams the api in a manner that couldn't be done by normal usage
what you're describing should be doable fully offline so no
so far, this is my only issue
my Latest PR turns 1 month old tomorrow so
i will be updating it
with Good Feature
MEMBER_SAFETY_COMMUNICATION_DISABLED_TOOLTIP
can someone tell me an alternative to wreq(Number(findModuleId('navId:"user-context",')!)).default i just cant seem to find it in a different way myself
I think the Number() is unnecessary, but that's pretty minor
nah wreq takes a number and findmoduleid gives a string
Last I checked wreq doesn't give a fuck whether it gets a string or a number, it'll just index an object with it anyway
findbyCode is probably what you looking for
you think i didnt try that
maybe, because the snippet you posted works in similar way as far as I can recall
not similarly enough i guess
I think findByCode returns a function, not the actual module object
Yes
if i wreq the module i want it gives me this module for whatever reason (lazy module loading things?) im so confused
wait why didnt i think of this sooner
i can add a marker to it
is that even completely rolled out yet?
I tried it a couple weeks ago I think and I could upload 25mb
seems to work?
it's because of server boost level
wait what i can send 89 mb???
i'm not actually going to upload the first 30k fibonacci numbers because my internet sucks
did discord make an oopsies and set the limit to 100mb?
that was a 159 mb file
it seems to be 100mb
one more character than this and i got the 10mb max popup
I don't think this will upload before i go to bed
seems like i have this experiment enabled by default
why do you need that
i want to open user context menu
so you want the menu compnent for the user context?
yeah
this worked, but maybe not the best solution
const { UserContext } = mapMangledModuleLazy('navId:"user-context"', {
UserContext: filters.byCode("children:")
})
try that :)
you can also manually waitFor if u need
well actually maybe not cuz current implementation doesnt have a facotry filter
oo thanks ill test it
i think i did do something like bycode("navId") but that didnt work
I think that sadly might not work
try not destructuring if it fails
thanks works! 
105MB OF NUMBERS?????????????????????????????????
only took ~1hour and 40 mins
To upload?
yeah
That's not fast
at least your internet is stable
because 1h and 40 minutes uploading something is A LONG time
but I think discord mightve just forgotten a 0 on this?
it's only stable because it's 03:41 and nobody else is on it
or they accidentally added another 0 on the upload limit
because it's definitely NOT 10mb for me
and i don't have nitro
also this is why you can upload 100mb
oh...
:(
why is your internet so bad?
because i don't live in a city
Is it considered api abuse if i make a plugin to react with text?
yes
that called self botting tho
Ah thank you π
no but it's useless
π
I completely misread that, sorry
Donβt you mean Self Apping EmojiNerd
yeah
i think itβs been made already the it broke though
because i guess the function doesnβt exist anymore
something like that discord changed some stuff
This is where I get confused about the self bot thingy. If you have to write the message yourself and click a button to make it send, is it still a self bot? I'd have thought it was only a self bot if it required no user interaction
that definitely wouldn't be self botting because it's one user interaction for one action
i'm not sure what one user interaction to do multiple reactions would be considered though
would it be possible to allow replying to blocked messages to show up properly? i have someone blocked but when someone else replies to them trying to click on the message that's being replied to says i need to unblock the user to see it.
are there any plugins which do things with blocked users that I can look at?
wait i'm stupid theres already a plugin for this π
yep.
Yes it exists; do not use that as an excuse for not making a plugin that fixes jumping to a messages as it is really broken anyway 
it's not exactly what i want anyway since it only jumps to messages that have been expanded
like when you click on the show all messages next to the blocked user part
yeah that is also an issue
@hushed loom help
yop
im not sure how to do this
i need to get rid of the Anchor
wait
guh of course i haev idea the moment i ask for help

somehow its loading old version of the code
??
its rebuilding
what
its literally loading the older code i dont understand
??????/ wtf this is annoying
you might be looking at the wrong module
search your find with ctrl+shift+f
and you will see an extracted webpack module
look at that to see what it loads
eg
this is what you want
ok my idea doesnt work
{
find: "MEDIA_DOWNLOAD_BUTTON_TAPPED,",
replacement: {
match: /(\i=\i\.useCallback\(e=>{).*},\[\i,\i,\i]\);/,
replace: "$1console.log(\"Hii\")});"
}
}```
dont know about the rest, but use this as the find
ill need to replace the anchor somehow
wouldnt you just want to patch the callbacks?
@remote kestrel just a thought
wait
thats wrong
@remote kestrel ```ts
{
find: "MEDIA_DOWNLOAD_BUTTON_TAPPED,",
replacement: {
match: /\i.Anchor/g,
replace: "$self.myComponent"
}
}
try this
does that replace both Anchor
with the /g global flag, yes
i will show
@remote kestrel
might be stupid, but could cors get in the way of this
should there be a default download dir setting? or would it be better for a plugin that modifies all downloading
Guh
WebContextMenus has the save as functionality already
maybe this would be better as a more generalized plugin improving downloading functionality
πππππ
some kotlin thing where it takes in your kotlin plugger and outputs js
Kotlin outside jvm is so cursed
Anyone have an example of some code or a prexisting plug in that can toggle on and off a css change, for example a plug in with a setting when toggled on removes all embeds from discord and when toggled off doesnβt apply the css change of removing them
For static CSS stored within your plugin, take a look at src/api/Styles.ts
I'm trying to modify the UserProfile for a webhook, specifically the bio and pronouns, and I want it to be able to update the moment I click on a new webhook. I'm updating the UserProfile from the UserProfileStore every time the user popout is created, but for some reason, it refuses to update the bio and pronouns until I click on another user first, then back onto the webhook
any ideas how I can get the behaviour I'm looking for?
here's a simplified version of the code that demonstrates what I'm trying to do:
onRenderUserGuildPopout(message: Message) => {
const memberProfile = UserProfileStore.getUserProfile(message.author.id);
memberProfile.bio = bio;
memberProfile.pronouns = pronouns
}
this is being patched in with find set to renderUserGuildPopout: channel should never be null, for reference as to exactly when the function gets called
to further explain the current behaviour:
let's say I have messages A, B, and C
Message A is sent via a webhook by user A
Message B is sent via that same webhook by user B
Message C is sent by another user
if I click on Message A, it works just fine, I see user A's information
if I click on Message B, I see user B's information
however
if I go back to Message A, it stays on user B's information in the popout
the only way to get user A's information to show up again is by clicking on Message C first
MessageLogger has something similar for its highlight style
Thank you
Thank you aswell
I was able to figure it out
Does anyone know how, or have an example/plug in that does of being able to change a css value from the index such as if I have a file called style.css that contains .markup_f8f345 .anchor_af404b[href^="http://"] { pointer-events: none; color: gray; text-decoration: none; cursor: default; } to be able to make a setting option like this linkColor: { type: OptionType.SELECT, description: "Color for unclickable links", default: "Grey", options: [ { label: "Grey Links", value: "Grey", default: true }, { label: "Blue overlay", value: "Blue"}, { label: "Red overlay", value: "Red"}, { label: "White overlay", value: "White"} ], restartNeeded: false, } That allows me to change the color: value in the css to red or blue or white based on the setting drop down selected, this is prop an easy thing to do that I am forgetting about lol
Easiest way is to set a class, or a css variable, on the root element
Heads up: Those randomly generated class names can and do change occasionally
Might be better to patch the markdown link component and add a custom class
Yeah, what is the way around that? other than having to manually update every time
Or of course using substring selectors, but I hate those
Why do you hate those? it is a very simple fix imo since I can just change it to a[href^="http://"] { pointer-events: none; color: gray; text-decoration: none; cursor: default; }
Substring selectors on class are were invented by the devil
Whys that π
Poor performance, imprecise, and just ugly
I guess so even though it it seems to work fine for now, so you'd recommend to patch the markdown link component and add a custom class instead right
But with discord doing the bullshit they do, it is about the only way to theme discord
I would patch the component, yes
Doesn't mean that's the best course of action
π€£
thereβs nothing wrong with it as long as u update ur class names when discord updates
if discord does change classes again i think majority of the stuff i have will break though
Yeah, honestly Iβm just going to use substring selectors until I run into an issue and just do what kyuu suggested
Hi there, Im gonna need some help.
I was working on my first plugin that can change server width.
So I`ve created a button that let me do that. This part works.
I only have a styling issue. When I reload Discord the button is half out of the screen. (pic1)
When I click it, to open and close it again, then the button works correct and it is centered again. (pic2)
So now is my question if i can get some help to fix this issue.
Below I wil post my start() function that creates the button and fixes the styling
start() {
let isFoldersExtended = false;
const guildsNav = document.querySelector('ul[role="tree"][data-list-id="guildsnav"]');
const svgButton = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svgButton.setAttribute("width", "100%");
svgButton.setAttribute("height", "40");
svgButton.setAttribute("style", "cursor: pointer; display: block;");
const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.setAttribute("width", "100%");
rect.setAttribute("height", "40");
rect.setAttribute("fill", "#313338");
rect.setAttribute("rx", "5");
svgButton.appendChild(rect);
const updateIcon = () => {
while (svgButton.firstChild) {
svgButton.removeChild(svgButton.firstChild);
}
svgButton.appendChild(rect.cloneNode());
const icon = document.createElementNS("http://www.w3.org/2000/svg", "svg");
icon.setAttribute("fill", "#f2f3f5");
icon.setAttribute("width", "24");
icon.setAttribute("height", "24");
icon.setAttribute("viewBox", "0 0 330 330");
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
if (isFoldersExtended) {
path.setAttribute("d", "M111.213,165.004L250.607,25.607c5.858-5.858,5.858-15.355,0-21.213c-5.858-5.858-15.355-5.858-21.213,0.001 l-150,150.004C76.58,157.211,75,161.026,75,165.004c0,3.979,1.581,7.794,4.394,10.607l150,149.996 C232.322,328.536,236.161,330,240,330s7.678-1.464,10.607-4.394c5.858-5.858,5.858-15.355,0-21.213L111.213,165.004z");
} else {
path.setAttribute("d", "M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z");
}
icon.appendChild(path);
const buttonHeight = 40;
const iconHeight = 24;
const iconX = (svgButton.clientWidth - 24) / 2;
const iconY = (buttonHeight - iconHeight) / 2;
icon.setAttribute("x", iconX.toString());
icon.setAttribute("y", iconY.toString());
svgButton.appendChild(icon);
};
updateIcon();
svgButton.addEventListener("click", () => {
console.log("Button clicked. Current state:", isFoldersExtended);
if (isFoldersExtended) {
removeCSS();
svgButton.setAttribute("height", "40");
} else {
applyCSS();
svgButton.setAttribute("height", "40");
}
isFoldersExtended = !isFoldersExtended;
updateIcon();
});
if (guildsNav) {
guildsNav.appendChild(svgButton);
} else {
console.error("Guilds navigation tree not found.");
}
},
Dom manip found
Okay thanks for the tip, then I will start using that
apologies for bumping my previous issue, but I'm still unsure what I can do to proceed
I can see in the logs that the UserProfile is indeed being modified, but the changes just aren't reflected in the user profile popout
I can't figure out where Discord actually pulls in data like the bio to patch it more directly either
perhaps there's something I've overlooked though, or maybe I'm overcomplicating things
is it possible to find a component not exported by the webpack module?
assign it to your plugin object using a patch
ooh, so that's how the patches can be useful
what's the component tho?
patches are literally used for everything lol
this little draggable row
hmm I see
try to use by patching then
can't you just use the one that renders all the roles?
which is exported
probably i could, but i wasn't sure which props should i give to them
i'mjust gonna render simple <p> while testing lol
ur gonna have a worse time by using the draggable component directly
since you need to pass onDragStart, onDragReset etc
breakpoint and inspect the props u need
they are pretty simple, the only tricky ones are setEditRoleId and setSelectedSection I think
you can try passing () => {} to those and see what happens π
yeah i won't be needing those, i'm just extending serverInfo to show all roles
probably i can keep them noop
discord's ui is stateful and eventdriven
just mutating an object won't do anything
gotcha
you need to update the state, for example by dispatching a profile update event
well, it does do something
it's just not responsive
or better yet patch the ui in place instead of messing with data
how would I figure out which event to hook into?
I just can't figure out where the events and data are actually stored
Stores
but this is probably better
I'm already modifying the data within the stores
it's just not responsive
where would one begin with patching the UI directly?
I've tried tracing back the react components with dev tools and I keep hitting dead-ends
well you need to modify the data before it's even returned by one of it's functions then
the weird thing is that
sometimes the modified data gets used immediately
sometimes it doesn't
I can try injecting it earlier, I found a very early spot that I could inject to
show something in the ui you wanna change exactly
I'll help point you where that data is retrieved from
is it this?
or this
I want to modify the bite-size avatar popout's bio and pronouns
I need a reference to the message that was clicked on originally, as I'm querying an API to get that data, and it needs the message ID to get the data
like i said just changing the object won't do anything
you need to update the state of the store and then make the store dispatch an update
you can either do it manually or dispatch an event
it depends on where do you change it
if it's something like this it works
but if the object is returned and changed later then no
modifying the data is the wrong way to do this


discord desktop only