#🧩-plugin-development
1 messages · Page 4 of 1
gui tbh
its pain
git kraken
@dull magnet @dull magnet @dull magnet @dull magnet @dull magnet do mpris NOW
conflict@near aurora @near aurora
soon
skull issue then
link pr
yes but like does anyone know how to detect like changing channels or something like that
fixx
oh my god what for
you will do this
dom manipulation horrible do not do this i will send so many bombs to your home your entire city will disappear
Asking about your attempted solution rather than your actual problem
Asking about your attempted solution rather than your actual problem
Asking about your attempted solution rather than your actual problem
so i can detect if it changed bruh
WHAT FOR
this is so funny
for dom patching yes
you will instead just regex patch components
no i have skill issue
GGUHHHHHH EXPLODE DO NOT MAKE BETTER DISCORD 2
goose mod 2
aa gamer loves goosemod pure dom settings ui
they moved it to reacy
i'm not gonna share the plugin
too bad we will not help because dom manipulation deranged you will just regex patch
so you can make whatever tf u want
crying sobbing choking throwing up
i haven't even learned React properly
i will dom manipulate you
btw aagamer did u see that weird client mod that recursively compiles files at runtime then evals that and regex patches desktop core to add node integration
deranged
**Patcher.js: **Lines 124-153
const scriptsContents = await Promise.all(scripts
.filter(name => !name.startsWith('!'))
.filter(name => name.endsWith('.js'))
.map(async file => {
return await this.compileFile(path.join(path.dirname(__dirname), 'scripts', file));
// const code = await fs.readFile(path.join(path.dirname(__dirname), 'scripts', file), {
// encoding: 'utf8'
// });
// return
})
);
const stylesContents = await Promise.all(styles
.filter(name => !name.startsWith('!'))
.filter(name => name.endsWith('.css'))
.map(file => {
return fs.readFile(path.join(path.dirname(__dirname), 'styles', file), {
encoding: 'utf8'
});
})
);
const jsInject = this.makeInjectable(scriptsContents.join(''));
const cssInject = this.makeInjectable(stylesContents.join(''), `
let style = document.createElement('style');
style.type = 'text/css';
style.rel = 'stylesheet';
style.className = 'dorucord-main-stylesheet';
style.textContent = <injected-content>;
document.head.appendChild(style);
`);
const pluginsInject = this.makeInjectable(plugins, `window._plugins = <injected-content>;`);
this.compileFile = rollup
then they expose require to renderer
and those bundles call require
HORRIBLE EXPLODE NOW
its so bad
they call themselves bd and use bd prefix for css https://github.com/Dorumin/Dorucord/blob/master/plugins/theme-core/core-vars.css

