#🧩-plugin-development
1 messages · Page 60 of 1
someone did it in an extension of silent typing
look into that source code
also, wheres a list of all the apis for devs?
is it just the react devtools
can someone review #2555, specially the patches and react code
Not sure about the code but
yeah that's fine iirc
that's fine
Read the header of that file :>
wow
Just curious, any reason why?
if you really want to know i can tell you in dm, anyway
do you think this patch is decent? https://regexr.com/81ej7
How can i get the function that opens the modal from the user area in the bottom left? I'm essentially trying to replicate the functionality of that button, but in a different place
Not this one, right?
Can you link me to it if possible?
I'd love to look at the source code 
index.tsx: Lines 52-77
const settings = definePluginSettings({
replace: {
type: OptionType.COMPONENT,
description: "",
component: () => {
const update = useForceUpdater();
return (
<>
<TextReplace
title="Using String"
rulesArray={stringRules}
rulesKey={STRING_RULES_KEY}
update={update}
/>
<TextReplace
title="Using Regex"
rulesArray={regexRules}
rulesKey={REGEX_RULES_KEY}
update={update}
/>
<TextReplaceTesting />
</>
);
}
},
});
(it is that one)
I'll be looking into the source code in a bit. Thanks so much, so excited to get this plugin out with comfy settings!!
does discord have data for when friend requests were recived/sent
look at SortFriendRequests
Thanks
list of apis? just look into src/api
Hey! I'm looking for a way to run commands using Vencord. Maybe using eval somehow? The way I wanted to do it is kind of confusing, I first wanted to create an express server, then when a request is sent with the command, it will eval the command. But that seems like a really bad way to do it. Is there any other better way? Since I'm thinking of making a pull request of this plugin, I'd want this to be done the best way possible.
Honestly it sounds like something that wouldn't be accepted
What do you mean by run command and what's the problem of running eval natively if the user requires a local expresss server? ( If i got it right )
by run command I mean run a command with child_process. I mean yeah I can do that natively as well, but my main question was to know if that would get accepted in the main repo. Which I think won't happen. Let me share my actual plugin idea, I'm trying to make a plugin called DiscordClips that would clip voice calls in Discord (without the need of streaming your screen of course). So I thought of recording the audio of Discord's window using ffmpeg, for which I would need to eval. I can't think of any other better way to do it though.
There is a plugin request with the similar functionality, which is not closed, so maybe you have luck to get it accept and there is a pull request that uses child_process, so you don't need to create a express server just for that
Plugin Description I know there is a bot for this kind of thing called Craig but it is painful to bring them in and mess around with the website to get a recording. Having it play a "now recod...
This is a plugin that adds a yt-dlp command. You pass a url, it downloads it and readies it as an attachment. See the gif for a quick example.
It supports any URL supported by https://github.com/y...
So you can just spawn ffmpeg without using eval
"Now using Fafa Theme Library for themes" 😭 what??
#1032200195582197831 message this probably
that plugin is utter shit code
why owuld they use it
becausen't
that whole fork just seems like someone is actually trying to turn Vencord into spyware because what whole purpose other than hiding spyware/malicious code would come about from forcing auto updates and hiding the update tab
insane
also, I love the theme library plug-in and I use it/regularly submit things to it and think it should be a lot bigger than what it is but it is not big enough to depend on it as the only way to get themes/CSS stuff
Hey! It's my first time submitting a plugin to Vencord and I have a question. I've opened a PR (#2560), did the required changes according to the code review and made sure my branch is up to date with the dev branch. Still, GitHub says there's one workflow waiting for approval by a maintainer. Is there something else I must do, or do I just have to wait at this point? Thanks!
(from a very new contributor too, take with a pinch of salt) it just means that you are not a pre-existing contributor and that someone with mantainer access has to aprove the test workflow
indeed
for your first contribution, a maintainer has to approve the workflow run to prevent abuse
All righty, that's understandable - thanks for the info! ^^
Vr in your name ~~ on github + only forks/lowquality code~~ = no
Quick question. I am a bit smooth brain but is there a way to make the message logger save messages indefinitely or possibly export chat history prior to edited messages to a notepad file?
messageloggerenhanced from #1032200195582197831 iirc can do that
anyone know what the function / component prop is to detect right clicks?
ik onClick will detect left and ive seen the onContextMenu detects right clicks in react but idk what to use for disc / electron iirc
looking through the chats it appears you are supposed to use onContextMenu but im guesing the component im adding it to doesnt register that
im trying to detect a right click on a gif (in the gif search), left clicking ive been able to detect and edit but when i add the onContextMenu it doesnt detect the right clicks
since im guessing the gifs dont have that prop do yall know if there is any other way to detect a right click
Hemlo i'm trying to make myself customCSS where my messages appear on the right side and other ones are on the left, like on screenshot (screenshot is not mine). Person that created that theme said that you need "Self-Messages plugin" that person created, but it's for better discord, so i wanted to try and remade it, but the thing is i don't know where to test it, because i cannot find "src/userplugins" folder, where do i look for it?
Link to this person theme: https://github.com/Riddim-GLiTCH/Virtual-Boy
And to this plugin: https://github.com/Riddim-GLiTCH/BD-SelfMessages
But question is, are you able to do that? XD Because i don't know how to determine if sent message is mine or not
(my nickname and profile picture changes)
li[data-is-self="true"] {
/* Make right */
}
noway it's that simple XD
there is a plugin called themeAttributes, check it
But it requires this plugin
Are they able to even see this message?
yes you can
I thought that all channels except #🏥-vencord-support-🏥 are hidden for needy 
this is also hidden for needy
if they can't read it's their punishment
but others can see vee's message
I want to make a plugin, how do I get started?
you guys are the ones who broke rule 5.1
:(
oh dang
there is already a folder in src on vencord repo
do I have to create one called userplugins to have my plugins there?
or create my plugin's folder in plugins
userplugins are not tracked by git, so you have an easier time with updates if you're not planning to make pr
why the fuck would they force disable favoriting DMs?
!(e.isDM() || e.isThread()) || a && (null == u ? void 0 : u.isStaff()) === !0
in plugins, there are all the plugins vencord has
i dont think having my plugins there would do it
i'll create a folder in src called userplugins and have mine there likewise..
Just a simple plugin for yourself - userplugins
Plugin for a PR - just plugins, so git can track it
.
nice alr
@dull magnet am I supposed to base PRs on dev or main?
vns #🗳-plugin-requests @fast thistle
main you wont have merge conflicts
ok
can I somehow stop discord from fucking with my audio while being in a voice channel
if its not that then
vns
nah thats not the issue
ig its not possible to change then via patching or similar
need way more info of what the issue is to even start to answer if its possible via patching
"fucking with my audio" is VERY vauge and could be 9 quadrillion things
lmao sorry
it somehow SOMETIMES turns my whole system audio to mono or something
let me try to record it rq
i feel like its a windows issue lmfao
mb
the issue is so random but yeah turns out its a windows issue i guess??
while recording it also turns whole system audio to mono
im trying to add a system where if you right click on smth it has a button, the component doesnt have the onContextMenu prop so im unable to detect a right click, is there any other way i could either add this prop or get a detection of a right click
Hi, I'm trying to create a small plugin for myself to hide a user in the Channel Member's list. I'm pretty new to React and I understand how to get the ChannelMemberStore but I'm unsure how to get the list of users or prevent the rendering of a specific user's element. Can anyone point me in the right direction? Like a pre-existing plugin that prevents elements of a FluxStore from being rendered?
you need to find the code that renders the member list, not the channel member store
stores are most of the time cache/places where data is stored, which the components on discord use to obtain the data and render something with them
enable the react devtools, select a member and inspect the components
Sorry inspect the components using react devtools and not normal devtools right? Because I'm not seeing that button.
yes!
you need to enable it in vencord settings
then it will appear as a tab in the normal devtools
Thanks
lol okay not sure what's going on but I don't see anything in the text area
yep that did it. Thanks
hey i wanna get started into creating a plugin and i have a question, does the plugin have to be coded in typescript or can it be also coded in javascript?
TypeScript is just JavaScript but superior
you wont even notice youre using typescript
Anything in JavaScript is valid TypeScript anyways
just use a .ts file
i guess 
look at any other plugin 
genius
where is purple.ts located
1\Vencord\src\userplugins
yeah open all of it
nice!
i've never made a plugin before
how can i add a chat bar button?
or whatever these are called
hey, MessageLinkEmbeds uses this Embed component:
const Embed = findComponentByCodeLazy(".inlineMediaEmbed");
what is that?
at first I assumed the embeds have HTML generated from scratch by the plugin
but it seems like this is some internal Discord thing
I know nothing about React so maybe I should just submit an issue about this instead of trying to fix it myself...
it's just Discord's react component for message embeds
where is this used in vanilla?
do you mean like, the base used for images and stuff?
or wait
for embeds
Discord is dying ;_;
embed
not just bots
yeah websites and stuff, I get it now
I just was confused because I think attached video files and images are also called "embeds"
or maybe I just need to sleep it's 4 AM
oh yeah the code makes sense now, since those embeds consist of description, title, author and things like that, here a ChannelMessage component is placed in the description instead of text
ohhh it uses search results in the chatbox
no wonder this is broken
I think just the regular message component could be used
sounds very useful
ooo this is basically this
"Anonymous" is the div
it has a key, and some actual component as a child
I don't know React, I don't know what a "memo" is
yes it's a different thing, I said basically because I recognized this structure in the existing code
yeah but it's a completely different thing
basically I am trying to fix this by replacing the ChannelMessage with the regular message component, whatever that'd be
and from here I am trying to find it
what do you want to do?
^ I tried explaining, but I am sleepy, what do you need to know?
fix what?
fix this hell
the MessageLinkEmbeds plugin
it uses a search result component in the chatbox
which breaks Compact mode
I want to make it use the chatbox message component
that sounds like something that'd work
well I know nothing about React but I know a thing or two about HTML
and this is the search result HTML
though the one you screenshot is the one that uses the AutomodEmbed
or at least looks like it is
and that one uses whatever the automod thing uses internally
I have explicitly disabled that in settings, assuming that does something
well it definitely does something
because if I enable it, it works
as AutoMod embeds work with Compact mode
somewhat at least
this still applies regardless
it uses the regular message component
^
nope, notice the lack of .avatar_ sibling and the message_ parent
Hey all - I'm trying Vencord right now, and I want to port my fix for AFK detection on Wayland (and probably PR it as a plugin.) Is there an equivalent API to the dispatcher from BetterDiscord, like this? https://github.com/Colonial-Dev/WayAFK/blob/a1680cfe4a1c7d77504f67b2d6250a7d23d3ad8b/WayAFK.plugin.js#L43
WayAFK.plugin.js: Line 43
BdApi.Patcher.before("WayAFK", Dispatcher, "dispatch", (that, args) => {
as I'm saying yes, it is
the parent is just a wrapper, it is not needed
ok right forgot most people use Cozy mode
the Cozy mode HTML is indeed the same as the search result HTML, I think
I dont use cozy mode...
wait no I'm right, since when the .contents_ has a ._avatar child
it doesn't
what
what element is this screenshot even showing
a regular message
Compact mode messages don't look like this
they look like this
unless it's search results
I swear I am not insane
trust me
you must be using Cozy mode
the right component is being used
explain this
that's how compact mode messages look
but my message does not look like that??
#🧩-plugin-development message you said you are using Compact mode...
I forgot that was the normal
so I am right
on Compact mode messages don't look like this, only on Cozy mode or if they are search results
and there was something that made me think this is search results
let me think
oh yeah the classes applied!
ok we established that I am not crazy
what now
it's probably css
no it's HTML
the message isn't using Compact mode HTML
it's using search results HTML, or Cozy mode HTML, since it's the same thing
visible proof
oh
decorations don't exist in Compact HTML
try removing the search result classes
I dont understand anymore what's happening
search result/Cozy messages are inserted into a Compact mode chatbox
which breaks everything
is that understandable
oh
this is such an XY problem lol
how
you could have told me that before...
cool
yeah Ven did that already if you look a message up
how does copilot know
yeah but that's also how you get if the setting is on or not
it's used under
oh lmao
oh right
Compact is great with some CSS
without avatars is horrible
theres nothing special about search it uses the normal message component
anyways here's someone with a better issue
the FluxDispatcher module is discord's class. nothing to do with BD
Ohh I was just starting to think they might be the same thing
good to know. I just spent so much time theming Compact mode I came to see Cozy HTML as "search HTML" because I don't have a brain or something.
how
it's a setting
it's a setting
in settings
oh im blind
i fucking hate this dude
i love when i accidently hover it while trying to type in chat
look it's me twice
so it starts typing in that shit instead
and ESC DOESNT CLOSE IT
WHYYYY
just disable the experiment for it
i have no idea cuz I dont have it
Discord likes me I think because they don't test it on me
but if I dont have it, then it's an experiment which you can control
I also still don't have simplified profiles
So, if I'm understanding this right, FluxDispatcher.subscribe is what I want?
Or is further hackery needed to mutate the FluxEvent
same
#🧩-plugin-development message what about this
nah it's bad
nice very impressive
but this is better
it was to Colonial
wait i'm confused lmao
too many not message things in my message sending program
I mean yeah it's better
but I personally still dont like it
wait am I trying to fix something the devs already fixed 😭
understandable
sorry for saying it was bad, didnt realize it was modified
sorta, Vesktop is a separate program
which wraps around the web client
and since everything on the native side can be controlled that way, it fixes many things
for example, screenshare with audio on Linux
oh that makes sense
didn't realize this was a web wrapper
and I guess i never tested if AFK worked or not lmao
i just saw someone ask about my BD plugin in this server a while ago
well that depends on whether you use Vesktop or not
mm
then my work here is done 👍
good excuse to get VScode containers working at least
well it should be working fine
iirc there was a discussion about it on github
works fine for me 🙏
i don't really understand that issue
i would prefer discord not be aware that i'm typing if the window isn't focused, lol
wait what's "user input" @hexed plank
do you mean mouse/keyboard activity?
or chat input focused
Input device activity, yes, mouse and keyboard.
love ❤️ thank
not only for putting up with me being basically drunk from no sleep but also fixing it for me lmao
that's another benefit of vesktop, discord has no control over your system, it's jailed inside the browser sandbox
hmm this can definitely be done but i think only on x11 & xwayland, not wayland
unless there's some portal on wayland for getting it
it just keeps getting better
there isn't yet afaik
might be a proposal idk
if I wasn't using browser I would probably be using Vesktop
it's good
I personally use X11. Wayland would be a bit difficult indeed.
Does Discord official client know input activity on Wayland?
the official Discord client is X11 only
so, no it doesn't
no
wayland deliberately makes it so that only the focused app can get keyboard and mouse input and stuff
for privacy / safety
one of the things left to solve for Wayland adoption
idk if it should be a portal or a protocol but it should be something
that's also why global keybinds are hard to do in vesktop
cause there's not really a good way to do that on wayland
yeah...
there is a portal for keybinds but it's not very mature and not implemented by all desktop environments
i mean it's definitely good that programs can't log keystrokes and such
but it sucks that you can't do keybinds
just needs portals for such stuff and then it's gonna be perfect
yeah it's not like Wayland is just making things hard for no reason lmao
it makes sense but needs to be opt-out somehow
does the hacky way of running Vesktop under XWayland and redirecting all input to XWayland work btw
that's how people deal with OBS on Wayland
well programs in xwayland can access it i think
assuming the compositor permits them yes, but can Vesktop do global keybinds on X11?
oh god this is cursed
so basically if you run an app in xwayland, it can access all keystrokes and stuff, but ONLY if any xwayland app is focused
as soon as a wayland app is focused it can't access anymore
that's so funny
so basically even if you run vesktop in xwayland, global keybinds will still be broken most of the time cause most other programs are gonna be native wayland
that's also true yes, but at least some compositors can allow all XWayland programs to get all input all the time
I know KWin can do that
another solution is running vesktop as root xdd
(not recommended please don't)
but there was a vesktop pr that added a pipe that you can write commands to
for push to talk
that's probably the best solution for now
you just create a keybind with your DE/WM that writes to the pipe
is there any solid way to turn on/off patch depends on plugin settings?
yes, add predicate to the patch
look into betterNotes plugin
gotcha, thanks!
omw
Read the error
those are linting errors
It literally tells you what to do
i'll need help with slme@stuff on my plugin
explain the problem
how could i get started making a plugin?
i do apologize if there's something obvious about this, but i couldn't find anything lol
i did find that, but i didn't quite understand as it is quite vague with what you're meant to do
i cloned the repo and made a new folder, opened code there and tried initializing a node project and such, but the pnpm watch didnt work
so i tried opening code into the main repo folder and doing the pnpm watch and pnpm build but neither worked
it just gives "Cannot find package 'esbuild' imported from F:\Programming\Vencord\Vencord\scripts\build\build.mjs"
You haven't installed dependencies
pnpm i --frozen-lockfile
ahh alright, thank you
How can i get if a user id has the "i'm new here, say hi!" in a specific guild
There may be a way to do it with join date checking
From what i can tell the user object doesn't contain it
- search for
I'm new hereto find string name - search for
.STRING_NAMEto find the module where the string is used. scroll up until you find this id part - search for
MODULE_ID"to find modules that import it - get the id of that module, then use
wpexto into their own module for easy viewing, if they aren't already - find the condition it is used on
- profit??
alternative: use react devbtools to inspect the ui element if applicable and jump to the component code
or double click
howthe fuck did i never find this by accident
Hm, i'm pretty sure the useNewMemberBadge function is a hook (might be wrong), but i'm trying to check from just a standard function
I'm totally lost.. can someone explain me what I'm doing wrong here? everything renders fine but when visibleNotes updates then in NotesDataRow userId and userNotes have correct values but userInfo.name and userInfo.id have incorrect values and <Avatar> too (next have to be strange explanation but I just place video attach here)
function NotesDataModal(...) {
const [searchQuery, setSearchQuery] = useState(""); // search bar
const [visibleNotesNum, setVisibleNotesNum] = useState(10);
const usersNotesData: [string, string][] = useMemo(() => {
return Array.from(usersNotesMap);
}, []);
const filteredNotes = useMemo(() => {
if (searchQuery === "") {
return usersNotesData;
}
return usersNotesData
.filter(([userId, userNotes]) =>
userId.includes(searchQuery) ||
userNotes.toLowerCase().includes(searchQuery.toLowerCase())
);
}, [searchQuery]);
const visibleNotes = filteredNotes.slice(0, visibleNotesNum);
return (
<ModalRoot ...>
...
<ModalContent className={cl("content")}>
{
!visibleNotes.length ? NoNotes() : (
<NotesDataContent
visibleNotes={visibleNotes}
/>
)
}
</ModalContent>
...
</ModalRoot>
}
function NotesDataContent({ visibleNotes }: {
visibleNotes: [string, string][];
}) {
if (!visibleNotes.length)
return NoNotes();
return (
<div className={cl("content-inner")}>
{
visibleNotes
.map(([userId, userNotes]) => (
<NotesDataRow
userId={userId}
userNotes={userNotes}
/>
))
}
</div>
);
}
function NotesDataRow({ userId, userNotes }: {
userId: string;
userNotes: string;
}) {
const [userInfo, status] = requestUserInfo(userId);
return (
<div
className={cl("user")}
>
{
status === 0 ? LoaderSpinner() :
<Avatar
className={cl("user-avatar")}
size="SIZE_56"
src={userInfo.avatar}
/>
}
<div className={cl("user-info")}>
<Text variant="text-lg/bold">{userInfo.name}</Text>
<Text variant="text-md/normal">{userInfo.id}</Text>
<Text variant="text-md/normal">{userId}</Text>
</div>
<Text variant="text-md/normal">{userNotes}</Text>
</div>
);
}
function requestUserInfo(...) {
const [state, setState] = useState({
userInfo: {...}
status: 0
})
useEffect(() => {
...
setState(...)
}, [])
return [state.userInfo, state.status]
}
you're missing keys
every time you are mapping some data to components and the array may change, you need to use keys that are unique to the current data
data.map(v => <div key={v.somethingUnique} />)
thanks
also requestUserInfo looks like you're doing async. if so, use the useAwaiter hook
for example a good key in your case would be the user id, assuming every user has only one single entry in the array
requestUserInfo is a rewritten version of useAwaiter cos second one on error sets value to null
so why is that not desired?
if something goes wrong then I'm putting fallback value there instead null (no need to null checking for it in actual code)
I'm was surprised that fallbackValue in useAwaiter options means only initial value instead initial value + value if factory function errors
i mean u can always just skip the fallbackValue and do it manually lol
no need to make ur own hook
yea but then I'll need to do smth like that
[userInfo, _, pending] = useAwaiter()
!pending && userInfo ? userInfo : fallbackUserInfo
in my version I can just check status value
[userInfo, status] = useAwaiter()
status !== 0 ? userInfo : fallbackUserInfo
[userInfo,...] = useAwaiter()
userInfo ??= {...}
there's onError callback in useAwaiter but I can't update userInfo there cos it's a part of useState
react will rerender this code when useAwaiter factory will be executed?
yes
react functionality is pretty simple:
if you set state, it rerenders, unless there is some memo
react.tsx: Lines 122-125
export function useForceUpdater(withDep?: true) {
const r = useReducer(x => x + 1, 0);
return withDep ? r : r[1];
}
good to know 
this is not part of react insane
2 questions, 1) how do i remove that white button on the second bar and 2) how do i change the size of the bottom bar to match the top?
nvm just needed the same class
2 progress bars why 😭
is there smth like "on settings update", so I don't need to force a restart after changing them
volume because im fat and lazy and dont want to tab into spotify when i have disocrd on second monitor
right click the album cover
too hard
onChange iirc
gi
f
idk how to test it so better just ask here: when user was added into UserStore can Discord remove it from there (to free memory or smth else)? basically question is "UserStore contains user entry forever?"
Is there a good documentation for vencord?
I wanna code my own plugin but the /docs one just dips a but in
Yes
The source code
And this
i meant that, but it is only dipping in a bit
i meant things like notifications
or badges
^
Anything you want to do, another plugin has already done most likely
You can read how they did it for a good idea of how it's done
look at /src/api/
how do i run the vencord build on vs code?
the contributing docs helps with patches and stuff
Wtf does it do lmao
shows all svg icons
Oh sick
heres what it looked like
Too lazy + exam season is approaching
Feel free to do the same for my other dead PRs, I kinda lost interest and don't plan on reviving them
Warning: shit code
😭
I did :p I just read the message only 😭
I believe I can try to fix it
go for it
put in userplugins or plugins
where to find that
in the src directory of the vencord folder you compiled in https://github.com/Vendicated/Vencord/blob/main/docs/1_INSTALLING.md
can we get in any vc and u can guide me bc im retarded
no
get some js and ts knowledge before developing vencord plugins, youll probably understand the steps better after that (and will be able to actually do something functional)
how do I get the user's gifs? I can't find the store that has it
Thanks!
Vencord.Webpack.findByProps("FrecencyUserSettingsActionCreators").FrecencyUserSettingsActionCreators.getCurrentValue().favoriteGifs.gifs

noob question, can I import npm packages on a plugin?
i mean, can I have a module on it without causing it to be a dependency on Vencord?
this is sad
Im planning on making a plugin to detect C2PA metadata, but that would require inclusing the C2PA lib
which would make so the lib where part of Vencord even for users not running the plugin
Not if you want to pr it
(I mean, if it was ever added for real, im making it for me and I don't mind doing it for me only just like I do with my silly local plugins)
you can lazy load libs if necessary, InvisibleChat does that
biggest issue is bundle size tho
oh, that would work, probably, I'll check how that plugin does it
but if you're using it only for yourself you're free to install deps (though thatll probably cause conflicts)
remember when someones pr added a lib that added 40smt kilobytes to the bundle 
thx
souncs too niche to get merged into main vencord anyway
yeah
is it some sort of rule for the PRs? plugins cannot include more libs?
would be udnerstandable tho, that would make Vencord really fat
Not really, but it's best not to include new dependencies
I'll check that lazy load suggestion, seems about the best option
big shoutout to idk
i forgot
but
// TODO: fix webhooks not sending, fix probable undefined when null issue, add sending as raw again (wanted to make it a checkbox but i cant find checkbox)
function WebhookMessageModal(props: ModalProps) {
return <ModalRoot {...props} size={ModalSize.MEDIUM} className={"wm-send-webhook"} >
<ModalContent className="wm-send-webhook-content">
<Forms.FormTitle className={Margins.top20}>Webhook URL</Forms.FormTitle>
<TextInput
placeholder={"https://discord.com/api/webhooks/1235349630980722698/QQv06cMyTurEIU8nQsZRQMKxdmnnN6FA8Eaa9zbDqGwqeeACx9UAS6CcnVt7B3v8r8t2"}
onChange={v => {
v = url;
console.log(url); // why the FUCK is it undefined.
}}
/>
<Forms.FormTitle className={Margins.top20}>Webhook Message</Forms.FormTitle>
<TextInput
placeholder={"Hello World!"}
onChange={v => {
v = message;
}}
/>
<Switch
key="wm-raw"
value={jsonMode}
onChange={v => {
v = jsonMode;
console.log("hi");
}} // maybe switch? don't use shitcode where i make an int and set it to 2 and then check if the int is 2 thats too much shitcode.
>Send as Raw JSON</Switch>
<Forms.FormTitle className={Margins.top20}>Webhook Username</Forms.FormTitle>
<TextInput
placeholder={"byeoon"}
onChange={v => {
v = username;
}}
/>
<Forms.FormTitle className={Margins.top20}>Webhook Avatar URL</Forms.FormTitle>
<TextInput
placeholder={"https://cdn.discordapp.com/emojis/1221015075922513990.png"}
onChange={v => {
v = avatarUrl;
}}
/>
<Button
onClick={() => {
Native.executeWebhook(url, {
content: message,
username: username,
avatar_url: avatarUrl
});
}}
>Send Webhook</Button>
</ModalContent>
</ModalRoot >;
}```
i have no idea
why it doesnt work
because
i checked logs
and for some reason everything shows up as undefined
my code notes might add a little clarity
let url, message, username, avatarUrl = "";
trying to set the url to v when something is typed in
or uh
idk my brains confuised
const [params, setParams] = useState({ content: "", username: "", avatarUrl: "" });
const onContent = (content: string) => setParams(prev => ({ ...prev, content }));
const onUsername = (username: string) => setParams(prev => ({ ...prev, username }));
const onAvatar = (avatarUrl: string) => setParams(prev => ({ ...prev, avatarUrl }));
// same thing with username/avatar
<TextInput
placeholder={"..."}
value={params.content}
onChange={onContent}
/>
Native.executeWebhook(url, {
content: params.content,
username: params.username,
avatar_url: params.avatarUrl,
});
Got it const setSpeaking = (speaking) => Vencord.Webpack.Common.FluxDispatcher.dispatch({type: 'SPEAKING', context: 'default', userId: '128545421579517952', speakingFlags: speaking ? 1 : 0})
Now how do I get my own user id?
How did you figure all this and you dont know hwo to get ur id
I dunno, just poked around the source files
Is there any documentation or something?
Got it Vencord.Webpack.Common.UserStore.getCurrentUser().id, thanks
how can i find like... the message component?
i want to intercept the onclick handler on the profile picture and username part
react devtrools
how does one get access to #1032200195582197831
ok but how
idk what keywords would lead me there
oh wait.
oh
wait how do i get react devtools to work
does it have to be on the desktop version
i am blind.
Make a mod mail ticket and ask for perms
how do I get access to react devtools?
Is there any interest in me updating shiki so it supports more themes
Namely the Catppuccin themes
From my understanding, Vencord is using a fork of shiki right?
this plugin does not work after last update
i dont have access
me to
how tf you have aaccess to here but not there?
@elder cove @dreamy belfry
Canary Broken (open settings crashes / grey screen on load)
use stable.
please refer to the latest post in #announcements
How long will the error continue?
omg
I am trying to fix BetterSessions patch
{
// Add the ability to change BlobMask's lower badge height
// (it allows changing width so we can mirror that logic)
find: "this.getBadgePositionInterpolation(",
replacement: {
match: /(\i\.animated\.rect,{id:\i,x:48-\(\i\+8\)\+4,y:)28(,width:\i\+8,height:)24,/,
replace: (_, leftPart, rightPart) => `${leftPart} 48 - ((this.props.lowerBadgeHeight ?? 16) + 8) + 4 ${rightPart} (this.props.lowerBadgeHeight ?? 16) + 8,`
}
}
but this match /(\i.animated.rect,\{id:\i,x:48-\(\i+8\)+4,y:)48-\(\i+8\)+4(,width:\i+8,height:)\i+8,/ is evil
how do I de-evil it 
@green vessel what 
escape plus
thx u
this code should be bombed
DOWNLOAD NOW AND READ HORRORS FOR FREE https://github.com/Sqaaakoi/Vencord/blob/keepDMsInSidebar/src/plugins/keepDMsInSidebar/index.tsx
@hoary pilot should judge
idk where else to put this but uhhh
this will negatively impact the keywordnotify economy
vee likely limited interaction because vencord exploded
and idiots were opening issues
@vernal mortar discord is compiled together using webpack
the functions in vencord are for searching thru discord's webpack modules to find exported components
what with whitenames opening random threads?
Geniunely no idea
Probably something to do with the chat lockdown
they cant write in threads either
😭
Seems legit
very opinionated on the way this place handles customer support sometimes
"customer" 😭
client, user, customer, same thing
lol
they also close my pr 😢
is the inability to open a new one temporary or am i just forever doomed
"they"? or did you close it
unfortunately this is not a good time lol
cuz I saw it last night and was confused of why you closed it. lemme recheck
you self-closed it
oops

i can’t reopen it
plugins in the mod atm are the ones that will be taken care of first
wdym
i already fixed my plugin for the update
100+ plugins to fix 💥
until every plugin in the mod is confirmed working
yes but adding yours now adds another thing we have to check
so did the 100+ prs
so its just best that we sort everything else out first and then merge in new stuff
dont think itd take that long lol
but we'll get around to it when we get around to it
they asked how webpack worked in #🏥-vencord-support-🏥 and they couldnt type in here without the role
we have some other things in the works too like translation which includes plugins so we'll have to update all the plugins to support that too
is there a beta system for vencord
😭
pnpm build
no
a lot of the devs here run devbuilds
you can just ask people to try things out but there's no guarantee
oh alr. will adding an option for accessing the development channels in #📩-modmail coming in the future?
dont ask me
oh okay
making a formalized beta program with dedicated testers is a great way to speed up when huge happen
it already is
yeah except that devs are already the beta testers and they wont beta test specific things like individual plugins unless they feel like it
do a quick review of all the prs to make sure nothing is virus
merge it all into a beta form
and not everyone wants to review prs
or test plugins
or whatever
we already ask devs to do that
it doesnt happen
and then give people that and be like “ok if someone fucks up tell me”
if someone wants to test prs they will
yeah you're describing stuff we've already got besides a form
dont push people into doing it
no one really wants to be a dedicated tester for stuff, if they want to test they can do
if all plugins are somewhat useful, all plugins will eventually be tested by people who are just doing day-to-day activities
if you can’t reliably test certain plugins because nobody uses them, perhaps the plugin shouldn’t be included in the first place
..then by that definition, yours wouldnt be included because no one is testing it
i actually know pretty quickly when my plugin breaks because people use it 😭
and by that definition, some* plugins wouldnt be included either, some have merged with only the dev and vee testing it
again, not everyone wants to be a dedicated tester, and thats fine
the people who do are other plugin or core devs
so a testing team would be redundant
its just another role for a subset of a subset of people who use the mod
and we would have no motive to push them into doing things, the best you can do is ask around
you wouldn’t need dedicated testers, just a large group of people who are willing to use a bleeding-edge version of vencord that might have a few links it
so the devs
not large enough
we arent getting more people than that
most people wont or cant install the devbuilds of vencord, and to be completely honest if you want to start teaching people how to maintain a git installation thats detached from master so you can try PRs out, be my guest
it is an uphill battle
right i wanna go home
have an alpha dev branch on the repo where all prs from existing devs that aren’t straight up virus get merged
then, you have a centralized repo to test all the brand new things
the amount of idiots who would use that and complain that vencord isnt working
plus that would be horrible to maintain
it would increase our PR volume massively by people who want to make updates to their existing things
it is much better to encourage people to work on their own forks and branches until they have a fully working plugin
PLUS it reduces the likelihood that changes conflict and will break each other with nasty interactions
if you want to structure it like how discord does their update branches:
- canary wise, we have an unlimited number of deviations with all sorts of plugins that people self-maintain
- ptb lines up with
dev - stable lines up with
main
canary works because it’s one thing
thats the worst idea ever
i can think of worse ideas
look camila in the end its not going to work this way
you wont get enough people to be beta testers that actually do things, and having a unified "experimental branch with everything soup" will lead to tons of problems
canary is more stable than everything soup
the current model is perfect the way it is and not changing
if anything we might let u choose between main and dev branch (we already have a dev branch, for grouping & testing merges before they get into main), but that'd be the most we'd do
yes prs are slow but thats because of the lack of people wanting to review and test, and you wont get any more than we do now by having a dedicated team
like a packaged dev branch release?
the main issue is that there are about 10 new prs every week and with that + the amount of backlog, it is impossible to cater to every pr for just one person (that's me)
if not even more
i meannn there’s nobody forcing you to review every pr by yourself
but that’s probably not changing
vee has to review them to go in because no one else does :p
if we had more community reviews stuff would go so much quicker
and yes me and nuckyz will merge the occasional thing but we are also busy with other things so we cant always substitute
concept: in order to get your plugin reviewed you must review 3 other plugins
terrible
thats a horrible idea
that won't really work
💀
being able to give a good review requires decent knowledge & experience
there are only few people with that and none of them seem to have much interest reviewing stuff
so it's just me
so it’s an information problem

not enough people know enough to be able to review well
plugin review course
If the blind leading the poor wasn't a proven method, why would we all know about it?
the devs not the end users
think about what you saying rn
when I started creating plugins I had no idea how things even work and reviewing requires experience to be vaild, creating a course won't give experience
sqaaakoi can approve, he saw my code 
not all devs are entry level
most are
you seem to heavily underestimate how much work and care goes into review
yeah
if i could pay some indian to review prs for me i fucking would
i dont think you understand how the project is layed out
its not like geode
its a community project
we cant trust everyone
geode 🤤
dude
hi
sure
now idk what that means
Would you rather
- stock vencord has horror code plugins with shit quality
- wait for prs to be reviewed
well i’m also tired

and on mobile
just installs and tests stuff
It just installs dependencies and makes sure it can compile on desktop and web
Validates plugin structure and lints
where are you even seeing this
On your pr
do you know how github works
i thought it was on the repo page because thats how i always set my actions up
pretty sure that's for commits
You Are Making A Pull Request
oh i know why
its because all the latest stuff is on the new branch i made
prbranch
and i was gonna open a new pr
but then it wouldnt let me
you have to push your changes to the branch of yours that your pull request is attached to
hey @dull magnet do plugin starts rerun on account switch
but everything is synced now

I remember having to use the account switch flux event in one of my plugins so it would update, i might be wrong though
if err != nil {}
go wild
wtf is the find tho
it used to literally be called ItemPopout
erm
because it used to be a find by props
for ItemPopout
and then the update broke that
yes 
so i cross-compared and found that that little section of code is only used in the original ItemPopout thing
that is how i know with certainty its a popout
idk what you want me to do to make it more readable, the class name got removed

is there a find by regex
i think .loadingMore&&null== will work without regex anyway
thats for patch finds
Dispatch.dispatch(...) called without an action type
so much better
wont be ate with minification in the future
i guess they both work
if i remember, UserStore.getCurrentUser didn't give me the information i needed
look inside it
That would be so fucking good 😭
Need
Instantly
WAIT IT'S MERGED LMAO
i dont think this should be a problem
dms are caught by the top one, with author id
actually no i think its just caught with channel id cuz dms can be a channel
i'm pretty sure i do this because of some weird react hook stuff
because later i do this
dms are a channel
and the guild id is @me
ah, i didnt remember if dms were considered @\me internally or just in the url
remember the funny MuteNewGuilds bug 

wouldn't doing this make it break because the class rules are defined in a separate css file
it keeps everything in the css the same
just prefixes class names
makes code more readable
/**
* @param prefix The prefix to add to each class, defaults to `""`
* @returns A classname generator function
* @example
* const cl = classNameFactory("plugin-");
*
* cl("base", ["item", "editable"], { selected: null, disabled: true })
* // => "plugin-base plugin-item plugin-editable plugin-disabled"
*/```
yea
please don't use res.props.children.props.children.props*
alternative?
what are you trying to do
i call a discord function to render one of these things for me
and then i need to make the "x" button remove the message from the log

and then i need to also add highlighting
use a patch to add your custom logic
i do
you're not
😁
objectively not using a patch
alternatively, use it as an actual component instead of this way
then you can wire up the button properly
can someone point me in the direction of simulating a profile popout?
like having a popup of a profile, with customised banner, pfp, roles, pronouns, etc. etc.
not askin for handhold, just, where would i start?
do you want to simulate one or do you want to create the built-in one
either or
i just wanna be able to make a profile popout where i can edit the data (username, roles, banner, etc.)
open the react inspector and find the component for the popout
yeah
Couple questions, that I haven't seen answered anywhere (could've also missed them who knows!).
- I assume its currently impossible to send a request with
RestAPIwith headers? Specifically what I have in mind here is adding support forX-Audit-Log-Reason.
- Its how bans have reasons, but right now you have to unban through the guild's settings and thats a pain in the ass and you can't set a reason. But the request supports the header but I don't see a nice way to do this.
- How would I one of my
contextMenusappear only in a guild, even better if I can permission gate it likeTimeout nameetc etc? And if I can do this, how do I get the Guild's Id it was opened from?
Hopefully if anything is out of scope/not supported we can work towards a fix but if there isn't a way to do what I'm after i'm willing to compromise in some way.
impossible to send a request with RestAPI with headers
no it is possible
RestAPI.post({
url: Endpoints.Stuff(...),
reason: "meow"
})
addContextMenuPatch("...", (children, props) => {
console.log(props) // probably 'props.guild' or 'props.guildId'
})
this is real



