#🧩-plugin-development
1 messages · Page 78 of 1
ee then i selected it
disable formatting
and then ctrl c to copy the original
(if you copy the formatted one and make regex based on that it wont match)
then i go to https://regex101.com
enable regex on the right
and you typed , instead of .
you could also just search channelTextArea but it might show a lot othewr results and youd have to look trhough those xd
this to enable regex search
oki
now you'll likely see both the original file and the patched WebpackModule since this module is already regex patched
for stuff that you havent patched yet you will likely only see the web. numbers .js file (unless other vencord plugin patches it but you can still patch it anyways)
so uh once you find the element you can make sure by adding debugger by clicking in it and verifying it'll go in debugger mode when it renders and stuf
i didnt have to do that in this case
@turbid loom tel how far you got rn
guh my bad i havent been doing only reading, hyperfocus
o dw
you dont have to do i just thought you were doing
would this be a proper element to select?
sure
im not sure what constitutes the start and end
thats probably fine
if you dont need anything above
make sure to disable formatting before copying
what do i do here? guh
did
eh then maybe you can add ref after className:te.subtitleContainer
not sure if thatd be right
so for example you make regex like
className:\w+\.subtitleContainer
to match that (on the regex101 website you use \w+ but on vencord you should use \i
and then you can replace with something like $&,ref:$self.thing so that it'd add ref:$self.thing after which would pass it as a prop and then react would call thing with the html element when its re-rendered or null when its removed i think
sorry if much yap
so uhh you use regex101 to write the regex and test that the regex is valid
and then if you think its right you can use it on a plugin like this
also you should use the vencord dev companion vscode extension
luckily i've had that for like a year :3
it tells u if a regex patch is right
you also need a "find" which is a string that will likely not change in the future anywhere in the module
so uhh
here you could use "this.renderHeaderToolbar()," as find
it also has to be unique (not anywhere in other modules) you can search in ctrl shift F to verify
this is valid cuz only one says module right?
uhh
there are 2 diff files there
i think
should add the () at the end
so that it only matches the one place you're patching
so with this you get 2 js files (ignoring webpackmodule)
with this theres only one
ah
yeah
thats right
theres only 1 js result so yeah
its unique
tell me what your patch look like once you write it
wdym
try saving the file? that works ya it doesnt prevent me from saving
just thought the error might be important since it doesnt show up on the others
wait no the error is gone
guh
error probably appeared while you were typing maybe
just dissapeared randomly
and it didnt update right after
makes sense ya
oki so
replace \w+ with \i because thats a vencord thing you use \i to match identifiers that can change
and in the replace you use $& to add after the match (so you're not replacing the className but adding another prop after it)
in the other patch i replaced ref because there was already a ref but here there isnt one so we add one
like this?
uhh
like $&,ref:$self.getRef for example
cause like
you have an object thats like
{
className: te.subtitleContainer,
children: [(0,
...
and you wanna add ref in there
so the replace should result in something like
you have an object thats like
{
className: te.subtitleContainer,
ref: $self.getRef,
children: [(0,
...
if that makes sense,,
$self is vencord thing to access keys defined under your definePlugin so you can name getRef anything you'd like
and then add a corresponding key in your plugin's object
at this point you can use vencord companion's Test Patch to verify if the patch works
patch ok :D
awesome
now getRef should be called when the element is re-rendered so you can verify having a console.log inside
and it'll be called with null when the element doesnt exist (unrenders)
like console.log(ref.current); ?
no current it'll be just passed the element or null i thimk
simply log the first argument it gets
like this
in your plugin's object
and reload discord to see if you see "got ref" anywhere
guh im getting a weird issue
vencord logs dont say e was ever started and yet i still get a single log saying 'got ref: [object Object]'
wait i see it
- index.ts:7 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
- at cw (index.ts:7:27)
- at ResizeObserver.<anonymous> (index.ts:49:51)
hm?
also are you using this patch together with the other one
because if then you syhould maybe make a different function than getRef because theyre different types here
in the other one it'd receive {current: Element|null} here it receives Element|null
uhh
yes
use , like this console.log("got ref", ref);
or it'll call toString
and you cant see objects
import definePlugin from "@utils/types";
let chatBarWidth;
let lastRef;
function updateThing(element: any) {
chatBarWidth = window.getComputedStyle(element).width;
document.documentElement.style.setProperty(
"--chat-bar-full-width",
chatBarWidth
);
}
export default definePlugin({
name: "e",
description: "",
authors: [],
patches: [
{
find: "useRootElementContext",
replacement: {
match: /--saturation-factor:/,
replace: '" + $self.getStyle() + "$&',
},
},
{
find: ".channelTextArea]",
replacement: {
match: /ref:(\i)(?=,className:.{0,50}channelTextArea)/,
replace: "ref:($self.getRef($1),$1)",
},
},
{
find: "this.renderHeaderToolbar()",
replacement: {
match: /className:\i\.subtitleContainer/,
replace: "$&,ref:$self.getRef",
},
},
],
getStyle() {
if (!chatBarWidth) return "";
return `--chat-bar-full-width: ${chatBarWidth};`;
},
getRef(ref: React.RefObject<any>) {
if (!ref.current) return;
if (ref.current == lastRef) return;
lastRef = ref.current;
const observer = new ResizeObserver(() => updateThing(ref.current));
observer.observe(ref.current);
updateThing(ref.current);
console.log("got ref", ref);
},
stop() {},
});
could be fixed in a few ways but id make a different function for the new patch instead of re-using getRef
also updateThing updates --chat-bar-full-width
im sure you want a different variable for this element?
O yesyes
@quaint cipher this is better, no?
function updateThing(element: any, value: string, propName: string) {
const output = window.getComputedStyle(element).getPropertyValue(value);
document.documentElement.style.setProperty(propName, output);
}
probaly
also idk how to do this because i dont actually know what getref does
Lol
idk how to explain so i could give u the solution but idk if youd prefer to figure it out on ur own
import definePlugin from "@utils/types";
let chatBarWidth;
let lastRef;
function updateThing(element: any, value: string, propName: string) {
const output = window.getComputedStyle(element).getPropertyValue(value);
document.documentElement.style.setProperty(propName, output);
}
export default definePlugin({
name: "e",
description: "",
authors: [],
patches: [
{
find: "useRootElementContext",
replacement: {
match: /--saturation-factor:/,
replace: '" + $self.getStyle() + "$&',
},
},
{
find: ".channelTextArea]",
replacement: {
match: /ref:(\i)(?=,className:.{0,50}channelTextArea)/,
replace:
"ref:($self.getRef($1, 'width', '--chat-bar-full-width'),$1)",
},
},
{
find: "this.renderHeaderToolbar()",
replacement: {
match: /className:\i\.subtitleContainer/,
replace: "$&,ref:$self.getRef",
},
},
],
getStyle() {
if (!chatBarWidth) return "";
return `--chat-bar-full-width: ${chatBarWidth};`;
},
getRef(ref: React.RefObject<any>, value: string, propName: string) {
if (!ref.current) return;
if (ref.current == lastRef) return;
lastRef = ref.current;
const observer = new ResizeObserver(() =>
updateThing(ref.current, value, propName)
);
observer.observe(ref.current);
updateThing(ref.current, value, propName);
console.log("got ref", ref);
},
stop() {},
});
updated a bit
oki
since u wanna pass stuff to getRef
o also i think you forgot
' in the first getRef call
" or '
wdym?
ref:($self.getRef($1, width, --chat-bar-full-width),$1) is getting added to discord's js
so
{
ref: ($self.getRef($1, width, --chat-bar-full-width), $1)
}
width and --chat-bar-full-width are not defined
(you wanna pass those as strings)
and ur also gonna have to keep track of the value in a variable which updateThing did before with chatBarWidth
but since now you're gonna have many variables you probably want an object instead
look above function updateThing
chatBarWidth is now unused
uh idk how to explain
@turbid loom im going soon so ill fix it for u rq if u want
and u can uhh inspect th code
what variable do u want for the latter patch's element
oh oki :0 uhh
just "--header-bar-height" should be fine
if css variable is what you meant
ye
the goal for this plugin is to be able to easily add a patch for another element to add a custom css property of my choice
without refactoring for every new one
if possible,,
think this shoul work not sure
import definePlugin from "@utils/types";
let vars = {};
let lastRefs = {};
function updateThing(element: any, value: string, propName: string) {
const output = window.getComputedStyle(element).getPropertyValue(value);
vars[propName] = output;
document.documentElement.style.setProperty(propName, output);
}
export default definePlugin({
name: "e",
description: "",
authors: [],
patches: [
{
find: "useRootElementContext",
replacement: {
match: /--saturation-factor:/,
replace: '" + $self.getStyle() + "$&',
},
},
{
find: ".channelTextArea]",
replacement: {
match: /ref:(\i)(?=,className:.{0,50}channelTextArea)/,
replace: "ref:($self.getRef($1.current, 'width', '--chat-bar-full-width'),$1)",
},
},
{
find: "this.renderHeaderToolbar()",
replacement: {
match: /className:\i\.subtitleContainer/,
replace: "$&,ref:e=>$self.getRef(e, 'height', '--header-bar-height')",
},
},
],
getStyle() {
return Object.entries(vars).map(([name, value]) => `${name}: ${value}`).join(';') + ';';
},
getRef(ref: Element | null, value: string, propName: string) {
if (!ref) return;
if (ref == lastRefs[propName]) return;
lastRefs[propName] = ref;
const observer = new ResizeObserver(() =>
updateThing(ref, value, propName)
);
observer.observe(ref);
updateThing(ref, value, propName);
console.log("got ref", ref);
},
stop() { },
});
1s ill add comments
uhh idk if this matters but with the code i made before this current update, whenever i click on anything that's meant to go to a different page, it reloads do to an error like uh
wait no it isnt all the time
that might just be me lagging
Lol
but i get the full screen discord crash screen it's odd
meh
added some comments though im not sure it makes it any more understandable
let me say changes
now using a "vars" variable instead of chatBarWidth since we're gonna have more than 1 var
vars will get the css property name as key and the value to assign as value so it'll be like
vars = {
"--chat-bar-full-width": "456px",
"--header-bar-height": "278px"
}
updateThing is responsible for modifying vars
the use of vars comes in getStyle
html's style is often refreshed by discord and a regex patch will add getStyle() there
so if you call getStyle() you can see the css that gets added
e=> is "e" just meant to be the plugin name without spaces or is that something else
nope e there could be anything its just like
{
ref: e => $self.getRef(e, 'height', '--header-bar-height')
}
im just used to calling it e but more appropiately i could've named it ref or elem
you can change it if you want
make sure to change it in those 2 places
idk if you know arrow functions its the same as
{
ref: function (e) {
return $self.getRef(e, 'height', '--header-bar-height')
}
}
the function will be called with the element or null
ahhh i see i see
this is amazing work and good teaching, if that is all then thank you vary much for the help, i might have a plugin good enough to pr soon bc of u :3

glad to hear

not exactly sure where to start with this, but does anyone know how to get these components? both separately for channels and users. it would be a hassle to recreate an already existing component for this
i'll have to use componentByCode or findComponentByCodeLazy to get the components right? but i dont know how to use this atm
hello @carmine spade, not sure if you are aware, but your plugin "MutualGroupDMs" is kind broken on the new UI due to the new spacing
here's a screenshot
thx for your attention
Hey, I'm having some troubles with module 340895. I need to patch it for BypassDND (this is where the call ringtone check happens)
I can't find an access to the channel id
The function where it does the check is the only one that doesn't get an event 
remove the ternaries from the class methods and then add your own filter to the channel ids
yeah i saw, though i don't have any good ideas on how to fix that
in a way which looks good
Like here?
class Mavis extends (i = o.ZP.Store) {
initialize() {
this.waitFor(_.Z, p.Z),
this.syncWith([p.Z], Ligma),
this.syncWith([u.Z], Ligma),
this.syncWith([l.Z], x)
}
getIncomingCalls() {
return T ? O : Array.from(I.values())
}
getIncomingCallChannelIds() {
return T ? y : Sigma
}
getFirstIncomingCallId() {
return T ? null : Sigma.values().next().value
}
hasIncomingCalls() {
return !T && Sigma.size > 0
}
}```
yeah just do
return Array.from(I.values()).filter(id=>$self.allow(id))
allow(id) {
if (isDnd) {return whitelisted.includes(id)}
return true
}
``` or something
nvm this might be better
getIncomingCalls() {
return T ? Array.from(I.values()).filter(id=>$self.allow(id)) : Array.from(I.values())
}
allow(id) {
return whitelisted.includes(id)
}
close
thx though!
it was the hasIncomingCalls()
lmao I somehow completely missed the part where it assigns a var instead of returning
why do you need them
what are u trying to do
I'm trying to get the context menu (specifically the children of the Menu.Menu component) for channels/users/threads so that I can right click on them, while being able to separate the tabs functionality. Tho I'm not sure if getting the children is the right approach for this
the "venbot" menu item there will have the children of that contextmenu children
what tabs functionality do you mean?
Closing, pinning, moving from left/right via menu buttons
if you want to patch context menus (e.g. add new elements or reorder existing elements) then there's the Context menu api
I can't just patch the context menus using the api i think. coz my tabs is a custom component, but i am using the api for showing these context menus.
I'm just wondering if there's a way to get the children of those specific context-menu's so I can append them to the "venbot" menu item
so that I can right click on my tab components*
brains kinda dead right now mb lmao, been coding nonstop
so far I tried figuring out how I'm gonna create the UserContext menu with proper props first, but that was already a dead end for me.
oh i see
so you want part of the user context menu in your own context menu
yeah!
only part or the entire thing?
thinking of the entire thing, but i already added a few custom elements to the user context menu using the context menu api lol
probably just the entire thing to keep things simple, but is it possible?
yes
find the context menu source code
use inspect elements / react devtools
all context menu entries specify a unique id that you can easily find in the source code
alright cool, thanks
once i get around getting the UserContext component i'll get back in here bcos i dont know how i'll be getting the children components of those
What’s the difference between flux IDLE and AFK? Is afk for push notifications and idle is just general idle?
probably an alias
it might be related to this setting
ty. also how do you find code that discord calls? like all instances where the string "IDLE" is present
Using the Chrome Developer tools, go to your console tab.
I forget if it's there by default but you can press ESC and it will bring up an other tab at the bottom where you can search for stuff
They keybind to open the Chrome Developer tools is SHIFT+CNTRL+I (i).
But I believe you need the DevCompanion plugin enabled. Which you need to export vencord in dev mode (pnpm build --dev, pnpm inject)
Awesome, I wasn't sure
chat are settings lists a thing
i forgor
like a list i can add or remove from
guh
i'll just use a fake one with string
good enough for this plugin for now if someone gets annoyed they ccan pr
oh nevermind i couldnt do that even if i wanted to okay
cuz patches cant be added dynamically
welp
@quaint cipher do you know how to play local or link sounds with a plugin, maybe it's more complicated than i thought cuz no matter what i do i cant get it to work
const { UserContext } = mapMangledModuleLazy('navId:"user-context"', {
UserContext: filters.byCode("children:")
});``` getting context menus this way seems to work but i gotta somehow load them first manually (or find a way to load them by code first) or it wont find the component. is there a smarter way to do this?
i gotta do this for all the gdm/channel/user/thread context menus
- Do you really need mapMangled? That function is only for specific cases where you either need a bunch of mangled exports or your export is so generic it's impossible to find otherwise. Use findByCode instead if not
- you can load chunks with another method, it's called findAndLoadChunk or something
got it!
i think yeah i need to use mapMangled. when I try findByCodeLazy('navId:"user-context"'); normally it doesn't find any matches.
I've also been messing around with extractAndLoadChunksLazy and got the chunks for group dms myself, the one for UserContextsMenus I just found from this PR: https://github.com/Vendicated/Vencord/pull/2902
Now I'm not exactly sure what the process is for finding these chunks are tho. thats whats been taking most of my time today
const requireUserContextMenu = extractAndLoadChunksLazy([".userIds.length>0).reverse("]);
const waitForGroupContextMenu = extractAndLoadChunksLazy(['surface:"private-channel"']);
these two works fine. (but idk how)
and this is how im rendering the components at the moment
this is info i found in this discord trying to search if anyones done something similar before.
yop, only mapmangled works since its the only one to use findmoduleid, the export gets fed into some analytics function that kills byCodes
the extracts find a module that load the context menu
Ohh, so I just need to find a module that loads the context menus i need
Yeah
finally found them all lol
const findUserContextChunks = extractAndLoadChunksLazy([".userIds.length>0).reverse("]);
const findGroupContextChunks = extractAndLoadChunksLazy(["PrivateChannel.renderAvatar"]);
const findThreadContextChunks = extractAndLoadChunksLazy(["},handleRightClick:"]);
const findChannelContextChunks = extractAndLoadChunksLazy(['("CategoryChannel")']);
not sure if these are good ways to extract them but it works
uhm so i'm making a pr to vencord and ive never done that before, is there a specific way i need to write that or something?
well this is a little annoying
how can i tell extractAndLoadChunksLazy that i need the second part of this chunk
not the first one
the second arg of the func takes a regex
like ```js
const requireChannelContextMenu = extractAndLoadChunksLazy(["&&this.handleActivitiesPopoutClose(),"], new RegExp(DefaultExtractAndLoadChunksRegex.source + ".{1,150}isFavorite"));
ooo thanks!
what in this could POSSIBLY be unique
(0,r.jsx)(d.tEY,{offset:{left:4,right:4},children:(0,r.jsxs)("li",{id:a,className:X.messageListItem,"aria-setsize":-1,children:[(0,_.Uw)(y)&&(0,r.jsx)(g.Z,{compact:en,message:y,hovering:ej&&!eZ&&!eX}),(0,r.jsx)(A.Z,$(J({},eu),{"aria-setsize":-1,"aria-roledescription":K.NW.string(K.t.BAB0yM),"aria-labelledby":eV,"aria-describedby":ez,onFocus:eP,onBlur:eS,onContextMenu:e_,onKeyDown:eU,onClick:eC,compact:en,contentOnly:eo,className:o()(er,{[X.message]:!0,[X.cozyMessage]:!en,[X.mentioned]:y.mentioned,[X.ephemeral]:(0,I.Pv)(y),[X.nitroMessage]:y.type===q.uaV.NITRO_NOTIFICATION||y.type===q.uaV.CHAT_WALLPAPER_SET||y.type===q.uaV.CHAT_WALLPAPER_REMOVED,[X.systemMessage]:(0,S.Z)(y),[X.groupStart]:!eo&&(eQ||y.type===q.uaV.REPLY),[X.selected]:eA,[X.replying]:(null==eF?void 0:eF.message.id)===y.id,[X.interactionSending]:y.isCommandType()&&y.state===q.yb.SENDING,[X.automodMessage]:eK,[X.editing]:eZ,[X.hasOpenPopouts]:eX,[X.potioned]:(0,_.Uw)(y)&&ed}),zalgo:!eZ,childrenRepliedMessage:eo||y.type!==q.uaV.REPLY?void 0:(0,V.Z)($(J({},e),{setPopout:eb,referencedUsernameProfile:em.referencedUsernameProfile,referencedAvatarProfile:em.referencedAvatarProfile,replyReference:ea,replyMessage:ef,isReplySpineClickable:!0})),childrenExecutedCommand:(0,G.Z)(e,eb,em),childrenHeader:eo?void 0:(0,F.Z)({messageProps:e,setPopout:eb,messagePopouts:em,replyReference:ea,author:eB,repliedMessage:ef,roleIcon:eG}),childrenAccessories:(0,W.Z)({channelMessageProps:e,hasSpoilerEmbeds:eW,handleContextMenu:e_,isInteracting:ew,isAutomodBlockedMessage:eK}),childrenButtons:ex||eE?(0,B.Z)({buttonProps:e,setPopout:eb,messagePopouts:em,isFocused:ej||eO}):void 0,childrenSystemMessage:(0,z.Z)(e),childrenMessageContent:l,onMouseMove:ev,onMouseLeave:ey,hasThread:!eo&&y.hasFlag(q.iLy.HAS_THREAD)&&null!=eR,isSystemMessage:(0,S.Z)(y),hasReply:y.type===q.uaV.REPLY,messageRef:eq}))]})});
i genuinely cant find anything there i'd be able to patch
Can you send the module Id?
probably like CHAT_WALLPAPER_REMOVED
in like 6 files Lol
damn i misread
Also XY, what's your end goal
how does one do such a thing
864060
Thanks
i literally only need to be able to find it
that's it
i already have everything else set up
what do you want to do exactly, what do you want to patch
.referencedAvatarProfile,replyReference: looks somewhat unique
for what...
As does .messageListItem,"aria-setsize":-1,children:[(0,
i feel like you would be better off patching later down, but idk what your end goal is
this one is the unique one
thsnk you :3
just yoinking attributes
:p
well, properties more like
height in px, width in px, etc
why 
can't say yet, this plugin is a bit of a secret project until i try to pr or open on #1256395889354997771
every message element has an id, you can just .getBoundingClientRect1
no need for patches
does discord store the message ref?
yop
all i can say is aWYgeW91IGRldmVsb3AgdGhlbWVzIGF0IGFsbCB5b3UnbGwgbG92ZSB0aGUgcGx1Z2lu
document.querySelector(`#chat-messages-${channelId}-${messageId}`)
.getBoundingClientRect()

it's base64 im not tryna make someone ceaser cypher this shit
guessing an addition to theme attributes?
:3
i know what base64 is, im husking because you sent it in base64 😭
lmfao
insane
i am also trying to make the theme space more sane... or less sane depending on your stance on rust
current method of what i made relies on patches in specific so meh
coding themes in rust
madman
insane
Hello, is there a way I can make a plugin setting hidden unless another setting is enabled? For example, an "enable feature" setting that when enabled unhides an "API key required for feature" setting.
The methods I've attempted so far don't update without closing and reopening the settings interface, which is a no go.
if you really need to do that, you can use a custom component as a setting
findStoreLazy("UserGuildSettingsStore").isChannelMuted(guildId, channelId) doesn't seem to work for user dms anymore
does anyone here know what user dms use for this
nvm im a dumbass. i was passing guildId as undefined instead of null in my component and that fucks things up
how do you send a file through vencord as an embed to a pre-defined uid?
if it’s not a source method yet, can you think of an already-existing plugin that does something similar that I can steal from?
So you just want to send messages to a user dm?
basically
I already tried, but I'm not finding the fucntion because it's on a menu and it's closing itself when I'm not focusing it
so still trying to get the function to update our status 🥲
hello ! maybe you found a way ? and you could help me ?
There's a toggle in dev tools to keep the window focused, that might help
I don't remember where, it might be in the styles tab
mmh I tried but not working or idk how to do it
you can use breakpoints to stop it from closing
i'm trying since 3 hours now 😅 but I still find nothing
Breakpoints stop react dev tools from working
@swift delta
??
real message component
Cool
instead of
Ohh nice
Although that's a hell of a lot easier and simpler, so it may as well be left alone ig
Also who is that co-author, and why’d you cut me out?
I didn't copy over all the files, so I just replace with the person at teh top of the devs list
Scammer
/joke
If there's a way to generate dummy messages/channels I'd love to know lmao
what do i do to override parameters of voice message before its uploaded im wanting to change the name
i have a way to override attachments, and text
but since discord doesnt allow voice messages its not included in attachment data
Tf is a potion
...why
Money grab
How does this look? (retaining the simplicity of the previous design)
What’s different
My fork
Where ShowBadgesInChat is
Can you use whatever component is in the appearance settings where you change from compact to cozy?
I kinda wanna make a plugin that changes channels/servers if you hold a dragged file over them, so you can drag a file into discord and then navigate to the chat you want to drop it in like the windows taskbar or something
Sounds like a pain to do though
That'd be a lot of effort for little benefit, but it'd certainly be cool in the rare cases
Discord themselves should be doing that kind of things rather than visual refreshes and potions
True
Tbh most of things I've done with Vencord have been more like programming practice than actually being useful
Or at least worth the effort
I tried, lazy component find wouldn't get it unless you loaded the appearance settings first
although maybe I'm missing smth
is there a way i could patch discord strings to replace them ?
gs+qcH
1ZZttr
in french, these 2 have become very long and i'd like to replace them, but i'm not sure how i could do that
i mean even in english with the only "visible by you"
just use a patch to change them
thing is, where do i patch them
cause i know they are used there, but also at some other places, so i won't patch that code, but idk where is the code that load them and i'm not sure how i could track it
Hello, I'm having trouble with patches (or not if can be done without patches) for when user is clicking on a button check a condition if true just do the action and if not show a popup message and cancel action. For a already existing button in the user context menu
that isn't helpful, say what are you trying to do
Detect when a user clicks on a button in the user context menu and prevent it if a condition is met (like a setting in the plugin)
More context?
just got told off my automod nvm 
you just cant use markdown headers
wait, so, how do you do it?
const channelId = await PrivateChannelsStore.getOrEnsurePrivateChannel(recipientId)
const channel = ChannelStore.getChannel(channelId)
// Then send normally
What do you think about making the vencord settings screen i18n?
if you agree to this things, i will make i18n system and japanese translate.
@dull magnet
no, sorry
would you say no if I told you that I would create the entire i18n system?
yes
ok
thx for answering
how do you add a file to your drafts?
like this
above the text input box
does somebody have a snippet of this being done?
look at petpet
how do you guys deal with cors errors?
i'm failing to fetch discordapp from discord
it needs to be opaque btw
hey guys, how do you add plugin settings? I'm using import { definePluginSettings } from '@api/Settings'; but every time I open the settings menu in vencord, it just crashes.
lol
fetch from a native.ts
that bypasses cors
send your code
this is just a snippet
import definePlugin, { OptionType } from '@utils/types';
interface ExecutableNode {
type: 'executable';
name: string;
path: string;
}
const Native = VencordNative.pluginHelpers.discordExecutableLauncher as PluginNative<typeof import("./native")>;
const settings = definePluginSettings({
withExecutableName: {
type: OptionType.BOOLEAN,
description: 'Include the executable name in the launch log',
default: true,
},
executables: {
type: OptionType.ARRAY,
description: 'List of executables to launch',
default: [
{ name: 'ExampleApp', path: 'C:/path/to/your/executable.exe' },
],
},
});```
when i open the settings, it just crashes discord
do you actually have that path?
what error does it crash with
i dont think that matters as the path isn't loaded when the settings is
Are you on the branch with array settings?
Otherwise OptionType.ARRAY isn't a thing
1 moment, let me replicate it.
i thought that got merged
Am I way behind
wouldn't it give an error in the build then?
no
oh
no, it doesn't not build, the plugin builds when making vencord. i mean like when i open the vencord plugins tab, go to my plugin, click on the settings icon to edit settings, vencord just crashes
that's not the error
open console and screenshot the error
oh ok thats what u mean
i dont know where you got OptionType.ARRAY, but it's not a thing
I thought I was losing it
heres the error:
you should really be using tsserver / vscode to catch issues like this
its probably ai code
that's minified
ok, can i just use string and it allows users to type multiple lines?
obviously
if you want them to be able to add more, no
i wrote this late at night and i probably didn't even think lol
see how other plugins do it, pindms is a good example
kk
just look for uses of OptionType.CUSTOM
or the regex ones
lol I was reading through the PR looking for an array type because I thought you were linking it to say it did exist
a minified error isn’t very helpful
can de-minify react errors
what?
I suppose I assumed that they would know how to do that already
silly assumption, because they didn't
id like to create a plugin which adds buttons above the text input box just for some moderation stuff, it would also push the chat elements up as not to cover messages, just wondering if theres any resources i can have a look at to help
also i do have js & ts knowledge just feel really out of my depth reading through this stuff lol
I've looked on the official guide on how to make a plugin and I found it quite confusing. How do you replace html elements with other html elements using the plugin? I assume using the plugin is the only way to go about this. I want to make the status icons that show up on the bottom right of people's avatars square. I've tried it using CSS but discord uses two types of masks for the status icons for some reason. Some are masked using only <rect> elements (which I can make square using CSS) and some are masked using <rect> elements with a mask attribute which has the property url(#svg-mask-status-<status like online/online-mobile/idle/dnd/streaming/offine>). It links to a mask element which houses <circle> elements. I want to replace those elements. This is the result I'm looking for (in the image)
I've tried doing this in the start() method:
start() {
const online = "#43a25a";
const idle = "#ca9654";
const dnd = "#d83a42";
const streaming = "#593695";
const offline = "#83838b";
const replaceMaskChildrenWithRect = (maskName, colour) => {
if (!maskName.includes("mobile")) {
const dmListAvatarOnlineStatusMask = document.getElementById(maskName);
const newRectElement = document.createElement("rect");
newRectElement.setAttribute("x", "22");
newRectElement.setAttribute("y", "22");
newRectElement.setAttribute("width", "10");
newRectElement.setAttribute("height", "10");
newRectElement.setAttribute("fill", colour);
newRectElement.setAttribute("aria-hidden", "true");
newRectElement.setAttribute("class", "pointerEvents__44b0c");
dmListAvatarOnlineStatusMask?.replaceChildren();
} else {
const dmListAvatarOnlineStatusMask = document.getElementById(maskName);
const newRectElement = document.createElement("rect");
newRectElement.setAttribute("x", "22");
newRectElement.setAttribute("y", "17");
newRectElement.setAttribute("width", "10");
newRectElement.setAttribute("height", "15");
newRectElement.setAttribute("fill", colour);
newRectElement.setAttribute("aria-hidden", "true");
newRectElement.setAttribute("class", "pointerEvents__44b0c");
dmListAvatarOnlineStatusMask?.replaceChildren();
}
};
replaceMaskChildrenWithRect("svg-mask-status-online", online);
replaceMaskChildrenWithRect("svg-mask-status-online-mobile", online);
replaceMaskChildrenWithRect("svg-mask-status-idle", idle);
replaceMaskChildrenWithRect("svg-mask-status-dnd", dnd);
replaceMaskChildrenWithRect("svg-mask-status-streaming", streaming);
replaceMaskChildrenWithRect("svg-mask-status-offline", offline);
}
ive also tried using the patches array with regex:
patches: [
{
// Online mask
find: 'function x(e){ return (0, r.jsx) ("mask", { id: e, maskContentUnits: "objectBoundingBox", viewBox: "0 0 1 1", children: (0, r.jsx) ("circle", { fill: "white", cx: .5, cy: .5, r: .5 }) }) }',
replacement: [{
match: /^\("circle", \{ fill: "white", cx: \.5, cy: \.5, r: \.5 \}\)$/i,
replace: '("rect", { x: 19, y: 19, rx: 0, ry: 0, width: 16, height: 16 })'
}]
},
{
// Online mobile mask
find: 'function V(e) { let t = 8 , n = 8 * s.EW; return (0, r.jsxs) ("mask", { id: e, maskContentUnits: "objectBoundingBox", viewBox: "0 0 1 1", children: [(0, r.jsx) ("rect", { fill: "white", x: 0, y: 0, width: 1, height: 1, rx: n * s.e7 / t, ry: n * s.e7 / n }), (0, r.jsx) ("rect", { fill: "black", x: 1 / t, y: 2 / n, width: 6 / t, height: 6 / n }), (0, r.jsx) ("ellipse", { fill: "black", cx: t / 2 / t, cy: 10 / n, rx: 1 / t, ry: 1 / n })] }) }',
replacement: [{
match: /^function V\(e\) \{ let t = 8 , n = 8 \* s\.EW; return \(0, r\.jsxs\) \("mask", \{ id: e, maskContentUnits: "objectBoundingBox", viewBox: "0 0 1 1", children: \[\(0, r\.jsx\) \("rect", \{ fill: "white", x: 0, y: 0, width: 1, height: 1, rx: n \* s\.e7 \/ t, ry: n \* s\.e7 \/ n \}\), \(0, r\.jsx\) \("rect", \{ fill: "black", x: 1 \/ t, y: 2 \/ n, width: 6 \/ t, height: 6 \/ n \}\), \(0, r\.jsx\) \("ellipse", \{ fill: "black", cx: t \/ 2 \/ t, cy: 10 \/ n, rx: 1 \/ t, ry: 1 \/ n \}\)\] \}\) \}$/i,
replace: 'function V(e) { let t = 8 , n = 8 * s.EW; return (0, r.jsxs) ("mask", { id: e, maskContentUnits: "objectBoundingBox", viewBox: "0 0 1 1", children: [(0, r.jsx) ("rect", { fill: "white", x: 0, y: 0, width: 1, height: 1, rx: 0, ry: 0 }), (0, r.jsx) ("rect", { fill: "black", x: 1 / t, y: 2 / n, width: 6 / t, height: 6 / n }), (0, r.jsx) ("ellipse", { fill: "black", cx: t / 2 / t, cy: 10 / n, rx: 0, ry: 0 })] }) }'
}]
}
],
Tf
That sure is a lot of minified variable names
And also wrong formatting, where did you get all those spaces from
Yeah I have no idea what I'm doing
lmao
Tis why I came here
I looked at the crash course thingy for the webkit but that didnt really help me either
I wanna replace this element with a <rect> element. Im pretty sure I found the function that adds it?
but again I have no idea on how to go about doing it so I'd be really grateful for some help
how does one format it?
can you not just change the mask attribute with css
I want to change the children of the mask
replace them entirely
I tried changing the mask attribute but it... wait, can you add html elements to the mask attribute?
I tried changing the mask attribute but it always ended up breaking it
I dont want to remove the mask
Ive tried that already and it looks a little ugly imo
besides it only works with specific ones
some tweak out and get really wide
If I understand this correctly, the patches array directly edits the functions that render/create the react elements?
the patches array patches all code
so that includes the DOM or nah?
React element functions are code
the components get bundled into reacts own calls which create the elements
I know
didnt know that discord used react though
thats good to know
I have experience with it
instead of <div></div> you will see for example \i.jsxs)("div", {})
yeah ive saw that a bunch when scouring the source tab yesterday
i take it thats the raw code and not how youd actually write it?
Wdym
you said here that I formatted it wrong
You don't format shit, you just write things that match the code
the minified code doesnt have those spaces
those were added by your browsers devtools I'd guess
ah okay, so no spaces even if there is a line break?
There are no line breaks
I added them thinking spaces were needed when line breaks occured
so no spaces or line breaks?
the line breaks were also added by your browser's formatter
Exactly as written
I wrote it all in one line here
Surely you can see that that's not how the code is
hmm okay
also I have no clue what this does but chances are you dont need to match the entire function
Even if that patch works after you remove the newlines, it won't work tomorrow once the names are rerolled
I see, I wanted to make sure it was exactly the mask I wanted to edit
also the find should just be something identifying of the module the code is in, not your match
Use patch helper btw
I'm confused now. It's exactly how I saw the code in the source tab, let me find it
Speaking of that, I couldnt find it
Which setting do I need to look in?
you need to compile vencord with either pnpm watch or with the --dev flag
ahh
chrome runs the code through prettier
which adds all the whitespace
thats really good to know, thank you
thats also why you do not see any lines on the left of the file, its all on line 1
hmm i still dont have the patcher helper setting
It's not a setting
its a tab in the settings
oh my god im blind
yeah I see it
alright thanks Ill try some things out now
btw is build --watch kinda like nodemon which reloads the app every time you make a change?
in the app
ctrl+r in the app or f5 in dev tools
oh I didnt know that
I thought both just worked everywhere
fwiw you can toggle the formatting from the sources tab as well
im very convinced that what you want to do can be done with pure css
especially because the masks from the url are just .... elements on the page
So I did this and it still didnt replace the code
I want to replace the circle element which isnt possible with css
I think my regex is incorrect
The ^ and $ are probably breaking it
Since all the code is actually on one line
im just trying to get this element but ive tried findByCodeLazy, findByProps, findByPropsLazy, findComponentByCode, findLazy so im obviously doing someting wrong 💔 am i looking in the wrong place here?
it's not exported lol
so i cant access it, or i need to use a different method?
i cant find any documentation 💔
why do you want to find it, what are you trying to do
uhhh i want to add buttons above the text input bar, i assumed id need to find that element first
no, use a patch instead
not typescript, im familiar with ts and js
just not in this context at all
oh my bad
ts is an abreviation
im just trying to figure out patches based off of other plugin code but its not going so well
insane
this might be the wrong area, but i think you should start here
module 893718
thanks im gonna keep trying
hey @humble tulip custommessagetimestamps broke btw and I have no idea how to fix it but you probably do
Thanks, I'll take a look tomorrow
@steady knot it's still fine for me, have you pulled recently? The patch changed a few weeks ago
yeah I did
wait
ok I swear I did but apparently not
I however crash if I try to view the settings
oh I think I know why
yeah didn't pull constants lol
what would be the best way to force a component to rerender? im adding my own logic here to force true at a specific condition, doesnt update until i change channels/upload something though
state
any plugin where i can get an example from orr
Okay cool lol, is it all good then?
yeah all good
Sweet
yeah took me a while to notice it's broken because a lot of my stuff is in various states of disrepair
but someone made an issue in my github about it lol
do u know how react works
it's just react
insert a useState() call
update state to rerender component
its 1 am i dont know how anything works rn 😭
i was thinking about inserting a usestate but i wasnt sure if there were better ways
tbh AI prob can do basic react
yes it can
yea it can i vibe code all my plugins and they work perfectly every single time
that's not what i mean, AI is good for simple things where you'd rather not spend 10 minutes reading a doc page
yk i didn't know this until abt a month ago
{
find: ".full,tooltipClassName:",
replacement: {
match: /text:(\i).full,/,
replace: "text:$self.renderTimestamp($1,'tooltip')"
}
}
How do i fix Unexpected identifier 'tooltipClassName'
test <t:1744617600:t>
by adding a comma at the end of ur replace
I was looking at other implementations of fetch, and I don’t know what I’m doing differently. Can it not happen on-demand, and it has to be run on startup?
what?
I was talking about this earlier, but I’m running into issues with cors.
I’m trying to fetch a file embed from discordapp from discord
show code and error
Why would you use any implementation of fetch other than the browser's native
I’m not at my computer at the moment.
Is there a more abstract fix that you can just describe?
The response needs to be opaque.
why are you speaking to vee like hes an llm 😭😭😭
Is he not?
Am I? If so, that was not my intent.
larger large language foundation reasoning model with thinking
that actually hates its own kind
wait i'm just describing humans now
everyone hates each other 
Indeed.
i genuinely cannot figure out how to stop the message input stop clearing after sending a message, already tried patching all the "shouldClear"s to false, tried patching out various setState calls, big mystery to me...
why
on the forward plugin i made the message gets cleared from your input even if you have keepforwarding enabled which is annoying asf
it's definitely controlled by shouldClear
patching shouldClear to false definitely does something, it delays the clearing but it still clears
specifically using the patch
{
find: "this.props.pendingScheduledMessage",
replacement: {
match: /(\i\.drafts\.type\),{shouldClear:)!0/,
replace: "$1false"
}
}
(unless this is the wrong module? xd)
very likely the wrong
why tf are you doing this ?
thankls for the ping now i know what to steal 
what's the store that discord relies on to display this number here
RelationshipStore
thank you
is getMutualFriendsCount linked with
UserProfileStore
because it doesn't seem to be working
UserProfileStore.getMutualFriendsCount()
skill issue
i believe the profile needs to be loaded
yeah it does
50 mutual friends 😩
Oh vee
how do i access a localstorage key ?
basically i want to force set "resizable-sidebar-width-2" and patch the function that allow resizing so that the sidebar can't be resized
why do that when you can just
.sidebarResizeHandle_c48ade {
display: none !important;
}
- has the benefit of being able to resize again just by turning off your quickcss
i mean i can disable the resize thing with CSS yeah
but i want to force set the value anyway
so sure i don't need to patch the function
That's just a Google thing
Local storage is a web API
it's on the desktop app
Desktop app is web
yeah but what i mean is that the key value is the one that's actually used
it's not just some random stuff
if i change the value and reload, it will take the size
Maybe they have a store for it
Just look at the Stores global with console Shortcuts enabled
idk, i only found it used there
Vencord.Webpack.findModuleFactory("resizable-sidebar-width-2")
ƒ (e,t,n){n.d(t,{li:()=>r,nT:()=>a,p8:()=>o,qO:()=>l,zx:()=>i});let r=264,i=432,l=375,o=12633==n.j?76:null,a="resizable-sidebar-width-2"}
Am I misunderstanding or do you just want to know how to set a value in local storage? Like localStorage.setItem("resizable-sidebar-width-2", 150);
Following this through just leads to them using that value in local storage directly
that doesn't work, already tried
localStorage.getItem("resizable-sidebar-width-2");
VM973:1 Uncaught ReferenceError: localStorage is not defined
at <anonymous>:1:1
I see
You'll need module 37082 then
Either patch out that delete or use the reassigned one
they do funsies
the idea is basically i'm gonna make a js + CSS snippet to make a custom UI ressembling the old UI so ideally it'd be smth easy to use
vencord exports localStorage somewhere
just import from there
or Vencord.Util.localStorage in devtools
that's convenient
hi!!
ok prepare for rookie ahh questions
this doesnt seem to work
im using vencord desktop custom build (with one example plugin) and have restarted
It may be in the overflow menu at the top of dev tools
elaborate, do the tabs not show up or?
If not, sometimes once you do the full restart you also have to do a soft reload for it to pop up
have you done a full restart? completely closing the app from the task manager?
with ctrl R
ctrl r is not a full restart

i think i have noticed a vanilla discord issue and i have no idea how i could even fix it
basically if you right click on a message then right click on another with the menu still open, instead of bringing the menu on the other message, it simply make the menu disappear
it's like the menu will simply consume the action when exiting
actually it's not just limited to right clicking actions
if you right click and then try to left click smth like the window close button, it'll steal your input
worst thing is it didn't exist on the old UI
If it didn't do that, that'd be a bug
i'm pretty sure
no, this behavior is a bug
like try right clicking somewhere on your desktop then right clicking somewhere else
That's a windows bug then
having to do 2 inputs instead of one when you miss the position sucks
i disagree, but fine
well thing is, you're not clicking outside of the menu, you're clicking on what's under it
the menu is merely smth that's added on top of the context, it's not a new context
if i can see smth, i should be able to interact with it
unless it's made clear that i cannot by by example hiding it completely or making it unreadable with blur
with the keyboard, yes, with the mouse, no
Add css div[class*="trapClicks_"]{ pointer-events: none !important; } to your quickcss
omg
did they really do that
it doesn't entirely work
if i try to right click and then to click the discord search bar, nothing happens
but it's better than nothing, thanks
i dont think i understand finding matching for patches
because when i try to search something someone else wrote in the source code i cant find it
- sort of? 😭
- but even if i search something like "REPLY_QUOTE_MESSAGE" it doesnt find it
Well yeah that string isn't anywhere in the code
what is this referring to then
That's referring to the hash of the intl key REPLY_QUOTE_MESSAGE_BLOCKED
Since those hashes are a bit opaque
basically you first find smth around the stuff you want then you specify smth that must match and what it's replaced by
Discord memoised message timestamps and it's made my custom timestamps plugin crash the app smh
nooo i love your custom timestamps plugin
hooray i got a patch working thank you
I guess it works but this seems like a weirdly roundabout way of detecting the timestamp format
I'm tempted to just patch out the useMemo to fix it but I probably should fix it properly
I think it's just because I'm using the force updater inside it
whelp i searched through what feels like every file and i cant see anything else that clears it
now ive even tried patching out the calls to clearValue completely and patching the function to just immediately return and it still clears..... in genuinely at a loss
nvm I just decided I'm removing the memoisation, who cares
how can i disable notfication in system? to show it only in discord
no, i mean in plugin (in code)
I am writing a plugin in which when you click on a notification a function will be executed, and because of this I would not like it to be shown the system notification as well
i didnt see this option in interface NotificationData but maybe somewhere other setting disablint that
are you talking about the internal notifications or the external via discord
messages that are sent via import { showNotification } from "@api/Notifications", and I want them to appear in Discord (in the application), but not in Windows (notification center)
...? system notifications can also have click actions
nvm i got it
What is the best way to have a small tag or a place holder on my banner? Is there a pre-made function?
really sorry for asking this, but does anybody have any resources to get started with "modding" the app? i already know typescript, i have followed the guide to create a plugin, but now i'm stuck with not knowing how discord actually works plugin-wise, (meaning where to find patch "find" values, etc.)
really appreciate any reply
i was at this stage like yesterday
thx I'll take a look
im not the best source since i started literally yesterday but feel free to ask more questions
a lot is also reading existing plugin code
yeah I tried doing that yesterday
it kinda worked but still
this pretty much explains patches
but for other APIs and all read existing plugins.
hey quick question is there a way to get patch helper in vesktop or do i have to run it through the vscode extension/patched discord?
i tried compiling vesktop from source but the tab doesn't appear in settings despite enabling dev mode
i'm running vesktop right now and i have it in my settings
are you sure you're loading vencord from the right location
what command are you building vencord with
i tried both pnpm package and pnpm build --dev && pnpm electron-builder and neither worked running dist/win-unpacked/Vesktop.exe
you have to build vencord in dev mode, not vesktop
also you need to do this
set the location to your local vencord dir
oh so build vencord and set the location in vesktop?
yes
gotcha, ty
nvm I found it
@wraith carbon hi, your plugin ForceOwnerCrown does not seem to be working anymore. could you take a look, please? thanks!
don't ping plugin devs to fix stuff
that is the logical way to inform them?
Does not matter, its needy and who knows if they even work on Vencord anymore. We know what is and isn't broken and you do not need to pester plugin developers about it.
Do it in the future and we may strip your access to these channels
Also, its not even ForceOwnerCrown which is broken, actually
it being broken is a side effect iirc
be nice 😭
some other stuff with the memberlist broke too, i wouldn't be surprised if it has to do with that
you're being very arrogant with such a simple request I made
I had checked if the developer was active before sending the message, and he/she is
I had notified developers in the past about problems in their plugins and I have always been very welcomed by that
if you don't like it, sure, but you can't speak for them
you could said that first and only, would be sufficient and would be gentle
👍
once you get your plugin merged to vencord you torture @hushed loom with your plugins maintenance like half the developers of vencord arent active in the vencord space anymore 😭
so there is no real point in notifying people because someone else (probably sadan) will fix it
thank you sadan btw 
all hail sadan
Nah, Nina you will vibe code Vencord
hello guys, someone made a pr long time ago about this feature, pin dm permently in your server bar
https://github.com/Vendicated/Vencord/pull/2841
Can some one look at it ?
@novel canyon Still here man ? :n-Mpray:
What am I doing wrong? I've tried many things and nothing seems to work.
what is your plugin called
send full code
okay, but it's really ugly
ok
no need to apologise everyone makes mistakes 👍
the plugin is illegal anyway, it breaks rule 7
No plugins that interact with specific Discord bots
Also every time you make changes to your native script you need to fully restart discord for it to apply
i.e. close it from tray
im developing with the extension, so refresh works, right?
pnpm buildWeb -> reload extension -> refresh webpage
natives are not a thing in web
how would that work
natives are desktop only for when you need to run code in the system process with stuff like filesystem access
no, i'm using it for cors
.
yeah still natives are desktop only
so.. am I just screwed?
all I can think of is a CORS proxy
yeah, that was my first thought
what api are you using
your own or someone else's
okay just asking cause a lot of people have no idea how cors works and have cors problems with their own api
well there's nothing you can do
just don't use that
why do you need to fetch smth from there
embed/cdn link
what's the url?
just the cdn subdomainɁ̦ cuz that doesn't work
or is it something jank like a specific port is the only one let through
What is the asset?
it’s dynamic
in vesktop:
i'm wondering now, why can't you fetch the cdn asset from the client directly?
how the hell am i supposed to write a patch for this (newbie question sorry)
im trying to make it so the l function return true (which supposedly should make the channel list collapsible)
just patch the place where the function is used (more unique and will also reduce side effects)
thank youu!! :3
{
find: "\"ChannelSidebar\"",
replacement: {
match: /.isOpen\)&&(.);/,
replace: ".isOpen);$1=true;"
}
}
any idea why this patch doesnt work? patch helper says everythings good and it compiles but when i put it into my plugin it doesnt even try to patch the file
check console
scroll the the beginning vencord will throw a warning if the patch had no effect (nothing got matched) or an error if the patch resulted in a javascript error
works for me, although the button to reopen the sidebar is missing
forgot to rebuild... classic
u can use pnpm run watch so u dont have to rebuild every time
i rebuilt like a million kajillion times
reinject
a who what now
im using vesktop guh
Go to vesktop settings > developer options, and change the vencord location
already done
its not that my plugin isnt loading, another one of my patches is still working
ok i figured it out but i wil lnot say what i did wrong in fear of getting jumped
I don’t know
discord is weird
give an example url you wanna fetch
https://cdn.discordapp.com/attachments/1032770730703716362/1363161306416287996/1745073379881.png?ex=68050665&is=6803b4e5&hm=cf34ab78bcf06428341ec5c2c4887867bb5db1ae919d16833d824e78ae4c0c27&
why do u even need to fetch it
What do you mean?
what for, what are you trying to do exactly
I sent my code earlier…
does anyone know how to intercept (or remove) the original functions for hotkeys, like remove the thing that edits if you hit up on your keyboard with a vc plugin
@quaint cipher
tbh i'd look at discords code for where you set keymaps, then go from there
Anyone knows the name of the icon in loading (the one where it shows the quotes)
That ^?
this?
This
Anybody know whether the ChannelTabs plugin works? (https://github.com/sunnniee/Vencord/tree/channeltabs/src/plugins/channelTabs)
doesn't
working on a fork of it with tab groups. prob gonna finish within the next month if im not lazing off
@gusty maple i think you were looking for this module earlier
hello someone can now help me with my code or technical error?
dont ask just to ask
horror plugin but please do not interact with the api via fetch
though, i'd make sure you actually restart the client properly
if it compiles just fine, and you are following the correct structure, it will appear
Wha
anyone know how i can hide/unhide an embed client-side (pretty much without sending a request to change the message flags) (no not all embeds either)
Look at how the plugin that does that does it
I do it here by just removing it from the message object and rerendering but I then send a request to retrieve the embed to show it again which could probably be done easier if you just wanna hide/show existing embeds
yeash just hide/show existing ones
vp hidemedia
thank you
how do i get author id from a message
there's probably a lot of plugins that do that that you can look at
sorry i don't know which one in particular
View raw for example
enable developer mode and right click the name -> Copy User ID
it's in vanilla discord so no plugins needed
i mean in the context of the plugin so i can filter...
also i got it now, haven't thought of using the raw data
Or just console.log the message, like you do with literally any type you want to inspect to find the props to use
themeattributes
just when building there is no error and discord normally turns on but my plugin doesn't work!
I am trying for like an hour to follow this tutorial: https://gist.github.com/sunnniee/28bd595f8c07992f6d03289911289ba8?permalink_comment_id=5080433
but I js can't understand itt, I js want to add a button here(the attached photo)
why's regex have to be so hard >:c
you found the right location in the code?
what does Test Patch result in
Patch failed: Error: No Discord Clients Connected! Make sure you have Discord open, and have the DevCompanion plugin enabled (see README for more info!)
I m 2 lazy 2 setup DevCompanion
restart discord
by making your find more specific so that it only matches the one module you want to patch
but the tutorial didn't show how to do it
r u good w regex?
cuz I may or may not(MAY VERY MAY) need help
if i'm using UserStore.GetUser(<user_id>) on a large amount of people will that put my account at risk?
i'm trying to get mutual-friends, data im just wondering
possibly
dont spam too much
just call the function that the various mutual friends modals call?
how do i do the "error" screenshake that happens when, for example, you try sending a message while you still have slowmode
ComponentDispatch.dispatch("SHAKE_APP", {duration: 300,intensity: 2})
thank youu
setInterval(() => ComponentDispatch.dispatch("SHAKE_APP", {duration: 300,intensity: 2}), 400);
duration: Number.MAX_VALUE
uhh
anyone know what is going on? i don't have such import in the code even i only have such:
const { Plugin } = require('vencord');
const { Button, ActionRow } = require('vencord-components');
const { prompt } = require('vencord-utils');
> vencord@1.11.9 build C:\Users\X-Code\Documents\Vencord
> node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs "--dev"
dist\preload.js
dist\ 2.4kb
vencordDesktopPreload.js 2.3kbdist\
preload.js.LEGAL.txt dist\0b vencordDesktopPreload.js.LEGAL.txt 0b
dist\vencordDesktopPreload.js.map 9.4kb
Done in 24ms
dist\preload.js.map 9.4kb
Done in 22ms
dist\patcher.js 44.8kb
dist\
dist\patcher.js.LEGAL.txt 1.1kb
dist\patcher.js.map 239.9kb
Done in 101ms
vencordDesktopMain.js 39.9kb
dist\vencordDesktopMain.js.LEGAL.txt 1.1kb
dist\vencordDesktopMain.js.map 221.0kb
Done in 103ms
X [ERROR] Could not resolve "./userplugins/removechannel"
import-plugins:~plugins:188:17:
188 │ import p187 from "./userplugins/removechannel";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./userplugins/removechannel"
import-plugins:~plugins:185:17:
185 │ import p184 from "./userplugins/removechannel";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error
Build failed with 1 error:
import-plugins:~plugins:188:17: ERROR: Could not resolve "./userplugins/removechannel"
ELIFECYCLE Command failed with exit code 1.
Do you have a removechannel folder with no index.{ts,tsx}?
yes
Plus, that isn't how you import things anyway
So where's the confusion
I was taught in such a way!
how else is it correct?
Have you looked at literally any other plugin
yes but I have not analyzed it in its entirety
So you acknowledge that you do things completely different from all other plugins
But you haven't considered that that might be why things aren't working?
well, yes that's right
stop using ai
i'm trying to get the server-tags from the list here
nevermind found it
my question is what would i use to grab that array there 
nvm once again
right now im using patches to get the function data once its called is there a way to call it without relying on a call first?
and what function would i use to find it
check the findbyCode
you could use it to find function by their code
yeah not working out for me
probably cause of lack of experience i've tried fetching the table with all different kinds of stuff only thing working for me is my patch
but its fetching once i open the profiles tab and i need it before
seems like the function you want is lazy loaded, findbyCode only finds from loaded modules