whats wrong
whaaaa
is that catppuccin or what
hop off grey mode
afn merg
affen 
i want to get this over with
done
aaa github
all my braincell is dead
@wanton sierra @wanton sierra
thanxs
@dull magnet pliz merg
i did all the changes
i even approved them myself
wjat did she mean by this
no idea
regex insan
horro
py love
based
i cannot look at it any more
feast ur eyes
unused import
merge now
soon
@near aurora you're insane
oh
just mark as resolved 
clumsy boy
you will split into 9 million commits
can be squashed on merge
can u make the bar hitbox thicker
on github
its kinda pain to press
which one
the seekbar
like clicking it is kinda pain
whar
@dull magnet its so thick
first one is ur 45
thisis literally perfectly centered
no i have uiscale
i think
ok fine
guh
ill leave at 50
also i sclaed down the icon
and ven join in on listening party were not done yet
whys that
were listening to joji
would it be better to have these be swapped?
which ones
yea probably
holy shit big no
listening alone on bottom
ok
ok
the cover being close to the edge not good
no it's bad
it's aligned
how is it shifting
no i meant in this
I mean It moves up if someone were to start lostening
is it just me or does the thingie look off center
ye old way is better
rent free
ur mom
were vibing
square pfps is so gay
correct
ur so gay but no one complained
btw the title thing doesnt show as popup
how did it get out of sync
conflicts
it will show
how did it even happen
idk bozo
like im making a pr ofc i want my changes to happen
why aren't using a different branch
what
skill issue
git gud
is it just me or is the fact that theres 0 indicator for hovering over the seekbar kinda meh
i mean its discords fault not urs but still
looks like spotify has 0 indicator either
because u can't seek in popout
youtube does it way better
if that's what u mean
hover anywhere else on the bar
how
youtube does it way better
wdym
how tf r u having conflicts as the only guy working on it btw lmao
conflicting with urself 
fixed it
@lilac cipher now merg
last one hopefully (what i said 20million times before)
btw sorry for the many nitpicks
just wanna make sure everything top notch
where the music go xen
roseboxcord
it looks good but the fact that some things are like greyed out makes it kinda depressing
like this
for now probably good
why is the workflow not running 
maybe in the future seekbar rewrite if i hate myself enough
#vc-spotify-progress-bar [class*="bar"]:hover {
cursor: pointer;
}
i mean its ur public github email anyone can see that
if its supposed to be private change ur gh email asap
yeah skill issuer
@near aurora can u fix this plox
the emote picker is resizable u know..
but ur theme breaks it
no resize allowed
pr fix if so fancy
locking u up in my basement until u fix
thats not a punishment
the emoji picker in my theme is an abomination that i think emma from powercord wrote in 2020 it uses pixel perfect translates and rotates
i tried to rewrite it twice and it did not go well
so feel free to rewrite and allow resize
catpuccin mocha
send codes
@near aurora GUHH how do you have so many prs
I made it myself
@lilac cipher@lilac cipher@lilac cipher@lilac cipher@lilac cipher@lilac cipherguhhh you will tell what lanyard.rest is
zt refused
guh
g
exposes discord rich prescence
so you can access it through an api
ignore banner
uu very nice
you love their server banner @silver cave
trol
yop saw
i will unkill stupit bot one day
i used it for dumb svg of status on my github profile
you love
when the server banner is sus
delete
HORROR
you are deranged
also this is peak #🧩-plugin-development
bluecord developer is artist
trol
GUHHH but why
you already exploded it
who cr
wait do admins bypass automod
they do ok
but theres only one single word banned
guess
do
hungry ven
it would be good if i could disable better screenshare res and sticker bypass
i do not care for better res because it lags my computer + is detectable
i do not care for stickers, they are polluting my autocompelte and i never use them anyway
xd
time to try and clone this for vencord https://github.com/GooseMod-Modules/UsernameInAuthor/blob/main/index.js
**index.js: **
import { username } from '@goosemod/patcher';
import { findByProps } from '@goosemod/webpack';
import { React } from '@goosemod/webpack/common';
const MessageClasses = findByProps('compact', 'repliedMessage', 'username');
let unpatch;
export default {
goosemodHandlers: {
onImport: () => {
unpatch = username.patch(({ message, author }) =>
React.createElement('span', {
className: [MessageClasses.username, 'authorUsernameHint'].join(' '),
style: {
color: author.colorString,
filter: 'brightness(0.5)',
marginLeft: author.nick === message.author.username ? '' : '5px'
}
}, author.nick === message.author.username ? '' : `(${message.author.username})`
)
);
},
onRemove: () => {
unpatch();
}
}
};
what it used to look like when i used it on goosemod
DataStore
@dull magnet you should make a plugin that does the thing where
the folder background is the same color as the folder when open
wait this isn't general
await DataStore.get("key")
DataStore.set("key", literallyAnythingHereWellAlmostAnything)
what
Figured out
Anyways, do you think I can fetch a list of all commands currently available?
Figured out
if you really want an example IgnoreActivities uses it
text replacement omegaplugin rewrite when
where would i start with porting this to vencord
@dull magnet I know why it doesn't work
you are dumb and made the ""!==(.{1,2})&& a positive lookbehind
which means it doesn't get deleted
which means it actually checks for the experiment
that was deliberately not a lookbehind so it would delete that code
ok and it looks like the regex is a little more messed up but ill fix it later I need sleep
oh
idk i wasnt fully sure what that regex was supposed to match exactly cause the children layout changed so much
I might just delete the patch and completely remake it
uh
is this not correct
cause it doesnt show
uh
its never called??
it uses this one now
super small module way easier to patch
im gonna patch this one instead
uhhh discord
I already made a wrapper it just needs to be updated for the new component structure I guess
æ
æ
æ
æ
æ
æ
æ
eat some Coco pops
I don't have :(
😭
i knoww 
is there a way of getting all members in a guild
only gonna be small servers
lul
you can make urself a system user
lmao
wait a minute...
I can view the fucking audit log
phew, for a second i thought that discord had bad security
i just gave everyone permission to do it
cause i had set myself as the server owner locally
wait a second
what?
is discord security that bad? or just a UI bug?
try it 
lemme test on a throw away server
that'd be a UI bug then
why
why
bc edge cases
it already does checks for permissions
why would they handle "edge" cases that are impossible to happen
why not?
gay sex
this isnt north korea you're allowed to know what's going on
lets make it north korea
TRY
forces client to think im server owner
client treats me like im the server owner

