#π§©-plugin-development
1 messages Β· Page 29 of 1
dunno if they will merge but i opened https://github.com/uBlockOrigin/uAssets/pull/19359
URL(s) where the issue occurs
https://vencord.app
Describe the issue
this site is deceptively impersonating the real site by mimicking the design
the real site can be found at https://vencord.dev
S...

that was quick
letβs gooo same
finally I'm getting somewhere
finally, it's working
welp, ima sleel now
I'll con'tinue this tmr
ublock origin is the best.
on my one it still shows up without warning
can someone help, here is the code, the issue is when an item is removed from quotes it doesnt update the modal
you're setting it to itself
it needs to be a new array
its working, thanks
enable the badware risks or update it if not already
time to learn how to make a stateful list from a json file, because this totally went ok the last time I tried it
LETSGO
doesn't this just link to the original site when downloading? what's up with that site
Hi, I downloaded themes and it is most likely old, can't do anything etc. Is it possible to remove this themes somehow?
vf themes
This is not the #π₯-vencord-support-π₯ channel.
oh yeah
can someone help me with react states?
dont ask to ask
I want to dynamically toggle a class without having to resort to event.target.classname = ...
is there a way to intercept POST requests with js on a site itself (the site in this case is discord)?
could prob monkeypatch fetch
why tho
blocking discord.com/api/science POST requests
install ublock origin?
not an option for my custom client :/
find out how ublock origin does it
it uses an extension api
ublock has access to browser level apis which I cant access, gonna try patching fetch
so not useful here
thanks you two
btw @wooden dragon did you intentionally use https://revolt.chat 's name or

I'm open for suggestions
hmm it somehow doesn't work, I guess discord is not using fetch for that
I feel so stupid haven't done anything with js in ages 
anyone has a link to the findBy injection script?
oh it uses plain old xhr
THEY GOT AHEAD OF THE MONKEYPATCHING FETCH ALLEGATIONS

if electron, browserwindow.webContents.session.webRequest prob does what you want
(not electron)
webview
ogey
sadly the webview lib currently has no functions to intercept certain requests non blocking
so overriding the https protocol just blocks rendering during each request
Holy shit it works
const disallowedURLs = [
"https://discord.com/api/v9/science",
];
const originalOpen = XMLHttpRequest.prototype.open;
Object.defineProperty(XMLHttpRequest.prototype, "open", {
value: function (method, url) {
if (method === "POST" && disallowedURLs.includes(url)) {
throw new Error(`XMLHttpRequest to "${url}" with POST method is blocked`);
}
return originalOpen.apply(this, arguments);
},
});

why only block post?
wtf vscode
close
the UI, even as a first iteration, is stable enough that I can ditch the slash commands
It still has some bugs though
no css best css

