#🧩-plugin-development
1 messages · Page 36 of 1
real
I have custom plugins installed though
Like operagx sounds (my favourite)

so true
not what I said, but good for you I guess
patching discord code we mean
Oh, ok
I will see if i can make userpfp work
custom settings go brrr (they broke all my patches, this was, once again, stolen from vencord's settings core api)
how do i regex
Idk
good
imagine learning regex 
I use AI

Because I've got no brain cells
please, just
dont
Could the plugin have functionality if alwaysanimate is enabled

they dont know how to add _blank to a url https://cdn.discordapp.com/emojis/1076702280117669908.gif?size=48&name=fadeaway&quality=lossless
nexpid 
i dont know how else to explain it
just assign target="_blank" https://cdn.discordapp.com/emojis/1104536496188440746.webp?size=48&name=jawdroppinbro&quality=lossless
you will learn regex patching...now!
Do you just add it to the end of the url
i'm kinda familiar with regex
Like ?=
no
if it's an html element then html <a href="https://example.com" target="_blank">ghghfgh</a>
I removed react from dependencies in the index.tsx file
im on my phone 
what
then just
reimport it
Got told to
spookyblu
hmm?
What should I ask AI to do
AI should not be used unless you are ultimately stuck with something your brain cannot comprehend or stackflow doesn't have the answer
Only use ai to help name variables/functions/classes
"this function does _, list 20 names that would be good for it"
Then refine it's best results with "give me more names like _"
AI sucks ass at code but it is good at getting rid of that block of naming stuff
Can you help with making the plugin
best use of ai I have ever seen
Ai should not be used to date as well
ai is useful for understanding what minified functions do tbh
but it shouldn't be the one actually writing the code
Im going to build and then try out the edited version of the plugin with just a different url in the settings
it should only help
make function
tell ai to minify it
removes 90% of the code now, it no longer works 
Not merged yet unfortunately
ye it is
though it doesn't seem to have a patch close to what we are looking for
so back to react devtools it is
If it works, I am going to install it onto my Vencord
doesn't user have like avatar field which u can just replace?
wait
i think is the hash of the image
couldn't we just tap into the user store directly?
oo
yeah
or add a patch that just changes what the getuser function does
What are u doing?
patch
checking the id of the user, matching it to the json file, replacing the pfp, then returning it
yeah
Nice
it is
I guess it is a WIP because it crashes discord when you right click a user
just do the check, then edit the p[e] object
how does fakeprofilethemes edit the user object? can't you just do the same thing?
this use-
oh
exactly what we need to do, no?
getUser
its broken
ok
Once you manage to get something sorted for the plugin, feel free to ping me (As many times as you like)
I want my discord to sound like the beeping of a microwave
progress
@stray imp ??????????????????????????
IM GETTING APPLE METAL ERRORS??????????????
how bad from 9 to 10
i have zero clue
where should I even start, I'm at a loss
should I try patching the getUser function(s)?
try patching what adds to userStore
uhh, whar?
I just did that
If I were to take a different approach and patch the icons instead, I could patch this for the memberlist
and basically check the source url, split the id, match it with the list, and replace it
oo yeah
@stray imp what does this mean
i do nor kno
it means someone forgor their deltas :3
it means get gud
For any plugin developers who are bored, please create a plugin that makes spotify previews not make you wanna blow your brains out ♥♥
figured out the reason this line exists, the Modal is part of separator__925e8 class. I... Don't know how to make the modal not be a part of that class tho
that's what i am doing rn, but I really dislike the line
it looks like an easy fix
omfg all this time there was an arg to not have the seperator <ModalHeader separator={false}>
I can't find a functional archive of this page, despite archive.org having a fair few
Can anyone else try their luck?
https://medium.datadriveninvestor.com/how-to-bypass-any-paywall-for-free-df87832cbff7

I feel like writing a patching guide
like a deep one
yeah
Something deeper than the https://gist.github.com/sunnniee/28bd595f8c07992f6d03289911289ba8
yes way deeper
it's gonna be focused on patching
finding the module you want to patch
and a bunch of examples
matching the code without writing super specific matches
and all the rest
that'd be awesome ngl!
yeah it's super hard for beginners
it is kinda fun trying to figure everything out without knowing what I am doing but it's not efficient
even for me it's not super quick sometimes
finding some things require you patience and a lot of use of the debugger to see where some data is getting generated and passed along
other times it's super quick though
So I made a modal with a bunch of text inputs. I just noticed though that pressing tab doesn't move through the different inputs
anyone know what I have to do to enable keybinds?
ayo this seems cool
ogange
Oraneg
ogange
Orang
range
orng
org
og
shu up
GitHub is scary now
i tried to commit and github is too scary send help
(Boo)
V


help yourself to look for the right channel and to read the rules
@drowsy chasm vencord wont install

what
explod
Confederacy of Infependet Systems
no no explode for you
cant u test like patch stuff on vencord?
ive seen it before
not sure if its like hidden or sum
i think you have to run in dev mode (pnpm run watch or whatever it was)
@cedar olive wanna see the worst thing you have ever seen
yes
oh no
**plaintextPatches.ts: **Lines 24-30
find: /\.displayName="PermissionStore"/,
replacements: [
{
match:
/(function\s*\w+\s*\(\s*\)\s*{\s*(\w+)\s*=\s*{\s*}\s*;\s*(\w+)\s*=\s*{\s*}\s*;\s*for\s*\(\s*var\s*\w+\s*in\s*(\w+)\s*\)\s*\w+\s*\[\s*\w+\s*\]\s*\+=\s*1\s*;\s*(\w+)\s*\+=\s*1\s*}[^]*)((\w+)\s*\.\s*getChannelsVersion\s*=\s*function\s*\(\)\s*{)/,
replace: `$1$7.clearVars=function(){$2={};$3={};$4={};$5=0;};$6`,
},

lmao I saw that already
how to not have an exact match
wait
he's using \s for space
how does replugged have so little useful plugin
WHY 😭
maybe replugged doesnt fix newlines in bundle
test it xd
doubt its too bad
anyway i went through all replugged plugins out of curiosity
no clue why anyone would use this over Vencord or even BD
if you don't like vencord, BD seems way better than replugged
same principle but way bigger and so many more plugins
welp it didnt match anything
Replugged uses regex patching too?
i dont understand regex patching but this looks awful
i've decided i kind of hate react
i say refactoring and updating an old class based react redux app from a decade ago
meanwhile NestJS is love. NestJS is life.
do what now
i'm so going to have to argue my way into writing this new frontend in angular. i really don't want to use react again after this.
also TIL that react is run by meta. and fuck that.
who do you think makes angular
?
isn't angular a google product?
yes
google != facebook

they're both horrible
yes, and?
why is ur point that
that is horrible
skulley
angular???
angular is even worse 
use literally anything else
vue solid svelte
svelte is amazing
i like angular. it's opinionated and organized and i understand it 😂
i needed to write a backend that someone else can pickup and use if something happens to me, or after i decide that i'm done and gone. and my options are pretty slim.
so next i need to write a frontend the same way
I'm using NestJS for my backend, and really like it
Angular is pretty similar, though, more of a nightmare
and once again, i have to reiterate my opinions of react are based on one app from 8 years ago that i'm learning to modify and update
nah react is pretty meh
i don't particularly like it either
svelte is my favourite, it's very cozy
oooh
it's kinda bonkers to me everything is just compiling down to javascript these days 😂
svelte looks neat. and there's at least one furry on it's dev team, so you know it's good
what should else would it compile to
englis
mb
if you swing that way, sure use leptos and compile your rust to wasm
assembly in the browser. that's what we need in 2023
i legit want to learn rust. don't tempt me with a good time
btw you should really check out solid 
i love it because the data flow is so easy to understand its really performant not that that matters
MY ENGLISH
WHAT IS HAPPENING
and you said options were slim xd
yes. there's lots of frameworks. but few good ones
rust is so cool
and most tutorials are "here, learn to program from scratch using our tool" and like, i've been doing this for 20 years. i don't need to be that simplistic. i need to know how to be functional and build something real and useful.
so my problem is a more specialized one, in that i'm too lazy to get through the easy tutorials to get to stuff that's actually useful
which, once again, i realize is a me problem
Has already happened, welcome to wasm/webassembly
i was being serious. for the record.
im trying to make my chip8 toolchain wasm compatible
so it all runs in the browser
im having a stroke trying to code C++
I don't even have the developer environment setup because I don't want to have to set it up everytime lmao
why would you have to every time?
for the longest time I thought OOP stands for Object Orientated Programming instead of Oriented. I am truly at a loss for words
truly
truly impaired I am
me when I cannot decide to write code horizontally or vertically
what
so true
Have you considered diagonal? I heard that helps a lot
thanks 
lmao
coding diagonally has improved my life by ⛧♒ percent thank you arHSM!🙏🙏
You are welcome
trying to recreate discord's saturation patterns, this will be fun
C++ is making my life flash in front of my eyes

yo
can you do sound board
like
custom sound for nitro
or
nitro join sound
no
;(
fake join sound?
fake leave sound?
fake nitro soundboard?
no?
no
one is css (saturation) and the other is server side features
i mean like save sound file and play if you joining a chanell into microfone
still no
ok ;(
hey guys, I got an idea for a plugin but I am having some trouble implementing it. So whenever you try and create a server the modal is always light theme. Dark theme does exist but discord doesn't bother check the user's theme. This is the part of the theme that controls what theme the modal is gonna be (0,c.getThemeClass)(N.ThemeTypes.LIGHT)
I created this patch ```ts
patches: [{
find: '"handleSuccess called before onGuildCreated"',
replacement: [{
match: /([a-zA-Z].ThemeTypes.LIGHT)/,
replace: ""
}]
}]
but idk what to write in `replace`
use this cheat sheet
interesting
and if you wanna use a patch maker you open cmd in the vencord folder and run this command
pnpm watch
then reload vesktop
and in settings you will have a patch maker thingy
np
what are you doing with the patch?
wdym?
what is the patch supose to do?
change this to dark theme
why dont you just use dark theam on discord?
yeah they just left it as light mode
oh ya im stupid lol
its been like that since 2020
i forgor
I am not sure if I am doing the patch correctly ```ts
patches: [{
find: '"handleSuccess called before onGuildCreated"',
replacement: {
match: /(\i.ThemeTypes.LIGHT)/,
replace: "($1.ThemeTypes.DARK)"
}
}]
you forgot to put the variable in a group
(\i) instead of \i
you can also check console, it'll tell you the patch failed and what the error was
I changed it do (\i) but no change. Also nothing in console, hmm
are you sure the plugin is enabled
oh right, user plugins aren't automatically enabled, I also can't enable it because
I don't understand it
can you send your entire plugin
@weary saffron what language is the plugins written in?
typescript
typescript
english
(I just joined because Idk the lang)
Lmao
Because I'm tryna convert smth from BD to vc
ur supposed to reply english
what languages are plugins written in guysi cant tell
css i think
vencord rust bindings when
i will make
I didn't look at the repo lmao
well this isn't my first plugin. I've been getting this error while writing this plugin
why do your patches have a name?
cant see anything wrong so try removing that
oh
those are commands
yep
im fucking blind
lmao
patches: [{ async execute(
import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, openModal } from "@utils/modal";
import { Button, Forms, useState } from "@webpack/common";
import { sendBotMessage } from "@api/Commands";
import { getTheme, Theme } from "@utils/discord";
import { classNameFactory } from "@api/Styles";
const cl = classNameFactory("vc-eb-");
let addid = 0;
function sendBotMessageWithEmbed(channelId, embed) {
// Imagining sending a message... *sigh* (⌒_⌒;)
sendBotMessage(channelId, { content: "", embeds: [embed] });
}
function addField(theme, fieldElements, setFieldElements) {
// Just adding a new field... N-nothing special! (/。\)
addid++;
setFieldElements([...fieldElements, <MyNewField key={addid} theme={theme} />]);
}
function MyNewField({ theme }) {
// Um, a place to put your field data... (*ノωノ)
const [name, setName] = useState("");
const [value, setValue] = useState("");
const [inline, setInline] = useState(false);
return (
<div className={cl("field")}>
<input
type="text"
placeholder="Name, like... 'Field Name' (≧◡≦)"
value={name}
onChange={e => setName(e.target.value)}
style={{ colorScheme: theme }}
/>
<input
type="text"
placeholder="Value... what should I write here? (o_o)"
value={value}
onChange={e => setValue(e.target.value)}
style={{ colorScheme: theme }}
/>
<label>
<input
type="checkbox"
checked={inline}
onChange={e => setInline(e.target.checked)}
/>
Inline, maybe? (∩_∩)
</label>
</div>
);
}
function BuilderModal({ context, rootProps, close }) {
const [fieldElements, setFieldElements] = useState([]);
const theme = getTheme() === Theme.Light ? "light" : "dark";
// Trying my best to make a cool modal... (っ˘̩╭╮˘̩)っ
return (
<ModalRoot {...rootProps}>
<ModalHeader>
<ModalCloseButton onClick={close} />
Embed Builder - Make your message fancy! (✿◠‿◠)
</ModalHeader>
<ModalContent>
{/* More fields and buttons can be added here */}
{fieldElements.map((field, index) => (
<div key={index}>{field}</div>
))}
</ModalContent>
<ModalFooter>
<Button
onClick={() => addField(theme, fieldElements, setFieldElements)}
// Add a field? Okay, here goes nothing... (⊃。•́‿•̀。)⊃
>
Add Field
</Button>
<Button
onClick={() => {
// Build and send embed logic here
// Something like "You're doing great! ᕦ(ò_óˇ)ᕤ"
}}
>
Send Embed
</Button>
</ModalFooter>
</ModalRoot>
);
}
export default function myFancyEmbedPlugin() {
// Main function for the plugin
// Maybe something like, "Let's start this plugin! ᕙ(⇀‸↼‶)ᕗ"
// Logic to initialize and handle the plugin actions
// Example: "Handling clicks, opening modals, and more... ( •̀ .̫ •́ )✧"
// Maybe add some event listeners or other initialization code
// "Listening for your commands... ( ˘ ³˘)♥"
}
// Edited by [Your Name]
// Keep going! You're doing awesome! ヽ(>∀<☆)ノ
Good enough?
@weary saffron
lol, ty ig
even commenting out the entire file doesn't work. I have to remove it entirely from the directory. I am very confused
here you go, andreaw:
{
find: '"handleSuccess called before onGuildCreated"',
replacement: {
match: /(\i)\.ThemeTypes\.LIGHT/,
replace: "(Vencord.Webpack.Common.UserSettingsActionCreators.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme)"
}
}
Oh hey!!! that's awesome, just doing ($1.ThemeTypes.DARK) worked but I was wondering how to make it dynamic so if you change to light theme it'd be light theme. tysm
thank you all for helping me make this patch. It's such a niche change but I am quite happy
It was not-niche enought for me to make a snippet about it
NoLightInDark
wich fixes this issue with all of these .theme-dark .theme-light instances
oh lmao, that's awesome
print("im going insane")```
IndentationError: expected an indented block after 'while' statement on line 1
Lmao
Here is your py(3.10.0) output @lofty crypt
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane
im going insane```
pretty sane
my bad
just proves their insanity further if anything

no clue
even if it’s just meming, what is it based on?
wondering asw
terrible
how about we talk about ur playlist first
no after :3
i wanna learn about pyothono
ok
- indentation having semantic meaning is horrible
- weird syntax
- horrible ecosystem, the default package manager installs globally and there are too many alternatives that are all kinda medifotr
- poor performance
- not fun to write imo
how is it a weird syntax?
very different from other languages
and once again indentation based
i prefer C-like languages
python is perl if people took it seriously
hahahaha
first language to reach one morbillion tech debts
xD
(you don’t even have to use it that way)
vban @tranquil coral not coding related

fine haha Daniel Deluxe is my fav artist, most of his catalogue is good, particularly for working, driving beats, genre is Darkwave/ Retrowave. Is that at all the kind of info you were going for?
^ with sin
i forgot to say that i don't like how modules/imports work
the whole __init__.py is so weird to me
you love adding blank __init__.py
I gotta agree
and ive seen most python devs just casually have 1000 line long files which is insane

or did you wanna vibe on a prior common interest in him?^^
when i started learning python that shit was so weird to me
although that's more a criticism of the users than the language itself
tryna avoid that __init__.py
Sounds like hell, you'd have to create bindings to get data from js and send it back too, wasm might help, but I can't imagine writing all the function signatures and findByProps porting hell
wasm is literally the only way
(i assume medifotr is mediocre)
not fun to write imo
dyk why?
napi-rs has something to say
actually ive already written a webpack search worker that does ipc with the main thread
plugins arent node
Oh right napi won't work
👀
iirc it's broken cause some part throws an error, the fix is to just wrap that part into try catch and ignore the error
wrap line 38-39 in try catch
I was wondering about doing a rust client rewrite a couple days ago
But I got stuck when I thought about adding plugin support, I had 2 options, register plugins at compile time or register at runtime, compile time would be great and easy but that would mean shipping the plugins with the binary whereas runtime was another hell for 1 there's no common way of doing plugins in rust some embed a wasm runtime, some use dylibs, I wanted plugins to be language agnostic so I was looking into pipes
look at my client called revolt https://github.com/KiraCoding/revolt
it's pretty simple
you can inject js with frameworks like wry
wasm can be sync
blazingly fast and truly asynchronous lol
i dont think ipc is needed
Nah doing plugins via wasm would mean I'd have to embed a wasm runtime in the client and plugins would be limited to languages that can compile to wasm
just do js injection
you do know you really need to rename that one
I literally dont care tbh
Which message of mine are you referring to, the one about rust client rewrite or vencord rust bindings
anyone know how i probose a plugin idea to the devs?
unbelievable!
Ah that's using webview
I was planning on something like xilem
no one uses it anyways and I atm only maintain dep updates
yeah for that you have to make direct api calls to discord which is not easy
Xilem is such a great gui crate for rust
I do not value my mental sanity
neither do i
If I ever try rewriting the discord client in rust I'll let y'all know
omg i didnt even know that existed
i will try it tmrw 
:(((
and ugly
you’d also want to add it to https://github.com/Discord-Client-Encyclopedia-Management/Discord3rdparties
hiii Luna
just so you know I have you blocked
I'll not respond to you anymore
dam
that is when I ever finish my existing 300 discord datamining projects and get around rewriting the client
creepy sexual jokes
creepin i think
oh
dont remember
also israel flag
stfu
i didnt mean it
bad enough
i love saying I'll sleep then not actually going to sleep
my brain is broken help 
bad
what why
SAME
go eep
nop
didnt mean it as a sexual joke
i know
i said go to sleep
🔫
i didnt mean that i thought it would be funny
too late for refactoring, time for a rewrite
people are awkward, mistakes get made, but i think you kinda kept going after she showed she doesn’t dig it/ doesn’t find it funny
not sure tho
ye just wrote it so she knows i didnt mean it like that
anyway
my bad
okih gl
nighty night
gn mate
can’t make any promises
i wont promise you that
😈
time to cause disturbance
cause chaos. make the server suffer
the cat is out, i hear there’s a mouse party on the table
I will break cord infra instead 👍
gosh i wish gluonjs would have full bun support by now
i thought you were going to sleep
I totally agree.
should I calculate discord's colors' saturations by value or by percentage? (
by value: 85.6 - 85.5 = .1 (that just gets added/removed)
by percentage: percentage difference between 85.6 and 85.5 is ~ .1% (this will be calculated and added/removed accordingly)
)
Tf
I'm gonna do something funny with color calculations too, converting everything to oklch()
I swear it will make more sense once I have it in code format
how do i create an element and then add it to an existing one if i have its like id and stuff
and actually how do i create an element in general, like with its own text and stuff
in what context
for what
Is there a way to search for a string and backtrack out the variable it's defined under? For instance, "message3.mp3" to then backtrack out the mapping for the sounds. I need to get the sound mapping modules to then inject custom sound files. I know you can hardcode it which is what I've done at the moment, but those mappings change on every update, so I just need I just need to be able to find the variable that defines the mapping. At the moment it's defined under 895637. Is there a simple way to do this?
well i want to create an element for displaying the latest pinned message in the text channel and then place it at the top of the chat (under the like text channel name)
i think ill be able to figure out how to get the pinned message stuff but i wanna know how to do the element stuff
with vencord?
mhm
then ur question is a very wrong approach
use react devtools to inspect the top bar and get its source code
then patch it
yes
okk thank u i will try to figure smth out now
what #message thing would these ones be?
I tried #message-add-reaction but doesnt seem to be it, im probably just dumb
please ping if you have an answer or idea
ah i didnt know you can just inspect element it, thanks
np
ahh so thats what i was missing
it was #message-add-reaction 0 for the normal reactions, and #message-add-reaction 1 for super
note to self
do not try inspect elementing in vencord itself
damn it my css codes gone
bowomp
anyone know the apps hover thing though? i honestly cant find this one
Inspect element > press the box with cursor button in the top left corner > click the element
Try right clicking and alt+tabbing out
oh, ven has something in #📜-js-snippets which allows you to inspect element stuff that go away quickly
GG
now i just gotta find a way to fix this, the blue when you hover off

now i just need to be able to post this in #🎨-css-snippets because imso cool like that
please do
quoi why not?
fucks up if you dont use vesktop
craswh
how tf do i build a universal node native module
theres prebuildify but it looks funky and unused
smol buton
cool!
idk whos can make like sound visualizator in voice call(based on callbanner experiment)? (pls i need it for things)
for example on photos and vids:
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| _ _ _ _ _ _ https://www.youtube.com/watch?v=lb7CdUP5EXA
https://www.youtube.com/watch?v=OW4gJdNHm8Q
https://www.youtube.com/watch?v=smmEJLZFEnA
Original by Jael Peñaloza. Remix by NyxTheShield
Support me on Patreon!! https://patreon.com/nyxtheshield
IMPORTANT:
Do you want to use this theme or create a remix? Please give all credit to @NyxTheShield.
I only created the melody. The final arranged version belongs to Nyx:
https://youtu.be/KwZ39X3NIZM
Listen XEvent!Chara theme by the amazing NyxTheShield:
https://www.youtube.com/watch?v=IipxjYZo3fY
Wallpaper Download:
http://jakeiartwork.devi...
Theme for X!Tale Sans/Cross
“I just want my world back.”
Music by: Heve
Art by: Jael Peñaloza
AU Owner: Jael Peñaloza
Alternate Battlegrounds is a Roblox Undertale fighting game inspired off of Soulshatters by SenatorBunny made by Qnixu and the Deez Incorporated Team, P...
Math.round(((primary_saturation/100)*(100 + saturation_diff))*10)/10
```found a formula to calculate proper saturations for the primary colors
I also had to make this

aaaaand half of them are wrong
I compared some primaries with wrong primaries
eg I should be comparing 730 to 900 with 700, not 600
now I need to do the same for the brand colors, which was the problem that led to this
default blurple
I feel like you're just making problems on top of problems lol
colorwayified blurple
I mean:
it is optional
whatever it is that you're making I would hate to try maintain it
Doesn't need much maintenance
the only thing that could break are some classes that I can just update
except if they decide to suddenly hash their variables
The arch option can also be a multi-arch value separated by + (for example x64+arm64 for a universal binary) mainly to dictate the output folder; only the first architecture is passed on to node-gyp.
tf does this even mean
WHAT IS THAT FORMATTING
230 star repo btw.
why do you want to make an universal binary
mm
preferably id have one build job that works for all platforms
i dont have platform dependant code
sad.
like this
https://github.com/Vencord/venmic/blob/main/.github/workflows/publish.yml guhhh so complicated
i love how switching to zlib-sync made my heartbeat acks fail
@trim cedar hey mister cpp, how do i allocate a typed arrays arraybuffer if it doesnt have one yet? hasbuffer
With napi?
with whatever, i dont know
For node interop?
ya
If so, I'll have a look later I'm busy right now ^^

hey, does anyone know how I can create a checkmark input like the ones discord has? I am sending a modal with this input ```tsx
<input
className={cl("modal-content-input-checkbox")}
type="checkbox"
onChange={e => {...}}
/>
where does discord use it
oh
The connections tab in settings has checkmarks and you can find them in other locations
oooo, ty
**TranslateModal.tsx: **Line 21
import { Forms, SearchableSelect, Switch, useMemo } from "@webpack/common";
**TranslateModal.tsx: **Lines 63-72
return (
<Switch
value={value}
onChange={v => settings.store.autoTranslate = v}
note={settings.def.autoTranslate.description}
hideBorder
>
Auto Translate
</Switch>
);
plz
how'd i do stuff like a language translation using plugins? i want to a language translation but it's a constructed language so discord will not add it to their platform (toki pona, if you're interested)
hey im trying to make a command that when ran opens a window in the middle of the discord window and can be closed any 1 has an idea of where to start with that?
do i need to make a patch for that?
yeah you can with modals
any idea on how to make that?
look at the viewraw plugin
ok
idk man, if you're not a possum why are you possum shaped
elaborate a bit more on what you're trying to achieve
The documentation you have there is for an ArrayBufferView, which is usually a non owning type that does not modify the underlying object
You'd probably better look at the normal ArrayBuffer
mmm
guh i dont know how to explain but
i get an arraybuffer, turn it into a uint8array in js, and then the uit8array says it doesnt have a buffer in cpp
it does have one, its just.. lazy?
my code works if i console log the uint8array, so theres obviously some way to force it to get the buffer
ble ig ill try just using the arraybuffer tomorrow
what now
replace the instance you get with a fully initialized one
i have an html file that lets me run doom
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>DOOM</title>
<style type="text/css">
.dosbox-container { width: 320px; height: 200px; }
.dosbox-container > .dosbox-overlay { background: url(https://js-dos.com/cdn/DOOM.png); }
</style>
</head>
<body>
<div id="dosbox"></div>
<br/>
<button onclick="dosbox.requestFullScreen();">Make fullscreen</button>
<script type="text/javascript" src="https://js-dos.com/cdn/js-dos-api.js"></script>
<script type="text/javascript">
var dosbox = new Dosbox({
id: "dosbox",
onload: function (dosbox) {
dosbox.run("https://js-dos.com/cdn/upload/DOOM-@evilution.zip", "./DOOM/DOOM.EXE");
},
onrun: function (dosbox, app) {
console.log("App '" + app + "' is runned");
}
});
</script>
</body>
</html>
and i want it to open as a window in discord when i do a /command
i can do the comman fine but the problome that im having atm is that im getting erors inb the html when i try to put it in what @jagged briar told me to try
any idea on what to do next?
when i put it in i only use the <body> part and i remove the full screen button
What are the errors
put it on github pages then
const win = window.open("about:blank", "", "popup");
win.document.write(`
<iframe src="https://moxxie.github.io/doom"></iframe>
`)
this is horrible, just iframe it
Or do that
ill try what vee saied
loading scripts from some random site is the fastest way to get your discord account stolen
putting it into an iframe gives you security
does anyone know how i can find the full list of discord emoticon to emoji replacements?
when i do the i frame its just showing a white box with nothing in it
you need to allow the frame JavaScript
how do i do that?
fair question
pls ping me in case you find it
i have not yet 💪
what’s 💪 about that!
stop cooking
vencor was the appropriate spelling for what you’re do(om)ing
answering my own rhetorical question: the trying is all we can control, not the outcome, plus even a partial attempt is better than none 💪
@lofty crypt @oblique lark if you go into Sources, search 🙂 you can find a big dict which converts emoticons into emojis
:-)*
how do you do a global search in sources
a big dict
yeah but where is that
the searchbar on the bottom only searches one file
I just right clicked assets, pressed "Search in folder" it brought up a little search thing and then I remove the file:assets to search in other places
python ftw
you can right-click top instead, that’ll prefill file:* which is prbly fine to leave
yea that might be a better way
guhhh
^
ctrl shift f
hey it worked! thanks for keeping up with my incompetence guys
conservatives be like "there are only 2 genres". but they're wrong, my gender israel

omg it’s you everything is linking together
conservatives have to agree cuz isreal
im php gender 47
omw to make some cursed shit
php is wild bcuz Gender\Gender::country
I changed the home icon to shiggy using CSS
It's probably trivially easy, but it was my first time ever using CSS, and I'm proud I got it working
gg
#🎨-theme-development is the channel for that
Yoooo lmao
どこにいたって、人は繋がっているのよ (No matter where you go, everything is connected"
bubble sort in pure css is real
HOW
watch new primeagen video
Recorded live on twitch, GET IN
https://twitch.tv/ThePrimeagen
Reviewed article: https://dev.to/grahamthedev/bubble-sortin-pure-css-no-js-3bb1
By: GrahamTheDev | https://x.com/GrahamTheDev?s=20
MY MAIN YT CHANNEL: Has well edited engineering videos
https://youtube.com/ThePrimeagen
Discord
https://discord.gg/ThePrimeagen
Have something for...
one day someone will make a compilation target for C to CSS
https://www.youtube.com/watch?v=wIzwyyHolRs this makes htmx look actually nice
Recorded live on twitch, GET IN
https://twitch.tv/ThePrimeagen
Original: https://www.youtube.com/watch?v=3GObi93tjZI
Author: https://www.youtube.com/@DjangoConEurope
MY MAIN YT CHANNEL: Has well edited engineering videos
https://youtube.com/ThePrimeagen
Discord
https://discord.gg/ThePrimeagen
Have something for me to read or react to?: ht...
guys, I know that discord uses electron under the hood
but does discord use any UI library/framework? or it built on pure javascript?
not 100% sure what i did but i removed the Uint8array conversion since the Buffer i was using extends it and now it works
flatpak vesktop, wayland
randomly decided to package it for some reason
okay it seems to work fine
tray works, runs smoothly
arRPC requires additional changes using flatseal
is ReactJS the dick responsible for the class hashes?
huh didn’t they only start using rspack recently?
then who was the dick responsible for the hashes before rs?
a
heard that name before!
ty
how else would i know where to address my pipebombs you silly goober
nah just general interest, overview just in case yk
yeah i do
*=actually
well most people do it
pros & cons
no, as .exampleclass_123abc
it can create ambiguity tho, e.g. between .wrapper__3670f and wrapper_a7e7a8
pros & cons 
prepare a client modding career (i’ll prbly never get around to …)
contribute to mine instead 
demoncord? x]
i didn’t mean i’m considering starting my own client mod, no such intentions.
or even contributing to the core of one, tho that would be cool. Plugin dev is more realistic but empirically still not too likely
if i had the executive function to put a plugin together, it’s plausible i’d use that capacity to touch grass instead, maybe hop off dc ~ entirely again for a longer while
did they already switch?
drake said its just preparation
or did i miss another bundler update
90% sure yeah
someone posted a tweet, i think in #👾-core-development ~2 wks ago, i can look for it
i thought that was kind of a separate thing
which ig doesn’t make much sense lol
i do
she does
maybe they just talking out their asss tho trolely
no they did move to rspack
apparently it drastically improved build times
i remember seeing something from a discord dev
discord should switch to bundling all code with the app 
css modules.
shigcord soon........
I shall make aquacord (will fail miserably)
is there a way for a plugin to get somthing that is in the network tab?
im working on a plugin that gives you a list similar to the bettermsg loger but it loges everytime that some1 uses a soundbord in the vc and lets you download it but the file with the sound id from what i found so far is only showing in the network tab
ya
but i need to get the id of it
its for sounds that are from servers that im not in
or just sounds in general but i need to find how to chack when 1 is playing and get the id
i was abel to find the func that sends the soundbord SEND_SOUNDBOARD_SOUND now i need to se where it recives it
is there a way in the network tab to chack what trigerd it?
ok ill try that ty
ill just keep reading thru the funcs
i found this
GUILD_SOUNDBOARD_SOUND_PLAY_START: function(e) {
var t, n, l;
let {soundId: i, userId: u} = e
, _ = (null !== (n = D.get(i)) && void 0 !== n ? n : 0) + 1
, r = (null !== (l = U.get(u)) && void 0 !== l ? l : 0) + 1;
D.set(i, _),
U.set(u, r),
u !== (null === (t = a.default.getCurrentUser()) || void 0 === t ? void 0 : t.id) && (g = !0)
}
now i juts need to retrive the sound id from this
you can always subscribe to that event
ya now i just need to extract the id from there and make a small menue with the sounds and a download button
wish me luck
ok i was abel to make a patch that console logs the sound id now i just need to save it to a list
its just e.soundId the e is hard coded in so it wont change lets go
the e dosent change when reloading the client
that's not how it works
idk then
the names change occasionally when discord updates their code
hardcoding them is never safe
ok ty
guys pritn(hell oworlld) = real
@versed osprey how about subscribing to the event via the FluxDispatcher rather than patching the event listener of some other store
and yeah that as well
finally
it looks so perfect
how can i get a url for twemoji?
ya with js
\❤️
yah the svg for them
yah somthing like that
ty
if u need a full url
new URL(findByProps("getEmojiColors", "getURL").getURL("❤"), location).href
some really useful functions here
filterUnsupportedEmojis, applyPlatformToThemedEmojiColorPalette and triggerFullscreenAnimation are incredibly useful
what's triggerFullscreenAnimation
look at its code
it does nothing xd
it destructures args then does nothing with them
oh wait
same goes for the other two methods
holy co w i made plugin
?
his uncle is clearly discord staff and will get us all banned
lmao yeah you gotta be 12
very cool! There have been cries for this feature for a long time and ≥ 1 or 2 started plugin projects too, not sure what become of those. Did you pr it?
oh ig i should have said camila instead of pinging you ;>
camila
lets go
epicly
im surprised nobody has done it before because its dead simple
true. Well i think they have, but maybe then didn’t follow that up with amendments required for inclusion in venc
hm, lemme check
yeah i suppose it depends on the special case
maybe no amendments in your case
it supports unlimited amount of regex cases
idk what else could be done
the one issue is that since i do hijack the mention system, it does count as a literal "ping"
so u get the red dot
and maybe people wont want that
yeah might make for a useful toggle in a future revision but seems perfectly fine for me for a v1.0, not like anyone’s obliged to use it
does it keep a log for when you’re afk?
https://github.com/Vendicated/Vencord/pulls?q=keyword looks like there have been 3 previous attempts, 2 abandoned, one having 2 months ago applied amendments ven requested and waiting for their followup code review https://github.com/Vendicated/Vencord/pull/1621#event-10442510896

🙈 perfectionism
besides you said you don’t use msglogger uitaesdutribseadtruseatrusaiedtruseai
i specifically have it enabled for u and noone else
checks out
i was trying to avoid it sounding critical ’x)
at all costs 
no its not that complicate
but the numbers stay
so you would know which channels and which servers
i love js ecosystem
holy fuck ive managed to slow typescript to a crawl
takes 30 seconds to update a file
trying to patch the guild bar in betterdiscord is such a pain without a source patcher (I don't remember exactly how vencord's patcher is called)
and half of the plugins that do it use a library
I'm seriously considering dom manip for this part just because of how hard it is to patch
have fun
I'm not having fun
yay, I love obfuscated anti adblockers
hello, does anyone know their way around discord themes code?
I downloaded a nice theme but there is one issue with it, when I hover on the eye icon in streams it doesn't show who is watching the stream
if anyone knows how to fix this I'd appreciate it
still didn't fix the issue :/
i just sent this to the tool author:
@syndishanx suggestion for Class Updater:
replacing all\[class\^=([^-]+)-\]
with[class^=$1_]
and all\[class\*=([^-]+)-\]
with[class*=$1_]
you can wait for them to hopefully put that in or do those replacements yourself
syntax is regex, lmk if you want an easier syntax
this shit literally deletes the body element of the page if you tamper with the anti adblocker
skill issue, “just” needs better tampering 😛
you love confusing variable code
inb4 we get ai adblockers duking it out in a battle of wits against ai anti adblockers

is that for me?
ye
without regex, it looks like [class^=exampleClassName-] or [class*=exampleClassName-] and you want to replace the - by *
you can try it automatically by search-and-replacing -] with _]
hehe it’s not very advanced or uncommon knowledge in terms of css theming but i’ll take the compliment ty :3
👍
Discord bot idea:
I very often crosspost memes into other channels using discord's copy link thing
but discord file links will start to expire after 1 day
so to fix this, a bot that:
- searches for messages with attached media from discord
- downloads media
- sends media
- removes media embed from original message
This makes it so I don't have to change how I send memes, but memes will persist
discord links shared within discord will still work fine
as long as you dont remove the signature part of the link
that could very well be a plugin too
"to fight malware" ??? the verge cooking up some garbage again
that part's true wdym
unsane
ill read the article next time :3 before i say something
i thought they were doing it to combat file hosts
well yeah
you can just host shady exe's on discord
but also it gets rid of using discord as a cdn
why should the sig part matter within dc?
so apparently my 5 year old extension for blocking ads on aternos still works
nevermind
i'm trying to get a vencord plugin to execute shell commands, is there any way to import the child-process module from node or some other way to go about it?

why
launching steam games
Why husk
Actually I think you can use openExternal method
With steam protocol
holy rce
For it to become RCE it needs to be executed off server