free software
explode
I did not exactly force it
I just modified the cache
It is possible for it to happen w/o modifying the cache
Unprobable? Yes
Impossible? No
??
clearly you should have locks on every door in your house then
it's not impossible that someone could appear in your bathroom
I do have locks on every door
What kind of door does not have a lock?
You prob should have picked a better analogy
do you lock them
That's a different matter
Well discord has checks but by manipulating their cache to make yourself admin you're unlocking the locks

The cache is temporary
Not my problem that discord doesn't refresh it
Anyways, my point was that the UI should always check the API responses before showing that smth worked
then it'd feel laggy
It could update the UI later to reflect the error then
They aren't impossible to happen
they are
What if I transfer ownership to another person (using a different device)
And my local cache still says that I'm the owner
The UI will show normally but the API will error
there's no way anything could happen in between you opening the delete modal and submitting the delete
and you exactly know why it didn't work??
so why would they need to handle errors purposely caused by you
makes no sense
"well technically the user could plant a piece of c4 in the car before starting it so clearly the car should first check for the presence of c4"
?????
wait you actually think the client should handle that correctly?
Dude, first of, why are you like that?
I can't even troll in this server?
And also, you should always handle any edge case
It ain't hard to show an error notif or smth when the API returns 403
omw to account for cosmic rays on every single function
a lot of api errors are normal so they'd have to differentiate between so many errors for edge cases that will never happen
You should also account for atomic clocks
they already do check for cases like message sending
where it actually is reasonably possible to run into an error
Indeed it does
PS: why do you always find conflict with what I say?
Like, most of the time I'm joking
But when you respond like that I take it seriously
People are genuinely that stupid so I'd say it's hard to tell that it's a joke



Oh yes, in what context would I mod myself to be the owner other than trolling?
why did it change from createElement
guh
@dull magnet how do i get devtools again
enable
where
in settings
correct

(thats me)
suggestion: you should be able to see the changelog in updater
or something
instead of having to click the link and see commit history
oh didn't see that
when you're up to date
not when there are updates available
there so that you know what changed since the last time you updated it
it shows commit message when there are new updates idk what ur on about
like you want to be able to see all commits when you're up to date?
i usually just read before updating
i don't think there's any real solution other than just having the whole git history