been working on a funny: java -> c++
this code
translates to this abomination
Hello I'm wondering what programs/tools are available for making a GUI? I liked whatever editor we used back in school when we did visual basic (I know, ew) and I wondered if there's anything like it for creating simple GUIs
I know I can use html and js to use a website as a form of GUI but I wanted to try out other languages
I wanted to start small and make a simple click counter program
that's such a broad question
it's like asking what libraries are available for making a web server
obviously there are the big ones like gtk qt webui winforms
but beyond that there's sooo much
just gotta explore a little and see what suits you the best
if you're only targeting Windows people usually use winforms in c# like luna said
i want to add a new div/component to the "layout div".
I found out that the second div from the M the layout div is, how am i going to add a new div there?
Seems like i would have to patch it but how?
Im new to this kind of patching!
oops i had auto translate on
anyways
how do i make my first plugin
is there a guide out there
ik a bit of js and cpp already
*not that cpp matters
i guess ill start by trying to reverse engineer a plugin
smart
removes the annoying "update your username" alert in settings
div.pomeloWarning-2_xa4U, /* icon by "edit" */
div.tabBarItemContainer-2HdIlr svg, /* icon by "my account" */
div.accountWarningBodyText-2DEVPu { /* text at top */
display: none;
}
just edit ur username already
no
evil
discord is gonna force the username update anyways, and the change isn't that bad after all, the problem comes if your username is taken
is there any documentation for making plugins?
I understand how to add them but not really how to do anything with them.
look at other plugins
well guess thats one idea
yeah and thats exactly why I'm fucked
I purposefully make my username super common
my user is zxcv ffs
idk if thats super common, you can add like a . or something but its kinda limited
if you have a system where you need to start adding random shit to a username for you to get a user thats almost what you want, there's something wrong
nobody wants to be john777.30203
was it because of the password strength checker
or because of the qwerty keyboard
qwerty keyboard lols
well maybe dont trolley
become a real person
true, this is why discriminators are bad
exact opposite of what I'm saying. 1k people could have the same username but now we have to add dots and other shit to get something somewhat similar
you can be a real person and enjoy people not finding you easily if you dont want them to
why π @proud cargo
you could claim zxcv0901
it's the same as before
π
and ive git pulled about 600 times
all to tell me its up to date π€·ββοΈ
pnpm inject > repair
alr tyty
one of your plugins doesnt have a name
dont just make blank files
if you dont know what youre doing stick to a normal install
imma just regrab the files from the github
it wasnt me that fucked it up, and i dont know what they did, so i can't undo it.
im quickly throwing together an install script.
is there anything im forgetting?
title Vencord Installer
@echo off
title Vencord Installer
echo This script is assuming you have both pnpm and git installed.
echo.
echo For pnpm installation see: bit.ly/getpnpm/
echo For git installation see: bit.ly/get-git/
echo.
echo To remove the "Press any key to continue" simply open the batch file,
echo and remove the "pause" right below this.
pause
SET /P ADD_GIT=Would you like to install the local git repo? (Y/[N])?
git clone https://github.com/Vendicated/Vencord
cd Vencord
IF /I "%ADD_GIT%" == "Y" GOTO INJECT
del /f /s /q .git 1>nul
rmdir /s /q .git
rmdir /s /q .github
:INJECT
pnpm install --frozen-lockfile
pnpm build
pnpm inject
lost it at bitly
making it easier to install it π€·ββοΈ
looks nicer than fully linking it lol
and its mainly for personal use anyways, ive made it work fine for me, but why not make it public
why are you deleting the git folder
i dont like having a bunch of local git repos, it clogs some things i have on my computer
you're breaking the updater by doing that
and what this makes no sense
okay π€·ββοΈ
it's like a few mb at most
what makes no sense abt it?
the entire statement
i keep it up to date.
i just dont need the built in updater to do that, i have my own system for it
how does having the Vencord folder being a git repo clog your pc in any way
it doesnt clog my pc
and its not just vencord being a git repo, its most small things idc abt being git repos
if everything that ive git cloned was kept as a, id have 100s of local repos
and what's the issue with that?
it clogs some things i have on my computer
by creating an entire page for something that doesnt need it, so until i impl a system to whitelist certain things (which would be extremely easy, i just dont have time/motivation for it), its easier to just remove the .git folder
what is bro cooking
page?
explain
page where
on the git explorer i have, which again, idc enough to update it to use a whitelist
idc enough to update it to use a whitelist
you're deleting vencord's git folder which is the stupidest thing you could do
Also deleting .github for some reason which will cause merge conflicts in the future
i have no reason to try to merge anything
lol
when you git pull, it automatically merges
anyway do what u want it's ur system 
but don't tell people to build vencord from source and delete the .git repo that's horrid
;-; when did i tell anyone to do that
you said somewhere that you wanted to make the script public
which i did by sending it here
i see
not that i advised anyone use it,
or that i didn't add the option to install the git repo π€·ββοΈ
do you even have any reason to build from source? you don't seem to be changing anything about the repo so you could just use the Installer cli to install for you, that'd be easier and require no git or pnpm
Vencord\src\userplugins
.\VencordInstallerCli.exe -install -branch auto```
will the cli stay with the new installer stuff being worked on?
yea there will be a cli version still
Hello! I've been using context menus for menus, however, I'd like something more like a dropdown which I can choose if it opens above or below the button, has any plugin done this?
context menu can do that
so i am trying (keyword trying) to make a plugn that replaces emojis with the native system version
u can just use a theme for that
devilbro jumpscare
i was told that doing it with a plugin would be better
and the only diff between the normal emojis, and the custom server ones is the source of the image, one is from a assets folder and the other is from a discord.gg url
is what is was trying to say earlier
how so?

if you really want to do it with a plugin i suggest you use react devtools to inspect an emoji node and see what component it is
so uh, it only works if my theme isnt applied, im not sure why
edit your theme, remove the <@&1118512943106101309>mport for emojireplace
send theme
- how do you load the emoji replace theme
ok so i load it with quickcss bc i edited the theme, also the emojireplace theme doesnt support the emojis i use on my system
my theme is comfy
holdon
send ur quickcss
or rather
imports need to be at the top or they don't work
put the import at the top
great, that worked, should i just create a new similar theme with the emojis i use for my system instead
of trying to the other thing
no clue if this is the best place for this but if someone needs some plugin inspiration i bring to you the idea of the on-leave soundboard
anytime you try to disconnect a call it plays a soundboard, lets it play out and after it finishes it actually disconnects
and make it also play a sound when you join
like a 2015 gaming intro with visual effects achieved through emoji reactions
import tkinter as tk
from PIL import Image, ImageTk
import requests
from io import BytesIO
def uwu(imagey_url):
response = requests.get(imagey_url)
menjuice = response.content
owies = Image.open(BytesIO(menjuice))
owies = owies.resize((300, 300))
owies = ImageTk.PhotoImage(owies)
uwus = tk.Label(owo, image=owies)
uwus.image = owies
uwus.pack()
owo = tk.Tk()
owo.title("Shiggy Viewer")
imagey_url = "https://media.discordapp.net/stickers/1039992459209490513.png?size=240"
uwu(imagey_url)
owo.mainloop()
Not discord but funny ~^_^~
you can do that with nitro
but no one cares about nitro
ngl i'd just make a plugin like i said originally
here i'll make it real quick
yeah, im just not sure how to do it, also doing it with css is possible, but SO tedious
yea its insane how insane that css solution is
oh wait
the emoji IS in the alt i was just silly before and looking at a server emote
damn img tags cant have text psuedo elements
this is so sad
ok time to actually plugin
lmk how this works https://codeberg.org/vap/vc-system-emoji
sorry but where do i put those files?
its a third party plugin so u clone it into the src/userplugins folder and then rebuild vencord
oh, i knew that, sorry i meant do i put the .css file in my quickcss or also in src
ok thanks!
like with git clone
you'd have to configure vesktop to use ur vencord git repo
by default it just grabs vencord from the latest release on github
i dont remember where that setting is and rn im watching smth
kay! Ill figure it out
itβs at the bottom of vesktop settings
oh yea i just remembered the reason i couldnt find it is cus my preload is broken
i have to update vesktop
sorry to bother but i cloned the vencord repo and added the plugin at the right spot
but vesktop wont accept it bc theres no
dist directory
sorry to bother, but once the plugin is there, do i have to do something specific to activate it?
@trail ginkgo ?
yea u turn it on
yeah it wont show up in the list
did u rebuild vencord
did u read anything in the link flag sent
yes
ah
that i missed
thank you
i cloned after
ah
i found the issue
i was searching for vc
as in vc-system-emoji
not realising that the name was different from the folder name
@trail ginkgo it doesnt seem to work for me
π
after refreshing?
true thanks for the specificity
and theyre cutoff wierdly
yea system emoji fonts are all dumbly different
i'll have to figure that out but i dont really want to so
maybe another time
fair enough
you may be able to just patch the "rules" (I forgot what they are called) to render the emojis like this always \π
like when using \
nono
yeah that was my initial idea, but i didnt know how to do it (or anything else for that matter)
but u gotta replace the ones in the picker and the ones in message preview
i assumed u meant the markdown rules
yeah
ye
ya
i made them use jumboable
I initially made fake nitro render emojis using the markdown rules
so that single sent emojis use system but are still big
but it ended up creating issues cuz the message preview was now turning links into the actual emojis
loool
it does override themes btw vap
u cant really replace the one in the picker that easily probably
it uses like a spritesheet its cursed
time to make ms paint edition of emojis
Back again
Sorry but how would I do this?
i mean im sure the component is passed a surrogate or something
mayb
how do i make a custom plugin?
hey, I'm wondering if it's possible to make a simple plug-in to write sentences uppercase, BetterDiscord has one
(this is the BD version btw)
you can just make a textreplace rule also
yeah
because you need to select every letter one by one and then uppercase them
since regex doesn't have any uppercasing function or whatever
so you basically need one rule per letter
@dull magnet implement sed in textreplace when
holy shit that would be insane
what does \u do
insane
what if compile the original gnu sed to
wasm
and used it
π₯
@trail ginkgo i fixed the cutoff issues with the emoji plugin!
I thought of a feature, can you do it?
will automatically respond to certain words
that would be automating discord api / selfbotting
nice i have those as variables so u could edit them in quickcss
i messed up the normal font size variable name llol
make an actual bot for that
y know what ima do this where do i start
Hello people ! I'm looking for some help is it possible to change this
I edited in paint to show you what i want because i'm giga bad at coding, but if anyone can explain me how to do it i'll be very gratefull
very easy with css yes
oh wait do you mean you want to change the date format?
or just add a background
adding background is easy, changing the format is impossible
need a plugin for that
Ah...
I presume their is no one that already exist and i could just easily use it ? π
nope
Thanks for the answer β€οΈ
Lies, CSS can probs do that
Replace every month with its number, if you wanna change the order, change the order or positions
how will you replace month with number?
You could make it's own new text for each and every month + day + year and select it using arial-labels which they probably have
it doesnt have aria label 
devilbro would unironically do this
xd
probably not work in all language because i just new Date() the string 
What's the reason for memeing on devilbro like that, I like his stuff, except the part where he works so much with worsediscord
are you serious?
devilbro writes the worst most unreadable code i have ever seen and is at this point infamous for writing plugins that use a shit ton of ram
Hello sorry to bother you, may i ask how you get the display of days since you joined the server ?
it is from the plugin i have just made
Do you think I was smart enough to understand ram usage when using betterdiscord? As the creator of vencord you should know that betterdiscord users π and vencord users π
This is great though, I like it
wait real
i think you could unironically do that
its just too cursed
https://betterdiscord.app/plugin?id=1010 did this for bd
i thought discord already does that by default
i have a file containing a list of filenames in the format filename.ext">filename.ext i need to figure out how to make it just filename.ext
is there something simple in python that can do that
i would do it myself but there's over 2K of them
if you just want the second half after > symbol you could just split and use [-1] from the list you get. But I might not understand what is it that you want π
with open(<yourfile>, "r") as f:
for line in f.readlines():
print(line.split(">")[-1])
Something like this?
the format may be determined by your system settings, so you could try changing those
yeah it does. But DBβs lib comes on top of that (tho itβs like 4 years ago when i tested that)
Is it about discord settings ?
no, βgloballyβ from Windows
region and language settings or such
iβll test it for you
that's really kind thanks
Hey there, would it be possible / does it exist already a custom css that stops gifs from auto playing in the picker until u hover over them?
yeah discord kills my memory like nothing else
Anyways, I wanted to make myself my own plugin but I am still bit confused from the PLUGINS readme. sorry in advance if these will be stupid questions D:
First and foremost, how exactly do I find the code that I want to patch?
Secondly, are there some detailed docs? The readme doesnt mention much about the patches (I have found predicate for example which I have no clue what it does)
people said there's a memory leak that discord just hasn't fixed but not sure
yeah no sorry, dc does not seem to adopt the system settings:
Thanks for trying anyway mate
i got it sorted
(you could set your discord to Vietnamese, but β¦ π )
TIL Thailand lives in the future!
and has only two numbers in their dates β far out!
ah no, the characters in the middle seem to be the closest the Thais have to a month, and just happened to be the same there for my alt
its based on your dioscord locale
wtf
Lot of people have consider helping, still we don't find a solution. Maybe if i explain why i would that there will be some ideas.
In my discord i have roles that i give for 1, 2, 3, 4, 5 years of joining the server. For now i found no solution to autorole that..
So i'm checking one by one every-member ( 700 ) to check and give the rΓ΄le ... it's really inconvinient ...
Sorry for my bad english also
use a bot
If someone can advice me a bot that can do that would be great
i would guess there are quite a few that can do that, but idk. You could look into ones that specialize on autoroles. Or Carl-bot, the prime general purpose bot.
Or use search on bot listing sites or ask on the Discord Bots server
someone showed me a discord memory limiter tool last night, kept it down at an astonishing 60 MB
Did that have any impact on performance?
can you send me that via DMs, please?
we didnβt do tests
unfortunately i donβt remember its name, so your googling is as good as mine
do share if you find it
the amount of times my client crashes because of memory is insane
i feel ya
damn
discord out here perfectly simulating depression
yeah burnout
it would be easy to hide vids until hover, e.g. make them black, or put a barely transparent layer in front of them. You could ask in #π¨-theme-development. But to show a still screen of the vid, i donβt think thatβs possible in pure css.
clearly it is in the same directory but why doesn't it work
Maybe the code is running from a different directory?
but when you press the run it should be running the current directory right
it says this
the screenshot says you are in C:/Users/Admin/Documents/Codes
try cding into the directory with that file maybe
alright
:O
ok i change school3 into hi
so i am in the working directory of the python file and the csv
so should i proceed to run python3 main.py
yes
just run the file you want
OH
the file name
wait no
same thing
and i asked to print them in here
but it is not so i dont think it is intended π€¨
i think i should just restart my pc
dude thats my name and email
XD
it returns an iterable
something you can run a for loop against simply
instead of print(csv_reader)
so i can put
for line in f:
print(line)
nop
print(x)```
the file doesnt exist
import csv
with open('names.csv', 'r') as f:
csv_reader = csv.reader(f)
for x in csv_reader:
print(x)
use an absolute path or smth
hehe it does
i did that too π
ok u can stop i dont want to trouble u no more
thanks tho
nice idea
i literally told you that
π ** **
vsc has a built in terminal too which can be easier
bogusemail.com my fav
:O i used that this entire time and all the errors came
not the run button
:O then where?
how do i open the terminal
ooh
yay new error les go
how is it not possible to access a variable which has the data out side the file close thingo
try and indent it into the open()
I was curious if there was a way to install vencord fully automatic? I know there is a script. But I don't know enough of the language to make the edit's needed.
how much different is the code for vencord plugins from betterdiscord plugins
very, they use different methods of patching
only with adb
whar
you can use the ndk's adb wrapper to write a script that will automatically install vencord for you
its in python
thanks
Ayoo, vencord devs! How soon can we get a plugin so that there are tabs like in a browser so that you can switch between them.
Tabs between chats on different servers
as soon as someone wants to do it aka maybe one day but don't get your hopes up
Or use the favourites feature
there are also experiments related to tabs, but they donβt seem to do anything
@gaunt plinth itβs dangerous to go alone.
Take this Unofficial Vencord Plugin Guide https://gist.github.com/ActuallyTheSun/28bd595f8c07992f6d03289911289ba8
does any1 know how to make it work, because I need to have '/' in link instead of '%2F'?
can you show more of your code
I know but I need to make it in Polish
and its my first time using asp.net
All I need to know is how to put / as a usable character in a link so I could pass the Id to controller
like that
Ive found the solution by myself
π π
i overrode the discord loader
Image
but the original still shows up
video.ready-3BZNWT {
background: url("https://raw.githubusercontent.com/Blisterexe/shiggy-loader/main/shiggy.gif") center/80% no-repeat !important;
image-rendering: pixelated !important;
}
here is the code
what do u mean?
itβs comfortable
what is?
hello, on a scale of you can steal 90% of what you need from stackoverflow, to, you actually need a good deal of knowledge in the required language
how easy would it be to write an android app in kotlin that allows you to search/filter through items in a premade database
below is a (very) basic mockup of how i would structure the interface
any help or even redirects to appropriate google searches would be appreciated
thanks π
things of note:
- i've never done any android app dev
- never heard of kotlin before i started thinking about this
- i've made a very rudimentary version of this before with javascript
Def learn the basics of kotlin first. Itβs a pretty complex language with lots of syntax stuff you wont understand at first
Well first you have to learn kotlin basics then decide if you are gonna use compose or xml for ui
If you use xml a simple custom view with recyclerview should be easy to make
Here is your deno(1.32.3) output @gray ocean
bleh```

@potent fox@jagged briar thank you both for the advice
i will get around to this at some point when i have motivation that isn't just the idea of it
vns
is there a way to re-render a react component programmatically?
like, whithout states? (I have no idea on how to use states on what I want to do)
as I said, I don't know how to use states properly
im asking so i can show u an example to help u learn
So I have an array
this array has urls
I want to fetch each url
and from the json object they return
create an array of colorways
this is currently stateless
you have to close and re-open the modal
make the array of colorways
const [colorways, setColorways] = useState<colorway[]>([])
and instead of using push to add u use setColorways(colorways.push(item))
in that array I would push the colorway objects or the colorway react components themselves?
depends on how you render
i would addume the object
all states are is a
- variable that cannot be changed
- function that sets the variable and rerenders
so it should be an almost dropin replacement
this colorway part is giving me an error, what is it meant to be?
what error
colorway wasnt defined is all
that
this seems to be ok?
oh, ok
huh, didn't know that, thanks for the heads up
same as classes
the state variable cant be changed
push returns the modified array, even if it wasnt actually modified
iirc
setState(s => [...s, "new item"])
ah
so something like this?
dont use .map
.
there are 3 main ways the colorways are fetched
sorry, one sec
youre good
Once on startup, to apply the active colorway
once the menu is opened
and manually, using the refresh button
yes
I also just killed vesktop
never works first time
( i forget tsx syntax, this is psuedocode)
also in the tsx put { colorways.length === 0 ? <div>loading</div> : <actual rendering>}
so the useState line is throwing this:
prob imported it from the wrong module I would guess
do a search for useState and see where its imported from elsewhere
we use react weirdly
if I import anything from react, it won't build
we use discord's react
I was using the webpack common
don't judge too harshly, I know literally nothing about react and tsx
dw youre good
Not using any of the 2
ill fix it
I know, it was only for the css part, and only temporary
should we wait to fetch until the plugins enabled
I mean, it's meant to be a client theme of sorts
so it should load as early as possible, I would think
@rocky jackal can i have style.css
ty
OH
I THINK I DID IT
I made the colorways button (see image) to do the fetching once clicked, then attach the final array as a prop, which is then used as the initial state value
fixed settings, used state, and more shit im probably forgetting
jsyn i changed the devs to me bc im too lazy to locally add u
also id reccomend using https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint, it shows alot of stuff wrong with the css
I already have it
at least for this repo
yea ik it throws a lot of errors
kebab case?
no need
ah
ew it wants this
yes
this is, not working
ok so I made the active class stateful, thanks to your code
also why change the format of the source files?
if you want it in the vencord settings menu it has to be a string
there isnt an array option type
i made it a string that splits on ,
Wasn't planning on using that, but oke
Custom settings UI
ohhhhhhhhhh
so even the bad settings format I was using was fine for me, since I didn't want to use that UI either way
looks like to use arrays as settings u need to use DataStore from <@&1118512699836481547>pi/DataStore
idk how vencord would handle saving the way u did
handled it pretty well for me
i feel like you could do some funky modulo stuff
instead of flipping variables like that
that's why it will default to null and be set to null if you disable the colorways
since if you just started using the plugin, this wouldn't exist yet
hm
now im looking for a way to add styles without having to touch dom
also, is there a way to stop the onclick event from propagating on the children?
so I did some changes to also make way for the custom colorways
now the colorway name is saved as activeColorwayID and its css/import as activeColorway
ok so refreshing and everything seems to be working a-ok
f*ck you stylelint
kill kill kill
like this maybe
single for loop where the ith square position decides whether to print a or b
even i % 2 == 0 (same as false, so b)
odd i % 2 == 1 (same as true, so a)
for(int i = 1; i <= num_ask*num_ask; i++) {
printf("%c", i % 2 ? a : b);
if (i % num_ask == 0) printf("\n");
}
the cond ? iftrue : iffalse thing is just a shorter version of an if statement
nevermind it looks weird with even num_ask
just add another layer of for loop
that determines the constants that the inner for loop prints
evil
i think you can def do it cleaner but

for i1 in 0..num_ask {
for i2 in 0..num_ask {
print!("{}", match (i1 % 2 == 0, i2 % 2 == 0) {
case (false, false), (true, true): "*",
case (false, true), (true, false): "#"
} )
}
println!("");
}
lmao rust
bit psuedocode-y but how i'd do it
ik i just know rust better than c
gets the point across
alternatively
if you can XOR the boolean values
of the two modulo comparisons
that'd work the same
for (let i1 = 0; i1 < num_ask; i1++) {
for (let i2 = 0; i2 < num_ask; i2++) {
let output;
if ((i1 % 2 === 0 && i2 % 2 === 0) || (i1 % 2 !== 0 && i2 % 2 !== 0)) {
output = "*";
} else {
output = "#";
}
console.log(output);
}
console.log("");
}
Oh
I don't know how to read rust code so I took a wild guess
In this case surprisingly its way more readable
oh thats definitely not what the rust code is doing lol
Macro??
JS doesnt have tuples so youd have to use something else
The thing I don't know
one of those colour schenes reminds me of me
ah yes, react
Oke so 2 things
refresh was broken because I was comparing a number to an array, not its length
I also didn't make the modal open once the fetching finished
hi. i am new to making vencord plugins and need some help. I have the basic template script from the basic guide and have it loading on discord using npm watch / restarting discord. how do I use a patch and ctrl r for dev purposes? I am also a little lost as of where to go from here, looking at the preset plugins and they're not making sense as to where they're pulling things from. a little help for a noob would be very appreciated, thanks!
patches directly replace parts of discord's code. you can find said parts of code either through react devtools (enable in settings -> vencord), or just guessing function names in code search (devtools -> ctrl+shift+f). also mind if i ask which guide you're using?
I've been using these two: https://github.com/Vendicated/Vencord/blob/main/docs/2_PLUGINS.md
thats all I can find for any type of vencord development
with the react devtools, it's ctrl + shift + i to open them right?
yeah
ok. is there a better guide to use that will actually explain this a little better
https://github.com/Vendicated/Vencord/blob/main/CONTRIBUTING.md goes a bit more in depth on how to make a patch.
there's also https://gist.github.com/ActuallyTheSun/28bd595f8c07992f6d03289911289ba8
how would I create a plugin that finds all code blocks and edits their html based on their content
i can do the manipulation of the HTML just wondering how I would find all codeblocks in view
that would be horrible
how to rce 101
<script>
alert('haiii')
</script>```
type beat
Well no I was gonna use it to render LaTeX
ohh
I just need to be able to find the codeblocks and read their contents
so i can detect if they are latex and then put a rendered version instead of the code
ohhh
mmm yes now all I gotta do is like escape the shit I need
we really need to revamp basic docs
don't use dom
patch the react component and return ur custom component
anyway rethink whether executing arbitrary latex code is safe
I doubt it is
latex script tag
i don't know where to ask so is there a way to add simple js snippets to be run by vencord?
(i made one that just changes the notif sound but i still want to use it along with vencord)
you could make it a plugin
but that would require me to maintain a full fork of vencord which i don't want to do (i want to keep auto updates)
src/userplugins:
is that possible with vencordDesktop?
how
build vencord yourself and tell vesktop to use the custom version
it still updates
wait i don't have to manually git pull every time?
well it did the job :3
horror
await Vencord.Webpack.Common.FluxDispatcher.dispatch({type: "DRAFT_CLEAR", channelId: 812748542748786712, draftType: 0})
``` this should in theory work but guh
i will have shitcord ux forever
inb4 read only dispatch event

Okay it does work, just not on channels you can actually chat in

no more unclearable draft, fuck your ux discord
whats odd about this is it only works until you restart
im actually gonna lose it


I hate you so much, you're gonna make me rebuild Vencord again
π₯Ί
Another cosmetics shop :)
cooking crack probably

found where I will copy a swatch from for colorways
It's even using the native discord colorpicker
what's the plugin that shows the nitro background?
is a backtick (`) ever used in css
it's not, no
(I even went through the css syntax specification to double check for you
)
tysm :D
yeah but is it valid for any real use?
.banana::after {
content: "`";
}
edgecases my beloathed
im using regex to match everything except ` https://cdn.discordapp.com/emojis/1102371462934962187.webp?size=48&name=pureagony&quality=lossless
[^`]*
hey, can you help me make a simple colorpicker? I tried porting part of your code from #1032200195582197831 , but nothing renders
how do i make people have to sign up to a website to verify on discord
that's called user flow
and basic api checks
you need to prompt the user to sign up
then give them the option to connect his discord using oauth
him
ASSUMING!!! KILL THEM!!
add checks so that the signup/login process cannot be skipped
Theoretical someone
discordjs.guide has a very good guide on oauth
and can definitely explain it better than I can
It somehow worked???????????
so, there is an issue with the swatches
they only load if you open the settings
I mean, if there is a way to patch it inside the appearance tab
idk but if you can't fix it just add a button (or link) that opens settings so its easier to do
ofc there is
This can be done with the flux dispatcher I believe
I use it on the bd version to open the theme previewer sidebar
stop using the dom selector and use react devtools
so use react devtools
wow, it works on edge as well
from there, search where these components are used
for example by searching for \.Gradient\b in the sources tab
and boom there it is
and how would that translate to a patch?
Does Vencord.Plugins.plugins give access to the object I return with definePlugin?
yes
ok thx
$self in patches
Why is reactive state in svelte so lame?
no updates on array.pop() or changes to nested objects
it makes me want to vomit though
make your own store for it
NGL, no idea what a store is yet in this context
svelte store
so, _e.Basic and _e.Gradient (your example) are next to each other from what I can see
I have a patch here as an example, but it's hard to make sense of what is what
what.
no you did not, github
no you did not just shove me a copilot ad
yep, leads to the thing
why is esbuild doing different behavior on watch
when i watch it builds everything in the current dir
when i normally build it does what it should
/**
* @type {esbuild.BuildOptions[]}
*/
const buildConfigurations = [
{
...common,
entryPoints: ["src/index.ts"],
outfile: "out/preload.js",
footer: {
js: "//# sourceURL=BluskyPatcher\n" + sourceMapFooter("patcher"),
},
sourcemap,
},
];
if (watch) {
const contexts = buildConfigurations.map((config) => {
esbuild.context(config);
});
await Promise.all(contexts.map((context) => context.watch(watchOptions)));
} else {
await Promise.all(buildConfigurations.map((config) => esbuild.build(config)));
}
process.exit(0);
should i just go back to the version where watch is a build argument
no it does the same thing there??????????
i did do that and just called rebuild once if it wasnt watch but it did the same
oh awa i was using vencord's script as reference but it uses older esbuild
i tried this but no workie
/**
* @param {esbuild.BuildOptions} options
*/
async function addContext(options) {
const context = await esbuild.context(options);
contexts.push(context);
}
await Promise.all([
addContext({
...common,
entryPoints: ["src/index.ts"],
outfile: "out/preload.js",
footer: {
js: "//# sourceURL=BluskyPatcher\n" + sourceMapFooter("patcher"),
},
sourcemap,
}),
]);
if (watch) {
await Promise.any(contexts.map((context) => context.watch()));
contexts.forEach((context) => {
context.dispose();
});
} else {
await Promise.all(contexts.map((context) => context.rebuild()));
}
process.exit(0);
copy this verbatim
does the same thing
import { BuildContext, BuildOptions, context } from "esbuild";
import vencordDep from "./vencordDep.mjs";
const CommonOpts = {
bundle: true,
sourcemap: "linked",
logLevel: "info",
};
const NodeCommonOpts = {
...CommonOpts,
format: "cjs",
platform: "node",
external: ["electron"],
target: ["esnext"],
define: {
IS_DEV: JSON.stringify(isDev),
},
};
const contexts = [];
async function createContext(options) {
contexts.push(await context(options));
}
await Promise.all([
createContext({
...NodeCommonOpts,
entryPoints: ["src/index.ts"],
outfile: "dist/preload.js",
footer: { js: "//# sourceURL=sourceurl" },
}),
]);
const watch = process.argv.includes("--watch");
if (watch) {
await Promise.all(contexts.map((ctx) => ctx.watch()));
} else {
await Promise.all(
contexts.map(async (ctx) => {
await ctx.rebuild();
await ctx.dispose();
})
);
}
all i did was remove typings
wait wtf
vscode tasks are running an old version of the script???????
the build script works, my task is doing it weird tho
what the fuck
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "node ./build.mjs",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "watch",
"type": "shell",
"command": "node ./build.mjs --watch"
}
]
}
cache maybe?
zero clue
vscode is extremely laggy i think that might have something to do with it
as in wont open files laggy https://cdn.discordapp.com/emojis/1102371462934962187.webp?size=48&name=pureagony&quality=lossless
close is also brokey
well, you are dealing with a gui
oh, oh that's bad
ask discord
just look up what that does
DISCORD MOM;ENT
oh, oh no
duplicate modules π
it isnt used indeed but there is no reason for it to exist
this is likely just them being too stupid to use an if else
so they have two different modules for a tiny A/B testing change
not the first time :)
that's true
finally getting my shit together
only thing remaining is the template string, replacing the appropriate text, and saving the custom colorways
if all goes well, this will be a very much improved version of the bd counterpart
asking out of curiosity, not bc im gonna do anything with it, would it be possible to load some plugins at runtime without compiling if the modules it patches havent been loaded yet?
yes
ah
discord good