u can block the bot if u dont want it reacting to u lmao
Poor bot fr
didn't know that works
you can ban it
does arguments[0] impact perf much
nop
i should leave it at that
the funny context menu loading
troller
nono
why is it so cute
if i turn on dev mode to show the copy id then it shows copy id
yeah it's the placeholder
i will push now
that's nice
can you check an attachment?
add explode option
husk
venlogger
.messageLogger-deleted {
background-color: inherit !important;
}
.messageLogger-deleted div {
color: #f04747 !important;
}
``` @dull magnet
wh
color highlight based
love copilot
guh
good
soon
i rewrote in jsx
okay i pushed @granite wharf
check changes to see if it ok
help u cant disable the plugin
(vencor 🐛)
@granite wharf chck NOW
so i can merge before sleep
no
yop
text is garbage
LOL
you love @granite wharf
you love that i pushed unrelated fix to ur pr
its a really small fix i dont wanna make a separate commit for xd
i merged
probably blacklist clyde from message logger
I wanna see deleted clyde messages
ay, so... I’m working on a plugin and things are going smoothly so far, though i have a question as the documentation seems not to have much.
- Is it possible to insert a react component on the main view with the current plugin’s API? (i.e: insert a button under the discord home button) if so can anyone provide any example.
there's a bunch of plugins inserting ui elements
find the code responsible for that part of the ui and patch it to insert your own code that calls a function on your plugin
then make that function return a component
oh there is plugin that insert ui? i didn’t find any 💀
ReviewDB(not merged)
what we thinkin
nop
GUH
you will make 
I might make indicators
btw will you work on persisting logger?
force zt to make dmcategories
i think u wanted to make
no
you love this role colour style
guhhh
dot cute
I just had an idea on how
too lazy to do it
ur the best
yes
blockchain message logger
love
somebody plz rewrite spotifyControls to use discord's ui shit maybe then the glitching will be fixed
What
the spotifycontrols glitch around and shit
it literaly uses discords ui bro
Is A plugin To open links In Mpv possible to implement
ye
you can add an ipc call for launching mpv
or does it support a custom protocol
like mpv://bleh
I usually use MPV to watch streaming mp4 videos. I think would be nice if MPV manages x-scheme-handler like mpv://https://domain.null/nicevideo.mp4 by itself. Actually to accomplish this I created ...
"its incredibly unsafe"
lmao
so basically opening stuff in mpv = arbitrary code execution
i think it can still be added though if it's made clear to the user that this risk exists
MPV skill issue ong
actually it seems if it's only https urls it's safe?
read the thingi linked
mpv://av://lavfi:ladspa=file=/some/evil/so/here.so
but again if it only passes http urls it's safe
fair
well anyway yes it can be added
it can be made secure by properly validating the input
yea that's what i thought
when reading that
nah they aren't
I'm lost lol
Not sure if I'm confused but they meant open MPV when clicking on video, from my understanding
lol why
when i was on web app discord i had this extension to open links in mpv by right clicking on them and selecting the play with mpv from the menu
but i think if it was directly accessible from the embed i think it would be better
like you did
that extension seems unsafe btw since it uses mpv:// schema like warned against in the issue
so might wanna test if what that person posted is accurate
looked at the source code it doesn't seem like it
just a python script that calls subprocess.open with mpv and the url

alongside with the extension, you had to run a script to make it Just Work

LOL ITS VULNERBALE

Lmfaooo
😭
Me bouta RCE all the Firefox users that have this addon by hacking the dev's email and uploading a new version
The middleman is vulnerable 
basically that extension gives any site the ability to execute arbitrary code on your machine as long as they somehow get a .into your system

im gonna open an issue lmao
So only Linux/android shit?
Actually, android url protocols work differently
So only Linux?
Pretty sure .so doesn't get the dangerous file thing on download either 
So site can force download it
Altho they need your home path for the forged url
Btw, do y'all get a notif about FUSE appimagekit error or smth when you open links via discord?
No?
Or is it just appimagemanager using a diff name on the notif?
Kinda annoying, cause it is a false error
Unfortunate 
opened an issue 
i actually didn't use this one, i used another one called ff2mpv
not sure if it does the same thing
looks like this one also has the vulnerability lol https://github.com/Thann/play-with-mpv/blob/master/chrome-extension/background.js
but it's only invokable by clicking the extension item so no biggie
this uses native messaging which is cool https://github.com/woodruffw/ff2mpv/blob/master/ff2mpv.js#L9
**ff2mpv.js: **Line 9
browser.runtime.sendNativeMessage("ff2mpv", { url: url }).catch(onError);
but it seems to have the same vulnerability also
at least it's only doable by clicking the extension context menu entry which i don't think websites can do? so it should be fine
anyway got very sidetracked 
my bad
pretty funny tho
LOL the second one is vulnerable too afterall
This extension allows any site to run arbitrary .so files on your computer This can be done via open("http://localhost:7531/?play_url=${URLENCODE(av://lavfi:ladspa=file=/some/evil/so/here....
we having a field trip today
Ven on his way to write "security researcher" in his CV
yop

Force him to merge my pr too
YOP
although can you move the reviews after the notes section
its annoying to scroll
oh wait it got fixed love
you fix it
it's likely not getting connection open
aka never firing Webpack.onceReady
run await Vencord.Webpack.onceReady in the console
if it stalls forever, that's why
@granite wharf @granite wharf
I sleep
ok fixed
@dull magnet why is CI stopped
am I safe to use the one from releases
or
idk
like
there were like weird issues with the old one where it would sometimes make the release a draft and then there was no more release
this one works nicer
oh yeah that happens on armcord too sometimes
I just migrated to using gh cli, it's pre installed in workflows which is cool
so no need for the third party action
very cool
**build.yml: **Lines 44-50
- name: Upload Devbuild
run: |
gh release upload devbuild --clobber dist/*
gh release edit devbuild --title "DevBuild $RELEASE_TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ env.release_tag }}
should be
are you trying to do
.myElement. contextMenu {}
that won't work because context menus are implemented in a really cursed way, it's basically a top level element that they just show on demand
same goes for tooltips
what the fuck
bots can do it
users can too, probably, but the official client doesn't
it just fetches on demand
when u scroll members
idk investigate network tab
I have an old script
But it's before discord changed webpack or whatever they did
Also this
I think if the server is small it's simple
but if its big then the only way to fetch everyone is to search for every letter
Which would be spamming api I think?
it's weird
rust is wierder and i tried to learn go but didn't like it
zig is more weird than rust
also spotify controls don't have any of the wierdness if i play on phone (and it only controls through api)
Yea probs
@dull magnet spotifycontrols fixed itself, or, well you did at some point
it is no longer buggy
lfg
because i didn't like any of the date formatting token standards, i made my own

this is exclusively date, not time
okay so..., is there a way to use react router and routes
in powercord it had getModule
to be more specific
i wanna open dms channel
the way i know of Router.transitionTo(Routes.CHANNEL('@me', channelId)); }
reverse engineer discord and find what they call to switch to a channel
it’s unclear how they do the DMs because of the minifying crap
i found a way but it’s half working only
they dispatch CHANNEL_OPEN
it opens the dm channel
but the left side will still be the last server you were on
so instead of showing other friends - nitro - DMs menu
it will show server channels
but the dms will be the correct dms
i think channel open is just meant for servers
because they do the transition to if the type is dm
I would guess they have an export for something used to transition to another channel
i tried looking for one but seems to be inconvenient
i will try finding a way to call transitionTo and CHANNEL function ig thats my best bet for now
uh
look how the update notification opens settings
in Vencord.ts
navigating to channels might be the same module
figure it out 
but that's the settings router
so it might not do channels, but the channel router would probably look similar
you can also just try open("https://discord.com/channels/1015060230222131221/1032770730703716362")
it might work 🤷♂️
i tried setting window href but that hard reloads the page instead transitioning
me waiting
const Router = mapMangledModuleLazy("Transitioning to external path", {
transitionTo: filters.byCode("Transitioning to external path"),
transitionToGuild: filters.byCode("transitionToGuild"),
goBack: filters.byCode("goBack()"),
goForward: filters.byCode("goForward()"),
});
but i don’t wanna transition to a guild 😭
i wanna open a dm
i already have servers working using the dispatch
btw theres also this lol
i don’t really get how filter and bycode findbyprops waitfor and those things
i found open private channel but i didn’t know how to call it
yes sorry stupid phone
im sorry this is literally the second day for me with this stuff 😭
findByProps finds modules by export names (export.getCurrentUser)
findByCode finds functions by their code
mapMangledModule is more advanced, it first finds a module by its source code, then renames imports by the filter functions, so you can turn
export {
A: func1,
B: func2,
C: foo,
}
``` into ```js
{
foundFunc1: func1,
foundFunc2:, func2,
foundFoo: foo
}```
wtf 😭
ok find by props sounds more understandable to me
i thought that “export” is a class instance
you shouldn't worry about mapMangledModule
^^
here's what mapMangledModule does
so goBack() is part of the source code of one of those exports
it finds it and renames
basically the first thing is the actual module, but as you can see the export names aren't really usable. So mapMangledModule checks each export against your filter function to find the desired one then renames it to your name
gonna use it on ignore activities brb
and the Lazy suffix in the function name just makes it lazy, aka it doesn't search for the module until you use it in some way
I thought about using mapMangledModule but I hadn't quite understood it
you should explain it better on the code
you can always just ask
yah
and wait for just waits for a module to have that export?
if you don't mind me asking, what's findByCode take in it's call?
just the code you wanna search for
take this function for example
nobody saw that
findByCode(".default.getUser(");
findByCode("oldFormErrors:!0");
findByCode("USER(");
these all work
you should just make sure that your search is unique, so it only finds exactly one module
that makes perfect sense, tyvm
so the first two are terrible, the third is good
does destructuring work with lazy
vendy so chaddy actually
this is cool shit
i have a very similar arch in cpp for to find stuff in memory 
if you don’t mind me asking though, what does the lazy stuff do then? like lazyWebpack (sorry if this is too stupid)
i’ll save this link, you are a king
does using the byProps filter on mapMangledModule not check if the export name is the prop








